10 lines
196 KiB
JavaScript
Raw Normal View History

2025-05-29 15:03:59 +08:00
import{g as Xr}from"./index-CrAWI0wi.js";function Ve(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function Rc(e){return Array.prototype.concat.apply([],e)}const Lt=Object.prototype.toString,xa=Object.prototype.hasOwnProperty;function Nt(e){return e===void 0}function ut(e){return e!==void 0}function Zr(e){return e==null}function Re(e){return Lt.call(e)==="[object Array]"}function Ze(e){return Lt.call(e)==="[object Object]"}function Se(e){return Lt.call(e)==="[object Number]"}function ze(e){const t=Lt.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function $e(e){return Lt.call(e)==="[object String]"}function _a(e){if(!Re(e))throw new Error("must supply array")}function Wn(e,t){return!Zr(e)&&xa.call(e,t)}function Ne(e,t){const n=mn(t);let r;return L(e,function(i,a){if(n(i,a))return r=i,!1}),r}function ba(e,t){const n=mn(t);let r=Re(e)?-1:void 0;return L(e,function(i,a){if(n(i,a))return r=a,!1}),r}function lt(e,t){const n=mn(t);let r=[];return L(e,function(i,a){n(i,a)&&r.push(i)}),r}function L(e,t){let n,r;if(Nt(e))return;const i=Re(e)?Pa:Ca;for(let a in e)if(Wn(e,a)&&(n=e[a],r=t(n,i(a)),r===!1))return n}function Cc(e,t){if(Nt(e))return[];_a(e);const n=mn(t);return e.filter(function(r,i){return!n(r,i)})}function wt(e,t,n){return L(e,function(r,i){n=t(n,r,i)}),n}function hn(e,t){return!!wt(e,function(n,r,i){return n&&t(r,i)},!0)}function Qr(e,t){return!!Ne(e,t)}function dn(e,t){let n=[];return L(e,function(r,i){n.push(t(r,i))}),n}function Sa(e){return e&&Object.keys(e)||[]}function Pc(e){return Sa(e).length}function Mc(e){return dn(e,t=>t)}function Jr(e,t,n={}){return t=zn(t),L(e,function(r){let i=t(r)||"_",a=n[i];a||(a=n[i]=[]),a.push(r)}),n}function Aa(e,...t){e=zn(e);let n={};return L(t,i=>Jr(i,e,n)),dn(n,function(i,a){return i[0]})}const Tc=Aa;function Ra(e,t){t=zn(t);let n=[];return L(e,function(r,i){let a=t(r,i),o={d:a,v:r};for(var u=0;u<n.length;u++){let{d:c}=n[u];if(a<c){n.splice(u,0,o);return}}n.push(o)}),dn(n,r=>r.v)}function wr(e){return function(t){return hn(e,function(n,r){return t[r]===n})}}function zn(e){return ze(e)?e:t=>t[e]}function mn(e){return ze(e)?e:t=>t===e}function Ca(e){return e}function Pa(e){return Number(e)}function Ma(e,t){let n,r,i,a;function o(_){let $=Date.now(),J=_?0:a+t-$;if(J>0)return u(J);e.apply(i,r),c()}function u(_){n=setTimeout(o,_)}function c(){n&&clearTimeout(n),n=a=r=i=void 0}function y(){n&&o(!0),c()}function v(..._){a=Date.now(),r=_,i=this,n||u(t)}return v.flush=y,v.cancel=c,v}function Ue(e,t){return e.bind(t)}function U(e,...t){return Object.assign(e,...t)}function Ta(e,t,n){let r=e;return L(t,function(i,a){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 o=t[a+1],u=r[i];ut(o)&&Zr(u)&&(u=r[i]=isNaN(+o)?{}:[]),Nt(o)?Nt(n)?delete r[i]:r[i]=n:r=u}),e}function Da(e,t){let n={},r=Object(e);return L(t,function(i){i in r&&(n[i]=e[i])}),n}function Oa(e,t){let n={},r=Object(e);return L(r,function(i,a){t.indexOf(a)===-1&&(n[a]=i)}),n}var Na=1e3;function Ye(e,t){var n=this;t=t||Na,e.on(["render.shape","render.connection"],t,function(r,i){var a=r.type,o=i.element,u=i.gfx,c=i.attrs;if(n.canRender(o))return a==="render.shape"?n.drawShape(u,o,c):n.drawConnection(u,o,c)}),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)})}Ye.prototype.canRender=function(e){};Ye.prototype.drawShape=function(e,t){};Ye.prototype.drawConnection=function(e,t){};Ye.prototype.getShapePath=function(e){};Ye.prototype.getConnectionPath=function(e){};function Y(e,t){var n=Qe(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function ka(e,t){return Qr(t,function(n){return Y(e,n)})}functio
line: `+g+`
column: `+P+`
nested error: `+M.message;if(D)return o.addWarning({message:F,error:M}),!0;throw nt(F)}function v(M,N){return y(M,N,!0)}function _(){var M=o.elementsById,N=o.references,D,A;for(D=0;A=N[D];D++){var g=A.element,P=M[A.id],j=He(g).propertiesByName[A.property];if(P||o.addWarning({message:"unresolved reference <"+A.id+">",element:A.element,property:A.property,value:A.id}),j.isMany){var F=g.get(j.name),I=F.indexOf(A);I===-1&&(I=F.length),P?F[I]=P:F.splice(I,1)}else g.set(j.name,P)}}function $(){c.pop().handleEnd()}var J=/^<\?xml /i,ie=/ encoding="([^"]+)"/i,te=/^utf-8$/i;function Z(M){if(J.test(M)){var N=ie.exec(M),D=N&&N[1];!D||te.test(D)||o.addWarning({message:"unsupported document encoding <"+D+">, falling back to UTF-8"})}}function ae(M,N){var D=c.peek();try{c.push(D.handleNode(M))}catch(A){y(A,N,a)&&c.push(new rr)}}function E(M,N){try{c.peek().handleText(M)}catch(D){v(D,N)}}function V(M,N){M.trim()&&E(M,N)}var S=i.getPackages().reduce(function(M,N){return M[N.uri]=N.prefix,M},{"http://www.w3.org/XML/1998/namespace":"xml"});return u.ns(S).on("openTag",function(M,N,D,A){var g=M.attrs||{},P=Object.keys(g).reduce(function(F,I){var se=N(g[I]);return F[I]=se,F},{}),j={name:M.name,originalName:M.originalName,attributes:P,ns:M.ns};ae(j,A)}).on("question",Z).on("closeTag",$).on("cdata",E).on("text",function(M,N,D){V(N(M),D)}).on("error",y).on("warn",v),new Promise(function(M,N){var D;try{u.parse(e),_()}catch(F){D=F}var A=r.element;!D&&!A&&(D=nt("failed to parse document as <"+r.type.$descriptor.name+">"));var g=o.warnings,P=o.references,j=o.elementsById;return D?(D.warnings=g,N(D)):M({rootElement:A,elementsById:j,references:P,warnings:g})})};or.prototype.handler=function(e){return new ar(this.model,e)};function Wu(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var zu=`<?xml version="1.0" encoding="UTF-8"?>
`,Hu=/<|>|'|"|&|\n\r|\n/g,Ji=/<|>|&/g;function Uu(e){var t={},n={},r={},i=[],a=[];this.byUri=function(o){return n[o]||e&&e.byUri(o)},this.add=function(o,u){n[o.uri]=o,u?i.push(o):a.push(o),this.mapPrefix(o.prefix,o.uri)},this.uriByPrefix=function(o){return t[o||"xmlns"]},this.mapPrefix=function(o,u){t[o||"xmlns"]=u},this.getNSKey=function(o){return o.prefix!==void 0?o.uri+"|"+o.prefix:o.uri},this.logUsed=function(o){var u=o.uri,c=this.getNSKey(o);r[c]=this.byUri(u),e&&e.logUsed(o)},this.getUsed=function(o){function u(v){var _=c.getNSKey(v);return r[_]}var c=this,y=[].concat(i,a);return y.filter(u)}}function Ku(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Yu(e,t){return Gi(t)?Ku(e):e}function ea(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function ta(e){return $e(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function qu(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 Gu(e,t){return t.isGeneric?U({localName:t.ns.localName},e):U({localName:Yu(t.ns.localName,t.$pkg)},e)}function Xu(e,t){return U({localName:t.ns.localName},e)}function Zu(e){var t=e.$descriptor;return lt(t.properties,function(n){var r=n.name;if(n.isVirtual||!Wn(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var Qu={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ju={"<":"lt",">":"gt","&":"amp"};function na(e,t,n){return e=$e(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function el(e){return na(e,Hu,Qu)}function tl(e){return na(e,Ji,Ju)}function nl(e){return lt(e,function(t){return t.isAttr})}function rl(e){return lt(e,function(t){return!t.isAttr})}function sr(e){this.tagName=e}sr.prototype.build=function(e){return this.element=e,this};sr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function ft(){}ft.prototype.serializeValue=ft.prototype.serializeTo=function(e){e.append(this.escape?tl(this.value):this.value)};ft.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(Ji)!==-1&&(this.escape=!0),this};function ur(e){this.tagName=e}ea(ur,ft);ur.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function de(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}de.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,a=t.isGeneric;return a?r=this.parseGeneric(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),a||(i=Zu(e),this.parseAttributes(nl(i)),this.parseContainments(rl(i))),this.parseGenericAttributes(e,r),this};de.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Gu(t,e)};de.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Xu(t,e)};de.prototype.isLocalNs=function(e){return e.uri===this.ns.uri};de.prototype.nsAttributeName=function(e){var t;if($e(e)?t=xe(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}:U({localName:t.localName},n)};de.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return L(e,function(i,a){var o;a==="$body"?n.push(new ft().build({type:"String"},i)):a==="$children"?L(i,function(u){n.push(new de(t).build(u))}):a.indexOf("$")!==0&&(o=t.parseNsAttribute(e,a,i),o&&r.push({name:a,value:i}))}),r};de.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=xe(t),a;if(i.prefix==="xmlns"&&(a={prefix:i.localName,uri:n}),!i.prefix&&i.localName==="xmlns"&&(a={uri:n}),!a)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(a,!0,!0);else{var o=this.logNamespaceUsed(a,!0);this.getNamespaces().logUsed(o)}};de.prototype.parseNsAttributes=function(e,t){var n
`),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function ol(e){e=U({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new il,a=new al(i,e.format);if(e.preamble&&a.append(zu),new de().build(n).serializeTo(a),!r)return i.value}return{toXML:t}}function Sn(e,t){ke.call(this,e,t)}Sn.prototype=Object.create(ke.prototype);Sn.prototype.fromXML=function(e,t,n){$e(t)||(n=t,t="bpmn:Definitions");var r=new or(U({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)};Sn.prototype.toXML=function(e,t){var n=new ol(t);return new Promise(function(r,i){try{var a=n.toXML(e);return r({xml:a})}catch(o){return i(o)}})};var sl="BPMN20",ul="http://www.omg.org/spec/BPMN/20100524/MODEL",ll="bpmn",cl=[],fl=[{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:"defau
<!-- created with bpmn-js / http://bpmn.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+y.width+'" height="'+y.height+'" viewBox="'+y.x+" "+y.y+" "+y.width+" "+y.height+'" version="1.1">'+c+u+"</svg>"}catch(i){r=i}if(this._emit("saveSVG.done",{error:r,svg:n}),r)throw r;return{svg:n}});me.prototype._setDefinitions=function(e){this._definitions=e};me.prototype.getModules=function(e){return this._modules};me.prototype.clear=function(){this.getDefinitions()&&Rt.prototype.clear.call(this)};me.prototype.destroy=function(){Rt.prototype.destroy.call(this),cn(this._container)};me.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)};me.prototype.off=function(e,t){this.get("eventBus").off(e,t)};me.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=Le(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()};me.prototype.getDefinitions=function(){return this._definitions};me.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))};me.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],a=[{bpmnjs:["value",this],moddle:["value",t]}],o=[].concat(a,r,i),u=U(Oa(n,["additionalModules"]),{canvas:U({},n.canvas,{container:e}),modules:o});Rt.call(this,u),n&&n.container&&this.attachTo(n.container)};me.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)};me.prototype._createContainer=function(e){const t=je('<div class="bjs-container"></div>');return Ae(t,{width:qr(e.width),height:qr(e.height),position:e.position}),t};me.prototype._createModdle=function(e){const t=U({},this._moddleExtensions,e.moddleExtensions);return new Xl(t)};me.prototype._modules=[];function on(e,t){return e.warnings=t,e}function fc(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 pc={width:"100%",height:"100%",position:"relative"};function qr(e){return e+(Se(e)?"px":"")}function hc(e,t){return t&&Ne(e.diagrams,function(n){return n.id===t})||null}function dc(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+ia+"</a>",r=je(n);Ae(Le("svg",r),aa),Ae(r,oa,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Xe.bind(r,"click",function(i){cc(),i.preventDefault()})}function lr(e){me.call(this,e)}Ve(lr,me);lr.prototype._modules=[Es,pi,Ds,bi,Xs];lr.prototype._moddleExtensions={};function nf(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Gr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vn(e){return Math.log(e)/Math.log(10)}function sa(e,t){var n=Vn(e.min),r=Vn(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function mc(e,t){return Math.max(e.min,Math.min(e.max,t))}var yc=Math.sign||function(e){return e>=0?1:-1},cr={min:.2,max:4},ua=10,vc=.1,gc=.75;function We(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Ue(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||gc;var r=this;t.on("canvas.init",function(i){r._init(e.enabled!==!1)})}We.$inject=["config.zoomScroll","eventBus","canvas"];We.prototype.scroll=function(t){this._canvas.scroll(t)};We.prototype.reset=function(){this._canvas.zoom("fit-viewport")};We.prototype.zoom=function(t,n){var r=sa(cr,ua*2);this._totalDelta+=t,Math.abs(this._totalDelta)>vc&&(this._zoom(t,n,r),this._totalDelta=0)};We.prototype._handleWheel=function(t){if(!Yn(t.target,".djs-scrollable",!0)){var n=this._container;t.preventDefault();var r=t.ctrlKey,i=t.shiftKey,a=-1*this._scale,o;if(r?a*=t.deltaMode===0?.02:.32:a*=t.deltaMode===0?1:16,r){var u=n.getBoundingClientRect(),c={x:t.clientX-u.left,y:t.clientY-u.top};o=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*yc(t.deltaY)*a,this.zoom(o,c)}else i?o={dx:a*t.deltaY,dy:0}:o={dx:a*t.deltaX,dy:a*t.deltaY},this.scroll(o)}};We.prototype.stepZoom=f