@leadal/flowstream-ui-plus 0.0.1 → 0.0.3
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.
- package/README.md +159 -22
- package/dist/flowstream-ui-plus.js +5969 -5365
- package/dist/flowstream-ui-plus.umd.cjs +12 -12
- package/dist/index.d.ts +13189 -227
- package/dist/style.css +1 -1
- package/docs//346/216/245/345/205/245/346/226/207/346/241/243.md +119 -9
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
(function(he,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],l):(he=typeof globalThis<"u"?globalThis:he||self,l(he.FlowstreamUIPlus={},he.Vue,he.ElementPlus))})(this,(function(he,l,ht){"use strict";/*! Element Plus Icons Vue v2.3.2 */var Rs=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Ts=Rs,Ps=l.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),Ns=Ps,Os=l.defineComponent({name:"Back",__name:"back",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),l.createElementVNode("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),Oi=Os,Ds=l.defineComponent({name:"Check",__name:"check",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Ms=Ds,Bs=l.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),l.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Is=Bs,Ls=l.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Fs=Ls,Vs=l.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),$s=Vs,js=l.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),Us=js,zs=l.defineComponent({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Di=zs,Hs=l.defineComponent({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Mi=Hs,Ws=l.defineComponent({name:"Switch",__name:"switch",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344M64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),Bi=Ws,qs=l.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),Ys=qs,Ks=l.defineComponent({name:"VideoPlay",__name:"video-play",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Ii=Ks;const Gs={key:1,"aria-hidden":"true"},Xs=["href"],Js=l.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:Oi,delete:Fs,save:$s,enable:Ii,start:Ii,hang:Ys,restore:Mi,revocation:Di,taskWithdraw:Di,taskRecyle:Mi,terminate:Is,jump:Bi,taskJump:Bi,taskComplete:Ms,taskSend:Us,taskRollback:Oi},r=l.computed(()=>n[t.iconClass]);return(i,o)=>(l.openBlock(),l.createElementBlock("span",l.mergeProps({class:"workflow-svg-icon"},i.$attrs),[r.value?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.value),{key:0})):(l.openBlock(),l.createElementBlock("svg",Gs,[l.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,Xs)]))],16))}}),_t=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},Zs=_t(Js,[["__scopeId","data-v-366205a3"]]),Qs={class:"ui-flow-btn"},Li=_t(l.defineComponent({name:"UiFlowButton",__name:"FlowButton",props:{type:{},label:{}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,i=[{label:"保存",value:"save",icon:"save"},{label:"启动",value:"start",icon:"enable"},{label:"撤回",value:"revocation",icon:"taskWithdraw"},{label:"撤回",value:"taskWithdraw",icon:"taskWithdraw"},{label:"收回",value:"taskRecyle",icon:"taskRecyle"},{label:"挂起",value:"hang",icon:"hang"},{label:"恢复",value:"restore",icon:"restore"},{label:"终止",value:"terminate",icon:"terminate"},{label:"跳转",value:"jump",icon:"jump"},{label:"跳转",value:"taskJump",icon:"jump"},{label:"办毕",value:"taskComplete",icon:"taskComplete"},{label:"发送",value:"taskSend",icon:"taskSend"},{label:"退回",value:"taskRollback",icon:"taskRollback"}],o=l.computed(()=>i.find(s=>s.value===n.type));function a(){var s;r("click",(s=o.value)==null?void 0:s.value)}return(s,f)=>{const p=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("span",Qs,[o.value?(l.openBlock(),l.createBlock(p,{key:0,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.createVNode(Zs,{"icon-class":o.value.icon},null,8,["icon-class"]),l.createTextVNode(" "+l.toDisplayString(e.label||o.value.label),1)]),_:1})):(l.openBlock(),l.createBlock(p,{key:1,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"default",{},void 0,!0)]),_:3}))])}}}),[["__scopeId","data-v-2f3f771c"]]);function Fi(e,t){return function(){return e.apply(t,arguments)}}const{toString:el}=Object.prototype,{getPrototypeOf:Xt}=Object,{iterator:pn,toStringTag:Vi}=Symbol,Nn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dn=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Nn(n,t))return!0;n=Xt(n)}return!1},tl=(e,t)=>e!=null&&dn(e,t)?e[t]:void 0,yr=(e=>t=>{const n=el.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),et=e=>(e=e.toLowerCase(),t=>yr(t)===e),On=e=>t=>typeof t===e,{isArray:Bt}=Array,It=On("undefined");function Jt(e){return e!==null&&!It(e)&&e.constructor!==null&&!It(e.constructor)&&Ye(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $i=et("ArrayBuffer");function nl(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$i(e.buffer),t}const rl=On("string"),Ye=On("function"),ji=On("number"),Zt=e=>e!==null&&typeof e=="object",il=e=>e===!0||e===!1,Dn=e=>{if(!Zt(e))return!1;const t=Xt(e);return(t===null||t===Object.prototype||Xt(t)===null)&&!dn(e,Vi)&&!dn(e,pn)},ol=e=>{if(!Zt(e)||Jt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},al=et("Date"),sl=et("File"),ll=e=>!!(e&&typeof e.uri<"u"),cl=e=>e&&typeof e.getParts<"u",ul=et("Blob"),fl=et("FileList"),pl=et("Set"),dl=e=>Zt(e)&&Ye(e.pipe);function hl(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ui=hl(),zi=typeof Ui.FormData<"u"?Ui.FormData:void 0,ml=e=>{if(!e)return!1;if(zi&&e instanceof zi)return!0;const t=Xt(e);if(!t||t===Object.prototype||!Ye(e.append))return!1;const n=yr(e);return n==="formdata"||n==="object"&&Ye(e.toString)&&e.toString()==="[object FormData]"},yl=et("URLSearchParams"),[gl,vl,wl,bl]=["ReadableStream","Request","Response","Headers"].map(et),El=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function hn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Bt(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Jt(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function Hi(e,t){if(Jt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Lt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wi=e=>!It(e)&&e!==Lt;function gr(...e){const{caseless:t,skipUndefined:n}=Wi(this)&&this||{},r={},i=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&typeof a=="string"&&Hi(r,a)||a,f=Nn(r,s)?r[s]:void 0;Dn(f)&&Dn(o)?r[s]=gr(f,o):Dn(o)?r[s]=gr({},o):Bt(o)?r[s]=o.slice():(!n||!It(o))&&(r[s]=o)};for(let o=0,a=e.length;o<a;o++){const s=e[o];if(!s||Jt(s)||(hn(s,i),typeof s!="object"||Bt(s)))continue;const f=Object.getOwnPropertySymbols(s);for(let p=0;p<f.length;p++){const h=f[p];Dl.call(s,h)&&i(s[h],h)}}return r}const _l=(e,t,n,{allOwnKeys:r}={})=>(hn(t,(i,o)=>{n&&Ye(i)?Object.defineProperty(e,o,{__proto__:null,value:Fi(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),xl=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Al=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Xt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Cl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},kl=e=>{if(!e)return null;if(Bt(e))return e;let t=e.length;if(!ji(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Rl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Xt(Uint8Array)),Tl=(e,t)=>{const r=(e&&e[pn]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Pl=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nl=et("HTMLFormElement"),Ol=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:Dl}=Object.prototype,Ml=et("RegExp"),qi=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};hn(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Bl=e=>{qi(e,(t,n)=>{if(Ye(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ye(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Il=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Bt(e)?r(e):r(String(e).split(t)),n},Ll=()=>{},Fl=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Vl(e){return!!(e&&Ye(e.append)&&e[Vi]==="FormData"&&e[pn])}const $l=e=>{const t=new WeakSet,n=r=>{if(Zt(r)){if(t.has(r))return;if(Jt(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(pl(r)){i=[];for(const o of r){const a=n(o);!It(a)&&i.push(a)}}else i=Bt(r)?[]:{},hn(r,(o,a)=>{const s=n(o);!It(s)&&(i[a]=s)});return t.delete(r),i}}return r};return n(e)},jl=et("AsyncFunction"),Ul=e=>e&&(Zt(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),Yi=((e,t)=>e?setImmediate:t?((n,r)=>(Lt.addEventListener("message",({source:i,data:o})=>{i===Lt&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Lt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ye(Lt.postMessage)),zl=typeof queueMicrotask<"u"?queueMicrotask.bind(Lt):typeof process<"u"&&process.nextTick||Yi,Ki=e=>e!=null&&Ye(e[pn]),g={isArray:Bt,isArrayBuffer:$i,isBuffer:Jt,isFormData:ml,isArrayBufferView:nl,isString:rl,isNumber:ji,isBoolean:il,isObject:Zt,isPlainObject:Dn,isEmptyObject:ol,isReadableStream:gl,isRequest:vl,isResponse:wl,isHeaders:bl,isUndefined:It,isDate:al,isFile:sl,isReactNativeBlob:ll,isReactNative:cl,isBlob:ul,isRegExp:Ml,isFunction:Ye,isStream:dl,isURLSearchParams:yl,isTypedArray:Rl,isFileList:fl,forEach:hn,merge:gr,extend:_l,trim:El,stripBOM:xl,inherits:Sl,toFlatObject:Al,kindOf:yr,kindOfTest:et,endsWith:Cl,toArray:kl,forEachEntry:Tl,matchAll:Pl,isHTMLForm:Nl,hasOwnProperty:Nn,hasOwnProp:Nn,hasOwnInPrototypeChain:dn,getSafeProp:tl,reduceDescriptors:qi,freezeMethods:Bl,toObjectSet:Il,toCamelCase:Ol,noop:Ll,toFiniteNumber:Fl,findKey:Hi,global:Lt,isContextDefined:Wi,isSpecCompliantForm:Vl,toJSONObject:$l,isAsyncFn:jl,isThenable:Ul,setImmediate:Yi,asap:zl,isIterable:Ki,isSafeIterable:e=>e!=null&&dn(e,pn)&&Ki(e)},Hl=g.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wl=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
2
|
-
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim();const s=
|
|
3
|
-
`)}getSetCookie(){const t=this.get("set-cookie");return g.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return ec(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Xi]=this[Xi]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=mn(a);r[s]||(rc(i,a),r[s]=!0)}return g.isArray(t)?t.forEach(o):o(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),g.reduceDescriptors($e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),g.freezeMethods($e);const Bn="[REDACTED ****]";function ic(e){if(g.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(g.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function oc(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||g.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof $e&&(o=o.toJSON()),r.push(o);let a;if(g.isArray(o))a=[],o.forEach((s,f)=>{const p=i(s);g.isUndefined(p)||(a[f]=p)});else{if(!g.isPlainObject(o)&&ic(o))return r.pop(),o;a=Object.create(null);for(const[s,f]of Object.entries(o)){const p=n.has(s.toLowerCase())?Bn:i(f);g.isUndefined(p)||(a[s]=p)}}return r.pop(),a};return i(e)}function Ji(e){try{return String(e)}catch{return""}}function ac(e){return e.errors.map(n=>{try{return n&&n.message?Ji(n.message):Ji(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Z=class Cs extends Error{static from(t,n,r,i,o,a){let s=t.message;!s&&g.isArray(t.errors)&&t.errors.length&&(s=ac(t));const f=new Cs(s,n||t.code,r,i,o);return Object.defineProperty(f,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),f.name=t.name,t.status!=null&&f.status==null&&(f.status=t.status),a&&Object.assign(f,a),f}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&g.hasOwnProp(t,"redact")?t.redact:void 0,r=g.isArray(n)&&n.length>0?oc(t,n):g.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Z.ERR_BAD_OPTION="ERR_BAD_OPTION",Z.ECONNABORTED="ECONNABORTED",Z.ETIMEDOUT="ETIMEDOUT",Z.ECONNREFUSED="ECONNREFUSED",Z.ERR_NETWORK="ERR_NETWORK",Z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Z.ERR_DEPRECATED="ERR_DEPRECATED",Z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Z.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Z.ERR_CANCELED="ERR_CANCELED",Z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Z.ERR_INVALID_URL="ERR_INVALID_URL",Z.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const sc=null,Zi=100;function Er(e){return g.isPlainObject(e)||g.isArray(e)}function Qi(e){return g.endsWith(e,"[]")?e.slice(0,-2):e}function _r(e,t,n){return e?e.concat(t).map(function(i,o){return i=Qi(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function lc(e){return g.isArray(e)&&!e.some(Er)}const cc=g.toFlatObject(g,{},null,function(t){return/^is[A-Z]/.test(t)});function In(e,t,n){if(!g.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=g.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(M,w){return!g.isUndefined(w[M])});const r=n.metaTokens,i=n.visitor||H,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?Zi:n.maxDepth,p=s&&g.isSpecCompliantForm(t),h=[];if(!g.isFunction(i))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(g.isDate(S))return S.toISOString();if(g.isBoolean(S))return S.toString();if(!p&&g.isBlob(S))throw new Z("Blob is not supported. Use a Buffer instead.");if(g.isArrayBuffer(S)||g.isTypedArray(S)){if(p&&typeof s=="function")return new s([S]);throw new Z("Blob is not supported. Use a Buffer instead.",Z.ERR_NOT_SUPPORT)}return S}function _(S){if(S>f)throw new Z("Object is too deeply nested ("+S+" levels). Max depth: "+f,Z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B(S,M){if(f===1/0)return JSON.stringify(S);const w=[];return JSON.stringify(S,function(D,L){if(!g.isObject(L))return L;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(L),_(M+w.length-1),L})}function H(S,M,w){let E=S;if(g.isReactNative(t)&&g.isReactNativeBlob(S))return t.append(_r(w,M,o),m(S)),!1;if(S&&!w&&typeof S=="object"){if(g.endsWith(M,"{}"))M=r?M:M.slice(0,-2),S=B(S,1);else if(g.isArray(S)&&lc(S)||(g.isFileList(S)||g.endsWith(M,"[]"))&&(E=g.toArray(S)))return M=Qi(M),E.forEach(function(L,N){!(g.isUndefined(L)||L===null)&&t.append(a===!0?_r([M],N,o):a===null?M:M+"[]",m(L))}),!1}return Er(S)?!0:(t.append(_r(w,M,o),m(S)),!1)}const F=Object.assign(cc,{defaultVisitor:H,convertValue:m,isVisitable:Er});function R(S,M,w=0){if(!g.isUndefined(S)){if(_(w),h.indexOf(S)!==-1)throw new Error("Circular reference detected in "+M.join("."));h.push(S),g.forEach(S,function(D,L){(!(g.isUndefined(D)||D===null)&&i.call(t,D,g.isString(L)?L.trim():L,M,F))===!0&&R(D,M?M.concat(L):[L],w+1)}),h.pop()}}if(!g.isObject(e))throw new TypeError("data must be an object");return R(e),t}function eo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function xr(e,t){this._pairs=[],e&&In(e,this,t)}const to=xr.prototype;to.append=function(t,n){this._pairs.push([t,n])},to.toString=function(t){const n=t?r=>t.call(this,r,eo):eo;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function uc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function no(e,t,n){if(!t)return e;e=e||"";const r=g.isFunction(n)?{serialize:n}:n,i=g.getSafeProp(r,"encode")||uc,o=g.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=g.isURLSearchParams(t)?t.toString():new xr(t,r).toString(i),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ro{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){g.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Sr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},fc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:xr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ar=typeof window<"u"&&typeof document<"u",Cr=typeof navigator=="object"&&navigator||void 0,pc=Ar&&(!Cr||["ReactNative","NativeScript","NS"].indexOf(Cr.product)<0),dc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hc=Ar&&window.location.href||"http://localhost",Le={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ar,hasStandardBrowserEnv:pc,hasStandardBrowserWebWorkerEnv:dc,navigator:Cr,origin:hc},Symbol.toStringTag,{value:"Module"})),...fc};function mc(e,t){return In(e,new Le.classes.URLSearchParams,{visitor:function(n,r,i,o){return Le.isNode&&g.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const io=Zi;function oo(e){if(e>io)throw new Z("FormData field is too deeply nested ("+e+" levels). Max depth: "+io,Z.ERR_FORM_DATA_DEPTH_EXCEEDED)}function yc(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)oo(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function gc(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function ao(e){function t(n,r,i,o){oo(o);let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),f=o>=n.length;return a=!a&&g.isArray(i)?i.length:a,f?(g.hasOwnProp(i,a)?i[a]=g.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!g.hasOwnProp(i,a)||!g.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&g.isArray(i[a])&&(i[a]=gc(i[a])),!s)}if(g.isFormData(e)&&g.isFunction(e.entries)){const n={};return g.forEachEntry(e,(r,i)=>{t(yc(r),i,n,0)}),n}return null}const Qt=(e,t)=>e!=null&&g.hasOwnProp(e,t)?e[t]:void 0;function vc(e,t,n){if(g.isString(e))try{return(t||JSON.parse)(e),g.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const yn={transitional:Sr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=g.isObject(t);if(o&&g.isHTMLForm(t)&&(t=new FormData(t)),g.isFormData(t))return i?JSON.stringify(ao(t)):t;if(g.isArrayBuffer(t)||g.isBuffer(t)||g.isStream(t)||g.isFile(t)||g.isBlob(t)||g.isReadableStream(t))return t;if(g.isArrayBufferView(t))return t.buffer;if(g.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const f=Qt(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return mc(t,f).toString();if((s=g.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=Qt(this,"env"),h=p&&p.FormData;return In(s?{"files[]":t}:t,h&&new h,f)}}return o||i?(n.setContentType("application/json",!1),vc(t)):t}],transformResponse:[function(t){const n=Qt(this,"transitional")||yn.transitional,r=n&&n.forcedJSONParsing,i=Qt(this,"responseType"),o=i==="json";if(g.isResponse(t)||g.isReadableStream(t))return t;if(t&&g.isString(t)&&(r&&!i||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Qt(this,"parseReviver"))}catch(f){if(s)throw f.name==="SyntaxError"?Z.from(f,Z.ERR_BAD_RESPONSE,this,null,Qt(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch","query"],e=>{yn.headers[e]={}});function kr(e,t){const n=this||yn,r=t||n,i=$e.from(r.headers);let o=r.data;return g.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function so(e){return!!(e&&e.__CANCEL__)}let gn=class extends Z{constructor(t,n,r){super(t??"canceled",Z.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function lo(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Z("Request failed with status code "+n.status,n.status>=400&&n.status<500?Z.ERR_BAD_REQUEST:Z.ERR_BAD_RESPONSE,n.config,n.request,n))}function wc(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function bc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),h=r[o];a||(a=p),n[i]=f,r[i]=p;let m=o,_=0;for(;m!==i;)_+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),p-a<t)return;const B=h&&p-h;return B?Math.round(_*1e3/B):void 0}}function Ec(e,t){let n=0,r=1e3/t,i,o;const a=(p,h=Date.now())=>{n=h,i=null,o&&(clearTimeout(o),o=null),e(...p)};return[(...p)=>{const h=Date.now(),m=h-n;m>=r?a(p,h):(i=p,o||(o=setTimeout(()=>{o=null,a(i)},r-m)))},()=>i&&a(i)]}const Ln=(e,t,n=3)=>{let r=0;const i=bc(50,250);return Ec(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,s=o.lengthComputable?o.total:void 0,f=Math.max(0,s!=null?Math.min(a,s):a),p=Math.max(0,f-r),h=i(p);r=Math.max(r,f);const m={loaded:f,total:s,progress:s?f/s:void 0,bytes:p,rate:h||void 0,estimated:h&&s?(s-f)/h:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},co=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},uo=(e,t=g.asap)=>(...n)=>t(()=>e(...n)),_c=Le.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Le.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Le.origin),Le.navigator&&/(msie|trident)/i.test(Le.navigator.userAgent)):()=>!0,xc=Le.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];g.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),g.isString(r)&&s.push(`path=${r}`),g.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),g.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Sc(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ac(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Cc=/^https?:(?!\/\/)/i,kc=/[\t\n\r]/g;function Rc(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Tc(e){return Rc(e).replace(kc,"")}function Pc(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Bn}`)}function Nc(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Bn}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Bn}`);return n===-1?i:`${i}#${Pc(t.slice(n+1))}`}function fo(e,t){if(typeof e=="string"){const n=Tc(e);if(Cc.test(n))throw new Z(`Invalid URL ${JSON.stringify(Nc(n))}: missing "//" after protocol`,Z.ERR_INVALID_URL,t)}}function po(e,t,n,r){fo(t,r);let i=!Sc(t);return e&&(i||n===!1)?(fo(e,r),Ac(e,t)):t}const ho=e=>e instanceof $e?{...e}:e,Oc=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Ft(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,m,_,B){return g.isPlainObject(h)&&g.isPlainObject(m)?g.merge.call({caseless:B},h,m):g.isPlainObject(m)?g.merge({},m):g.isArray(m)?m.slice():m}function i(h,m,_,B){if(g.isUndefined(m)){if(!g.isUndefined(h))return r(void 0,h,_,B)}else return r(h,m,_,B)}function o(h,m){if(!g.isUndefined(m))return r(void 0,m)}function a(h,m){if(g.isUndefined(m)){if(!g.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function s(h){const m=g.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!g.isUndefined(m))if(g.isPlainObject(m)){if(g.hasOwnProp(m,h))return m[h]}else return;const _=g.hasOwnProp(e,"transitional")?e.transitional:void 0;if(g.isPlainObject(_)&&g.hasOwnProp(_,h))return _[h]}function f(h,m,_){if(g.hasOwnProp(t,_))return r(h,m);if(g.hasOwnProp(e,_))return r(void 0,h)}const p={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:f,headers:(h,m,_)=>i(ho(h),ho(m),_,!0)};return g.forEach(Oc({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const _=g.hasOwnProp(p,m)?p[m]:i,B=g.hasOwnProp(e,m)?e[m]:void 0,H=g.hasOwnProp(t,m)?t[m]:void 0,F=_(B,H,m);g.isUndefined(F)&&_!==f||(n[m]=F)}),g.hasOwnProp(t,"validateStatus")&&g.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(g.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Dc=["content-type","content-length"];function Mc(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{Dc.includes(r.toLowerCase())&&e.set(r,i)})}const Bc=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function mo(e){const t=Ft({},e),n=_=>g.hasOwnProp(t,_)?t[_]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const f=n("auth"),p=n("baseURL"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=s=$e.from(s),t.url=no(po(p,m,h,t),n("params"),n("paramsSerializer")),f){const _=g.getSafeProp(f,"username")||"",B=g.getSafeProp(f,"password")||"";try{s.set("Authorization","Basic "+btoa(_+":"+(B?Bc(B):"")))}catch(H){throw Z.from(H,Z.ERR_BAD_OPTION_VALUE,e)}}if(g.isFormData(r)&&(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv||g.isReactNative(r)?s.setContentType(void 0):g.isFunction(r.getHeaders)&&Mc(s,r.getHeaders(),n("formDataHeaderPolicy"))),Le.hasStandardBrowserEnv&&(g.isFunction(i)&&(i=i(t)),i===!0||i==null&&_c(t.url))){const B=o&&a&&xc.read(a);B&&s.set(o,B)}return t}const Ic=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=mo(e);let o=i.data;const a=$e.from(i.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:p}=i,h,m,_,B,H;function F(){B&&B(),H&&H(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let R=new XMLHttpRequest;R.open(i.method.toUpperCase(),i.url,!0),R.timeout=i.timeout;function S(){if(!R)return;const w=$e.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),D={data:!s||s==="text"||s==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:w,config:e,request:R};lo(function(N){n(N),F()},function(N){r(N),F()},D),R=null}"onloadend"in R?R.onloadend=S:R.onreadystatechange=function(){!R||R.readyState!==4||R.status===0&&!(R.responseURL&&R.responseURL.startsWith("file:"))||setTimeout(S)},R.onabort=function(){R&&(r(new Z("Request aborted",Z.ECONNABORTED,e,R)),F(),R=null)},R.onerror=function(E){const D=E&&E.message?E.message:"Network Error",L=new Z(D,Z.ERR_NETWORK,e,R);L.event=E||null,r(L),F(),R=null},R.ontimeout=function(){let E=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const D=i.transitional||Sr;i.timeoutErrorMessage&&(E=i.timeoutErrorMessage),r(new Z(E,D.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,R)),F(),R=null},o===void 0&&a.setContentType(null),"setRequestHeader"in R&&g.forEach(Gi(a),function(E,D){R.setRequestHeader(D,E)}),g.isUndefined(i.withCredentials)||(R.withCredentials=!!i.withCredentials),s&&s!=="json"&&(R.responseType=i.responseType),p&&([_,H]=Ln(p,!0),R.addEventListener("progress",_)),f&&R.upload&&([m,B]=Ln(f),R.upload.addEventListener("progress",m),R.upload.addEventListener("loadend",B)),(i.cancelToken||i.signal)&&(h=w=>{R&&(r(!w||w.type?new gn(null,e,R):w),R.abort(),F(),R=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const M=wc(i.url);if(M&&!Le.protocols.includes(M)){r(new Z("Unsupported protocol "+M+":",Z.ERR_BAD_REQUEST,e)),F();return}R.send(o||null)})},Lc=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(f){if(!r){r=!0,a();const p=f instanceof Error?f:this.reason;n.abort(p instanceof Z?p:new gn(p instanceof Error?p.message:p))}};let o=t&&setTimeout(()=>{o=null,i(new Z(`timeout of ${t}ms exceeded`,Z.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>{if(!r){if(f.aborted){i.call(f);return}f.addEventListener("abort",i,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>g.asap(a),s},Fc=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Vc=async function*(e,t){for await(const n of $c(e))yield*Fc(n,t)},$c=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},yo=(e,t,n,r)=>{const i=Vc(e,t);let o=0,a,s=f=>{a||(a=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:p,value:h}=await i.next();if(p){s(),f.close();return}let m=h.byteLength;if(n){let _=o+=m;n(_)}f.enqueue(new Uint8Array(h))}catch(p){throw s(p),p}},cancel(f){return s(f),i.return()}},{highWaterMark:2})},go=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,vo=(e,t,n)=>t+2<n&&go(e.charCodeAt(t+1))&&go(e.charCodeAt(t+2)),wo=e=>e<=57?e-48:(e&223)-55,jc=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Uc=e=>e===9||e===10||e===12||e===13||e===32,zc=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Hc=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Wc=e=>{const t=e.length;let n=0,r=0,i=!1;for(let o=0;o<t;o++){let a=e.charCodeAt(o);if(a===37&&vo(e,o,t)&&(a=wo(e.charCodeAt(o+1))*16+wo(e.charCodeAt(o+2)),o+=2),!Uc(a)){if(a===61){r++;continue}if(!jc(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?Hc(e):zc(n)},qc=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let s=0,f=i.length;s<f;s++){const p=i.charCodeAt(s);if(p===37&&vo(i,s,f))a+=1,s+=2;else if(p<128)a+=1;else if(p<2048)a+=2;else if(p>=55296&&p<=56319&&s+1<f){const h=i.charCodeAt(s+1);h>=56320&&h<=57343?(a+=4,s++):a+=3}else a+=3}return a};function Yc(e){const t=typeof e=="string"?e.indexOf("#"):-1;return qc(t===-1?e:e.slice(0,t),Wc)}const Rr="1.19.0",bo=64*1024,{isFunction:Fn}=g,Kc=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Eo=e=>{if(!g.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},_o=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gc=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Xc=e=>{const t=g.global!==void 0&&g.global!==null?g.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=g.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:a}=e,s=i?Fn(i):typeof fetch=="function",f=Fn(o),p=Fn(a);if(!s)return!1;const h=s&&Fn(n),m=s&&(typeof r=="function"?(S=>M=>S.encode(M))(new r):async S=>new Uint8Array(await new o(S).arrayBuffer())),_=f&&h&&_o(()=>{let S=!1;const M=new o(Le.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),w=M.headers.has("Content-Type");return M.body!=null&&M.body.cancel(),S&&!w}),B=p&&h&&_o(()=>g.isReadableStream(new a("").body)),H={stream:B&&(S=>S.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!H[S]&&(H[S]=(M,w)=>{let E=M&&M[S];if(E)return E.call(M);throw new Z(`Response type '${S}' is not supported`,Z.ERR_NOT_SUPPORT,w)})});const F=async S=>{if(S==null)return 0;if(g.isBlob(S))return S.size;if(g.isSpecCompliantForm(S))return(await new o(Le.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(g.isArrayBufferView(S)||g.isArrayBuffer(S))return S.byteLength;if(g.isURLSearchParams(S)&&(S=S+""),g.isString(S))return(await m(S)).byteLength},R=async(S,M)=>{const w=g.toFiniteNumber(S.getContentLength());return w??F(M)};return async S=>{let{url:M,method:w,data:E,signal:D,cancelToken:L,timeout:N,onDownloadProgress:x,onUploadProgress:$,responseType:P,headers:b,withCredentials:W="same-origin",fetchOptions:ue,maxContentLength:G,maxBodyLength:Y}=mo(S);const T=g.isNumber(G)&&G>-1,j=g.isNumber(Y)&&Y>-1,O=ae=>g.hasOwnProp(S,ae)?S[ae]:void 0;let q=i||fetch;P=P?(P+"").toLowerCase():"text";let U=Lc([D,L&&L.toAbortSignal()],N),K=null;const k=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let A,I=null;const ie=()=>new Z("Request body larger than maxBodyLength limit",Z.ERR_BAD_REQUEST,S,K);try{let ae;const d=O("auth");if(d){const Q=g.getSafeProp(d,"username")||"",pe=g.getSafeProp(d,"password")||"";ae={username:Q,password:pe}}if(Gc(M)){const Q=new URL(M,Le.origin);if(!ae&&(Q.username||Q.password)){const pe=Eo(Q.username),be=Eo(Q.password);ae={username:pe,password:be}}(Q.username||Q.password)&&(Q.username="",Q.password="",M=Q.href)}if(ae&&(b.delete("authorization"),b.set("Authorization","Basic "+btoa(Kc((ae.username||"")+":"+(ae.password||""))))),T&&typeof M=="string"&&M.startsWith("data:")&&Yc(M)>G)throw new Z("maxContentLength size of "+G+" exceeded",Z.ERR_BAD_RESPONSE,S,K);if(j&&w!=="get"&&w!=="head"){const Q=await F(E);if(typeof Q=="number"&&isFinite(Q)&&(A=Q,Q>Y))throw ie()}const u=j&&(g.isReadableStream(E)||g.isStream(E)),c=(Q,pe,be)=>yo(Q,bo,Ce=>{if(j&&Ce>Y)throw I=ie();pe&&pe(Ce)},be);if(_&&w!=="get"&&w!=="head"&&($||u)){if(A=A??await R(b,E),A!==0||u){let Q=new o(M,{method:"POST",body:E,duplex:"half"}),pe;if(g.isFormData(E)&&(pe=Q.headers.get("content-type"))&&b.setContentType(pe),Q.body){const[be,Ce]=$&&co(A,Ln(uo($)))||[];E=c(Q.body,be,Ce)}}}else if(u&&!f&&h&&w!=="get"&&w!=="head")E=c(E);else if(u&&f&&!_&&w!=="get"&&w!=="head")throw new Z("Stream request bodies are not supported by the current fetch implementation",Z.ERR_NOT_SUPPORT,S,K);g.isString(W)||(W=W?"include":"omit");const y=f&&"credentials"in o.prototype;if(g.isFormData(E)){const Q=b.getContentType();Q&&/^multipart\/form-data/i.test(Q)&&!/boundary=/i.test(Q)&&b.delete("content-type")}b.set("User-Agent","axios/"+Rr,!1);const v={...ue,signal:U,method:w.toUpperCase(),headers:Gi(b.normalize()),body:E,duplex:"half",credentials:y?W:void 0};K=f&&new o(M,v);let C=await(f?q(K,ue):q(M,v));const X=$e.from(C.headers);if(T){const Q=g.toFiniteNumber(X.getContentLength());if(Q!=null&&Q>G)throw new Z("maxContentLength size of "+G+" exceeded",Z.ERR_BAD_RESPONSE,S,K)}const se=B&&(P==="stream"||P==="response");if(B&&C.body&&(x||T||se&&k)){const Q={};["status","statusText","headers"].forEach(Ee=>{Q[Ee]=C[Ee]});const pe=g.toFiniteNumber(X.getContentLength()),[be,Ce]=x&&co(pe,Ln(uo(x),!0))||[];let Pe=0;const we=Ee=>{if(T&&(Pe=Ee,Pe>G))throw new Z("maxContentLength size of "+G+" exceeded",Z.ERR_BAD_RESPONSE,S,K);be&&be(Ee)};C=new a(yo(C.body,bo,we,()=>{Ce&&Ce(),k&&k()}),Q)}P=P||"text";let fe=await H[g.findKey(H,P)||"text"](C,S);if(T&&!B&&!se){let Q;if(fe!=null&&(typeof fe.byteLength=="number"?Q=fe.byteLength:typeof fe.size=="number"?Q=fe.size:typeof fe=="string"&&(Q=typeof r=="function"?new r().encode(fe).byteLength:fe.length)),typeof Q=="number"&&Q>G)throw new Z("maxContentLength size of "+G+" exceeded",Z.ERR_BAD_RESPONSE,S,K)}return!se&&k&&k(),await new Promise((Q,pe)=>{lo(Q,pe,{data:fe,headers:$e.from(C.headers),status:C.status,statusText:C.statusText,config:S,request:K})})}catch(ae){if(k&&k(),U&&U.aborted&&U.reason instanceof Z){const d=U.reason;throw d.config=S,K&&(d.request=K),ae!==d&&Object.defineProperty(d,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),d}if(I)throw K&&!I.request&&(I.request=K),I;if(ae instanceof Z)throw K&&!ae.request&&(ae.request=K),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const d=new Z("Network Error",Z.ERR_NETWORK,S,K,ae&&ae.response);throw Object.defineProperty(d,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),d}throw Z.from(ae,ae&&ae.code,S,K,ae&&ae.response)}}},Jc=new Map,xo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a=o.length,s=a,f,p,h=Jc;for(;s--;)f=o[s],p=h.get(f),p===void 0&&h.set(f,p=s?new Map:Xc(t)),h=p;return p};xo();const Tr={http:sc,xhr:Ic,fetch:{get:xo}};g.forEach(Tr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const So=e=>`- ${e}`,Zc=e=>g.isFunction(e)||e===null||e===!1;function Qc(e,t){e=g.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let a=0;a<n;a++){r=e[a];let s;if(i=r,!Zc(r)&&(i=Tr[(s=String(r)).toLowerCase()],i===void 0))throw new Z(`Unknown adapter '${s}'`);if(i&&(g.isFunction(i)||(i=i.get(t))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
|
|
4
|
-
`+a.map(
|
|
5
|
-
`):" "+
|
|
1
|
+
(function(ue,ge){typeof exports=="object"&&typeof module<"u"?ge(exports,require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue"],ge):(ue=typeof globalThis<"u"?globalThis:ue||self,ge(ue.FlowstreamUIPlus={},ue.ElementPlus,ue.Vue))})(this,(function(ue,ge,l){"use strict";/*! Element Plus Icons Vue v2.3.2 */var Zs=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Qs=Zs,el=l.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),tl=el,nl=l.defineComponent({name:"Back",__name:"back",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),l.createElementVNode("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),Yi=nl,rl=l.defineComponent({name:"Check",__name:"check",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Ki=rl,il=l.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),l.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),ol=il,al=l.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),sl=al,ll=l.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),cl=ll,ul=l.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),fl=ul,dl=l.defineComponent({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Nn=dl,pl=l.defineComponent({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Dn=pl,hl=l.defineComponent({name:"Switch",__name:"switch",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344M64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),Gi=hl,ml=l.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),yl=ml,gl=l.defineComponent({name:"VideoPlay",__name:"video-play",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Xi=gl;const vl={key:1,"aria-hidden":"true"},wl=["href"],bl=l.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:Yi,delete:sl,save:cl,enable:Xi,start:Xi,hang:yl,restore:Dn,revocation:Nn,taskWithdraw:Nn,taskRecyle:Dn,terminate:ol,jump:Gi,taskJump:Gi,taskComplete:Ki,taskSend:fl,taskRollback:Yi,taskClaim:Ki,turnBefore:Nn,taskTurnBefore:Nn,turnAfter:Dn,taskTurnAfter:Dn},r=l.computed(()=>n[t.iconClass]);return(i,o)=>(l.openBlock(),l.createElementBlock("span",l.mergeProps({class:"workflow-svg-icon"},i.$attrs),[r.value?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.value),{key:0})):(l.openBlock(),l.createElementBlock("svg",vl,[l.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,wl)]))],16))}}),wt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},El=wt(bl,[["__scopeId","data-v-7aad397e"]]),_l={class:"ui-flow-btn"},Ji=wt(l.defineComponent({name:"UiFlowButton",__name:"FlowButton",props:{type:{},label:{}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,i=[{label:"保存",value:"save",icon:"save"},{label:"启动",value:"start",icon:"enable"},{label:"撤回",value:"revocation",icon:"taskWithdraw"},{label:"撤回",value:"taskWithdraw",icon:"taskWithdraw"},{label:"收回",value:"taskRecyle",icon:"taskRecyle"},{label:"挂起",value:"hang",icon:"hang"},{label:"恢复",value:"restore",icon:"restore"},{label:"恢复",value:"processActivate",icon:"restore"},{label:"终止",value:"terminate",icon:"terminate"},{label:"终止",value:"processTerminate",icon:"terminate"},{label:"挂起",value:"processSuspend",icon:"hang"},{label:"挂起",value:"processSupspend",icon:"hang"},{label:"跳转",value:"jump",icon:"jump"},{label:"跳转",value:"taskJump",icon:"jump"},{label:"办毕",value:"taskComplete",icon:"taskComplete"},{label:"发送",value:"taskSend",icon:"taskSend"},{label:"退回",value:"taskRollback",icon:"taskRollback"},{label:"拾取",value:"taskClaim",icon:"taskClaim"},{label:"前加签",value:"turnBefore",icon:"turnBefore"},{label:"前加签",value:"taskTurnBefore",icon:"turnBefore"},{label:"后加签",value:"turnAfter",icon:"turnAfter"},{label:"后加签",value:"taskTurnAfter",icon:"turnAfter"}],o=l.computed(()=>i.find(s=>s.value===n.type));function a(){var s;r("click",(s=o.value)==null?void 0:s.value)}return(s,f)=>{const d=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("span",_l,[o.value?(l.openBlock(),l.createBlock(d,{key:0,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.createVNode(El,{"icon-class":o.value.icon},null,8,["icon-class"]),l.createTextVNode(" "+l.toDisplayString(e.label||o.value.label),1)]),_:1})):(l.openBlock(),l.createBlock(d,{key:1,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"default",{},void 0,!0)]),_:3}))])}}}),[["__scopeId","data-v-bb21bafe"]]);function Zi(e,t){return function(){return e.apply(t,arguments)}}const{toString:xl}=Object.prototype,{getPrototypeOf:Kt}=Object,{iterator:cn,toStringTag:Qi}=Symbol,Pn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),un=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Pn(n,t))return!0;n=Kt(n)}return!1},Sl=(e,t)=>e!=null&&un(e,t)?e[t]:void 0,Er=(e=>t=>{const n=xl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=e=>(e=e.toLowerCase(),t=>Er(t)===e),In=e=>t=>typeof t===e,{isArray:Pt}=Array,It=In("undefined");function Gt(e){return e!==null&&!It(e)&&e.constructor!==null&&!It(e.constructor)&&Ve(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const eo=Ke("ArrayBuffer");function Al(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&eo(e.buffer),t}const kl=In("string"),Ve=In("function"),to=In("number"),Xt=e=>e!==null&&typeof e=="object",Cl=e=>e===!0||e===!1,On=e=>{if(!Xt(e))return!1;const t=Kt(e);return(t===null||t===Object.prototype||Kt(t)===null)&&!un(e,Qi)&&!un(e,cn)},Rl=e=>{if(!Xt(e)||Gt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Tl=Ke("Date"),Nl=Ke("File"),Dl=e=>!!(e&&typeof e.uri<"u"),Pl=e=>e&&typeof e.getParts<"u",Il=Ke("Blob"),Ol=Ke("FileList"),Bl=Ke("Set"),Ml=e=>Xt(e)&&Ve(e.pipe);function Ll(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const no=Ll(),ro=typeof no.FormData<"u"?no.FormData:void 0,Fl=e=>{if(!e)return!1;if(ro&&e instanceof ro)return!0;const t=Kt(e);if(!t||t===Object.prototype||!Ve(e.append))return!1;const n=Er(e);return n==="formdata"||n==="object"&&Ve(e.toString)&&e.toString()==="[object FormData]"},$l=Ke("URLSearchParams"),[Vl,jl,Ul,zl]=["ReadableStream","Request","Response","Headers"].map(Ke),Hl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Pt(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Gt(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function io(e,t){if(Gt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Ot=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oo=e=>!It(e)&&e!==Ot;function _r(...e){const{caseless:t,skipUndefined:n}=oo(this)&&this||{},r={},i=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&typeof a=="string"&&io(r,a)||a,f=Pn(r,s)?r[s]:void 0;On(f)&&On(o)?r[s]=_r(f,o):On(o)?r[s]=_r({},o):Pt(o)?r[s]=o.slice():(!n||!It(o))&&(r[s]=o)};for(let o=0,a=e.length;o<a;o++){const s=e[o];if(!s||Gt(s)||(fn(s,i),typeof s!="object"||Pt(s)))continue;const f=Object.getOwnPropertySymbols(s);for(let d=0;d<f.length;d++){const h=f[d];nc.call(s,h)&&i(s[h],h)}}return r}const Wl=(e,t,n,{allOwnKeys:r}={})=>(fn(t,(i,o)=>{n&&Ve(i)?Object.defineProperty(e,o,{__proto__:null,value:Zi(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ql=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Kl=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Kt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Xl=e=>{if(!e)return null;if(Pt(e))return e;let t=e.length;if(!to(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kt(Uint8Array)),Zl=(e,t)=>{const r=(e&&e[cn]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Ql=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ec=Ke("HTMLFormElement"),tc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:nc}=Object.prototype,rc=Ke("RegExp"),ao=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fn(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},ic=e=>{ao(e,(t,n)=>{if(Ve(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ve(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},oc=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Pt(e)?r(e):r(String(e).split(t)),n},ac=()=>{},sc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function lc(e){return!!(e&&Ve(e.append)&&e[Qi]==="FormData"&&e[cn])}const cc=e=>{const t=new WeakSet,n=r=>{if(Xt(r)){if(t.has(r))return;if(Gt(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(Bl(r)){i=[];for(const o of r){const a=n(o);!It(a)&&i.push(a)}}else i=Pt(r)?[]:{},fn(r,(o,a)=>{const s=n(o);!It(s)&&(i[a]=s)});return t.delete(r),i}}return r};return n(e)},uc=Ke("AsyncFunction"),fc=e=>e&&(Xt(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch),so=((e,t)=>e?setImmediate:t?((n,r)=>(Ot.addEventListener("message",({source:i,data:o})=>{i===Ot&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ot.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ve(Ot.postMessage)),dc=typeof queueMicrotask<"u"?queueMicrotask.bind(Ot):typeof process<"u"&&process.nextTick||so,lo=e=>e!=null&&Ve(e[cn]),w={isArray:Pt,isArrayBuffer:eo,isBuffer:Gt,isFormData:Fl,isArrayBufferView:Al,isString:kl,isNumber:to,isBoolean:Cl,isObject:Xt,isPlainObject:On,isEmptyObject:Rl,isReadableStream:Vl,isRequest:jl,isResponse:Ul,isHeaders:zl,isUndefined:It,isDate:Tl,isFile:Nl,isReactNativeBlob:Dl,isReactNative:Pl,isBlob:Il,isRegExp:rc,isFunction:Ve,isStream:Ml,isURLSearchParams:$l,isTypedArray:Jl,isFileList:Ol,forEach:fn,merge:_r,extend:Wl,trim:Hl,stripBOM:ql,inherits:Yl,toFlatObject:Kl,kindOf:Er,kindOfTest:Ke,endsWith:Gl,toArray:Xl,forEachEntry:Zl,matchAll:Ql,isHTMLForm:ec,hasOwnProperty:Pn,hasOwnProp:Pn,hasOwnInPrototypeChain:un,getSafeProp:Sl,reduceDescriptors:ao,freezeMethods:ic,toObjectSet:oc,toCamelCase:tc,noop:ac,toFiniteNumber:sc,findKey:io,global:Ot,isContextDefined:oo,isSpecCompliantForm:lc,toJSONObject:cc,isAsyncFn:uc,isThenable:fc,setImmediate:so,asap:dc,isIterable:lo,isSafeIterable:e=>e!=null&&un(e,cn)&&lo(e)},pc=w.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hc=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
2
|
+
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim();const s=w.hasOwnProp(t,n);!n||s&&w.hasOwnProp(pc,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function mc(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const yc=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gc=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function xr(e,t){return w.isArray(e)?e.map(n=>xr(n,t)):mc(String(e).replace(t,""))}const vc=e=>xr(e,yc),wc=e=>xr(e,gc);function co(e){const t=Object.create(null);return w.forEach(e.toJSON(),(n,r)=>{t[r]=wc(n)}),t}const uo=Symbol("internals");function dn(e){return e&&String(e).trim().toLowerCase()}function Bn(e){return e===!1||e==null?e:w.isArray(e)?e.map(Bn):vc(String(e))}function bc(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ec=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Sr(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function _c(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function xc(e){const t=Object.create(null),n=String(e);let r=0,i=!1,o=!1;function a(s){const f=Sr(n.slice(r,s)),d=f.indexOf("=");if(d<1)return;const h=Sr(f.slice(0,d));if(!Ec.test(h))return;const m=h.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const R=Sr(f.slice(d+1));t[m]=_c(R)}for(let s=0;s<n.length;s++){const f=n.charCodeAt(s);i?o?o=!1:f===92?o=!0:f===34&&(i=!1):f===34?i=!0:(f===44||f===59)&&(a(s),r=s+1)}return a(n.length),t}const Sc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ar(e,t,n,r,i){if(w.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function Ac(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function kc(e,t){const n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}let Be=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,f,d){const h=dn(f);if(!h)return;const m=w.findKey(i,h);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||f]=Bn(s))}const a=(s,f)=>w.forEach(s,(d,h)=>o(d,h,f));if(w.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(w.isString(t)&&(t=t.trim())&&!Sc(t))a(hc(t),n);else if(w.isObject(t)&&w.isSafeIterable(t)){let s=Object.create(null),f,d;for(const h of t){if(!w.isArray(h))throw new TypeError("Object iterator must return a key-value pair");d=h[0],w.hasOwnProp(s,d)?(f=s[d],s[d]=w.isArray(f)?[...f,h[1]]:[f,h[1]]):s[d]=h[1]}a(s,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=dn(t),t){const r=w.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return bc(i);if(w.isFunction(n))return n.call(this,i,r);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=dn(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ar(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=dn(a),a){const s=w.findKey(r,a);s&&(!n||Ar(r,r[s],s,n))&&(delete r[s],i=!0)}}return w.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ar(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return w.forEach(this,(i,o)=>{const a=w.findKey(r,o);if(a){n[a]=Bn(i),delete n[o];return}const s=t?Ac(o):String(o).trim();s!==o&&delete n[o],n[s]=Bn(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&w.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
+
`)}getSetCookie(){const t=this.get("set-cookie");return w.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return xc(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[uo]=this[uo]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=dn(a);r[s]||(kc(i,a),r[s]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}};Be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(Be.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),w.freezeMethods(Be);const Mn="[REDACTED ****]";function Cc(e){if(w.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(w.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Rc(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||w.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof Be&&(o=o.toJSON()),r.push(o);let a;if(w.isArray(o))a=[],o.forEach((s,f)=>{const d=i(s);w.isUndefined(d)||(a[f]=d)});else{if(!w.isPlainObject(o)&&Cc(o))return r.pop(),o;a=Object.create(null);for(const[s,f]of Object.entries(o)){const d=n.has(s.toLowerCase())?Mn:i(f);w.isUndefined(d)||(a[s]=d)}}return r.pop(),a};return i(e)}function fo(e){try{return String(e)}catch{return""}}function Tc(e){return e.errors.map(n=>{try{return n&&n.message?fo(n.message):fo(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let ie=class Xs extends Error{static from(t,n,r,i,o,a){let s=t.message;!s&&w.isArray(t.errors)&&t.errors.length&&(s=Tc(t));const f=new Xs(s,n||t.code,r,i,o);return Object.defineProperty(f,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),f.name=t.name,t.status!=null&&f.status==null&&(f.status=t.status),a&&Object.assign(f,a),f}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&w.hasOwnProp(t,"redact")?t.redact:void 0,r=w.isArray(n)&&n.length>0?Rc(t,n):w.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};ie.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ie.ERR_BAD_OPTION="ERR_BAD_OPTION",ie.ECONNABORTED="ECONNABORTED",ie.ETIMEDOUT="ETIMEDOUT",ie.ECONNREFUSED="ECONNREFUSED",ie.ERR_NETWORK="ERR_NETWORK",ie.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ie.ERR_DEPRECATED="ERR_DEPRECATED",ie.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ie.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ie.ERR_CANCELED="ERR_CANCELED",ie.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ie.ERR_INVALID_URL="ERR_INVALID_URL",ie.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Nc=null,po=100;function kr(e){return w.isPlainObject(e)||w.isArray(e)}function ho(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function Cr(e,t,n){return e?e.concat(t).map(function(i,o){return i=ho(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Dc(e){return w.isArray(e)&&!e.some(kr)}const Pc=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function Ln(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(O,y){return!w.isUndefined(y[O])});const r=n.metaTokens,i=n.visitor||Y,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?po:n.maxDepth,d=s&&w.isSpecCompliantForm(t),h=[];if(!w.isFunction(i))throw new TypeError("visitor must be a function");function m(C){if(C===null)return"";if(w.isDate(C))return C.toISOString();if(w.isBoolean(C))return C.toString();if(!d&&w.isBlob(C))throw new ie("Blob is not supported. Use a Buffer instead.");if(w.isArrayBuffer(C)||w.isTypedArray(C)){if(d&&typeof s=="function")return new s([C]);throw new ie("Blob is not supported. Use a Buffer instead.",ie.ERR_NOT_SUPPORT)}return C}function R(C){if(C>f)throw new ie("Object is too deeply nested ("+C+" levels). Max depth: "+f,ie.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $(C,O){if(f===1/0)return JSON.stringify(C);const y=[];return JSON.stringify(C,function(S,T){if(!w.isObject(T))return T;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(T),R(O+y.length-1),T})}function Y(C,O,y){let v=C;if(w.isReactNative(t)&&w.isReactNativeBlob(C))return t.append(Cr(y,O,o),m(C)),!1;if(C&&!y&&typeof C=="object"){if(w.endsWith(O,"{}"))O=r?O:O.slice(0,-2),C=$(C,1);else if(w.isArray(C)&&Dc(C)||(w.isFileList(C)||w.endsWith(O,"[]"))&&(v=w.toArray(C)))return O=ho(O),v.forEach(function(T,E){!(w.isUndefined(T)||T===null)&&t.append(a===!0?Cr([O],E,o):a===null?O:O+"[]",m(T))}),!1}return kr(C)?!0:(t.append(Cr(y,O,o),m(C)),!1)}const W=Object.assign(Pc,{defaultVisitor:Y,convertValue:m,isVisitable:kr});function P(C,O,y=0){if(!w.isUndefined(C)){if(R(y),h.indexOf(C)!==-1)throw new Error("Circular reference detected in "+O.join("."));h.push(C),w.forEach(C,function(S,T){(!(w.isUndefined(S)||S===null)&&i.call(t,S,w.isString(T)?T.trim():T,O,W))===!0&&P(S,O?O.concat(T):[T],y+1)}),h.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return P(e),t}function mo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Rr(e,t){this._pairs=[],e&&Ln(e,this,t)}const yo=Rr.prototype;yo.append=function(t,n){this._pairs.push([t,n])},yo.toString=function(t){const n=t?r=>t.call(this,r,mo):mo;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ic(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function go(e,t,n){if(!t)return e;e=e||"";const r=w.isFunction(n)?{serialize:n}:n,i=w.getSafeProp(r,"encode")||Ic,o=w.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=w.isURLSearchParams(t)?t.toString():new Rr(t,r).toString(i),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class vo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){w.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Tr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Oc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Rr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Nr=typeof window<"u"&&typeof document<"u",Dr=typeof navigator=="object"&&navigator||void 0,Bc=Nr&&(!Dr||["ReactNative","NativeScript","NS"].indexOf(Dr.product)<0),Mc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lc=Nr&&window.location.href||"http://localhost",Pe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Nr,hasStandardBrowserEnv:Bc,hasStandardBrowserWebWorkerEnv:Mc,navigator:Dr,origin:Lc},Symbol.toStringTag,{value:"Module"})),...Oc};function Fc(e,t){return Ln(e,new Pe.classes.URLSearchParams,{visitor:function(n,r,i,o){return Pe.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const wo=po;function bo(e){if(e>wo)throw new ie("FormData field is too deeply nested ("+e+" levels). Max depth: "+wo,ie.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $c(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)bo(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Vc(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Eo(e){function t(n,r,i,o){bo(o);let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),f=o>=n.length;return a=!a&&w.isArray(i)?i.length:a,f?(w.hasOwnProp(i,a)?i[a]=w.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!w.hasOwnProp(i,a)||!w.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&w.isArray(i[a])&&(i[a]=Vc(i[a])),!s)}if(w.isFormData(e)&&w.isFunction(e.entries)){const n={};return w.forEachEntry(e,(r,i)=>{t($c(r),i,n,0)}),n}return null}const Jt=(e,t)=>e!=null&&w.hasOwnProp(e,t)?e[t]:void 0;function jc(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const pn={transitional:Tr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=w.isObject(t);if(o&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return i?JSON.stringify(Eo(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)||w.isReadableStream(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const f=Jt(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Fc(t,f).toString();if((s=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=Jt(this,"env"),h=d&&d.FormData;return Ln(s?{"files[]":t}:t,h&&new h,f)}}return o||i?(n.setContentType("application/json",!1),jc(t)):t}],transformResponse:[function(t){const n=Jt(this,"transitional")||pn.transitional,r=n&&n.forcedJSONParsing,i=Jt(this,"responseType"),o=i==="json";if(w.isResponse(t)||w.isReadableStream(t))return t;if(t&&w.isString(t)&&(r&&!i||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Jt(this,"parseReviver"))}catch(f){if(s)throw f.name==="SyntaxError"?ie.from(f,ie.ERR_BAD_RESPONSE,this,null,Jt(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pe.classes.FormData,Blob:Pe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch","query"],e=>{pn.headers[e]={}});function Pr(e,t){const n=this||pn,r=t||n,i=Be.from(r.headers);let o=r.data;return w.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function _o(e){return!!(e&&e.__CANCEL__)}let hn=class extends ie{constructor(t,n,r){super(t??"canceled",ie.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xo(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ie("Request failed with status code "+n.status,n.status>=400&&n.status<500?ie.ERR_BAD_REQUEST:ie.ERR_BAD_RESPONSE,n.config,n.request,n))}function Uc(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function zc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),h=r[o];a||(a=d),n[i]=f,r[i]=d;let m=o,R=0;for(;m!==i;)R+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-a<t)return;const $=h&&d-h;return $?Math.round(R*1e3/$):void 0}}function Hc(e,t){let n=0,r=1e3/t,i,o;const a=(d,h=Date.now())=>{n=h,i=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const h=Date.now(),m=h-n;m>=r?a(d,h):(i=d,o||(o=setTimeout(()=>{o=null,a(i)},r-m)))},()=>i&&a(i)]}const Fn=(e,t,n=3)=>{let r=0;const i=zc(50,250);return Hc(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,s=o.lengthComputable?o.total:void 0,f=Math.max(0,s!=null?Math.min(a,s):a),d=Math.max(0,f-r),h=i(d);r=Math.max(r,f);const m={loaded:f,total:s,progress:s?f/s:void 0,bytes:d,rate:h||void 0,estimated:h&&s?(s-f)/h:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},So=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ao=(e,t=w.asap)=>(...n)=>t(()=>e(...n)),Wc=Pe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Pe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Pe.origin),Pe.navigator&&/(msie|trident)/i.test(Pe.navigator.userAgent)):()=>!0,qc=Pe.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];w.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),w.isString(r)&&s.push(`path=${r}`),w.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),w.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Yc(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kc(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Gc=/^https?:(?!\/\/)/i,Xc=/[\t\n\r]/g;function Jc(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Zc(e){return Jc(e).replace(Xc,"")}function Qc(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Mn}`)}function eu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Mn}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Mn}`);return n===-1?i:`${i}#${Qc(t.slice(n+1))}`}function ko(e,t){if(typeof e=="string"){const n=Zc(e);if(Gc.test(n))throw new ie(`Invalid URL ${JSON.stringify(eu(n))}: missing "//" after protocol`,ie.ERR_INVALID_URL,t)}}function Co(e,t,n,r){ko(t,r);let i=!Yc(t);return e&&(i||n===!1)?(ko(e,r),Kc(e,t)):t}const Ro=e=>e instanceof Be?{...e}:e,tu=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Bt(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,m,R,$){return w.isPlainObject(h)&&w.isPlainObject(m)?w.merge.call({caseless:$},h,m):w.isPlainObject(m)?w.merge({},m):w.isArray(m)?m.slice():m}function i(h,m,R,$){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h,R,$)}else return r(h,m,R,$)}function o(h,m){if(!w.isUndefined(m))return r(void 0,m)}function a(h,m){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function s(h){const m=w.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!w.isUndefined(m))if(w.isPlainObject(m)){if(w.hasOwnProp(m,h))return m[h]}else return;const R=w.hasOwnProp(e,"transitional")?e.transitional:void 0;if(w.isPlainObject(R)&&w.hasOwnProp(R,h))return R[h]}function f(h,m,R){if(w.hasOwnProp(t,R))return r(h,m);if(w.hasOwnProp(e,R))return r(void 0,h)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:f,headers:(h,m,R)=>i(Ro(h),Ro(m),R,!0)};return w.forEach(tu({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const R=w.hasOwnProp(d,m)?d[m]:i,$=w.hasOwnProp(e,m)?e[m]:void 0,Y=w.hasOwnProp(t,m)?t[m]:void 0,W=R($,Y,m);w.isUndefined(W)&&R!==f||(n[m]=W)}),w.hasOwnProp(t,"validateStatus")&&w.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(w.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const nu=["content-type","content-length"];function ru(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{nu.includes(r.toLowerCase())&&e.set(r,i)})}const iu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function To(e){const t=Bt({},e),n=R=>w.hasOwnProp(t,R)?t[R]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const f=n("auth"),d=n("baseURL"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=s=Be.from(s),t.url=go(Co(d,m,h,t),n("params"),n("paramsSerializer")),f){const R=w.getSafeProp(f,"username")||"",$=w.getSafeProp(f,"password")||"";try{s.set("Authorization","Basic "+btoa(R+":"+($?iu($):"")))}catch(Y){throw ie.from(Y,ie.ERR_BAD_OPTION_VALUE,e)}}if(w.isFormData(r)&&(Pe.hasStandardBrowserEnv||Pe.hasStandardBrowserWebWorkerEnv||w.isReactNative(r)?s.setContentType(void 0):w.isFunction(r.getHeaders)&&ru(s,r.getHeaders(),n("formDataHeaderPolicy"))),Pe.hasStandardBrowserEnv&&(w.isFunction(i)&&(i=i(t)),i===!0||i==null&&Wc(t.url))){const $=o&&a&&qc.read(a);$&&s.set(o,$)}return t}const ou=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=To(e);let o=i.data;const a=Be.from(i.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:d}=i,h,m,R,$,Y;function W(){$&&$(),Y&&Y(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let P=new XMLHttpRequest;P.open(i.method.toUpperCase(),i.url,!0),P.timeout=i.timeout;function C(){if(!P)return;const y=Be.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:y,config:e,request:P};xo(function(E){n(E),W()},function(E){r(E),W()},S),P=null}"onloadend"in P?P.onloadend=C:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.startsWith("file:"))||setTimeout(C)},P.onabort=function(){P&&(r(new ie("Request aborted",ie.ECONNABORTED,e,P)),W(),P=null)},P.onerror=function(v){const S=v&&v.message?v.message:"Network Error",T=new ie(S,ie.ERR_NETWORK,e,P);T.event=v||null,r(T),W(),P=null},P.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||Tr;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new ie(v,S.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,e,P)),W(),P=null},o===void 0&&a.setContentType(null),"setRequestHeader"in P&&w.forEach(co(a),function(v,S){P.setRequestHeader(S,v)}),w.isUndefined(i.withCredentials)||(P.withCredentials=!!i.withCredentials),s&&s!=="json"&&(P.responseType=i.responseType),d&&([R,Y]=Fn(d,!0),P.addEventListener("progress",R)),f&&P.upload&&([m,$]=Fn(f),P.upload.addEventListener("progress",m),P.upload.addEventListener("loadend",$)),(i.cancelToken||i.signal)&&(h=y=>{P&&(r(!y||y.type?new hn(null,e,P):y),P.abort(),W(),P=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const O=Uc(i.url);if(O&&!Pe.protocols.includes(O)){r(new ie("Unsupported protocol "+O+":",ie.ERR_BAD_REQUEST,e)),W();return}P.send(o||null)})},au=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(f){if(!r){r=!0,a();const d=f instanceof Error?f:this.reason;n.abort(d instanceof ie?d:new hn(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new ie(`timeout of ${t}ms exceeded`,ie.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>{if(!r){if(f.aborted){i.call(f);return}f.addEventListener("abort",i,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>w.asap(a),s},su=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},lu=async function*(e,t){for await(const n of cu(e))yield*su(n,t)},cu=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},No=(e,t,n,r)=>{const i=lu(e,t);let o=0,a,s=f=>{a||(a=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:h}=await i.next();if(d){s(),f.close();return}let m=h.byteLength;if(n){let R=o+=m;n(R)}f.enqueue(new Uint8Array(h))}catch(d){throw s(d),d}},cancel(f){return s(f),i.return()}},{highWaterMark:2})},Do=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Po=(e,t,n)=>t+2<n&&Do(e.charCodeAt(t+1))&&Do(e.charCodeAt(t+2)),Io=e=>e<=57?e-48:(e&223)-55,uu=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,fu=e=>e===9||e===10||e===12||e===13||e===32,du=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},pu=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},hu=e=>{const t=e.length;let n=0,r=0,i=!1;for(let o=0;o<t;o++){let a=e.charCodeAt(o);if(a===37&&Po(e,o,t)&&(a=Io(e.charCodeAt(o+1))*16+Io(e.charCodeAt(o+2)),o+=2),!fu(a)){if(a===61){r++;continue}if(!uu(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?pu(e):du(n)},mu=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let s=0,f=i.length;s<f;s++){const d=i.charCodeAt(s);if(d===37&&Po(i,s,f))a+=1,s+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&s+1<f){const h=i.charCodeAt(s+1);h>=56320&&h<=57343?(a+=4,s++):a+=3}else a+=3}return a};function yu(e){const t=typeof e=="string"?e.indexOf("#"):-1;return mu(t===-1?e:e.slice(0,t),hu)}const Ir="1.19.0",Oo=64*1024,{isFunction:$n}=w,gu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Bo=e=>{if(!w.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Mo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vu=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},wu=e=>{const t=w.global!==void 0&&w.global!==null?w.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=w.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:a}=e,s=i?$n(i):typeof fetch=="function",f=$n(o),d=$n(a);if(!s)return!1;const h=s&&$n(n),m=s&&(typeof r=="function"?(C=>O=>C.encode(O))(new r):async C=>new Uint8Array(await new o(C).arrayBuffer())),R=f&&h&&Mo(()=>{let C=!1;const O=new o(Pe.origin,{body:new n,method:"POST",get duplex(){return C=!0,"half"}}),y=O.headers.has("Content-Type");return O.body!=null&&O.body.cancel(),C&&!y}),$=d&&h&&Mo(()=>w.isReadableStream(new a("").body)),Y={stream:$&&(C=>C.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!Y[C]&&(Y[C]=(O,y)=>{let v=O&&O[C];if(v)return v.call(O);throw new ie(`Response type '${C}' is not supported`,ie.ERR_NOT_SUPPORT,y)})});const W=async C=>{if(C==null)return 0;if(w.isBlob(C))return C.size;if(w.isSpecCompliantForm(C))return(await new o(Pe.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(w.isArrayBufferView(C)||w.isArrayBuffer(C))return C.byteLength;if(w.isURLSearchParams(C)&&(C=C+""),w.isString(C))return(await m(C)).byteLength},P=async(C,O)=>{const y=w.toFiniteNumber(C.getContentLength());return y??W(O)};return async C=>{let{url:O,method:y,data:v,signal:S,cancelToken:T,timeout:E,onDownloadProgress:x,onUploadProgress:z,responseType:M,headers:_,withCredentials:q="same-origin",fetchOptions:ae,maxContentLength:J,maxBodyLength:G}=To(C);const X=w.isNumber(J)&&J>-1,re=w.isNumber(G)&&G>-1,Q=se=>w.hasOwnProp(C,se)?C[se]:void 0;let B=i||fetch;M=M?(M+"").toLowerCase():"text";let I=au([S,T&&T.toAbortSignal()],E),F=null;const A=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let k,V=null;const de=()=>new ie("Request body larger than maxBodyLength limit",ie.ERR_BAD_REQUEST,C,F);try{let se;const p=Q("auth");if(p){const H=w.getSafeProp(p,"username")||"",te=w.getSafeProp(p,"password")||"";se={username:H,password:te}}if(vu(O)){const H=new URL(O,Pe.origin);if(!se&&(H.username||H.password)){const te=Bo(H.username),j=Bo(H.password);se={username:te,password:j}}(H.username||H.password)&&(H.username="",H.password="",O=H.href)}if(se&&(_.delete("authorization"),_.set("Authorization","Basic "+btoa(gu((se.username||"")+":"+(se.password||""))))),X&&typeof O=="string"&&O.startsWith("data:")&&yu(O)>J)throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,C,F);if(re&&y!=="get"&&y!=="head"){const H=await W(v);if(typeof H=="number"&&isFinite(H)&&(k=H,H>G))throw de()}const u=re&&(w.isReadableStream(v)||w.isStream(v)),c=(H,te,j)=>No(H,Oo,U=>{if(re&&U>G)throw V=de();te&&te(U)},j);if(R&&y!=="get"&&y!=="head"&&(z||u)){if(k=k??await P(_,v),k!==0||u){let H=new o(O,{method:"POST",body:v,duplex:"half"}),te;if(w.isFormData(v)&&(te=H.headers.get("content-type"))&&_.setContentType(te),H.body){const[j,U]=z&&So(k,Fn(Ao(z)))||[];v=c(H.body,j,U)}}}else if(u&&!f&&h&&y!=="get"&&y!=="head")v=c(v);else if(u&&f&&!R&&y!=="get"&&y!=="head")throw new ie("Stream request bodies are not supported by the current fetch implementation",ie.ERR_NOT_SUPPORT,C,F);w.isString(q)||(q=q?"include":"omit");const g=f&&"credentials"in o.prototype;if(w.isFormData(v)){const H=_.getContentType();H&&/^multipart\/form-data/i.test(H)&&!/boundary=/i.test(H)&&_.delete("content-type")}_.set("User-Agent","axios/"+Ir,!1);const b={...ae,signal:I,method:y.toUpperCase(),headers:co(_.normalize()),body:v,duplex:"half",credentials:g?q:void 0};F=f&&new o(O,b);let D=await(f?B(F,ae):B(O,b));const ee=Be.from(D.headers);if(X){const H=w.toFiniteNumber(ee.getContentLength());if(H!=null&&H>J)throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,C,F)}const N=$&&(M==="stream"||M==="response");if($&&D.body&&(x||X||N&&A)){const H={};["status","statusText","headers"].forEach(pe=>{H[pe]=D[pe]});const te=w.toFiniteNumber(ee.getContentLength()),[j,U]=x&&So(te,Fn(Ao(x),!0))||[];let Z=0;const L=pe=>{if(X&&(Z=pe,Z>J))throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,C,F);j&&j(pe)};D=new a(No(D.body,Oo,L,()=>{U&&U(),A&&A()}),H)}M=M||"text";let K=await Y[w.findKey(Y,M)||"text"](D,C);if(X&&!$&&!N){let H;if(K!=null&&(typeof K.byteLength=="number"?H=K.byteLength:typeof K.size=="number"?H=K.size:typeof K=="string"&&(H=typeof r=="function"?new r().encode(K).byteLength:K.length)),typeof H=="number"&&H>J)throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,C,F)}return!N&&A&&A(),await new Promise((H,te)=>{xo(H,te,{data:K,headers:Be.from(D.headers),status:D.status,statusText:D.statusText,config:C,request:F})})}catch(se){if(A&&A(),I&&I.aborted&&I.reason instanceof ie){const p=I.reason;throw p.config=C,F&&(p.request=F),se!==p&&Object.defineProperty(p,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),p}if(V)throw F&&!V.request&&(V.request=F),V;if(se instanceof ie)throw F&&!se.request&&(se.request=F),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const p=new ie("Network Error",ie.ERR_NETWORK,C,F,se&&se.response);throw Object.defineProperty(p,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),p}throw ie.from(se,se&&se.code,C,F,se&&se.response)}}},bu=new Map,Lo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a=o.length,s=a,f,d,h=bu;for(;s--;)f=o[s],d=h.get(f),d===void 0&&h.set(f,d=s?new Map:wu(t)),h=d;return d};Lo();const Or={http:Nc,xhr:ou,fetch:{get:Lo}};w.forEach(Or,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Fo=e=>`- ${e}`,Eu=e=>w.isFunction(e)||e===null||e===!1;function _u(e,t){e=w.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let a=0;a<n;a++){r=e[a];let s;if(i=r,!Eu(r)&&(i=Or[(s=String(r)).toLowerCase()],i===void 0))throw new ie(`Unknown adapter '${s}'`);if(i&&(w.isFunction(i)||(i=i.get(t))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
|
|
4
|
+
`+a.map(Fo).join(`
|
|
5
|
+
`):" "+Fo(a[0]):"as no adapter specified";throw new ie("There is no suitable adapter to dispatch the request "+s,ie.ERR_NOT_SUPPORT)}return i}const $o={getAdapter:_u,adapters:Or};function Br(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hn(null,e)}function Mr(e){return Br(e),e.headers=Be.from(e.headers),e.data=Pr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$o.getAdapter(e.adapter||pn.adapter,e)(e).then(function(r){Br(e),e.response=r;try{r.data=Pr.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Be.from(r.headers),r},function(r){if(!_o(r)&&(Br(e),r&&r.response)){e.response=r.response;try{r.response.data=Pr.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Be.from(r.response.headers)}return Promise.reject(r)})}const Vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Vo={};Vn.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Ir+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new ie(i(a," has been removed"+(n?" in "+n:"")),ie.ERR_DEPRECATED);return n&&!Vo[a]&&(Vo[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}},Vn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xu(e,t,n){if(typeof e!="object"||e===null)throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const s=e[o],f=s===void 0||a(s,o,e);if(f!==!0)throw new ie("option "+o+" must be "+f,ie.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ie("Unknown option "+o,ie.ERR_BAD_OPTION)}}const jn={assertOptions:xu,validators:Vn},Me=jn.validators;let Mt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vo,response:new vo}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const a=i.stack.indexOf(`
|
|
6
6
|
`);return a===-1?"":i.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
|
|
7
7
|
`),s=a===-1?-1:o.indexOf(`
|
|
8
8
|
`,a+1),f=s===-1?"":o.slice(s+1);String(r.stack).endsWith(f)||(r.stack+=`
|
|
9
|
-
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ft(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&$n.assertOptions(r,{silentJSONParsing:je.transitional(je.boolean),forcedJSONParsing:je.transitional(je.boolean),clarifyTimeoutError:je.transitional(je.boolean),legacyInterceptorReqResOrdering:je.transitional(je.boolean),advertiseZstdAcceptEncoding:je.transitional(je.boolean),validateStatusUndefinedResolves:je.transitional(je.boolean)},!1),i!=null&&(g.isFunction(i)?n.paramsSerializer={serialize:i}:$n.assertOptions(i,{encode:je.function,serialize:je.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),$n.assertOptions(n,{baseUrl:je.spelling("baseURL"),withXsrfToken:je.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&g.merge(o.common,o[n.method]);o&&g.forEach(["delete","get","head","post","put","patch","query","common"],H=>{delete o[H]}),n.headers=$e.concat(a,o);const s=[];let f=!0;this.interceptors.request.forEach(function(F){if(typeof F.runWhen=="function"&&F.runWhen(n)===!1)return;f=f&&F.synchronous;const R=n.transitional||Sr;R&&R.legacyInterceptorReqResOrdering?s.unshift(F.fulfilled,F.rejected):s.push(F.fulfilled,F.rejected)});const p=[];this.interceptors.response.forEach(function(F){p.push(F.fulfilled,F.rejected)});let h,m=0,_;if(!f){const H=[Nr.bind(this),void 0];for(H.unshift(...s),H.push(...p),_=H.length,h=Promise.resolve(n);m<_;)h=h.then(H[m++],H[m++]);return h}_=s.length;let B=n;for(;m<_;){const H=s[m++],F=s[m++];try{B=H?H(B):B}catch(R){if(!F){h=Promise.reject(R);break}try{const S=F.call(this,R);g.isThenable(S)&&(h=Promise.resolve(S).then(()=>Nr.call(this,B)))}catch(S){h=Promise.reject(S)}break}}if(!h)try{h=Nr.call(this,B)}catch(H){h=Promise.reject(H)}for(m=0,_=p.length;m<_;)h=h.then(p[m++],p[m++]);return h}getUri(t){t=Ft(this.defaults,t);const n=po(t.baseURL,t.url,t.allowAbsoluteUrls,t);return no(n,t.params,t.paramsSerializer)}};g.forEach(["delete","get","head","options"],function(t){Vt.prototype[t]=function(n,r){return this.request(Ft(r||{},{method:t,url:n,data:r&&g.hasOwnProp(r,"data")?r.data:void 0}))}}),g.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,s){return this.request(Ft(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Vt.prototype[t]=n(),t!=="query"&&(Vt.prototype[t+"Form"]=n(!0))});let tu=class ks{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new gn(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ks(function(i){t=i}),cancel:t}}};function nu(e){return function(n){return e.apply(null,n)}}function ru(e){return g.isObject(e)&&e.isAxiosError===!0}const Or={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Or).forEach(([e,t])=>{Or[t]=e});function ko(e){const t=new Vt(e),n=Fi(Vt.prototype.request,t);return g.extend(n,Vt.prototype,t,{allOwnKeys:!0}),g.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ko(Ft(e,i))},n}const Ne=ko(yn);Ne.Axios=Vt,Ne.CanceledError=gn,Ne.CancelToken=tu,Ne.isCancel=so,Ne.VERSION=Rr,Ne.toFormData=In,Ne.AxiosError=Z,Ne.Cancel=Ne.CanceledError,Ne.all=function(t){return Promise.all(t)},Ne.spread=nu,Ne.isAxiosError=ru,Ne.mergeConfig=Ft,Ne.AxiosHeaders=$e,Ne.formToJSON=e=>ao(g.isHTMLForm(e)?new FormData(e):e),Ne.getAdapter=Ao.getAdapter,Ne.HttpStatusCode=Or,Ne.default=Ne;const{Axios:Zm,AxiosError:Qm,CanceledError:ey,isCancel:ty,CancelToken:ny,VERSION:ry,all:iy,Cancel:oy,isAxiosError:ay,spread:sy,toFormData:ly,AxiosHeaders:cy,HttpStatusCode:uy,formToJSON:fy,getAdapter:py,mergeConfig:dy,create:hy}=Ne,mt={baseURL:"",timeout:6e4,getToken:void 0};function Ro(e={}){e.baseURL!==void 0&&(mt.baseURL=e.baseURL),e.timeout!==void 0&&(mt.timeout=e.timeout),e.getToken!==void 0&&(mt.getToken=e.getToken)}const iu="";function ou(e){return(e||"").replace(/\/$/,"")||iu}const jn=Ne.create({timeout:mt.timeout});jn.interceptors.request.use(e=>{var n;e.baseURL=ou(mt.baseURL||e.baseURL),e.timeout=mt.timeout;const t=(n=mt.getToken)==null?void 0:n.call(mt);return t&&(e.headers.Authorization=t),e}),jn.interceptors.response.use(e=>{const t=e.config,n=e.data;return t.responseType==="blob"?e:t.noCode?n:n&&![0,200].includes(n.code)?Promise.reject(new Error(n.msg||n.message||"服务错误")):n},e=>Promise.reject(e));function _e(e){return jn.request(e)}const To=e=>_e({url:"/flowstream/server/repository/flowdef/event/latest",method:"post",data:e}),Dr=(e,t)=>_e({url:`/flowstream/console/plugin/simulate/event/page/draft/${e.currentPage}/${e.pageSize}`,method:"post",data:t}),Po=e=>_e({url:"/flowstream/console/plugin/simulate",method:"post",data:e}),No=e=>_e({url:"/flowstream/server/runtime/event/start",method:"post",data:e}),Mr=e=>_e({url:"/flowstream/server/work/event/query",method:"post",data:e}),Br=e=>_e({url:"/flowstream/server/history/workinst/event/query",method:"post",data:e}),Ir=e=>_e({url:"/flowstream/server/operate/def/event/get",method:"post",data:e}),Lr=e=>_e({url:"/flowstream/server/task/event/withdraw",method:"post",data:e}),Fr=e=>_e({url:"/flowstream/server/task/event/rollback",method:"post",data:e}),Vr=e=>_e({url:"/flowstream/server/task/event/recyle",method:"post",data:e}),$r=e=>_e({url:"/flowstream/server/task/event/complete",method:"post",data:e}),jr=e=>_e({url:"/flowstream/server/runtime/event/suspend",method:"post",data:e}),Ur=e=>_e({url:"/flowstream/server/runtime/event/activate",method:"post",data:e}),zr=e=>_e({url:"/flowstream/server/runtime/event/terminate",method:"post",data:e}),Hr=e=>_e({url:`/flowstream/server/repository/flowdef/res/event/download/procdefId/${e.procdefId}/extname/bpmn`,method:"get",noCode:!0}),Wr=e=>_e({url:"/flowstream/server/task/event/send",method:"post",data:e}),Oo=e=>_e({url:"/flowstream/server/model/event/get/usertasks",method:"post",data:e}),Un=e=>_e({url:"/flowstream/server/repository/userassign/event/query",method:"post",data:e}),qr=e=>_e({url:"/flowstream/server/model/event/get/succeding",method:"post",data:e}),Yr=e=>_e({url:"/flowstream/server/task/event/jump",method:"post",data:e}),Kr=e=>_e({url:"/flowstream/server/model/event/get/usertasks",method:"post",data:e}),au=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:Ur,completeTask:$r,doneTaskList:Br,downloadBpmn:Hr,draftFlowList:To,draftTaskList:Dr,flowStartNodeList:Oo,getOptList:Ir,jumpTask:Yr,nextSendNode:qr,nodeAssistant:Un,recycleTask:Vr,revocationTask:Lr,rollbackTask:Fr,saveDraft:Po,sendTask:Wr,startDraft:No,startNodes:Kr,suspendFlow:jr,terminateFlow:zr,todoTaskList:Mr},Symbol.toStringTag,{value:"Module"})),su={class:"button-group-wrapper"},lu={key:0,class:"line"},cu=_t(l.defineComponent({name:"UiFlowButtons",__name:"FlowButtons",props:{processInstanceId:{},workId:{},beforeAction:{type:Function},afterAction:{type:Function}},emits:["executeAction","afterAction","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref([]);async function a(){const p=await Ir({workId:r.workId});return o.value=p.data||[],o.value}async function s(p,h){var B;await ht.ElMessageBox.confirm(`是否${h}此任务?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});const m={workId:r.workId};let _;switch(p){case"revocation":case"taskWithdraw":_=await Lr(m);break;case"taskRecyle":_=await Vr(m);break;case"hang":_=await jr({processInstanceIds:[r.processInstanceId||""]});break;case"restore":_=await Ur(m);break;case"terminate":_=await zr(m);break;case"taskComplete":_=await $r({...m,variables:{}});break;case"taskRollback":_=await Fr(m);break;default:i("executeAction",p);return}(B=r.afterAction)==null||B.call(r,p,_),i("afterAction",p,_)}async function f(p){var _;const h=p.name,m={action:h,workId:r.workId,processInstanceIds:r.processInstanceId?[r.processInstanceId]:[]};if(((_=r.beforeAction)==null?void 0:_.call(r,h,m))!==!1){if(["save","start","taskSend","jump","taskJump"].includes(h)){i("executeAction",h);return}try{await s(h,p.label)}catch(B){B!=="cancel"&&B!=="close"&&i("error",B)}}}return l.watch(()=>r.workId,a),l.onMounted(a),t({getAvailableActions:a,executeAction:f}),(p,h)=>(l.openBlock(),l.createElementBlock("div",su,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(m,_)=>(l.openBlock(),l.createElementBlock("div",{key:m.name||_,class:"flex-start-r"},[l.renderSlot(p.$slots,"prefix",{action:m},void 0,!0),l.renderSlot(p.$slots,"default",{action:m},void 0,!0),l.createVNode(Li,{type:m.name,label:m.label,onClick:B=>f(m)},null,8,["type","label","onClick"]),_!==o.value.length-1?(l.openBlock(),l.createElementBlock("div",lu)):l.createCommentVNode("",!0),l.renderSlot(p.$slots,"suffix",{action:m},void 0,!0)]))),128))]))}}),[["__scopeId","data-v-d2f30b35"]]);function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zn={exports:{}},fu=zn.exports,Do;function pu(){return Do||(Do=1,(function(e,t){(function(n,r){e.exports=r()})(fu,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",f="hour",p="day",h="week",m="month",_="quarter",B="year",H="date",F="Invalid Date",R=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var Y=["th","st","nd","rd"],T=G%100;return"["+G+(Y[(T-20)%10]||Y[T]||Y[0])+"]"}},w=function(G,Y,T){var j=String(G);return!j||j.length>=Y?G:""+Array(Y+1-j.length).join(T)+G},E={s:w,z:function(G){var Y=-G.utcOffset(),T=Math.abs(Y),j=Math.floor(T/60),O=T%60;return(Y<=0?"+":"-")+w(j,2,"0")+":"+w(O,2,"0")},m:function G(Y,T){if(Y.date()<T.date())return-G(T,Y);var j=12*(T.year()-Y.year())+(T.month()-Y.month()),O=Y.clone().add(j,m),q=T-O<0,U=Y.clone().add(j+(q?-1:1),m);return+(-(j+(T-O)/(q?O-U:U-O))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:m,y:B,w:h,d:p,D:H,h:f,m:s,s:a,ms:o,Q:_}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},D="en",L={};L[D]=M;var N="$isDayjsObject",x=function(G){return G instanceof W||!(!G||!G[N])},$=function G(Y,T,j){var O;if(!Y)return D;if(typeof Y=="string"){var q=Y.toLowerCase();L[q]&&(O=q),T&&(L[q]=T,O=q);var U=Y.split("-");if(!O&&U.length>1)return G(U[0])}else{var K=Y.name;L[K]=Y,O=K}return!j&&O&&(D=O),O||!j&&D},P=function(G,Y){if(x(G))return G.clone();var T=typeof Y=="object"?Y:{};return T.date=G,T.args=arguments,new W(T)},b=E;b.l=$,b.i=x,b.w=function(G,Y){return P(G,{locale:Y.$L,utc:Y.$u,x:Y.$x,$offset:Y.$offset})};var W=(function(){function G(T){this.$L=$(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[N]=!0}var Y=G.prototype;return Y.parse=function(T){this.$d=(function(j){var O=j.date,q=j.utc;if(O===null)return new Date(NaN);if(b.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var U=O.match(R);if(U){var K=U[2]-1||0,k=(U[7]||"0").substring(0,3);return q?new Date(Date.UTC(U[1],K,U[3]||1,U[4]||0,U[5]||0,U[6]||0,k)):new Date(U[1],K,U[3]||1,U[4]||0,U[5]||0,U[6]||0,k)}}return new Date(O)})(T),this.init()},Y.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},Y.$utils=function(){return b},Y.isValid=function(){return this.$d.toString()!==F},Y.isSame=function(T,j){var O=P(T);return this.startOf(j)<=O&&O<=this.endOf(j)},Y.isAfter=function(T,j){return P(T)<this.startOf(j)},Y.isBefore=function(T,j){return this.endOf(j)<P(T)},Y.$g=function(T,j,O){return b.u(T)?this[j]:this.set(O,T)},Y.unix=function(){return Math.floor(this.valueOf()/1e3)},Y.valueOf=function(){return this.$d.getTime()},Y.startOf=function(T,j){var O=this,q=!!b.u(j)||j,U=b.p(T),K=function(c,y){var v=b.w(O.$u?Date.UTC(O.$y,y,c):new Date(O.$y,y,c),O);return q?v:v.endOf(p)},k=function(c,y){return b.w(O.toDate()[c].apply(O.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(y)),O)},A=this.$W,I=this.$M,ie=this.$D,ae="set"+(this.$u?"UTC":"");switch(U){case B:return q?K(1,0):K(31,11);case m:return q?K(1,I):K(0,I+1);case h:var d=this.$locale().weekStart||0,u=(A<d?A+7:A)-d;return K(q?ie-u:ie+(6-u),I);case p:case H:return k(ae+"Hours",0);case f:return k(ae+"Minutes",1);case s:return k(ae+"Seconds",2);case a:return k(ae+"Milliseconds",3);default:return this.clone()}},Y.endOf=function(T){return this.startOf(T,!1)},Y.$set=function(T,j){var O,q=b.p(T),U="set"+(this.$u?"UTC":""),K=(O={},O[p]=U+"Date",O[H]=U+"Date",O[m]=U+"Month",O[B]=U+"FullYear",O[f]=U+"Hours",O[s]=U+"Minutes",O[a]=U+"Seconds",O[o]=U+"Milliseconds",O)[q],k=q===p?this.$D+(j-this.$W):j;if(q===m||q===B){var A=this.clone().set(H,1);A.$d[K](k),A.init(),this.$d=A.set(H,Math.min(this.$D,A.daysInMonth())).$d}else K&&this.$d[K](k);return this.init(),this},Y.set=function(T,j){return this.clone().$set(T,j)},Y.get=function(T){return this[b.p(T)]()},Y.add=function(T,j){var O,q=this;T=Number(T);var U=b.p(j),K=function(I){var ie=P(q);return b.w(ie.date(ie.date()+Math.round(I*T)),q)};if(U===m)return this.set(m,this.$M+T);if(U===B)return this.set(B,this.$y+T);if(U===p)return K(1);if(U===h)return K(7);var k=(O={},O[s]=r,O[f]=i,O[a]=n,O)[U]||1,A=this.$d.getTime()+T*k;return b.w(A,this)},Y.subtract=function(T,j){return this.add(-1*T,j)},Y.format=function(T){var j=this,O=this.$locale();if(!this.isValid())return O.invalidDate||F;var q=T||"YYYY-MM-DDTHH:mm:ssZ",U=b.z(this),K=this.$H,k=this.$m,A=this.$M,I=O.weekdays,ie=O.months,ae=O.meridiem,d=function(y,v,C,X){return y&&(y[v]||y(j,q))||C[v].slice(0,X)},u=function(y){return b.s(K%12||12,y,"0")},c=ae||function(y,v,C){var X=y<12?"AM":"PM";return C?X.toLowerCase():X};return q.replace(S,(function(y,v){return v||(function(C){switch(C){case"YY":return String(j.$y).slice(-2);case"YYYY":return b.s(j.$y,4,"0");case"M":return A+1;case"MM":return b.s(A+1,2,"0");case"MMM":return d(O.monthsShort,A,ie,3);case"MMMM":return d(ie,A);case"D":return j.$D;case"DD":return b.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return d(O.weekdaysMin,j.$W,I,2);case"ddd":return d(O.weekdaysShort,j.$W,I,3);case"dddd":return I[j.$W];case"H":return String(K);case"HH":return b.s(K,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return c(K,k,!0);case"A":return c(K,k,!1);case"m":return String(k);case"mm":return b.s(k,2,"0");case"s":return String(j.$s);case"ss":return b.s(j.$s,2,"0");case"SSS":return b.s(j.$ms,3,"0");case"Z":return U}return null})(y)||U.replace(":","")}))},Y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Y.diff=function(T,j,O){var q,U=this,K=b.p(j),k=P(T),A=(k.utcOffset()-this.utcOffset())*r,I=this-k,ie=function(){return b.m(U,k)};switch(K){case B:q=ie()/12;break;case m:q=ie();break;case _:q=ie()/3;break;case h:q=(I-A)/6048e5;break;case p:q=(I-A)/864e5;break;case f:q=I/i;break;case s:q=I/r;break;case a:q=I/n;break;default:q=I}return O?q:b.a(q)},Y.daysInMonth=function(){return this.endOf(m).$D},Y.$locale=function(){return L[this.$L]},Y.locale=function(T,j){if(!T)return this.$L;var O=this.clone(),q=$(T,j,!0);return q&&(O.$L=q),O},Y.clone=function(){return b.w(this.$d,this)},Y.toDate=function(){return new Date(this.valueOf())},Y.toJSON=function(){return this.isValid()?this.toISOString():null},Y.toISOString=function(){return this.$d.toISOString()},Y.toString=function(){return this.$d.toUTCString()},G})(),ue=W.prototype;return P.prototype=ue,[["$ms",o],["$s",a],["$m",s],["$H",f],["$W",p],["$M",m],["$y",B],["$D",H]].forEach((function(G){ue[G[1]]=function(Y){return this.$g(Y,G[0],G[1])}})),P.extend=function(G,Y){return G.$i||(G(Y,W,P),G.$i=!0),P},P.locale=$,P.isDayjs=x,P.unix=function(G){return P(1e3*G)},P.en=L[D],P.Ls=L,P.p={},P}))})(zn)),zn.exports}var du=pu();const Hn=uu(du),hu={class:"colBtns"},mu={key:0,class:"table-pagination"},yu={class:"left-pagination"},gu={class:"right-pagination"},Mo=_t(l.defineComponent({name:"UiFlowBaseGrid",inheritAttrs:!1,__name:"FlowGrid",props:{data:{default:()=>[]},tableLabel:{default:()=>[]},pageConfig:{default:()=>({currentPage:1,total:0,pageSize:20})},hidePage:{type:Boolean,default:!1},hideSelection:{type:Boolean,default:!1},hideNumber:{type:Boolean,default:!0},operation:{type:Boolean,default:!1},tableHeight:{default:"calc(100% - 45px)"},isFixed:{type:Boolean,default:!1},btnWidth:{default:0},size:{default:"default"}},emits:["page-change","size-change","row-click","row-dblclick"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.useSlots(),a=l.ref(),s=l.ref(),f=l.ref("100%"),p=l.ref(0),h=l.computed(()=>r.tableLabel.filter(N=>{var x;return!((x=N.hiddenCondition)!=null&&x.call(N,N))})),m=l.computed(()=>r.size==="medium"?"default":r.size);function _(N){return N<9?`0${N+1}`:N+1}function B(){var N;(N=s.value)==null||N.clearSelection()}function H(N,x){var $;($=s.value)==null||$.toggleRowSelection(N,x)}function F(){var N;(N=s.value)==null||N.toggleAllSelection()}function R(N){var x;(x=s.value)==null||x.setCurrentRow(N)}function S(N){i("page-change",N)}function M(N){i("size-change",N)}function w(){f.value=r.hidePage?"100%":"calc(100% - 45px)"}async function E(){var $;if(!r.operation||r.btnWidth)return;await l.nextTick();const N=(($=a.value)==null?void 0:$.querySelectorAll(".colBtns"))||[];let x=o.operation?120:0;N.forEach(P=>{x=Math.max(x,P.scrollWidth+40)}),p.value=x}function D(N,x,$){var P;r.hideSelection||(P=s.value)==null||P.toggleRowSelection(N),i("row-click",N,x,$)}function L(N,x,$){i("row-dblclick",N,x,$)}return l.watch(()=>[r.hidePage,r.data.length],()=>{w(),E()}),l.onMounted(()=>{window.addEventListener("resize",w),w(),E()}),l.onBeforeUnmount(()=>window.removeEventListener("resize",w)),t({tableRef:s,clearSelection:B,toggleRowSelection:H,toggleAllSelection:F,setCurrentRow:R,computeHeight:w}),(N,x)=>{const $=l.resolveComponent("el-table-column"),P=l.resolveComponent("el-table"),b=l.resolveComponent("el-pagination");return l.openBlock(),l.createElementBlock("div",{ref_key:"rootRef",ref:a,class:l.normalizeClass({"no-fixed":!e.isFixed}),style:l.normalizeStyle({height:e.tableHeight||"100%"})},[l.createVNode(P,l.mergeProps({ref_key:"tableRef",ref:s},N.$attrs,{"cell-style":{height:"50px"},data:e.data,"header-cell-style":{background:"#fafafa",color:"#45484B",height:"50px"},height:f.value,size:m.value,border:"","cell-class-name":"c-table-cell","current-row-key":"id","header-row-class-name":"c-table-header",onRowClick:D,onRowDblclick:L}),{default:l.withCtx(()=>[e.hideSelection?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock($,{key:0,align:"center",type:"selection",width:"40"})),e.hideNumber?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock($,{key:1,index:_,align:"center",label:"序号",type:"index",width:"55"})),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,W=>(l.openBlock(),l.createBlock($,{key:W.prop,formatter:W.formatter,label:W.label,"min-width":W.minWidth,prop:W.prop,"show-overflow-tooltip":W.showTooltip,sortable:W.sortable,width:W.width,align:"center"},null,8,["formatter","label","min-width","prop","show-overflow-tooltip","sortable","width"]))),128)),l.renderSlot(N.$slots,"default",{},void 0,!0),e.operation?(l.openBlock(),l.createBlock($,{key:2,fixed:e.isFixed?"right":!1,width:e.btnWidth||p.value||void 0,align:"center",label:"操作"},{default:l.withCtx(W=>[l.createElementVNode("div",hu,[l.renderSlot(N.$slots,"operation",{row:W.row},void 0,!0)])]),_:3},8,["fixed","width"])):l.createCommentVNode("",!0)]),_:3},16,["data","height","size"]),e.hidePage?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",mu,[l.createElementVNode("div",yu,[l.renderSlot(N.$slots,"pagination-left",{},void 0,!0)]),l.createElementVNode("div",gu,[l.createVNode(b,{"current-page":e.pageConfig.currentPage,"page-size":e.pageConfig.pageSize,"page-sizes":[10,20,30,40],total:e.pageConfig.total,background:"",layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:S,onSizeChange:M},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-bf6383fa"]]),vu={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},wu=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?Hn(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],bu=[{label:"业务标题",prop:"title",minWidth:"180px"},{label:"当前环节",prop:"currentActivity",minWidth:"180px",formatter:e=>e.currentActivity||"无"},{label:"创建人",prop:"createUserName",minWidth:"150px"},{label:"创建时间",prop:"createdTime",width:"180px"}];function Eu(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const _u=l.defineComponent({name:"UiFlowGrid",__name:"FlowList",props:{type:{},dealUserId:{default:""},appId:{default:""},appModuleId:{default:""}},emits:["onHandle","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref([]),s=l.ref(!1),f=l.reactive({currentPage:1,pageSize:20,total:0}),p=l.computed(()=>r.type==="draft"?bu:wu);function h(w){return vu[w]||w||""}function m(w,E){i("onHandle",{action:w,workData:Eu(E)})}function _(w){i("onHandle",{action:"view",workData:{...w,processDefinitionId:w.processDefinitionId,workId:w.id,workName:w.title}})}function B(w){return`${w}_${Hn().format("YYYYMMDDHHmmss")}`}function H(w){const E=B(w.name);i("onHandle",{action:"create",workData:{processDefinitionId:w.processDefinitionId,flowName:w.name,title:E,workName:E}})}function F(w){r.type==="todo"&&m("view",w),r.type==="done"&&m("handle",w)}function R(w){f.currentPage=w,M()}function S(w){f.pageSize=w,f.currentPage=1,M()}async function M(){s.value=!0;try{if(r.type==="todo"||r.type==="done"){const E=await(r.type==="todo"?Mr:Br)({currentPage:f.currentPage,pageSize:f.pageSize,assignee:r.dealUserId});a.value=E.data||[],f.total=Number(E.count||0)}else{const E=(await Dr(f,{appId:r.appId,appModuleId:r.appModuleId,createUserId:r.dealUserId})).data||{};a.value=E.records||[],f.total=Number(E.total||0)}}catch(w){throw i("error",w),w}finally{s.value=!1}}return l.watch(()=>[r.type,r.dealUserId,r.appId,r.appModuleId],()=>{f.currentPage=1,M()}),l.onMounted(M),t({data:a,loading:s,pageConfig:f,gridRef:o,loadTableData:M,onRowDblclick:F,create:H,buildDefaultBusinessTitle:B}),(w,E)=>{const D=l.resolveComponent("el-table-column"),L=l.resolveComponent("el-button");return l.openBlock(),l.createBlock(Mo,{ref_key:"gridRef",ref:o,data:a.value,"hide-number":!1,"hide-selection":!0,"is-fixed":!0,"page-config":f,"table-label":p.value,operation:"","table-height":"100%",onPageChange:R,onRowDblclick:F,onSizeChange:S},{operation:l.withCtx(({row:N})=>[e.type==="todo"?(l.openBlock(),l.createBlock(L,{key:0,link:"",type:"primary",onClick:l.withModifiers(x=>m("view",N),["stop"])},{default:l.withCtx(()=>[...E[0]||(E[0]=[l.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(l.openBlock(),l.createBlock(L,{key:1,link:"",type:"primary",onClick:l.withModifiers(x=>m("handle",N),["stop"])},{default:l.withCtx(()=>[...E[1]||(E[1]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&N.state==="audit"?(l.openBlock(),l.createBlock(L,{key:2,link:"",type:"primary",onClick:l.withModifiers(x=>_(N),["stop"])},{default:l.withCtx(()=>[...E[2]||(E[2]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[e.type==="done"||e.type==="draft"?(l.openBlock(),l.createBlock(D,{key:0,align:"center",label:"状态",width:"120"},{default:l.withCtx(({row:N})=>[l.createTextVNode(l.toDisplayString(e.type==="done"?h(N.stateName):N.stateLabel),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["data","page-config","table-label"])}}}),xu={class:"ui-flow-jump"},Su={class:"dialog-footer"},Au=_t(l.defineComponent({name:"UiFlowJump",__name:"FlowJump",props:{processDefinitionId:{},workId:{default:""},processInstanceId:{default:""},dealUser:{default:()=>({})},modelValue:{type:Boolean,default:!1},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"跳转"},dialogWidth:{default:"960px"}},emits:["update:modelValue","click","open","close","beforeJump","afterJump","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(!1),s=l.ref(!1),f=l.ref(!1),p=l.ref([]),h=l.ref([]),m=l.ref(""),_=l.ref(""),B=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),H=l.computed(()=>String(r.dealUser.name||B.value)),F={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:T=>T.hasChild===!1};function R(T){return T?String(T.id||T.activityId||""):""}function S(T){return T?String(T.activityName||T.name||T.id||T.activityId||""):""}function M(T){return T.map(j=>{const O=j||{},q=String(O.id||O.userId||""),U=String(O.ntype||"user"),K=Array.isArray(O.childs)?O.childs:Array.isArray(O.children)?O.children:void 0;return{...O,id:q,value:q,label:String(O.caption||O.name||O.id||O.userId||""),caption:String(O.caption||O.name||O.id||O.userId||""),ntype:U,hasChild:!!(O.hasChild||K!=null&&K.length),disabled:U!=="user",children:K?M(K):void 0}}).filter(j=>j.id)}function w(){return B.value?[{id:B.value,value:B.value,label:H.value,caption:H.value,name:H.value,ntype:"user",hasChild:!1,disabled:!1}]:[]}async function E(){s.value=!0;try{const T=await Kr({processDefinitionId:r.processDefinitionId});return p.value=Array.isArray(T.data)?T.data:[],p.value}catch(T){throw p.value=[],i("error",T),T}finally{s.value=!1}}async function D(T="",j){const O=await Un({processDefinitionId:r.processDefinitionId,activityId:m.value,ntype:j,parentId:T});return M(Array.isArray(O.data)?O.data:[])}async function L(){if(h.value=[],_.value="",!m.value)return[];f.value=!0;try{const T=await D();h.value=T.length?T:w()}catch{h.value=w()}finally{f.value=!1}return h.value.length===1&&h.value[0].ntype==="user"&&(_.value=h.value[0].id),h.value}async function N(T,j){if(T.level===0){j(h.value);return}if(T.data.hasChild===!1||T.data.ntype==="user"){j([]);return}if(Array.isArray(T.data.children)&&T.data.children.length){j(T.data.children);return}try{const O=await D(String(T.data.id),String(T.data.ntype||""));j(O)}catch(O){i("error",O),j([])}}async function x(){await L()}function $(T,j){const O=T?R(T):m.value,q=String(j||_.value||B.value);return{workId:r.workId,flowNodeAssignee:{activityId:O,assignees:[{name:q,userId:q}]},variables:{}}}async function P(T){const j=T||$();i("beforeJump",j),a.value=!0;try{const O=await Yr(j);return i("afterJump",O),O}catch(O){throw i("error",O),O}finally{a.value=!1}}async function b(){if(!r.workId){ht.ElMessage.warning("当前任务缺少 workId,无法执行跳转");return}if(!m.value){ht.ElMessage.warning("请选择开始节点");return}if(!_.value){ht.ElMessage.warning("请选择办理人");return}try{await P(),o.value=!1,ht.ElMessage.success("跳转任务成功")}catch{}}async function W(){o.value=!0,m.value="",_.value="",h.value=[],i("open");try{await E()}catch{}}function ue(){o.value=!1}function G(){i("close")}function Y(){i("click"),W()}return l.watch(()=>r.modelValue,T=>{T&&!o.value&&W(),!T&&o.value&&(o.value=!1)}),l.watch(o,T=>i("update:modelValue",T)),l.watch(()=>r.processDefinitionId,()=>{m.value="",_.value="",h.value=[],E().catch(()=>{})}),l.watch(B,()=>{o.value&&m.value&&L()}),l.onMounted(()=>{r.modelValue?W():E().catch(()=>{})}),t({visible:o,loading:a,nodeLoading:s,assigneeLoading:f,startNodeList:p,selectedActivityId:m,selectedAssigneeId:_,open:W,close:ue,getStartNodes:E,assembleData:$,jump:P}),(T,j)=>{const O=l.resolveComponent("el-button"),q=l.resolveComponent("el-option"),U=l.resolveComponent("el-select"),K=l.resolveComponent("el-form-item"),k=l.resolveComponent("el-tree-select"),A=l.resolveComponent("el-form"),I=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",xu,[e.showTrigger?(l.openBlock(),l.createBlock(O,{key:0,type:"primary",loading:a.value,onClick:Y},{default:l.withCtx(()=>[l.renderSlot(T.$slots,"default",{},()=>[j[3]||(j[3]=l.createTextVNode("跳转",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(I,{modelValue:o.value,"onUpdate:modelValue":j[2]||(j[2]=ie=>o.value=ie),"append-to-body":"",class:"ui-flow-jump-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,onClosed:G},{footer:l.withCtx(()=>[l.createElementVNode("div",Su,[l.createVNode(O,{type:"primary",loading:a.value,onClick:b},{default:l.withCtx(()=>[...j[4]||(j[4]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(O,{disabled:a.value,onClick:ue},{default:l.withCtx(()=>[...j[5]||(j[5]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createVNode(A,{class:"jump-form","label-width":"108px"},{default:l.withCtx(()=>[l.createVNode(K,{label:"开始节点",required:""},{default:l.withCtx(()=>[l.createVNode(U,{modelValue:m.value,"onUpdate:modelValue":j[0]||(j[0]=ie=>m.value=ie),clearable:"",filterable:"",loading:s.value,placeholder:"请选择",style:{width:"100%"},onChange:x},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(p.value,ie=>(l.openBlock(),l.createBlock(q,{key:R(ie),label:S(ie),value:R(ie)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),l.createVNode(K,{label:"办理人",required:""},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:_.value,"onUpdate:modelValue":j[1]||(j[1]=ie=>_.value=ie),"check-strictly":"",clearable:"",data:h.value,disabled:!m.value,load:N,loading:f.value,props:F,lazy:"","node-key":"id",placeholder:"请选择","render-after-expand":!1,style:{width:"100%"}},null,8,["modelValue","data","disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue","title","width"])])}}}),[["__scopeId","data-v-93e9b256"]]),Cu={class:"ui-flow-send"},ku={class:"send-panel"},Ru={class:"current-activity"},Tu={class:"node-groups"},Pu=["onClick"],Nu={class:"send-center"},Ou={class:"assignee-transfer"},Du={class:"assignee-box"},Mu={class:"tree-node"},Bu={key:1,class:"candidate-list"},Iu={class:"assignee-box selected-list"},Lu={key:0,class:"node-state"},Fu={class:"variable-toolbar"},Vu={class:"opinion-panel"},$u={class:"dialog-footer"},ju=_t(l.defineComponent({name:"UiFlowSend",__name:"FlowSend",props:{processDefinitionId:{},activity:{},workId:{},processInstanceId:{default:""},variables:{default:()=>({})},dealUser:{default:()=>({})},bpmnXml:{default:""},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},defaultOpinion:{default:""},modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","click","open","close","nextNodesResolved","beforeSend","afterSend","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(!1),s=l.ref(!1),f=l.ref(!1),p=l.ref(!1),h=l.ref([]),m=l.ref([]),_=l.ref([]),B=l.ref([]),H=l.ref([]),F=l.ref(!1),R=l.ref(""),S=l.ref("nextNode"),M=l.ref(""),w=l.ref([]),E=l.ref(!1),D=l.ref(0),L=l.ref(),N=[{label:"Boolean",value:"boolean"},{label:"Short",value:"short"},{label:"Integer",value:"integer"},{label:"Long",value:"long"},{label:"Double",value:"double"},{label:"String",value:"string"},{label:"Date",value:"date"}],x={children:"childs",label:"caption",isLeaf:z=>z.hasChild===!1},$=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),P=l.computed(()=>m.value.find(z=>b(z)===R.value));function b(z){return z?String(z.id||z.activityId||""):""}function W(z){return`${z.activity}:${z.id}`}function ue(z){return typeof z=="boolean"?"boolean":typeof z=="number"?Number.isInteger(z)?"integer":"double":z instanceof Date?"date":"string"}function G(){w.value=Object.entries(r.variables).map(([z,V])=>({variableName:z,variableType:ue(V),variableValue:V})),E.value=!1}function Y(){return w.value.reduce((z,V)=>(V.variableName&&(z[V.variableName]=V.variableValue),z),{})}function T(){R.value="",h.value=[],m.value=[],_.value=[],B.value=[],H.value=[],F.value=!1}function j(z){if(!r.bpmnXml||!z||typeof DOMParser>"u")return;const V=new DOMParser().parseFromString(r.bpmnXml,"text/xml");return Array.from(V.getElementsByTagName("*")).find(te=>te.getAttribute("id")===z)}function O(z){const V=j(z);if(!V)return!0;if(Array.from(V.children||[]).some(ke=>ke.localName==="multiInstanceLoopCharacteristics"))return!1;const ce=["assigneUser","candidateUser"],ge=Array.from(V.getElementsByTagName("*")).filter(ke=>ke.localName==="properties"&&ce.includes(ke.getAttribute("type")||"")).flatMap(ke=>Array.from(ke.getElementsByTagName("*")).filter(me=>me.localName==="property"));if(ge.some(ke=>{const me=ke.getAttribute("assignType");return!!(me&&me!=="user")}))return!1;const De=ge.map(ke=>ke.getAttribute("value")).filter(Boolean),qe=V.getAttribute("camunda:assignee")||"";return qe&&!qe.includes("${")&&De.push(...qe.split(",").filter(Boolean)),new Set(De).size<=1}function q(z){var V;return((V=m.value.find(te=>b(te)===z))==null?void 0:V.isSingleAssignee)!==!1}function U(z,V){const te=b(V),ce=String(V.activityName||V.name||te);return z.map(ge=>{const De=ge||{};return{...De,id:String(De.id||""),caption:String(De.caption||De.name||De.id||""),ntype:String(De.ntype||"user"),hasChild:De.hasChild,activity:te,activityName:ce,disabled:De.ntype!=="user",childs:Array.isArray(De.childs)?U(De.childs,V):void 0}})}async function K(z,V){p.value=!0;try{const te=await Un({processDefinitionId:r.processDefinitionId,activityId:b(z),userId:$.value,...V?{parentId:V}:{}}),ce=U(Array.isArray(te.data)?te.data:[],z);return V?ce:R.value!==b(z)?[]:(F.value=ce.some(ge=>["router","organ"].includes(ge.ntype||"")),F.value?(B.value=ce,_.value=[],await l.nextTick(),u(ce)):(B.value=[],_.value=ce),ce)}catch(te){throw i("error",te),te}finally{p.value=!1}}async function k(z,V){if(z.level===0){V(B.value);return}if(z.data.hasChild===!1||!P.value){V([]);return}if(Array.isArray(z.data.childs)&&z.data.childs.length){V(z.data.childs),await l.nextTick(),u(z.data.childs);return}try{const te=await K(P.value,String(z.data.id));V(te),await l.nextTick(),u(te)}catch{V([])}}async function A(z=Y()){const V=++D.value;s.value=!0,f.value=!1,T();try{const te=await qr({processDefinitionId:r.processDefinitionId,activityId:r.activity.activityId,processInstanceId:r.processInstanceId,workId:r.workId,variables:z});if(V!==D.value)return[];h.value=te.data||[],m.value=h.value.filter(ge=>ge.flowElementType==="USER_TASK").map(ge=>({...ge,isSingleAssignee:O(b(ge))})),f.value=!0,E.value=!1,i("nextNodesResolved",h.value);const ce=m.value[0];if(ce){R.value=b(ce);try{await K(ce)}catch{}}return h.value}catch(te){throw V===D.value&&(f.value=!1),i("error",te),te}finally{V===D.value&&(s.value=!1)}}async function I(z){R.value=b(z),_.value=[],B.value=[],F.value=!1;try{await K(z)}catch{}}function ie(z){return H.value.some(V=>W(V)===W(z))}function ae(z,V){const te=W(z);V?(q(z.activity)&&(H.value=H.value.filter(ce=>ce.activity!==z.activity)),H.value.some(ce=>W(ce)===te)||H.value.push({...z})):H.value=H.value.filter(ce=>W(ce)!==te)}function d(z,V){z.ntype==="user"&&(V&&q(z.activity)&&H.value.filter(ce=>ce.activity===z.activity).forEach(ce=>{var ge;return(ge=L.value)==null?void 0:ge.setChecked(ce.id,!1,!1)}),ae(z,V))}function u(z){z.forEach(V=>{var te,ce;V.ntype==="user"&&ie(V)&&((te=L.value)==null||te.setChecked(V.id,!0,!1)),(ce=V.childs)!=null&&ce.length&&u(V.childs)})}function c(z){var V;H.value=H.value.filter(te=>W(te)!==W(z)),F.value&&((V=L.value)==null||V.setChecked(z.id,!1,!1))}function y(){E.value=!0}function v(){w.value.push({variableName:"",variableType:"string",variableValue:""}),y()}function C(z){w.value.splice(z,1),y()}function X(z){z.variableValue="",y()}function se(z,V){return z===""||z===null||z===void 0?null:V==="boolean"?String(z).toLowerCase()==="true":["short","integer","long"].includes(V)?Number.parseInt(String(z),10):V==="double"?Number.parseFloat(String(z)):z}function fe(z){z.variableValue=se(z.variableValue,z.variableType),y()}async function Q(){S.value="nextNode";try{await A(Y())}catch{}}function pe(){const z=H.value.reduce((V,te)=>{let ce=V.get(te.activity);return ce||(ce={activityId:te.activity,assignees:[]},V.set(te.activity,ce)),ce.assignees.some(ge=>ge.userId===te.id)||ce.assignees.push({name:te.id,userId:te.id}),V},new Map);return{workId:r.workId,flowNodeAssignees:Array.from(z.values()),variables:Y(),opinion:M.value}}async function be(z){const V=z||pe();i("beforeSend",V),a.value=!0;try{const te=await Wr(V);return i("afterSend",te),te}catch(te){throw i("error",te),te}finally{a.value=!1}}async function Ce(){if(s.value){ht.ElMessage.warning("正在计算下一环节,请稍后再发送");return}if(E.value||!f.value){S.value="variables",ht.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const z=m.value.find(V=>!H.value.some(te=>te.activity===b(V)));if(z){R.value=b(z),S.value="nextNode",ht.ElMessage.warning(`请选择“${z.activityName||z.name||b(z)}”的办理人`),await I(z);return}try{await be(),o.value=!1,ht.ElMessage.success("发送成功")}catch{}}async function Pe(){o.value=!0,M.value=r.defaultOpinion,S.value="nextNode",G(),i("open");try{await A(Y())}catch{}}function we(){o.value=!1}function Ee(){i("close")}function ze(){i("click"),Pe()}return l.watch(()=>r.modelValue,z=>{z&&!o.value&&Pe(),!z&&o.value&&(o.value=!1)}),l.watch(o,z=>i("update:modelValue",z)),l.onMounted(()=>{r.modelValue&&Pe()}),t({visible:o,loading:a,nodeLoading:s,nodeResolved:f,nextNodes:h,open:Pe,close:we,getNextNode:A,assembleData:pe,send:be}),(z,V)=>{const te=l.resolveComponent("el-button"),ce=l.resolveComponent("el-empty"),ge=l.resolveComponent("el-tree"),De=l.resolveComponent("el-checkbox"),qe=l.resolveComponent("el-table-column"),ke=l.resolveComponent("el-table"),me=l.resolveComponent("el-tab-pane"),ve=l.resolveComponent("el-input"),Vm=l.resolveComponent("el-option"),$m=l.resolveComponent("el-select"),jm=l.resolveComponent("el-date-picker"),Um=l.resolveComponent("el-tabs"),zm=l.resolveComponent("el-dialog"),Hm=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Cu,[e.showTrigger?(l.openBlock(),l.createBlock(te,{key:0,type:"primary",loading:a.value,onClick:ze},{default:l.withCtx(()=>[l.renderSlot(z.$slots,"default",{},()=>[V[3]||(V[3]=l.createTextVNode("发送",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(zm,{modelValue:o.value,"onUpdate:modelValue":V[2]||(V[2]=le=>o.value=le),"append-to-body":"",class:"ui-flow-send-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,onClosed:Ee},{footer:l.withCtx(()=>[l.createElementVNode("div",$u,[l.createVNode(te,{type:"primary",loading:a.value,onClick:Ce},{default:l.withCtx(()=>[...V[13]||(V[13]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(te,{disabled:a.value,onClick:we},{default:l.withCtx(()=>[...V[14]||(V[14]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createElementVNode("div",ku,[l.createElementVNode("div",Ru,[V[4]||(V[4]=l.createTextVNode(" 当前环节:",-1)),l.createElementVNode("strong",null,l.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),l.createElementVNode("aside",Tu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(m.value,le=>(l.openBlock(),l.createElementBlock("button",{key:b(le),class:l.normalizeClass(["node-group",{active:R.value===b(le)}]),type:"button",onClick:Be=>I(le)},[V[5]||(V[5]=l.createElementVNode("span",{class:"group-avatar"},"♟",-1)),l.createElementVNode("span",null,l.toDisplayString(le.activityName||le.name||b(le)),1)],10,Pu))),128)),f.value&&!m.value.length?(l.openBlock(),l.createBlock(ce,{key:0,description:"没有下一用户任务","image-size":44})):l.createCommentVNode("",!0)]),l.createElementVNode("section",Nu,[l.createElementVNode("div",Ou,[l.withDirectives((l.openBlock(),l.createElementBlock("div",Du,[F.value?(l.openBlock(),l.createBlock(ge,{key:0,ref_key:"assigneeTreeRef",ref:L,class:"assignee-tree",data:B.value,load:k,props:x,"check-on-click-node":"","check-strictly":"",lazy:"","node-key":"id","show-checkbox":"",onCheckChange:d},{default:l.withCtx(({data:le})=>[l.createElementVNode("span",Mu,[l.createElementVNode("span",null,l.toDisplayString(le.ntype==="user"?"●":"▣"),1),l.createElementVNode("span",null,l.toDisplayString(le.caption||le.id),1)])]),_:1},8,["data"])):(l.openBlock(),l.createElementBlock("div",Bu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(_.value,le=>(l.openBlock(),l.createBlock(De,{key:W(le),"model-value":ie(le),class:"candidate-item",onChange:Be=>ae(le,!!Be)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(le.caption||le.name||le.id),1)]),_:2},1032,["model-value","onChange"]))),128)),!p.value&&!_.value.length?(l.openBlock(),l.createBlock(ce,{key:0,description:"暂无可选办理人","image-size":44})):l.createCommentVNode("",!0)]))])),[[Hm,p.value]]),V[7]||(V[7]=l.createElementVNode("div",{class:"transfer-arrows","aria-hidden":"true"},[l.createElementVNode("span",null,"→"),l.createElementVNode("span",null,"←")],-1)),l.createElementVNode("div",Iu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(H.value,le=>(l.openBlock(),l.createElementBlock("div",{key:W(le),class:"selected-user"},[l.createElementVNode("span",null,l.toDisplayString(le.caption||le.name||le.id),1),l.createVNode(te,{link:"",type:"danger",onClick:Be=>c(le)},{default:l.withCtx(()=>[...V[6]||(V[6]=[l.createTextVNode("移除",-1)])]),_:1},8,["onClick"])]))),128)),H.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ce,{key:0,description:"暂未选择办理人","image-size":44}))])]),l.createVNode(Um,{modelValue:S.value,"onUpdate:modelValue":V[0]||(V[0]=le=>S.value=le),type:"card",class:"send-tabs"},{default:l.withCtx(()=>[l.createVNode(me,{label:"下一环节",name:"nextNode"},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock("div",Lu,"正在根据流程变量计算下一环节...")):(l.openBlock(),l.createBlock(ke,{key:1,data:H.value,border:"",height:"190"},{empty:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(m.value.length?"请选择办理人":"暂无数据"),1)]),default:l.withCtx(()=>[l.createVNode(qe,{prop:"activityName",label:"办理环节","min-width":"150"}),l.createVNode(qe,{prop:"caption",label:"办理人","min-width":"130"},{default:l.withCtx(({row:le})=>[l.createTextVNode(l.toDisplayString(le.caption||le.name||le.id),1)]),_:1}),l.createVNode(qe,{label:"办理方式",width:"120"},{default:l.withCtx(({row:le})=>[l.createTextVNode(l.toDisplayString(q(le.activity)?"单人单办":"多人办理"),1)]),_:1}),l.createVNode(qe,{label:"操作",width:"90",align:"center"},{default:l.withCtx(({row:le})=>[l.createVNode(te,{link:"",type:"danger",onClick:Be=>c(le)},{default:l.withCtx(()=>[...V[8]||(V[8]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"]))]),_:1}),l.createVNode(me,{label:"输入变量",name:"variables"},{default:l.withCtx(()=>[l.createElementVNode("div",Fu,[l.createVNode(te,{type:"primary",plain:"",onClick:v},{default:l.withCtx(()=>[...V[9]||(V[9]=[l.createTextVNode("新增变量",-1)])]),_:1}),l.createVNode(te,{loading:s.value,onClick:Q},{default:l.withCtx(()=>[...V[10]||(V[10]=[l.createTextVNode(" 重新计算下一环节 ",-1)])]),_:1},8,["loading"])]),l.createVNode(ke,{data:w.value,border:"",height:"190"},{default:l.withCtx(()=>[l.createVNode(qe,{label:"变量名称","min-width":"150"},{default:l.withCtx(({row:le})=>[l.createVNode(ve,{modelValue:le.variableName,"onUpdate:modelValue":Be=>le.variableName=Be,onInput:y},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),l.createVNode(qe,{label:"变量类型",width:"140"},{default:l.withCtx(({row:le})=>[l.createVNode($m,{modelValue:le.variableType,"onUpdate:modelValue":Be=>le.variableType=Be,onChange:Be=>X(le)},{default:l.withCtx(()=>[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(N,Be=>l.createVNode(Vm,{key:Be.value,label:Be.label,value:Be.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),l.createVNode(qe,{label:"变量值","min-width":"180"},{default:l.withCtx(({row:le})=>[le.variableType==="date"?(l.openBlock(),l.createBlock(jm,{key:0,modelValue:le.variableValue,"onUpdate:modelValue":Be=>le.variableValue=Be,style:{width:"100%"},type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss",onChange:y},null,8,["modelValue","onUpdate:modelValue"])):(l.openBlock(),l.createBlock(ve,{key:1,modelValue:le.variableValue,"onUpdate:modelValue":Be=>le.variableValue=Be,onBlur:Be=>fe(le),onInput:y},null,8,["modelValue","onUpdate:modelValue","onBlur"]))]),_:1}),l.createVNode(qe,{label:"操作",width:"90",align:"center"},{default:l.withCtx(({$index:le})=>[l.createVNode(te,{link:"",type:"danger",onClick:Be=>C(le)},{default:l.withCtx(()=>[...V[11]||(V[11]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])]),l.createElementVNode("aside",Vu,[V[12]||(V[12]=l.createElementVNode("label",null,"填写意见:",-1)),l.createVNode(ve,{modelValue:M.value,"onUpdate:modelValue":V[1]||(V[1]=le=>M.value=le),maxlength:"500",placeholder:"请输入意见",resize:"none","show-word-limit":"",type:"textarea"},null,8,["modelValue"])])])]),_:1},8,["modelValue","title","width"])])}}}),[["__scopeId","data-v-0300169e"]]);function at(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const vn=Object.prototype.toString,Uu=Object.prototype.hasOwnProperty;function Gr(e){return e===void 0}function en(e){return e!==void 0}function Bo(e){return e==null}function tt(e){return vn.call(e)==="[object Array]"}function xt(e){return vn.call(e)==="[object Object]"}function St(e){return vn.call(e)==="[object Number]"}function $t(e){const t=vn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function st(e){return vn.call(e)==="[object String]"}function tn(e,t){return!Bo(e)&&Uu.call(e,t)}function ot(e,t){const n=Xr(t);let r;return ee(e,function(i,o){if(n(i,o))return r=i,!1}),r}function zu(e,t){const n=Xr(t);let r=tt(e)?-1:void 0;return ee(e,function(i,o){if(n(i,o))return r=o,!1}),r}function nn(e,t){const n=Xr(t);let r=[];return ee(e,function(i,o){n(i,o)&&r.push(i)}),r}function ee(e,t){let n,r;if(Gr(e))return;const i=tt(e)?qu:Wu;for(let o in e)if(tn(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function rn(e,t,n){return ee(e,function(r,i){n=t(n,r,i)}),n}function Io(e,t){return!!rn(e,function(n,r,i){return n&&t(r,i)},!0)}function Lo(e,t){return!!ot(e,t)}function Hu(e,t){let n=[];return ee(e,function(r,i){n.push(t(r,i))}),n}function Fo(e){return function(t){return Io(e,function(n,r){return t[r]===n})}}function Xr(e){return $t(e)?e:t=>t===e}function Wu(e){return e}function qu(e){return Number(e)}function Vo(e,t){let n,r,i,o;function a(m){let _=Date.now(),B=m?0:o+t-_;if(B>0)return s(B);e.apply(i,r),f()}function s(m){n=setTimeout(a,m)}function f(){n&&clearTimeout(n),n=o=r=i=void 0}function p(){n&&a(!0),f()}function h(...m){o=Date.now(),r=m,i=this,n||s(t)}return h.flush=p,h.cancel=f,h}function At(e,t){return e.bind(t)}function ne(e,...t){return Object.assign(e,...t)}function Yu(e,t,n){let r=e;return ee(t,function(i,o){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let a=t[o+1],s=r[i];en(a)&&Bo(s)&&(s=r[i]=isNaN(+a)?{}:[]),Gr(a)?Gr(n)?delete r[i]:r[i]=n:r=s}),e}function Ku(e,t){let n={},r=Object(e);return ee(t,function(i){i in r&&(n[i]=e[i])}),n}function Gu(e,t){let n={},r=Object(e);return ee(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}var Xu=1e3;function yt(e,t){var n=this;t=t||Xu,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,f=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,f):n.drawConnection(s,a,f)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}yt.prototype.canRender=function(e){},yt.prototype.drawShape=function(e,t){},yt.prototype.drawConnection=function(e,t){},yt.prototype.getShapePath=function(e){},yt.prototype.getConnectionPath=function(e){};function re(e,t){var n=Se(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function Ju(e,t){return Lo(t,function(n){return re(e,n)})}function Se(e){return e&&e.businessObject||e}function jt(e){return e&&e.di}function Ut(e,t){return re(e,"bpmn:CallActivity")?!1:re(e,"bpmn:SubProcess")?(t=t||jt(e),t&&re(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):re(e,"bpmn:Participant")?!!Se(e).processRef:!0}function $o(e){if(!(!re(e,"bpmn:Participant")&&!re(e,"bpmn:Lane"))){var t=jt(e).isHorizontal;return t===void 0?!0:t}}function Zu(e){return e&&!!Se(e).triggeredByEvent}function Qu(e){return xt(e)&&tn(e,"waypoints")}function ef(e){return xt(e)&&tn(e,"labelTarget")}var wn={width:90,height:20},jo=15;function tf(e){return re(e,"bpmn:Event")||re(e,"bpmn:Gateway")||re(e,"bpmn:DataStoreReference")||re(e,"bpmn:DataObjectReference")||re(e,"bpmn:DataInput")||re(e,"bpmn:DataOutput")||re(e,"bpmn:SequenceFlow")||re(e,"bpmn:MessageFlow")||re(e,"bpmn:Group")}function nf(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=rf(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=jo:a+=jo,{x:a,y:s}}function rf(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function of(e){return e.waypoints?nf(e.waypoints):re(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+wn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+wn.height/2}}function af(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(wn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=of(t),r=wn),ne({x:n.x-r.width/2,y:n.y-r.height/2},r)}function sf(e){if(re(e,"bpmn:FlowElement")||re(e,"bpmn:Participant")||re(e,"bpmn:Lane")||re(e,"bpmn:SequenceFlow")||re(e,"bpmn:MessageFlow")||re(e,"bpmn:DataInput")||re(e,"bpmn:DataOutput"))return"name";if(re(e,"bpmn:TextAnnotation"))return"text";if(re(e,"bpmn:Group"))return"categoryValueRef"}function lf(e){var t=e.categoryValueRef;return t&&t.value||""}function Wn(e){var t=e.businessObject,n=sf(t);if(n)return n==="categoryValueRef"?lf(t):t[n]||""}function bn(e,t){t=!!t,tt(e)||(e=[e]);var n,r,i,o;return ee(e,function(a){var s=a;a.waypoints&&!t&&(s=bn(a.waypoints,!0));var f=s.x,p=s.y,h=s.height||0,m=s.width||0;(f<n||n===void 0)&&(n=f),(p<r||r===void 0)&&(r=p),(f+m>i||i===void 0)&&(i=f+m),(p+h>o||o===void 0)&&(o=p+h)}),{x:n,y:r,height:o-r,width:i-n}}function Uo(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function zo(e){return!!(e&&e.isFrame)}var Ho=7;function cf(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function uf(e,t){return t.appendChild(cf(e,t))}function Ie(e,t){return uf(t,e),e}var Jr=2,Wo={"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":Jr,"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":Jr,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function ff(e,t){return Wo[t]?e.style[t]:e.getAttributeNS(null,t)}function qo(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Wo[r];i?(i===Jr&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function pf(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)qo(e,i,t[i])}function Re(e,t,n){if(typeof t=="string")if(n!==void 0)qo(e,t,n);else return ff(e,t);else pf(e,t);return e}const df=Object.prototype.toString;function lt(e){return new Ct(e)}function Ct(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Ct.prototype.add=function(e){return this.list.add(e),this},Ct.prototype.remove=function(e){return df.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Ct.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},Ct.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ct.prototype.array=function(){return Array.from(this.list)},Ct.prototype.has=Ct.prototype.contains=function(e){return this.list.contains(e)};var Zr={svg:"http://www.w3.org/2000/svg"},Yo='<svg xmlns="'+Zr.svg+'"';function hf(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Zr.svg)===-1&&(e=Yo+e.substring(4)):(e=Yo+">"+e+"</svg>",t=!0);var n=mf(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function mf(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function Ae(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=hf(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Zr.svg,e),t&&Re(n,t),n}var Qr=null;function Ko(){return Qr===null&&(Qr=Ae("svg")),Qr}function Go(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function yf(e,t,n,r,i,o){var a=Ko().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return Go(a,e);case 6:return Go(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function En(e){return Ko().createSVGTransform()}var Xo=/([&<>]{1})/g,gf=/([&<>\n\r"]{1})/g,vf={"&":"&","<":"<",">":">",'"':"'"};function ei(e,t){function n(r,i){return vf[i]||i}return e.replace(t,n)}function Jo(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(ei(e.textContent,Xo));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',ei(o.value,gf),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)Jo(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",ei(e.nodeValue,Xo),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function wf(e){for(var t=e.firstChild,n=[];t;)Jo(t,n),t=t.nextSibling;return n.join("")}function Zo(e,t){return wf(e)}function qn(e){var t=e.parentNode;return t&&t.removeChild(e),e}function bf(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Ef(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(bf(e,r))}function _n(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Ef(n,t)),n.consolidate()}function zt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function _f(e){return["M",e.x,e.y]}function ti(e){return["L",e.x,e.y]}function xf(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Sf(e,t){const n=e.length,r=[_f(e[0])];for(let i=1;i<n;i++){const o=e[i-1],a=e[i],s=e[i+1];if(!s||!t){r.push(ti(a));continue}const f=Math.min(t,ni(a.x-o.x,a.y-o.y),ni(s.x-a.x,s.y-a.y));if(!f){r.push(ti(a));continue}const p=Yn(a,o,f),h=Yn(a,o,f*.5),m=Yn(a,s,f),_=Yn(a,s,f*.5);r.push(ti(p)),r.push(xf(h,_,m))}return r}function Yn(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=ni(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function ni(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function ri(e,t,n){St(t)&&(n=t,t=null),t||(t={});const r=Ae("path",t);return St(n)&&(r.dataset.cornerRadius=String(n)),Qo(r,e)}function Qo(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Re(e,{d:zt(Sf(t,n))}),e}var ii="hsl(225, 10%, 15%)",Af="white";function ct(e,t){return Lo(e.eventDefinitions,function(n){return n.$type===t})}function Cf(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function kf(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function de(e,t,n){var r=jt(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Af}function J(e,t,n){var r=jt(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||ii}function xn(e,t,n,r){var i=jt(e),o=i.get("label");return r||o&&o.get("color:color")||t||J(e,n)}function Rf(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return zt(i)}function ea(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return zt(a)}function Tf(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return zt(s)}function Pf(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return zt(o)}function Sn(e,t={}){return{width:nt(e,t),height:Ke(e,t)}}function nt(e,t={}){return tn(t,"width")?t.width:e.width}function Ke(e,t={}){return tn(t,"height")?t.height:e.height}const Oe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Oe.td=Oe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Oe.option=Oe.optgroup=[1,'<select multiple="multiple">',"</select>"],Oe.thead=Oe.tbody=Oe.colgroup=Oe.caption=Oe.tfoot=[1,"<table>","</table>"],Oe.polyline=Oe.ellipse=Oe.polygon=Oe.circle=Oe.text=Oe.line=Oe.path=Oe.rect=Oe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function ut(e,t=globalThis.document){var p;if(typeof e!="string")throw new TypeError("String expected");const n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);const r=(p=/<([\w:]+)/.exec(e))==null?void 0:p[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){const h=t.createElement("html");h.innerHTML=e;const{lastChild:m}=h;return m.remove(),m}let[i,o,a]=Object.hasOwn(Oe,r)?Oe[r]:Oe._default,s=t.createElement("div");for(s.innerHTML=o+e+a;i--;)s=s.lastChild;if(s.firstChild===s.lastChild){const{firstChild:h}=s;return h.remove(),h}const f=t.createDocumentFragment();return f.append(...s.childNodes),f}function Nf(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function Xe(e,...t){const n=e.style;return ee(t,function(r){r&&ee(r,function(i,o){n[o]=i})}),e}function ta(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Of=Object.prototype.toString;function Ht(e){return new kt(e)}function kt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}kt.prototype.add=function(e){return this.list.add(e),this},kt.prototype.remove=function(e){return Of.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},kt.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},kt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},kt.prototype.array=function(){return Array.from(this.list)},kt.prototype.has=kt.prototype.contains=function(e){return this.list.contains(e)};function na(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function ra(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function Df(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kn={},ia;function Mf(){if(ia)return Kn;ia=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return Kn.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},Kn.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},Kn}var oa=Mf(),Bf=Df(oa),Rt=Nf({__proto__:null,default:Bf},[oa]),aa=["focus","blur"];function If(e,t,n,r,i){return aa.indexOf(n)!==-1&&(i=!0),Rt.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=ra(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function Lf(e,t,n,r){return aa.indexOf(t)!==-1&&(r=!0),Rt.unbind(e,t,n,r)}var oi={bind:If,unbind:Lf};function gt(e,t){return t=t||document,t.querySelector(e)}function Ff(e,t){return t=t||document,t.querySelectorAll(e)}function Gn(e){e.parentNode&&e.parentNode.removeChild(e)}function ai(e,t,n,r,i){var o=En();o.setTranslate(t,n);var a=En();a.setRotate(r||0,0,0);var s=En();s.setScale(1,1),_n(e,[o,a,s])}function sa(e,t,n){var r=En();r.setTranslate(t,n),_n(e,r)}function Vf(e,t){var n=En();n.setRotate(t,0,0),_n(e,n)}function $f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var si={exports:{}},la;function jf(){if(la)return si.exports;la=1;var e=si.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var o=r-Math.floor(r),a="",i=0;i<Math.floor(r);i++){var s=Math.floor(Math.random()*n).toString(n);a=s+a}if(o){var f=Math.pow(n,o),s=Math.floor(Math.random()*f).toString(n);a=s+a}var p=parseInt(a,n);return p!==1/0&&p>=Math.pow(2,t)?e(t,n):a};return e.rack=function(t,n,r){var i=function(a){var s=0;do{if(s++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var f=e(t,n)}while(Object.hasOwnProperty.call(o,f));return o[f]=a,f},o=i.hats={};return i.get=function(a){return i.hats[a]},i.set=function(a,s){return i.hats[a]=s,i},i.bits=t||128,i.base=n||16,i},si.exports}var Uf=jf(),zf=$f(Uf);function vt(e){if(!(this instanceof vt))return new vt(e);e=e||[128,36,1],this._seed=e.length?zf.rack(e[0],e[1],e[2]):e}vt.prototype.next=function(e){return this._seed(e||!0)},vt.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},vt.prototype.claim=function(e,t){this._seed.set(e,t||!0)},vt.prototype.assigned=function(e){return this._seed.get(e)||!1},vt.prototype.unclaim=function(e){delete this._seed.hats[e]},vt.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var Hf=new vt,Wf=10,Xn=3,qf=1.5,Jn=10,Yf=4,on=.95,Kf=1,Gf=.25;function Wt(e,t,n,r,i,o,a){yt.call(this,t,a);var s=e&&e.defaultFillColor,f=e&&e.defaultStrokeColor,p=e&&e.defaultLabelColor;function h(d){return n.computeStyle(d,{strokeLinecap:"round",strokeLinejoin:"round",stroke:ii,strokeWidth:2,fill:"white"})}function m(d){return n.computeStyle(d,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:ii,strokeWidth:2})}function _(d,u){var{ref:c={x:0,y:0},scale:y=1,element:v,parentGfx:C=i._svg}=u,X=Ae("marker",{id:d,viewBox:"0 0 20 20",refX:c.x,refY:c.y,markerWidth:20*y,markerHeight:20*y,orient:"auto"});Ie(X,v);var se=gt(":scope > defs",C);se||(se=Ae("defs"),Ie(C,se)),Ie(se,X)}function B(d,u,c,y){var v=Hf.nextPrefixed("marker-");return H(d,v,u,c,y),"url(#"+v+")"}function H(d,u,c,y,v){if(c==="sequenceflow-end"){var C=Ae("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:v,stroke:v,strokeWidth:1})});_(u,{element:C,ref:{x:11,y:10},scale:.5,parentGfx:d})}if(c==="messageflow-start"){var X=Ae("circle",{cx:6,cy:6,r:3.5,...h({fill:y,stroke:v,strokeWidth:1,strokeDasharray:[1e4,1]})});_(u,{element:X,ref:{x:6,y:6},parentGfx:d})}if(c==="messageflow-end"){var se=Ae("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:y,stroke:v,strokeWidth:1,strokeDasharray:[1e4,1]})});_(u,{element:se,ref:{x:8.5,y:5},parentGfx:d})}if(c==="association-start"){var fe=Ae("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:v,strokeWidth:1.5,strokeDasharray:[1e4,1]})});_(u,{element:fe,ref:{x:1,y:10},scale:.5,parentGfx:d})}if(c==="association-end"){var Q=Ae("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:v,strokeWidth:1.5,strokeDasharray:[1e4,1]})});_(u,{element:Q,ref:{x:11,y:10},scale:.5,parentGfx:d})}if(c==="conditional-flow-marker"){var pe=Ae("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:y,stroke:v})});_(u,{element:pe,ref:{x:-1,y:10},scale:.5,parentGfx:d})}if(c==="conditional-default-flow-marker"){var be=Ae("path",{d:"M 6 4 L 10 16",...h({stroke:v,fill:"none"})});_(u,{element:be,ref:{x:0,y:10},scale:.5,parentGfx:d})}}function F(d,u,c,y,v={}){xt(y)&&(v=y,y=0),y=y||0,v=h(v);var C=u/2,X=c/2,se=Ae("circle",{cx:C,cy:X,r:Math.round((u+c)/4-y),...v});return Ie(d,se),se}function R(d,u,c,y,v,C){xt(v)&&(C=v,v=0),v=v||0,C=h(C);var X=Ae("rect",{x:v,y:v,width:u-v*2,height:c-v*2,rx:y,ry:y,...C});return Ie(d,X),X}function S(d,u,c,y){var v=u/2,C=c/2,X=[{x:v,y:0},{x:u,y:C},{x:v,y:c},{x:0,y:C}],se=X.map(function(Q){return Q.x+","+Q.y}).join(" ");y=h(y);var fe=Ae("polygon",{...y,points:se});return Ie(d,fe),fe}function M(d,u,c,y){c=m(c);var v=ri(u,c,y);return Ie(d,v),v}function w(d,u,c){return M(d,u,c,5)}function E(d,u,c){c=m(c);var y=Ae("path",{...c,d:u});return Ie(d,y),y}function D(d,u,c,y){return E(u,c,ne({"data-marker":d},y))}function L(d){return ae[d]}function N(d){return function(u,c,y){return L(d)(u,c,y)}}var x={"bpmn:MessageEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.235,my:.315}}),C=y?J(u,f,c.stroke):de(u,s,c.fill),X=y?de(u,s,c.fill):J(u,f,c.stroke),se=E(d,v,{fill:C,stroke:X,strokeWidth:1});return se},"bpmn:TimerEventDefinition":function(d,u,c={}){var y=c.width||u.width,v=c.height||u.height,C=c.width?1:2,X=F(d,y,v,.2*v,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:C}),se=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:y,containerHeight:v,position:{mx:.5,my:.5}});E(d,se,{stroke:J(u,f,c.stroke),strokeWidth:C});for(var fe=0;fe<12;fe++){var Q=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:y,containerHeight:v,position:{mx:.5,my:.5}}),pe=y/2,be=v/2;E(d,Q,{strokeWidth:1,stroke:J(u,f,c.stroke),transform:"rotate("+fe*30+","+be+","+pe+")"})}return X},"bpmn:EscalationEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),C=y?J(u,f,c.stroke):de(u,s,c.fill);return E(d,v,{fill:C,stroke:J(u,f,c.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(d,u,c={}){var y=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.222}});return E(d,y,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.57,my:.263}}),C=y?J(u,f,c.stroke):de(u,s,c.fill);return E(d,v,{fill:C,stroke:J(u,f,c.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.2,my:.722}}),C=y?J(u,f,c.stroke):de(u,s,c.fill);return E(d,v,{fill:C,stroke:J(u,f,c.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.638,my:-.055}}),C=y?J(u,f,c.stroke):"none",X=E(d,v,{fill:C,stroke:J(u,f,c.stroke),strokeWidth:1});return Vf(X,45),X},"bpmn:CompensateEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.22,my:.5}}),C=y?J(u,f,c.stroke):de(u,s,c.fill);return E(d,v,{fill:C,stroke:J(u,f,c.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),C=y?J(u,f,c.stroke):de(u,s,c.fill);return E(d,v,{strokeWidth:1,fill:C,stroke:J(u,f,c.stroke)})},"bpmn:MultipleEventDefinition":function(d,u,c={},y){var v=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.211,my:.36}}),C=y?J(u,f,c.stroke):de(u,s,c.fill);return E(d,v,{fill:C,stroke:J(u,f,c.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(d,u,c={}){var y=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.458,my:.194}});return E(d,y,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(d,u,c={}){var y=F(d,u.width,u.height,8,{fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke),strokeWidth:4});return y}};function $(d,u,c={},y){var v=Se(d),C=Cf(v),X=y||d;return v.get("eventDefinitions")&&v.get("eventDefinitions").length>1?v.get("parallelMultiple")?x["bpmn:ParallelMultipleEventDefinition"](u,X,c,C):x["bpmn:MultipleEventDefinition"](u,X,c,C):ct(v,"bpmn:MessageEventDefinition")?x["bpmn:MessageEventDefinition"](u,X,c,C):ct(v,"bpmn:TimerEventDefinition")?x["bpmn:TimerEventDefinition"](u,X,c,C):ct(v,"bpmn:ConditionalEventDefinition")?x["bpmn:ConditionalEventDefinition"](u,X,c,C):ct(v,"bpmn:SignalEventDefinition")?x["bpmn:SignalEventDefinition"](u,X,c,C):ct(v,"bpmn:EscalationEventDefinition")?x["bpmn:EscalationEventDefinition"](u,X,c,C):ct(v,"bpmn:LinkEventDefinition")?x["bpmn:LinkEventDefinition"](u,X,c,C):ct(v,"bpmn:ErrorEventDefinition")?x["bpmn:ErrorEventDefinition"](u,X,c,C):ct(v,"bpmn:CancelEventDefinition")?x["bpmn:CancelEventDefinition"](u,X,c,C):ct(v,"bpmn:CompensateEventDefinition")?x["bpmn:CompensateEventDefinition"](u,X,c,C):ct(v,"bpmn:TerminateEventDefinition")?x["bpmn:TerminateEventDefinition"](u,X,c,C):null}var P={ParticipantMultiplicityMarker:function(d,u,c={}){var y=nt(u,c),v=Ke(u,c),C=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:y,containerHeight:v,position:{mx:(y/2-6)/y,my:(v-15)/v}});D("participant-multiplicity",d,C,{strokeWidth:2,fill:de(u,s,c.fill),stroke:J(u,f,c.stroke)})},SubProcessMarker:function(d,u,c={}){var y=R(d,14,14,0,{strokeWidth:1,fill:de(u,s,c.fill),stroke:J(u,f,c.stroke)});sa(y,u.width/2-7.5,u.height-20);var v=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2-7.5)/u.width,my:(u.height-20)/u.height}});D("sub-process",d,v,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke)})},ParallelMarker:function(d,u,c){var y=nt(u,c),v=Ke(u,c),C=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:y,containerHeight:v,position:{mx:(y/2+c.parallel)/y,my:(v-20)/v}});D("parallel",d,C,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke)})},SequentialMarker:function(d,u,c){var y=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.seq)/u.width,my:(u.height-19)/u.height}});D("sequential",d,y,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke)})},CompensationMarker:function(d,u,c){var y=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.compensation)/u.width,my:(u.height-13)/u.height}});D("compensation",d,y,{strokeWidth:1,fill:de(u,s,c.fill),stroke:J(u,f,c.stroke)})},LoopMarker:function(d,u,c){var y=nt(u,c),v=Ke(u,c),C=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:y,containerHeight:v,position:{mx:(y/2+c.loop)/y,my:(v-7)/v}});D("loop",d,C,{strokeWidth:1.5,fill:"none",stroke:J(u,f,c.stroke),strokeMiterlimit:.5})},AdhocMarker:function(d,u,c){var y=nt(u,c),v=Ke(u,c),C=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:y,containerHeight:v,position:{mx:(y/2+c.adhoc)/y,my:(v-15)/v}});D("adhoc",d,C,{strokeWidth:1,fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke)})}};function b(d,u,c,y){P[d](u,c,y)}function W(d,u,c=[],y={}){y={fill:y.fill,stroke:y.stroke,width:nt(u,y),height:Ke(u,y)};var v=Se(u),C=c.includes("SubProcessMarker");C?y={...y,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:y={...y,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},v.get("isForCompensation")&&c.push("CompensationMarker"),re(v,"bpmn:AdHocSubProcess")&&(c.push("AdhocMarker"),C||ne(y,{compensation:y.compensation-18}));var X=v.get("loopCharacteristics"),se=X&&X.get("isSequential");X&&(ne(y,{compensation:y.compensation-18}),c.includes("AdhocMarker")&&ne(y,{seq:-23,loop:-18,parallel:-24}),se===void 0&&c.push("LoopMarker"),se===!1&&c.push("ParallelMarker"),se===!0&&c.push("SequentialMarker")),c.includes("CompensationMarker")&&c.length===1&&ne(y,{compensation:-8}),ee(c,function(fe){b(fe,d,u,y)})}function ue(d,u,c={}){c=ne({size:{width:100}},c);var y=o.createText(u||"",c);return lt(y).add("djs-label"),Ie(d,y),y}function G(d,u,c,y={}){var v=Se(u),C=Sn({x:u.x,y:u.y,width:u.width,height:u.height},y);return ue(d,v.name,{align:c,box:C,padding:7,style:{fill:xn(u,p,f,y.stroke)}})}function Y(d,u,c={}){var y={width:u.width,height:u.height,x:u.width/2+u.x,y:u.height/2+u.y};return ue(d,Wn(u),{box:y,style:ne({},o.getExternalStyle(),{fill:xn(u,p,f,c.stroke)})})}function T(d,u,c,y={}){var v=$o(c),C=ue(d,u,{box:{height:30,width:v?Ke(c,y):nt(c,y)},align:"center-middle",style:{fill:xn(c,p,f,y.stroke)}});if(v){var X=-1*Ke(c,y);ai(C,0,-X,270)}}function j(d,u,c={}){var{width:y,height:v}=Sn(u,c);return R(d,y,v,Jn,{...c,fill:de(u,s,c.fill),fillOpacity:on,stroke:J(u,f,c.stroke)})}function O(d,u,c={}){var y=Se(u),v=de(u,s,c.fill),C=J(u,f,c.stroke);return(y.get("associationDirection")==="One"||y.get("associationDirection")==="Both")&&(c.markerEnd=B(d,"association-end",v,C)),y.get("associationDirection")==="Both"&&(c.markerStart=B(d,"association-start",v,C)),c=ye(c,["markerStart","markerEnd"]),w(d,u.waypoints,{...c,stroke:C,strokeDasharray:"0, 5"})}function q(d,u,c={}){var y=de(u,s,c.fill),v=J(u,f,c.stroke),C=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}}),X=E(d,C,{fill:y,fillOpacity:on,stroke:v}),se=Se(u);if(kf(se)){var fe=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.33,my:(u.height-18)/u.height}});E(d,fe,{strokeWidth:2,fill:y,stroke:v})}return X}function U(d,u,c={}){return F(d,u.width,u.height,{fillOpacity:on,...c,fill:de(u,s,c.fill),stroke:J(u,f,c.stroke)})}function K(d,u,c={}){return S(d,u.width,u.height,{fill:de(u,s,c.fill),fillOpacity:on,stroke:J(u,f,c.stroke)})}function k(d,u,c={}){var y=R(d,nt(u,c),Ke(u,c),0,{fill:de(u,s,c.fill),fillOpacity:c.fillOpacity||on,stroke:J(u,f,c.stroke),strokeWidth:1.5}),v=Se(u);if(re(v,"bpmn:Lane")){var C=v.get("name");T(d,C,u,c)}return y}function A(d,u,c={}){var y=j(d,u,c),v=Ut(u);if(Zu(u)&&(Re(y,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!v)){var C=Se(u).flowElements||[],X=C.filter(se=>re(se,"bpmn:StartEvent"));X.length===1&&I(X[0],d,c,u)}return G(d,u,v?"center-top":"center-middle",c),v?W(d,u,void 0,c):W(d,u,["SubProcessMarker"],c),y}function I(d,u,c,y){var v=22,C={fill:de(y,s,c.fill),stroke:J(y,f,c.stroke),width:v,height:v},X=Se(d).isInterrupting,se=X?0:3,fe=X?1:1.2,Q=20,pe=(v-Q)/2,be="translate("+pe+","+pe+")";F(u,Q,Q,{fill:C.fill,stroke:C.stroke,strokeWidth:fe,strokeDasharray:se,transform:be}),$(d,u,C,y)}function ie(d,u,c={}){var y=j(d,u,c);return G(d,u,"center-middle",c),W(d,u,void 0,c),y}var ae=this.handlers={"bpmn:AdHocSubProcess":function(d,u,c={}){return Ut(u)?c=ye(c,["fill","stroke","width","height"]):c=ye(c,["fill","stroke"]),A(d,u,c)},"bpmn:Association":function(d,u,c={}){return c=ye(c,["fill","stroke"]),O(d,u,c)},"bpmn:BoundaryEvent":function(d,u,c={}){var{renderIcon:y=!0}=c;c=ye(c,["fill","stroke"]);var v=Se(u),C=v.get("cancelActivity");c={strokeWidth:1.5,fill:de(u,s,c.fill),fillOpacity:Kf,stroke:J(u,f,c.stroke)},C||(c.strokeDasharray="6");var X=U(d,u,c);return F(d,u.width,u.height,Xn,{...c,fill:"none"}),y&&$(u,d,c),X},"bpmn:BusinessRuleTask":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=ie(d,u,c),v=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),C=E(d,v);Re(C,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1});var X=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),se=E(d,X);return Re(se,{fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke),strokeWidth:1}),y},"bpmn:CallActivity":function(d,u,c={}){return c=ye(c,["fill","stroke"]),A(d,u,{strokeWidth:5,...c})},"bpmn:ComplexGateway":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=K(d,u,c),v=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.26}});return E(d,v,{fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke),strokeWidth:1}),y},"bpmn:DataInput":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=r.getRawPath("DATA_ARROW"),v=q(d,u,c);return E(d,y,{fill:"none",stroke:J(u,f,c.stroke),strokeWidth:1}),v},"bpmn:DataInputAssociation":function(d,u,c={}){return c=ye(c,["fill","stroke"]),O(d,u,{...c,markerEnd:B(d,"association-end",de(u,s,c.fill),J(u,f,c.stroke))})},"bpmn:DataObject":function(d,u,c={}){return c=ye(c,["fill","stroke"]),q(d,u,c)},"bpmn:DataObjectReference":N("bpmn:DataObject"),"bpmn:DataOutput":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=r.getRawPath("DATA_ARROW"),v=q(d,u,c);return E(d,y,{strokeWidth:1,fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke)}),v},"bpmn:DataOutputAssociation":function(d,u,c={}){return c=ye(c,["fill","stroke"]),O(d,u,{...c,markerEnd:B(d,"association-end",de(u,s,c.fill),J(u,f,c.stroke))})},"bpmn:DataStoreReference":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:0,my:.133}});return E(d,y,{fill:de(u,s,c.fill),fillOpacity:on,stroke:J(u,f,c.stroke),strokeWidth:2})},"bpmn:EndEvent":function(d,u,c={}){var{renderIcon:y=!0}=c;c=ye(c,["fill","stroke"]);var v=U(d,u,{...c,strokeWidth:4});return y&&$(u,d,c),v},"bpmn:EventBasedGateway":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=Se(u),v=K(d,u,c);F(d,u.width,u.height,u.height*.2,{fill:de(u,"none",c.fill),stroke:J(u,f,c.stroke),strokeWidth:1});var C=y.get("eventGatewayType"),X=!!y.get("instantiate");function se(){var Q=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:u.width,containerHeight:u.height,position:{mx:.36,my:.44}});E(d,Q,{fill:"none",stroke:J(u,f,c.stroke),strokeWidth:2})}if(C==="Parallel"){var fe=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}});E(d,fe,{fill:"none",stroke:J(u,f,c.stroke),strokeWidth:1})}else C==="Exclusive"&&(X||F(d,u.width,u.height,u.height*.26,{fill:"none",stroke:J(u,f,c.stroke),strokeWidth:1}),se());return v},"bpmn:ExclusiveGateway":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=K(d,u,c),v=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.32,my:.3}}),C=jt(u);return C.get("isMarkerVisible")&&E(d,v,{fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke),strokeWidth:1}),y},"bpmn:Gateway":function(d,u,c={}){return c=ye(c,["fill","stroke"]),K(d,u,c)},"bpmn:Group":function(d,u,c={}){return c=ye(c,["fill","stroke","width","height"]),R(d,u.width,u.height,Jn,{stroke:J(u,f,c.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:nt(u,c),height:Ke(u,c)})},"bpmn:InclusiveGateway":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=K(d,u,c);return F(d,u.width,u.height,u.height*.24,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:2.5}),y},"bpmn:IntermediateEvent":function(d,u,c={}){var{renderIcon:y=!0}=c;c=ye(c,["fill","stroke"]);var v=U(d,u,{...c,strokeWidth:1.5});return F(d,u.width,u.height,Xn,{fill:"none",stroke:J(u,f,c.stroke),strokeWidth:1.5}),y&&$(u,d,c),v},"bpmn:IntermediateCatchEvent":N("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":N("bpmn:IntermediateEvent"),"bpmn:Lane":function(d,u,c={}){return c=ye(c,["fill","stroke","width","height"]),k(d,u,{...c,fillOpacity:Gf})},"bpmn:ManualTask":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=ie(d,u,c),v=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return E(d,v,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:.5}),y},"bpmn:MessageFlow":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=Se(u),v=jt(u),C=de(u,s,c.fill),X=J(u,f,c.stroke),se=w(d,u.waypoints,{markerEnd:B(d,"messageflow-end",C,X),markerStart:B(d,"messageflow-start",C,X),stroke:X,strokeDasharray:"10, 11",strokeWidth:1.5});if(y.get("messageRef")){var fe=se.getPointAtLength(se.getTotalLength()/2),Q=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:fe.x,y:fe.y}}),pe={strokeWidth:1};v.get("messageVisibleKind")==="initiating"?(pe.fill=C,pe.stroke=X):(pe.fill=X,pe.stroke=C);var be=E(d,Q,pe),Ce=y.get("messageRef"),Pe=Ce.get("name"),we=ue(d,Pe,{align:"center-top",fitBox:!0,style:{fill:X}}),Ee=be.getBBox(),ze=we.getBBox(),z=fe.x-ze.width/2,V=fe.y+Ee.height/2+Wf;ai(we,z,V,0)}return se},"bpmn:ParallelGateway":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=K(d,u,c),v=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.2}});return E(d,v,{fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke),strokeWidth:1}),y},"bpmn:Participant":function(d,u,c={}){c=ye(c,["fill","stroke","width","height"]);var y=k(d,u,c),v=Ut(u),C=$o(u),X=Se(u),se=X.get("name");if(v){var fe=C?[{x:30,y:0},{x:30,y:Ke(u,c)}]:[{x:0,y:30},{x:nt(u,c),y:30}];M(d,fe,{stroke:J(u,f,c.stroke),strokeWidth:qf}),T(d,se,u,c)}else{var Q=Sn(u,c);C||(Q.height=nt(u,c),Q.width=Ke(u,c));var pe=ue(d,se,{box:Q,align:"center-middle",style:{fill:xn(u,p,f,c.stroke)}});if(!C){var be=-1*Ke(u,c);ai(pe,0,-be,270)}}return X.get("participantMultiplicity")&&b("ParticipantMultiplicityMarker",d,u,c),y},"bpmn:ReceiveTask":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=Se(u),v=ie(d,u,c),C;return y.get("instantiate")?(F(d,28,28,20*.22,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1}),C=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):C=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),E(d,C,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1}),v},"bpmn:ScriptTask":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=ie(d,u,c),v=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return E(d,v,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1}),y},"bpmn:SendTask":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=ie(d,u,c),v=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return E(d,v,{fill:J(u,f,c.stroke),stroke:de(u,s,c.fill),strokeWidth:1}),y},"bpmn:SequenceFlow":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=de(u,s,c.fill),v=J(u,f,c.stroke),C=w(d,u.waypoints,{markerEnd:B(d,"sequenceflow-end",y,v),stroke:v}),X=Se(u),{source:se}=u;if(se){var fe=Se(se);X.get("conditionExpression")&&re(fe,"bpmn:Activity")&&Re(C,{markerStart:B(d,"conditional-flow-marker",y,v)}),fe.get("default")&&(re(fe,"bpmn:Gateway")||re(fe,"bpmn:Activity"))&&fe.get("default")===X&&Re(C,{markerStart:B(d,"conditional-default-flow-marker",y,v)})}return C},"bpmn:ServiceTask":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=ie(d,u,c);F(d,10,10,{fill:de(u,s,c.fill),stroke:"none",transform:"translate(6, 6)"});var v=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});E(d,v,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1}),F(d,10,10,{fill:de(u,s,c.fill),stroke:"none",transform:"translate(11, 10)"});var C=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return E(d,C,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:1}),y},"bpmn:StartEvent":function(d,u,c={}){var{renderIcon:y=!0}=c;c=ye(c,["fill","stroke"]);var v=Se(u);v.get("isInterrupting")||(c={...c,strokeDasharray:"6"});var C=U(d,u,c);return y&&$(u,d,c),C},"bpmn:SubProcess":function(d,u,c={}){return Ut(u)?c=ye(c,["fill","stroke","width","height"]):c=ye(c,["fill","stroke"]),A(d,u,c)},"bpmn:Task":function(d,u,c={}){return c=ye(c,["fill","stroke"]),ie(d,u,c)},"bpmn:TextAnnotation":function(d,u,c={}){c=ye(c,["fill","stroke"]);var{width:y,height:v}=Sn(u,c),C=R(d,y,v,0,0,{fill:"none",stroke:"none"}),X=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:y,containerHeight:v,position:{mx:0,my:0}});E(d,X,{stroke:J(u,f,c.stroke)});var se=Se(u),fe=se.get("text")||"";return ue(d,fe,{align:"left-top",box:Sn(u,c),padding:Ho,style:{fill:xn(u,p,f,c.stroke)}}),C},"bpmn:Transaction":function(d,u,c={}){Ut(u)?c=ye(c,["fill","stroke","width","height"]):c=ye(c,["fill","stroke"]);var y=A(d,u,{strokeWidth:1.5,...c}),v=n.style(["no-fill","no-events"],{stroke:J(u,f,c.stroke),strokeWidth:1.5}),C=Ut(u);return C||(c={}),R(d,nt(u,c),Ke(u,c),Jn-Xn,Xn,v),y},"bpmn:UserTask":function(d,u,c={}){c=ye(c,["fill","stroke"]);var y=ie(d,u,c),v=15,C=12,X=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:v,y:C}});E(d,X,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:.5});var se=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:v,y:C}});E(d,se,{fill:de(u,s,c.fill),stroke:J(u,f,c.stroke),strokeWidth:.5});var fe=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:v,y:C}});return E(d,fe,{fill:J(u,f,c.stroke),stroke:J(u,f,c.stroke),strokeWidth:.5}),y},label:function(d,u,c={}){return Y(d,u,c)}};this._drawPath=E,this._renderer=L}at(Wt,yt),Wt.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Wt.prototype.canRender=function(e){return re(e,"bpmn:BaseElement")},Wt.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Wt.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Wt.prototype.getShapePath=function(e){return ef(e)?ea(e,Yf):re(e,"bpmn:Event")?Rf(e):re(e,"bpmn:Activity")?ea(e,Jn):re(e,"bpmn:Gateway")?Tf(e):Pf(e)};function ye(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var Xf=0,Jf={width:150,height:50};function Zf(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function Qf(e){return xt(e)?ne({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var li=null;function ep(){return li||(li=document.createElement("canvas").getContext("2d")),li}function tp(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(ca(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function ca(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function np(e,t){var n=ep();if(!n)return{width:0,height:0};n.font=tp(t),"letterSpacing"in n&&(n.letterSpacing=ca(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function rp(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=np(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return ip(e,i,r,o);i=ap(i,o.width,t)}}function ip(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var ua="";function op(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===ua)&&i.pop();break}var a=i[i.length-1];return a&&a===ua&&(i[i.length-1]="-"),i.join("")}function ap(e,t,n){var r=Math.max(e.length*(n/t),1),i=op(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function Zn(e){this._config=ne({},{size:Jf,padding:Xf,style:{},align:"center-top"},e||{})}Zn.prototype.createText=function(e,t){return this.layoutText(e,t).element},Zn.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},Zn.prototype.layoutText=function(e,t){for(var n=ne({},this._config.size,t.box),r=ne({},this._config.style,t.style),i=Zf(t.align||this._config.align),o=Qf(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=sp(r),f=e.split(/\u00AD?\r?\n/),p=[],h=n.width-o.left-o.right;f.length;)p.push(rp(f,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var m=rn(p,function(R,S,M){return R+(s||S.height)},0)+o.top+o.bottom,_=rn(p,function(R,S,M){return S.width>R?S.width:R},0),B=o.top;i.vertical==="middle"&&(B+=(n.height-m)/2),B-=(s||p[0].height)/4;var H=Ae("text");Re(H,r),ee(p,function(R){var S;switch(B+=s||R.height,i.horizontal){case"left":S=o.left;break;case"right":S=(a?_:h)-o.right-R.width;break;default:S=Math.max(((a?_:h)-R.width)/2+o.left,0)}var M=Ae("tspan");Re(M,{x:S,y:B}),M.textContent=R.text,Ie(H,M)});var F={width:_,height:m};return{dimensions:F,element:H}};function sp(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var lp=12,cp=1.2,up=40;function fa(e){var t=ne({fontFamily:"Arial, sans-serif",fontSize:lp,fontWeight:"normal",lineHeight:cp},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=ne({},t,{fontSize:n},e&&e.externalStyle||{}),i=new Zn({style:t});this.getExternalLabelBounds=function(a,s){var f={width:Math.max(a.width,wn.width),height:30},p=o(s,f,{style:r});return{x:Math.round(a.x+a.width/2-p.width/2),y:a.y,width:Math.ceil(p.width),height:Math.ceil(p.height)}},this.getTextAnnotationBounds=function(a,s){var f=o(s,a,{style:t,align:"left-top",padding:Ho});return{x:a.x,y:a.y,width:a.width,height:Math.max(up,Math.round(f.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,f){return i.getDimensions(a,ne({box:s},f))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}fa.$inject=["config.textRenderer"];function fp(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,f=n.containerWidth/r.width*n.xScaleFactor,p=0;p<r.heightElements.length;p++)a["y"+p]=r.heightElements[p]*s;for(var h=0;h<r.widthElements.length;h++)a["x"+h]=r.widthElements[h]*f}var m=mp(r.d,{mx:i,my:o,e:a});return m}}var pp=/\{([^{}]+)\}/g,dp=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function hp(e,t,n){var r=n;return t.replace(dp,function(i,o,a,s,f){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&f&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function mp(e,t){return String(e).replace(pp,function(n,r){return hp(n,r,t)})}const yp={__init__:["bpmnRenderer"],bpmnRenderer:["type",Wt],textRenderer:["type",fa],pathMap:["type",fp]};function gp(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const pa={translate:["value",gp]};function vp(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function ci(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function wp(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function bp(e){return vp({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Ep(e){for(var t=e.waypoints,n=t.reduce(function(p,h,m){var _=t[m-1];if(_){var B=p[p.length-1],H=B&&B.endLength||0,F=_p(_,h);p.push({start:_,end:h,startLength:H,endLength:H+F,length:F})}return p},[]),r=n.reduce(function(p,h){return p+h.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,f={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return f}function ui(e){return Qu(e)?Ep(e):bp(e)}function _p(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Fe(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function Qn(e,t,n){return ne({id:e.id,type:e.$type,businessObject:e,di:t},n)}function xp(e,t,n){var r=e.waypoint;return!r||r.length<2?[ui(t),ui(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function da(e,t,n){return new Error(`element ${Fe(t)} referenced by ${Fe(e)}#${n} not yet drawn`)}function wt(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}wt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],wt.prototype.add=function(e,t,n){var r,i,o;if(re(t,"bpmndi:BPMNPlane")){var a=re(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(Qn(e,t,a)),this._canvas.addRootElement(r)}else if(re(t,"bpmndi:BPMNShape")){var s=!Ut(e,t),f=Ap(e);i=n&&(n.hidden||n.collapsed);var p=t.bounds;r=this._elementFactory.createShape(Qn(e,t,{collapsed:s,hidden:i,x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height),isFrame:f})),re(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),re(e,"bpmn:Lane")&&(o=0),re(e,"bpmn:DataStoreReference")&&(Sp(n,ui(p))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(re(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),m=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(Qn(e,t,{hidden:i,source:h,target:m,waypoints:xp(t,h,m)})),re(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Fe(t)} for element ${Fe(e)}`);return tf(e)&&Wn(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},wt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Fe(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw da(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},wt.prototype.addLabel=function(e,t,n){var r,i,o;return r=af(t,n),i=Wn(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(Qn(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Wn(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)},wt.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?da(e,r,t+"Ref"):new Error(`${Fe(e)}#${t} Ref not specified`)},wt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},wt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},wt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function Sp(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function Ap(e){return re(e,"bpmn:Group")}const Cp={__depends__:[yp,{__depends__:[pa],bpmnImporter:["type",wt]}]};function ha(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}ha.prototype.next=function(){return this._prefix+ ++this._counter};var kp=new ha("ov"),Rp=500;function Me(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=kp,this._overlayDefaults=ne({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=Tp(n.getContainer()),this._init()}Me.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Me.prototype.get=function(e){if(st(e)&&(e={id:e}),st(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?nn(t.overlays,Fo({type:e.type})):t.overlays.slice():[]}else return e.type?nn(this._overlays,Fo({type:e.type})):e.id?this._overlays[e.id]:null},Me.prototype.add=function(e,t,n){if(xt(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=ne({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},Me.prototype.remove=function(e){var t=this.get(e)||[];tt(t)||(t=[t]);var n=this;ee(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(Gn(r.html),Gn(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})},Me.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},Me.prototype.show=function(){er(this._overlayRoot)},Me.prototype.hide=function(){er(this._overlayRoot,!1)},Me.prototype.clear=function(){this._overlays={},this._overlayContainers=[],na(this._overlayRoot)},Me.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=bn(t);r=o.x,i=o.y}ma(n,r,i),ta(e.html,"data-container-id",t.id)},Me.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=bn(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=bn(r).height:s=r.height,o=t.bottom*-1+s}ma(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Me.prototype._createOverlayContainer=function(e){var t=ut('<div class="djs-overlays" />');Xe(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Me.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";ya(this._overlayRoot,n)},Me.prototype._getOverlayContainer=function(e,t){var n=ot(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},Me.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),st(r)&&(r=ut(r)),o=this._getOverlayContainer(n),i=ut('<div class="djs-overlay" data-overlay-id="'+t+'">'),Xe(i,{position:"absolute"}),i.appendChild(r),e.type&&Ht(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();er(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Me.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),f=!0;(r!==s||n&&(en(i)&&i>t.scale||en(o)&&o<t.scale))&&(f=!1),er(a,f),this._updateOverlayScale(e,t)},Me.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),en(r)&&t.scale<r&&(a=(1/t.scale||1)*r),en(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),en(a)&&(s="scale("+a+","+a+")"),ya(o,s)},Me.prototype._updateOverlaysVisibilty=function(e){var t=this;ee(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Me.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,o=t.get({element:i});ee(o,function(f){t.remove(f.id)});var a=t._getOverlayContainer(i);if(a){Gn(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",Rp,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(ee(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&Ht(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function Tp(e){var t=ut('<div class="djs-overlay-container" />');return Xe(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function ma(e,t,n){Xe(e,{left:t+"px",top:n+"px"})}function er(e,t){e.style.display=t===!1?"none":""}function ya(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const ga={__init__:["overlays"],overlays:["type",Me]};function va(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(Uo(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}va.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const Pp={__init__:["changeSupport"],changeSupport:["type",va]};var Np=1e3;function He(e){this._eventBus=e}He.$inject=["eventBus"];function Op(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}He.prototype.on=function(e,t,n,r,i,o){if(($t(t)||St(t))&&(o=i,i=r,r=n,n=t,t=null),$t(n)&&(o=i,i=r,r=n,n=Np),xt(i)&&(o=i,i=!1),!$t(r))throw new Error("handlerFn must be a function");tt(e)||(e=[e]);var a=this._eventBus;ee(e,function(s){var f=["commandStack",s,t].filter(function(p){return p}).join(".");a.on(f,n,i?Op(r,o):r,o)})},He.prototype.canExecute=bt("canExecute"),He.prototype.preExecute=bt("preExecute"),He.prototype.preExecuted=bt("preExecuted"),He.prototype.execute=bt("execute"),He.prototype.executed=bt("executed"),He.prototype.postExecute=bt("postExecute"),He.prototype.postExecuted=bt("postExecuted"),He.prototype.revert=bt("revert"),He.prototype.reverted=bt("reverted");function bt(e){return function(n,r,i,o,a){($t(n)||St(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function fi(e,t){t.invoke(He,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}at(fi,He),fi.$inject=["canvas","injector"];const Dp={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",fi]};var Mp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Bp(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return Mp[t]})}var Ip="_plane";function pi(e){var t=e.id;return re(e,"bpmn:SubProcess")?Lp(t):t}function Lp(e){return e+Ip}var Fp="bjs-breadcrumbs-shown";function wa(e,t,n){var r=ut('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Ht(i);i.appendChild(r);var a=[];e.on("element.changed",function(f){var p=f.element,h=Se(p),m=ot(a,function(_){return _===h});m&&s()});function s(f){f&&(a=Vp(f));var p=a.flatMap(function(m){var _=n.findRoot(pi(m))||n.findRoot(m.id);if(!_&&re(m,"bpmn:Process")){var B=t.find(function(R){var S=Se(R);return S&&S.get("processRef")===m});_=B&&n.findRoot(B.id)}if(!_)return[];var H=Bp(m.name||m.id),F=ut('<li><span class="bjs-crumb"><a title="'+H+'">'+H+"</a></span></li>");return F.addEventListener("click",function(){n.setRootElement(_)}),F});r.innerHTML="";var h=p.length>1;o.toggle(Fp,h),p.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(f){s(f.element)})}wa.$inject=["eventBus","elementRegistry","canvas"];function Vp(e){for(var t=Se(e),n=[],r=t;r;r=r.$parent)(re(r,"bpmn:SubProcess")||re(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function ba(e,t){var n=null,r=new $p;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(!re(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var f=(a.x-s.x)*a.scale,p=(a.y-s.y)*a.scale;(f!==0||p!==0)&&t.scroll({dx:f,dy:p}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}ba.$inject=["eventBus","canvas"];function $p(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var Ea={x:180,y:160};function qt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}qt.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}},qt.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;re(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),Up(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var f=t._processToDiagramMap[s.id];t._moveToDiPlane(a,f.plane)}}),i},qt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=jp(e),r={x:n.x-Ea.x,y:n.y-Ea.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})},qt.prototype._moveToDiPlane=function(e,t){var n=_a(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},qt.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},qt.$inject=["eventBus","moddle"];function _a(e){return re(e,"bpmndi:BPMNDiagram")?e:_a(e.$parent)}function jp(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=ci(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),wp(t)}function Up(e,t){var n=e.$parent;return!(!re(n,"bpmn:SubProcess")||n===t.bpmnElement||Ju(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var tr=250,zp='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',Hp="bjs-drilldown-empty";function Tt(e,t,n,r,i){He.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",tr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",tr,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],tr,function(a){var s=a.oldParent,f=a.newParent||a.parent,p=a.shape;o._canDrillDown(p)&&o._addOverlay(p),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(p)},!0),this.reverted(["shape.create","shape.move","shape.delete"],tr,function(a){var s=a.oldParent,f=a.newParent||a.parent,p=a.shape;o._canDrillDown(p)&&o._addOverlay(p),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(p)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}at(Tt,He),Tt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Tt.prototype._canDrillDown=function(e){var t=this._canvas;return re(e,"bpmn:SubProcess")&&t.findRoot(pi(e))},Tt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=Se(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Ht(r.html).toggle(Hp,!i)}},Tt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=Se(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=ut('<button type="button" class="bjs-drilldown">'+zp+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot(pi(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)},Tt.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},Tt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const Wp={__depends__:[ga,Pp,Dp],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",wa],drilldownCentering:["type",ba],drilldownOverlayBehavior:["type",Tt],subprocessCompatibility:["type",qt]};function xa(e){return e.originalEvent||e.srcEvent}function Sa(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function qp(){return/mac/i.test(navigator.platform)}function Aa(e,t){return(xa(e)||e).button===t}function nr(e){return Aa(e,0)}function Yp(e){return Aa(e,1)}function Kp(e){var t=xa(e)||e;return nr(e)&&t.shiftKey}function Gp(e){return!0}function rr(e){return nr(e)||Yp(e)}var Ca=500;function ka(e,t,n){var r=this;function i(x,$,P){if(!s(x,$)){var b,W,ue;P?W=t.getGraphics(P):(b=$.delegateTarget||$.target,b&&(W=b,P=t.get(W))),!(!W||!P)&&(ue=e.fire(x,{element:P,gfx:W,originalEvent:$}),ue===!1&&($.stopPropagation(),$.preventDefault()))}}var o={};function a(x){return o[x]}function s(x,$){var P=p[x]||nr;return!P($)}var f={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},p={"element.contextmenu":Gp,"element.mousedown":rr,"element.mouseup":rr,"element.click":rr,"element.dblclick":rr};function h(x,$,P){var b=f[x];if(!b)throw new Error("unmapped DOM event name <"+x+">");return i(b,$,P)}var m="svg, .djs-element";function _(x,$,P,b){var W=o[P]=function(ue){i(P,ue)};b&&(p[P]=b),W.$delegate=oi.bind(x,m,$,W)}function B(x,$,P){var b=a(P);b&&oi.unbind(x,$,b.$delegate)}function H(x){ee(f,function($,P){_(x,P,$)})}function F(x){ee(f,function($,P){B(x,P,$)})}e.on("canvas.destroy",function(x){F(x.svg)}),e.on("canvas.init",function(x){H(x.svg)}),e.on(["shape.added","connection.added"],function(x){var $=x.element,P=x.gfx;e.fire("interactionEvents.createHit",{element:$,gfx:P})}),e.on(["shape.changed","connection.changed"],Ca,function(x){var $=x.element,P=x.gfx;e.fire("interactionEvents.updateHit",{element:$,gfx:P})}),e.on("interactionEvents.createHit",Ca,function(x){var $=x.element,P=x.gfx;r.createDefaultHit($,P)}),e.on("interactionEvents.updateHit",function(x){var $=x.element,P=x.gfx;r.updateDefaultHit($,P)});var R=D("djs-hit djs-hit-stroke"),S=D("djs-hit djs-hit-click-stroke"),M=D("djs-hit djs-hit-all"),w=D("djs-hit djs-hit-no-move"),E={all:M,"click-stroke":S,stroke:R,"no-move":w};function D(x,$){return $=ne({stroke:"white",strokeWidth:15},$||{}),n.cls(x,["no-fill","no-border"],$)}function L(x,$){var P=E[$];if(!P)throw new Error("invalid hit type <"+$+">");return Re(x,P),x}function N(x,$){Ie(x,$)}this.removeHits=function(x){var $=Ff(".djs-hit",x);ee($,qn)},this.createDefaultHit=function(x,$){var P=x.waypoints,b=x.isFrame,W;return P?this.createWaypointsHit($,P):(W=b?"stroke":"all",this.createBoxHit($,W,{width:x.width,height:x.height}))},this.createWaypointsHit=function(x,$){var P=ri($);return L(P,"stroke"),N(x,P),P},this.createBoxHit=function(x,$,P){P=ne({x:0,y:0},P);var b=Ae("rect");return L(b,$),Re(b,P),N(x,b),b},this.updateDefaultHit=function(x,$){var P=gt(".djs-hit",$);if(P)return x.waypoints?Qo(P,x.waypoints):Re(P,{width:x.width,height:x.height}),P},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=_,this.unregisterEvent=B}ka.$inject=["eventBus","elementRegistry","styles"];const Xp={__init__:["interactionEvents"],interactionEvents:["type",ka]};function an(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=new Set;var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}an.$inject=["eventBus","canvas"],an.prototype.deselect=function(e){if(this._selectedElements.has(e)){var t=this.get();this._selectedElements.delete(e),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()})}},an.prototype.get=function(){return Array.from(this._selectedElements)},an.prototype.isSelected=function(e){return this._selectedElements.has(e)},an.prototype.select=function(e,t){var n=this.get();tt(e)||(e=e?[e]:[]);var r=this._canvas,i=r.getRootElement();e=e.filter(function(o){var a=r.findRoot(o);return i===a}),t?ee(e,o=>{this._selectedElements.add(o)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var Ra="hover",Ta="selected";function Pa(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,Ra)}),t.on("element.out",function(i){r(i.element,Ra)}),t.on("selection.changed",function(i){function o(p){r(p,Ta)}function a(p){n(p,Ta)}var s=new Set(i.oldSelection),f=new Set(i.newSelection);for(let p of s)f.has(p)||o(p);for(let p of f)s.has(p)||a(p)})}Pa.$inject=["canvas","eventBus"];function Na(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,f=o.hints||{},p=f.autoSelect;if(a){if(p===!1)return;tt(p)?t.select(p):t.select(s.filter(Jp))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=ot(o,function(f){return a.id===f.id});s||t.select(a)}),e.on("element.click",function(i){if(nr(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,f=Kp(i);if(a&&s)return f?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,f)}})}Na.$inject=["eventBus","selection","canvas","elementRegistry"];function Jp(e){return!e.hidden}const Zp={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Xp],selection:["type",an],selectionVisuals:["type",Pa],selectionBehavior:["type",Na]},Qp=/^class[ {]/;function ed(e){return Qp.test(e.toString())}function di(e){return Array.isArray(e)}function hi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ir(...e){e.length===1&&di(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const td=/constructor\s*[^(]*\(\s*([^)]*)\)/m,nd=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,rd=/\/\*([^*]*)\*\//m;function id(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(ed(e)?td:nd);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(rd);return(i&&i[1]||r).trim()})||[]}function Oa(e,t){const n=t||{get:function(w,E){if(r.push(w),E===!1)return null;throw s(`No provider for "${w}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(w){const E=r.join(" -> ");return r.length=0,new Error(E?`${w} (Resolving: ${E})`:w)};function f(w,E){if(!i[w]&&w.includes(".")){const D=w.split(".");let L=f(D.shift());for(;D.length;)L=L[D.shift()];return L}if(hi(o,w))return o[w];if(hi(i,w)){if(r.indexOf(w)!==-1)throw r.push(w),s("Cannot resolve circular dependency!");return r.push(w),o[w]=i[w][0](i[w][1]),r.pop(),o[w]}return n.get(w,E)}function p(w,E){if(typeof E>"u"&&(E={}),typeof w!="function")if(di(w))w=ir(w.slice());else throw s(`Cannot invoke "${w}". Expected a function!`);const L=(w.$inject||id(w)).map(N=>hi(E,N)?E[N]:f(N));return{fn:w,dependencies:L}}function h(w){const{fn:E,dependencies:D}=p(w),L=Function.prototype.bind.call(E,null,...D);return new L}function m(w,E,D){const{fn:L,dependencies:N}=p(w,D);return L.apply(E,N)}function _(w){return ir(E=>w.get(E))}function B(w,E){if(E&&E.length){const D=Object.create(null),L=Object.create(null),N=[],x=[],$=[];let P,b,W,ue;for(let G in i)P=i[G],E.indexOf(G)!==-1&&(P[2]==="private"?(b=N.indexOf(P[3]),b===-1?(W=P[3].createChild([],E),ue=_(W),N.push(P[3]),x.push(W),$.push(ue),D[G]=[ue,G,"private",W]):D[G]=[$[b],G,"private",x[b]]):D[G]=[P[2],P[1]],L[G]=!0),(P[2]==="factory"||P[2]==="type")&&P[1].$scope&&E.forEach(Y=>{P[1].$scope.indexOf(Y)!==-1&&(D[G]=[P[2],P[1]],L[Y]=!0)});E.forEach(G=>{if(!L[G])throw new Error('No provider for "'+G+'". Cannot use provider from the parent!')}),w.unshift(D)}return new Oa(w,a)}const H={factory:m,type:h,value:function(w){return w}};function F(w,E){const D=w.__init__||[];return function(){D.forEach(L=>{typeof L=="string"?E.get(L):E.invoke(L)})}}function R(w){const E=w.__exports__;if(E){const D=w.__modules__,L=Object.keys(w).reduce((b,W)=>(W!=="__exports__"&&W!=="__modules__"&&W!=="__init__"&&W!=="__depends__"&&(b[W]=w[W]),b),Object.create(null)),N=(D||[]).concat(L),x=B(N),$=ir(function(b){return x.get(b)});E.forEach(function(b){i[b]=[$,b,"private",x]});const P=(w.__init__||[]).slice();return P.unshift(function(){x.init()}),w=Object.assign({},w,{__init__:P}),F(w,x)}return Object.keys(w).forEach(function(D){if(D==="__init__"||D==="__depends__")return;const L=w[D];if(L[2]==="private"){i[D]=L;return}const N=L[0],x=L[1];i[D]=[H[N],od(N,x),N]}),F(w,a)}function S(w,E){return w.indexOf(E)!==-1||(w=(E.__depends__||[]).reduce(S,w),w.indexOf(E)!==-1)?w:w.concat(E)}function M(w){const E=w.reduce(S,[]).map(R);let D=!1;return function(){D||(D=!0,E.forEach(L=>L()))}}this.get=f,this.invoke=m,this.instantiate=h,this.createChild=B,this.init=M(e)}function od(e,t){return e!=="value"&&di(t)&&(t=ir(t.slice())),t}var ad=1;function Pt(e,t){yt.call(this,e,ad),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})}at(Pt,yt),Pt.prototype.canRender=function(){return!0},Pt.prototype.drawShape=function(t,n,r){var i=Ae("rect");return Re(i,{x:0,y:0,width:n.width||0,height:n.height||0}),zo(n)?Re(i,ne({},this.FRAME_STYLE,r||{})):Re(i,ne({},this.SHAPE_STYLE,r||{})),Ie(t,i),i},Pt.prototype.drawConnection=function(t,n,r){var i=ri(n.waypoints,ne({},this.CONNECTION_STYLE,r||{}));return Ie(t,i),i},Pt.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,o=t.height,a=[["M",n,r],["l",i,0],["l",0,o],["l",-i,0],["z"]];return zt(a)},Pt.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,o=[];for(r=0;i=n[r];r++)i=i.original||i,o.push([r===0?"M":"L",i.x,i.y]);return zt(o)},Pt.$inject=["eventBus","styles"];function sd(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var o=this.style(r,i);return ne(o,{class:n})},this.style=function(n,r){!tt(n)&&!r&&(r=n,n=[]);var i=rn(n,function(o,a){return ne(o,e[a]||{})},{});return r?ne(i,r):i},this.computeStyle=function(n,r,i){return tt(r)||(i=r,r=[]),t.style(r||[],ne({},i,n||{}))}}const ld={__init__:["defaultRenderer"],defaultRenderer:["type",Pt],styles:["type",sd]};function cd(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function ud(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function or(e,t){return Math.round(e*t)/t}function Da(e){return St(e)?e+"px":e}function fd(e){for(;e.parent;)e=e.parent;return e}function pd(e){e=ne({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Xe(n,{position:"relative",overflow:"hidden",width:Da(e.width),height:Da(e.height)}),t.appendChild(n),n}function Ma(e,t,n){const r=Ae("g");lt(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const dd="base",Ba=0,hd=1,md={shape:["x","y","width","height"],connection:["waypoints"]};function oe(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}oe.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],oe.prototype._init=function(e){const t=this._eventBus,n=this._container=pd(e),r=this._svg=Ae("svg");Re(r,{width:"100%",height:"100%"}),ta(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),Ie(n,r);const i=this._viewport=Ma(r,"viewport");e.deferUpdate&&(this._viewboxChanged=Vo(this._viewboxChanged,300)),this._restoreFocus=Vo(this._restoreFocus,0),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),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)},oe.prototype._destroy=function(){this._restoreFocus.cancel(),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},oe.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},oe.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=Uo(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},oe.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},oe.prototype.restoreFocus=function(){this._restoreFocus()},oe.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},oe.prototype.isFocused=function(){return this._focused},oe.prototype.getDefaultLayer=function(){return this.getLayer(dd,Ba)},oe.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},oe.prototype._getChildIndex=function(e){return rn(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},oe.prototype._createLayer=function(e,t){typeof t>"u"&&(t=hd);const n=this._getChildIndex(t);return{group:Ma(this._viewport,"layer-"+e,n),index:t,visible:!0}},oe.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,r=t.group,i=t.index;if(t.visible)return r;const o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r},oe.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&&(qn(n),t.visible=!1),n},oe.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],qn(t.group))},oe.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},oe.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const r of t){const i=this._findPlaneForRoot(fd(r));if(!i||n&&i.rootElement!==n)return;n=i.rootElement}return n},oe.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},oe.prototype._findPlaneForRoot=function(e){return ot(this._planes,function(t){return t.rootElement===e})},oe.prototype._resolveElement=function(e){return typeof e=="string"?this._elementRegistry.get(e):e},oe.prototype._resolveElements=function(e){return tt(e)||(e=[e]),e.map(t=>this._resolveElement(t)).filter(Boolean)},oe.prototype.getContainer=function(){return this._container},oe.prototype._updateMarker=function(e,t,n){let r;e=this._resolveElement(e),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(ee([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),lt(i).add(t)):(e.markers.delete(t),lt(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},oe.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},oe.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},oe.prototype.hasMarker=function(e,t){return e=this._resolveElement(e),e.markers?e.markers.has(t):!1},oe.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},oe.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},oe.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 r=this.getLayer(n,Ba);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},oe.prototype.removeRootElement=function(e){if(e=this._resolveElement(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},oe.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},oe.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)},oe.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})},oe.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})},oe.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=md[e];if(!Io(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},oe.prototype._setParent=function(e,t,n){ud(t.children,e,n),e.parent=t},oe.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const a=o.create(e,t,r);return this._elementRegistry.add(t,a),o.update(e,t,a),i.fire(e+".added",{element:t,gfx:a}),t},oe.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},oe.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},oe.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),cd(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},oe.prototype.removeShape=function(e){return this._removeElement(e,"shape")},oe.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},oe.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},oe.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},oe.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},oe.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let r,i,o,a,s,f,p;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const h=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);_n(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=_n(t),i=a?a.matrix:yf(),s=or(i.a,1e3),f=or(-i.e||0,1e3),p=or(-i.f||0,1e3),e=this._cachedViewbox={x:f?f/s:0,y:p?p/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e},oe.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=ne({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Ia(t,n)}),{x:n.e,y:n.f}},oe.prototype.scrollToElement=function(e,t){let n=100;const r=this._resolveElements(e);if(!r.length)return;const i=this.findRoot(r);if(!i)return;i!==this.getRootElement()&&this.setRootElement(i);const o=r.filter(H=>H!=i);if(!o.length)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 a=bn(o),s=ci(a),f=this.viewbox(),p=this.zoom();let h,m;f.y+=t.top/p,f.x+=t.left/p,f.width-=(t.right+t.left)/p,f.height-=(t.bottom+t.top)/p;const _=ci(f);if(!(a.width<f.width&&a.height<f.height))h=a.x-f.x,m=a.y-f.y;else{const H=Math.max(0,s.right-_.right),F=Math.min(0,s.left-_.left),R=Math.max(0,s.bottom-_.bottom),S=Math.min(0,s.top-_.top);h=H||F,m=R||S}this.scroll({dx:-h*p,dy:-m*p})},oe.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),or(r.a,1e3)};function Ia(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}oe.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let i,o;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?o={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),o={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(o),this.viewbox(!1).scale},oe.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,f,p,h;f=r.getCTM();const m=f.a;return t?(a=ne(o,t),s=a.matrixTransform(f.inverse()),p=i.translate(s.x,s.y).scale(1/m*e).translate(-s.x,-s.y),h=f.multiply(p)):h=i.scale(e),Ia(this._viewport,h),h},oe.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},oe.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:r,y:i,width:o,height:a}},oe.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var sn="data-element-id";function Je(e){this._elements={},this._eventBus=e}Je.$inject=["eventBus"],Je.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Re(t,sn,r),n&&Re(n,sn,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},Je.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Re(r.gfx,sn,""),r.secondaryGfx&&Re(r.secondaryGfx,sn,""),delete t[n])},Je.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),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)},Je.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&Re(t,sn,r),t},Je.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Re(e,sn);var n=this._elements[t];return n&&n.element},Je.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},Je.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],o=t[i],a=o.element,s=o.gfx;if(e(a,s))return a}},Je.prototype.getAll=function(){return this.filter(function(e){return e})},Je.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,o=r.gfx;return e(i,o)})},Je.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},Je.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 yd(e,t,n,r){var i=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,i,r)),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,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function gd(e){return e.__refs_collection===!0}function vd(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function La(e,t,n){var r=yd(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function wd(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(o){if(o!==i){var a=i;i=null,a&&e.unset(a,r,n),i=o,e.set(i,r,n)}}})}function rt(e,t){if(!(this instanceof rt))return new rt(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}rt.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?La(this,t,e):wd(this,t,e)},rt.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return gd(n)||La(this,t,e),n},rt.prototype.ensureBound=function(e,t){vd(e,t)||this.bind(e,t)},rt.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},rt.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var mi=new rt({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Fa=new rt({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Va=new rt({name:"attachers",collection:!0},{name:"host"}),$a=new rt({name:"outgoing",collection:!0},{name:"source"}),ja=new rt({name:"incoming",collection:!0},{name:"target"});function An(){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)}}),mi.bind(this,"parent"),Fa.bind(this,"labels"),$a.bind(this,"outgoing"),ja.bind(this,"incoming")}function Cn(){An.call(this),mi.bind(this,"children"),Va.bind(this,"host"),Va.bind(this,"attachers")}at(Cn,An);function Ua(){An.call(this),mi.bind(this,"children")}at(Ua,Cn);function za(){Cn.call(this),Fa.bind(this,"labelTarget")}at(za,Cn);function Ha(){An.call(this),$a.bind(this,"source"),ja.bind(this,"target")}at(Ha,An);var bd={connection:Ha,shape:Cn,label:za,root:Ua};function Ed(e,t){var n=bd[e];if(!n)throw new Error("unknown type: <"+e+">");return ne(new n,t)}function ln(){this._uid=12}ln.prototype.createRoot=function(e){return this.create("root",e)},ln.prototype.createLabel=function(e){return this.create("label",e)},ln.prototype.createShape=function(e){return this.create("shape",e)},ln.prototype.createConnection=function(e){return this.create("connection",e)},ln.prototype.create=function(e,t){return t=ne({},t||{}),t.id||(t.id=e+"_"+this._uid++),Ed(e,t)};var ar="__fn",Wa=1e3,_d=Array.prototype.slice;function Ge(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Ge.prototype.on=function(e,t,n,r){if(e=tt(e)?e:[e],$t(t)&&(r=n,n=t,t=Wa),!St(t))throw new Error("priority must be a number");var i=n;r&&(i=At(n,r),i[ar]=n[ar]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})},Ge.prototype.once=function(e,t,n,r){var i=this;if($t(t)&&(r=n,n=t,t=Wa),!St(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(r,arguments);return i.off(e,o),a}o[ar]=n,this.on(e,t,o)},Ge.prototype.off=function(e,t){e=tt(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},Ge.prototype.createEvent=function(e){var t=new kn;return t.init(e),t},Ge.prototype.fire=function(e,t){var n,r,i,o;if(o=_d.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof kn?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==a&&(n.type=a)}return i===void 0&&n.defaultPrevented&&(i=!1),i}},Ge.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},Ge.prototype._destroy=function(){this._listeners={}},Ge.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},Ge.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=xd(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r},Ge.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t},Ge.prototype._getListeners=function(e){return this._listeners[e]},Ge.prototype._setListeners=function(e,t){this._listeners[e]=t},Ge.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,o;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,o=n.callback,(o===t||o[ar]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function kn(){}kn.prototype.stopPropagation=function(){this.cancelBubble=!0},kn.prototype.preventDefault=function(){this.defaultPrevented=!0},kn.prototype.init=function(e){ne(this,e||{})};function xd(e,t){return e.apply(null,t)}function Sd(e){return e.childNodes[0]}function Ad(e){return e.parentNode.childNodes[1]}function Ze(e,t){this._eventBus=e,this._elementRegistry=t}Ze.$inject=["eventBus","elementRegistry"],Ze.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=Ad(t),n||(n=Ae("g"),lt(n).add("djs-children"),Ie(t.parentNode,n))):n=t,n},Ze.prototype._clear=function(e){var t=Sd(e);return na(t),t},Ze.prototype._createContainer=function(e,t,n,r){var i=Ae("g");lt(i).add("djs-group"),typeof n<"u"?Cd(i,t,t.childNodes[n]):Ie(t,i);var o=Ae("g");lt(o).add("djs-element"),lt(o).add("djs-"+e),r&<(o).add("djs-frame"),Ie(i,o);var a=Ae("g");return lt(a).add("djs-visual"),Ie(o,a),o},Ze.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,zo(t))},Ze.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=rn(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),ee(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i),s=a.firstChild;ee(o,function(f){var p=n.getGraphics(f).parentNode;p===s?s=s.nextSibling:a.insertBefore(p,s)})}})},Ze.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},Ze.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},Ze.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},Ze.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},Ze.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),sa(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?Re(n,"display","none"):Re(n,"display","block")}},Ze.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);qn(t.parentNode)};function Cd(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const kd={__depends__:[ld],__init__:["canvas"],canvas:["type",oe],elementRegistry:["type",Je],elementFactory:["type",ln],eventBus:["type",Ge],graphicsFactory:["type",Ze]};function Rd(e){var t=new Oa(e);return t.init(),t}function Td(e){e=e||{};var t={config:["value",e]},n=[t,kd].concat(e.modules||[]);return Rd(n)}function Nt(e,t){this._injector=t||Td(e),this.get("eventBus").fire("diagram.init")}Nt.prototype.get=function(e,t){return this._injector.get(e,t)},Nt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Nt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Nt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function yi(){}yi.prototype.get=function(e){return this.$model.properties.get(this,e)},yi.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function qa(e,t){this.model=e,this.properties=t}qa.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(yi.prototype);ee(e.properties,function(a){!a.isMany&&a.default!==void 0&&(r[a.name]=a.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(a){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),ee(a,At(function(s,f){this.set(f,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var Pd=ne(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),Ya=ne(Object.create(null),{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 gi(e,t){var n=Ya[e];return n?n(t):t}function vi(e){return!!Pd[e]}function Ka(e){return!!Ya[e]}function Ve(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function Qe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}Qe.prototype.build=function(){return Ku(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Qe.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)},Qe.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=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=i.indexOf(e);if(s===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(s,1),this.addProperty(t,n?void 0:s,a),o[r.name]=o[r.localName]=t},Qe.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Ve(i[0],r),a=Ve(i[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},Qe.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e},Qe.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},Qe.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},Qe.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},Qe.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},Qe.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},Qe.prototype.hasProperty=function(e){return this.propertiesByName[e]},Qe.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(ee(e.properties,At(function(o){o=ne({},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)),r.push(e),n[i]=e)};function Ot(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,ee(e,At(this.registerPackage,this))}Ot.prototype.getPackage=function(e){return this.packageMap[e]},Ot.prototype.getPackages=function(){return this.packages},Ot.prototype.registerPackage=function(e){e=ne({},e);var t=this.packageMap;Ga(t,e,"prefix"),Ga(t,e,"uri"),ee(e.types,At(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Ot.prototype.registerType=function(e,t){e=ne({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:ne({},e.meta||{})});var n=Ve(e.name,t.prefix),r=n.name,i=Object.create(null);ee(e.properties,At(function(o){var a=Ve(o.name,n.prefix),s=a.name;vi(o.type)||(o.type=Ve(o.type,a.prefix).name),ne(o,{ns:a,name:s}),i[s]=o},this)),ne(e,{ns:n,name:r,propertiesByName:i}),ee(e.extends,At(function(o){var a=Ve(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e},Ot.prototype.mapTypes=function(e,t,n){var r=vi(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(f,p){var h=Ve(f,vi(f)?"":e.prefix);i.mapTypes(h,t,p)}function a(f){return o(f,!0)}function s(f){return o(f,!1)}if(!r)throw new Error("unknown type <"+e.name+">");ee(r.superClass,n?a:s),t(r,!n),ee(r.traits,a)},Ot.prototype.getEffectiveDescriptor=function(e){var t=Ve(e),n=new Qe(t);this.mapTypes(t,function(i,o){n.addTrait(i,o)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},Ot.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function Ga(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Yt(e){this.model=e}Yt.prototype.set=function(e,t,n){if(!st(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;Nd(n)?r?delete e[i]:delete e.$attrs[wi(t)]:r?i in e?e[i]=n:Xa(e,r,n):e.$attrs[wi(t)]=n},Yt.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[wi(t)];var r=n.name;return!e[r]&&n.isMany&&Xa(e,n,[]),e[r]},Yt.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=ne({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},Yt.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Yt.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Yt.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(typeof i<"u"){const o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw o;typeof console<"u"&&console.warn(o)}return null};function Nd(e){return typeof e>"u"}function Xa(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function wi(e){return e.replace(/^:/,"")}function it(e,t={}){this.properties=new Yt(this),this.factory=new qa(this,this.properties),this.registry=new Ot(e,this.properties),this.typeCache=Object.create(null),this.config=t}it.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},it.prototype.getType=function(e){var t=this.typeCache,n=st(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},it.prototype.createAny=function(e,t,n){var r=Ve(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){Yu(this,[a],s)}},o={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,o),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),ee(n,function(a,s){xt(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i},it.prototype.getPackage=function(e){return this.registry.getPackage(e)},it.prototype.getPackages=function(){return this.registry.getPackages()},it.prototype.getElementDescriptor=function(e){return e.$descriptor},it.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},it.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},it.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Ja=String.fromCharCode,Od=Object.prototype.hasOwnProperty,Dd=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Rn={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Rn).forEach(function(e){Rn[e.toUpperCase()]=Rn[e]});function Md(e,t,n,r){return r?Od.call(Rn,r)?Rn[r]:"&"+r+";":Ja(t||parseInt(n,16))}function Kt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(Dd,Md):e}var Za="non-whitespace outside of root node";function Dt(e){return new Error(e)}function Bd(e){return"missing namespace for prefix <"+e+">"}function sr(e){return{get:e,enumerable:!0}}function Id(e){var t=Object.create(null),n;for(n in e)t[n]=e[n];return t}var Qa=Symbol("nameCache");function bi(e){return e+"$uri"}function Ld(e){var t=Object.create(null),n,r;for(n in e)r=e[n],t[r]=r,t[bi(r)]=n;return t}function lr(){return{line:0,column:0}}function Fd(e){throw e}function es(e){if(!this)return new es(e);var t=e&&e.proxy,n,r,i,o,a=Fd,s,f,p,h,m=lr,_=!1,B=!1,H="",F=!1,R=!1,S=null,M=!1,w,E,D,L;function N(b){b instanceof Error||(b=Dt(b)),S=b,a(b,m)}function x(b){s&&(b instanceof Error||(b=Dt(b)),s(b,m))}this.on=function(b,W){if(typeof W!="function")throw Dt("required args <name, cb>");switch(b){case"openTag":r=W;break;case"text":n=W;break;case"closeTag":i=W;break;case"error":a=W;break;case"warn":s=W;break;case"cdata":o=W;break;case"attention":h=W;break;case"question":p=W;break;case"comment":f=W;break;default:throw Dt("unsupported event: "+b)}return this},this.ns=function(b){if(typeof b>"u"&&(b={}),typeof b!="object")throw Dt("required args <nsMap={}>");var W=Object.create(null),ue;for(ue in b)W[ue]=b[ue];return R=!0,L=W,this};function $(){w=R?[]:null,E=R?Ld(L):null,D=[],m=lr,M=!1,S=null,B=!1,H=""}this.parse=function(b){if(typeof b!="string")throw Dt("required args <xml=string>");if(_)throw Dt("parse during stream; call end() first");return $(),P(b),m=lr,M=!1,S},this.write=function(b){if(typeof b!="string")throw Dt("required args <xml=string>");return _||($(),_=!0),S||(H=P(H+b,!0)||""),this},this.end=function(){return _||$(),_=!1,S||P(H),H="",m=lr,M=!1,S},this.stop=function(){M=!0};function P(b,W=!1){var ue=null,G=null,Y,T=0,j=!1,O=!1,q=0,U=0,K,k,A,I,ie,ae,d,u,c,y="",v=0,C;function X(pe,be){var Ce=pe.indexOf(":");if(Ce===-1)return pe;var Pe=E[pe.substring(0,Ce)];return Pe?be===Pe?pe.substr(Ce+1):Pe+pe.substr(Ce):(x(Bd(pe.substring(0,Ce))),null)}function se(){if(C!==null)return C;var pe,be,Ce=R&&E.xmlns,Pe=R&&F?[]:null,we=v,Ee=y,ze=Ee.length,z,V,te,ce,ge,De={},qe=new Set,ke,me,ve;e:for(;we<ze;we++)if(ke=!1,me=Ee.charCodeAt(we),!(me===32||me<14&&me>8)){for((me<65||me>122||me>90&&me<97)&&me!==95&&me!==58&&(x("illegal first char attribute name"),ke=!0),ve=we+1;ve<ze;ve++)if(me=Ee.charCodeAt(ve),!(me>96&&me<123||me>64&&me<91||me>47&&me<59||me===46||me===45||me===95)){if(me===32||me<14&&me>8){x("missing attribute value"),we=ve;continue e}if(me===61)break;x("illegal attribute name char"),ke=!0}if(ge=Ee.substring(we,ve),ge==="xmlns:xmlns"&&(x("illegal declaration of xmlns"),ke=!0),me=Ee.charCodeAt(ve+1),me===34)ve=Ee.indexOf('"',we=ve+2),ve===-1&&(ve=Ee.indexOf("'",we),ve!==-1&&(x("attribute value quote missmatch"),ke=!0));else if(me===39)ve=Ee.indexOf("'",we=ve+2),ve===-1&&(ve=Ee.indexOf('"',we),ve!==-1&&(x("attribute value quote missmatch"),ke=!0));else for(x("missing attribute value quotes"),ke=!0,ve=ve+1;ve<ze&&(me=Ee.charCodeAt(ve+1),!(me===32||me<14&&me>8));ve++);for(ve===-1&&(x("missing closing quotes"),ve=ze,ke=!0),ke||(te=Ee.substring(we,ve)),we=ve;ve+1<ze&&(me=Ee.charCodeAt(ve+1),!(me===32||me<14&&me>8));ve++)we===ve&&(x("illegal character after attribute end"),ke=!0);if(we=ve+1,ke)continue e;if(qe.has(ge)){x("attribute <"+ge+"> already defined");continue}if(qe.add(ge),!R){De[ge]=te;continue}if(F){if(V=ge==="xmlns"?"xmlns":ge.charCodeAt(0)===120&&ge.substr(0,6)==="xmlns:"?ge.substr(6):null,V!==null){if(pe=Kt(te),be=bi(V),ce=L[pe],!ce){if(V==="xmlns"||be in E&&E[be]!==pe)do ce="ns"+T++;while(typeof E[ce]<"u");else ce=V;L[pe]=ce}E[V]!==ce&&(z||(E=Id(E),z=!0),E[V]=ce,V==="xmlns"&&(E[bi(ce)]=pe,Ce=ce),E[be]=pe),De[ge]=te;continue}Pe.push(ge,te);continue}ge=X(ge,Ce),ge!==null&&(De[ge]=te)}if(F)for(we=0,ze=Pe.length;we<ze;we++)ge=X(Pe[we++],Ce),te=Pe[we],ge!==null&&(De[ge]=te);return C=De}function fe(){for(var pe=/(\r\n|\r|\n)/g,be=0,Ce=0,Pe=0,we=U,Ee,ze;q>=Pe&&(Ee=pe.exec(b),!(!Ee||(we=Ee[0].length+Ee.index,we>q)));)be+=1,Pe=we;return q==-1?(Ce=we,ze=b.substring(U)):U===0?ze=b.substring(U,q):(Ce=q-Pe,ze=U==-1?b.substring(q):b.substring(q,U+1)),{data:ze,line:be,column:Ce}}for(m=fe,t&&(c=Object.create({},{name:sr(function(){return d}),originalName:sr(function(){return u}),attrs:sr(se),ns:sr(function(){return E})}));U!==-1;){if(b.charCodeAt(U)===60?q=U:q=b.indexOf("<",U),q===-1){if(W)return b.substring(U);if(D.length)return N("unexpected end of file");if(!B)return N("missing start tag");U<b.length&&b.substring(U).trim()&&x(Za);return}if(B||(B=!0),U!==q){if(D.length){if(n&&(n(b.substring(U,q),Kt,m),M))return}else if(b.substring(U,q).trim()&&(x(Za),M))return}if(I=b.charCodeAt(q+1),I===33){if(A=b.charCodeAt(q+2),A===91&&b.substr(q+3,6)==="CDATA["){if(U=b.indexOf("]]>",q),U===-1)return W?b.substring(q):N("unclosed cdata");if(o&&(o(b.substring(q+9,U),m),M))return;U+=3;continue}if(A===45&&b.charCodeAt(q+3)===45){if(U=b.indexOf("-->",q),U===-1)return W?b.substring(q):N("unclosed comment");if(f&&(f(b.substring(q+4,U),Kt,m),M))return;U+=3;continue}}if(I===63){if(U=b.indexOf("?>",q),U===-1)return W?b.substring(q):N("unclosed question");if(p&&(p(b.substring(q,U+2),m),M))return;U+=2;continue}for(K=q+1;;K++){if(ie=b.charCodeAt(K),isNaN(ie))return W?b.substring(q):(U=-1,N("unclosed tag"));if(ie===34)A=b.indexOf('"',K+1),K=A!==-1?A:K;else if(ie===39)A=b.indexOf("'",K+1),K=A!==-1?A:K;else if(ie===62){U=K;break}}if(I===33){if(h&&(h(b.substring(q,U+1),Kt,m),M))return;U+=1;continue}if(C={},I===47){if(j=!1,O=!0,!D.length)return N("missing open tag");if(K=d=D.pop(),A=q+2+K.length,b.substring(q+2,A)!==K)return N("closing tag mismatch");for(;A<U;A++)if(I=b.charCodeAt(A),!(I===32||I>8&&I<14))return N("close tag")}else{if(b.charCodeAt(U-1)===47?(K=d=b.substring(q+1,U-1),j=!0,O=!0):(K=d=b.substring(q+1,U),j=!0,O=!1),!(I>96&&I<123||I>64&&I<91||I===95||I===58))return N("illegal first char nodeName");for(A=1,k=K.length;A<k;A++)if(I=K.charCodeAt(A),!(I>96&&I<123||I>64&&I<91||I>47&&I<59||I===45||I===95||I==46)){if(I===32||I<14&&I>8){d=K.substring(0,A),C=null;break}return N("invalid nodeName")}O||D.push(d)}if(R){Y=E,j&&(O||w.push(Y),C===null&&(F=K.indexOf("xmlns",A)!==-1)&&(v=A,y=K,se(),F=!1)),u=d,G!==E&&(ue=E[Qa],ue===void 0&&(ue=E[Qa]=Object.create(null)),G=E);var Q=ue[d];if(Q!==void 0)d=Q;else{if(I=d.indexOf(":"),I!==-1){if(ae=E[d.substring(0,I)],!ae)return N("missing namespace on <"+u+">");d=d.substr(I+1)}else ae=E.xmlns;ae&&(d=ae+":"+d),ue[u]=d}}if(j&&(v=A,y=K,r&&(t?r(c,Kt,O,m):r(d,se,Kt,O,m),M)))return;if(O){if(i&&(i(t?c:d,Kt,j,m),M))return;R&&(j?E=Y:E=w.pop())}U+=1}}}function ts(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Ei={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},ns="property";function rs(e){return e.xml&&e.xml.serialize}function Vd(e){const t=rs(e);return t!==ns&&(t||null)}function $d(e){return e.charAt(0).toUpperCase()+e.slice(1)}function is(e,t){return ts(t)?e.prefix+":"+$d(e.localName):e.name}function jd(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function Ud(e,t,n){const r=Ve(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Ve(i);var a=n.getPackage(o.prefix);return jd(o,a)}function Mt(e){return new Error(e)}function Et(e){return e.$descriptor}function zd(e){ne(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw Mt("expected element");var n=this.elementsById,r=Et(t),i=r.idProperty,o;if(i&&(o=t.get(i.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw Mt("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Tn(){}Tn.prototype.handleEnd=function(){},Tn.prototype.handleText=function(){},Tn.prototype.handleNode=function(){};function _i(){}_i.prototype=Object.create(Tn.prototype),_i.prototype.handleNode=function(){return this};function cn(){}cn.prototype=Object.create(Tn.prototype),cn.prototype.handleText=function(e){this.body=(this.body||"")+e};function Pn(e,t){this.property=e,this.context=t}Pn.prototype=Object.create(cn.prototype),Pn.prototype.handleNode=function(e){if(this.element)throw Mt("expected no sub nodes");return this.element=this.createReference(e),this},Pn.prototype.handleEnd=function(){this.element.id=this.body},Pn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function xi(e,t){this.element=t,this.propertyDesc=e}xi.prototype=Object.create(cn.prototype),xi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=gi(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function cr(){}cr.prototype=Object.create(cn.prototype),cr.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 Ue(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Ue.prototype=Object.create(cr.prototype),Ue.prototype.addReference=function(e){this.context.addReference(e)},Ue.prototype.handleText=function(e){var t=this.element,n=Et(t),r=n.bodyProperty;if(!r)throw Mt("unexpected body text <"+e+">");cn.prototype.handleText.call(this,e)},Ue.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Et(t),r=n.bodyProperty;r&&e!==void 0&&(e=gi(r.type,e),t.set(r.name,e))},Ue.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=Et(n),i=this.context,o=new n({}),a=this.model,s;return ee(t,function(f,p){var h=r.propertiesByName[p],m;h&&h.isReference?h.isMany?(m=f.split(" "),ee(m,function(_){i.addReference({element:o,property:h.ns.name,id:_})})):i.addReference({element:o,property:h.ns.name,id:f}):(h?f=gi(h.type,f):p==="xmlns"?p=":"+p:(s=Ve(p,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+p+">",element:o,property:p,value:f})),o.set(p,f))}),o},Ue.prototype.getPropertyForNode=function(e){var t=e.name,n=Ve(t),r=this.type,i=this.model,o=Et(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const p=Vd(s);if(p){const h=e.attributes[p];if(h){const m=Ud(h,e.ns,i),_=i.getType(m);return ne({},s,{effectiveType:Et(_).name})}}return s}var f=i.getPackage(n.prefix);if(f){const p=is(n,f),h=i.getType(p);if(s=ot(o.properties,function(m){return!m.isVirtual&&!m.isReference&&!m.isAttribute&&h.hasType(m.type)}),s)return ne({},s,{effectiveType:Et(h).name})}else if(s=ot(o.properties,function(p){return!p.isReference&&!p.isAttribute&&p.type==="Element"}),s)return s;throw Mt("unrecognized element <"+n.name+">")},Ue.prototype.toString=function(){return"ElementDescriptor["+Et(this.type).name+"]"},Ue.prototype.valueHandler=function(e,t){return new xi(e,t)},Ue.prototype.referenceHandler=function(e){return new Pn(e,this.context)},Ue.prototype.handler=function(e){return e==="Element"?new un(this.model,e,this.context):new Ue(this.model,e,this.context)},Ue.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Ka(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var o=i.element;return o!==void 0&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(ne(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Si(e,t,n){Ue.call(this,e,t,n)}Si.prototype=Object.create(Ue.prototype),Si.prototype.createElement=function(e){var t=e.name,n=Ve(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&is(n,o)||t;if(!i.hasType(a))throw Mt("unexpected element <"+e.originalName+">");return Ue.prototype.createElement.call(this,e)};function un(e,t,n){this.model=e,this.context=n}un.prototype=Object.create(cr.prototype),un.prototype.createElement=function(e){var t=e.name,n=Ve(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},un.prototype.handleChild=function(e){var t=new un(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t},un.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Ai(e){e instanceof it&&(e={model:e}),ne(this,{lax:!1},e)}Ai.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Ue?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,o=this.lax,a=new zd(ne({},t,{rootHandler:r})),s=new es({proxy:!0}),f=Hd();r.context=a,f.push(r);function p(D,L,N){var x=L(),$=x.line,P=x.column,b=x.data;b.charAt(0)==="<"&&b.indexOf(" ")!==-1&&(b=b.slice(0,b.indexOf(" "))+">");var W="unparsable content "+(b?b+" ":"")+`detected
|
|
10
|
-
line:
|
|
11
|
-
column: `+
|
|
12
|
-
nested error: `+
|
|
13
|
-
`,
|
|
14
|
-
`),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function sh(e){e=ne({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new oh,o=new ah(i,e.format);e.preamble&&o.append(Wd);var a=new xe,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(lh(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function lh(e){const t=e.config&&e.config.nsMap||{},n={};for(const r in Ei)n[r]=Ei[r];for(const r in t){const i=t[r];n[i]=r}for(const r of e.getPackages())n[r.prefix]=r.uri;return n}function fr(e,t){it.call(this,e,t)}fr.prototype=Object.create(it.prototype),fr.prototype.fromXML=function(e,t,n){st(t)||(n=t,t="bpmn:Definitions");var r=new Ai(ne({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},fr.prototype.toXML=function(e,t){var n=new sh(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var ch="BPMN20",uh="http://www.omg.org/spec/BPMN/20100524/MODEL",fh="bpmn",ph=[],dh=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],hh=[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],mh={tagAlias:"lowerCase",typePrefix:"t"},yh={name:ch,uri:uh,prefix:fh,associations:ph,types:dh,enumerations:hh,xml:mh},gh="BPMNDI",vh="http://www.omg.org/spec/BPMN/20100524/DI",wh="bpmndi",bh=[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],Eh=[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],_h=[],xh={name:gh,uri:vh,prefix:wh,types:bh,enumerations:Eh,associations:_h},Sh="DC",Ah="http://www.omg.org/spec/DD/20100524/DC",Ch="dc",kh=[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],Rh=[],Th={name:Sh,uri:Ah,prefix:Ch,types:kh,associations:Rh},Ph="DI",Nh="http://www.omg.org/spec/DD/20100524/DI",Oh="di",Dh=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],Mh=[],Bh={tagAlias:"lowerCase"},Ih={name:Ph,uri:Nh,prefix:Oh,types:Dh,associations:Mh,xml:Bh},Lh="bpmn.io colors for BPMN",Fh="http://bpmn.io/schema/bpmn/biocolor/1.0",Vh="bioc",$h=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],jh=[],Uh=[],zh={name:Lh,uri:Fh,prefix:Vh,types:$h,enumerations:jh,associations:Uh},Hh="BPMN in Color",Wh="http://www.omg.org/spec/BPMN/non-normative/color/1.0",qh="color",Yh=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],Kh=[],Gh=[],Xh={name:Hh,uri:Wh,prefix:qh,types:Yh,enumerations:Kh,associations:Gh};const Jh={bpmn:yh,bpmndi:xh,dc:Th,di:Ih,bioc:zh,color:Xh};function Zh(e,t){const n=ne({},Jh,e);return new fr(n,t)}function We(e,t){return e.$instanceOf(t)}function Qh(e){return ot(e.rootElements,function(t){return We(t,"bpmn:Process")||We(t,"bpmn:Collaboration")})}function em(e){var t={},n=[],r={};function i(k,A){return function(I){k(I,A)}}function o(k){t[k.id]=k}function a(k){return t[k.id]}function s(k,A){var I=k.gfx;if(I)throw new Error(`already rendered ${Fe(k)}`);return e.element(k,r[k.id],A)}function f(k,A){return e.root(k,r[k.id],A)}function p(k,A){try{var I=r[k.id]&&s(k,A);return o(k),I}catch(ie){h(ie.message,{element:k,error:ie}),console.error(`failed to import ${Fe(k)}`,ie)}}function h(k,A){e.error(k,A)}var m=this.registerDi=function(A){var I=A.bpmnElement;I?r[I.id]?h(`multiple DI elements defined for ${Fe(I)}`,{element:I}):r[I.id]=A:h(`no bpmnElement referenced in ${Fe(A)}`,{element:A})};function _(k){B(k.plane)}function B(k){m(k),ee(k.planeElement,H)}function H(k){m(k)}this.handleDefinitions=function(A,I){var ie=A.diagrams;if(I&&ie.indexOf(I)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!I&&ie&&ie.length&&(I=ie[0]),!I)throw new Error("no diagram to display");r={},_(I);var ae=I.plane;if(!ae)throw new Error(`no plane for ${Fe(I)}`);var d=ae.bpmnElement;if(!d)if(d=Qh(A),d)h(`correcting missing bpmnElement on ${Fe(ae)} to ${Fe(d)}`),ae.bpmnElement=d,m(ae);else throw new Error("no process or collaboration to display");var u=f(d,ae);if(We(d,"bpmn:Process")||We(d,"bpmn:SubProcess"))R(d,u);else if(We(d,"bpmn:Collaboration"))U(d,u),S(A.rootElements,u);else throw new Error(`unsupported bpmnElement for ${Fe(ae)}: ${Fe(d)}`);F(n)};var F=this.handleDeferred=function(){for(var A;n.length;)A=n.shift(),A()};function R(k,A){j(k,A),$(k.ioSpecification,A),x(k.artifacts,A),o(k)}function S(k,A){var I=nn(k,function(ie){return!a(ie)&&We(ie,"bpmn:Process")&&ie.laneSets});I.forEach(i(R,A))}function M(k,A){p(k,A)}function w(k,A){ee(k,i(M,A))}function E(k,A){p(k,A)}function D(k,A){p(k,A)}function L(k,A){p(k,A)}function N(k,A){p(k,A)}function x(k,A){ee(k,function(I){We(I,"bpmn:Association")?n.push(function(){N(I,A)}):N(I,A)})}function $(k,A){k&&(ee(k.dataInputs,i(D,A)),ee(k.dataOutputs,i(L,A)))}var P=this.handleSubProcess=function(A,I){j(A,I),x(A.artifacts,I)};function b(k,A){var I=p(k,A);We(k,"bpmn:SubProcess")&&P(k,I||A),We(k,"bpmn:Activity")&&$(k.ioSpecification,A),n.push(function(){ee(k.dataInputAssociations,i(E,A)),ee(k.dataOutputAssociations,i(E,A))})}function W(k,A){p(k,A)}function ue(k,A){p(k,A)}function G(k,A){n.push(function(){var I=p(k,A);k.childLaneSet&&Y(k.childLaneSet,I||A),K(k)})}function Y(k,A){ee(k.lanes,i(G,A))}function T(k,A){ee(k,i(Y,A))}function j(k,A){O(k.flowElements,A),k.laneSets&&T(k.laneSets,A)}function O(k,A){ee(k,function(I){We(I,"bpmn:SequenceFlow")?n.push(function(){W(I,A)}):We(I,"bpmn:BoundaryEvent")?n.unshift(function(){b(I,A)}):We(I,"bpmn:FlowNode")?b(I,A):We(I,"bpmn:DataObject")||(We(I,"bpmn:DataStoreReference")||We(I,"bpmn:DataObjectReference")?ue(I,A):h(`unrecognized flowElement ${Fe(I)} in context ${Fe(A&&A.businessObject)}`,{element:I,context:A}))})}function q(k,A){var I=p(k,A),ie=k.processRef;ie&&R(ie,I||A)}function U(k,A){ee(k.participants,i(q,A)),n.push(function(){w(k.messageFlows,A)}),x(k.artifacts,A)}function K(k){ee(k.flowNodeRef,function(A){var I=A.get("lanes");I&&I.push(k)})}}function tm(e,t,n){var r,i,o,a,s=[];function f(p,h){var m={root:function(F,R){return r.add(F,R)},element:function(F,R,S){return r.add(F,R,S)},error:function(F,R){s.push({message:F,context:R})}},_=new em(m);h=h||p.diagrams&&p.diagrams[0];var B=nm(p,h);if(!B)throw new Error("no diagram to display");ee(B,function(F){_.handleDefinitions(p,F)});var H=h.plane.bpmnElement.id;o.setRootElement(o.findRoot(H+"_plane")||o.findRoot(H))}return new Promise(function(p,h){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),f(t,n),i.fire("import.render.complete",{error:a,warnings:s}),p({warnings:s})}catch(m){return m.warnings=s,h(m)}})}function nm(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!re(n,"bpmn:Process")&&!re(n,"bpmn:Collaboration")&&(r=rm(n));var i;re(r,"bpmn:Collaboration")?i=r:i=ot(e.rootElements,function(p){if(re(p,"bpmn:Collaboration"))return ot(p.participants,function(h){return h.processRef===r})});var o=[r];i&&(o=Hu(i.participants,function(p){return p.processRef}),o.push(i));var a=cs(o),s=[t],f=[n];return ee(e.diagrams,function(p){if(p.plane){var h=p.plane.bpmnElement;a.indexOf(h)!==-1&&f.indexOf(h)===-1&&(s.push(p),f.push(h))}}),s}}function cs(e){var t=[];return ee(e,function(n){n&&(t.push(n),t=t.concat(cs(n.flowElements)))}),t}function rm(e){for(var t=e;t;){if(re(t,"bpmn:Process"))return t;t=t.$parent}}var im='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',us=im,fs={verticalAlign:"middle"},ps={color:"#404040"},om={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},am={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},sm={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},lm='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+us+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',pt;function cm(){pt=ut(lm),Xe(pt,om),Xe(gt("svg",pt),fs),Xe(gt(".backdrop",pt),am),Xe(gt(".notice",pt),sm),Xe(gt(".link",pt),ps,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function um(){pt||(cm(),oi.bind(pt,".backdrop","click",function(e){document.body.removeChild(pt)})),document.body.appendChild(pt)}const pr=5,ds="djs-outline-hidden";function Te(e){e=ne({},pm,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),hm(this._container)}at(Te,Nt),Te.prototype.importXML=async function(t,n){const r=this;function i(a){return r.get("eventBus").createEvent(a)}let o=[];try{t=this._emit("import.parse.start",{xml:t})||t;let a;try{a=await this._moddle.fromXML(t,"bpmn:Definitions")}catch(_){throw this._emit("import.parse.complete",{error:_}),_}let s=a.rootElement;const f=a.references,p=a.warnings,h=a.elementsById;o=o.concat(p),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:h,references:f,warnings:o}))||s;const m=await this.importDefinitions(s,n);return o=o.concat(m.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),dr(s,o),s=fm(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}},Te.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}},Te.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const o=new Error("no XML imported");throw dr(o,[]),o}if(typeof t=="string"&&(r=dm(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw dr(o,[]),o}try{this.clear()}catch(o){throw dr(o,[]),o}const{warnings:i}=await tm(this,n,r);return{warnings:i}},Te.prototype.saveXML=async function(t){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(await this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(a){r=a}const o=r?{error:r}:{xml:i};if(this._emit("saveXML.done",o),r)throw r;return o},Te.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),o=gt(":scope > defs",r._svg),a=Zo(i),s=o?"<defs>"+Zo(o)+"</defs>":"",f=r.getContainer();Ht(f).add(ds);let p;try{p=i.getBBox()}finally{Ht(f).remove(ds)}const h=p.x-pr,m=p.y-pr,_=p.width+pr*2,B=p.height+pr*2;t=`<?xml version="1.0" encoding="utf-8"?>
|
|
9
|
+
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&jn.assertOptions(r,{silentJSONParsing:Me.transitional(Me.boolean),forcedJSONParsing:Me.transitional(Me.boolean),clarifyTimeoutError:Me.transitional(Me.boolean),legacyInterceptorReqResOrdering:Me.transitional(Me.boolean),advertiseZstdAcceptEncoding:Me.transitional(Me.boolean),validateStatusUndefinedResolves:Me.transitional(Me.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:jn.assertOptions(i,{encode:Me.function,serialize:Me.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jn.assertOptions(n,{baseUrl:Me.spelling("baseURL"),withXsrfToken:Me.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","query","common"],Y=>{delete o[Y]}),n.headers=Be.concat(a,o);const s=[];let f=!0;this.interceptors.request.forEach(function(W){if(typeof W.runWhen=="function"&&W.runWhen(n)===!1)return;f=f&&W.synchronous;const P=n.transitional||Tr;P&&P.legacyInterceptorReqResOrdering?s.unshift(W.fulfilled,W.rejected):s.push(W.fulfilled,W.rejected)});const d=[];this.interceptors.response.forEach(function(W){d.push(W.fulfilled,W.rejected)});let h,m=0,R;if(!f){const Y=[Mr.bind(this),void 0];for(Y.unshift(...s),Y.push(...d),R=Y.length,h=Promise.resolve(n);m<R;)h=h.then(Y[m++],Y[m++]);return h}R=s.length;let $=n;for(;m<R;){const Y=s[m++],W=s[m++];try{$=Y?Y($):$}catch(P){if(!W){h=Promise.reject(P);break}try{const C=W.call(this,P);w.isThenable(C)&&(h=Promise.resolve(C).then(()=>Mr.call(this,$)))}catch(C){h=Promise.reject(C)}break}}if(!h)try{h=Mr.call(this,$)}catch(Y){h=Promise.reject(Y)}for(m=0,R=d.length;m<R;)h=h.then(d[m++],d[m++]);return h}getUri(t){t=Bt(this.defaults,t);const n=Co(t.baseURL,t.url,t.allowAbsoluteUrls,t);return go(n,t.params,t.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(n,r){return this.request(Bt(r||{},{method:t,url:n,data:r&&w.hasOwnProp(r,"data")?r.data:void 0}))}}),w.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,s){return this.request(Bt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Mt.prototype[t]=n(),t!=="query"&&(Mt.prototype[t+"Form"]=n(!0))});let Su=class Js{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new hn(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Js(function(i){t=i}),cancel:t}}};function Au(e){return function(n){return e.apply(null,n)}}function ku(e){return w.isObject(e)&&e.isAxiosError===!0}const Lr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Lr).forEach(([e,t])=>{Lr[t]=e});function jo(e){const t=new Mt(e),n=Zi(Mt.prototype.request,t);return w.extend(n,Mt.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return jo(Bt(e,i))},n}const ke=jo(pn);ke.Axios=Mt,ke.CanceledError=hn,ke.CancelToken=Su,ke.isCancel=_o,ke.VERSION=Ir,ke.toFormData=Ln,ke.AxiosError=ie,ke.Cancel=ke.CanceledError,ke.all=function(t){return Promise.all(t)},ke.spread=Au,ke.isAxiosError=ku,ke.mergeConfig=Bt,ke.AxiosHeaders=Be,ke.formToJSON=e=>Eo(w.isHTMLForm(e)?new FormData(e):e),ke.getAdapter=$o.getAdapter,ke.HttpStatusCode=Lr,ke.default=ke;const{Axios:by,AxiosError:Ey,CanceledError:_y,isCancel:xy,CancelToken:Sy,VERSION:Ay,all:ky,Cancel:Cy,isAxiosError:Ry,spread:Ty,toFormData:Ny,AxiosHeaders:Dy,HttpStatusCode:Py,formToJSON:Iy,getAdapter:Oy,mergeConfig:By,create:My}=ke,dt={baseURL:"",timeout:6e4,getToken:void 0};function Uo(e={}){e.baseURL!==void 0&&(dt.baseURL=e.baseURL),e.timeout!==void 0&&(dt.timeout=e.timeout),e.getToken!==void 0&&(dt.getToken=e.getToken)}const Cu="";function Ru(e){return(e||"").replace(/\/$/,"")||Cu}const Un=ke.create({timeout:dt.timeout});Un.interceptors.request.use(e=>{var n;e.baseURL=Ru(dt.baseURL||e.baseURL),e.timeout=dt.timeout;const t=(n=dt.getToken)==null?void 0:n.call(dt);return t&&(e.headers.Authorization=t),e}),Un.interceptors.response.use(e=>{const t=e.config,n=e.data;return t.responseType==="blob"?e:t.noCode?n:n&&![0,200].includes(n.code)?Promise.reject(new Error(n.msg||n.message||"服务错误")):n},e=>Promise.reject(e));function ye(e){return Un.request(e)}const zo=e=>ye({url:"/server/repository/flowdef/event/latest",method:"post",data:e}),Fr=e=>ye({url:"/server/app/event/list",method:"get",data:e}),$r=e=>ye({url:"/server/repository/flowdef/event/query",method:"post",data:e}),Vr=(e,t)=>ye({url:`/console/plugin/simulate/event/page/draft/${e.currentPage}/${e.pageSize}`,method:"post",data:t}),Ho=e=>ye({url:"/console/plugin/simulate/event/delete",method:"post",data:e}),Wo=e=>ye({url:"/console/plugin/simulate",method:"post",data:e}),qo=e=>ye({url:"/server/runtime/event/start",method:"post",data:e}),jr=e=>ye({url:"/server/runtime/event/quickStart",method:"post",data:e}),zn=e=>ye({url:"/server/runtime/event/delete",method:"post",data:e}),Yo=e=>ye({url:"/server/runtime/event/messageEventReceived",method:"post",data:e}),Hn=e=>ye({url:"/server/work/event/query",method:"post",data:e}),Ur=e=>ye({url:"/server/history/workinst/event/query",method:"post",data:e}),zr=e=>ye({url:"/server/operate/def/event/get",method:"post",data:e}),Hr=e=>ye({url:"/server/task/event/claim",method:"post",data:e}),Wr=e=>ye({url:"/server/task/event/withdraw",method:"post",data:e}),qr=e=>ye({url:"/server/task/event/rollback",method:"post",data:e}),Yr=e=>ye({url:"/server/task/event/recyle",method:"post",data:e}),Kr=e=>ye({url:"/server/task/event/complete",method:"post",data:e}),Gr=e=>ye({url:"/server/task/event/turnBefore",method:"post",data:e}),Xr=e=>ye({url:"/server/task/event/turnAfter",method:"post",data:e}),Jr=e=>ye({url:"/server/runtime/event/suspend",method:"post",data:e}),Zr=e=>ye({url:"/server/runtime/event/activate",method:"post",data:e}),Qr=e=>ye({url:"/server/runtime/event/terminate",method:"post",data:e}),ei=e=>ye({url:`/console/flowdef/event/download/procdefId/${e.procdefId}/extname/bpmn`,method:"get",noCode:!0}),ti=e=>ye({url:"/server/task/event/send",method:"post",data:e}),Wn=e=>ye({url:"/server/model/event/get/firsthandle",method:"post",data:e}),Ko=Wn,qn=e=>ye({url:"/server/assignment/event/query",method:"post",data:e}),ni=(e="")=>ye({url:`/console/plugin/identify/usertree/organ/event/tree/${e}`,method:"get"}),ri=e=>ye({url:"/server/model/event/get/succeding",method:"post",data:e}),ii=e=>ye({url:"/server/task/event/jump",method:"post",data:e}),oi=e=>ye({url:"/server/model/event/get/usertasks",method:"post",data:e}),Tu=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:Zr,claimTask:Hr,completeTask:Kr,deleteDraftTask:Ho,deleteProcessInstance:zn,doneTaskList:Ur,downloadBpmn:ei,draftFlowList:zo,draftTaskList:Vr,flowStartNodeList:Ko,getAppList:Fr,getFirstHandleNodes:Wn,getFlowList:$r,getOptList:zr,jumpTask:ii,nextSendNode:ri,nodeAssistant:qn,organUserTree:ni,quickStart:jr,receiveMessageEvent:Yo,recycleTask:Yr,revocationTask:Wr,rollbackTask:qr,saveDraft:Wo,sendTask:ti,startDraft:qo,startNodes:oi,suspendFlow:Jr,terminateFlow:Qr,todoTaskList:Hn,turnAfterTask:Xr,turnBeforeTask:Gr},Symbol.toStringTag,{value:"Module"})),Go=3e3;function Yn(e){if(e!==void 0)return e;if(typeof window>"u"||typeof document>"u")return Go;let t=Go-2;return document.querySelectorAll([".ui-overlay",".ui-overlay-message-box",".ui-modal",".el-overlay",".el-overlay-message-box"].join(",")).forEach(r=>{const i=Number.parseInt(window.getComputedStyle(r).zIndex,10);Number.isFinite(i)&&(t=Math.max(t,i))}),t+2}const Nu={class:"ui-flow-jump"},Du={class:"dialog-footer"},Xo=wt(l.defineComponent({name:"UiFlowJump",__name:"FlowJump",props:{processDefinitionId:{},workId:{default:""},processInstanceId:{default:""},dealUser:{default:()=>({})},modelValue:{type:Boolean,default:!1},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"跳转"},dialogWidth:{default:"960px"},zIndex:{}},emits:["update:modelValue","click","open","close","beforeJump","afterJump","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(),s=l.ref(!1),f=l.ref(!1),d=l.ref(!1),h=l.ref([]),m=l.ref([]),R=l.ref(""),$=l.ref("");let Y=0;const W=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),P=l.computed(()=>String(r.dealUser.name||W.value)),C={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:B=>B.hasChild===!1};function O(B){return B?String(B.id||B.activityId||""):""}function y(B){return B?String(B.activityName||B.name||B.id||B.activityId||""):""}function v(B){return Array.isArray(B)?B.map(I=>{const F=I||{},A=O(F);return{...F,id:A,name:y(F)}}).filter(I=>I.id):[]}function S(B){return B.map(I=>{const F=I||{},A=String(F.id||F.userId||""),k=String(F.ntype||"user"),V=Array.isArray(F.childs)?F.childs:Array.isArray(F.children)?F.children:void 0;return{...F,id:A,value:A,label:String(F.caption||F.name||F.id||F.userId||""),caption:String(F.caption||F.name||F.id||F.userId||""),ntype:k,hasChild:!!(F.hasChild||V!=null&&V.length),disabled:k!=="user",children:V?S(V):void 0}}).filter(I=>I.id)}function T(){return W.value?[{id:W.value,value:W.value,label:P.value,caption:P.value,name:P.value,ntype:"user",hasChild:!1,disabled:!1}]:[]}async function E(){const B=String(r.processDefinitionId||""),I=++Y;if(!B)return h.value=[],h.value;f.value=!0;try{const F=await oi({processDefinitionId:B}),A=v(F==null?void 0:F.data);return I!==Y||B!==String(r.processDefinitionId||"")?A:(h.value=A,h.value)}catch(F){throw I===Y&&(h.value=[]),i("error",F),F}finally{I===Y&&(f.value=!1)}}async function x(B="",I){const F=await qn({processDefinitionId:r.processDefinitionId,activityId:R.value,ntype:I,parentId:B});return S(Array.isArray(F.data)?F.data:[])}async function z(){if(m.value=[],$.value="",!R.value)return[];d.value=!0;try{const B=await x();m.value=B.length?B:T()}catch{m.value=T()}finally{d.value=!1}return m.value.length===1&&m.value[0].ntype==="user"&&($.value=m.value[0].id),m.value}async function M(B,I){if(B.level===0){I(m.value);return}if(B.data.hasChild===!1||B.data.ntype==="user"){I([]);return}if(Array.isArray(B.data.children)&&B.data.children.length){I(B.data.children);return}try{const F=await x(String(B.data.id),String(B.data.ntype||""));I(F)}catch(F){i("error",F),I([])}}async function _(){await z()}function q(B,I){const F=B?O(B):R.value,A=String(I||$.value||W.value);return{workId:r.workId,flowNodeAssignee:{activityId:F,assignees:[{name:A,userId:A}]},variables:{}}}async function ae(B){const I=B||q();i("beforeJump",I),s.value=!0;try{const F=await ii(I);return i("afterJump",F,I),F}catch(F){throw i("error",F),F}finally{s.value=!1}}async function J(){if(!r.workId){ge.ElMessage.warning("当前任务缺少 workId,无法执行跳转");return}if(!R.value){ge.ElMessage.warning("请选择开始节点");return}if(!$.value){ge.ElMessage.warning("请选择办理人");return}try{await ae(),o.value=!1,ge.ElMessage.success("跳转任务成功")}catch{}}async function G(){a.value=Yn(r.zIndex),o.value=!0,R.value="",$.value="",m.value=[],i("open");try{await E()}catch{}}function X(){o.value=!1}function re(){i("close")}function Q(){i("click"),G()}return l.watch(()=>r.modelValue,B=>{B&&!o.value&&G(),!B&&o.value&&(o.value=!1)}),l.watch(o,B=>i("update:modelValue",B)),l.watch(()=>r.processDefinitionId,()=>{R.value="",$.value="",m.value=[],r.processDefinitionId?E().catch(()=>{}):h.value=[]}),l.watch(W,()=>{o.value&&R.value&&z()}),l.onMounted(()=>{r.modelValue?G():r.processDefinitionId&&E().catch(()=>{})}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:f,assigneeLoading:d,startNodeList:h,selectedActivityId:R,selectedAssigneeId:$,open:G,close:X,getStartNodes:E,assembleData:q,jump:ae}),(B,I)=>{const F=l.resolveComponent("el-button"),A=l.resolveComponent("el-option"),k=l.resolveComponent("el-select"),V=l.resolveComponent("el-form-item"),de=l.resolveComponent("el-tree-select"),se=l.resolveComponent("el-form"),p=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Nu,[e.showTrigger?(l.openBlock(),l.createBlock(F,{key:0,type:"primary",loading:s.value,onClick:Q},{default:l.withCtx(()=>[l.renderSlot(B.$slots,"default",{},()=>[I[3]||(I[3]=l.createTextVNode("跳转",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(p,{modelValue:o.value,"onUpdate:modelValue":I[2]||(I[2]=u=>o.value=u),"append-to-body":"",class:"ui-flow-jump-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":a.value,onClosed:re},{footer:l.withCtx(()=>[l.createElementVNode("div",Du,[l.createVNode(F,{type:"primary",loading:s.value,onClick:J},{default:l.withCtx(()=>[...I[4]||(I[4]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(F,{disabled:s.value,onClick:X},{default:l.withCtx(()=>[...I[5]||(I[5]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createVNode(se,{class:"jump-form","label-width":"108px"},{default:l.withCtx(()=>[l.createVNode(V,{label:"开始节点",required:""},{default:l.withCtx(()=>[l.createVNode(k,{modelValue:R.value,"onUpdate:modelValue":I[0]||(I[0]=u=>R.value=u),clearable:"",filterable:"",loading:f.value,teleported:!1,placeholder:"请选择",style:{width:"100%"},onChange:_},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,u=>(l.openBlock(),l.createBlock(A,{key:O(u),label:y(u),value:O(u)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),l.createVNode(V,{label:"办理人",required:""},{default:l.withCtx(()=>[l.createVNode(de,{modelValue:$.value,"onUpdate:modelValue":I[1]||(I[1]=u=>$.value=u),"check-strictly":"",clearable:"",data:m.value,disabled:!R.value,load:M,loading:d.value,props:C,lazy:"","node-key":"id",teleported:!1,placeholder:"请选择","render-after-expand":!1,style:{width:"100%"}},null,8,["modelValue","data","disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-6ee553e3"]]),Pu={class:"ui-flow-send"},Iu={class:"send-panel"},Ou={class:"current-activity"},Bu={class:"node-groups"},Mu=["onClick"],Lu={class:"send-center"},Fu={class:"assignee-transfer"},$u={class:"assignee-box"},Vu={class:"tree-node"},ju={key:1,class:"candidate-list"},Uu={class:"assignee-box selected-list"},zu={key:0,class:"node-state"},Hu={class:"opinion-panel"},Wu={class:"dialog-footer"},ai=wt(l.defineComponent({name:"UiFlowSend",__name:"FlowSend",props:{processDefinitionId:{},activity:{},workId:{},processInstanceId:{default:""},variables:{default:()=>({})},dealUser:{default:()=>({})},bpmnXml:{default:""},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},zIndex:{},defaultOpinion:{default:""},modelValue:{type:Boolean,default:!1},forceSingleAssignee:{type:Boolean,default:!1},deleteInstanceOnCancel:{type:Boolean,default:!1}},emits:["update:modelValue","click","open","close","nextNodesResolved","beforeSend","afterSend","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(),s=l.ref(!1),f=l.ref(!1),d=l.ref(!1),h=l.ref(!1),m=l.ref([]),R=l.ref([]),$=l.ref([]),Y=l.ref([]),W=l.ref([]),P=l.ref(!1),C=l.ref(""),O=l.ref("nextNode"),y=l.ref(""),v=l.ref([]),S=l.ref(!1),T=l.ref(0),E=l.ref(),x=l.ref(!1),z={children:"childs",label:"caption",isLeaf:j=>j.hasChild===!1},M=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),_=l.computed(()=>R.value.find(j=>q(j)===C.value));function q(j){return j?String(j.id||j.activityId||""):""}function ae(j){return`${j.activity}:${j.id}`}function J(j){return typeof j=="boolean"?"boolean":typeof j=="number"?Number.isInteger(j)?"integer":"double":j instanceof Date?"date":"string"}function G(){v.value=Object.entries(r.variables).map(([j,U])=>({variableName:j,variableType:J(U),variableValue:U})),S.value=!1}function X(){return v.value.reduce((j,U)=>(U.variableName&&(j[U.variableName]=U.variableValue),j),{})}function re(){C.value="",m.value=[],R.value=[],$.value=[],Y.value=[],W.value=[],P.value=!1}function Q(j){if(!r.bpmnXml||!j||typeof DOMParser>"u")return;const U=new DOMParser().parseFromString(r.bpmnXml,"text/xml");return Array.from(U.getElementsByTagName("*")).find(Z=>Z.getAttribute("id")===j)}function B(j){if(r.forceSingleAssignee)return!0;const U=Q(j);if(!U)return!0;if(Array.from(U.children||[]).some(Re=>Re.localName==="multiInstanceLoopCharacteristics"))return!1;const L=["assigneUser","candidateUser"],pe=Array.from(U.getElementsByTagName("*")).filter(Re=>Re.localName==="properties"&&L.includes(Re.getAttribute("type")||"")).flatMap(Re=>Array.from(Re.getElementsByTagName("*")).filter(Ye=>Ye.localName==="property"));if(pe.some(Re=>{const Ye=Re.getAttribute("assignType");return!!(Ye&&Ye!=="user")}))return!1;const we=pe.map(Re=>Re.getAttribute("value")).filter(Boolean),et=U.getAttribute("camunda:assignee")||"";return et&&!et.includes("${")&&we.push(...et.split(",").filter(Boolean)),new Set(we).size<=1}function I(j){var U;return((U=R.value.find(Z=>q(Z)===j))==null?void 0:U.isSingleAssignee)!==!1}function F(j,U){const Z=q(U),L=String(U.activityName||U.name||Z);return j.map(pe=>{const we=pe||{};return{...we,id:String(we.id||""),caption:String(we.caption||we.name||we.id||""),ntype:String(we.ntype||"user"),hasChild:we.hasChild,activity:Z,activityName:L,disabled:we.ntype!=="user",childs:Array.isArray(we.childs)?F(we.childs,U):void 0}})}async function A(j,U){h.value=!0;try{const Z=await qn({processDefinitionId:r.processDefinitionId,activityId:q(j),userId:M.value,...U?{parentId:U}:{}}),L=F(Array.isArray(Z.data)?Z.data:[],j);return U?L:C.value!==q(j)?[]:(P.value=L.some(pe=>["router","organ"].includes(pe.ntype||"")),P.value?(Y.value=L,$.value=[],await l.nextTick(),c(L)):(Y.value=[],$.value=L),L)}catch(Z){throw i("error",Z),Z}finally{h.value=!1}}async function k(j,U){if(j.level===0){U(Y.value);return}if(j.data.hasChild===!1||!_.value){U([]);return}if(Array.isArray(j.data.childs)&&j.data.childs.length){U(j.data.childs),await l.nextTick(),c(j.data.childs);return}try{const Z=await A(_.value,String(j.data.id));U(Z),await l.nextTick(),c(Z)}catch{U([])}}async function V(j=X()){const U=++T.value;f.value=!0,d.value=!1,re();try{const Z=await ri({processDefinitionId:r.processDefinitionId,activityId:r.activity.activityId,processInstanceId:r.processInstanceId,workId:r.workId,variables:j});if(U!==T.value)return[];m.value=Z.data||[],R.value=m.value.filter(pe=>pe.flowElementType==="USER_TASK").map(pe=>({...pe,isSingleAssignee:B(q(pe))})),d.value=!0,S.value=!1,i("nextNodesResolved",m.value);const L=R.value[0];if(L){C.value=q(L);try{await A(L)}catch{}}return m.value}catch(Z){throw U===T.value&&(d.value=!1),i("error",Z),Z}finally{U===T.value&&(f.value=!1)}}async function de(j){C.value=q(j),$.value=[],Y.value=[],P.value=!1;try{await A(j)}catch{}}function se(j){return W.value.some(U=>ae(U)===ae(j))}function p(j,U){const Z=ae(j);U?(I(j.activity)&&(W.value=W.value.filter(L=>L.activity!==j.activity)),W.value.some(L=>ae(L)===Z)||W.value.push({...j})):W.value=W.value.filter(L=>ae(L)!==Z)}function u(j,U){j.ntype==="user"&&(U&&I(j.activity)&&W.value.filter(L=>L.activity===j.activity).forEach(L=>{var pe;return(pe=E.value)==null?void 0:pe.setChecked(L.id,!1,!1)}),p(j,U))}function c(j){j.forEach(U=>{var Z,L;U.ntype==="user"&&se(U)&&((Z=E.value)==null||Z.setChecked(U.id,!0,!1)),(L=U.childs)!=null&&L.length&&c(U.childs)})}function g(j){var U;W.value=W.value.filter(Z=>ae(Z)!==ae(j)),P.value&&((U=E.value)==null||U.setChecked(j.id,!1,!1))}function b(){const j=W.value.reduce((U,Z)=>{let L=U.get(Z.activity);return L||(L={activityId:Z.activity,assignees:[]},U.set(Z.activity,L)),L.assignees.some(pe=>pe.userId===Z.id)||L.assignees.push({name:Z.id,userId:Z.id}),U},new Map);return{workId:r.workId,flowNodeAssignees:Array.from(j.values()),variables:X(),opinion:y.value}}async function D(j){const U=j||b();i("beforeSend",U),s.value=!0;try{const Z=await ti(U);return i("afterSend",Z,U),Z}catch(Z){throw i("error",Z),Z}finally{s.value=!1}}async function ee(){if(f.value){ge.ElMessage.warning("正在计算下一环节,请稍后再发送");return}if(S.value||!d.value){O.value="variables",ge.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const j=R.value.find(U=>!W.value.some(Z=>Z.activity===q(U)));if(j){C.value=q(j),O.value="nextNode",ge.ElMessage.warning(`请选择“${j.activityName||j.name||q(j)}”的办理人`),await de(j);return}try{await D(),x.value=!0,o.value=!1,ge.ElMessage.success("发送成功")}catch{}}async function N(){a.value=Yn(r.zIndex),o.value=!0,x.value=!1,y.value=r.defaultOpinion,O.value="nextNode",G(),i("open");try{await V(X())}catch{}}function K(){o.value=!1}function H(){i("close"),!(!r.deleteInstanceOnCancel||x.value)&&r.processInstanceId&&zn({processInstanceId:r.processInstanceId}).catch(j=>i("error",j))}function te(){i("click"),N()}return l.watch(()=>r.modelValue,j=>{j&&!o.value&&N(),!j&&o.value&&(o.value=!1)}),l.watch(o,j=>i("update:modelValue",j)),l.onMounted(()=>{r.modelValue&&N()}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:f,nodeResolved:d,nextNodes:m,open:N,close:K,getNextNode:V,assembleData:b,send:D}),(j,U)=>{const Z=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Pu,[e.showTrigger?(l.openBlock(),l.createBlock(l.unref(ge.ElButton),{key:0,type:"primary",loading:s.value,onClick:te},{default:l.withCtx(()=>[l.renderSlot(j.$slots,"default",{},()=>[U[3]||(U[3]=l.createTextVNode("发送",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(l.unref(ge.ElDialog),{modelValue:o.value,"onUpdate:modelValue":U[2]||(U[2]=L=>o.value=L),"append-to-body":"",class:"ui-flow-send-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":a.value,onClosed:H},{footer:l.withCtx(()=>[l.createElementVNode("div",Wu,[l.createVNode(l.unref(ge.ElButton),{type:"primary",loading:s.value,onClick:ee},{default:l.withCtx(()=>[...U[10]||(U[10]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(l.unref(ge.ElButton),{disabled:s.value,onClick:K},{default:l.withCtx(()=>[...U[11]||(U[11]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createElementVNode("div",Iu,[l.createElementVNode("div",Ou,[U[4]||(U[4]=l.createTextVNode(" 当前环节:",-1)),l.createElementVNode("strong",null,l.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),l.createElementVNode("aside",Bu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(R.value,L=>(l.openBlock(),l.createElementBlock("button",{key:q(L),class:l.normalizeClass(["node-group",{active:C.value===q(L)}]),type:"button",onClick:pe=>de(L)},[U[5]||(U[5]=l.createElementVNode("span",{class:"group-avatar"},"♟",-1)),l.createElementVNode("span",null,l.toDisplayString(L.activityName||L.name||q(L)),1)],10,Mu))),128)),d.value&&!R.value.length?(l.openBlock(),l.createBlock(l.unref(ge.ElEmpty),{key:0,description:"没有下一用户任务","image-size":44})):l.createCommentVNode("",!0)]),l.createElementVNode("section",Lu,[l.createElementVNode("div",Fu,[l.withDirectives((l.openBlock(),l.createElementBlock("div",$u,[P.value?(l.openBlock(),l.createBlock(l.unref(ge.ElTree),{key:0,ref_key:"assigneeTreeRef",ref:E,class:"assignee-tree",data:Y.value,load:k,props:z,"check-on-click-node":"","check-strictly":"",lazy:"","node-key":"id","show-checkbox":"",onCheckChange:u},{default:l.withCtx(({data:L})=>[l.createElementVNode("span",Vu,[l.createElementVNode("span",null,l.toDisplayString(L.ntype==="user"?"●":"▣"),1),l.createElementVNode("span",null,l.toDisplayString(L.caption||L.id),1)])]),_:1},8,["data"])):(l.openBlock(),l.createElementBlock("div",ju,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList($.value,L=>(l.openBlock(),l.createBlock(l.unref(ge.ElCheckbox),{key:ae(L),"model-value":se(L),class:"candidate-item",onChange:pe=>p(L,!!pe)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(L.caption||L.name||L.id),1)]),_:2},1032,["model-value","onChange"]))),128)),!h.value&&!$.value.length?(l.openBlock(),l.createBlock(l.unref(ge.ElEmpty),{key:0,description:"暂无可选办理人","image-size":44})):l.createCommentVNode("",!0)]))])),[[Z,h.value]]),U[7]||(U[7]=l.createElementVNode("div",{class:"transfer-arrows","aria-hidden":"true"},[l.createElementVNode("span",null,"→"),l.createElementVNode("span",null,"←")],-1)),l.createElementVNode("div",Uu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(W.value,L=>(l.openBlock(),l.createElementBlock("div",{key:ae(L),class:"selected-user"},[l.createElementVNode("span",null,l.toDisplayString(L.caption||L.name||L.id),1),l.createVNode(l.unref(ge.ElButton),{link:"",type:"danger",onClick:pe=>g(L)},{default:l.withCtx(()=>[...U[6]||(U[6]=[l.createTextVNode("移除",-1)])]),_:1},8,["onClick"])]))),128)),W.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.unref(ge.ElEmpty),{key:0,description:"暂未选择办理人","image-size":44}))])]),l.createVNode(l.unref(ge.ElTabs),{modelValue:O.value,"onUpdate:modelValue":U[0]||(U[0]=L=>O.value=L),type:"card",class:"send-tabs"},{default:l.withCtx(()=>[l.createVNode(l.unref(ge.ElTabPane),{label:"下一环节",name:"nextNode"},{default:l.withCtx(()=>[f.value?(l.openBlock(),l.createElementBlock("div",zu,"正在根据流程变量计算下一环节...")):(l.openBlock(),l.createBlock(l.unref(ge.ElTable),{key:1,data:W.value,border:"",height:"190"},{empty:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(R.value.length?"请选择办理人":"暂无数据"),1)]),default:l.withCtx(()=>[l.createVNode(l.unref(ge.ElTableColumn),{prop:"activityName",label:"办理环节","min-width":"150"}),l.createVNode(l.unref(ge.ElTableColumn),{prop:"caption",label:"办理人","min-width":"130"},{default:l.withCtx(L=>{var pe,we,et;return[l.createTextVNode(l.toDisplayString(((pe=L==null?void 0:L.row)==null?void 0:pe.caption)||((we=L==null?void 0:L.row)==null?void 0:we.name)||((et=L==null?void 0:L.row)==null?void 0:et.id)||""),1)]}),_:1}),l.createVNode(l.unref(ge.ElTableColumn),{label:"办理方式",width:"120"},{default:l.withCtx(L=>[l.createTextVNode(l.toDisplayString(L!=null&&L.row?I(L.row.activity)?"单人单办":"多人办理":""),1)]),_:1}),l.createVNode(l.unref(ge.ElTableColumn),{label:"操作",width:"90",align:"center"},{default:l.withCtx(L=>[L!=null&&L.row?(l.openBlock(),l.createBlock(l.unref(ge.ElButton),{key:0,link:"",type:"danger",onClick:pe=>g(L.row)},{default:l.withCtx(()=>[...U[8]||(U[8]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"]))]),_:1})]),_:1},8,["modelValue"])]),l.createElementVNode("aside",Hu,[U[9]||(U[9]=l.createElementVNode("label",null,"填写意见:",-1)),l.createVNode(l.unref(ge.ElInput),{modelValue:y.value,"onUpdate:modelValue":U[1]||(U[1]=L=>y.value=L),maxlength:"500",placeholder:"请输入意见",resize:"none","show-word-limit":"",type:"textarea"},null,8,["modelValue"])])])]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-2fedc5b4"]]),qu={class:"button-group-wrapper"},Yu={key:0,class:"button-state"},Ku={key:0,class:"line"},Gu={class:"sign-selector"},Xu={class:"selected-sign-user"},Ju={class:"sign-dialog-footer"},Zu=wt(l.defineComponent({name:"UiFlowButtons",__name:"FlowButtons",props:{processInstanceId:{default:""},processDefinitionId:{default:""},activityId:{default:""},activityName:{default:""},workId:{default:""},taskId:{default:""},dealUserId:{default:""},dealUserName:{default:""},variables:{default:()=>({})},autoResolveWork:{type:Boolean,default:!0},autoHandleDialogs:{type:Boolean,default:!0},forceSingleAssignee:{type:Boolean,default:!1},dialogZIndex:{},beforeAction:{},afterAction:{}},emits:["executeAction","afterAction","workResolved","error"],setup(e,{expose:t,emit:n}){let r=0;const i=e,o=n,a=l.ref([]),s=l.ref(!1),f=l.ref(),d=l.ref(!1),h=l.ref(!1),m=l.ref(),R=l.ref(),$=l.ref(!1),Y=l.ref("turnBefore"),W=l.ref(!1),P=l.ref(!1),C=l.ref([]),O=l.ref(),y=l.computed(()=>Y.value==="turnBefore"?"前加签":"后加签"),v={children:"children",label:"caption",disabled:"disabled",isLeaf:"isLeaf"};function S(N,...K){for(const H of K){const te=N==null?void 0:N[H];if(te!=null&&String(te))return String(te)}return""}function T(N){if(Array.isArray(N))return N;if(!N||typeof N!="object")return[];const K=N;for(const H of["records","list","content","rows"])if(Array.isArray(K[H]))return K[H];return[]}const E=l.computed(()=>i.workId||S(f.value,"workId","id")),x=l.computed(()=>i.processInstanceId||S(f.value,"processInstanceId")),z=l.computed(()=>i.processDefinitionId||S(f.value,"processDefinitionId")),M=l.computed(()=>i.taskId||S(f.value,"taskId","taskInstanceId")),_=l.computed(()=>i.activityId||S(f.value,"activityId")),q=l.computed(()=>i.activityName||S(f.value,"activityName")),ae=l.computed(()=>({id:i.dealUserId,userId:i.dealUserId,name:i.dealUserName||i.dealUserId}));function J(N="",K=""){return{action:N,actionLabel:K,workId:E.value,processInstanceId:x.value||void 0,processDefinitionId:z.value||void 0,taskId:M.value||void 0,activityId:_.value||void 0,activityName:q.value||void 0,workData:f.value}}const G=l.computed(()=>{const N=m.value;if(!((N==null?void 0:N.action)!=="taskSend"||!N.workId||!N.processDefinitionId||!N.activityId))return{workId:N.workId,processDefinitionId:N.processDefinitionId,processInstanceId:N.processInstanceId||"",activity:{activityId:N.activityId,activityName:N.activityName}}}),X=l.computed(()=>{const N=m.value;if(!(!["jump","taskJump"].includes((N==null?void 0:N.action)||"")||!(N!=null&&N.workId)||!N.processDefinitionId))return{workId:N.workId,processDefinitionId:N.processDefinitionId,processInstanceId:N.processInstanceId||""}});async function re(){if(i.workId)return f.value=void 0,J();if(!i.autoResolveWork)return J();if(!i.processInstanceId||!i.dealUserId)throw new Error("FlowButtons 缺少 workId;自动解析待办时必须传入 processInstanceId 和 dealUserId");const N=await Hn({currentPage:1,pageSize:100,assignee:i.dealUserId,assigne:i.dealUserId,userId:i.dealUserId,processInstanceId:i.processInstanceId}),H=T(N.data).find(j=>S(j,"processInstanceId")===i.processInstanceId);if(!H)throw new Error("当前用户在该流程实例中没有可办理的待办任务");f.value=H;const te=J();return o("workResolved",te),te}function Q(N){return N.map(K=>{const H=K||{},te=String(H.id||H.userId||""),j=String(H.ntype||""),U=Array.isArray(H.childs)?H.childs:Array.isArray(H.children)?H.children:void 0;return{...H,id:te,caption:String(H.caption||H.name||te),ntype:j,hasChild:!!(H.hasChild||U!=null&&U.length),isLeaf:j==="user"||!H.hasChild&&!(U!=null&&U.length),disabled:j!=="user",children:U?Q(U):void 0}}).filter(K=>K.id)}async function B(N=""){const K=await ni(N);return Q(Array.isArray(K.data)?K.data:[])}async function I(N,K){const H=N.level===0?"":String(N.data.id||"");if(N.level>0&&(N.data.ntype==="user"||N.data.hasChild===!1)){K([]);return}W.value=!0;try{const te=await B(H);N.level===0&&(C.value=te),K(te)}catch(te){o("error",te),K([])}finally{W.value=!1}}function F(N){N.ntype==="user"&&(O.value=N)}function A(){O.value=void 0,C.value=[]}function k(N){if(!M.value){ge.ElMessage.error("当前待办缺少任务实例 ID,无法加签");return}Y.value=N,R.value=Yn(i.dialogZIndex),$.value=!0}async function V(){var K;if(!((K=O.value)!=null&&K.id)){ge.ElMessage.warning("请选择一名机构人员");return}const N=Y.value;P.value=!0;try{const te=await(N==="turnBefore"?Gr:Xr)({workId:E.value,taskId:M.value,assignee:O.value.id});$.value=!1,se(N,te,J(N,y.value))}catch(H){o("error",H)}finally{P.value=!1}}async function de(){s.value=!0,a.value=[];try{if(await re(),!E.value)return a.value;const N=await zr({workId:E.value});return a.value=Array.isArray(N.data)?N.data:[],a.value}finally{s.value=!1}}function se(N,K,H){var te;(te=i.afterAction)==null||te.call(i,N,K,H),o("afterAction",N,K,H)}function p(N,K){o("executeAction",N,K)}function u(N){return{processActivate:"restore",processTerminate:"terminate",processSuspend:"hang",processSupspend:"hang"}[N]||N}async function c(N,K,H){var pe;const te=Yn(i.dialogZIndex),j=`ui-flow-confirm-overlay-${++r}`,U=ge.ElMessageBox.confirm(`是否${K}此任务?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",modalClass:j});await l.nextTick(),(pe=document.querySelector(`.${j}`))==null||pe.style.setProperty("z-index",String(te),"important"),await U;const Z={workId:H.workId};let L;switch(u(N)){case"revocation":case"taskWithdraw":L=await Wr(Z);break;case"taskRecyle":L=await Yr(Z);break;case"hang":L=await Jr({processInstanceIds:[H.processInstanceId||""]});break;case"restore":L=await Zr(Z);break;case"terminate":L=await Qr(Z);break;case"taskComplete":L=await Kr({...Z,variables:i.variables});break;case"taskRollback":L=await qr(Z);break;case"taskClaim":if(!i.dealUserId){p(N,H);return}L=await Hr({...Z,assignee:i.dealUserId});break;default:p(N,H);return}se(N,L,H),u(N)==="taskClaim"&&await de()}async function g(N){var K;try{const H=N.name;E.value||await de();const te=J(H,N.label);if(!te.workId)throw new Error("当前待办缺少 workId,无法执行流程操作");if(await((K=i.beforeAction)==null?void 0:K.call(i,H,te))===!1)return;if(["turnBefore","taskTurnBefore"].includes(H)){k("turnBefore");return}if(["turnAfter","taskTurnAfter"].includes(H)){k("turnAfter");return}if(H==="taskSend"&&i.autoHandleDialogs){if(!te.processDefinitionId||!te.activityId)throw new Error("当前待办缺少 processDefinitionId 或 activityId,无法发送");m.value=te,d.value=!0;return}if(["jump","taskJump"].includes(H)&&i.autoHandleDialogs){if(!te.processDefinitionId)throw new Error("当前待办缺少 processDefinitionId,无法跳转");m.value=te,h.value=!0;return}if(["save","start","taskSend","jump","taskJump"].includes(H)){p(H,te);return}await c(H,N.label,te)}catch(H){H!=="cancel"&&H!=="close"&&o("error",H)}}function b(N,K){const H={...m.value||J("taskSend","发送"),requestData:K};se("taskSend",N,H),m.value=void 0}function D(N,K){const H={...m.value||J("taskJump","跳转"),requestData:K};se(H.action,N,H),m.value=void 0}function ee(N){o("error",N)}return l.watch(()=>[i.workId,i.processInstanceId,i.dealUserId],()=>{d.value=!1,h.value=!1,m.value=void 0,de().catch(N=>o("error",N))},{immediate:!0}),t({loading:s,optList:a,resolvedWorkData:f,getAvailableActions:de,resolveCurrentWork:re,executeAction:g}),(N,K)=>{const H=l.resolveComponent("el-tree"),te=l.resolveComponent("el-button"),j=l.resolveComponent("el-dialog"),U=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",qu,[s.value?(l.openBlock(),l.createElementBlock("span",Yu,"正在加载流程操作...")):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(a.value,(Z,L)=>(l.openBlock(),l.createElementBlock("div",{key:Z.name||L,class:"flex-start-r"},[l.renderSlot(N.$slots,"prefix",{action:Z},void 0,!0),l.renderSlot(N.$slots,"default",{action:Z},void 0,!0),l.createVNode(Ji,{type:Z.name,label:Z.label,onClick:pe=>g(Z)},null,8,["type","label","onClick"]),L!==a.value.length-1?(l.openBlock(),l.createElementBlock("div",Ku)):l.createCommentVNode("",!0),l.renderSlot(N.$slots,"suffix",{action:Z},void 0,!0)]))),128)),l.createVNode(j,{modelValue:$.value,"onUpdate:modelValue":K[1]||(K[1]=Z=>$.value=Z),"append-to-body":"",class:"ui-flow-sign-dialog","close-on-click-modal":!1,title:y.value,width:"760px","z-index":R.value,onClosed:A},{footer:l.withCtx(()=>[l.createElementVNode("div",Ju,[l.createVNode(te,{type:"primary",loading:P.value,onClick:V},{default:l.withCtx(()=>[...K[6]||(K[6]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(te,{disabled:P.value,onClick:K[0]||(K[0]=Z=>$.value=!1)},{default:l.withCtx(()=>[...K[7]||(K[7]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>{var Z,L;return[l.withDirectives((l.openBlock(),l.createElementBlock("div",Gu,[K[5]||(K[5]=l.createElementVNode("p",{class:"sign-tip"},"仅可选择一名机构人员",-1)),l.createVNode(H,{data:C.value,load:I,props:v,"highlight-current":"",lazy:"","node-key":"id",onNodeClick:F},null,8,["data"]),l.createElementVNode("div",Xu,[K[4]||(K[4]=l.createTextVNode(" 已选择:",-1)),l.createElementVNode("strong",null,l.toDisplayString(((Z=O.value)==null?void 0:Z.caption)||((L=O.value)==null?void 0:L.name)||"暂无"),1)])])),[[U,W.value]])]}),_:1},8,["modelValue","title","z-index"]),G.value?(l.openBlock(),l.createBlock(ai,{key:2,modelValue:d.value,"onUpdate:modelValue":K[2]||(K[2]=Z=>d.value=Z),activity:G.value.activity,"deal-user":ae.value,"force-single-assignee":e.forceSingleAssignee,"process-definition-id":G.value.processDefinitionId,"process-instance-id":G.value.processInstanceId,"show-trigger":!1,variables:e.variables,"work-id":G.value.workId,"z-index":e.dialogZIndex,onAfterSend:b,onError:ee},null,8,["modelValue","activity","deal-user","force-single-assignee","process-definition-id","process-instance-id","variables","work-id","z-index"])):l.createCommentVNode("",!0),X.value?(l.openBlock(),l.createBlock(Xo,{key:3,modelValue:h.value,"onUpdate:modelValue":K[3]||(K[3]=Z=>h.value=Z),"deal-user":ae.value,"process-definition-id":X.value.processDefinitionId,"process-instance-id":X.value.processInstanceId,"show-trigger":!1,"work-id":X.value.workId,"z-index":e.dialogZIndex,onAfterJump:D,onError:ee},null,8,["modelValue","deal-user","process-definition-id","process-instance-id","work-id","z-index"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-8a8c0f99"]]);function Qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kn={exports:{}},ef=Kn.exports,Jo;function tf(){return Jo||(Jo=1,(function(e,t){(function(n,r){e.exports=r()})(ef,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",f="hour",d="day",h="week",m="month",R="quarter",$="year",Y="date",W="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(J){var G=["th","st","nd","rd"],X=J%100;return"["+J+(G[(X-20)%10]||G[X]||G[0])+"]"}},y=function(J,G,X){var re=String(J);return!re||re.length>=G?J:""+Array(G+1-re.length).join(X)+J},v={s:y,z:function(J){var G=-J.utcOffset(),X=Math.abs(G),re=Math.floor(X/60),Q=X%60;return(G<=0?"+":"-")+y(re,2,"0")+":"+y(Q,2,"0")},m:function J(G,X){if(G.date()<X.date())return-J(X,G);var re=12*(X.year()-G.year())+(X.month()-G.month()),Q=G.clone().add(re,m),B=X-Q<0,I=G.clone().add(re+(B?-1:1),m);return+(-(re+(X-Q)/(B?Q-I:I-Q))||0)},a:function(J){return J<0?Math.ceil(J)||0:Math.floor(J)},p:function(J){return{M:m,y:$,w:h,d,D:Y,h:f,m:s,s:a,ms:o,Q:R}[J]||String(J||"").toLowerCase().replace(/s$/,"")},u:function(J){return J===void 0}},S="en",T={};T[S]=O;var E="$isDayjsObject",x=function(J){return J instanceof q||!(!J||!J[E])},z=function J(G,X,re){var Q;if(!G)return S;if(typeof G=="string"){var B=G.toLowerCase();T[B]&&(Q=B),X&&(T[B]=X,Q=B);var I=G.split("-");if(!Q&&I.length>1)return J(I[0])}else{var F=G.name;T[F]=G,Q=F}return!re&&Q&&(S=Q),Q||!re&&S},M=function(J,G){if(x(J))return J.clone();var X=typeof G=="object"?G:{};return X.date=J,X.args=arguments,new q(X)},_=v;_.l=z,_.i=x,_.w=function(J,G){return M(J,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var q=(function(){function J(X){this.$L=z(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[E]=!0}var G=J.prototype;return G.parse=function(X){this.$d=(function(re){var Q=re.date,B=re.utc;if(Q===null)return new Date(NaN);if(_.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var I=Q.match(P);if(I){var F=I[2]-1||0,A=(I[7]||"0").substring(0,3);return B?new Date(Date.UTC(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,A)):new Date(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,A)}}return new Date(Q)})(X),this.init()},G.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},G.$utils=function(){return _},G.isValid=function(){return this.$d.toString()!==W},G.isSame=function(X,re){var Q=M(X);return this.startOf(re)<=Q&&Q<=this.endOf(re)},G.isAfter=function(X,re){return M(X)<this.startOf(re)},G.isBefore=function(X,re){return this.endOf(re)<M(X)},G.$g=function(X,re,Q){return _.u(X)?this[re]:this.set(Q,X)},G.unix=function(){return Math.floor(this.valueOf()/1e3)},G.valueOf=function(){return this.$d.getTime()},G.startOf=function(X,re){var Q=this,B=!!_.u(re)||re,I=_.p(X),F=function(c,g){var b=_.w(Q.$u?Date.UTC(Q.$y,g,c):new Date(Q.$y,g,c),Q);return B?b:b.endOf(d)},A=function(c,g){return _.w(Q.toDate()[c].apply(Q.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(g)),Q)},k=this.$W,V=this.$M,de=this.$D,se="set"+(this.$u?"UTC":"");switch(I){case $:return B?F(1,0):F(31,11);case m:return B?F(1,V):F(0,V+1);case h:var p=this.$locale().weekStart||0,u=(k<p?k+7:k)-p;return F(B?de-u:de+(6-u),V);case d:case Y:return A(se+"Hours",0);case f:return A(se+"Minutes",1);case s:return A(se+"Seconds",2);case a:return A(se+"Milliseconds",3);default:return this.clone()}},G.endOf=function(X){return this.startOf(X,!1)},G.$set=function(X,re){var Q,B=_.p(X),I="set"+(this.$u?"UTC":""),F=(Q={},Q[d]=I+"Date",Q[Y]=I+"Date",Q[m]=I+"Month",Q[$]=I+"FullYear",Q[f]=I+"Hours",Q[s]=I+"Minutes",Q[a]=I+"Seconds",Q[o]=I+"Milliseconds",Q)[B],A=B===d?this.$D+(re-this.$W):re;if(B===m||B===$){var k=this.clone().set(Y,1);k.$d[F](A),k.init(),this.$d=k.set(Y,Math.min(this.$D,k.daysInMonth())).$d}else F&&this.$d[F](A);return this.init(),this},G.set=function(X,re){return this.clone().$set(X,re)},G.get=function(X){return this[_.p(X)]()},G.add=function(X,re){var Q,B=this;X=Number(X);var I=_.p(re),F=function(V){var de=M(B);return _.w(de.date(de.date()+Math.round(V*X)),B)};if(I===m)return this.set(m,this.$M+X);if(I===$)return this.set($,this.$y+X);if(I===d)return F(1);if(I===h)return F(7);var A=(Q={},Q[s]=r,Q[f]=i,Q[a]=n,Q)[I]||1,k=this.$d.getTime()+X*A;return _.w(k,this)},G.subtract=function(X,re){return this.add(-1*X,re)},G.format=function(X){var re=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||W;var B=X||"YYYY-MM-DDTHH:mm:ssZ",I=_.z(this),F=this.$H,A=this.$m,k=this.$M,V=Q.weekdays,de=Q.months,se=Q.meridiem,p=function(g,b,D,ee){return g&&(g[b]||g(re,B))||D[b].slice(0,ee)},u=function(g){return _.s(F%12||12,g,"0")},c=se||function(g,b,D){var ee=g<12?"AM":"PM";return D?ee.toLowerCase():ee};return B.replace(C,(function(g,b){return b||(function(D){switch(D){case"YY":return String(re.$y).slice(-2);case"YYYY":return _.s(re.$y,4,"0");case"M":return k+1;case"MM":return _.s(k+1,2,"0");case"MMM":return p(Q.monthsShort,k,de,3);case"MMMM":return p(de,k);case"D":return re.$D;case"DD":return _.s(re.$D,2,"0");case"d":return String(re.$W);case"dd":return p(Q.weekdaysMin,re.$W,V,2);case"ddd":return p(Q.weekdaysShort,re.$W,V,3);case"dddd":return V[re.$W];case"H":return String(F);case"HH":return _.s(F,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return c(F,A,!0);case"A":return c(F,A,!1);case"m":return String(A);case"mm":return _.s(A,2,"0");case"s":return String(re.$s);case"ss":return _.s(re.$s,2,"0");case"SSS":return _.s(re.$ms,3,"0");case"Z":return I}return null})(g)||I.replace(":","")}))},G.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},G.diff=function(X,re,Q){var B,I=this,F=_.p(re),A=M(X),k=(A.utcOffset()-this.utcOffset())*r,V=this-A,de=function(){return _.m(I,A)};switch(F){case $:B=de()/12;break;case m:B=de();break;case R:B=de()/3;break;case h:B=(V-k)/6048e5;break;case d:B=(V-k)/864e5;break;case f:B=V/i;break;case s:B=V/r;break;case a:B=V/n;break;default:B=V}return Q?B:_.a(B)},G.daysInMonth=function(){return this.endOf(m).$D},G.$locale=function(){return T[this.$L]},G.locale=function(X,re){if(!X)return this.$L;var Q=this.clone(),B=z(X,re,!0);return B&&(Q.$L=B),Q},G.clone=function(){return _.w(this.$d,this)},G.toDate=function(){return new Date(this.valueOf())},G.toJSON=function(){return this.isValid()?this.toISOString():null},G.toISOString=function(){return this.$d.toISOString()},G.toString=function(){return this.$d.toUTCString()},J})(),ae=q.prototype;return M.prototype=ae,[["$ms",o],["$s",a],["$m",s],["$H",f],["$W",d],["$M",m],["$y",$],["$D",Y]].forEach((function(J){ae[J[1]]=function(G){return this.$g(G,J[0],J[1])}})),M.extend=function(J,G){return J.$i||(J(G,q,M),J.$i=!0),M},M.locale=z,M.isDayjs=x,M.unix=function(J){return M(1e3*J)},M.en=T[S],M.Ls=T,M.p={},M}))})(Kn)),Kn.exports}var nf=tf();const Gn=Qu(nf),rf={class:"colBtns"},of={key:0,class:"table-pagination"},af={class:"left-pagination"},sf={class:"right-pagination"},Zo=wt(l.defineComponent({name:"UiFlowBaseGrid",inheritAttrs:!1,__name:"FlowGrid",props:{data:{default:()=>[]},tableLabel:{default:()=>[]},pageConfig:{default:()=>({currentPage:1,total:0,pageSize:20})},hidePage:{type:Boolean,default:!1},hideSelection:{type:Boolean,default:!1},hideNumber:{type:Boolean,default:!0},operation:{type:Boolean,default:!1},tableHeight:{default:"calc(100% - 45px)"},isFixed:{type:Boolean,default:!1},btnWidth:{default:0},size:{default:"default"}},emits:["page-change","size-change","row-click","row-dblclick"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.useSlots(),a=l.ref(),s=l.ref(),f=l.ref("100%"),d=l.ref(0),h=l.computed(()=>r.tableLabel.filter(E=>{var x;return!((x=E.hiddenCondition)!=null&&x.call(E,E))})),m=l.computed(()=>r.size==="medium"?"default":r.size);function R(E){return E<9?`0${E+1}`:E+1}function $(){var E;(E=s.value)==null||E.clearSelection()}function Y(E,x){var z;(z=s.value)==null||z.toggleRowSelection(E,x)}function W(){var E;(E=s.value)==null||E.toggleAllSelection()}function P(E){var x;(x=s.value)==null||x.setCurrentRow(E)}function C(E){i("page-change",E)}function O(E){i("size-change",E)}function y(){f.value=r.hidePage?"100%":"calc(100% - 45px)"}async function v(){var z;if(!r.operation||r.btnWidth)return;await l.nextTick();const E=((z=a.value)==null?void 0:z.querySelectorAll(".colBtns"))||[];let x=o.operation?120:0;E.forEach(M=>{x=Math.max(x,M.scrollWidth+40)}),d.value=x}function S(E,x,z){var M;r.hideSelection||(M=s.value)==null||M.toggleRowSelection(E),i("row-click",E,x,z)}function T(E,x,z){i("row-dblclick",E,x,z)}return l.watch(()=>[r.hidePage,r.data.length],()=>{y(),v()}),l.onMounted(()=>{window.addEventListener("resize",y),y(),v()}),l.onBeforeUnmount(()=>window.removeEventListener("resize",y)),t({tableRef:s,clearSelection:$,toggleRowSelection:Y,toggleAllSelection:W,setCurrentRow:P,computeHeight:y}),(E,x)=>{const z=l.resolveComponent("el-table-column"),M=l.resolveComponent("el-table"),_=l.resolveComponent("el-pagination");return l.openBlock(),l.createElementBlock("div",{ref_key:"rootRef",ref:a,class:l.normalizeClass({"no-fixed":!e.isFixed}),style:l.normalizeStyle({height:e.tableHeight||"100%"})},[l.createVNode(M,l.mergeProps({ref_key:"tableRef",ref:s},E.$attrs,{"cell-style":{height:"50px"},data:e.data,"header-cell-style":{background:"#fafafa",color:"#45484B",height:"50px"},height:f.value,size:m.value,border:"","cell-class-name":"c-table-cell","current-row-key":"id","header-row-class-name":"c-table-header",onRowClick:S,onRowDblclick:T}),{default:l.withCtx(()=>[e.hideSelection?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(z,{key:0,align:"center",type:"selection",width:"60"})),e.hideNumber?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(z,{key:1,index:R,align:"center",label:"序号",type:"index",width:"60"})),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,q=>(l.openBlock(),l.createBlock(z,{key:q.prop,formatter:q.formatter,label:q.label,"min-width":q.minWidth,prop:q.prop,"show-overflow-tooltip":q.showTooltip,sortable:q.sortable,width:q.width,align:"center"},null,8,["formatter","label","min-width","prop","show-overflow-tooltip","sortable","width"]))),128)),l.renderSlot(E.$slots,"default",{},void 0,!0),e.operation?(l.openBlock(),l.createBlock(z,{key:2,fixed:e.isFixed?"right":!1,width:e.btnWidth||d.value||void 0,align:"center",label:"操作"},{default:l.withCtx(q=>[l.createElementVNode("div",rf,[l.renderSlot(E.$slots,"operation",{row:q.row},void 0,!0)])]),_:3},8,["fixed","width"])):l.createCommentVNode("",!0)]),_:3},16,["data","height","size"]),e.hidePage?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",of,[l.createElementVNode("div",af,[l.renderSlot(E.$slots,"pagination-left",{},void 0,!0)]),l.createElementVNode("div",sf,[l.createVNode(_,{"current-page":e.pageConfig.currentPage,"page-size":e.pageConfig.pageSize,"page-sizes":[10,20,30,40],total:e.pageConfig.total,background:"",layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:C,onSizeChange:O},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-557ddd2c"]]),lf={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},cf=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?Gn(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],uf=[{label:"业务标题",prop:"title",minWidth:"180px"},{label:"当前环节",prop:"currentActivity",minWidth:"180px",formatter:e=>e.currentActivity||"无"},{label:"创建人",prop:"createUserName",minWidth:"150px"},{label:"创建时间",prop:"createdTime",width:"180px"}];function ff(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const df=l.defineComponent({name:"UiFlowGrid",__name:"FlowList",props:{type:{},dealUserId:{default:""},appId:{default:""},appModuleId:{default:""}},emits:["onHandle","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref([]),s=l.ref(!1),f=l.reactive({currentPage:1,pageSize:20,total:0}),d=l.computed(()=>r.type==="draft"?uf:cf);function h(y){return lf[y]||y||""}function m(y,v){i("onHandle",{action:y,workData:ff(v)})}function R(y){i("onHandle",{action:"view",workData:{...y,processDefinitionId:y.processDefinitionId,workId:y.id,workName:y.title}})}function $(y){return`${y}_${Gn().format("YYYYMMDDHHmmss")}`}function Y(y){const v=$(y.name);i("onHandle",{action:"create",workData:{processDefinitionId:y.processDefinitionId,flowName:y.name,title:v,workName:v}})}function W(y){r.type==="todo"&&m("view",y),r.type==="done"&&m("handle",y)}function P(y){f.currentPage=y,O()}function C(y){f.pageSize=y,f.currentPage=1,O()}async function O(){s.value=!0;try{if(r.type==="todo"||r.type==="done"){const v=await(r.type==="todo"?Hn:Ur)({currentPage:f.currentPage,pageSize:f.pageSize,assignee:r.dealUserId});a.value=v.data||[],f.total=Number(v.count||0)}else{const v=(await Vr(f,{appId:r.appId,appModuleId:r.appModuleId,createUserId:r.dealUserId})).data||{};a.value=v.records||[],f.total=Number(v.total||0)}}catch(y){throw i("error",y),y}finally{s.value=!1}}return l.watch(()=>[r.type,r.dealUserId,r.appId,r.appModuleId],()=>{f.currentPage=1,O()}),l.onMounted(O),t({data:a,loading:s,pageConfig:f,gridRef:o,loadTableData:O,onRowDblclick:W,create:Y,buildDefaultBusinessTitle:$}),(y,v)=>{const S=l.resolveComponent("el-table-column"),T=l.resolveComponent("el-button");return l.openBlock(),l.createBlock(Zo,{ref_key:"gridRef",ref:o,data:a.value,"hide-number":!1,"hide-selection":!0,"is-fixed":!0,"page-config":f,"table-label":d.value,operation:"","table-height":"100%",onPageChange:P,onRowDblclick:W,onSizeChange:C},{operation:l.withCtx(({row:E})=>[e.type==="todo"?(l.openBlock(),l.createBlock(T,{key:0,link:"",type:"primary",onClick:l.withModifiers(x=>m("view",E),["stop"])},{default:l.withCtx(()=>[...v[0]||(v[0]=[l.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(l.openBlock(),l.createBlock(T,{key:1,link:"",type:"primary",onClick:l.withModifiers(x=>m("handle",E),["stop"])},{default:l.withCtx(()=>[...v[1]||(v[1]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&E.state==="audit"?(l.openBlock(),l.createBlock(T,{key:2,link:"",type:"primary",onClick:l.withModifiers(x=>R(E),["stop"])},{default:l.withCtx(()=>[...v[2]||(v[2]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[e.type==="done"||e.type==="draft"?(l.openBlock(),l.createBlock(S,{key:0,align:"center",label:"状态",width:"120"},{default:l.withCtx(({row:E})=>[l.createTextVNode(l.toDisplayString(e.type==="done"?h(E.stateName):E.stateLabel),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["data","page-config","table-label"])}}});function nt(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const mn=Object.prototype.toString,pf=Object.prototype.hasOwnProperty;function si(e){return e===void 0}function Zt(e){return e!==void 0}function Qo(e){return e==null}function Ge(e){return mn.call(e)==="[object Array]"}function bt(e){return mn.call(e)==="[object Object]"}function Et(e){return mn.call(e)==="[object Number]"}function Lt(e){const t=mn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function rt(e){return mn.call(e)==="[object String]"}function Qt(e,t){return!Qo(e)&&pf.call(e,t)}function Qe(e,t){const n=li(t);let r;return oe(e,function(i,o){if(n(i,o))return r=i,!1}),r}function hf(e,t){const n=li(t);let r=Ge(e)?-1:void 0;return oe(e,function(i,o){if(n(i,o))return r=o,!1}),r}function en(e,t){const n=li(t);let r=[];return oe(e,function(i,o){n(i,o)&&r.push(i)}),r}function oe(e,t){let n,r;if(si(e))return;const i=Ge(e)?gf:yf;for(let o in e)if(Qt(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function tn(e,t,n){return oe(e,function(r,i){n=t(n,r,i)}),n}function ea(e,t){return!!tn(e,function(n,r,i){return n&&t(r,i)},!0)}function ta(e,t){return!!Qe(e,t)}function mf(e,t){let n=[];return oe(e,function(r,i){n.push(t(r,i))}),n}function na(e){return function(t){return ea(e,function(n,r){return t[r]===n})}}function li(e){return Lt(e)?e:t=>t===e}function yf(e){return e}function gf(e){return Number(e)}function ra(e,t){let n,r,i,o;function a(m){let R=Date.now(),$=m?0:o+t-R;if($>0)return s($);e.apply(i,r),f()}function s(m){n=setTimeout(a,m)}function f(){n&&clearTimeout(n),n=o=r=i=void 0}function d(){n&&a(!0),f()}function h(...m){o=Date.now(),r=m,i=this,n||s(t)}return h.flush=d,h.cancel=f,h}function _t(e,t){return e.bind(t)}function le(e,...t){return Object.assign(e,...t)}function vf(e,t,n){let r=e;return oe(t,function(i,o){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let a=t[o+1],s=r[i];Zt(a)&&Qo(s)&&(s=r[i]=isNaN(+a)?{}:[]),si(a)?si(n)?delete r[i]:r[i]=n:r=s}),e}function wf(e,t){let n={},r=Object(e);return oe(t,function(i){i in r&&(n[i]=e[i])}),n}function bf(e,t){let n={},r=Object(e);return oe(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}var Ef=1e3;function pt(e,t){var n=this;t=t||Ef,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,f=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,f):n.drawConnection(s,a,f)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}pt.prototype.canRender=function(e){},pt.prototype.drawShape=function(e,t){},pt.prototype.drawConnection=function(e,t){},pt.prototype.getShapePath=function(e){},pt.prototype.getConnectionPath=function(e){};function ce(e,t){var n=_e(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function _f(e,t){return ta(t,function(n){return ce(e,n)})}function _e(e){return e&&e.businessObject||e}function Ft(e){return e&&e.di}function $t(e,t){return ce(e,"bpmn:CallActivity")?!1:ce(e,"bpmn:SubProcess")?(t=t||Ft(e),t&&ce(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):ce(e,"bpmn:Participant")?!!_e(e).processRef:!0}function ia(e){if(!(!ce(e,"bpmn:Participant")&&!ce(e,"bpmn:Lane"))){var t=Ft(e).isHorizontal;return t===void 0?!0:t}}function xf(e){return e&&!!_e(e).triggeredByEvent}function Sf(e){return bt(e)&&Qt(e,"waypoints")}function Af(e){return bt(e)&&Qt(e,"labelTarget")}var yn={width:90,height:20},oa=15;function kf(e){return ce(e,"bpmn:Event")||ce(e,"bpmn:Gateway")||ce(e,"bpmn:DataStoreReference")||ce(e,"bpmn:DataObjectReference")||ce(e,"bpmn:DataInput")||ce(e,"bpmn:DataOutput")||ce(e,"bpmn:SequenceFlow")||ce(e,"bpmn:MessageFlow")||ce(e,"bpmn:Group")}function Cf(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Rf(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=oa:a+=oa,{x:a,y:s}}function Rf(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function Tf(e){return e.waypoints?Cf(e.waypoints):ce(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+yn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+yn.height/2}}function Nf(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(yn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Tf(t),r=yn),le({x:n.x-r.width/2,y:n.y-r.height/2},r)}function Df(e){if(ce(e,"bpmn:FlowElement")||ce(e,"bpmn:Participant")||ce(e,"bpmn:Lane")||ce(e,"bpmn:SequenceFlow")||ce(e,"bpmn:MessageFlow")||ce(e,"bpmn:DataInput")||ce(e,"bpmn:DataOutput"))return"name";if(ce(e,"bpmn:TextAnnotation"))return"text";if(ce(e,"bpmn:Group"))return"categoryValueRef"}function Pf(e){var t=e.categoryValueRef;return t&&t.value||""}function Xn(e){var t=e.businessObject,n=Df(t);if(n)return n==="categoryValueRef"?Pf(t):t[n]||""}function gn(e,t){t=!!t,Ge(e)||(e=[e]);var n,r,i,o;return oe(e,function(a){var s=a;a.waypoints&&!t&&(s=gn(a.waypoints,!0));var f=s.x,d=s.y,h=s.height||0,m=s.width||0;(f<n||n===void 0)&&(n=f),(d<r||r===void 0)&&(r=d),(f+m>i||i===void 0)&&(i=f+m),(d+h>o||o===void 0)&&(o=d+h)}),{x:n,y:r,height:o-r,width:i-n}}function aa(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function sa(e){return!!(e&&e.isFrame)}var la=7;function If(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Of(e,t){return t.appendChild(If(e,t))}function De(e,t){return Of(t,e),e}var ci=2,ca={"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":ci,"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":ci,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Bf(e,t){return ca[t]?e.style[t]:e.getAttributeNS(null,t)}function ua(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=ca[r];i?(i===ci&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function Mf(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)ua(e,i,t[i])}function Se(e,t,n){if(typeof t=="string")if(n!==void 0)ua(e,t,n);else return Bf(e,t);else Mf(e,t);return e}const Lf=Object.prototype.toString;function it(e){return new xt(e)}function xt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}xt.prototype.add=function(e){return this.list.add(e),this},xt.prototype.remove=function(e){return Lf.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},xt.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},xt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},xt.prototype.array=function(){return Array.from(this.list)},xt.prototype.has=xt.prototype.contains=function(e){return this.list.contains(e)};var ui={svg:"http://www.w3.org/2000/svg"},fa='<svg xmlns="'+ui.svg+'"';function Ff(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(ui.svg)===-1&&(e=fa+e.substring(4)):(e=fa+">"+e+"</svg>",t=!0);var n=$f(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function $f(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function xe(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Ff(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(ui.svg,e),t&&Se(n,t),n}var fi=null;function da(){return fi===null&&(fi=xe("svg")),fi}function pa(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function Vf(e,t,n,r,i,o){var a=da().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return pa(a,e);case 6:return pa(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function vn(e){return da().createSVGTransform()}var ha=/([&<>]{1})/g,jf=/([&<>\n\r"]{1})/g,Uf={"&":"&","<":"<",">":">",'"':"'"};function di(e,t){function n(r,i){return Uf[i]||i}return e.replace(t,n)}function ma(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(di(e.textContent,ha));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',di(o.value,jf),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)ma(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",di(e.nodeValue,ha),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function zf(e){for(var t=e.firstChild,n=[];t;)ma(t,n),t=t.nextSibling;return n.join("")}function ya(e,t){return zf(e)}function Jn(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Hf(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Wf(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Hf(e,r))}function wn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Wf(n,t)),n.consolidate()}function Vt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function qf(e){return["M",e.x,e.y]}function pi(e){return["L",e.x,e.y]}function Yf(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Kf(e,t){const n=e.length,r=[qf(e[0])];for(let i=1;i<n;i++){const o=e[i-1],a=e[i],s=e[i+1];if(!s||!t){r.push(pi(a));continue}const f=Math.min(t,hi(a.x-o.x,a.y-o.y),hi(s.x-a.x,s.y-a.y));if(!f){r.push(pi(a));continue}const d=Zn(a,o,f),h=Zn(a,o,f*.5),m=Zn(a,s,f),R=Zn(a,s,f*.5);r.push(pi(d)),r.push(Yf(h,R,m))}return r}function Zn(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=hi(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function hi(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function mi(e,t,n){Et(t)&&(n=t,t=null),t||(t={});const r=xe("path",t);return Et(n)&&(r.dataset.cornerRadius=String(n)),ga(r,e)}function ga(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Se(e,{d:Vt(Kf(t,n))}),e}var yi="hsl(225, 10%, 15%)",Gf="white";function ot(e,t){return ta(e.eventDefinitions,function(n){return n.$type===t})}function Xf(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Jf(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function he(e,t,n){var r=Ft(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Gf}function ne(e,t,n){var r=Ft(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||yi}function bn(e,t,n,r){var i=Ft(e),o=i.get("label");return r||o&&o.get("color:color")||t||ne(e,n)}function Zf(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return Vt(i)}function va(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return Vt(a)}function Qf(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return Vt(s)}function ed(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return Vt(o)}function En(e,t={}){return{width:Xe(e,t),height:je(e,t)}}function Xe(e,t={}){return Qt(t,"width")?t.width:e.width}function je(e,t={}){return Qt(t,"height")?t.height:e.height}const Ce={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Ce.td=Ce.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ce.option=Ce.optgroup=[1,'<select multiple="multiple">',"</select>"],Ce.thead=Ce.tbody=Ce.colgroup=Ce.caption=Ce.tfoot=[1,"<table>","</table>"],Ce.polyline=Ce.ellipse=Ce.polygon=Ce.circle=Ce.text=Ce.line=Ce.path=Ce.rect=Ce.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function at(e,t=globalThis.document){var d;if(typeof e!="string")throw new TypeError("String expected");const n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);const r=(d=/<([\w:]+)/.exec(e))==null?void 0:d[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){const h=t.createElement("html");h.innerHTML=e;const{lastChild:m}=h;return m.remove(),m}let[i,o,a]=Object.hasOwn(Ce,r)?Ce[r]:Ce._default,s=t.createElement("div");for(s.innerHTML=o+e+a;i--;)s=s.lastChild;if(s.firstChild===s.lastChild){const{firstChild:h}=s;return h.remove(),h}const f=t.createDocumentFragment();return f.append(...s.childNodes),f}function td(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function ze(e,...t){const n=e.style;return oe(t,function(r){r&&oe(r,function(i,o){n[o]=i})}),e}function wa(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const nd=Object.prototype.toString;function jt(e){return new St(e)}function St(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}St.prototype.add=function(e){return this.list.add(e),this},St.prototype.remove=function(e){return nd.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},St.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},St.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},St.prototype.array=function(){return Array.from(this.list)},St.prototype.has=St.prototype.contains=function(e){return this.list.contains(e)};function ba(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ea(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function rd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qn={},_a;function id(){if(_a)return Qn;_a=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return Qn.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},Qn.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},Qn}var xa=id(),od=rd(xa),At=td({__proto__:null,default:od},[xa]),Sa=["focus","blur"];function ad(e,t,n,r,i){return Sa.indexOf(n)!==-1&&(i=!0),At.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=Ea(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function sd(e,t,n,r){return Sa.indexOf(t)!==-1&&(r=!0),At.unbind(e,t,n,r)}var gi={bind:ad,unbind:sd};function ht(e,t){return t=t||document,t.querySelector(e)}function ld(e,t){return t=t||document,t.querySelectorAll(e)}function er(e){e.parentNode&&e.parentNode.removeChild(e)}function vi(e,t,n,r,i){var o=vn();o.setTranslate(t,n);var a=vn();a.setRotate(r||0,0,0);var s=vn();s.setScale(1,1),wn(e,[o,a,s])}function Aa(e,t,n){var r=vn();r.setTranslate(t,n),wn(e,r)}function cd(e,t){var n=vn();n.setRotate(t,0,0),wn(e,n)}function ud(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wi={exports:{}},ka;function fd(){if(ka)return wi.exports;ka=1;var e=wi.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var o=r-Math.floor(r),a="",i=0;i<Math.floor(r);i++){var s=Math.floor(Math.random()*n).toString(n);a=s+a}if(o){var f=Math.pow(n,o),s=Math.floor(Math.random()*f).toString(n);a=s+a}var d=parseInt(a,n);return d!==1/0&&d>=Math.pow(2,t)?e(t,n):a};return e.rack=function(t,n,r){var i=function(a){var s=0;do{if(s++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var f=e(t,n)}while(Object.hasOwnProperty.call(o,f));return o[f]=a,f},o=i.hats={};return i.get=function(a){return i.hats[a]},i.set=function(a,s){return i.hats[a]=s,i},i.bits=t||128,i.base=n||16,i},wi.exports}var dd=fd(),pd=ud(dd);function mt(e){if(!(this instanceof mt))return new mt(e);e=e||[128,36,1],this._seed=e.length?pd.rack(e[0],e[1],e[2]):e}mt.prototype.next=function(e){return this._seed(e||!0)},mt.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},mt.prototype.claim=function(e,t){this._seed.set(e,t||!0)},mt.prototype.assigned=function(e){return this._seed.get(e)||!1},mt.prototype.unclaim=function(e){delete this._seed.hats[e]},mt.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var hd=new mt,md=10,tr=3,yd=1.5,nr=10,gd=4,nn=.95,vd=1,wd=.25;function Ut(e,t,n,r,i,o,a){pt.call(this,t,a);var s=e&&e.defaultFillColor,f=e&&e.defaultStrokeColor,d=e&&e.defaultLabelColor;function h(p){return n.computeStyle(p,{strokeLinecap:"round",strokeLinejoin:"round",stroke:yi,strokeWidth:2,fill:"white"})}function m(p){return n.computeStyle(p,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:yi,strokeWidth:2})}function R(p,u){var{ref:c={x:0,y:0},scale:g=1,element:b,parentGfx:D=i._svg}=u,ee=xe("marker",{id:p,viewBox:"0 0 20 20",refX:c.x,refY:c.y,markerWidth:20*g,markerHeight:20*g,orient:"auto"});De(ee,b);var N=ht(":scope > defs",D);N||(N=xe("defs"),De(D,N)),De(N,ee)}function $(p,u,c,g){var b=hd.nextPrefixed("marker-");return Y(p,b,u,c,g),"url(#"+b+")"}function Y(p,u,c,g,b){if(c==="sequenceflow-end"){var D=xe("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:b,stroke:b,strokeWidth:1})});R(u,{element:D,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="messageflow-start"){var ee=xe("circle",{cx:6,cy:6,r:3.5,...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});R(u,{element:ee,ref:{x:6,y:6},parentGfx:p})}if(c==="messageflow-end"){var N=xe("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});R(u,{element:N,ref:{x:8.5,y:5},parentGfx:p})}if(c==="association-start"){var K=xe("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});R(u,{element:K,ref:{x:1,y:10},scale:.5,parentGfx:p})}if(c==="association-end"){var H=xe("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});R(u,{element:H,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="conditional-flow-marker"){var te=xe("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:g,stroke:b})});R(u,{element:te,ref:{x:-1,y:10},scale:.5,parentGfx:p})}if(c==="conditional-default-flow-marker"){var j=xe("path",{d:"M 6 4 L 10 16",...h({stroke:b,fill:"none"})});R(u,{element:j,ref:{x:0,y:10},scale:.5,parentGfx:p})}}function W(p,u,c,g,b={}){bt(g)&&(b=g,g=0),g=g||0,b=h(b);var D=u/2,ee=c/2,N=xe("circle",{cx:D,cy:ee,r:Math.round((u+c)/4-g),...b});return De(p,N),N}function P(p,u,c,g,b,D){bt(b)&&(D=b,b=0),b=b||0,D=h(D);var ee=xe("rect",{x:b,y:b,width:u-b*2,height:c-b*2,rx:g,ry:g,...D});return De(p,ee),ee}function C(p,u,c,g){var b=u/2,D=c/2,ee=[{x:b,y:0},{x:u,y:D},{x:b,y:c},{x:0,y:D}],N=ee.map(function(H){return H.x+","+H.y}).join(" ");g=h(g);var K=xe("polygon",{...g,points:N});return De(p,K),K}function O(p,u,c,g){c=m(c);var b=mi(u,c,g);return De(p,b),b}function y(p,u,c){return O(p,u,c,5)}function v(p,u,c){c=m(c);var g=xe("path",{...c,d:u});return De(p,g),g}function S(p,u,c,g){return v(u,c,le({"data-marker":p},g))}function T(p){return se[p]}function E(p){return function(u,c,g){return T(p)(u,c,g)}}var x={"bpmn:MessageEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.235,my:.315}}),D=g?ne(u,f,c.stroke):he(u,s,c.fill),ee=g?he(u,s,c.fill):ne(u,f,c.stroke),N=v(p,b,{fill:D,stroke:ee,strokeWidth:1});return N},"bpmn:TimerEventDefinition":function(p,u,c={}){var g=c.width||u.width,b=c.height||u.height,D=c.width?1:2,ee=W(p,g,b,.2*b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:D}),N=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}});v(p,N,{stroke:ne(u,f,c.stroke),strokeWidth:D});for(var K=0;K<12;K++){var H=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}}),te=g/2,j=b/2;v(p,H,{strokeWidth:1,stroke:ne(u,f,c.stroke),transform:"rotate("+K*30+","+j+","+te+")"})}return ee},"bpmn:EscalationEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),D=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.222}});return v(p,g,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.57,my:.263}}),D=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.2,my:.722}}),D=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.638,my:-.055}}),D=g?ne(u,f,c.stroke):"none",ee=v(p,b,{fill:D,stroke:ne(u,f,c.stroke),strokeWidth:1});return cd(ee,45),ee},"bpmn:CompensateEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.22,my:.5}}),D=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),D=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{strokeWidth:1,fill:D,stroke:ne(u,f,c.stroke)})},"bpmn:MultipleEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.211,my:.36}}),D=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.458,my:.194}});return v(p,g,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(p,u,c={}){var g=W(p,u.width,u.height,8,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:4});return g}};function z(p,u,c={},g){var b=_e(p),D=Xf(b),ee=g||p;return b.get("eventDefinitions")&&b.get("eventDefinitions").length>1?b.get("parallelMultiple")?x["bpmn:ParallelMultipleEventDefinition"](u,ee,c,D):x["bpmn:MultipleEventDefinition"](u,ee,c,D):ot(b,"bpmn:MessageEventDefinition")?x["bpmn:MessageEventDefinition"](u,ee,c,D):ot(b,"bpmn:TimerEventDefinition")?x["bpmn:TimerEventDefinition"](u,ee,c,D):ot(b,"bpmn:ConditionalEventDefinition")?x["bpmn:ConditionalEventDefinition"](u,ee,c,D):ot(b,"bpmn:SignalEventDefinition")?x["bpmn:SignalEventDefinition"](u,ee,c,D):ot(b,"bpmn:EscalationEventDefinition")?x["bpmn:EscalationEventDefinition"](u,ee,c,D):ot(b,"bpmn:LinkEventDefinition")?x["bpmn:LinkEventDefinition"](u,ee,c,D):ot(b,"bpmn:ErrorEventDefinition")?x["bpmn:ErrorEventDefinition"](u,ee,c,D):ot(b,"bpmn:CancelEventDefinition")?x["bpmn:CancelEventDefinition"](u,ee,c,D):ot(b,"bpmn:CompensateEventDefinition")?x["bpmn:CompensateEventDefinition"](u,ee,c,D):ot(b,"bpmn:TerminateEventDefinition")?x["bpmn:TerminateEventDefinition"](u,ee,c,D):null}var M={ParticipantMultiplicityMarker:function(p,u,c={}){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2-6)/g,my:(b-15)/b}});S("participant-multiplicity",p,D,{strokeWidth:2,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},SubProcessMarker:function(p,u,c={}){var g=P(p,14,14,0,{strokeWidth:1,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)});Aa(g,u.width/2-7.5,u.height-20);var b=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2-7.5)/u.width,my:(u.height-20)/u.height}});S("sub-process",p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},ParallelMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.parallel)/g,my:(b-20)/b}});S("parallel",p,D,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},SequentialMarker:function(p,u,c){var g=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.seq)/u.width,my:(u.height-19)/u.height}});S("sequential",p,g,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},CompensationMarker:function(p,u,c){var g=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.compensation)/u.width,my:(u.height-13)/u.height}});S("compensation",p,g,{strokeWidth:1,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},LoopMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.loop)/g,my:(b-7)/b}});S("loop",p,D,{strokeWidth:1.5,fill:"none",stroke:ne(u,f,c.stroke),strokeMiterlimit:.5})},AdhocMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.adhoc)/g,my:(b-15)/b}});S("adhoc",p,D,{strokeWidth:1,fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke)})}};function _(p,u,c,g){M[p](u,c,g)}function q(p,u,c=[],g={}){g={fill:g.fill,stroke:g.stroke,width:Xe(u,g),height:je(u,g)};var b=_e(u),D=c.includes("SubProcessMarker");D?g={...g,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:g={...g,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},b.get("isForCompensation")&&c.push("CompensationMarker"),ce(b,"bpmn:AdHocSubProcess")&&(c.push("AdhocMarker"),D||le(g,{compensation:g.compensation-18}));var ee=b.get("loopCharacteristics"),N=ee&&ee.get("isSequential");ee&&(le(g,{compensation:g.compensation-18}),c.includes("AdhocMarker")&&le(g,{seq:-23,loop:-18,parallel:-24}),N===void 0&&c.push("LoopMarker"),N===!1&&c.push("ParallelMarker"),N===!0&&c.push("SequentialMarker")),c.includes("CompensationMarker")&&c.length===1&&le(g,{compensation:-8}),oe(c,function(K){_(K,p,u,g)})}function ae(p,u,c={}){c=le({size:{width:100}},c);var g=o.createText(u||"",c);return it(g).add("djs-label"),De(p,g),g}function J(p,u,c,g={}){var b=_e(u),D=En({x:u.x,y:u.y,width:u.width,height:u.height},g);return ae(p,b.name,{align:c,box:D,padding:7,style:{fill:bn(u,d,f,g.stroke)}})}function G(p,u,c={}){var g={width:u.width,height:u.height,x:u.width/2+u.x,y:u.height/2+u.y};return ae(p,Xn(u),{box:g,style:le({},o.getExternalStyle(),{fill:bn(u,d,f,c.stroke)})})}function X(p,u,c,g={}){var b=ia(c),D=ae(p,u,{box:{height:30,width:b?je(c,g):Xe(c,g)},align:"center-middle",style:{fill:bn(c,d,f,g.stroke)}});if(b){var ee=-1*je(c,g);vi(D,0,-ee,270)}}function re(p,u,c={}){var{width:g,height:b}=En(u,c);return P(p,g,b,nr,{...c,fill:he(u,s,c.fill),fillOpacity:nn,stroke:ne(u,f,c.stroke)})}function Q(p,u,c={}){var g=_e(u),b=he(u,s,c.fill),D=ne(u,f,c.stroke);return(g.get("associationDirection")==="One"||g.get("associationDirection")==="Both")&&(c.markerEnd=$(p,"association-end",b,D)),g.get("associationDirection")==="Both"&&(c.markerStart=$(p,"association-start",b,D)),c=me(c,["markerStart","markerEnd"]),y(p,u.waypoints,{...c,stroke:D,strokeDasharray:"0, 5"})}function B(p,u,c={}){var g=he(u,s,c.fill),b=ne(u,f,c.stroke),D=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}}),ee=v(p,D,{fill:g,fillOpacity:nn,stroke:b}),N=_e(u);if(Jf(N)){var K=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.33,my:(u.height-18)/u.height}});v(p,K,{strokeWidth:2,fill:g,stroke:b})}return ee}function I(p,u,c={}){return W(p,u.width,u.height,{fillOpacity:nn,...c,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})}function F(p,u,c={}){return C(p,u.width,u.height,{fill:he(u,s,c.fill),fillOpacity:nn,stroke:ne(u,f,c.stroke)})}function A(p,u,c={}){var g=P(p,Xe(u,c),je(u,c),0,{fill:he(u,s,c.fill),fillOpacity:c.fillOpacity||nn,stroke:ne(u,f,c.stroke),strokeWidth:1.5}),b=_e(u);if(ce(b,"bpmn:Lane")){var D=b.get("name");X(p,D,u,c)}return g}function k(p,u,c={}){var g=re(p,u,c),b=$t(u);if(xf(u)&&(Se(g,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!b)){var D=_e(u).flowElements||[],ee=D.filter(N=>ce(N,"bpmn:StartEvent"));ee.length===1&&V(ee[0],p,c,u)}return J(p,u,b?"center-top":"center-middle",c),b?q(p,u,void 0,c):q(p,u,["SubProcessMarker"],c),g}function V(p,u,c,g){var b=22,D={fill:he(g,s,c.fill),stroke:ne(g,f,c.stroke),width:b,height:b},ee=_e(p).isInterrupting,N=ee?0:3,K=ee?1:1.2,H=20,te=(b-H)/2,j="translate("+te+","+te+")";W(u,H,H,{fill:D.fill,stroke:D.stroke,strokeWidth:K,strokeDasharray:N,transform:j}),z(p,u,D,g)}function de(p,u,c={}){var g=re(p,u,c);return J(p,u,"center-middle",c),q(p,u,void 0,c),g}var se=this.handlers={"bpmn:AdHocSubProcess":function(p,u,c={}){return $t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]),k(p,u,c)},"bpmn:Association":function(p,u,c={}){return c=me(c,["fill","stroke"]),Q(p,u,c)},"bpmn:BoundaryEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=_e(u),D=b.get("cancelActivity");c={strokeWidth:1.5,fill:he(u,s,c.fill),fillOpacity:vd,stroke:ne(u,f,c.stroke)},D||(c.strokeDasharray="6");var ee=I(p,u,c);return W(p,u.width,u.height,tr,{...c,fill:"none"}),g&&z(u,p,c),ee},"bpmn:BusinessRuleTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),D=v(p,b);Se(D,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1});var ee=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),N=v(p,ee);return Se(N,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:CallActivity":function(p,u,c={}){return c=me(c,["fill","stroke"]),k(p,u,{strokeWidth:5,...c})},"bpmn:ComplexGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c),b=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.26}});return v(p,b,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:DataInput":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=B(p,u,c);return v(p,g,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1}),b},"bpmn:DataInputAssociation":function(p,u,c={}){return c=me(c,["fill","stroke"]),Q(p,u,{...c,markerEnd:$(p,"association-end",he(u,s,c.fill),ne(u,f,c.stroke))})},"bpmn:DataObject":function(p,u,c={}){return c=me(c,["fill","stroke"]),B(p,u,c)},"bpmn:DataObjectReference":E("bpmn:DataObject"),"bpmn:DataOutput":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=B(p,u,c);return v(p,g,{strokeWidth:1,fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke)}),b},"bpmn:DataOutputAssociation":function(p,u,c={}){return c=me(c,["fill","stroke"]),Q(p,u,{...c,markerEnd:$(p,"association-end",he(u,s,c.fill),ne(u,f,c.stroke))})},"bpmn:DataStoreReference":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:0,my:.133}});return v(p,g,{fill:he(u,s,c.fill),fillOpacity:nn,stroke:ne(u,f,c.stroke),strokeWidth:2})},"bpmn:EndEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=I(p,u,{...c,strokeWidth:4});return g&&z(u,p,c),b},"bpmn:EventBasedGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=F(p,u,c);W(p,u.width,u.height,u.height*.2,{fill:he(u,"none",c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1});var D=g.get("eventGatewayType"),ee=!!g.get("instantiate");function N(){var H=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:u.width,containerHeight:u.height,position:{mx:.36,my:.44}});v(p,H,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:2})}if(D==="Parallel"){var K=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}});v(p,K,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1})}else D==="Exclusive"&&(ee||W(p,u.width,u.height,u.height*.26,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1}),N());return b},"bpmn:ExclusiveGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c),b=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.32,my:.3}}),D=Ft(u);return D.get("isMarkerVisible")&&v(p,b,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Gateway":function(p,u,c={}){return c=me(c,["fill","stroke"]),F(p,u,c)},"bpmn:Group":function(p,u,c={}){return c=me(c,["fill","stroke","width","height"]),P(p,u.width,u.height,nr,{stroke:ne(u,f,c.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Xe(u,c),height:je(u,c)})},"bpmn:InclusiveGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c);return W(p,u.width,u.height,u.height*.24,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:2.5}),g},"bpmn:IntermediateEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=I(p,u,{...c,strokeWidth:1.5});return W(p,u.width,u.height,tr,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1.5}),g&&z(u,p,c),b},"bpmn:IntermediateCatchEvent":E("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":E("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,u,c={}){return c=me(c,["fill","stroke","width","height"]),A(p,u,{...c,fillOpacity:wd})},"bpmn:ManualTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return v(p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:.5}),g},"bpmn:MessageFlow":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=Ft(u),D=he(u,s,c.fill),ee=ne(u,f,c.stroke),N=y(p,u.waypoints,{markerEnd:$(p,"messageflow-end",D,ee),markerStart:$(p,"messageflow-start",D,ee),stroke:ee,strokeDasharray:"10, 11",strokeWidth:1.5});if(g.get("messageRef")){var K=N.getPointAtLength(N.getTotalLength()/2),H=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:K.x,y:K.y}}),te={strokeWidth:1};b.get("messageVisibleKind")==="initiating"?(te.fill=D,te.stroke=ee):(te.fill=ee,te.stroke=D);var j=v(p,H,te),U=g.get("messageRef"),Z=U.get("name"),L=ae(p,Z,{align:"center-top",fitBox:!0,style:{fill:ee}}),pe=j.getBBox(),we=L.getBBox(),et=K.x-we.width/2,Re=K.y+pe.height/2+md;vi(L,et,Re,0)}return N},"bpmn:ParallelGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c),b=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.2}});return v(p,b,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Participant":function(p,u,c={}){c=me(c,["fill","stroke","width","height"]);var g=A(p,u,c),b=$t(u),D=ia(u),ee=_e(u),N=ee.get("name");if(b){var K=D?[{x:30,y:0},{x:30,y:je(u,c)}]:[{x:0,y:30},{x:Xe(u,c),y:30}];O(p,K,{stroke:ne(u,f,c.stroke),strokeWidth:yd}),X(p,N,u,c)}else{var H=En(u,c);D||(H.height=Xe(u,c),H.width=je(u,c));var te=ae(p,N,{box:H,align:"center-middle",style:{fill:bn(u,d,f,c.stroke)}});if(!D){var j=-1*je(u,c);vi(te,0,-j,270)}}return ee.get("participantMultiplicity")&&_("ParticipantMultiplicityMarker",p,u,c),g},"bpmn:ReceiveTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=de(p,u,c),D;return g.get("instantiate")?(W(p,28,28,20*.22,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),D=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):D=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(p,D,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),b},"bpmn:ScriptTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return v(p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:SendTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return v(p,b,{fill:ne(u,f,c.stroke),stroke:he(u,s,c.fill),strokeWidth:1}),g},"bpmn:SequenceFlow":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=he(u,s,c.fill),b=ne(u,f,c.stroke),D=y(p,u.waypoints,{markerEnd:$(p,"sequenceflow-end",g,b),stroke:b}),ee=_e(u),{source:N}=u;if(N){var K=_e(N);ee.get("conditionExpression")&&ce(K,"bpmn:Activity")&&Se(D,{markerStart:$(p,"conditional-flow-marker",g,b)}),K.get("default")&&(ce(K,"bpmn:Gateway")||ce(K,"bpmn:Activity"))&&K.get("default")===ee&&Se(D,{markerStart:$(p,"conditional-default-flow-marker",g,b)})}return D},"bpmn:ServiceTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c);W(p,10,10,{fill:he(u,s,c.fill),stroke:"none",transform:"translate(6, 6)"});var b=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});v(p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),W(p,10,10,{fill:he(u,s,c.fill),stroke:"none",transform:"translate(11, 10)"});var D=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return v(p,D,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:StartEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=_e(u);b.get("isInterrupting")||(c={...c,strokeDasharray:"6"});var D=I(p,u,c);return g&&z(u,p,c),D},"bpmn:SubProcess":function(p,u,c={}){return $t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]),k(p,u,c)},"bpmn:Task":function(p,u,c={}){return c=me(c,["fill","stroke"]),de(p,u,c)},"bpmn:TextAnnotation":function(p,u,c={}){c=me(c,["fill","stroke"]);var{width:g,height:b}=En(u,c),D=P(p,g,b,0,0,{fill:"none",stroke:"none"}),ee=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:0,my:0}});v(p,ee,{stroke:ne(u,f,c.stroke)});var N=_e(u),K=N.get("text")||"";return ae(p,K,{align:"left-top",box:En(u,c),padding:la,style:{fill:bn(u,d,f,c.stroke)}}),D},"bpmn:Transaction":function(p,u,c={}){$t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]);var g=k(p,u,{strokeWidth:1.5,...c}),b=n.style(["no-fill","no-events"],{stroke:ne(u,f,c.stroke),strokeWidth:1.5}),D=$t(u);return D||(c={}),P(p,Xe(u,c),je(u,c),nr-tr,tr,b),g},"bpmn:UserTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=15,D=12,ee=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:b,y:D}});v(p,ee,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:.5});var N=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:b,y:D}});v(p,N,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:.5});var K=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:b,y:D}});return v(p,K,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:.5}),g},label:function(p,u,c={}){return G(p,u,c)}};this._drawPath=v,this._renderer=T}nt(Ut,pt),Ut.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Ut.prototype.canRender=function(e){return ce(e,"bpmn:BaseElement")},Ut.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ut.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ut.prototype.getShapePath=function(e){return Af(e)?va(e,gd):ce(e,"bpmn:Event")?Zf(e):ce(e,"bpmn:Activity")?va(e,nr):ce(e,"bpmn:Gateway")?Qf(e):ed(e)};function me(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var bd=0,Ed={width:150,height:50};function _d(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function xd(e){return bt(e)?le({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var bi=null;function Sd(){return bi||(bi=document.createElement("canvas").getContext("2d")),bi}function Ad(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(Ca(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function Ca(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function kd(e,t){var n=Sd();if(!n)return{width:0,height:0};n.font=Ad(t),"letterSpacing"in n&&(n.letterSpacing=Ca(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function Cd(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=kd(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return Rd(e,i,r,o);i=Nd(i,o.width,t)}}function Rd(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var Ra="";function Td(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===Ra)&&i.pop();break}var a=i[i.length-1];return a&&a===Ra&&(i[i.length-1]="-"),i.join("")}function Nd(e,t,n){var r=Math.max(e.length*(n/t),1),i=Td(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function rr(e){this._config=le({},{size:Ed,padding:bd,style:{},align:"center-top"},e||{})}rr.prototype.createText=function(e,t){return this.layoutText(e,t).element},rr.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},rr.prototype.layoutText=function(e,t){for(var n=le({},this._config.size,t.box),r=le({},this._config.style,t.style),i=_d(t.align||this._config.align),o=xd(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=Dd(r),f=e.split(/\u00AD?\r?\n/),d=[],h=n.width-o.left-o.right;f.length;)d.push(Cd(f,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var m=tn(d,function(P,C,O){return P+(s||C.height)},0)+o.top+o.bottom,R=tn(d,function(P,C,O){return C.width>P?C.width:P},0),$=o.top;i.vertical==="middle"&&($+=(n.height-m)/2),$-=(s||d[0].height)/4;var Y=xe("text");Se(Y,r),oe(d,function(P){var C;switch($+=s||P.height,i.horizontal){case"left":C=o.left;break;case"right":C=(a?R:h)-o.right-P.width;break;default:C=Math.max(((a?R:h)-P.width)/2+o.left,0)}var O=xe("tspan");Se(O,{x:C,y:$}),O.textContent=P.text,De(Y,O)});var W={width:R,height:m};return{dimensions:W,element:Y}};function Dd(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Pd=12,Id=1.2,Od=40;function Ta(e){var t=le({fontFamily:"Arial, sans-serif",fontSize:Pd,fontWeight:"normal",lineHeight:Id},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=le({},t,{fontSize:n},e&&e.externalStyle||{}),i=new rr({style:t});this.getExternalLabelBounds=function(a,s){var f={width:Math.max(a.width,yn.width),height:30},d=o(s,f,{style:r});return{x:Math.round(a.x+a.width/2-d.width/2),y:a.y,width:Math.ceil(d.width),height:Math.ceil(d.height)}},this.getTextAnnotationBounds=function(a,s){var f=o(s,a,{style:t,align:"left-top",padding:la});return{x:a.x,y:a.y,width:a.width,height:Math.max(Od,Math.round(f.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,f){return i.getDimensions(a,le({box:s},f))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}Ta.$inject=["config.textRenderer"];function Bd(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,f=n.containerWidth/r.width*n.xScaleFactor,d=0;d<r.heightElements.length;d++)a["y"+d]=r.heightElements[d]*s;for(var h=0;h<r.widthElements.length;h++)a["x"+h]=r.widthElements[h]*f}var m=$d(r.d,{mx:i,my:o,e:a});return m}}var Md=/\{([^{}]+)\}/g,Ld=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Fd(e,t,n){var r=n;return t.replace(Ld,function(i,o,a,s,f){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&f&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function $d(e,t){return String(e).replace(Md,function(n,r){return Fd(n,r,t)})}const Vd={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ut],textRenderer:["type",Ta],pathMap:["type",Bd]};function jd(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const Na={translate:["value",jd]};function Ud(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Ei(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function zd(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Hd(e){return Ud({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Wd(e){for(var t=e.waypoints,n=t.reduce(function(d,h,m){var R=t[m-1];if(R){var $=d[d.length-1],Y=$&&$.endLength||0,W=qd(R,h);d.push({start:R,end:h,startLength:Y,endLength:Y+W,length:W})}return d},[]),r=n.reduce(function(d,h){return d+h.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,f={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return f}function _i(e){return Sf(e)?Wd(e):Hd(e)}function qd(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ie(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function ir(e,t,n){return le({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Yd(e,t,n){var r=e.waypoint;return!r||r.length<2?[_i(t),_i(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function Da(e,t,n){return new Error(`element ${Ie(t)} referenced by ${Ie(e)}#${n} not yet drawn`)}function yt(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}yt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],yt.prototype.add=function(e,t,n){var r,i,o;if(ce(t,"bpmndi:BPMNPlane")){var a=ce(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(ir(e,t,a)),this._canvas.addRootElement(r)}else if(ce(t,"bpmndi:BPMNShape")){var s=!$t(e,t),f=Gd(e);i=n&&(n.hidden||n.collapsed);var d=t.bounds;r=this._elementFactory.createShape(ir(e,t,{collapsed:s,hidden:i,x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),isFrame:f})),ce(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),ce(e,"bpmn:Lane")&&(o=0),ce(e,"bpmn:DataStoreReference")&&(Kd(n,_i(d))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(ce(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),m=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(ir(e,t,{hidden:i,source:h,target:m,waypoints:Yd(t,h,m)})),ce(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Ie(t)} for element ${Ie(e)}`);return kf(e)&&Xn(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},yt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Ie(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw Da(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},yt.prototype.addLabel=function(e,t,n){var r,i,o;return r=Nf(t,n),i=Xn(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(ir(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Xn(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)},yt.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?Da(e,r,t+"Ref"):new Error(`${Ie(e)}#${t} Ref not specified`)},yt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},yt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},yt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function Kd(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function Gd(e){return ce(e,"bpmn:Group")}const Xd={__depends__:[Vd,{__depends__:[Na],bpmnImporter:["type",yt]}]};function Pa(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}Pa.prototype.next=function(){return this._prefix+ ++this._counter};var Jd=new Pa("ov"),Zd=500;function Te(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=Jd,this._overlayDefaults=le({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=Qd(n.getContainer()),this._init()}Te.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Te.prototype.get=function(e){if(rt(e)&&(e={id:e}),rt(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?en(t.overlays,na({type:e.type})):t.overlays.slice():[]}else return e.type?en(this._overlays,na({type:e.type})):e.id?this._overlays[e.id]:null},Te.prototype.add=function(e,t,n){if(bt(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=le({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},Te.prototype.remove=function(e){var t=this.get(e)||[];Ge(t)||(t=[t]);var n=this;oe(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(er(r.html),er(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})},Te.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},Te.prototype.show=function(){or(this._overlayRoot)},Te.prototype.hide=function(){or(this._overlayRoot,!1)},Te.prototype.clear=function(){this._overlays={},this._overlayContainers=[],ba(this._overlayRoot)},Te.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=gn(t);r=o.x,i=o.y}Ia(n,r,i),wa(e.html,"data-container-id",t.id)},Te.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=gn(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=gn(r).height:s=r.height,o=t.bottom*-1+s}Ia(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Te.prototype._createOverlayContainer=function(e){var t=at('<div class="djs-overlays" />');ze(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Te.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Oa(this._overlayRoot,n)},Te.prototype._getOverlayContainer=function(e,t){var n=Qe(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},Te.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),rt(r)&&(r=at(r)),o=this._getOverlayContainer(n),i=at('<div class="djs-overlay" data-overlay-id="'+t+'">'),ze(i,{position:"absolute"}),i.appendChild(r),e.type&&jt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();or(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Te.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),f=!0;(r!==s||n&&(Zt(i)&&i>t.scale||Zt(o)&&o<t.scale))&&(f=!1),or(a,f),this._updateOverlayScale(e,t)},Te.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),Zt(r)&&t.scale<r&&(a=(1/t.scale||1)*r),Zt(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),Zt(a)&&(s="scale("+a+","+a+")"),Oa(o,s)},Te.prototype._updateOverlaysVisibilty=function(e){var t=this;oe(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Te.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,o=t.get({element:i});oe(o,function(f){t.remove(f.id)});var a=t._getOverlayContainer(i);if(a){er(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",Zd,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(oe(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&jt(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function Qd(e){var t=at('<div class="djs-overlay-container" />');return ze(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Ia(e,t,n){ze(e,{left:t+"px",top:n+"px"})}function or(e,t){e.style.display=t===!1?"none":""}function Oa(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const Ba={__init__:["overlays"],overlays:["type",Te]};function Ma(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(aa(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}Ma.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const ep={__init__:["changeSupport"],changeSupport:["type",Ma]};var tp=1e3;function Fe(e){this._eventBus=e}Fe.$inject=["eventBus"];function np(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}Fe.prototype.on=function(e,t,n,r,i,o){if((Lt(t)||Et(t))&&(o=i,i=r,r=n,n=t,t=null),Lt(n)&&(o=i,i=r,r=n,n=tp),bt(i)&&(o=i,i=!1),!Lt(r))throw new Error("handlerFn must be a function");Ge(e)||(e=[e]);var a=this._eventBus;oe(e,function(s){var f=["commandStack",s,t].filter(function(d){return d}).join(".");a.on(f,n,i?np(r,o):r,o)})},Fe.prototype.canExecute=gt("canExecute"),Fe.prototype.preExecute=gt("preExecute"),Fe.prototype.preExecuted=gt("preExecuted"),Fe.prototype.execute=gt("execute"),Fe.prototype.executed=gt("executed"),Fe.prototype.postExecute=gt("postExecute"),Fe.prototype.postExecuted=gt("postExecuted"),Fe.prototype.revert=gt("revert"),Fe.prototype.reverted=gt("reverted");function gt(e){return function(n,r,i,o,a){(Lt(n)||Et(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function xi(e,t){t.invoke(Fe,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}nt(xi,Fe),xi.$inject=["canvas","injector"];const rp={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",xi]};var ip={"&":"&","<":"<",">":">",'"':""","'":"'"};function op(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return ip[t]})}var ap="_plane";function Si(e){var t=e.id;return ce(e,"bpmn:SubProcess")?sp(t):t}function sp(e){return e+ap}var lp="bjs-breadcrumbs-shown";function La(e,t,n){var r=at('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=jt(i);i.appendChild(r);var a=[];e.on("element.changed",function(f){var d=f.element,h=_e(d),m=Qe(a,function(R){return R===h});m&&s()});function s(f){f&&(a=cp(f));var d=a.flatMap(function(m){var R=n.findRoot(Si(m))||n.findRoot(m.id);if(!R&&ce(m,"bpmn:Process")){var $=t.find(function(P){var C=_e(P);return C&&C.get("processRef")===m});R=$&&n.findRoot($.id)}if(!R)return[];var Y=op(m.name||m.id),W=at('<li><span class="bjs-crumb"><a title="'+Y+'">'+Y+"</a></span></li>");return W.addEventListener("click",function(){n.setRootElement(R)}),W});r.innerHTML="";var h=d.length>1;o.toggle(lp,h),d.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(f){s(f.element)})}La.$inject=["eventBus","elementRegistry","canvas"];function cp(e){for(var t=_e(e),n=[],r=t;r;r=r.$parent)(ce(r,"bpmn:SubProcess")||ce(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Fa(e,t){var n=null,r=new up;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(!ce(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var f=(a.x-s.x)*a.scale,d=(a.y-s.y)*a.scale;(f!==0||d!==0)&&t.scroll({dx:f,dy:d}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Fa.$inject=["eventBus","canvas"];function up(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var $a={x:180,y:160};function zt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}zt.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}},zt.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;ce(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),dp(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var f=t._processToDiagramMap[s.id];t._moveToDiPlane(a,f.plane)}}),i},zt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=fp(e),r={x:n.x-$a.x,y:n.y-$a.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})},zt.prototype._moveToDiPlane=function(e,t){var n=Va(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},zt.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n},zt.$inject=["eventBus","moddle"];function Va(e){return ce(e,"bpmndi:BPMNDiagram")?e:Va(e.$parent)}function fp(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=Ei(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),zd(t)}function dp(e,t){var n=e.$parent;return!(!ce(n,"bpmn:SubProcess")||n===t.bpmnElement||_f(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var ar=250,pp='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',hp="bjs-drilldown-empty";function kt(e,t,n,r,i){Fe.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",ar,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",ar,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],ar,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),this.reverted(["shape.create","shape.move","shape.delete"],ar,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}nt(kt,Fe),kt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},kt.prototype._canDrillDown=function(e){var t=this._canvas;return ce(e,"bpmn:SubProcess")&&t.findRoot(Si(e))},kt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=_e(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;jt(r.html).toggle(hp,!i)}},kt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=_e(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=at('<button type="button" class="bjs-drilldown">'+pp+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot(Si(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)},kt.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},kt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const mp={__depends__:[Ba,ep,rp],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",La],drilldownCentering:["type",Fa],drilldownOverlayBehavior:["type",kt],subprocessCompatibility:["type",zt]};function ja(e){return e.originalEvent||e.srcEvent}function Ua(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function yp(){return/mac/i.test(navigator.platform)}function za(e,t){return(ja(e)||e).button===t}function sr(e){return za(e,0)}function gp(e){return za(e,1)}function vp(e){var t=ja(e)||e;return sr(e)&&t.shiftKey}function wp(e){return!0}function lr(e){return sr(e)||gp(e)}var Ha=500;function Wa(e,t,n){var r=this;function i(x,z,M){if(!s(x,z)){var _,q,ae;M?q=t.getGraphics(M):(_=z.delegateTarget||z.target,_&&(q=_,M=t.get(q))),!(!q||!M)&&(ae=e.fire(x,{element:M,gfx:q,originalEvent:z}),ae===!1&&(z.stopPropagation(),z.preventDefault()))}}var o={};function a(x){return o[x]}function s(x,z){var M=d[x]||sr;return!M(z)}var f={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},d={"element.contextmenu":wp,"element.mousedown":lr,"element.mouseup":lr,"element.click":lr,"element.dblclick":lr};function h(x,z,M){var _=f[x];if(!_)throw new Error("unmapped DOM event name <"+x+">");return i(_,z,M)}var m="svg, .djs-element";function R(x,z,M,_){var q=o[M]=function(ae){i(M,ae)};_&&(d[M]=_),q.$delegate=gi.bind(x,m,z,q)}function $(x,z,M){var _=a(M);_&&gi.unbind(x,z,_.$delegate)}function Y(x){oe(f,function(z,M){R(x,M,z)})}function W(x){oe(f,function(z,M){$(x,M,z)})}e.on("canvas.destroy",function(x){W(x.svg)}),e.on("canvas.init",function(x){Y(x.svg)}),e.on(["shape.added","connection.added"],function(x){var z=x.element,M=x.gfx;e.fire("interactionEvents.createHit",{element:z,gfx:M})}),e.on(["shape.changed","connection.changed"],Ha,function(x){var z=x.element,M=x.gfx;e.fire("interactionEvents.updateHit",{element:z,gfx:M})}),e.on("interactionEvents.createHit",Ha,function(x){var z=x.element,M=x.gfx;r.createDefaultHit(z,M)}),e.on("interactionEvents.updateHit",function(x){var z=x.element,M=x.gfx;r.updateDefaultHit(z,M)});var P=S("djs-hit djs-hit-stroke"),C=S("djs-hit djs-hit-click-stroke"),O=S("djs-hit djs-hit-all"),y=S("djs-hit djs-hit-no-move"),v={all:O,"click-stroke":C,stroke:P,"no-move":y};function S(x,z){return z=le({stroke:"white",strokeWidth:15},z||{}),n.cls(x,["no-fill","no-border"],z)}function T(x,z){var M=v[z];if(!M)throw new Error("invalid hit type <"+z+">");return Se(x,M),x}function E(x,z){De(x,z)}this.removeHits=function(x){var z=ld(".djs-hit",x);oe(z,Jn)},this.createDefaultHit=function(x,z){var M=x.waypoints,_=x.isFrame,q;return M?this.createWaypointsHit(z,M):(q=_?"stroke":"all",this.createBoxHit(z,q,{width:x.width,height:x.height}))},this.createWaypointsHit=function(x,z){var M=mi(z);return T(M,"stroke"),E(x,M),M},this.createBoxHit=function(x,z,M){M=le({x:0,y:0},M);var _=xe("rect");return T(_,z),Se(_,M),E(x,_),_},this.updateDefaultHit=function(x,z){var M=ht(".djs-hit",z);if(M)return x.waypoints?ga(M,x.waypoints):Se(M,{width:x.width,height:x.height}),M},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=R,this.unregisterEvent=$}Wa.$inject=["eventBus","elementRegistry","styles"];const bp={__init__:["interactionEvents"],interactionEvents:["type",Wa]};function rn(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=new Set;var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}rn.$inject=["eventBus","canvas"],rn.prototype.deselect=function(e){if(this._selectedElements.has(e)){var t=this.get();this._selectedElements.delete(e),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()})}},rn.prototype.get=function(){return Array.from(this._selectedElements)},rn.prototype.isSelected=function(e){return this._selectedElements.has(e)},rn.prototype.select=function(e,t){var n=this.get();Ge(e)||(e=e?[e]:[]);var r=this._canvas,i=r.getRootElement();e=e.filter(function(o){var a=r.findRoot(o);return i===a}),t?oe(e,o=>{this._selectedElements.add(o)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var qa="hover",Ya="selected";function Ka(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,qa)}),t.on("element.out",function(i){r(i.element,qa)}),t.on("selection.changed",function(i){function o(d){r(d,Ya)}function a(d){n(d,Ya)}var s=new Set(i.oldSelection),f=new Set(i.newSelection);for(let d of s)f.has(d)||o(d);for(let d of f)s.has(d)||a(d)})}Ka.$inject=["canvas","eventBus"];function Ga(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,f=o.hints||{},d=f.autoSelect;if(a){if(d===!1)return;Ge(d)?t.select(d):t.select(s.filter(Ep))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=Qe(o,function(f){return a.id===f.id});s||t.select(a)}),e.on("element.click",function(i){if(sr(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,f=vp(i);if(a&&s)return f?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,f)}})}Ga.$inject=["eventBus","selection","canvas","elementRegistry"];function Ep(e){return!e.hidden}const _p={__init__:["selectionVisuals","selectionBehavior"],__depends__:[bp],selection:["type",rn],selectionVisuals:["type",Ka],selectionBehavior:["type",Ga]},xp=/^class[ {]/;function Sp(e){return xp.test(e.toString())}function Ai(e){return Array.isArray(e)}function ki(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cr(...e){e.length===1&&Ai(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const Ap=/constructor\s*[^(]*\(\s*([^)]*)\)/m,kp=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Cp=/\/\*([^*]*)\*\//m;function Rp(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Sp(e)?Ap:kp);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(Cp);return(i&&i[1]||r).trim()})||[]}function Xa(e,t){const n=t||{get:function(y,v){if(r.push(y),v===!1)return null;throw s(`No provider for "${y}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(y){const v=r.join(" -> ");return r.length=0,new Error(v?`${y} (Resolving: ${v})`:y)};function f(y,v){if(!i[y]&&y.includes(".")){const S=y.split(".");let T=f(S.shift());for(;S.length;)T=T[S.shift()];return T}if(ki(o,y))return o[y];if(ki(i,y)){if(r.indexOf(y)!==-1)throw r.push(y),s("Cannot resolve circular dependency!");return r.push(y),o[y]=i[y][0](i[y][1]),r.pop(),o[y]}return n.get(y,v)}function d(y,v){if(typeof v>"u"&&(v={}),typeof y!="function")if(Ai(y))y=cr(y.slice());else throw s(`Cannot invoke "${y}". Expected a function!`);const T=(y.$inject||Rp(y)).map(E=>ki(v,E)?v[E]:f(E));return{fn:y,dependencies:T}}function h(y){const{fn:v,dependencies:S}=d(y),T=Function.prototype.bind.call(v,null,...S);return new T}function m(y,v,S){const{fn:T,dependencies:E}=d(y,S);return T.apply(v,E)}function R(y){return cr(v=>y.get(v))}function $(y,v){if(v&&v.length){const S=Object.create(null),T=Object.create(null),E=[],x=[],z=[];let M,_,q,ae;for(let J in i)M=i[J],v.indexOf(J)!==-1&&(M[2]==="private"?(_=E.indexOf(M[3]),_===-1?(q=M[3].createChild([],v),ae=R(q),E.push(M[3]),x.push(q),z.push(ae),S[J]=[ae,J,"private",q]):S[J]=[z[_],J,"private",x[_]]):S[J]=[M[2],M[1]],T[J]=!0),(M[2]==="factory"||M[2]==="type")&&M[1].$scope&&v.forEach(G=>{M[1].$scope.indexOf(G)!==-1&&(S[J]=[M[2],M[1]],T[G]=!0)});v.forEach(J=>{if(!T[J])throw new Error('No provider for "'+J+'". Cannot use provider from the parent!')}),y.unshift(S)}return new Xa(y,a)}const Y={factory:m,type:h,value:function(y){return y}};function W(y,v){const S=y.__init__||[];return function(){S.forEach(T=>{typeof T=="string"?v.get(T):v.invoke(T)})}}function P(y){const v=y.__exports__;if(v){const S=y.__modules__,T=Object.keys(y).reduce((_,q)=>(q!=="__exports__"&&q!=="__modules__"&&q!=="__init__"&&q!=="__depends__"&&(_[q]=y[q]),_),Object.create(null)),E=(S||[]).concat(T),x=$(E),z=cr(function(_){return x.get(_)});v.forEach(function(_){i[_]=[z,_,"private",x]});const M=(y.__init__||[]).slice();return M.unshift(function(){x.init()}),y=Object.assign({},y,{__init__:M}),W(y,x)}return Object.keys(y).forEach(function(S){if(S==="__init__"||S==="__depends__")return;const T=y[S];if(T[2]==="private"){i[S]=T;return}const E=T[0],x=T[1];i[S]=[Y[E],Tp(E,x),E]}),W(y,a)}function C(y,v){return y.indexOf(v)!==-1||(y=(v.__depends__||[]).reduce(C,y),y.indexOf(v)!==-1)?y:y.concat(v)}function O(y){const v=y.reduce(C,[]).map(P);let S=!1;return function(){S||(S=!0,v.forEach(T=>T()))}}this.get=f,this.invoke=m,this.instantiate=h,this.createChild=$,this.init=O(e)}function Tp(e,t){return e!=="value"&&Ai(t)&&(t=cr(t.slice())),t}var Np=1;function Ct(e,t){pt.call(this,e,Np),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})}nt(Ct,pt),Ct.prototype.canRender=function(){return!0},Ct.prototype.drawShape=function(t,n,r){var i=xe("rect");return Se(i,{x:0,y:0,width:n.width||0,height:n.height||0}),sa(n)?Se(i,le({},this.FRAME_STYLE,r||{})):Se(i,le({},this.SHAPE_STYLE,r||{})),De(t,i),i},Ct.prototype.drawConnection=function(t,n,r){var i=mi(n.waypoints,le({},this.CONNECTION_STYLE,r||{}));return De(t,i),i},Ct.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,o=t.height,a=[["M",n,r],["l",i,0],["l",0,o],["l",-i,0],["z"]];return Vt(a)},Ct.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,o=[];for(r=0;i=n[r];r++)i=i.original||i,o.push([r===0?"M":"L",i.x,i.y]);return Vt(o)},Ct.$inject=["eventBus","styles"];function Dp(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var o=this.style(r,i);return le(o,{class:n})},this.style=function(n,r){!Ge(n)&&!r&&(r=n,n=[]);var i=tn(n,function(o,a){return le(o,e[a]||{})},{});return r?le(i,r):i},this.computeStyle=function(n,r,i){return Ge(r)||(i=r,r=[]),t.style(r||[],le({},i,n||{}))}}const Pp={__init__:["defaultRenderer"],defaultRenderer:["type",Ct],styles:["type",Dp]};function Ip(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Op(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function ur(e,t){return Math.round(e*t)/t}function Ja(e){return Et(e)?e+"px":e}function Bp(e){for(;e.parent;)e=e.parent;return e}function Mp(e){e=le({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),ze(n,{position:"relative",overflow:"hidden",width:Ja(e.width),height:Ja(e.height)}),t.appendChild(n),n}function Za(e,t,n){const r=xe("g");it(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const Lp="base",Qa=0,Fp=1,$p={shape:["x","y","width","height"],connection:["waypoints"]};function fe(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}fe.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],fe.prototype._init=function(e){const t=this._eventBus,n=this._container=Mp(e),r=this._svg=xe("svg");Se(r,{width:"100%",height:"100%"}),wa(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),De(n,r);const i=this._viewport=Za(r,"viewport");e.deferUpdate&&(this._viewboxChanged=ra(this._viewboxChanged,300)),this._restoreFocus=ra(this._restoreFocus,0),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),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)},fe.prototype._destroy=function(){this._restoreFocus.cancel(),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},fe.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},fe.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=aa(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},fe.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},fe.prototype.restoreFocus=function(){this._restoreFocus()},fe.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},fe.prototype.isFocused=function(){return this._focused},fe.prototype.getDefaultLayer=function(){return this.getLayer(Lp,Qa)},fe.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},fe.prototype._getChildIndex=function(e){return tn(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},fe.prototype._createLayer=function(e,t){typeof t>"u"&&(t=Fp);const n=this._getChildIndex(t);return{group:Za(this._viewport,"layer-"+e,n),index:t,visible:!0}},fe.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,r=t.group,i=t.index;if(t.visible)return r;const o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r},fe.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&&(Jn(n),t.visible=!1),n},fe.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Jn(t.group))},fe.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},fe.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const r of t){const i=this._findPlaneForRoot(Bp(r));if(!i||n&&i.rootElement!==n)return;n=i.rootElement}return n},fe.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},fe.prototype._findPlaneForRoot=function(e){return Qe(this._planes,function(t){return t.rootElement===e})},fe.prototype._resolveElement=function(e){return typeof e=="string"?this._elementRegistry.get(e):e},fe.prototype._resolveElements=function(e){return Ge(e)||(e=[e]),e.map(t=>this._resolveElement(t)).filter(Boolean)},fe.prototype.getContainer=function(){return this._container},fe.prototype._updateMarker=function(e,t,n){let r;e=this._resolveElement(e),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(oe([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),it(i).add(t)):(e.markers.delete(t),it(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},fe.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},fe.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},fe.prototype.hasMarker=function(e,t){return e=this._resolveElement(e),e.markers?e.markers.has(t):!1},fe.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},fe.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},fe.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 r=this.getLayer(n,Qa);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},fe.prototype.removeRootElement=function(e){if(e=this._resolveElement(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},fe.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},fe.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)},fe.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})},fe.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})},fe.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=$p[e];if(!ea(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},fe.prototype._setParent=function(e,t,n){Op(t.children,e,n),e.parent=t},fe.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const a=o.create(e,t,r);return this._elementRegistry.add(t,a),o.update(e,t,a),i.fire(e+".added",{element:t,gfx:a}),t},fe.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},fe.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},fe.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),Ip(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},fe.prototype.removeShape=function(e){return this._removeElement(e,"shape")},fe.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},fe.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},fe.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},fe.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},fe.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let r,i,o,a,s,f,d;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const h=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);wn(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=wn(t),i=a?a.matrix:Vf(),s=ur(i.a,1e3),f=ur(-i.e||0,1e3),d=ur(-i.f||0,1e3),e=this._cachedViewbox={x:f?f/s:0,y:d?d/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e},fe.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=le({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),es(t,n)}),{x:n.e,y:n.f}},fe.prototype.scrollToElement=function(e,t){let n=100;const r=this._resolveElements(e);if(!r.length)return;const i=this.findRoot(r);if(!i)return;i!==this.getRootElement()&&this.setRootElement(i);const o=r.filter(Y=>Y!=i);if(!o.length)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 a=gn(o),s=Ei(a),f=this.viewbox(),d=this.zoom();let h,m;f.y+=t.top/d,f.x+=t.left/d,f.width-=(t.right+t.left)/d,f.height-=(t.bottom+t.top)/d;const R=Ei(f);if(!(a.width<f.width&&a.height<f.height))h=a.x-f.x,m=a.y-f.y;else{const Y=Math.max(0,s.right-R.right),W=Math.min(0,s.left-R.left),P=Math.max(0,s.bottom-R.bottom),C=Math.min(0,s.top-R.top);h=Y||W,m=P||C}this.scroll({dx:-h*d,dy:-m*d})},fe.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),ur(r.a,1e3)};function es(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}fe.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let i,o;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?o={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),o={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(o),this.viewbox(!1).scale},fe.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,f,d,h;f=r.getCTM();const m=f.a;return t?(a=le(o,t),s=a.matrixTransform(f.inverse()),d=i.translate(s.x,s.y).scale(1/m*e).translate(-s.x,-s.y),h=f.multiply(d)):h=i.scale(e),es(this._viewport,h),h},fe.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},fe.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:r,y:i,width:o,height:a}},fe.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var on="data-element-id";function He(e){this._elements={},this._eventBus=e}He.$inject=["eventBus"],He.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Se(t,on,r),n&&Se(n,on,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},He.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Se(r.gfx,on,""),r.secondaryGfx&&Se(r.secondaryGfx,on,""),delete t[n])},He.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),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)},He.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&Se(t,on,r),t},He.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Se(e,on);var n=this._elements[t];return n&&n.element},He.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},He.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],o=t[i],a=o.element,s=o.gfx;if(e(a,s))return a}},He.prototype.getAll=function(){return this.filter(function(e){return e})},He.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,o=r.gfx;return e(i,o)})},He.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},He.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 Vp(e,t,n,r){var i=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,i,r)),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,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function jp(e){return e.__refs_collection===!0}function Up(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function ts(e,t,n){var r=Vp(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function zp(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(o){if(o!==i){var a=i;i=null,a&&e.unset(a,r,n),i=o,e.set(i,r,n)}}})}function Je(e,t){if(!(this instanceof Je))return new Je(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Je.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?ts(this,t,e):zp(this,t,e)},Je.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return jp(n)||ts(this,t,e),n},Je.prototype.ensureBound=function(e,t){Up(e,t)||this.bind(e,t)},Je.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Je.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ci=new Je({name:"children",enumerable:!0,collection:!0},{name:"parent"}),ns=new Je({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),rs=new Je({name:"attachers",collection:!0},{name:"host"}),is=new Je({name:"outgoing",collection:!0},{name:"source"}),os=new Je({name:"incoming",collection:!0},{name:"target"});function _n(){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)}}),Ci.bind(this,"parent"),ns.bind(this,"labels"),is.bind(this,"outgoing"),os.bind(this,"incoming")}function xn(){_n.call(this),Ci.bind(this,"children"),rs.bind(this,"host"),rs.bind(this,"attachers")}nt(xn,_n);function as(){_n.call(this),Ci.bind(this,"children")}nt(as,xn);function ss(){xn.call(this),ns.bind(this,"labelTarget")}nt(ss,xn);function ls(){_n.call(this),is.bind(this,"source"),os.bind(this,"target")}nt(ls,_n);var Hp={connection:ls,shape:xn,label:ss,root:as};function Wp(e,t){var n=Hp[e];if(!n)throw new Error("unknown type: <"+e+">");return le(new n,t)}function an(){this._uid=12}an.prototype.createRoot=function(e){return this.create("root",e)},an.prototype.createLabel=function(e){return this.create("label",e)},an.prototype.createShape=function(e){return this.create("shape",e)},an.prototype.createConnection=function(e){return this.create("connection",e)},an.prototype.create=function(e,t){return t=le({},t||{}),t.id||(t.id=e+"_"+this._uid++),Wp(e,t)};var fr="__fn",cs=1e3,qp=Array.prototype.slice;function Ue(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Ue.prototype.on=function(e,t,n,r){if(e=Ge(e)?e:[e],Lt(t)&&(r=n,n=t,t=cs),!Et(t))throw new Error("priority must be a number");var i=n;r&&(i=_t(n,r),i[fr]=n[fr]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})},Ue.prototype.once=function(e,t,n,r){var i=this;if(Lt(t)&&(r=n,n=t,t=cs),!Et(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(r,arguments);return i.off(e,o),a}o[fr]=n,this.on(e,t,o)},Ue.prototype.off=function(e,t){e=Ge(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},Ue.prototype.createEvent=function(e){var t=new Sn;return t.init(e),t},Ue.prototype.fire=function(e,t){var n,r,i,o;if(o=qp.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof Sn?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==a&&(n.type=a)}return i===void 0&&n.defaultPrevented&&(i=!1),i}},Ue.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},Ue.prototype._destroy=function(){this._listeners={}},Ue.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},Ue.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=Yp(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r},Ue.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t},Ue.prototype._getListeners=function(e){return this._listeners[e]},Ue.prototype._setListeners=function(e,t){this._listeners[e]=t},Ue.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,o;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,o=n.callback,(o===t||o[fr]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function Sn(){}Sn.prototype.stopPropagation=function(){this.cancelBubble=!0},Sn.prototype.preventDefault=function(){this.defaultPrevented=!0},Sn.prototype.init=function(e){le(this,e||{})};function Yp(e,t){return e.apply(null,t)}function Kp(e){return e.childNodes[0]}function Gp(e){return e.parentNode.childNodes[1]}function We(e,t){this._eventBus=e,this._elementRegistry=t}We.$inject=["eventBus","elementRegistry"],We.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=Gp(t),n||(n=xe("g"),it(n).add("djs-children"),De(t.parentNode,n))):n=t,n},We.prototype._clear=function(e){var t=Kp(e);return ba(t),t},We.prototype._createContainer=function(e,t,n,r){var i=xe("g");it(i).add("djs-group"),typeof n<"u"?Xp(i,t,t.childNodes[n]):De(t,i);var o=xe("g");it(o).add("djs-element"),it(o).add("djs-"+e),r&&it(o).add("djs-frame"),De(i,o);var a=xe("g");return it(a).add("djs-visual"),De(o,a),o},We.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,sa(t))},We.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=tn(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),oe(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i),s=a.firstChild;oe(o,function(f){var d=n.getGraphics(f).parentNode;d===s?s=s.nextSibling:a.insertBefore(d,s)})}})},We.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},We.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},We.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},We.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},We.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),Aa(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?Se(n,"display","none"):Se(n,"display","block")}},We.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Jn(t.parentNode)};function Xp(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const Jp={__depends__:[Pp],__init__:["canvas"],canvas:["type",fe],elementRegistry:["type",He],elementFactory:["type",an],eventBus:["type",Ue],graphicsFactory:["type",We]};function Zp(e){var t=new Xa(e);return t.init(),t}function Qp(e){e=e||{};var t={config:["value",e]},n=[t,Jp].concat(e.modules||[]);return Zp(n)}function Rt(e,t){this._injector=t||Qp(e),this.get("eventBus").fire("diagram.init")}Rt.prototype.get=function(e,t){return this._injector.get(e,t)},Rt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Rt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Rt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Ri(){}Ri.prototype.get=function(e){return this.$model.properties.get(this,e)},Ri.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function us(e,t){this.model=e,this.properties=t}us.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Ri.prototype);oe(e.properties,function(a){!a.isMany&&a.default!==void 0&&(r[a.name]=a.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(a){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),oe(a,_t(function(s,f){this.set(f,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var eh=le(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),fs=le(Object.create(null),{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 Ti(e,t){var n=fs[e];return n?n(t):t}function Ni(e){return!!eh[e]}function ds(e){return!!fs[e]}function Oe(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function qe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}qe.prototype.build=function(){return wf(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},qe.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)},qe.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=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=i.indexOf(e);if(s===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(s,1),this.addProperty(t,n?void 0:s,a),o[r.name]=o[r.localName]=t},qe.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Oe(i[0],r),a=Oe(i[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},qe.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e},qe.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},qe.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},qe.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},qe.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},qe.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},qe.prototype.hasProperty=function(e){return this.propertiesByName[e]},qe.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(oe(e.properties,_t(function(o){o=le({},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)),r.push(e),n[i]=e)};function Tt(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,oe(e,_t(this.registerPackage,this))}Tt.prototype.getPackage=function(e){return this.packageMap[e]},Tt.prototype.getPackages=function(){return this.packages},Tt.prototype.registerPackage=function(e){e=le({},e);var t=this.packageMap;ps(t,e,"prefix"),ps(t,e,"uri"),oe(e.types,_t(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Tt.prototype.registerType=function(e,t){e=le({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:le({},e.meta||{})});var n=Oe(e.name,t.prefix),r=n.name,i=Object.create(null);oe(e.properties,_t(function(o){var a=Oe(o.name,n.prefix),s=a.name;Ni(o.type)||(o.type=Oe(o.type,a.prefix).name),le(o,{ns:a,name:s}),i[s]=o},this)),le(e,{ns:n,name:r,propertiesByName:i}),oe(e.extends,_t(function(o){var a=Oe(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e},Tt.prototype.mapTypes=function(e,t,n){var r=Ni(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(f,d){var h=Oe(f,Ni(f)?"":e.prefix);i.mapTypes(h,t,d)}function a(f){return o(f,!0)}function s(f){return o(f,!1)}if(!r)throw new Error("unknown type <"+e.name+">");oe(r.superClass,n?a:s),t(r,!n),oe(r.traits,a)},Tt.prototype.getEffectiveDescriptor=function(e){var t=Oe(e),n=new qe(t);this.mapTypes(t,function(i,o){n.addTrait(i,o)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},Tt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function ps(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ht(e){this.model=e}Ht.prototype.set=function(e,t,n){if(!rt(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;th(n)?r?delete e[i]:delete e.$attrs[Di(t)]:r?i in e?e[i]=n:hs(e,r,n):e.$attrs[Di(t)]=n},Ht.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Di(t)];var r=n.name;return!e[r]&&n.isMany&&hs(e,n,[]),e[r]},Ht.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=le({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},Ht.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Ht.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Ht.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(typeof i<"u"){const o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw o;typeof console<"u"&&console.warn(o)}return null};function th(e){return typeof e>"u"}function hs(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Di(e){return e.replace(/^:/,"")}function Ze(e,t={}){this.properties=new Ht(this),this.factory=new us(this,this.properties),this.registry=new Tt(e,this.properties),this.typeCache=Object.create(null),this.config=t}Ze.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},Ze.prototype.getType=function(e){var t=this.typeCache,n=rt(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},Ze.prototype.createAny=function(e,t,n){var r=Oe(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){vf(this,[a],s)}},o={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,o),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),oe(n,function(a,s){bt(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i},Ze.prototype.getPackage=function(e){return this.registry.getPackage(e)},Ze.prototype.getPackages=function(){return this.registry.getPackages()},Ze.prototype.getElementDescriptor=function(e){return e.$descriptor},Ze.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},Ze.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},Ze.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ms=String.fromCharCode,nh=Object.prototype.hasOwnProperty,rh=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,An={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(An).forEach(function(e){An[e.toUpperCase()]=An[e]});function ih(e,t,n,r){return r?nh.call(An,r)?An[r]:"&"+r+";":ms(t||parseInt(n,16))}function Wt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(rh,ih):e}var ys="non-whitespace outside of root node";function Nt(e){return new Error(e)}function oh(e){return"missing namespace for prefix <"+e+">"}function dr(e){return{get:e,enumerable:!0}}function ah(e){var t=Object.create(null),n;for(n in e)t[n]=e[n];return t}var gs=Symbol("nameCache");function Pi(e){return e+"$uri"}function sh(e){var t=Object.create(null),n,r;for(n in e)r=e[n],t[r]=r,t[Pi(r)]=n;return t}function pr(){return{line:0,column:0}}function lh(e){throw e}function vs(e){if(!this)return new vs(e);var t=e&&e.proxy,n,r,i,o,a=lh,s,f,d,h,m=pr,R=!1,$=!1,Y="",W=!1,P=!1,C=null,O=!1,y,v,S,T;function E(_){_ instanceof Error||(_=Nt(_)),C=_,a(_,m)}function x(_){s&&(_ instanceof Error||(_=Nt(_)),s(_,m))}this.on=function(_,q){if(typeof q!="function")throw Nt("required args <name, cb>");switch(_){case"openTag":r=q;break;case"text":n=q;break;case"closeTag":i=q;break;case"error":a=q;break;case"warn":s=q;break;case"cdata":o=q;break;case"attention":h=q;break;case"question":d=q;break;case"comment":f=q;break;default:throw Nt("unsupported event: "+_)}return this},this.ns=function(_){if(typeof _>"u"&&(_={}),typeof _!="object")throw Nt("required args <nsMap={}>");var q=Object.create(null),ae;for(ae in _)q[ae]=_[ae];return P=!0,T=q,this};function z(){y=P?[]:null,v=P?sh(T):null,S=[],m=pr,O=!1,C=null,$=!1,Y=""}this.parse=function(_){if(typeof _!="string")throw Nt("required args <xml=string>");if(R)throw Nt("parse during stream; call end() first");return z(),M(_),m=pr,O=!1,C},this.write=function(_){if(typeof _!="string")throw Nt("required args <xml=string>");return R||(z(),R=!0),C||(Y=M(Y+_,!0)||""),this},this.end=function(){return R||z(),R=!1,C||M(Y),Y="",m=pr,O=!1,C},this.stop=function(){O=!0};function M(_,q=!1){var ae=null,J=null,G,X=0,re=!1,Q=!1,B=0,I=0,F,A,k,V,de,se,p,u,c,g="",b=0,D;function ee(te,j){var U=te.indexOf(":");if(U===-1)return te;var Z=v[te.substring(0,U)];return Z?j===Z?te.substr(U+1):Z+te.substr(U):(x(oh(te.substring(0,U))),null)}function N(){if(D!==null)return D;var te,j,U=P&&v.xmlns,Z=P&&W?[]:null,L=b,pe=g,we=pe.length,et,Re,Ye,ft,Ne,Tn={},Gs=new Set,tt,ve,be;e:for(;L<we;L++)if(tt=!1,ve=pe.charCodeAt(L),!(ve===32||ve<14&&ve>8)){for((ve<65||ve>122||ve>90&&ve<97)&&ve!==95&&ve!==58&&(x("illegal first char attribute name"),tt=!0),be=L+1;be<we;be++)if(ve=pe.charCodeAt(be),!(ve>96&&ve<123||ve>64&&ve<91||ve>47&&ve<59||ve===46||ve===45||ve===95)){if(ve===32||ve<14&&ve>8){x("missing attribute value"),L=be;continue e}if(ve===61)break;x("illegal attribute name char"),tt=!0}if(Ne=pe.substring(L,be),Ne==="xmlns:xmlns"&&(x("illegal declaration of xmlns"),tt=!0),ve=pe.charCodeAt(be+1),ve===34)be=pe.indexOf('"',L=be+2),be===-1&&(be=pe.indexOf("'",L),be!==-1&&(x("attribute value quote missmatch"),tt=!0));else if(ve===39)be=pe.indexOf("'",L=be+2),be===-1&&(be=pe.indexOf('"',L),be!==-1&&(x("attribute value quote missmatch"),tt=!0));else for(x("missing attribute value quotes"),tt=!0,be=be+1;be<we&&(ve=pe.charCodeAt(be+1),!(ve===32||ve<14&&ve>8));be++);for(be===-1&&(x("missing closing quotes"),be=we,tt=!0),tt||(Ye=pe.substring(L,be)),L=be;be+1<we&&(ve=pe.charCodeAt(be+1),!(ve===32||ve<14&&ve>8));be++)L===be&&(x("illegal character after attribute end"),tt=!0);if(L=be+1,tt)continue e;if(Gs.has(Ne)){x("attribute <"+Ne+"> already defined");continue}if(Gs.add(Ne),!P){Tn[Ne]=Ye;continue}if(W){if(Re=Ne==="xmlns"?"xmlns":Ne.charCodeAt(0)===120&&Ne.substr(0,6)==="xmlns:"?Ne.substr(6):null,Re!==null){if(te=Wt(Ye),j=Pi(Re),ft=T[te],!ft){if(Re==="xmlns"||j in v&&v[j]!==te)do ft="ns"+X++;while(typeof v[ft]<"u");else ft=Re;T[te]=ft}v[Re]!==ft&&(et||(v=ah(v),et=!0),v[Re]=ft,Re==="xmlns"&&(v[Pi(ft)]=te,U=ft),v[j]=te),Tn[Ne]=Ye;continue}Z.push(Ne,Ye);continue}Ne=ee(Ne,U),Ne!==null&&(Tn[Ne]=Ye)}if(W)for(L=0,we=Z.length;L<we;L++)Ne=ee(Z[L++],U),Ye=Z[L],Ne!==null&&(Tn[Ne]=Ye);return D=Tn}function K(){for(var te=/(\r\n|\r|\n)/g,j=0,U=0,Z=0,L=I,pe,we;B>=Z&&(pe=te.exec(_),!(!pe||(L=pe[0].length+pe.index,L>B)));)j+=1,Z=L;return B==-1?(U=L,we=_.substring(I)):I===0?we=_.substring(I,B):(U=B-Z,we=I==-1?_.substring(B):_.substring(B,I+1)),{data:we,line:j,column:U}}for(m=K,t&&(c=Object.create({},{name:dr(function(){return p}),originalName:dr(function(){return u}),attrs:dr(N),ns:dr(function(){return v})}));I!==-1;){if(_.charCodeAt(I)===60?B=I:B=_.indexOf("<",I),B===-1){if(q)return _.substring(I);if(S.length)return E("unexpected end of file");if(!$)return E("missing start tag");I<_.length&&_.substring(I).trim()&&x(ys);return}if($||($=!0),I!==B){if(S.length){if(n&&(n(_.substring(I,B),Wt,m),O))return}else if(_.substring(I,B).trim()&&(x(ys),O))return}if(V=_.charCodeAt(B+1),V===33){if(k=_.charCodeAt(B+2),k===91&&_.substr(B+3,6)==="CDATA["){if(I=_.indexOf("]]>",B),I===-1)return q?_.substring(B):E("unclosed cdata");if(o&&(o(_.substring(B+9,I),m),O))return;I+=3;continue}if(k===45&&_.charCodeAt(B+3)===45){if(I=_.indexOf("-->",B),I===-1)return q?_.substring(B):E("unclosed comment");if(f&&(f(_.substring(B+4,I),Wt,m),O))return;I+=3;continue}}if(V===63){if(I=_.indexOf("?>",B),I===-1)return q?_.substring(B):E("unclosed question");if(d&&(d(_.substring(B,I+2),m),O))return;I+=2;continue}for(F=B+1;;F++){if(de=_.charCodeAt(F),isNaN(de))return q?_.substring(B):(I=-1,E("unclosed tag"));if(de===34)k=_.indexOf('"',F+1),F=k!==-1?k:F;else if(de===39)k=_.indexOf("'",F+1),F=k!==-1?k:F;else if(de===62){I=F;break}}if(V===33){if(h&&(h(_.substring(B,I+1),Wt,m),O))return;I+=1;continue}if(D={},V===47){if(re=!1,Q=!0,!S.length)return E("missing open tag");if(F=p=S.pop(),k=B+2+F.length,_.substring(B+2,k)!==F)return E("closing tag mismatch");for(;k<I;k++)if(V=_.charCodeAt(k),!(V===32||V>8&&V<14))return E("close tag")}else{if(_.charCodeAt(I-1)===47?(F=p=_.substring(B+1,I-1),re=!0,Q=!0):(F=p=_.substring(B+1,I),re=!0,Q=!1),!(V>96&&V<123||V>64&&V<91||V===95||V===58))return E("illegal first char nodeName");for(k=1,A=F.length;k<A;k++)if(V=F.charCodeAt(k),!(V>96&&V<123||V>64&&V<91||V>47&&V<59||V===45||V===95||V==46)){if(V===32||V<14&&V>8){p=F.substring(0,k),D=null;break}return E("invalid nodeName")}Q||S.push(p)}if(P){G=v,re&&(Q||y.push(G),D===null&&(W=F.indexOf("xmlns",k)!==-1)&&(b=k,g=F,N(),W=!1)),u=p,J!==v&&(ae=v[gs],ae===void 0&&(ae=v[gs]=Object.create(null)),J=v);var H=ae[p];if(H!==void 0)p=H;else{if(V=p.indexOf(":"),V!==-1){if(se=v[p.substring(0,V)],!se)return E("missing namespace on <"+u+">");p=p.substr(V+1)}else se=v.xmlns;se&&(p=se+":"+p),ae[u]=p}}if(re&&(b=k,g=F,r&&(t?r(c,Wt,Q,m):r(p,N,Wt,Q,m),O)))return;if(Q){if(i&&(i(t?c:p,Wt,re,m),O))return;P&&(re?v=G:v=y.pop())}I+=1}}}function ws(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Ii={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},bs="property";function Es(e){return e.xml&&e.xml.serialize}function ch(e){const t=Es(e);return t!==bs&&(t||null)}function uh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function _s(e,t){return ws(t)?e.prefix+":"+uh(e.localName):e.name}function fh(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function dh(e,t,n){const r=Oe(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Oe(i);var a=n.getPackage(o.prefix);return fh(o,a)}function Dt(e){return new Error(e)}function vt(e){return e.$descriptor}function ph(e){le(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw Dt("expected element");var n=this.elementsById,r=vt(t),i=r.idProperty,o;if(i&&(o=t.get(i.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw Dt("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function kn(){}kn.prototype.handleEnd=function(){},kn.prototype.handleText=function(){},kn.prototype.handleNode=function(){};function Oi(){}Oi.prototype=Object.create(kn.prototype),Oi.prototype.handleNode=function(){return this};function sn(){}sn.prototype=Object.create(kn.prototype),sn.prototype.handleText=function(e){this.body=(this.body||"")+e};function Cn(e,t){this.property=e,this.context=t}Cn.prototype=Object.create(sn.prototype),Cn.prototype.handleNode=function(e){if(this.element)throw Dt("expected no sub nodes");return this.element=this.createReference(e),this},Cn.prototype.handleEnd=function(){this.element.id=this.body},Cn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Bi(e,t){this.element=t,this.propertyDesc=e}Bi.prototype=Object.create(sn.prototype),Bi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Ti(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function hr(){}hr.prototype=Object.create(sn.prototype),hr.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 Le(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Le.prototype=Object.create(hr.prototype),Le.prototype.addReference=function(e){this.context.addReference(e)},Le.prototype.handleText=function(e){var t=this.element,n=vt(t),r=n.bodyProperty;if(!r)throw Dt("unexpected body text <"+e+">");sn.prototype.handleText.call(this,e)},Le.prototype.handleEnd=function(){var e=this.body,t=this.element,n=vt(t),r=n.bodyProperty;r&&e!==void 0&&(e=Ti(r.type,e),t.set(r.name,e))},Le.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=vt(n),i=this.context,o=new n({}),a=this.model,s;return oe(t,function(f,d){var h=r.propertiesByName[d],m;h&&h.isReference?h.isMany?(m=f.split(" "),oe(m,function(R){i.addReference({element:o,property:h.ns.name,id:R})})):i.addReference({element:o,property:h.ns.name,id:f}):(h?f=Ti(h.type,f):d==="xmlns"?d=":"+d:(s=Oe(d,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+d+">",element:o,property:d,value:f})),o.set(d,f))}),o},Le.prototype.getPropertyForNode=function(e){var t=e.name,n=Oe(t),r=this.type,i=this.model,o=vt(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const d=ch(s);if(d){const h=e.attributes[d];if(h){const m=dh(h,e.ns,i),R=i.getType(m);return le({},s,{effectiveType:vt(R).name})}}return s}var f=i.getPackage(n.prefix);if(f){const d=_s(n,f),h=i.getType(d);if(s=Qe(o.properties,function(m){return!m.isVirtual&&!m.isReference&&!m.isAttribute&&h.hasType(m.type)}),s)return le({},s,{effectiveType:vt(h).name})}else if(s=Qe(o.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),s)return s;throw Dt("unrecognized element <"+n.name+">")},Le.prototype.toString=function(){return"ElementDescriptor["+vt(this.type).name+"]"},Le.prototype.valueHandler=function(e,t){return new Bi(e,t)},Le.prototype.referenceHandler=function(e){return new Cn(e,this.context)},Le.prototype.handler=function(e){return e==="Element"?new ln(this.model,e,this.context):new Le(this.model,e,this.context)},Le.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,ds(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var o=i.element;return o!==void 0&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(le(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Mi(e,t,n){Le.call(this,e,t,n)}Mi.prototype=Object.create(Le.prototype),Mi.prototype.createElement=function(e){var t=e.name,n=Oe(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&_s(n,o)||t;if(!i.hasType(a))throw Dt("unexpected element <"+e.originalName+">");return Le.prototype.createElement.call(this,e)};function ln(e,t,n){this.model=e,this.context=n}ln.prototype=Object.create(hr.prototype),ln.prototype.createElement=function(e){var t=e.name,n=Oe(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},ln.prototype.handleChild=function(e){var t=new ln(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t},ln.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Li(e){e instanceof Ze&&(e={model:e}),le(this,{lax:!1},e)}Li.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Le?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,o=this.lax,a=new ph(le({},t,{rootHandler:r})),s=new vs({proxy:!0}),f=hh();r.context=a,f.push(r);function d(S,T,E){var x=T(),z=x.line,M=x.column,_=x.data;_.charAt(0)==="<"&&_.indexOf(" ")!==-1&&(_=_.slice(0,_.indexOf(" "))+">");var q="unparsable content "+(_?_+" ":"")+`detected
|
|
10
|
+
line: `+z+`
|
|
11
|
+
column: `+M+`
|
|
12
|
+
nested error: `+S.message;if(E)return a.addWarning({message:q,error:S}),!0;throw Dt(q)}function h(S,T){return d(S,T,!0)}function m(){var S=a.elementsById,T=a.references,E,x;for(E=0;x=T[E];E++){var z=x.element,M=S[x.id],_=vt(z).propertiesByName[x.property];if(M||a.addWarning({message:"unresolved reference <"+x.id+">",element:x.element,property:x.property,value:x.id}),_.isMany){var q=z.get(_.name),ae=q.indexOf(x);ae===-1&&(ae=q.length),M?q[ae]=M:q.splice(ae,1)}else z.set(_.name,M)}}function R(){f.pop().handleEnd()}var $=/^<\?xml /i,Y=/ encoding="([^"]+)"/i,W=/^utf-8$/i;function P(S){if($.test(S)){var T=Y.exec(S),E=T&&T[1];!E||W.test(E)||a.addWarning({message:"unsupported document encoding <"+E+">, falling back to UTF-8"})}}function C(S,T){var E=f.peek();try{f.push(E.handleNode(S))}catch(x){d(x,T,o)&&f.push(new Oi)}}function O(S,T){try{f.peek().handleText(S)}catch(E){h(E,T)}}function y(S,T){S.trim()&&O(S,T)}var v=i.getPackages().reduce(function(S,T){return S[T.uri]=T.prefix,S},Object.entries(Ii).reduce(function(S,[T,E]){return S[E]=T,S},i.config&&i.config.nsMap||{}));return s.ns(v).on("openTag",function(S,T,E,x){var z=S.attrs||{},M=Object.keys(z).reduce(function(q,ae){var J=T(z[ae]);return q[ae]=J,q},{}),_={name:S.name,originalName:S.originalName,attributes:M,ns:S.ns};C(_,x)}).on("question",P).on("closeTag",R).on("cdata",O).on("text",function(S,T,E){y(T(S),E)}).on("error",d).on("warn",h),new Promise(function(S,T){var E;try{s.parse(e),m()}catch(q){E=q}var x=r.element;!E&&!x&&(E=Dt("failed to parse document as <"+r.type.$descriptor.name+">"));var z=a.warnings,M=a.references,_=a.elementsById;return E?(E.warnings=z,T(E)):S({rootElement:x,elementsById:_,references:M,warnings:z})})},Li.prototype.handler=function(e){return new Mi(this.model,e)};function hh(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var mh=`<?xml version="1.0" encoding="UTF-8"?>
|
|
13
|
+
`,yh=/<|>|'|"|&|\n\r|\n/g,xs=/<|>|&/g;function st(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}st.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},st.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},st.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},st.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},st.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},st.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},st.prototype.getNSKey=function(e){return e.prefix!==void 0?e.uri+"|"+e.prefix:e.uri},st.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},st.prototype.getUsed=function(e){var t=[].concat(this.wellknown,this.custom);return t.filter(n=>{var r=this.getNSKey(n);return this.used[r]})};function gh(e){return e.charAt(0).toLowerCase()+e.slice(1)}function vh(e,t){return ws(t)?gh(e):e}function Ss(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function As(e){return rt(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function wh(e){return e.getUsed().filter(function(t){return t.prefix!=="xml"}).map(function(t){var n="xmlns"+(t.prefix?":"+t.prefix:"");return{name:n,value:t.uri}})}function bh(e,t){return t.isGeneric?le({localName:t.ns.localName},e):le({localName:vh(t.ns.localName,t.$pkg)},e)}function Eh(e,t){return le({localName:t.ns.localName},e)}function _h(e){var t=e.$descriptor;return en(t.properties,function(n){var r=n.name;if(n.isVirtual||!Qt(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var xh={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Sh={"<":"lt",">":"gt","&":"amp"};function ks(e,t,n){return e=rt(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function Ah(e){return ks(e,yh,xh)}function kh(e){return ks(e,xs,Sh)}function Ch(e){return en(e,function(t){return t.isAttr})}function Rh(e){return en(e,function(t){return!t.isAttr})}function Fi(e){this.tagName=e}Fi.prototype.build=function(e){return this.element=e,this},Fi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function qt(){}qt.prototype.serializeValue=qt.prototype.serializeTo=function(e){e.append(this.escape?kh(this.value):this.value)},qt.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(xs)!==-1&&(this.escape=!0),this};function $i(e){this.tagName=e}Ss($i,qt),$i.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function Ee(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}Ee.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,o=t.isGeneric;return o?r=this.parseGenericNsAttributes(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(i=_h(e),this.parseAttributes(Ch(i)),this.parseContainments(Rh(i))),this.parseGenericAttributes(e,r),this},Ee.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return bh(t,e)},Ee.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Eh(t,e)},Ee.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Ee.prototype.nsAttributeName=function(e){var t;if(rt(e)?t=Oe(e):t=e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:le({localName:t.localName},n)},Ee.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter(([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n)).map(([t,n])=>({name:t,value:n}))},Ee.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push(new qt().build({type:"String"},t));var n=e.$children;n&&oe(n,r=>{this.body.push(new Ee(this).build(r))})},Ee.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=Oe(t),o;if(i.prefix==="xmlns"&&(o={prefix:i.localName,uri:n}),!i.prefix&&i.localName==="xmlns"&&(o={uri:n}),!o)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(o,!0,!0);else{var a=this.logNamespaceUsed(o,!0);this.getNamespaces().logUsed(a)}},Ee.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,r=[];return oe(n,function(i,o){var a=t.parseNsAttribute(e,o,i);a&&r.push(a)}),r},Ee.prototype.parseGenericAttributes=function(e,t){var n=this;oe(t,function(r){try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){typeof console<"u"&&console.warn(`missing namespace information for <${r.name}=${r.value}> on`,e,i)}})},Ee.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;oe(e,function(i){var o=r.get(i.name),a=i.isReference,s=i.isMany;if(s||(o=[o]),i.isBody)n.push(new qt().build(i,o[0]));else if(ds(i.type))oe(o,function(d){n.push(new $i(t.addTagName(t.nsPropertyTagName(i))).build(i,d))});else if(a)oe(o,function(d){n.push(new Fi(t.addTagName(t.nsPropertyTagName(i))).build(d))});else{var f=Es(i);oe(o,function(d){var h;f?f===bs?h=new Ee(t,i):h=new mr(t,i,f):h=new Ee(t),n.push(h.build(d))})}})},Ee.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new st(r):t=r),t},Ee.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,o=e.prefix,a=r.byUri(i);return(!a||n)&&r.add(e,t),r.mapPrefix(o,i),e},Ee.prototype.logNamespaceUsed=function(e,t){var n=this.getNamespaces(t),r=e.prefix,i=e.uri,o,a,s;if(!r&&!i)return{localName:e.localName};if(s=n.defaultUriByPrefix(r),i=i||s||n.uriByPrefix(r),!i)throw new Error("no namespace uri given for prefix <"+r+">");if(e=n.byUri(i),!e&&!r&&(e=this.logNamespace({uri:i},s===i,!0)),!e){for(o=r,a=1;n.uriByPrefix(o);)o=r+"_"+a++;e=this.logNamespace({prefix:o,uri:i},s===i)}return r&&n.mapPrefix(r,i),e},Ee.prototype.parseAttributes=function(e){var t=this,n=this.element;oe(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var o=[];oe(i,function(a){o.push(a.id)}),i=o.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})},Ee.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),As(e)},Ee.prototype.addAttribute=function(e,t){var n=this.attrs;rt(t)&&(t=Ah(t));var r=hf(n,function(o){return o.name.localName===e.localName&&o.name.uri===e.uri&&o.name.prefix===e.prefix}),i={name:e,value:t};r!==-1?n.splice(r,1,i):n.push(i)},Ee.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=wh(n).concat(t)),oe(t,function(r){e.append(" ").append(As(r.name)).append('="').append(r.value).append('"')})},Ee.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==qt;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),oe(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function mr(e,t,n){Ee.call(this,e,t),this.serialization=n}Ss(mr,Ee),mr.prototype.parseNsAttributes=function(e){var t=Ee.prototype.parseNsAttributes.call(this,e).filter(a=>a.name!==this.serialization),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),o=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(r.prefix?r.prefix+":":"")+o+n.ns.localName),t},mr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function Th(){this.value="",this.write=function(e){this.value+=e}}function Nh(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(`
|
|
14
|
+
`),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function Dh(e){e=le({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new Th,o=new Nh(i,e.format);e.preamble&&o.append(mh);var a=new Ee,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(Ph(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Ph(e){const t=e.config&&e.config.nsMap||{},n={};for(const r in Ii)n[r]=Ii[r];for(const r in t){const i=t[r];n[i]=r}for(const r of e.getPackages())n[r.prefix]=r.uri;return n}function yr(e,t){Ze.call(this,e,t)}yr.prototype=Object.create(Ze.prototype),yr.prototype.fromXML=function(e,t,n){rt(t)||(n=t,t="bpmn:Definitions");var r=new Li(le({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},yr.prototype.toXML=function(e,t){var n=new Dh(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var Ih="BPMN20",Oh="http://www.omg.org/spec/BPMN/20100524/MODEL",Bh="bpmn",Mh=[],Lh=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],Fh=[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],$h={tagAlias:"lowerCase",typePrefix:"t"},Vh={name:Ih,uri:Oh,prefix:Bh,associations:Mh,types:Lh,enumerations:Fh,xml:$h},jh="BPMNDI",Uh="http://www.omg.org/spec/BPMN/20100524/DI",zh="bpmndi",Hh=[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],Wh=[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],qh=[],Yh={name:jh,uri:Uh,prefix:zh,types:Hh,enumerations:Wh,associations:qh},Kh="DC",Gh="http://www.omg.org/spec/DD/20100524/DC",Xh="dc",Jh=[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],Zh=[],Qh={name:Kh,uri:Gh,prefix:Xh,types:Jh,associations:Zh},em="DI",tm="http://www.omg.org/spec/DD/20100524/DI",nm="di",rm=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],im=[],om={tagAlias:"lowerCase"},am={name:em,uri:tm,prefix:nm,types:rm,associations:im,xml:om},sm="bpmn.io colors for BPMN",lm="http://bpmn.io/schema/bpmn/biocolor/1.0",cm="bioc",um=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],fm=[],dm=[],pm={name:sm,uri:lm,prefix:cm,types:um,enumerations:fm,associations:dm},hm="BPMN in Color",mm="http://www.omg.org/spec/BPMN/non-normative/color/1.0",ym="color",gm=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],vm=[],wm=[],bm={name:hm,uri:mm,prefix:ym,types:gm,enumerations:vm,associations:wm};const Em={bpmn:Vh,bpmndi:Yh,dc:Qh,di:am,bioc:pm,color:bm};function _m(e,t){const n=le({},Em,e);return new yr(n,t)}function $e(e,t){return e.$instanceOf(t)}function xm(e){return Qe(e.rootElements,function(t){return $e(t,"bpmn:Process")||$e(t,"bpmn:Collaboration")})}function Sm(e){var t={},n=[],r={};function i(A,k){return function(V){A(V,k)}}function o(A){t[A.id]=A}function a(A){return t[A.id]}function s(A,k){var V=A.gfx;if(V)throw new Error(`already rendered ${Ie(A)}`);return e.element(A,r[A.id],k)}function f(A,k){return e.root(A,r[A.id],k)}function d(A,k){try{var V=r[A.id]&&s(A,k);return o(A),V}catch(de){h(de.message,{element:A,error:de}),console.error(`failed to import ${Ie(A)}`,de)}}function h(A,k){e.error(A,k)}var m=this.registerDi=function(k){var V=k.bpmnElement;V?r[V.id]?h(`multiple DI elements defined for ${Ie(V)}`,{element:V}):r[V.id]=k:h(`no bpmnElement referenced in ${Ie(k)}`,{element:k})};function R(A){$(A.plane)}function $(A){m(A),oe(A.planeElement,Y)}function Y(A){m(A)}this.handleDefinitions=function(k,V){var de=k.diagrams;if(V&&de.indexOf(V)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!V&&de&&de.length&&(V=de[0]),!V)throw new Error("no diagram to display");r={},R(V);var se=V.plane;if(!se)throw new Error(`no plane for ${Ie(V)}`);var p=se.bpmnElement;if(!p)if(p=xm(k),p)h(`correcting missing bpmnElement on ${Ie(se)} to ${Ie(p)}`),se.bpmnElement=p,m(se);else throw new Error("no process or collaboration to display");var u=f(p,se);if($e(p,"bpmn:Process")||$e(p,"bpmn:SubProcess"))P(p,u);else if($e(p,"bpmn:Collaboration"))I(p,u),C(k.rootElements,u);else throw new Error(`unsupported bpmnElement for ${Ie(se)}: ${Ie(p)}`);W(n)};var W=this.handleDeferred=function(){for(var k;n.length;)k=n.shift(),k()};function P(A,k){re(A,k),z(A.ioSpecification,k),x(A.artifacts,k),o(A)}function C(A,k){var V=en(A,function(de){return!a(de)&&$e(de,"bpmn:Process")&&de.laneSets});V.forEach(i(P,k))}function O(A,k){d(A,k)}function y(A,k){oe(A,i(O,k))}function v(A,k){d(A,k)}function S(A,k){d(A,k)}function T(A,k){d(A,k)}function E(A,k){d(A,k)}function x(A,k){oe(A,function(V){$e(V,"bpmn:Association")?n.push(function(){E(V,k)}):E(V,k)})}function z(A,k){A&&(oe(A.dataInputs,i(S,k)),oe(A.dataOutputs,i(T,k)))}var M=this.handleSubProcess=function(k,V){re(k,V),x(k.artifacts,V)};function _(A,k){var V=d(A,k);$e(A,"bpmn:SubProcess")&&M(A,V||k),$e(A,"bpmn:Activity")&&z(A.ioSpecification,k),n.push(function(){oe(A.dataInputAssociations,i(v,k)),oe(A.dataOutputAssociations,i(v,k))})}function q(A,k){d(A,k)}function ae(A,k){d(A,k)}function J(A,k){n.push(function(){var V=d(A,k);A.childLaneSet&&G(A.childLaneSet,V||k),F(A)})}function G(A,k){oe(A.lanes,i(J,k))}function X(A,k){oe(A,i(G,k))}function re(A,k){Q(A.flowElements,k),A.laneSets&&X(A.laneSets,k)}function Q(A,k){oe(A,function(V){$e(V,"bpmn:SequenceFlow")?n.push(function(){q(V,k)}):$e(V,"bpmn:BoundaryEvent")?n.unshift(function(){_(V,k)}):$e(V,"bpmn:FlowNode")?_(V,k):$e(V,"bpmn:DataObject")||($e(V,"bpmn:DataStoreReference")||$e(V,"bpmn:DataObjectReference")?ae(V,k):h(`unrecognized flowElement ${Ie(V)} in context ${Ie(k&&k.businessObject)}`,{element:V,context:k}))})}function B(A,k){var V=d(A,k),de=A.processRef;de&&P(de,V||k)}function I(A,k){oe(A.participants,i(B,k)),n.push(function(){y(A.messageFlows,k)}),x(A.artifacts,k)}function F(A){oe(A.flowNodeRef,function(k){var V=k.get("lanes");V&&V.push(A)})}}function Am(e,t,n){var r,i,o,a,s=[];function f(d,h){var m={root:function(W,P){return r.add(W,P)},element:function(W,P,C){return r.add(W,P,C)},error:function(W,P){s.push({message:W,context:P})}},R=new Sm(m);h=h||d.diagrams&&d.diagrams[0];var $=km(d,h);if(!$)throw new Error("no diagram to display");oe($,function(W){R.handleDefinitions(d,W)});var Y=h.plane.bpmnElement.id;o.setRootElement(o.findRoot(Y+"_plane")||o.findRoot(Y))}return new Promise(function(d,h){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),f(t,n),i.fire("import.render.complete",{error:a,warnings:s}),d({warnings:s})}catch(m){return m.warnings=s,h(m)}})}function km(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!ce(n,"bpmn:Process")&&!ce(n,"bpmn:Collaboration")&&(r=Cm(n));var i;ce(r,"bpmn:Collaboration")?i=r:i=Qe(e.rootElements,function(d){if(ce(d,"bpmn:Collaboration"))return Qe(d.participants,function(h){return h.processRef===r})});var o=[r];i&&(o=mf(i.participants,function(d){return d.processRef}),o.push(i));var a=Cs(o),s=[t],f=[n];return oe(e.diagrams,function(d){if(d.plane){var h=d.plane.bpmnElement;a.indexOf(h)!==-1&&f.indexOf(h)===-1&&(s.push(d),f.push(h))}}),s}}function Cs(e){var t=[];return oe(e,function(n){n&&(t.push(n),t=t.concat(Cs(n.flowElements)))}),t}function Cm(e){for(var t=e;t;){if(ce(t,"bpmn:Process"))return t;t=t.$parent}}var Rm='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',Rs=Rm,Ts={verticalAlign:"middle"},Ns={color:"#404040"},Tm={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Nm={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Dm={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},Pm='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+Rs+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',lt;function Im(){lt=at(Pm),ze(lt,Tm),ze(ht("svg",lt),Ts),ze(ht(".backdrop",lt),Nm),ze(ht(".notice",lt),Dm),ze(ht(".link",lt),Ns,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function Om(){lt||(Im(),gi.bind(lt,".backdrop","click",function(e){document.body.removeChild(lt)})),document.body.appendChild(lt)}const gr=5,Ds="djs-outline-hidden";function Ae(e){e=le({},Mm,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),Fm(this._container)}nt(Ae,Rt),Ae.prototype.importXML=async function(t,n){const r=this;function i(a){return r.get("eventBus").createEvent(a)}let o=[];try{t=this._emit("import.parse.start",{xml:t})||t;let a;try{a=await this._moddle.fromXML(t,"bpmn:Definitions")}catch(R){throw this._emit("import.parse.complete",{error:R}),R}let s=a.rootElement;const f=a.references,d=a.warnings,h=a.elementsById;o=o.concat(d),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:h,references:f,warnings:o}))||s;const m=await this.importDefinitions(s,n);return o=o.concat(m.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),vr(s,o),s=Bm(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}},Ae.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}},Ae.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const o=new Error("no XML imported");throw vr(o,[]),o}if(typeof t=="string"&&(r=Lm(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw vr(o,[]),o}try{this.clear()}catch(o){throw vr(o,[]),o}const{warnings:i}=await Am(this,n,r);return{warnings:i}},Ae.prototype.saveXML=async function(t){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(await this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(a){r=a}const o=r?{error:r}:{xml:i};if(this._emit("saveXML.done",o),r)throw r;return o},Ae.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),o=ht(":scope > defs",r._svg),a=ya(i),s=o?"<defs>"+ya(o)+"</defs>":"",f=r.getContainer();jt(f).add(Ds);let d;try{d=i.getBBox()}finally{jt(f).remove(Ds)}const h=d.x-gr,m=d.y-gr,R=d.width+gr*2,$=d.height+gr*2;t=`<?xml version="1.0" encoding="utf-8"?>
|
|
15
15
|
<!-- created with bpmn-js / http://bpmn.io -->
|
|
16
16
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
17
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+_+'" height="'+B+'" viewBox="'+h+" "+m+" "+_+" "+B+'" version="1.1">'+s+a+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}},Te.prototype._setDefinitions=function(e){this._definitions=e},Te.prototype.getModules=function(){return this._modules},Te.prototype.clear=function(){this.getDefinitions()&&Nt.prototype.clear.call(this)},Te.prototype.destroy=function(){Nt.prototype.destroy.call(this),Gn(this._container)},Te.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},Te.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Te.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=gt(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Te.prototype.getDefinitions=function(){return this._definitions},Te.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Te.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,r,i),s=ne(Gu(n,["additionalModules"]),{canvas:ne({},n.canvas,{container:e}),modules:a});Nt.call(this,s),n&&n.container&&this.attachTo(n.container)},Te.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Te.prototype._createContainer=function(e){const t=ut('<div class="bjs-container"></div>');return Xe(t,{width:hs(e.width),height:hs(e.height),position:e.position}),t},Te.prototype._createModdle=function(e){const t=ne({},this._moddleExtensions,e.moddleExtensions);return new Zh(t)},Te.prototype._modules=[];function dr(e,t){return e.warnings=t,e}function fm(e){const n=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}const pm={width:"100%",height:"100%",position:"relative"};function hs(e){return e+(St(e)?"px":"")}function dm(e,t){return t&&ot(e.diagrams,function(n){return n.id===t})||null}function hm(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+us+"</a>",r=ut(n);Xe(gt("svg",r),fs),Xe(r,ps,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Rt.bind(r,"click",function(i){um(),i.preventDefault()})}function hr(e){Te.call(this,e)}at(hr,Te),hr.prototype._modules=[Cp,Wp,ga,Zp,pa],hr.prototype._moddleExtensions={};function ms(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ri(e){return Math.log(e)/Math.log(10)}function ys(e,t){var n=Ri(e.min),r=Ri(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function mm(e,t){return Math.max(e.min,Math.min(e.max,t))}var ym=Math.sign||function(e){return e>=0?1:-1},Ti={min:.2,max:4},gs=10,gm=.1,vm=.75;function dt(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=At(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||vm;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}dt.$inject=["config.zoomScroll","eventBus","canvas"],dt.prototype.scroll=function(t){this._canvas.scroll(t)},dt.prototype.reset=function(){this._canvas.zoom("fit-viewport")},dt.prototype.zoom=function(t,n){var r=ys(Ti,gs*2);this._totalDelta+=t,Math.abs(this._totalDelta)>gm&&(this._zoom(t,n,r),this._totalDelta=0)},dt.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||qp()&&t.metaKey,i=t.shiftKey,o=-1*this._scale,a;if(r?o*=t.deltaMode===0?.02:.32:o*=t.deltaMode===0?1:16,r){var s=n.getBoundingClientRect(),f={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*ym(t.deltaY)*o,this.zoom(a,f)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}},dt.prototype.stepZoom=function(t,n){var r=ys(Ti,gs);this._zoom(t,n,r)},dt.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Ri(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(mm(Ti,s),t)},dt.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&Rt[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},dt.prototype._init=function(e){this.toggle(e)};const wm={__init__:["zoomScroll"],zoomScroll:["type",dt]};var bm=/^djs-cursor-.*$/;function vs(e){var t=Ht(document.body);t.removeMatching(bm),e&&t.add("djs-cursor-"+e)}function Em(){vs(null)}var _m=5e3;function xm(e,t){t=t||"element.click";function n(){return!1}return e.once(t,_m,n),function(){e.off(t,n)}}var Sm=15;function ws(e,t){var n;function r(s){return a(s.originalEvent)}e.on("canvas.focus.changed",function(s){s.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(s){var f=n.start,p=n.button,h=Sa(s),m=ms(h,f);if(!n.dragging&&Am(m)>Sm&&(n.dragging=!0,p===0&&xm(e),vs("grab")),n.dragging){var _=n.last||n.start;m=ms(h,_),t.scroll({dx:m.x,dy:m.y}),n.last=h}s.preventDefault()}function o(s){Rt.unbind(document,"mousemove",i),Rt.unbind(document,"mouseup",o),n=null,Em()}function a(s){if(!ra(s.target,".djs-draggable")){var f=s.button;if(!(f>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:f,start:Sa(s)},Rt.bind(document,"mousemove",i),Rt.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}ws.$inject=["eventBus","canvas"];function Am(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const Cm={__init__:["moveCanvas"],moveCanvas:["type",ws]},km={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:[]},Rm={class:"task-track"},Tm={class:"subject-container"},Pm={class:"track-table"},Nm=_t(l.defineComponent({name:"UiFlowTaskTrack",__name:"TaskTrack",props:l.mergeModels({data:{default:()=>[]}},{isHide:{type:Boolean,default:!1},isHideModifiers:{}}),emits:["update:isHide"],setup(e){const t=l.useModel(e,"isHide"),n={currentPage:1,pageSize:20,total:0},r=[{label:"办理环节",prop:"activityName",minWidth:"200px"},{label:"办理人",prop:"assigneesNames",minWidth:"200px"},{label:"办理方式",prop:"dealTypeLabel",width:"180px"},{label:"开始时间",prop:"startTime",width:"180px",formatter:i=>i.startTime?Hn(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?Hn(i.endTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"滞留时长",prop:"duration",width:"140px",formatter:i=>typeof i.duration=="string"?i.duration.split(",").join(""):i.duration||""},{label:"处理状态",prop:"stateLabel",width:"100px"}];return(i,o)=>{const a=l.resolveComponent("el-icon");return l.openBlock(),l.createElementBlock("div",Rm,[l.createElementVNode("div",Tm,[o[1]||(o[1]=l.createElementVNode("div",{class:"subject-heading"},[l.createElementVNode("div",{class:"subject-line"}),l.createElementVNode("div",{class:"subject-title"},"办理轨迹")],-1)),l.createElementVNode("button",{class:"hide-btn",type:"button",onClick:o[0]||(o[0]=s=>t.value=!t.value)},[l.createVNode(a,null,{default:l.withCtx(()=>[t.value?(l.openBlock(),l.createBlock(l.unref(Ns),{key:0})):(l.openBlock(),l.createBlock(l.unref(Ts),{key:1}))]),_:1}),l.createElementVNode("span",null,l.toDisplayString(t.value?"显示":"隐藏"),1)])]),l.withDirectives(l.createElementVNode("div",Pm,[l.createVNode(Mo,{data:e.data,"hide-number":!1,"hide-page":!0,"hide-selection":!0,"page-config":n,"table-label":r,"table-height":"100%"},null,8,["data"])],512),[[l.vShow,!t.value]])])}}}),[["__scopeId","data-v-8c8b5c11"]]),Pi=e=>_e({url:"/flowstream/server/runtime/event/get",method:"post",data:e}),Ni=e=>_e({url:"/flowstream/server/history/trackinst/event/query",method:"post",data:e}),Om=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:e=>_e({url:"/flowstream/server/runtime/event/activate",method:"post",data:e}),flowMonitorLine:Pi,flowTrack:Ni,suspendFlow:e=>_e({url:"/flowstream/server/runtime/event/suspend",method:"post",data:e}),terminateFlow:e=>_e({url:"/flowstream/server/runtime/event/terminate",method:"post",data:e})},Symbol.toStringTag,{value:"Module"})),Dm={class:"flow-diagram"},Mm=_t(l.defineComponent({name:"UiFlowDiagram",__name:"FlowDiagram",props:{processDefinitionId:{},processInstanceId:{}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.shallowRef(),s=l.ref(),f=l.ref([]),p=l.ref(!1);let h=0;function m(){var F;o.value&&((F=a.value)==null||F.destroy(),a.value=l.markRaw(new hr({container:o.value,additionalModules:[wm,Cm],moddleExtensions:{camunda:km}})))}function _(F,R,S=!1){if(!F||!a.value)return;const w=a.value.get("canvas").getGraphics(F);if(!w)return;let E=".djs-visual rect, .djs-visual path";S&&(E+=", .djs-visual circle"),w.querySelectorAll(E).forEach(D=>{D.style.fill=R,D.style.stroke="#333"}),w.querySelectorAll(".djs-visual text").forEach(D=>{D.style.fill="#333"})}function B(){var S;if(!a.value)return;const F=a.value.get("elementRegistry"),R=new Set;(((S=s.value)==null?void 0:S.flowNodeStates)||[]).forEach(M=>{R.add(M.id),_(F.get(M.id),M.state==="executing"?"#ffd37e":"#98e5b5")}),F.filter(M=>M.type==="bpmn:StartEvent").forEach(M=>{R.add(M.id),_(M,"#98e5b5",!0)}),F.filter(M=>M.type==="bpmn:EndEvent").forEach(M=>{R.add(M.id),_(M,"#f14b12",!0)}),F.forEach(M=>{var w;!R.has(M.id)&&((w=M.type)!=null&&w.includes("Task"))&&_(M,"#eee")})}async function H(){const F=++h;try{await l.nextTick(),m();const[R,S,M]=await Promise.all([Hr({procdefId:r.processDefinitionId}),Pi({processInstanceId:r.processInstanceId,fetchFlowNodeState:!0}),Ni({processInstanceId:r.processInstanceId})]);if(F!==h||!a.value)return;s.value=S.data||{},f.value=M.data||[],await a.value.importXML(R),a.value.get("canvas").zoom("fit-viewport",!0),B(),i("loaded")}catch(R){i("error",R)}}return l.watch(()=>[r.processDefinitionId,r.processInstanceId],H),l.onMounted(H),l.onBeforeUnmount(()=>{var F;h++,(F=a.value)==null||F.destroy(),a.value=void 0}),t({refresh:H,viewer:a,trackData:f,isTrackHidden:p}),(F,R)=>(l.openBlock(),l.createElementBlock("div",Dm,[l.createElementVNode("div",{ref_key:"canvasRef",ref:o,class:"canvas"},null,512),R[1]||(R[1]=l.createStaticVNode('<div class="legend" data-v-4a2ab219><div class="legend-item undo" data-v-4a2ab219><div class="legend-circle" data-v-4a2ab219></div><span data-v-4a2ab219>未办理环节</span></div><div class="legend-item doing" data-v-4a2ab219><div class="legend-circle" data-v-4a2ab219></div><span data-v-4a2ab219>当前环节</span></div><div class="legend-item done" data-v-4a2ab219><div class="legend-circle" data-v-4a2ab219></div><span data-v-4a2ab219>已办理环节</span></div></div>',1)),l.createVNode(Nm,{"is-hide":p.value,"onUpdate:isHide":R[0]||(R[0]=S=>p.value=S),class:"bottom-container",data:f.value,style:l.normalizeStyle({height:p.value?"55px":"260px"})},null,8,["is-hide","data","style"])]))}}),[["__scopeId","data-v-4a2ab219"]]);function fn(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const Bm={...Om,...au},bs=fn(Li),Es=fn(cu),_s=fn(_u),xs=fn(Au),Ss=fn(ju),As=fn(Mm),Im={FlowButton:bs,FlowButtons:Es,FlowGrid:_s,FlowJump:xs,FlowSend:Ss,FlowDiagram:As},mr={install(e,t={}){Ro(t),Object.values(Im).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},Lm=mr,Fm=mr;he.FlowButton=bs,he.FlowButtons=Es,he.FlowDiagram=As,he.FlowGrid=_s,he.FlowJump=xs,he.FlowSend=Ss,he.FlowstreamUIPlus=mr,he.LeadalFlowVue3=Lm,he.WorkflowComponentsVue3=Fm,he.activateFlow=Ur,he.completeTask=$r,he.configureWorkflow=Ro,he.default=mr,he.doneTaskList=Br,he.downloadBpmn=Hr,he.draftFlowList=To,he.draftTaskList=Dr,he.flowApi=Bm,he.flowMonitorLine=Pi,he.flowStartNodeList=Oo,he.flowTrack=Ni,he.getOptList=Ir,he.jumpTask=Yr,he.nextSendNode=qr,he.nodeAssistant=Un,he.recycleTask=Vr,he.revocationTask=Lr,he.rollbackTask=Fr,he.saveDraft=Po,he.sendTask=Wr,he.startDraft=No,he.startNodes=Kr,he.suspendFlow=jr,he.terminateFlow=zr,he.todoTaskList=Mr,he.workflowHttp=jn,Object.defineProperties(he,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
17
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+R+'" height="'+$+'" viewBox="'+h+" "+m+" "+R+" "+$+'" version="1.1">'+s+a+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}},Ae.prototype._setDefinitions=function(e){this._definitions=e},Ae.prototype.getModules=function(){return this._modules},Ae.prototype.clear=function(){this.getDefinitions()&&Rt.prototype.clear.call(this)},Ae.prototype.destroy=function(){Rt.prototype.destroy.call(this),er(this._container)},Ae.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},Ae.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Ae.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=ht(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Ae.prototype.getDefinitions=function(){return this._definitions},Ae.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Ae.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,r,i),s=le(bf(n,["additionalModules"]),{canvas:le({},n.canvas,{container:e}),modules:a});Rt.call(this,s),n&&n.container&&this.attachTo(n.container)},Ae.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Ae.prototype._createContainer=function(e){const t=at('<div class="bjs-container"></div>');return ze(t,{width:Ps(e.width),height:Ps(e.height),position:e.position}),t},Ae.prototype._createModdle=function(e){const t=le({},this._moddleExtensions,e.moddleExtensions);return new _m(t)},Ae.prototype._modules=[];function vr(e,t){return e.warnings=t,e}function Bm(e){const n=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}const Mm={width:"100%",height:"100%",position:"relative"};function Ps(e){return e+(Et(e)?"px":"")}function Lm(e,t){return t&&Qe(e.diagrams,function(n){return n.id===t})||null}function Fm(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Rs+"</a>",r=at(n);ze(ht("svg",r),Ts),ze(r,Ns,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),At.bind(r,"click",function(i){Om(),i.preventDefault()})}function wr(e){Ae.call(this,e)}nt(wr,Ae),wr.prototype._modules=[Xd,mp,Ba,_p,Na],wr.prototype._moddleExtensions={};function Is(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vi(e){return Math.log(e)/Math.log(10)}function Os(e,t){var n=Vi(e.min),r=Vi(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function $m(e,t){return Math.max(e.min,Math.min(e.max,t))}var Vm=Math.sign||function(e){return e>=0?1:-1},ji={min:.2,max:4},Bs=10,jm=.1,Um=.75;function ct(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=_t(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||Um;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}ct.$inject=["config.zoomScroll","eventBus","canvas"],ct.prototype.scroll=function(t){this._canvas.scroll(t)},ct.prototype.reset=function(){this._canvas.zoom("fit-viewport")},ct.prototype.zoom=function(t,n){var r=Os(ji,Bs*2);this._totalDelta+=t,Math.abs(this._totalDelta)>jm&&(this._zoom(t,n,r),this._totalDelta=0)},ct.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||yp()&&t.metaKey,i=t.shiftKey,o=-1*this._scale,a;if(r?o*=t.deltaMode===0?.02:.32:o*=t.deltaMode===0?1:16,r){var s=n.getBoundingClientRect(),f={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*Vm(t.deltaY)*o,this.zoom(a,f)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}},ct.prototype.stepZoom=function(t,n){var r=Os(ji,Bs);this._zoom(t,n,r)},ct.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Vi(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom($m(ji,s),t)},ct.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&At[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},ct.prototype._init=function(e){this.toggle(e)};const zm={__init__:["zoomScroll"],zoomScroll:["type",ct]};var Hm=/^djs-cursor-.*$/;function Ms(e){var t=jt(document.body);t.removeMatching(Hm),e&&t.add("djs-cursor-"+e)}function Wm(){Ms(null)}var qm=5e3;function Ym(e,t){t=t||"element.click";function n(){return!1}return e.once(t,qm,n),function(){e.off(t,n)}}var Km=15;function Ls(e,t){var n;function r(s){return a(s.originalEvent)}e.on("canvas.focus.changed",function(s){s.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(s){var f=n.start,d=n.button,h=Ua(s),m=Is(h,f);if(!n.dragging&&Gm(m)>Km&&(n.dragging=!0,d===0&&Ym(e),Ms("grab")),n.dragging){var R=n.last||n.start;m=Is(h,R),t.scroll({dx:m.x,dy:m.y}),n.last=h}s.preventDefault()}function o(s){At.unbind(document,"mousemove",i),At.unbind(document,"mouseup",o),n=null,Wm()}function a(s){if(!Ea(s.target,".djs-draggable")){var f=s.button;if(!(f>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:f,start:Ua(s)},At.bind(document,"mousemove",i),At.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}Ls.$inject=["eventBus","canvas"];function Gm(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const Xm={__init__:["moveCanvas"],moveCanvas:["type",Ls]},Jm={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:[]},Zm={class:"task-track"},Qm={class:"subject-container"},ey={class:"track-table"},ty=wt(l.defineComponent({name:"UiFlowTaskTrack",__name:"TaskTrack",props:l.mergeModels({data:{default:()=>[]}},{isHide:{type:Boolean,default:!1},isHideModifiers:{}}),emits:["update:isHide"],setup(e){const t=l.useModel(e,"isHide"),n={currentPage:1,pageSize:20,total:0},r=[{label:"办理环节",prop:"activityName",minWidth:"200px"},{label:"办理人",prop:"assigneesNames",minWidth:"200px"},{label:"办理方式",prop:"dealTypeLabel",width:"180px"},{label:"开始时间",prop:"startTime",width:"180px",formatter:i=>i.startTime?Gn(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?Gn(i.endTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"滞留时长",prop:"duration",width:"140px",formatter:i=>typeof i.duration=="string"?i.duration.split(",").join(""):i.duration||""},{label:"处理状态",prop:"stateLabel",width:"100px"}];return(i,o)=>{const a=l.resolveComponent("el-icon");return l.openBlock(),l.createElementBlock("div",Zm,[l.createElementVNode("div",Qm,[o[1]||(o[1]=l.createElementVNode("div",{class:"subject-heading"},[l.createElementVNode("div",{class:"subject-line"}),l.createElementVNode("div",{class:"subject-title"},"办理轨迹")],-1)),l.createElementVNode("button",{class:"hide-btn",type:"button",onClick:o[0]||(o[0]=s=>t.value=!t.value)},[l.createVNode(a,null,{default:l.withCtx(()=>[t.value?(l.openBlock(),l.createBlock(l.unref(tl),{key:0})):(l.openBlock(),l.createBlock(l.unref(Qs),{key:1}))]),_:1}),l.createElementVNode("span",null,l.toDisplayString(t.value?"显示":"隐藏"),1)])]),l.withDirectives(l.createElementVNode("div",ey,[l.createVNode(Zo,{data:e.data,"hide-number":!1,"hide-page":!0,"hide-selection":!0,"page-config":n,"table-label":r,"table-height":"100%"},null,8,["data"])],512),[[l.vShow,!t.value]])])}}}),[["__scopeId","data-v-8c8b5c11"]]),Ui=e=>ye({url:"/server/runtime/event/get",method:"post",data:e}),zi=e=>ye({url:"/server/history/trackinst/event/query",method:"post",data:e}),ny=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:e=>ye({url:"/server/runtime/event/activate",method:"post",data:e}),flowMonitorLine:Ui,flowTrack:zi,suspendFlow:e=>ye({url:"/server/runtime/event/suspend",method:"post",data:e}),terminateFlow:e=>ye({url:"/server/runtime/event/terminate",method:"post",data:e})},Symbol.toStringTag,{value:"Module"})),ry={class:"flow-diagram"},iy=wt(l.defineComponent({name:"UiFlowDiagram",__name:"FlowDiagram",props:{processDefinitionId:{},processInstanceId:{}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.shallowRef(),s=l.ref(),f=l.ref([]),d=l.ref(!1);let h=0;function m(){var y;o.value&&((y=a.value)==null||y.destroy(),a.value=l.markRaw(new wr({container:o.value,additionalModules:[zm,Xm],moddleExtensions:{camunda:Jm}})))}function R(y,v,S=!1){if(!y||!a.value)return;const E=a.value.get("canvas").getGraphics(y);if(!E)return;let x=".djs-visual rect, .djs-visual path";S&&(x+=", .djs-visual circle"),E.querySelectorAll(x).forEach(z=>{z.style.fill=v,z.style.stroke="#333"}),E.querySelectorAll(".djs-visual text").forEach(z=>{z.style.fill="#333"})}function $(y,v,S){var J;const T=y.style.getPropertyValue(v)||y.getAttribute(v),E=(J=T==null?void 0:T.match(/#([^)'"\s]+)/))==null?void 0:J[1],x=y.ownerSVGElement;if(!E||!x)return;const z=Array.from(x.querySelectorAll("marker")).find(G=>G.id===E);if(!(z!=null&&z.parentElement))return;const M=S.replace(/[^a-zA-Z0-9]/g,""),_=`${E}-flowstream-${M}`;let q=Array.from(x.querySelectorAll("marker")).find(G=>G.id===_);q||(q=z.cloneNode(!0),q.id=_,q.querySelectorAll("path, polygon, polyline").forEach(G=>{G.style.fill=S,G.style.stroke=S}),z.parentElement.appendChild(q));const ae=`url(#${_})`;y.style.setProperty(v,ae),y.setAttribute(v,ae)}function Y(y,v){if(!y||!a.value)return;const T=a.value.get("canvas").getGraphics(y);T&&T.querySelectorAll(".djs-visual > path").forEach(E=>{E.style.fill="none",E.style.stroke=v,$(E,"marker-start",v),$(E,"marker-end",v)})}function W(y){const v=y.filter(x=>x.type==="bpmn:StartEvent");if(v.length!==1)return[];const S=[],T=new Set;let E=v[0];for(;E&&!T.has(E.id);){T.add(E.id);const x=(E.outgoing||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!x.length)return S;if(x.length!==1)return[];const z=x[0],M=z.target,_=((M==null?void 0:M.incoming)||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!M||_.length!==1)return[];S.push(z),E=M}return[]}function P(y){var T;const v=((T=s.value)==null?void 0:T.sequenceFlowStates)||[];if(!v.length)return;const S=v.map(E=>y.get(E.sequenceFlowId||E.id)).filter(E=>(E==null?void 0:E.type)==="bpmn:SequenceFlow");if(S.length){S.forEach(E=>Y(E,"#98e5b5"));return}W(y).slice(0,v.length).forEach(E=>Y(E,"#98e5b5"))}function C(){var S;if(!a.value)return;const y=a.value.get("elementRegistry"),v=new Set;(((S=s.value)==null?void 0:S.flowNodeStates)||[]).forEach(T=>{v.add(T.id),R(y.get(T.id),T.state==="executing"?"#ffd37e":"#98e5b5")}),y.filter(T=>T.type==="bpmn:StartEvent").forEach(T=>{v.add(T.id),R(T,"#98e5b5",!0)}),y.filter(T=>T.type==="bpmn:EndEvent").forEach(T=>{v.add(T.id),R(T,"#f14b12",!0)}),y.forEach(T=>{var E;!v.has(T.id)&&((E=T.type)!=null&&E.includes("Task"))&&R(T,"#eee")}),P(y)}async function O(){const y=++h;try{await l.nextTick(),m();const[v,S,T]=await Promise.all([ei({procdefId:r.processDefinitionId}),Ui({processInstanceId:r.processInstanceId,fetchFlowNodeState:!0,fetchSequenceFlowState:!0}),zi({processInstanceId:r.processInstanceId})]);if(y!==h||!a.value)return;s.value=S.data||{},f.value=T.data||[],await a.value.importXML(v),a.value.get("canvas").zoom("fit-viewport",!0),C(),i("loaded")}catch(v){i("error",v)}}return l.watch(()=>[r.processDefinitionId,r.processInstanceId],O),l.onMounted(O),l.onBeforeUnmount(()=>{var y;h++,(y=a.value)==null||y.destroy(),a.value=void 0}),t({refresh:O,viewer:a,trackData:f,isTrackHidden:d}),(y,v)=>(l.openBlock(),l.createElementBlock("div",ry,[l.createElementVNode("div",{ref_key:"canvasRef",ref:o,class:"canvas"},null,512),v[1]||(v[1]=l.createStaticVNode('<div class="legend" data-v-c4f4a933><div class="legend-item undo" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>未办理环节</span></div><div class="legend-item doing" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>当前环节</span></div><div class="legend-item done" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>已办理环节</span></div></div>',1)),l.createVNode(ty,{"is-hide":d.value,"onUpdate:isHide":v[0]||(v[0]=S=>d.value=S),class:"bottom-container",data:f.value,style:l.normalizeStyle({height:d.value?"55px":"360px"})},null,8,["is-hide","data","style"])]))}}),[["__scopeId","data-v-c4f4a933"]]),Fs=l.defineComponent({name:"UiFlowStart",__name:"FlowStart",props:{dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},defaultOpinion:{default:""},bpmnXml:{default:""},singleAssignee:{type:Boolean,default:!0},beforeSend:{}},emits:["started","afterSend","close","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref(!1),s=l.ref(!1),f=l.ref(!1),d=l.ref(),h=l.ref();async function m(O){if(s.value)throw new Error("流程正在启动,请勿重复提交");s.value=!0;let y;try{const S=(await Wn({processDefinitionId:O.processDefinitionId})).data||[];if(S.length!==1)throw new Error(S.length?`流程存在 ${S.length} 个首办节点,无法自动启动`:"流程未找到首办节点,无法启动");if(y=(await jr(O)).data,!(y!=null&&y.processInstanceId)||!y.processDefinitionId||!y.workId)throw new Error("流程引擎未返回流程实例 ID、流程定义 ID 或起草人待办 ID");const E=S[0];if(a.value=!1,d.value={startArgs:O,startResult:y,activity:{activityId:E.id,activityName:E.name||E.activityName},variables:O.variables||{},dealUser:{id:O.draftUserId,userId:O.draftUserId,name:O.draftUserName}},f.value=!1,h.value=void 0,await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪")}catch(v){throw s.value=!1,i("error",{phase:"start",error:v}),v}try{return i("started",y),await R(),y}finally{s.value=!1}}async function R(){if(!d.value)throw new Error("没有可继续发送的流程上下文");try{if(r.beforeSend&&await r.beforeSend(d.value)===!1)return a.value=!1,!1;if(await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪");return await o.value.open(),!0}catch(O){throw i("error",{phase:"beforeSend",error:O}),O}}function $(){var y,v;if(a.value){(y=o.value)==null||y.close();return}const O=(v=d.value)==null?void 0:v.startResult;O&&(!f.value&&O.processInstanceId&&zn({processInstanceId:O.processInstanceId}).catch(S=>i("error",{phase:"send",error:S})),d.value=void 0,i("close",O))}function Y(O){h.value=O}function W(O){!d.value||!h.value||(f.value=!0,i("afterSend",{startResult:d.value.startResult,sendData:h.value,sendResult:O}))}function P(O){i("error",{phase:"send",error:O})}function C(){var y;const O=(y=d.value)==null?void 0:y.startResult;i("close",O),f.value&&(d.value=void 0,f.value=!1)}return t({start:m,open:R,close:$,starting:s,sendVisible:a,context:d,sendRef:o}),(O,y)=>d.value?(l.openBlock(),l.createBlock(ai,{key:0,ref_key:"sendRef",ref:o,modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=v=>a.value=v),"process-definition-id":d.value.startResult.processDefinitionId,"process-instance-id":d.value.startResult.processInstanceId,activity:d.value.activity,"work-id":d.value.startResult.workId,variables:d.value.variables,"deal-user":d.value.dealUser,"bpmn-xml":e.bpmnXml,"force-single-assignee":e.singleAssignee,"delete-instance-on-cancel":"","show-trigger":!1,"dialog-title":e.dialogTitle,"dialog-width":e.dialogWidth,"default-opinion":e.defaultOpinion,onBeforeSend:Y,onAfterSend:W,onClose:C,onError:P},null,8,["modelValue","process-definition-id","process-instance-id","activity","work-id","variables","deal-user","bpmn-xml","force-single-assignee","dialog-title","dialog-width","default-opinion"])):l.createCommentVNode("",!0)}});let Hi,ut,Wi=!1;function oy(e){Hi=e}function ay(e){return e instanceof Error?e.message:typeof e=="string"?e:"流程操作失败"}function $s(e){return{...e,message:ay(e.error)}}async function sy(e,t){return e?await e(t)!==!1:!0}function Rn(e,t){if(e)try{Promise.resolve(e(t)).catch(n=>{console.error("[FlowStream] runtimeService 回调执行失败",n)})}catch(n){console.error("[FlowStream] runtimeService 回调执行失败",n)}}function Vs(e){e.disposed||(e.disposed=!0,l.render(null,e.container),e.container.remove(),ut===e&&(ut=void 0))}function ly(e){var t;return(t=e.component)==null?void 0:t.exposed}function js(){if(!(ut!=null&&ut.exposed)||ut.disposed)throw new Error("当前没有已启动且可继续发送的流程");return ut}const qi={start:(async e=>{if(typeof document>"u")throw new Error("flowstream.runtimeService.start() 只能在浏览器环境中调用");if(!Hi)throw new Error("调用 runtimeService.start() 前必须先执行 app.use(flowstream)");if(Wi||ut&&!ut.disposed)throw new Error("当前已有已启动但尚未发送完成的流程,请调用 runtimeService.open() 继续办理");const{dialogTitle:t="发送",dialogWidth:n="1200px",defaultOpinion:r="",bpmnXml:i="",singleAssignee:o=!0,onBeforeStart:a,onBeforeSend:s,onStarted:f,onAfterSend:d,onClose:h,onError:m,...R}=e;Wi=!0;try{if(!await sy(a,R))return!1}catch(P){throw m&&Rn(m,$s({phase:"beforeStart",error:P})),P}finally{Wi=!1}const $=document.createElement("div");$.className="ui-flow-runtime-service-host",document.body.appendChild($);const Y={container:$,vnode:void 0,sendCompleted:!1,disposed:!1},W=l.createVNode(Fs,{dialogTitle:t,dialogWidth:n,defaultOpinion:r,bpmnXml:i,singleAssignee:o,beforeSend:s,onStarted:P=>{Y.startResult=P,Rn(f,P)},onAfterSend:P=>{Y.sendCompleted=!0,Rn(d,P)},onClose:P=>{h&&Rn(h,P),l.nextTick(()=>Vs(Y))},onError:P=>{m&&Rn(m,$s(P))}});W.appContext=Hi,Y.vnode=W,ut=Y;try{if(l.render(W,$),await l.nextTick(),Y.exposed=ly(W),!Y.exposed)throw new Error("流程启动服务挂载失败");return await Y.exposed.start(R)}catch(P){throw Y.startResult||Vs(Y),P}}),async open(){return js().exposed.open()},close(){js().exposed.close()},async getApps(e){return(await Fr(e)).data||[]},async getFlows(e){return(await $r(e)).data||[]}};function Yt(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const cy={...ny,...Tu},Us=Yt(Ji),zs=Yt(Zu),Hs=Yt(df),Ws=Yt(Xo),qs=Yt(ai),Ys=Yt(iy),Ks=Yt(Fs),uy={FlowButton:Us,FlowButtons:zs,FlowGrid:Hs,FlowJump:Ws,FlowSend:qs,FlowDiagram:Ys,FlowStart:Ks},br={runtimeService:qi,getRuntimeService(){return qi},install(e,t={}){Uo(t),oy(e._context),e.use(ge),Object.values(uy).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},fy=br,dy=br;ue.FlowButton=Us,ue.FlowButtons=zs,ue.FlowDiagram=Ys,ue.FlowGrid=Hs,ue.FlowJump=Ws,ue.FlowSend=qs,ue.FlowStart=Ks,ue.FlowstreamUIPlus=br,ue.LeadalFlowVue3=fy,ue.WorkflowComponentsVue3=dy,ue.activateFlow=Zr,ue.claimTask=Hr,ue.completeTask=Kr,ue.configureWorkflow=Uo,ue.default=br,ue.deleteDraftTask=Ho,ue.deleteProcessInstance=zn,ue.doneTaskList=Ur,ue.downloadBpmn=ei,ue.draftFlowList=zo,ue.draftTaskList=Vr,ue.flowApi=cy,ue.flowMonitorLine=Ui,ue.flowStartNodeList=Ko,ue.flowTrack=zi,ue.getAppList=Fr,ue.getFirstHandleNodes=Wn,ue.getFlowList=$r,ue.getOptList=zr,ue.jumpTask=ii,ue.nextSendNode=ri,ue.nodeAssistant=qn,ue.organUserTree=ni,ue.quickStart=jr,ue.receiveMessageEvent=Yo,ue.recycleTask=Yr,ue.revocationTask=Wr,ue.rollbackTask=qr,ue.runtimeService=qi,ue.saveDraft=Wo,ue.sendTask=ti,ue.startDraft=qo,ue.startNodes=oi,ue.suspendFlow=Jr,ue.terminateFlow=Qr,ue.todoTaskList=Hn,ue.turnAfterTask=Xr,ue.turnBeforeTask=Gr,ue.workflowHttp=Un,Object.defineProperties(ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|