@scvzerng/snakerflow-designer-vue2 3.0.54 → 3.0.55
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.
|
@@ -30524,27 +30524,28 @@ class vB extends c6 {
|
|
|
30524
30524
|
constructor(e) {
|
|
30525
30525
|
super(e), pc(this, "app"), pc(this, "isMounted"), pc(this, "r");
|
|
30526
30526
|
const { properties: t, text: r } = e.model;
|
|
30527
|
-
|
|
30527
|
+
let i;
|
|
30528
|
+
e.graphModel.wfProps.taskNodeRender && typeof e.graphModel.wfProps.taskNodeRender == "function" ? i = () => _o(e.graphModel.wfProps.taskNodeRender(e)) : i = () => _o(fB, {
|
|
30528
30529
|
on: {
|
|
30529
|
-
helpClick: (
|
|
30530
|
-
e.graphModel.eventCenter.emit("custom:helpClick",
|
|
30530
|
+
helpClick: (o) => {
|
|
30531
|
+
e.graphModel.eventCenter.emit("custom:helpClick", o);
|
|
30531
30532
|
}
|
|
30532
30533
|
}
|
|
30534
|
+
}), this.app = new mo({
|
|
30535
|
+
render: () => i()
|
|
30533
30536
|
}), Yd(() => {
|
|
30534
|
-
var
|
|
30535
|
-
this.
|
|
30537
|
+
var o;
|
|
30538
|
+
this.app.$children[0].setConfig(
|
|
30536
30539
|
{
|
|
30537
30540
|
properties: t,
|
|
30538
30541
|
text: r,
|
|
30539
30542
|
wfConfig: e.graphModel.wfProps.wfConfig,
|
|
30540
30543
|
viewer: e.graphModel.wfProps.viewer,
|
|
30541
30544
|
helpClick: e.graphModel.wfProps.helpClick,
|
|
30542
|
-
showHelp: (
|
|
30545
|
+
showHelp: (o = e.graphModel.wfProps.wfConfig) == null ? void 0 : o.showHelp,
|
|
30543
30546
|
model: e.model
|
|
30544
30547
|
}
|
|
30545
30548
|
);
|
|
30546
|
-
})), this.app = new mo({
|
|
30547
|
-
render: () => this.r
|
|
30548
30549
|
}), this.isMounted = !1;
|
|
30549
30550
|
}
|
|
30550
30551
|
shouldUpdate() {
|
|
@@ -30561,7 +30562,7 @@ class vB extends c6 {
|
|
|
30561
30562
|
if (this.isMounted)
|
|
30562
30563
|
Yd(() => {
|
|
30563
30564
|
var t;
|
|
30564
|
-
this.
|
|
30565
|
+
this.app.$children[0].setConfig({
|
|
30565
30566
|
properties: this.props.model.getProperties(),
|
|
30566
30567
|
text: this.props.model.text,
|
|
30567
30568
|
wfConfig: this.props.graphModel.wfProps.wfConfig,
|
|
@@ -102,4 +102,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
102
102
|
`,v.field.attr.forEach(g=>{e+=' <attr name="'+g.name+'" value="'+l(g.value)+`"></attr>
|
|
103
103
|
`}),e+=` </field>
|
|
104
104
|
`),e+=" </"+p+`>
|
|
105
|
-
`)}),e+="</process>",r().map(p=>{const g={name:p.id,displayName:p.properties.displayName,instanceUrl:p.properties.instanceUrl,expireTime:p.properties.expireTime,instanceNoClass:p.properties.instanceNoClass,preInterceptors:p.properties.preInterceptors,postInterceptors:p.properties.postInterceptors,nodes:n.nodes.filter(y=>p.children.includes(y.id)),edges:n.edges.filter(y=>p.children.includes(y.id))};return g.nodes.forEach(y=>{n.edges.forEach(m=>{m.sourceNodeId===y.id&&g.edges.push(m)})}),g}).forEach(h=>{e+=P0(h).replace('<?xml version="1.0" encoding="UTF-8" standalone="no"?>',"")}),e):""};var F5=Object.defineProperty,$5=(n,e,t)=>e in n?F5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,D0=(n,e,t)=>$5(n,e+"",t);class R0 extends O_.model{setAttributes(){const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}D0(R0,"extendKey","CustomModel");class L0 extends O_.view{getLabelShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o}=e,a=e.getNodeStyle();return re("svg",{x:t-i/2+5,y:r-o/2+5,width:20,height:20,viewBox:"0 0 1024 1024"},re("path",{fill:a.stroke,d:"M732.8 486l201.6-191.4c40.3-40.3 40.3-105.5 0-145.8l-50.3-50.3C844.6 59 780.8 58.2 740.3 96.6l-197 187L352 79.2l-1.6-1.6c-26.2-26.4-68.8-26.7-95.2-0.5L111.5 220.8c-25.6 25.7-26.1 67.3-1.1 93.7l188.5 201.4-178.3 169.2c-14.5 13.8-24.7 31.7-29.4 51.3L61.1 865c-8.6 36.7 14.3 73.3 50.9 81.9 11.4 2.6 23.3 2.3 34.7-0.9l123.9-36.5c15.7-4.6 30-12.9 41.9-24.1l175.6-167 211.6 226.3 1.6 1.6c26.2 26.4 68.8 26.7 95.2 0.5l143.6-143.6c25.6-25.7 26.1-67.3 1.1-93.7l-208.6-223 0.2-0.5zM309.2 796.5l-93.6-93.6c-3-2.7-6.4-4.9-10.2-6.5l465.2-441.9 98 97.7c1.6 1.3 3.2 2.4 5 3.3l-464.4 441z m476.8-652c14.4-13.6 37-13.4 51 0.7l50.3 50.3c14.3 14.4 14.2 37.6-0.2 52l-0.5 0.5-66.9 63.6c-1.1-2.3-2.5-4.5-4.2-6.5l-97-97 67.5-63.6zM277.1 395.1c8.6-0.1 16.8-3.5 23-9.6l49.9-49.9c12.9-12.9 12.9-34 0-47-12.9-12.9-34-12.9-47 0l-50 49.8c-5.5 5.7-8.8 13.2-9.3 21.1L159 269c-0.6-0.6-0.6-1-0.3-1.3l143.5-143.6s0.7 0 1.3 0.5l191.6 204.7L347 469.9l-69.9-74.8zM128 881.8c-0.9 0.2-1.8-0.2-2.1-1.1-0.1-0.3-0.1-0.6 0-0.9l30.2-128.6c1-4.1 2.9-8.1 5.3-11.7 1.6 3.9 4 7.6 7.1 10.5l91.8 91.8c-2.6 1.6-5.4 2.9-8.4 3.7l-124 36.5 0.1-0.2z m621.8 17.3s-0.7 0-1.3-0.5l-130.6-139c5.5-1.4 10.5-4.1 14.6-8l49.9-49.9c12.9-12.9 12.9-34 0-47s-34-12.9-47 0l-49.9 49.9c-3.4 3.5-6 7.7-7.6 12.4l-41.4-44.4L684.6 532 893 754.6c0.6 0.6 0.6 1 0.3 1.3L749.8 899.5v-0.4z"}))}getResizeShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,radius:a}=e,s=e.getNodeStyle();return re("g",{},[re("rect",{x:t-i/2,y:r-o/2,rx:a,ry:a,width:i,height:o,...s}),this.getLabelShape()])}}D0(L0,"extendKey","CustomNode");const H5={type:"snaker:custom",view:L0,model:R0};var z5=Object.defineProperty,G5=(n,e,t)=>e in n?z5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,I0=(n,e,t)=>G5(n,e+"",t);class k0 extends zi{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]]}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}I0(k0,"extendKey","DecisionModel");class B0 extends Ui{getShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,points:a}=e,s=e.getNodeStyle();return re("g",{transform:`matrix(1 0 0 1 ${t-i/2} ${r-o/2})`},re("polygon",{...s,x:t,y:r,points:a}),re("path",{d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z",...s}))}}I0(B0,"extendKey","DecisionNode");const W5={type:"snaker:decision",view:B0,model:k0};var U5=Object.defineProperty,X5=(n,e,t)=>e in n?U5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,j0=(n,e,t)=>X5(n,e+"",t);class F0 extends ko{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]],this.r=18}getConnectedSourceRules(){const e=super.getConnectedSourceRules(),t={message:"结束节点不能作为边的起点",validate:()=>!1};return e.push(t),e}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}j0(F0,"extendKey","EndModel");class $0 extends $o{getAnchorStyle(){return{visibility:"hidden"}}getShape(){const{model:e}=this.props,t=e.getNodeStyle(),{x:r,y:i,width:o,height:a}=e,s=super.getShape();return re("g",{},s,re("svg",{x:r-o/2+10,y:i-a/2+10,width:16,height:16,viewBox:"0 0 1024 1024"},re("path",{fill:t.stroke,d:"M835.5 815.5v-607c0-11-9-20-20-20h-607c-11 0-20 9-20 20v607c0 11 9 20 20 20h607c11 0 20-9 20-20z"})))}}j0($0,"extendKey","EndView");const Y5={type:"snaker:end",view:$0,model:F0};var K5=Object.defineProperty,V5=(n,e,t)=>e in n?K5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,H0=(n,e,t)=>V5(n,e+"",t);class z0 extends zi{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]]}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}H0(z0,"extendKey","ForkModel");class G0 extends Ui{getShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,points:a}=e,s=e.getNodeStyle();return re("g",{transform:`matrix(1 0 0 1 ${t-i/2} ${r-o/2})`},re("polygon",{...s,x:t,y:r,points:a}),re("svg",{x:(i-34)/2,y:(o-32)/2,width:32,height:32,viewBox:"0 0 1024 1024"},re("path",{fill:s.stroke,d:"M768 470.058667c-11.52 0-22.613333-4.693333-30.293333-12.373334a42.496 42.496 0 0 1-0.426667-60.458666V396.8l55.296-54.954667H576.426667l-119.466667 170.24 119.893333 170.922667h216.149334l-55.68-55.381333a42.112 42.112 0 0 1 0-60.501334c16.64-17.066667 43.52-17.066667 60.586666 0l128 127.786667a42.752 42.752 0 0 1-6.997333 66.602667l-121.429333 121.216c-8.106667 7.68-19.2 12.373333-30.293334 12.373333L768 896c-11.52 0-22.613333-4.693333-30.293333-12.373333a42.496 42.496 0 0 1-0.426667-60.458667v-0.426667l54.826667-54.528H554.666667c-14.08-0.426667-27.306667-7.253333-34.986667-18.346666L384 555.264H128c-23.893333 0-42.666667-19.157333-42.666667-42.581333a42.24 42.24 0 0 1 42.666667-42.581334h254.464l136.789333-195.114666c7.68-11.52 20.906667-18.304 34.986667-18.304h238.336L737.28 201.685333v-0.426666a42.112 42.112 0 0 1 0-60.458667c16.64-17.066667 43.52-17.066667 60.586667 0l128 127.786667a41.813333 41.813333 0 0 1 11.861333 37.290666 42.752 42.752 0 0 1-17.834667 28.288l-122.453333 122.24c-8.106667 7.68-19.2 12.373333-30.293333 12.373334l0.853333 1.28z"})))}}H0(G0,"extendKey","ForkNode");const q5={type:"snaker:fork",view:G0,model:z0};var Z5=Object.defineProperty,J5=(n,e,t)=>e in n?Z5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,W0=(n,e,t)=>J5(n,e+"",t);class U0 extends zi{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]]}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}W0(U0,"extendKey","JoinModel");class X0 extends Ui{getShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,points:a}=e,s=e.getNodeStyle();return re("g",{transform:`matrix(1 0 0 1 ${t-i/2} ${r-o/2})`},re("polygon",{...s,x:t,y:r,points:a}),re("svg",{x:(i-28)/2,y:(o-32)/2,width:32,height:32,viewBox:"0 0 1024 1024"},re("path",{fill:s.stroke,d:"M792.149333 554.666667h-280.448L375.893333 749.226667c-8.106667 11.093333-21.333333 17.92-34.986666 18.346666L341.333333 768H128c-23.893333 0-42.666667-19.2-42.666667-42.666667 0-23.893333 18.773333-42.666667 42.666667-42.666666h191.146667l119.296-170.922667L319.146667 341.333333H128c-23.893333 0-42.666667-19.2-42.666667-42.666666 0-23.893333 18.773333-42.666667 42.666667-42.666667h213.333333c13.653333 0 26.88 6.826667 34.986667 18.346667L512 469.333333h281.002667L737.28 413.866667v-0.426667a42.24 42.24 0 0 1 0-60.586667 42.24 42.24 0 0 1 60.586667 0l128 128c5.674667 5.546667 9.429333 12.416 11.221333 19.712a42.752 42.752 0 0 1-19.328 48.042667l-120.32 120.362667c-8.106667 7.68-19.2 12.373333-30.293333 12.373333L768 682.666667c-11.52 0-22.613333-4.693333-30.293333-12.373334a42.624 42.624 0 0 1-0.426667-60.586666v-0.426667L792.149333 554.666667z"})))}}W0(X0,"extendKey","JoinNode");const Q5={type:"snaker:join",view:X0,model:U0};var eB=Object.defineProperty,tB=(n,e,t)=>e in n?eB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Y0=(n,e,t)=>tB(n,e+"",t);class K0 extends ko{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.r=18}getConnectedTargetRules(){const e=super.getConnectedTargetRules(),t={message:"起始节点不能作为边的终点",validate:()=>!1};return e.push(t),e}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}Y0(K0,"extendKey","StartModel");class V0 extends $o{}Y0(V0,"extendKey","StartNode");const nB={type:"snaker:start",view:V0,model:K0};var rB=Object.defineProperty,iB=(n,e,t)=>e in n?rB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q0=(n,e,t)=>iB(n,e+"",t);let Z0=class extends lu{setAttributes(){const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}};q0(Z0,"extendKey","TaskModel");let J0=class extends uu{getLabelShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o}=e,a=e.getNodeStyle();return re("svg",{x:t-i/2+5,y:r-o/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},re("path",{fill:a.stroke,d:"M860.343 764.864c-19-45.025-46.345-85.427-81.028-120.1-34.683-34.674-75.097-61.91-120.135-81.005-0.402-0.201-0.804-0.302-1.206-0.503 62.63-45.226 103.346-118.894 103.346-202.01C761.32 223.558 649.73 112 512.002 112S262.684 223.558 262.684 361.246c0 83.116 40.715 156.784 103.346 202.11-0.402 0.202-0.804 0.302-1.206 0.503-45.038 18.995-85.452 46.231-120.135 81.005-34.683 34.674-61.927 75.076-81.028 120.1-18.7 44.02-28.652 90.755-29.659 138.795-0.099 4.522 3.52 8.241 8.045 8.241h60.318a8.025 8.025 0 0 0 8.043-7.84c2.01-77.587 33.175-150.25 88.266-205.326 57.002-56.985 132.702-88.342 213.328-88.342s156.326 31.357 213.328 88.342c55.09 55.076 86.255 127.739 88.266 205.327 0.1 4.422 3.62 7.839 8.043 7.839h60.318c4.524 0 8.143-3.719 8.045-8.241-1.007-48.04-10.96-94.774-29.659-138.895z m-348.45-230.753c-46.13 0-89.547-17.99-122.21-50.654-32.664-32.663-50.654-76.08-50.654-122.21 0-46.131 17.99-89.549 50.653-122.212 32.664-32.663 76.08-50.653 122.211-50.653s89.548 17.99 122.212 50.653c32.663 32.663 50.653 76.08 50.653 122.211 0 46.13-17.99 89.548-50.653 122.211-32.664 32.664-76.08 50.654-122.212 50.654z"}))}getResizeShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,radius:a}=e,s=e.getNodeStyle();return re("g",{},[re("rect",{...s,x:t-i/2,y:r-o/2,rx:a,ry:a,width:i,height:o}),this.getLabelShape()])}};q0(J0,"extendKey","TaskNode");const oB={type:"snaker:task",view:J0,model:Z0},aB=$.defineComponent({__name:"VueNode",emits:["helpClick"],setup(n,{expose:e,emit:t}){$.useCssVars((c,f)=>({"03d150e3":f.cardHeaderBgColor,"3d585768":f.cardHeaderColor}));const r=$.ref({text:{value:""},properties:{},model:{},wfConfig:{},viewer:!1,showHelp:!1}),i=$.computed(()=>{var c,f;if(((c=r.value.properties)==null?void 0:c.state)==="active")return r.value.wfConfig.activeColor||Ln.activeColor;if(((f=r.value.properties)==null?void 0:f.state)==="history"){const d=r.value.properties.status;return d==="WITHDRAW"?r.value.wfConfig.rollbackColor||Ln.rollbackColor:d==="REJECT"?r.value.wfConfig.rejectColor||Ln.rejectColor:r.value.wfConfig.historyColor||Ln.historyColor}return Ln.primaryColor}),o=$.computed(()=>{var c,f;return(f=(c=r.value.properties)==null?void 0:c.approvalComment)!=null?f:[]}),a=$.ref("#ffffff"),s=$.computed(()=>r.value.viewer&&r.value.showHelp!==!1),l=c=>{c.stopPropagation(),t("helpClick",{e:c,type:"QuestionFilled",data:r.value.model})},u=c=>{c.arrowClick=!0};return e({setConfig:c=>{r.value=c}}),{__sfc:!0,config:r,emits:t,cardHeaderBgColor:i,approvalComment:o,cardHeaderColor:a,showHelp:s,handleClick:l,handleArrowRightIconClick:u}}});var sB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-card",{staticStyle:{height:"calc(100% - 2px)"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"card-header"},[t("div",{staticClass:"card-header-title",attrs:{span:r.showHelp?20:24}},[t("el-tooltip",{attrs:{effect:"light",disabled:r.approvalComment.length===0},scopedSlots:e._u([{key:"content",fn:function(){return[r.approvalComment.length>0?t("div",[t("el-timeline",e._l(r.approvalComment,function(i,o){return t("el-timeline-item",{key:o,attrs:{hollow:"",placement:"top",type:"primary",timestamp:i.finishTime}},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[e._v(" "+e._s(i.realName)+":"),t("span",[e._v(e._s(i.comment)+" ")])])])}),1)],1):e._e()]},proxy:!0}])},[t("span",[e._v(e._s(r.config.text.value))])])],1),r.showHelp?t("div",{staticClass:"card-header-icon",attrs:{span:4}},[t("i",{staticClass:"el-icon-question",staticStyle:{float:"right",cursor:"pointer"},on:{click:r.handleClick}})]):e._e()])]},proxy:!0}])},[t("div",{staticClass:"container"},[t("div",{staticClass:"content-column"},[e._v(" 参与人:"),t("a",{attrs:{href:"javascript:;",title:r.config.properties.assigneeText||r.config.properties.assignee},on:{click:r.handleArrowRightIconClick}},[e._v(e._s(r.config.properties.assigneeText||r.config.properties.assignee))])]),r.config.viewer?e._e():t("div",{staticClass:"icon-column",on:{click:r.handleArrowRightIconClick}},[t("i",{staticClass:"el-icon-arrow-right",staticStyle:{cursor:"pointer"}})])])])},lB=[],uB=Vt(aB,sB,lB,!1,null,"911de5c0");const cB=uB.exports;var fB=Object.defineProperty,dB=(n,e,t)=>e in n?fB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ld=(n,e,t)=>dB(n,typeof e!="symbol"?e+"":e,t);class hB extends l6{setAttributes(){this.text.editable=!1;const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}}class pB extends u6{constructor(e){super(e),Ld(this,"app"),Ld(this,"isMounted"),Ld(this,"r");const{properties:t,text:r}=e.model;e.graphModel.wfProps.taskNodeRender&&typeof e.graphModel.wfProps.taskNodeRender=="function"?this.r=$.h(e.graphModel.wfProps.taskNodeRender(e)):(this.r=$.h(cB,{on:{helpClick:i=>{e.graphModel.eventCenter.emit("custom:helpClick",i)}}}),$.nextTick(()=>{var i;this.r.componentInstance.setConfig({properties:t,text:r,wfConfig:e.graphModel.wfProps.wfConfig,viewer:e.graphModel.wfProps.viewer,helpClick:e.graphModel.wfProps.helpClick,showHelp:(i=e.graphModel.wfProps.wfConfig)==null?void 0:i.showHelp,model:e.model})})),this.app=new $({render:()=>this.r}),this.isMounted=!1}shouldUpdate(){const e={...this.props.model.getProperties(),id:this.props.model.id,__textValue__:this.props.model.text.value};return this.preProperties&&this.preProperties===JSON.stringify(e)?!1:(this.preProperties=JSON.stringify(e),!0)}setHtml(e){if(this.isMounted)$.nextTick(()=>{var t;this.r.componentInstance.setConfig({properties:this.props.model.getProperties(),text:this.props.model.text,wfConfig:this.props.graphModel.wfProps.wfConfig,viewer:this.props.graphModel.wfProps.viewer,helpClick:this.props.graphModel.wfProps.helpClick,showHelp:(t=this.props.graphModel.wfProps.wfConfig)==null?void 0:t.showHelp,model:this.props.model})});else{this.isMounted=!0;const t=document.createElement("div");t.style.width="100%",t.style.height="100%",e.appendChild(t),this.app.$mount(t)}}getShape(){const{model:{isSelected:e},graphModel:t}=this.props,r=t.wfProps.viewer;return re("g",{},[this.getResizeShape(),e&&!r?this.getControlGroup():""])}getText(){return null}}const vB={type:"snaker:task",view:pB,model:hB};var gB=Object.defineProperty,yB=(n,e,t)=>e in n?gB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Q0=(n,e,t)=>yB(n,e+"",t);class eb extends Io{getEdgeStyle(){const e=super.getEdgeStyle();return k5(this,e)}}Q0(eb,"extendKey","TransitionModel");class tb extends Ho{}Q0(tb,"extendKey","TransitionEdge");const mB={type:"snaker:transition",view:tb,model:eb};class _B extends D_{}class bB extends P_{initNodeData(e){super.initNodeData(e),this.isRestrict=!0,this.resizable=!0,this.foldable=!1,this.width=500,this.height=300,this.foldedWidth=100,this.foldedHeight=50}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}const xB={type:"snaker:subProcess",view:_B,model:bB};var EB=Object.defineProperty,wB=(n,e,t)=>e in n?EB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,nb=(n,e,t)=>wB(n,e+"",t);class rb extends lu{setAttributes(){const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}nb(rb,"extendKey","WfSubProcess");class ib extends uu{getLabelShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o}=e,a=e.getNodeStyle();return re("svg",{x:t-i/2+5,y:r-o/2+5,width:25,height:25,viewBox:"0 0 1024 1024"},[re("path",{fill:a.stroke,d:"M960 224v576H64V224h896z m-32 32H96v512h832V256z"}),re("path",{fill:a.stroke,d:"M224 224v576H64V224h160zM192 256H96v512h96V256zM960 224v576h-160V224h160z m-32 32h-96v512h96V256z"})])}getResizeShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,radius:a}=e,s=e.getNodeStyle();return re("g",{},[re("rect",{...s,x:t-i/2,y:r-o/2,rx:a,ry:a,width:i,height:o}),re("rect",{...s,x:t-i/2,y:r-o/2,width:6,height:o}),re("rect",{...s,x:t+i/2-6,y:r-o/2,width:6,height:o})])}}nb(ib,"extendKey","WfSubProcessNode");const AB={type:"snaker:wfSubProcess",view:ib,model:rb};var SB=Object.defineProperty,CB=(n,e,t)=>e in n?SB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ob=(n,e,t)=>CB(n,e+"",t);class ab{constructor({lf:e,props:t}){e.register(H5),e.register(W5),e.register(Y5),e.register(q5),e.register(Q5),e.register(nB),t.nodeRenderType==="html"?e.register(vB):e.register(oB),e.register(mB),e.register(xB),e.register(AB)}}ob(ab,"pluginName","snakerFlowElement");class sb{constructor({lf:e}){e.adapterIn=t=>(typeof t=="string"&&(t=T0(t)),t=t.json?t.json:t,t.nodes&&t.nodes.forEach(r=>{typeof r.properties.field=="object"&&(r.properties.field=JSON.stringify(r.properties.field))}),e.graphModel.name=t.name,e.graphModel.displayName=t.displayName,e.graphModel.expireTime=t.expireTime,e.graphModel.instanceUrl=t.instanceUrl,e.graphModel.instanceNoClass=t.instanceNoClass,e.graphModel.preInterceptors=t.preInterceptors,e.graphModel.postInterceptors=t.postInterceptors,t),e.adapterOut=t=>{const r={name:e.graphModel.name,displayName:e.graphModel.displayName,expireTime:e.graphModel.expireTime,instanceUrl:e.graphModel.instanceUrl,instanceNoClass:e.graphModel.instanceNoClass,preInterceptors:e.graphModel.preInterceptors,postInterceptors:e.graphModel.postInterceptors,...t};Object.keys(r).forEach(o=>{r[o]===void 0&&delete r[o]}),r.nodes.forEach(o=>{o.type==="snaker:task"&&o.properties.field&&(o.properties.field=JSON.parse(o.properties.field))});const i=P0(r);return{json:r,xml:i}}}}ob(sb,"pluginName","snakerFlowAdapter");const OB=$.defineComponent({__name:"DataDetail",setup(n,{expose:e}){const t=$.ref(!1),r=$.ref("json"),i=$.ref({}),o=$.ref(null),a=$.computed(()=>{var f;return(f=$.unref(i))==null?void 0:f.xml}),s=$.computed(()=>{var f;return JSON.stringify((f=$.unref(i))==null?void 0:f.json,null,2)}),l=f=>{t.value=!0,i.value=f},u=()=>{const f=document.querySelectorAll(".m-flow-btn-copy");o.value=new db(f,{container:document.querySelector(".m-dialog-data-detail")}),o.value.on("success",function(d){Ir.Message.success("复制成功"),d.clearSelection()}),o.value.on("error",function(){Ir.Message.error("复制失败")})},c=()=>{o.value&&o.value.destroy()};return $.onBeforeUnmount(()=>{o.value&&o.value.destroy()}),e({show:l}),{__sfc:!0,dialogVisible:t,activeName:r,graphData:i,clipboard:o,xml:a,copyJsonContent:s,show:l,handleOpened:u,handleClose:c,VueJsonPretty:fb}}});var NB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{staticClass:"m-dialog-data-detail",attrs:{title:"查看流程数据",width:"60%","append-to-body":!0},on:{opened:r.handleOpened,close:r.handleClose},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{staticClass:"m-flow-btn-copy",attrs:{type:"primary","data-clipboard-text":r.copyJsonContent}},[e._v("复制JSON")]),t("el-button",{staticClass:"m-flow-btn-copy",attrs:{type:"primary","data-clipboard-text":r.xml}},[e._v("复制XML")])]},proxy:!0}]),model:{value:r.dialogVisible,callback:function(i){r.dialogVisible=i},expression:"dialogVisible"}},[t("div",{staticStyle:{height:"60vh","overflow-y":"scroll"}},[t("el-tabs",{model:{value:r.activeName,callback:function(i){r.activeName=i},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:"json",name:"json"}},[t(r.VueJsonPretty,{attrs:{data:r.graphData.json}})],1),t("el-tab-pane",{attrs:{label:"xml",name:"xml"}},[t("pre",{staticStyle:{"text-align":"left"}},[e._v(e._s(r.xml))])])],1)],1)])},MB=[],TB=Vt(OB,NB,MB,!1,null,null);const PB=TB.exports,DB=$.defineComponent({__name:"ImportData",emits:["on-submit"],setup(n,{expose:e,emit:t}){const r=$.ref(!1),i=$.ref(""),o=()=>{r.value=!0},a=$.ref(1),s=$.computed(()=>{const h=[];return a.value>0&&Object.keys(window.localStorage).forEach(v=>{if(v.startsWith("LFDATA###")){const p=v.split("###");h.push({value:v,label:p[2]})}}),h}),l=()=>{$.unref(i)?(t("on-submit",$.unref(i)),r.value=!1):Ir.Message.error("导入数据不能为空")},u=h=>{i.value=window.localStorage.getItem(h)||""},c=h=>{window.localStorage.removeItem(h),a.value++},f=()=>{r.value=!1,i.value=""},d=()=>{a.value++};return e({show:o,refresh:d}),{__sfc:!0,dialogVisible:r,graphJsonStr:i,emits:t,show:o,refreshFlag:a,localStorageLfData:s,handleSubmit:l,handleCommand:u,handleRemove:c,handleClose:f,refresh:d}}});var RB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{staticClass:"m-dialog-import-data",attrs:{title:"导入流程数据(同时支持xml/json)",width:"60%","append-to-body":!0},on:{close:r.handleClose},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:r.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:r.handleSubmit}},[e._v("确 定")]),r.localStorageLfData.length?t("el-dropdown",{staticStyle:{float:"left"},attrs:{placement:"top",trigger:"click"},on:{command:r.handleCommand},scopedSlots:e._u([{key:"dropdown",fn:function(){return[t("el-dropdown-menu",e._l(r.localStorageLfData,function(i){return t("el-dropdown-item",{key:i.value,attrs:{command:i.value}},[e._v(" "+e._s(i.label)+" "),t("i",{staticClass:"el-icon-delete-solid",on:{click:function(o){return r.handleRemove(i.value)}}})])}),1)]},proxy:!0}],null,!1,1997195200)},[t("el-button",{attrs:{link:"",type:"primary"}},[e._v("选择"),t("i",{staticClass:"el-icon--right el-icon-arrow-down"})])],1):e._e()]},proxy:!0}]),model:{value:r.dialogVisible,callback:function(i){r.dialogVisible=i},expression:"dialogVisible"}},[t("div",{staticStyle:{height:"440px","overflow-y":"scroll"}},[t("el-input",{attrs:{rows:20,type:"textarea"},model:{value:r.graphJsonStr,callback:function(i){r.graphJsonStr=i},expression:"graphJsonStr"}})],1)])},LB=[],IB=Vt(DB,RB,LB,!1,null,null);const kB=IB.exports,BB=$.defineComponent({__name:"HighLightData",emits:["on-submit"],setup(n,{expose:e,emit:t}){const r=$.ref(!1),i=$.ref(""),o=()=>{r.value=!0},a=()=>{$.unref(i)?(t("on-submit",$.unref(i)),r.value=!1):Ir.Message.error("导入数据不能为空")},s=()=>{r.value=!1,i.value=""};return e({show:o}),{__sfc:!0,dialogVisible:r,highLightStr:i,emits:t,show:o,handleSubmit:a,handleClose:s}}});var jB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{staticClass:"m-dialog-high-light-data",attrs:{title:"导入高亮数据(json)",width:"60%","append-to-body":!0},on:{close:r.handleClose},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:r.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:r.handleSubmit}},[e._v("确 定")])]},proxy:!0}]),model:{value:r.dialogVisible,callback:function(i){r.dialogVisible=i},expression:"dialogVisible"}},[t("div",{staticStyle:{height:"440px","overflow-y":"scroll"}},[t("el-input",{attrs:{rows:20,type:"textarea"},model:{value:r.highLightStr,callback:function(i){r.highLightStr=i},expression:"highLightStr"}})],1)])},FB=[],$B=Vt(BB,jB,FB,!1,null,null);const HB=$B.exports,lb=[{type:"snaker:start",text:"开始",label:"开始节点",properties:{},sort:10,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA2tJREFUWEfNlztsHFUUQM8df+JIBBnvLAkIUQCCCu8oSCCHwiYp+BQICjsgKBCK4kmc8JEwyDSYBisxEt8k4ygFBQgSFyAKDEWCXRALJKK3ThUJUkQRn8ysiQAJE3vnotldW7vr/cwmWS0jTTPvvvvOe+/OvDNCiy9p8fjEBnhgf+bGpWX6RLQfpR/YXLijOfyeu4U5VZnr6mD++w8Sf8aZXCwAZzjYi/AacHucpMAFlANmyj5cL74mwMC4tl/+LfgS5NF8IvVBpkGnKyeWQdBBkGQhfqZ7i/347LisVAOpCpByM0OCHs93lCtI+H64bL23cCxxsdasendlbrM6whdR6wXQzhw2sjPtJU5U6lcRoNcNtltwstBhPgx138LR5Jl6y1nc3rvb32pZ8iHQFz0PYceCZ58qz7EeYPBEm5PYXlgyfdN4yfFGBi6PdVx/HOSN6LnJnGpneihbHLMOwBnOHER0VNHP0l7y6WsZfLVvyvU/FeQpVCbNVOLVqgAp99KQYB2P9jwMw75Gl70abH47rPmoJpRwZ9q7ea0e1lbAee6PbrrCH0HvQPRtcyQ5ej1mv5rD2eNPovIKyHmWrPvMRzddzpX3WsDu4AksPgcWwxVJ1av2RuFyb0e7poEeQp40R+0vSgGGM+8g+hLwifHsZxsdIE684wYfA8+g8q6ZSrxcCuAG3wHbQB8yXnI2TsJGYxzXHwD5FjhtPPvBcoCfgDubCZAa8e+WrJwDfjaefVc5wF/ADc0EuOd5f9PGTokOqb+NZ2/63wG0fAtaXIR7grdQxoDDxrNHGq3wOPGOGxwCIreYMEfs10tqIOVmHhb06+jMD1esrc35EIVnIldQ5JG0l/imBCBSrn+X9WzOepr6KebChg65d1XZSk7DgnodauZhhDJSrGrrj2PX/6qgYPPGs7fF2dt6MY4bnM6Lic4YL/lYTR/Ie2BmOR90fYWke0uio9wPKypZsQ9GYqIhk426QeQAYjGaE5EaXlhVSku98NqktJoPlrwFFfcx8sOeHRORohXaF4EZ0GPaxi9L//Br9LxrI7dIlltBdgGRwvfkd1AmzeLJsXIPrFkDlUDyqtY2kbOlWJecV7JjxepVrVusP6Ooc07ZOrMDiPQjen/FXzOVH1Cd40rb7Kpy1eONDVAv0dW2txzgP8G/iTC6ltECAAAAAElFTkSuQmCC"},{type:"snaker:task",text:"用户任务",label:"用户任务",properties:{},sort:20,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA29JREFUWEftll1oFFcUx/9nkkViCxUzg9HQh6YN+AHZ2aY+pH21QkuTNoWIGpU+xGRW00KkQjUtRtRaaEmgTbs3aR6KXxEFPxJRsL62eYjp3hWqQvx4KNqUmUgLNaFsMkdmd5Msm83e2exDEDovy+499/x/87/nnLuEJX5oifXxfAIELaecwJVERWs9B5mn7zJoNCb0R/k6mrcDQcvuJ9DWbEIMPhsTxrZ8IHwDhFr+qmEqugFguUJggnh6U7Rn1ZAfEF8ANW1/lExOlkykJfxJI+6OI/DA+y2AeIXL1Argo5mYkpLJ5UNdL0+qIHwBmJb9I0BNifMGPowJ/WK2xEHLqSfgQnKN+6QwdhcMYDY7H0BDQpBB+2KitCtX0qA13kbgzkSMi3rZq1/KFa90wAw7B8E4BsJjGdHLVW/krZth5xEYa0BolxH9y4IAgpZzgoCdRBiMRvQ6PwChsDPAjFoGTsaEvqswgBZ7gIhqAe6SwtjnB8C07E6A2ph5MNZj5IRWH4HltAM4CtCQFKVv+gMY/xXgGgCfS6EfK8wB68l7BHcwWYRabUysvJK7CPOLVzpQ1TT2ilZcnOh3P4U4W4BeE0xNVdzqK3tYkAOJqrbsDoAOpRJFi9zihpHeFffTE1c3//3qtDZ1HkAoNQcOS2F0qI5M6cBMggwIbyqeA9EvyZnDbwHYMjem2Zd40tQ8ngyIBXb6F/cNUPXp2Avav4GfU5XtA5mG3Bfjb9/6puypKljpQChs1zHT5dlEjOsgDIMxTAEeTpxAnDaCsBEM73PzTCwRvx+NGAOLLkIzbDeDqSdVVP+B8IWMGF/nSmiG7f1gHAFoWbJzuEVGjN6F9izowOt7/nnNdeOjKfF+KYztKjvT103LPgNQ4s+JpgUqf/vhpXvZ9i8IYFrOTQDVAF2TovTdfMTnOmf8KsDvABiRQn/DN0CwxfmWCB97G4pcXjPSa/y5GIDqZnv1tEaPk52K72I9+ieZeeY5kDH5WmVE/34x4rMuhJ29YHR737NNxnkAwbTZ72eUquDSXyjbXTIPIGQ5nzFwHMAdKfT1KgE/66bl3AawjoADUaF/lb5nHoBpOacANAJ8Rgqj0Y+AKsa07NMAeV10Wgp9hwLAu3i8/tV+l5FS73Ip+DHD4w1gd4OXKPOCUk7CgtUVCf4HeAbMRkMwjKRR9AAAAABJRU5ErkJggg=="},{type:"snaker:custom",text:"自定义任务",label:"自定义任务",properties:{},sort:30,icon:"data:image/png;base64,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"},{type:"snaker:decision",label:"条件判断",properties:{},sort:40,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA7NJREFUWEetlt+PE1UUx7/nDhUxEmDbKWgiipFIWIFZMZoYY4SQSGLkgd3OLvGFSLJtV/0bxL8B7Y9NIDxotrRbEk00PhB/8KAxETq7yxqJhB8xgnRacEMiq93eY6ZJh2l3fhb71GTmnM/nnnPuvUMY8DeSbu5kgXK7zWML04lfB0wDGiSwC7diWbIkyFGjmPxtkFyRBZxwktCZ5Fkw7reFHF3Ib74aVSKSQD+8Voz/8mL29m7JogrQEinKaO2TTTeiSIQWcIN3QXsy9RFiqoLIXBE0dikX/z2sRCgBP3gXNJI2X2KiKoA/aA2P1T5Wb4aRCBQIA++Cdk82XhECVTBfaymcWswl/wyS8BWIAu+CtKnmqyy5SsBlirVStRNPmH4SngKDwB+0o/46E80SaOHfViy1eHLDHS8JV4GHgduDOWXuI0mzAC5gWdGN05v+cpNYJeAH1zLmO0ZB/cwtUSeOpG4U1ON2JbKNA8yYZaIfl/+R+uVT6r3+2B6BIDhAnwL8kRNiJbTjmIeFiG2/mNtwxR7MdP2gIFEB0fdKe0i/ME1/OyVsgTBl1zLmcYA+dEo44SDSjXy80r9KLWu+BaYKE84t3b+nXz+9bbn7TkcgDNyecocEsShbFxKYh73gD9phHmKmChhfKRy3KtGynlEU+CoJosUwcHsw043DRCgz4/O5O9/oqOht0rLNSx0TCd0624MOjv6eA6gYhYQeJs56R8s2U2Aud+No12RjhyCUifgRQVK/mN8875esp+eA1e9UWIl+eGfhHat0fTtAZRAeZ7A+V0jWPLdaX8+1TMNaTaCEG9wWsP7syt5+VmHFGqghgtUO9WenhN+0B0l4wXsEOr197+7T3G5bK9oiJfT56cRPLoPnvtXsSvA+o6B+Z8f19dz3ILIevjDVfGqN5DMAtkKQbuTiP9hbKd3c6TeoWsZ8Iwp8VQVs0Pvmk9zCGSZ6TrAcrxWT58NOediV9xxEbsmHp+pbYlKUALa+fsfncuq3YSX8eh7Ygp7B++CWilasxIBGhPFaPnEuSCIK3LMFTsjwsaWhWKxVAvCyZDkxX0x+7SURFR5KoHNOHL27kdfJGWJ+DcQTRl79sl9iEHhoAevF5981169bK2bAvJ+IJ2p59YuoA+dWucCPUmfQ3kl+bEVplojxJjOOzBUTZwddeeAu8OrzM0evPbpx7foZEN4G0RHnxRI0oA9dgW6CvZMcW6FmiQiHw15EXnKRWtCTJFVWtPj+mShX8f9WgUFK7RXzHy52Nj+qKwLIAAAAAElFTkSuQmCC"},{type:"snaker:fork",label:"分支",properties:{},sort:50,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAbBJREFUWEftlj1Lw1AUht9ToWOXNvoHnCxoWgrq2N3Fwc5uTRXBSXDrpIODk7RZdK+LDq7i5KBoI1hB/AlNBBGRUpsjiS20MW1vE8NdvOs9974P55sg+ZBkffwDROaBxS0r0WrzOYAmMZXrevLJL9yRAWRLr/M22w+uKFGDbBT8ICIDcHRVzawBWBsFESmACERoAFUzTwCsC5czUeOzZS8/HyvvbnSEH/oYqiVrG8yHk//BeaOqXIUCWNi00tThxz5x90PfQ6SAOd29OzWqqULPLrAH1JJ5CUb+J8F4x6goB17xTNGa4xhqw8QDe0Atmrsg7LmCjDNDT616xd0+8IXrUeKBADLFZo6JbruCnfhUfObmKGF5AQb6ADDg9n7bgRC4LiN7elRSMWifgKWu61eMinIxzF7VmmUQPvzC8ysHshtvs7bdfhHNaALp9WpSE7Ufmp+9C+kADojUEIi6MtIkFIWQWoY9SKmNyIGQ3oodiKDDKEacu68od4E6oTdPJh7HTIahJzOhh5Fwwo7ZigJPQxEAqSuZ9KVU+louEqI/qQJRobHTMOxHQd9HWgUiUN/g2P0hyk6c4AAAAABJRU5ErkJggg=="},{type:"snaker:join",label:"合并",properties:{},sort:60,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAWRJREFUWEdjZBhgwDjA9jOMOmA0BEZDAB4C5rlv+X7+/r+RgYHBAU/WnHZhhkg2NbMu3AFGme/0/v3/d5Gg4YyMhRemC08gqI5IBShpwCDjdQMDA6M9Dr3wkPnPzKhzcarwVUJ2GKa/1WL6/+fn2Vnid3GpJToRGmS8qWZgYGgBG8TIsP/CdBEnfA4wyvqo8u/f79sQNf8bL8wQbcCmnmgHgDTrZ7zZw8jA4Awxk6HqwkyRdlyOME57qfyXifkOQh67I0hygE7+F3GWnz+eMTAwMIED4v9/0/MzRc/gcgQ0SuvxOYIkB4AMMsh4Hc3AwLgEEggMJxgZ/lcSSAsOQKfidATJDgA7Iv3NPAZGhkRCiRCn/N9/hhdmi12AJCcyAMUOYPjveGGG6AGyHEB6FDDZAyMLKQegJkaSQmDAE+GAZkO6FEQDWhQPeGU04NUxGcUBVbSQlA2pYiOaIaMOGA2B0RAAACkksCEHSvE2AAAAAElFTkSuQmCC"},{type:"snaker:end",text:"结束",label:"结束节点",properties:{},sort:70,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA0hJREFUWEfNl01oE1EQx//zNoI3tdlQEAQvWhFJ04L01B5U/DgIiiIiBUWo3fhBi0gPehAPeigiLX5ka0EUiogoFjz4QfXQnorQboOItRdBEEo2VW+C2R15m27YJLubxEZjTkt23pv/zsyb+T1Cg39Ui/94MtMiGF0MsY2I14KxxllP+MFM3wn2e5swmU7F5qvdtyoBbcmlfcy8h8BbqtmYQR+J6NVsqulFJftQAXHN3KEABwFscjdi8AdmmhFCZC3LXpL/K4posm07SsTtBNrqcbpgAc/Suvo2SEiggNZes1sQuuVCBn4CGKcIv569Ffsa9lVtZzPrOUe7ARwgYLW0tRljcyPqmN86XwFFzgmTYOWhoa/7XCmc3vcJ7dtGkHWMGF1hIsoEtCeXOpntS86XEyaNlHqtFseltomkedEVQSSuzqSaprw2RQK8zsPCVqsgb0RLRRQJaNPMm7LgmHnCGIldr9VRmH2iN3OBiHYBWJjV1XOubUGAPGpguy9fcEp/rTmvJNapCVhDTmGSGHaPaEFAq5YdFuAWBh4Zunq/0oZ/8j6hmScIOGqD5uf0aF++hwFoTy7GmZVB+RwR1PPuTvSLnwOZSwLHw5wzKB105Lafzm7I2TzqOCZrYCbVnHYEJJLmGWLsL81PWUX3ZgaJKFwAc9oYiQ0EiSzUGeG5kVJvOwLc8Feq/EQdBLgnwk2DG4EHxGj2FoffF9RDQKHYCYtGSj2eF6CZ47I6LRuX03fV6aDw1UNA/JTZoQhckafN0FXZrv8HAUmzsSlofBFqmR4CHZKz3tBj5/9mDSS0zA3JDAx+auixUacGJGopTMOO4wifDJr5K21EkhWQo3vSjUXcJ9Gt0IoTWnZIIte/aMUS2Qw92l9oxfKh4cPIEeGO4zqASAiY+I9jpxbyEOr08XrQkCvCS0UWMOiF1DIk89JLpdlQzUiutF9lKGWeAEWe1AooDoBw7vAyBQWScSCWF8HpMpavEvQmiBXcaMiZ/8vmnV4s94PRMiTzC+eyiCPei4lkBpsx7XcxEYSOUlsi8biUhL2+qr6a2cx7JbJVk3c56wXRyxVfzUqdSXSzoXQy02bfyynxJwFrSqJWNUKLGlG1C+pt9xuNFQ0/HWACVgAAAABJRU5ErkJggg=="},{type:"snaker:wfSubProcess",text:"snaker子流程",label:"snaker子流程",properties:{},sort:80,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAGRJREFUWEdjZBhgwDjA9jOMOmA0BAZPCBhkvPlPzxxxYYYI2PPwEAA5ACYIkkDnU+I4fGaPOmA0BEZDYDQERkNgNARGQ2BwhQAldT6pejEaJKQaQC31g6dNSC0fkWrOaAiMhgAA/IAIMC/mUMgAAAAASUVORK5CYII="},{type:"snaker:subProcess",text:"",label:"子流程",sort:90,properties:{},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAURJREFUWEftVtFRwzAMlWZoskTph5mAdghYAXMMQToEh1mBDkE6Af5ou0TSGURMk14a5EqUy7Uc8a+fpecn6dkIZ16ozX99vx0T0rMGj4SPH6+jjQqrAQWMscUUAN91eJp5l+YarFqBDoFY8Okuae8Evic4JDgQGBToXQE49xRIE96DAhEnrOf+UJFenLB751PnvhtH7YT/j4CxZXh4mhpLXSft594lMw4ULcElEcir120pXZHfx5taxV8pED0skWqp+AcIGFtk1Y8nSNZeoQm7tlt4l9xxtze2fAOAVI5BS+/SLOD2TfiTpvMuYZvX2JKkstT7+5JwBI795b7GUkFAinGcADezdYmedARo3kjcVoRrSlaBgcCgQNx6Ud2EWmu+KB8ILnYrGgni2r+MJqwTPmxXQHQlxgBYNG568o9IkUQF+QTaiEcwvdLyewAAAABJRU5ErkJggg=="}],zB=$.defineComponent({__name:"SnakerFlowDesigner",props:{value:{type:[Object,String]},config:{type:Object,default(){return{grid:!0}}},highLight:{type:Object,default(){return{}}},assigneeText:{type:[Object,Array],default(){return{}}},viewer:{type:Boolean,default:!1},extendAttrConfig:{type:Object},showDoc:{type:Boolean,default:!0},extendPropertyKeys:{type:Array},wfConfig:{type:Object,default(){return{}}},nodeRenderType:{type:String,default:"svg"},taskNodeRender:{type:Function}},emits:["input","on-save","on-init"],setup(n,{expose:e,emit:t}){const r=n,i=$.ref(null),o=$.ref(null),a=$.ref(null),s=$.ref(null),l=$.ref(null),u=$.ref(null),c=$.ref("");$.watch(()=>r.value,()=>{g(r.value)},{deep:!0}),$.watch(()=>r.highLight,()=>{T(r.highLight)},{deep:!0}),$.watch(()=>r.assigneeText,()=>{F(r.assigneeText)},{deep:!0});const f=()=>{const N=$.unref(u);N&&r.showDoc&&N.extension.control.addItem({iconClass:"lf-control-mayu",title:"",text:"码云",onClick:()=>{window.location.href="https://gitee.com/mldong/snakerflow-designer-vue/tree/vue3/"}})},d=()=>{console.info(`Vue:${$.version}`),console.info(`element-plus:${Ir.version}`),Vr.use(i4),Vr.use(f4),Vr.use(d4),Vr.use(c4),Vr.use(s4),Vr.use(ab,r),Vr.use(sb,r),Vr.use(p6);const N={};r.viewer&&(N.adjustEdge=!1,N.adjustNodePosition=!1,N.stopScrollGraph=!0,N.stopMoveGraph=!0,N.hoverOutline=!1,N.hideAnchors=!0,N.adjustNodePosition=!1,N.stopMoveGraph=!1,N.nodeTextEdit=!1,N.edgeTextEdit=!1,N.resizeNode=!1,N.nodeSelectedOutline=!1),u.value=new Vr({container:$.unref(i),grid:!0,...r.config,...N,background:r.config.background||{backgroundColor:Ln.backgroundColor}}),t("on-init",u.value),h(),v(),g(r.value),p()},h=()=>{const N=$.unref(u);N&&(N.graphModel.wfProps=r)},v=()=>{var N;const U=$.unref(u);if(!U)return;if(r.viewer){U.extension.menu.setMenuConfig({nodeMenu:[],edgeMenu:[]}),U.extension.control.removeItem("undo"),U.extension.control.removeItem("redo"),f();return}U.extension.menu.setMenuConfig({nodeMenu:[{text:"删除",callback(x){U.deleteNode(x.id)}}]}),U.extension.control.addItem({iconClass:"lf-control-clear",title:"clear",text:"清空",onClick:()=>{U.clearData()}}),U.extension.control.addItem({iconClass:"lf-control-see",title:"",text:"查看",onClick:()=>{const x=$.unref(a);if(!x)return;const P=m();x.show(P)}}),U.extension.control.addItem({iconClass:"lf-control-import",title:"",text:"导入",onClick:()=>{$.unref(s).show()}}),U.extension.control.addItem({iconClass:"lf-control-setting",title:"",text:"设置高亮",onClick:()=>{$.unref(l).show()}}),U.extension.control.addItem({iconClass:"lf-control-save",title:"",text:"保存",onClick:()=>{t("on-save",m())}}),f(),U.setDefaultEdgeType("snaker:transition");const X=()=>(Object.keys(r.wfConfig).forEach(x=>{x in jt&&Object.keys(r.wfConfig[x]).forEach(P=>{["type","text","icon","label","className","properties","callback","sort"].includes(P)&&lb.forEach(R=>{R.type===`snaker:${x}`&&(P==="properties"?R[P]={...R[P],...r.wfConfig[x][P]}:R[P]=r.wfConfig[x][P])})})}),lb.filter(x=>{const P=r.wfConfig[x.type.replace("snaker:","")];return(P==null?void 0:P.hide)!==!0}));U.extension.dndPanel.setPatternItems([...X(),...((N=r.wfConfig)==null?void 0:N.extendDndPanel)||[]].sort((x,P)=>(x.sort||99)-(P.sort||99)))},p=()=>{const N=$.unref(u);if(!N)return;const U=N.graphModel.eventCenter;r.nodeRenderType==="html"&&r.wfConfig.helpClick&&typeof r.wfConfig.helpClick&&U.on("custom:helpClick",r.wfConfig.helpClick),!r.viewer&&(U.on("blank:contextmenu",X=>{r.wfConfig.blankContextmenu&&typeof r.wfConfig.blankContextmenu=="function"?r.wfConfig.blankContextmenu(N,X):o.value.show({name:N.graphModel.name,displayName:N.graphModel.displayName,expireTime:N.graphModel.expireTime,instanceUrl:N.graphModel.instanceUrl,instanceNoClass:N.graphModel.instanceNoClass,preInterceptors:N.graphModel.preInterceptors,postInterceptors:N.graphModel.postInterceptors,type:"process"})}),U.on("node:click",X=>{var x,P,R;if(X.data.type==="snaker:subProcess"&&!X.e.srcElement.className.baseVal)return;c.value=X.data.id;const Z=((x=r.wfConfig[X.data.type.replace("snaker:","")])==null?void 0:x.nodeClick)||r.wfConfig.nodeClick;Z&&typeof Z=="function"?Z(N,X):r.nodeRenderType==="html"&&[jt.task].includes(X.data.type.replace("snaker:",""))?X.e.arrowClick&&(r.wfConfig.arrowClick&&typeof r.wfConfig.arrowClick=="function"?r.wfConfig.arrowClick(X):o.value.show({...X.data.properties,name:X.data.id,displayName:((P=X.data.text)==null?void 0:P.value)||X.data.properties.displayName,type:X.data.type})):o.value.show({...X.data.properties,name:X.data.id,displayName:((R=X.data.text)==null?void 0:R.value)||X.data.properties.displayName,type:X.data.type})}),U.on("edge:click",X=>{var x;c.value=X.data.id,r.wfConfig.edgeClick&&typeof r.wfConfig.edgeClick=="function"?r.wfConfig.edgeClick(N,X):o.value.show({...X.data.properties,name:X.data.id,displayName:(x=X.data.text)==null?void 0:x.value,type:X.data.type})}),N.on("node:resize",({newNodeSize:X})=>{const x=N.getNodeModelById(X.id);x&&x.setProperties({width:parseInt(X.width),height:parseInt(X.height)})}))},g=N=>{const U=$.unref(u);U&&(U.render(N),T(r.highLight),F(r.assigneeText))},y=N=>{const U=$.unref(u);if(U){if(N.type===jt.process)U.graphModel[N.propertyName]=N.propertyValue;else if(N.type===jt.subProcess){const X=$.unref(c);N.propertyName==="name"?U.getNodeModelById(N.propertyValue)||(U.changeNodeId(X,N.propertyValue),c.value=N.propertyValue):U.setProperties(X,{[N.propertyName]:N.propertyValue})}else if([jt.custom,jt.decision,jt.end,jt.fork,jt.join,jt.start,jt.task,jt.wfSubProcess].includes(N.type)){const X=$.unref(c);if(N.propertyName==="name")U.getNodeModelById(N.propertyValue)||(U.changeNodeId(X,N.propertyValue),c.value=N.propertyValue);else if(N.propertyName==="displayName")U.updateText(X,N.propertyValue);else if(N.propertyName==="width"&&[jt.task,jt.custom].includes(N.type)){U.setProperties(X,{width:Number.isNaN(N.propertyValue)?120:N.propertyValue});const x=U.getNodeModelById(X);x&&(x.width=Number.isNaN(N.propertyValue)?120:N.propertyValue)}else if(N.propertyName==="height"&&[jt.task,jt.custom].includes(N.type)){U.setProperties(X,{height:Number.isNaN(N.propertyValue)?120:N.propertyValue});const x=U.getNodeModelById(X);x&&(x.height=Number.isNaN(N.propertyValue)?120:N.propertyValue)}else N.propertyName==="field"?U.setProperties(X,{field:JSON.stringify(N.propertyValue)}):U.setProperties(X,{[N.propertyName]:N.propertyValue});t("input",m())}else if(N.type===jt.transition){const X=$.unref(c);N.propertyName==="name"?U.getEdgeModelById(N.propertyValue)||(U.changeEdgeId(X,N.propertyValue),c.value=N.propertyValue):N.propertyName==="displayName"?U.updateText(X,N.propertyValue):U.setProperties(X,{[N.propertyName]:N.propertyValue})}}},m=()=>{const N=$.unref(u);return N?N.getGraphData():{}},S=N=>{let U=null;try{U=JSON.parse(N)}catch{try{U=T0(N)}catch{return}}U&&U.nodes&&U.edges&&g(U)},O=N=>{g(N)},k=N=>{g(N)},M=()=>{var N;return(N=$.unref(s))==null?void 0:N.refresh()},A=N=>{let U=null;try{U=JSON.parse(N)}catch{}T(U)},T=N=>{const U=$.unref(u);U&&(N&&N.historyNodeNames&&N.historyNodeNames.forEach(X=>{U.setProperties(X,{state:"history"})}),N&&N.activeNodeNames&&N.activeNodeNames.forEach(X=>{U.setProperties(X,{state:"active"})}),N&&N.historyEdgeNames&&N.historyEdgeNames.forEach(X=>{const x=U.getEdgeModelById(X);x&&x.setProperties({state:"history"})}),N&&N.nodeStatus&&Object.keys(N.nodeStatus).forEach(X=>{U.setProperties(X,{status:N.nodeStatus[X]})}),N&&N.nodeApprovalComment&&Object.keys(N.nodeApprovalComment).forEach(X=>{U.setProperties(X,{approvalComment:N.nodeApprovalComment[X]})}))},F=(N,U={valueKey:"value",labelKey:"label"})=>{const X=$.unref(u);!X||!N||(Array.isArray(N)?N.forEach(x=>{X.setProperties(x[U.valueKey],{assigneeText:x[U.labelKey]})}):Object.keys(N).forEach(x=>{X.setProperties(x,{assigneeText:N[x]})}))};return $.onMounted(d),e({getGraphData:m,refreshImport:M,importJson:O,importXml:k,setHighLight:T,setAssigneeText:F,getLfInstance:()=>u.value}),{__sfc:!0,emits:t,lfElRef:i,propertSettingRef:o,dataDetailRef:a,importDataRef:s,highLightDataRef:l,lfInstance:u,currentOpId:c,props:r,initDoc:f,init:d,bindWfProps:h,initOp:v,initEvent:p,reRender:g,handlePropertyChange:y,getGraphData:m,handleImportSubmit:S,importJson:O,importXml:k,refreshImport:M,handleHighLightSubmit:A,setHighLight:T,setAssigneeText:F,PropertSetting:I5,DataDetail:PB,ImportData:kB,HighLightData:HB}}});var GB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticStyle:{height:"100%",width:"100%"}},[t("div",{ref:"lfElRef",staticClass:"m-snakerflow-designer"}),t(r.PropertSetting,{ref:"propertSettingRef",attrs:{extendAttrConfig:r.props.extendAttrConfig,extendPropertyKeys:e.extendPropertyKeys},on:{change:r.handlePropertyChange},scopedSlots:e._u([e._l(e.$slots,function(i,o){return{key:o,fn:function(a){return[e._t(o,null,null,a||{})]}}})],null,!0)}),t(r.DataDetail,{ref:"dataDetailRef"}),t(r.ImportData,{ref:"importDataRef",on:{"on-submit":r.handleImportSubmit}}),t(r.HighLightData,{ref:"highLightDataRef",on:{"on-submit":r.handleHighLightSubmit}})],1)},WB=[],UB=Vt(zB,GB,WB,!1,null,"166e8692");const Id=UB.exports;return Id.install=function(n){n.component("SnakerFlowDesigner",Id)},Id});
|
|
105
|
+
`)}),e+="</process>",r().map(p=>{const g={name:p.id,displayName:p.properties.displayName,instanceUrl:p.properties.instanceUrl,expireTime:p.properties.expireTime,instanceNoClass:p.properties.instanceNoClass,preInterceptors:p.properties.preInterceptors,postInterceptors:p.properties.postInterceptors,nodes:n.nodes.filter(y=>p.children.includes(y.id)),edges:n.edges.filter(y=>p.children.includes(y.id))};return g.nodes.forEach(y=>{n.edges.forEach(m=>{m.sourceNodeId===y.id&&g.edges.push(m)})}),g}).forEach(h=>{e+=P0(h).replace('<?xml version="1.0" encoding="UTF-8" standalone="no"?>',"")}),e):""};var F5=Object.defineProperty,$5=(n,e,t)=>e in n?F5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,D0=(n,e,t)=>$5(n,e+"",t);class R0 extends O_.model{setAttributes(){const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}D0(R0,"extendKey","CustomModel");class L0 extends O_.view{getLabelShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o}=e,a=e.getNodeStyle();return re("svg",{x:t-i/2+5,y:r-o/2+5,width:20,height:20,viewBox:"0 0 1024 1024"},re("path",{fill:a.stroke,d:"M732.8 486l201.6-191.4c40.3-40.3 40.3-105.5 0-145.8l-50.3-50.3C844.6 59 780.8 58.2 740.3 96.6l-197 187L352 79.2l-1.6-1.6c-26.2-26.4-68.8-26.7-95.2-0.5L111.5 220.8c-25.6 25.7-26.1 67.3-1.1 93.7l188.5 201.4-178.3 169.2c-14.5 13.8-24.7 31.7-29.4 51.3L61.1 865c-8.6 36.7 14.3 73.3 50.9 81.9 11.4 2.6 23.3 2.3 34.7-0.9l123.9-36.5c15.7-4.6 30-12.9 41.9-24.1l175.6-167 211.6 226.3 1.6 1.6c26.2 26.4 68.8 26.7 95.2 0.5l143.6-143.6c25.6-25.7 26.1-67.3 1.1-93.7l-208.6-223 0.2-0.5zM309.2 796.5l-93.6-93.6c-3-2.7-6.4-4.9-10.2-6.5l465.2-441.9 98 97.7c1.6 1.3 3.2 2.4 5 3.3l-464.4 441z m476.8-652c14.4-13.6 37-13.4 51 0.7l50.3 50.3c14.3 14.4 14.2 37.6-0.2 52l-0.5 0.5-66.9 63.6c-1.1-2.3-2.5-4.5-4.2-6.5l-97-97 67.5-63.6zM277.1 395.1c8.6-0.1 16.8-3.5 23-9.6l49.9-49.9c12.9-12.9 12.9-34 0-47-12.9-12.9-34-12.9-47 0l-50 49.8c-5.5 5.7-8.8 13.2-9.3 21.1L159 269c-0.6-0.6-0.6-1-0.3-1.3l143.5-143.6s0.7 0 1.3 0.5l191.6 204.7L347 469.9l-69.9-74.8zM128 881.8c-0.9 0.2-1.8-0.2-2.1-1.1-0.1-0.3-0.1-0.6 0-0.9l30.2-128.6c1-4.1 2.9-8.1 5.3-11.7 1.6 3.9 4 7.6 7.1 10.5l91.8 91.8c-2.6 1.6-5.4 2.9-8.4 3.7l-124 36.5 0.1-0.2z m621.8 17.3s-0.7 0-1.3-0.5l-130.6-139c5.5-1.4 10.5-4.1 14.6-8l49.9-49.9c12.9-12.9 12.9-34 0-47s-34-12.9-47 0l-49.9 49.9c-3.4 3.5-6 7.7-7.6 12.4l-41.4-44.4L684.6 532 893 754.6c0.6 0.6 0.6 1 0.3 1.3L749.8 899.5v-0.4z"}))}getResizeShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,radius:a}=e,s=e.getNodeStyle();return re("g",{},[re("rect",{x:t-i/2,y:r-o/2,rx:a,ry:a,width:i,height:o,...s}),this.getLabelShape()])}}D0(L0,"extendKey","CustomNode");const H5={type:"snaker:custom",view:L0,model:R0};var z5=Object.defineProperty,G5=(n,e,t)=>e in n?z5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,I0=(n,e,t)=>G5(n,e+"",t);class k0 extends zi{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]]}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}I0(k0,"extendKey","DecisionModel");class B0 extends Ui{getShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,points:a}=e,s=e.getNodeStyle();return re("g",{transform:`matrix(1 0 0 1 ${t-i/2} ${r-o/2})`},re("polygon",{...s,x:t,y:r,points:a}),re("path",{d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z",...s}))}}I0(B0,"extendKey","DecisionNode");const W5={type:"snaker:decision",view:B0,model:k0};var U5=Object.defineProperty,X5=(n,e,t)=>e in n?U5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,j0=(n,e,t)=>X5(n,e+"",t);class F0 extends ko{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]],this.r=18}getConnectedSourceRules(){const e=super.getConnectedSourceRules(),t={message:"结束节点不能作为边的起点",validate:()=>!1};return e.push(t),e}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}j0(F0,"extendKey","EndModel");class $0 extends $o{getAnchorStyle(){return{visibility:"hidden"}}getShape(){const{model:e}=this.props,t=e.getNodeStyle(),{x:r,y:i,width:o,height:a}=e,s=super.getShape();return re("g",{},s,re("svg",{x:r-o/2+10,y:i-a/2+10,width:16,height:16,viewBox:"0 0 1024 1024"},re("path",{fill:t.stroke,d:"M835.5 815.5v-607c0-11-9-20-20-20h-607c-11 0-20 9-20 20v607c0 11 9 20 20 20h607c11 0 20-9 20-20z"})))}}j0($0,"extendKey","EndView");const Y5={type:"snaker:end",view:$0,model:F0};var K5=Object.defineProperty,V5=(n,e,t)=>e in n?K5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,H0=(n,e,t)=>V5(n,e+"",t);class z0 extends zi{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]]}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}H0(z0,"extendKey","ForkModel");class G0 extends Ui{getShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,points:a}=e,s=e.getNodeStyle();return re("g",{transform:`matrix(1 0 0 1 ${t-i/2} ${r-o/2})`},re("polygon",{...s,x:t,y:r,points:a}),re("svg",{x:(i-34)/2,y:(o-32)/2,width:32,height:32,viewBox:"0 0 1024 1024"},re("path",{fill:s.stroke,d:"M768 470.058667c-11.52 0-22.613333-4.693333-30.293333-12.373334a42.496 42.496 0 0 1-0.426667-60.458666V396.8l55.296-54.954667H576.426667l-119.466667 170.24 119.893333 170.922667h216.149334l-55.68-55.381333a42.112 42.112 0 0 1 0-60.501334c16.64-17.066667 43.52-17.066667 60.586666 0l128 127.786667a42.752 42.752 0 0 1-6.997333 66.602667l-121.429333 121.216c-8.106667 7.68-19.2 12.373333-30.293334 12.373333L768 896c-11.52 0-22.613333-4.693333-30.293333-12.373333a42.496 42.496 0 0 1-0.426667-60.458667v-0.426667l54.826667-54.528H554.666667c-14.08-0.426667-27.306667-7.253333-34.986667-18.346666L384 555.264H128c-23.893333 0-42.666667-19.157333-42.666667-42.581333a42.24 42.24 0 0 1 42.666667-42.581334h254.464l136.789333-195.114666c7.68-11.52 20.906667-18.304 34.986667-18.304h238.336L737.28 201.685333v-0.426666a42.112 42.112 0 0 1 0-60.458667c16.64-17.066667 43.52-17.066667 60.586667 0l128 127.786667a41.813333 41.813333 0 0 1 11.861333 37.290666 42.752 42.752 0 0 1-17.834667 28.288l-122.453333 122.24c-8.106667 7.68-19.2 12.373333-30.293333 12.373334l0.853333 1.28z"})))}}H0(G0,"extendKey","ForkNode");const q5={type:"snaker:fork",view:G0,model:z0};var Z5=Object.defineProperty,J5=(n,e,t)=>e in n?Z5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,W0=(n,e,t)=>J5(n,e+"",t);class U0 extends zi{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.points=[[25,0],[50,25],[25,50],[0,25]]}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}W0(U0,"extendKey","JoinModel");class X0 extends Ui{getShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,points:a}=e,s=e.getNodeStyle();return re("g",{transform:`matrix(1 0 0 1 ${t-i/2} ${r-o/2})`},re("polygon",{...s,x:t,y:r,points:a}),re("svg",{x:(i-28)/2,y:(o-32)/2,width:32,height:32,viewBox:"0 0 1024 1024"},re("path",{fill:s.stroke,d:"M792.149333 554.666667h-280.448L375.893333 749.226667c-8.106667 11.093333-21.333333 17.92-34.986666 18.346666L341.333333 768H128c-23.893333 0-42.666667-19.2-42.666667-42.666667 0-23.893333 18.773333-42.666667 42.666667-42.666666h191.146667l119.296-170.922667L319.146667 341.333333H128c-23.893333 0-42.666667-19.2-42.666667-42.666666 0-23.893333 18.773333-42.666667 42.666667-42.666667h213.333333c13.653333 0 26.88 6.826667 34.986667 18.346667L512 469.333333h281.002667L737.28 413.866667v-0.426667a42.24 42.24 0 0 1 0-60.586667 42.24 42.24 0 0 1 60.586667 0l128 128c5.674667 5.546667 9.429333 12.416 11.221333 19.712a42.752 42.752 0 0 1-19.328 48.042667l-120.32 120.362667c-8.106667 7.68-19.2 12.373333-30.293333 12.373333L768 682.666667c-11.52 0-22.613333-4.693333-30.293333-12.373334a42.624 42.624 0 0 1-0.426667-60.586666v-0.426667L792.149333 554.666667z"})))}}W0(X0,"extendKey","JoinNode");const Q5={type:"snaker:join",view:X0,model:U0};var eB=Object.defineProperty,tB=(n,e,t)=>e in n?eB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Y0=(n,e,t)=>tB(n,e+"",t);class K0 extends ko{setAttributes(){var e;const t=(e=this.text)!=null?e:"";t&&typeof t=="string"&&(this.text={value:t,x:this.x,y:this.y}),this.text&&(this.text.y=this.y+40),this.r=18}getConnectedTargetRules(){const e=super.getConnectedTargetRules(),t={message:"起始节点不能作为边的终点",validate:()=>!1};return e.push(t),e}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}Y0(K0,"extendKey","StartModel");class V0 extends $o{}Y0(V0,"extendKey","StartNode");const nB={type:"snaker:start",view:V0,model:K0};var rB=Object.defineProperty,iB=(n,e,t)=>e in n?rB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q0=(n,e,t)=>iB(n,e+"",t);let Z0=class extends lu{setAttributes(){const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}};q0(Z0,"extendKey","TaskModel");let J0=class extends uu{getLabelShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o}=e,a=e.getNodeStyle();return re("svg",{x:t-i/2+5,y:r-o/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},re("path",{fill:a.stroke,d:"M860.343 764.864c-19-45.025-46.345-85.427-81.028-120.1-34.683-34.674-75.097-61.91-120.135-81.005-0.402-0.201-0.804-0.302-1.206-0.503 62.63-45.226 103.346-118.894 103.346-202.01C761.32 223.558 649.73 112 512.002 112S262.684 223.558 262.684 361.246c0 83.116 40.715 156.784 103.346 202.11-0.402 0.202-0.804 0.302-1.206 0.503-45.038 18.995-85.452 46.231-120.135 81.005-34.683 34.674-61.927 75.076-81.028 120.1-18.7 44.02-28.652 90.755-29.659 138.795-0.099 4.522 3.52 8.241 8.045 8.241h60.318a8.025 8.025 0 0 0 8.043-7.84c2.01-77.587 33.175-150.25 88.266-205.326 57.002-56.985 132.702-88.342 213.328-88.342s156.326 31.357 213.328 88.342c55.09 55.076 86.255 127.739 88.266 205.327 0.1 4.422 3.62 7.839 8.043 7.839h60.318c4.524 0 8.143-3.719 8.045-8.241-1.007-48.04-10.96-94.774-29.659-138.895z m-348.45-230.753c-46.13 0-89.547-17.99-122.21-50.654-32.664-32.663-50.654-76.08-50.654-122.21 0-46.131 17.99-89.549 50.653-122.212 32.664-32.663 76.08-50.653 122.211-50.653s89.548 17.99 122.212 50.653c32.663 32.663 50.653 76.08 50.653 122.211 0 46.13-17.99 89.548-50.653 122.211-32.664 32.664-76.08 50.654-122.212 50.654z"}))}getResizeShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,radius:a}=e,s=e.getNodeStyle();return re("g",{},[re("rect",{...s,x:t-i/2,y:r-o/2,rx:a,ry:a,width:i,height:o}),this.getLabelShape()])}};q0(J0,"extendKey","TaskNode");const oB={type:"snaker:task",view:J0,model:Z0},aB=$.defineComponent({__name:"VueNode",emits:["helpClick"],setup(n,{expose:e,emit:t}){$.useCssVars((c,f)=>({"03d150e3":f.cardHeaderBgColor,"3d585768":f.cardHeaderColor}));const r=$.ref({text:{value:""},properties:{},model:{},wfConfig:{},viewer:!1,showHelp:!1}),i=$.computed(()=>{var c,f;if(((c=r.value.properties)==null?void 0:c.state)==="active")return r.value.wfConfig.activeColor||Ln.activeColor;if(((f=r.value.properties)==null?void 0:f.state)==="history"){const d=r.value.properties.status;return d==="WITHDRAW"?r.value.wfConfig.rollbackColor||Ln.rollbackColor:d==="REJECT"?r.value.wfConfig.rejectColor||Ln.rejectColor:r.value.wfConfig.historyColor||Ln.historyColor}return Ln.primaryColor}),o=$.computed(()=>{var c,f;return(f=(c=r.value.properties)==null?void 0:c.approvalComment)!=null?f:[]}),a=$.ref("#ffffff"),s=$.computed(()=>r.value.viewer&&r.value.showHelp!==!1),l=c=>{c.stopPropagation(),t("helpClick",{e:c,type:"QuestionFilled",data:r.value.model})},u=c=>{c.arrowClick=!0};return e({setConfig:c=>{r.value=c}}),{__sfc:!0,config:r,emits:t,cardHeaderBgColor:i,approvalComment:o,cardHeaderColor:a,showHelp:s,handleClick:l,handleArrowRightIconClick:u}}});var sB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-card",{staticStyle:{height:"calc(100% - 2px)"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"card-header"},[t("div",{staticClass:"card-header-title",attrs:{span:r.showHelp?20:24}},[t("el-tooltip",{attrs:{effect:"light",disabled:r.approvalComment.length===0},scopedSlots:e._u([{key:"content",fn:function(){return[r.approvalComment.length>0?t("div",[t("el-timeline",e._l(r.approvalComment,function(i,o){return t("el-timeline-item",{key:o,attrs:{hollow:"",placement:"top",type:"primary",timestamp:i.finishTime}},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[e._v(" "+e._s(i.realName)+":"),t("span",[e._v(e._s(i.comment)+" ")])])])}),1)],1):e._e()]},proxy:!0}])},[t("span",[e._v(e._s(r.config.text.value))])])],1),r.showHelp?t("div",{staticClass:"card-header-icon",attrs:{span:4}},[t("i",{staticClass:"el-icon-question",staticStyle:{float:"right",cursor:"pointer"},on:{click:r.handleClick}})]):e._e()])]},proxy:!0}])},[t("div",{staticClass:"container"},[t("div",{staticClass:"content-column"},[e._v(" 参与人:"),t("a",{attrs:{href:"javascript:;",title:r.config.properties.assigneeText||r.config.properties.assignee},on:{click:r.handleArrowRightIconClick}},[e._v(e._s(r.config.properties.assigneeText||r.config.properties.assignee))])]),r.config.viewer?e._e():t("div",{staticClass:"icon-column",on:{click:r.handleArrowRightIconClick}},[t("i",{staticClass:"el-icon-arrow-right",staticStyle:{cursor:"pointer"}})])])])},lB=[],uB=Vt(aB,sB,lB,!1,null,"911de5c0");const cB=uB.exports;var fB=Object.defineProperty,dB=(n,e,t)=>e in n?fB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ld=(n,e,t)=>dB(n,typeof e!="symbol"?e+"":e,t);class hB extends l6{setAttributes(){this.text.editable=!1;const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}}class pB extends u6{constructor(e){super(e),Ld(this,"app"),Ld(this,"isMounted"),Ld(this,"r");const{properties:t,text:r}=e.model;let i;e.graphModel.wfProps.taskNodeRender&&typeof e.graphModel.wfProps.taskNodeRender=="function"?i=()=>$.h(e.graphModel.wfProps.taskNodeRender(e)):i=()=>$.h(cB,{on:{helpClick:o=>{e.graphModel.eventCenter.emit("custom:helpClick",o)}}}),this.app=new $({render:()=>i()}),$.nextTick(()=>{var o;this.app.$children[0].setConfig({properties:t,text:r,wfConfig:e.graphModel.wfProps.wfConfig,viewer:e.graphModel.wfProps.viewer,helpClick:e.graphModel.wfProps.helpClick,showHelp:(o=e.graphModel.wfProps.wfConfig)==null?void 0:o.showHelp,model:e.model})}),this.isMounted=!1}shouldUpdate(){const e={...this.props.model.getProperties(),id:this.props.model.id,__textValue__:this.props.model.text.value};return this.preProperties&&this.preProperties===JSON.stringify(e)?!1:(this.preProperties=JSON.stringify(e),!0)}setHtml(e){if(this.isMounted)$.nextTick(()=>{var t;this.app.$children[0].setConfig({properties:this.props.model.getProperties(),text:this.props.model.text,wfConfig:this.props.graphModel.wfProps.wfConfig,viewer:this.props.graphModel.wfProps.viewer,helpClick:this.props.graphModel.wfProps.helpClick,showHelp:(t=this.props.graphModel.wfProps.wfConfig)==null?void 0:t.showHelp,model:this.props.model})});else{this.isMounted=!0;const t=document.createElement("div");t.style.width="100%",t.style.height="100%",e.appendChild(t),this.app.$mount(t)}}getShape(){const{model:{isSelected:e},graphModel:t}=this.props,r=t.wfProps.viewer;return re("g",{},[this.getResizeShape(),e&&!r?this.getControlGroup():""])}getText(){return null}}const vB={type:"snaker:task",view:pB,model:hB};var gB=Object.defineProperty,yB=(n,e,t)=>e in n?gB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Q0=(n,e,t)=>yB(n,e+"",t);class eb extends Io{getEdgeStyle(){const e=super.getEdgeStyle();return k5(this,e)}}Q0(eb,"extendKey","TransitionModel");class tb extends Ho{}Q0(tb,"extendKey","TransitionEdge");const mB={type:"snaker:transition",view:tb,model:eb};class _B extends D_{}class bB extends P_{initNodeData(e){super.initNodeData(e),this.isRestrict=!0,this.resizable=!0,this.foldable=!1,this.width=500,this.height=300,this.foldedWidth=100,this.foldedHeight=50}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}const xB={type:"snaker:subProcess",view:_B,model:bB};var EB=Object.defineProperty,wB=(n,e,t)=>e in n?EB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,nb=(n,e,t)=>wB(n,e+"",t);class rb extends lu{setAttributes(){const{properties:e}=this;e&&(this.width=e.width?e.width:120,this.height=e.height?e.height:80)}getNodeStyle(){const e=super.getNodeStyle();return Jr(this,e)}}nb(rb,"extendKey","WfSubProcess");class ib extends uu{getLabelShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o}=e,a=e.getNodeStyle();return re("svg",{x:t-i/2+5,y:r-o/2+5,width:25,height:25,viewBox:"0 0 1024 1024"},[re("path",{fill:a.stroke,d:"M960 224v576H64V224h896z m-32 32H96v512h832V256z"}),re("path",{fill:a.stroke,d:"M224 224v576H64V224h160zM192 256H96v512h96V256zM960 224v576h-160V224h160z m-32 32h-96v512h96V256z"})])}getResizeShape(){const{model:e}=this.props,{x:t,y:r,width:i,height:o,radius:a}=e,s=e.getNodeStyle();return re("g",{},[re("rect",{...s,x:t-i/2,y:r-o/2,rx:a,ry:a,width:i,height:o}),re("rect",{...s,x:t-i/2,y:r-o/2,width:6,height:o}),re("rect",{...s,x:t+i/2-6,y:r-o/2,width:6,height:o})])}}nb(ib,"extendKey","WfSubProcessNode");const AB={type:"snaker:wfSubProcess",view:ib,model:rb};var SB=Object.defineProperty,CB=(n,e,t)=>e in n?SB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ob=(n,e,t)=>CB(n,e+"",t);class ab{constructor({lf:e,props:t}){e.register(H5),e.register(W5),e.register(Y5),e.register(q5),e.register(Q5),e.register(nB),t.nodeRenderType==="html"?e.register(vB):e.register(oB),e.register(mB),e.register(xB),e.register(AB)}}ob(ab,"pluginName","snakerFlowElement");class sb{constructor({lf:e}){e.adapterIn=t=>(typeof t=="string"&&(t=T0(t)),t=t.json?t.json:t,t.nodes&&t.nodes.forEach(r=>{typeof r.properties.field=="object"&&(r.properties.field=JSON.stringify(r.properties.field))}),e.graphModel.name=t.name,e.graphModel.displayName=t.displayName,e.graphModel.expireTime=t.expireTime,e.graphModel.instanceUrl=t.instanceUrl,e.graphModel.instanceNoClass=t.instanceNoClass,e.graphModel.preInterceptors=t.preInterceptors,e.graphModel.postInterceptors=t.postInterceptors,t),e.adapterOut=t=>{const r={name:e.graphModel.name,displayName:e.graphModel.displayName,expireTime:e.graphModel.expireTime,instanceUrl:e.graphModel.instanceUrl,instanceNoClass:e.graphModel.instanceNoClass,preInterceptors:e.graphModel.preInterceptors,postInterceptors:e.graphModel.postInterceptors,...t};Object.keys(r).forEach(o=>{r[o]===void 0&&delete r[o]}),r.nodes.forEach(o=>{o.type==="snaker:task"&&o.properties.field&&(o.properties.field=JSON.parse(o.properties.field))});const i=P0(r);return{json:r,xml:i}}}}ob(sb,"pluginName","snakerFlowAdapter");const OB=$.defineComponent({__name:"DataDetail",setup(n,{expose:e}){const t=$.ref(!1),r=$.ref("json"),i=$.ref({}),o=$.ref(null),a=$.computed(()=>{var f;return(f=$.unref(i))==null?void 0:f.xml}),s=$.computed(()=>{var f;return JSON.stringify((f=$.unref(i))==null?void 0:f.json,null,2)}),l=f=>{t.value=!0,i.value=f},u=()=>{const f=document.querySelectorAll(".m-flow-btn-copy");o.value=new db(f,{container:document.querySelector(".m-dialog-data-detail")}),o.value.on("success",function(d){Ir.Message.success("复制成功"),d.clearSelection()}),o.value.on("error",function(){Ir.Message.error("复制失败")})},c=()=>{o.value&&o.value.destroy()};return $.onBeforeUnmount(()=>{o.value&&o.value.destroy()}),e({show:l}),{__sfc:!0,dialogVisible:t,activeName:r,graphData:i,clipboard:o,xml:a,copyJsonContent:s,show:l,handleOpened:u,handleClose:c,VueJsonPretty:fb}}});var NB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{staticClass:"m-dialog-data-detail",attrs:{title:"查看流程数据",width:"60%","append-to-body":!0},on:{opened:r.handleOpened,close:r.handleClose},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{staticClass:"m-flow-btn-copy",attrs:{type:"primary","data-clipboard-text":r.copyJsonContent}},[e._v("复制JSON")]),t("el-button",{staticClass:"m-flow-btn-copy",attrs:{type:"primary","data-clipboard-text":r.xml}},[e._v("复制XML")])]},proxy:!0}]),model:{value:r.dialogVisible,callback:function(i){r.dialogVisible=i},expression:"dialogVisible"}},[t("div",{staticStyle:{height:"60vh","overflow-y":"scroll"}},[t("el-tabs",{model:{value:r.activeName,callback:function(i){r.activeName=i},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:"json",name:"json"}},[t(r.VueJsonPretty,{attrs:{data:r.graphData.json}})],1),t("el-tab-pane",{attrs:{label:"xml",name:"xml"}},[t("pre",{staticStyle:{"text-align":"left"}},[e._v(e._s(r.xml))])])],1)],1)])},MB=[],TB=Vt(OB,NB,MB,!1,null,null);const PB=TB.exports,DB=$.defineComponent({__name:"ImportData",emits:["on-submit"],setup(n,{expose:e,emit:t}){const r=$.ref(!1),i=$.ref(""),o=()=>{r.value=!0},a=$.ref(1),s=$.computed(()=>{const h=[];return a.value>0&&Object.keys(window.localStorage).forEach(v=>{if(v.startsWith("LFDATA###")){const p=v.split("###");h.push({value:v,label:p[2]})}}),h}),l=()=>{$.unref(i)?(t("on-submit",$.unref(i)),r.value=!1):Ir.Message.error("导入数据不能为空")},u=h=>{i.value=window.localStorage.getItem(h)||""},c=h=>{window.localStorage.removeItem(h),a.value++},f=()=>{r.value=!1,i.value=""},d=()=>{a.value++};return e({show:o,refresh:d}),{__sfc:!0,dialogVisible:r,graphJsonStr:i,emits:t,show:o,refreshFlag:a,localStorageLfData:s,handleSubmit:l,handleCommand:u,handleRemove:c,handleClose:f,refresh:d}}});var RB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{staticClass:"m-dialog-import-data",attrs:{title:"导入流程数据(同时支持xml/json)",width:"60%","append-to-body":!0},on:{close:r.handleClose},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:r.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:r.handleSubmit}},[e._v("确 定")]),r.localStorageLfData.length?t("el-dropdown",{staticStyle:{float:"left"},attrs:{placement:"top",trigger:"click"},on:{command:r.handleCommand},scopedSlots:e._u([{key:"dropdown",fn:function(){return[t("el-dropdown-menu",e._l(r.localStorageLfData,function(i){return t("el-dropdown-item",{key:i.value,attrs:{command:i.value}},[e._v(" "+e._s(i.label)+" "),t("i",{staticClass:"el-icon-delete-solid",on:{click:function(o){return r.handleRemove(i.value)}}})])}),1)]},proxy:!0}],null,!1,1997195200)},[t("el-button",{attrs:{link:"",type:"primary"}},[e._v("选择"),t("i",{staticClass:"el-icon--right el-icon-arrow-down"})])],1):e._e()]},proxy:!0}]),model:{value:r.dialogVisible,callback:function(i){r.dialogVisible=i},expression:"dialogVisible"}},[t("div",{staticStyle:{height:"440px","overflow-y":"scroll"}},[t("el-input",{attrs:{rows:20,type:"textarea"},model:{value:r.graphJsonStr,callback:function(i){r.graphJsonStr=i},expression:"graphJsonStr"}})],1)])},LB=[],IB=Vt(DB,RB,LB,!1,null,null);const kB=IB.exports,BB=$.defineComponent({__name:"HighLightData",emits:["on-submit"],setup(n,{expose:e,emit:t}){const r=$.ref(!1),i=$.ref(""),o=()=>{r.value=!0},a=()=>{$.unref(i)?(t("on-submit",$.unref(i)),r.value=!1):Ir.Message.error("导入数据不能为空")},s=()=>{r.value=!1,i.value=""};return e({show:o}),{__sfc:!0,dialogVisible:r,highLightStr:i,emits:t,show:o,handleSubmit:a,handleClose:s}}});var jB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("el-dialog",{staticClass:"m-dialog-high-light-data",attrs:{title:"导入高亮数据(json)",width:"60%","append-to-body":!0},on:{close:r.handleClose},scopedSlots:e._u([{key:"footer",fn:function(){return[t("el-button",{on:{click:r.handleClose}},[e._v("取 消")]),t("el-button",{attrs:{type:"primary"},on:{click:r.handleSubmit}},[e._v("确 定")])]},proxy:!0}]),model:{value:r.dialogVisible,callback:function(i){r.dialogVisible=i},expression:"dialogVisible"}},[t("div",{staticStyle:{height:"440px","overflow-y":"scroll"}},[t("el-input",{attrs:{rows:20,type:"textarea"},model:{value:r.highLightStr,callback:function(i){r.highLightStr=i},expression:"highLightStr"}})],1)])},FB=[],$B=Vt(BB,jB,FB,!1,null,null);const HB=$B.exports,lb=[{type:"snaker:start",text:"开始",label:"开始节点",properties:{},sort:10,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA2tJREFUWEfNlztsHFUUQM8df+JIBBnvLAkIUQCCCu8oSCCHwiYp+BQICjsgKBCK4kmc8JEwyDSYBisxEt8k4ygFBQgSFyAKDEWCXRALJKK3ThUJUkQRn8ysiQAJE3vnotldW7vr/cwmWS0jTTPvvvvOe+/OvDNCiy9p8fjEBnhgf+bGpWX6RLQfpR/YXLijOfyeu4U5VZnr6mD++w8Sf8aZXCwAZzjYi/AacHucpMAFlANmyj5cL74mwMC4tl/+LfgS5NF8IvVBpkGnKyeWQdBBkGQhfqZ7i/347LisVAOpCpByM0OCHs93lCtI+H64bL23cCxxsdasendlbrM6whdR6wXQzhw2sjPtJU5U6lcRoNcNtltwstBhPgx138LR5Jl6y1nc3rvb32pZ8iHQFz0PYceCZ58qz7EeYPBEm5PYXlgyfdN4yfFGBi6PdVx/HOSN6LnJnGpneihbHLMOwBnOHER0VNHP0l7y6WsZfLVvyvU/FeQpVCbNVOLVqgAp99KQYB2P9jwMw75Gl70abH47rPmoJpRwZ9q7ea0e1lbAee6PbrrCH0HvQPRtcyQ5ej1mv5rD2eNPovIKyHmWrPvMRzddzpX3WsDu4AksPgcWwxVJ1av2RuFyb0e7poEeQp40R+0vSgGGM+8g+hLwifHsZxsdIE684wYfA8+g8q6ZSrxcCuAG3wHbQB8yXnI2TsJGYxzXHwD5FjhtPPvBcoCfgDubCZAa8e+WrJwDfjaefVc5wF/ADc0EuOd5f9PGTokOqb+NZ2/63wG0fAtaXIR7grdQxoDDxrNHGq3wOPGOGxwCIreYMEfs10tqIOVmHhb06+jMD1esrc35EIVnIldQ5JG0l/imBCBSrn+X9WzOepr6KebChg65d1XZSk7DgnodauZhhDJSrGrrj2PX/6qgYPPGs7fF2dt6MY4bnM6Lic4YL/lYTR/Ie2BmOR90fYWke0uio9wPKypZsQ9GYqIhk426QeQAYjGaE5EaXlhVSku98NqktJoPlrwFFfcx8sOeHRORohXaF4EZ0GPaxi9L//Br9LxrI7dIlltBdgGRwvfkd1AmzeLJsXIPrFkDlUDyqtY2kbOlWJecV7JjxepVrVusP6Ooc07ZOrMDiPQjen/FXzOVH1Cd40rb7Kpy1eONDVAv0dW2txzgP8G/iTC6ltECAAAAAElFTkSuQmCC"},{type:"snaker:task",text:"用户任务",label:"用户任务",properties:{},sort:20,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA29JREFUWEftll1oFFcUx/9nkkViCxUzg9HQh6YN+AHZ2aY+pH21QkuTNoWIGpU+xGRW00KkQjUtRtRaaEmgTbs3aR6KXxEFPxJRsL62eYjp3hWqQvx4KNqUmUgLNaFsMkdmd5Msm83e2exDEDovy+499/x/87/nnLuEJX5oifXxfAIELaecwJVERWs9B5mn7zJoNCb0R/k6mrcDQcvuJ9DWbEIMPhsTxrZ8IHwDhFr+qmEqugFguUJggnh6U7Rn1ZAfEF8ANW1/lExOlkykJfxJI+6OI/DA+y2AeIXL1Argo5mYkpLJ5UNdL0+qIHwBmJb9I0BNifMGPowJ/WK2xEHLqSfgQnKN+6QwdhcMYDY7H0BDQpBB+2KitCtX0qA13kbgzkSMi3rZq1/KFa90wAw7B8E4BsJjGdHLVW/krZth5xEYa0BolxH9y4IAgpZzgoCdRBiMRvQ6PwChsDPAjFoGTsaEvqswgBZ7gIhqAe6SwtjnB8C07E6A2ph5MNZj5IRWH4HltAM4CtCQFKVv+gMY/xXgGgCfS6EfK8wB68l7BHcwWYRabUysvJK7CPOLVzpQ1TT2ilZcnOh3P4U4W4BeE0xNVdzqK3tYkAOJqrbsDoAOpRJFi9zihpHeFffTE1c3//3qtDZ1HkAoNQcOS2F0qI5M6cBMggwIbyqeA9EvyZnDbwHYMjem2Zd40tQ8ngyIBXb6F/cNUPXp2Avav4GfU5XtA5mG3Bfjb9/6puypKljpQChs1zHT5dlEjOsgDIMxTAEeTpxAnDaCsBEM73PzTCwRvx+NGAOLLkIzbDeDqSdVVP+B8IWMGF/nSmiG7f1gHAFoWbJzuEVGjN6F9izowOt7/nnNdeOjKfF+KYztKjvT103LPgNQ4s+JpgUqf/vhpXvZ9i8IYFrOTQDVAF2TovTdfMTnOmf8KsDvABiRQn/DN0CwxfmWCB97G4pcXjPSa/y5GIDqZnv1tEaPk52K72I9+ieZeeY5kDH5WmVE/34x4rMuhJ29YHR737NNxnkAwbTZ72eUquDSXyjbXTIPIGQ5nzFwHMAdKfT1KgE/66bl3AawjoADUaF/lb5nHoBpOacANAJ8Rgqj0Y+AKsa07NMAeV10Wgp9hwLAu3i8/tV+l5FS73Ip+DHD4w1gd4OXKPOCUk7CgtUVCf4HeAbMRkMwjKRR9AAAAABJRU5ErkJggg=="},{type:"snaker:custom",text:"自定义任务",label:"自定义任务",properties:{},sort:30,icon:"data:image/png;base64,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"},{type:"snaker:decision",label:"条件判断",properties:{},sort:40,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA7NJREFUWEetlt+PE1UUx7/nDhUxEmDbKWgiipFIWIFZMZoYY4SQSGLkgd3OLvGFSLJtV/0bxL8B7Y9NIDxotrRbEk00PhB/8KAxETq7yxqJhB8xgnRacEMiq93eY6ZJh2l3fhb71GTmnM/nnnPuvUMY8DeSbu5kgXK7zWML04lfB0wDGiSwC7diWbIkyFGjmPxtkFyRBZxwktCZ5Fkw7reFHF3Ib74aVSKSQD+8Voz/8mL29m7JogrQEinKaO2TTTeiSIQWcIN3QXsy9RFiqoLIXBE0dikX/z2sRCgBP3gXNJI2X2KiKoA/aA2P1T5Wb4aRCBQIA++Cdk82XhECVTBfaymcWswl/wyS8BWIAu+CtKnmqyy5SsBlirVStRNPmH4SngKDwB+0o/46E80SaOHfViy1eHLDHS8JV4GHgduDOWXuI0mzAC5gWdGN05v+cpNYJeAH1zLmO0ZB/cwtUSeOpG4U1ON2JbKNA8yYZaIfl/+R+uVT6r3+2B6BIDhAnwL8kRNiJbTjmIeFiG2/mNtwxR7MdP2gIFEB0fdKe0i/ME1/OyVsgTBl1zLmcYA+dEo44SDSjXy80r9KLWu+BaYKE84t3b+nXz+9bbn7TkcgDNyecocEsShbFxKYh73gD9phHmKmChhfKRy3KtGynlEU+CoJosUwcHsw043DRCgz4/O5O9/oqOht0rLNSx0TCd0624MOjv6eA6gYhYQeJs56R8s2U2Aud+No12RjhyCUifgRQVK/mN8875esp+eA1e9UWIl+eGfhHat0fTtAZRAeZ7A+V0jWPLdaX8+1TMNaTaCEG9wWsP7syt5+VmHFGqghgtUO9WenhN+0B0l4wXsEOr197+7T3G5bK9oiJfT56cRPLoPnvtXsSvA+o6B+Z8f19dz3ILIevjDVfGqN5DMAtkKQbuTiP9hbKd3c6TeoWsZ8Iwp8VQVs0Pvmk9zCGSZ6TrAcrxWT58NOediV9xxEbsmHp+pbYlKUALa+fsfncuq3YSX8eh7Ygp7B++CWilasxIBGhPFaPnEuSCIK3LMFTsjwsaWhWKxVAvCyZDkxX0x+7SURFR5KoHNOHL27kdfJGWJ+DcQTRl79sl9iEHhoAevF5981169bK2bAvJ+IJ2p59YuoA+dWucCPUmfQ3kl+bEVplojxJjOOzBUTZwddeeAu8OrzM0evPbpx7foZEN4G0RHnxRI0oA9dgW6CvZMcW6FmiQiHw15EXnKRWtCTJFVWtPj+mShX8f9WgUFK7RXzHy52Nj+qKwLIAAAAAElFTkSuQmCC"},{type:"snaker:fork",label:"分支",properties:{},sort:50,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAbBJREFUWEftlj1Lw1AUht9ToWOXNvoHnCxoWgrq2N3Fwc5uTRXBSXDrpIODk7RZdK+LDq7i5KBoI1hB/AlNBBGRUpsjiS20MW1vE8NdvOs9974P55sg+ZBkffwDROaBxS0r0WrzOYAmMZXrevLJL9yRAWRLr/M22w+uKFGDbBT8ICIDcHRVzawBWBsFESmACERoAFUzTwCsC5czUeOzZS8/HyvvbnSEH/oYqiVrG8yHk//BeaOqXIUCWNi00tThxz5x90PfQ6SAOd29OzWqqULPLrAH1JJ5CUb+J8F4x6goB17xTNGa4xhqw8QDe0Atmrsg7LmCjDNDT616xd0+8IXrUeKBADLFZo6JbruCnfhUfObmKGF5AQb6ADDg9n7bgRC4LiN7elRSMWifgKWu61eMinIxzF7VmmUQPvzC8ysHshtvs7bdfhHNaALp9WpSE7Ufmp+9C+kADojUEIi6MtIkFIWQWoY9SKmNyIGQ3oodiKDDKEacu68od4E6oTdPJh7HTIahJzOhh5Fwwo7ZigJPQxEAqSuZ9KVU+louEqI/qQJRobHTMOxHQd9HWgUiUN/g2P0hyk6c4AAAAABJRU5ErkJggg=="},{type:"snaker:join",label:"合并",properties:{},sort:60,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAWRJREFUWEdjZBhgwDjA9jOMOmA0BEZDAB4C5rlv+X7+/r+RgYHBAU/WnHZhhkg2NbMu3AFGme/0/v3/d5Gg4YyMhRemC08gqI5IBShpwCDjdQMDA6M9Dr3wkPnPzKhzcarwVUJ2GKa/1WL6/+fn2Vnid3GpJToRGmS8qWZgYGgBG8TIsP/CdBEnfA4wyvqo8u/f79sQNf8bL8wQbcCmnmgHgDTrZ7zZw8jA4Awxk6HqwkyRdlyOME57qfyXifkOQh67I0hygE7+F3GWnz+eMTAwMIED4v9/0/MzRc/gcgQ0SuvxOYIkB4AMMsh4Hc3AwLgEEggMJxgZ/lcSSAsOQKfidATJDgA7Iv3NPAZGhkRCiRCn/N9/hhdmi12AJCcyAMUOYPjveGGG6AGyHEB6FDDZAyMLKQegJkaSQmDAE+GAZkO6FEQDWhQPeGU04NUxGcUBVbSQlA2pYiOaIaMOGA2B0RAAACkksCEHSvE2AAAAAElFTkSuQmCC"},{type:"snaker:end",text:"结束",label:"结束节点",properties:{},sort:70,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA0hJREFUWEfNl01oE1EQx//zNoI3tdlQEAQvWhFJ04L01B5U/DgIiiIiBUWo3fhBi0gPehAPeigiLX5ka0EUiogoFjz4QfXQnorQboOItRdBEEo2VW+C2R15m27YJLubxEZjTkt23pv/zsyb+T1Cg39Ui/94MtMiGF0MsY2I14KxxllP+MFM3wn2e5swmU7F5qvdtyoBbcmlfcy8h8BbqtmYQR+J6NVsqulFJftQAXHN3KEABwFscjdi8AdmmhFCZC3LXpL/K4posm07SsTtBNrqcbpgAc/Suvo2SEiggNZes1sQuuVCBn4CGKcIv569Ffsa9lVtZzPrOUe7ARwgYLW0tRljcyPqmN86XwFFzgmTYOWhoa/7XCmc3vcJ7dtGkHWMGF1hIsoEtCeXOpntS86XEyaNlHqtFseltomkedEVQSSuzqSaprw2RQK8zsPCVqsgb0RLRRQJaNPMm7LgmHnCGIldr9VRmH2iN3OBiHYBWJjV1XOubUGAPGpguy9fcEp/rTmvJNapCVhDTmGSGHaPaEFAq5YdFuAWBh4Zunq/0oZ/8j6hmScIOGqD5uf0aF++hwFoTy7GmZVB+RwR1PPuTvSLnwOZSwLHw5wzKB105Lafzm7I2TzqOCZrYCbVnHYEJJLmGWLsL81PWUX3ZgaJKFwAc9oYiQ0EiSzUGeG5kVJvOwLc8Feq/EQdBLgnwk2DG4EHxGj2FoffF9RDQKHYCYtGSj2eF6CZ47I6LRuX03fV6aDw1UNA/JTZoQhckafN0FXZrv8HAUmzsSlofBFqmR4CHZKz3tBj5/9mDSS0zA3JDAx+auixUacGJGopTMOO4wifDJr5K21EkhWQo3vSjUXcJ9Gt0IoTWnZIIte/aMUS2Qw92l9oxfKh4cPIEeGO4zqASAiY+I9jpxbyEOr08XrQkCvCS0UWMOiF1DIk89JLpdlQzUiutF9lKGWeAEWe1AooDoBw7vAyBQWScSCWF8HpMpavEvQmiBXcaMiZ/8vmnV4s94PRMiTzC+eyiCPei4lkBpsx7XcxEYSOUlsi8biUhL2+qr6a2cx7JbJVk3c56wXRyxVfzUqdSXSzoXQy02bfyynxJwFrSqJWNUKLGlG1C+pt9xuNFQ0/HWACVgAAAABJRU5ErkJggg=="},{type:"snaker:wfSubProcess",text:"snaker子流程",label:"snaker子流程",properties:{},sort:80,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAGRJREFUWEdjZBhgwDjA9jOMOmA0BAZPCBhkvPlPzxxxYYYI2PPwEAA5ACYIkkDnU+I4fGaPOmA0BEZDYDQERkNgNARGQ2BwhQAldT6pejEaJKQaQC31g6dNSC0fkWrOaAiMhgAA/IAIMC/mUMgAAAAASUVORK5CYII="},{type:"snaker:subProcess",text:"",label:"子流程",sort:90,properties:{},icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAURJREFUWEftVtFRwzAMlWZoskTph5mAdghYAXMMQToEh1mBDkE6Af5ou0TSGURMk14a5EqUy7Uc8a+fpecn6dkIZ16ozX99vx0T0rMGj4SPH6+jjQqrAQWMscUUAN91eJp5l+YarFqBDoFY8Okuae8Evic4JDgQGBToXQE49xRIE96DAhEnrOf+UJFenLB751PnvhtH7YT/j4CxZXh4mhpLXSft594lMw4ULcElEcir120pXZHfx5taxV8pED0skWqp+AcIGFtk1Y8nSNZeoQm7tlt4l9xxtze2fAOAVI5BS+/SLOD2TfiTpvMuYZvX2JKkstT7+5JwBI795b7GUkFAinGcADezdYmedARo3kjcVoRrSlaBgcCgQNx6Ud2EWmu+KB8ILnYrGgni2r+MJqwTPmxXQHQlxgBYNG568o9IkUQF+QTaiEcwvdLyewAAAABJRU5ErkJggg=="}],zB=$.defineComponent({__name:"SnakerFlowDesigner",props:{value:{type:[Object,String]},config:{type:Object,default(){return{grid:!0}}},highLight:{type:Object,default(){return{}}},assigneeText:{type:[Object,Array],default(){return{}}},viewer:{type:Boolean,default:!1},extendAttrConfig:{type:Object},showDoc:{type:Boolean,default:!0},extendPropertyKeys:{type:Array},wfConfig:{type:Object,default(){return{}}},nodeRenderType:{type:String,default:"svg"},taskNodeRender:{type:Function}},emits:["input","on-save","on-init"],setup(n,{expose:e,emit:t}){const r=n,i=$.ref(null),o=$.ref(null),a=$.ref(null),s=$.ref(null),l=$.ref(null),u=$.ref(null),c=$.ref("");$.watch(()=>r.value,()=>{g(r.value)},{deep:!0}),$.watch(()=>r.highLight,()=>{T(r.highLight)},{deep:!0}),$.watch(()=>r.assigneeText,()=>{F(r.assigneeText)},{deep:!0});const f=()=>{const N=$.unref(u);N&&r.showDoc&&N.extension.control.addItem({iconClass:"lf-control-mayu",title:"",text:"码云",onClick:()=>{window.location.href="https://gitee.com/mldong/snakerflow-designer-vue/tree/vue3/"}})},d=()=>{console.info(`Vue:${$.version}`),console.info(`element-plus:${Ir.version}`),Vr.use(i4),Vr.use(f4),Vr.use(d4),Vr.use(c4),Vr.use(s4),Vr.use(ab,r),Vr.use(sb,r),Vr.use(p6);const N={};r.viewer&&(N.adjustEdge=!1,N.adjustNodePosition=!1,N.stopScrollGraph=!0,N.stopMoveGraph=!0,N.hoverOutline=!1,N.hideAnchors=!0,N.adjustNodePosition=!1,N.stopMoveGraph=!1,N.nodeTextEdit=!1,N.edgeTextEdit=!1,N.resizeNode=!1,N.nodeSelectedOutline=!1),u.value=new Vr({container:$.unref(i),grid:!0,...r.config,...N,background:r.config.background||{backgroundColor:Ln.backgroundColor}}),t("on-init",u.value),h(),v(),g(r.value),p()},h=()=>{const N=$.unref(u);N&&(N.graphModel.wfProps=r)},v=()=>{var N;const U=$.unref(u);if(!U)return;if(r.viewer){U.extension.menu.setMenuConfig({nodeMenu:[],edgeMenu:[]}),U.extension.control.removeItem("undo"),U.extension.control.removeItem("redo"),f();return}U.extension.menu.setMenuConfig({nodeMenu:[{text:"删除",callback(x){U.deleteNode(x.id)}}]}),U.extension.control.addItem({iconClass:"lf-control-clear",title:"clear",text:"清空",onClick:()=>{U.clearData()}}),U.extension.control.addItem({iconClass:"lf-control-see",title:"",text:"查看",onClick:()=>{const x=$.unref(a);if(!x)return;const P=m();x.show(P)}}),U.extension.control.addItem({iconClass:"lf-control-import",title:"",text:"导入",onClick:()=>{$.unref(s).show()}}),U.extension.control.addItem({iconClass:"lf-control-setting",title:"",text:"设置高亮",onClick:()=>{$.unref(l).show()}}),U.extension.control.addItem({iconClass:"lf-control-save",title:"",text:"保存",onClick:()=>{t("on-save",m())}}),f(),U.setDefaultEdgeType("snaker:transition");const X=()=>(Object.keys(r.wfConfig).forEach(x=>{x in jt&&Object.keys(r.wfConfig[x]).forEach(P=>{["type","text","icon","label","className","properties","callback","sort"].includes(P)&&lb.forEach(R=>{R.type===`snaker:${x}`&&(P==="properties"?R[P]={...R[P],...r.wfConfig[x][P]}:R[P]=r.wfConfig[x][P])})})}),lb.filter(x=>{const P=r.wfConfig[x.type.replace("snaker:","")];return(P==null?void 0:P.hide)!==!0}));U.extension.dndPanel.setPatternItems([...X(),...((N=r.wfConfig)==null?void 0:N.extendDndPanel)||[]].sort((x,P)=>(x.sort||99)-(P.sort||99)))},p=()=>{const N=$.unref(u);if(!N)return;const U=N.graphModel.eventCenter;r.nodeRenderType==="html"&&r.wfConfig.helpClick&&typeof r.wfConfig.helpClick&&U.on("custom:helpClick",r.wfConfig.helpClick),!r.viewer&&(U.on("blank:contextmenu",X=>{r.wfConfig.blankContextmenu&&typeof r.wfConfig.blankContextmenu=="function"?r.wfConfig.blankContextmenu(N,X):o.value.show({name:N.graphModel.name,displayName:N.graphModel.displayName,expireTime:N.graphModel.expireTime,instanceUrl:N.graphModel.instanceUrl,instanceNoClass:N.graphModel.instanceNoClass,preInterceptors:N.graphModel.preInterceptors,postInterceptors:N.graphModel.postInterceptors,type:"process"})}),U.on("node:click",X=>{var x,P,R;if(X.data.type==="snaker:subProcess"&&!X.e.srcElement.className.baseVal)return;c.value=X.data.id;const Z=((x=r.wfConfig[X.data.type.replace("snaker:","")])==null?void 0:x.nodeClick)||r.wfConfig.nodeClick;Z&&typeof Z=="function"?Z(N,X):r.nodeRenderType==="html"&&[jt.task].includes(X.data.type.replace("snaker:",""))?X.e.arrowClick&&(r.wfConfig.arrowClick&&typeof r.wfConfig.arrowClick=="function"?r.wfConfig.arrowClick(X):o.value.show({...X.data.properties,name:X.data.id,displayName:((P=X.data.text)==null?void 0:P.value)||X.data.properties.displayName,type:X.data.type})):o.value.show({...X.data.properties,name:X.data.id,displayName:((R=X.data.text)==null?void 0:R.value)||X.data.properties.displayName,type:X.data.type})}),U.on("edge:click",X=>{var x;c.value=X.data.id,r.wfConfig.edgeClick&&typeof r.wfConfig.edgeClick=="function"?r.wfConfig.edgeClick(N,X):o.value.show({...X.data.properties,name:X.data.id,displayName:(x=X.data.text)==null?void 0:x.value,type:X.data.type})}),N.on("node:resize",({newNodeSize:X})=>{const x=N.getNodeModelById(X.id);x&&x.setProperties({width:parseInt(X.width),height:parseInt(X.height)})}))},g=N=>{const U=$.unref(u);U&&(U.render(N),T(r.highLight),F(r.assigneeText))},y=N=>{const U=$.unref(u);if(U){if(N.type===jt.process)U.graphModel[N.propertyName]=N.propertyValue;else if(N.type===jt.subProcess){const X=$.unref(c);N.propertyName==="name"?U.getNodeModelById(N.propertyValue)||(U.changeNodeId(X,N.propertyValue),c.value=N.propertyValue):U.setProperties(X,{[N.propertyName]:N.propertyValue})}else if([jt.custom,jt.decision,jt.end,jt.fork,jt.join,jt.start,jt.task,jt.wfSubProcess].includes(N.type)){const X=$.unref(c);if(N.propertyName==="name")U.getNodeModelById(N.propertyValue)||(U.changeNodeId(X,N.propertyValue),c.value=N.propertyValue);else if(N.propertyName==="displayName")U.updateText(X,N.propertyValue);else if(N.propertyName==="width"&&[jt.task,jt.custom].includes(N.type)){U.setProperties(X,{width:Number.isNaN(N.propertyValue)?120:N.propertyValue});const x=U.getNodeModelById(X);x&&(x.width=Number.isNaN(N.propertyValue)?120:N.propertyValue)}else if(N.propertyName==="height"&&[jt.task,jt.custom].includes(N.type)){U.setProperties(X,{height:Number.isNaN(N.propertyValue)?120:N.propertyValue});const x=U.getNodeModelById(X);x&&(x.height=Number.isNaN(N.propertyValue)?120:N.propertyValue)}else N.propertyName==="field"?U.setProperties(X,{field:JSON.stringify(N.propertyValue)}):U.setProperties(X,{[N.propertyName]:N.propertyValue});t("input",m())}else if(N.type===jt.transition){const X=$.unref(c);N.propertyName==="name"?U.getEdgeModelById(N.propertyValue)||(U.changeEdgeId(X,N.propertyValue),c.value=N.propertyValue):N.propertyName==="displayName"?U.updateText(X,N.propertyValue):U.setProperties(X,{[N.propertyName]:N.propertyValue})}}},m=()=>{const N=$.unref(u);return N?N.getGraphData():{}},S=N=>{let U=null;try{U=JSON.parse(N)}catch{try{U=T0(N)}catch{return}}U&&U.nodes&&U.edges&&g(U)},O=N=>{g(N)},k=N=>{g(N)},M=()=>{var N;return(N=$.unref(s))==null?void 0:N.refresh()},A=N=>{let U=null;try{U=JSON.parse(N)}catch{}T(U)},T=N=>{const U=$.unref(u);U&&(N&&N.historyNodeNames&&N.historyNodeNames.forEach(X=>{U.setProperties(X,{state:"history"})}),N&&N.activeNodeNames&&N.activeNodeNames.forEach(X=>{U.setProperties(X,{state:"active"})}),N&&N.historyEdgeNames&&N.historyEdgeNames.forEach(X=>{const x=U.getEdgeModelById(X);x&&x.setProperties({state:"history"})}),N&&N.nodeStatus&&Object.keys(N.nodeStatus).forEach(X=>{U.setProperties(X,{status:N.nodeStatus[X]})}),N&&N.nodeApprovalComment&&Object.keys(N.nodeApprovalComment).forEach(X=>{U.setProperties(X,{approvalComment:N.nodeApprovalComment[X]})}))},F=(N,U={valueKey:"value",labelKey:"label"})=>{const X=$.unref(u);!X||!N||(Array.isArray(N)?N.forEach(x=>{X.setProperties(x[U.valueKey],{assigneeText:x[U.labelKey]})}):Object.keys(N).forEach(x=>{X.setProperties(x,{assigneeText:N[x]})}))};return $.onMounted(d),e({getGraphData:m,refreshImport:M,importJson:O,importXml:k,setHighLight:T,setAssigneeText:F,getLfInstance:()=>u.value}),{__sfc:!0,emits:t,lfElRef:i,propertSettingRef:o,dataDetailRef:a,importDataRef:s,highLightDataRef:l,lfInstance:u,currentOpId:c,props:r,initDoc:f,init:d,bindWfProps:h,initOp:v,initEvent:p,reRender:g,handlePropertyChange:y,getGraphData:m,handleImportSubmit:S,importJson:O,importXml:k,refreshImport:M,handleHighLightSubmit:A,setHighLight:T,setAssigneeText:F,PropertSetting:I5,DataDetail:PB,ImportData:kB,HighLightData:HB}}});var GB=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticStyle:{height:"100%",width:"100%"}},[t("div",{ref:"lfElRef",staticClass:"m-snakerflow-designer"}),t(r.PropertSetting,{ref:"propertSettingRef",attrs:{extendAttrConfig:r.props.extendAttrConfig,extendPropertyKeys:e.extendPropertyKeys},on:{change:r.handlePropertyChange},scopedSlots:e._u([e._l(e.$slots,function(i,o){return{key:o,fn:function(a){return[e._t(o,null,null,a||{})]}}})],null,!0)}),t(r.DataDetail,{ref:"dataDetailRef"}),t(r.ImportData,{ref:"importDataRef",on:{"on-submit":r.handleImportSubmit}}),t(r.HighLightData,{ref:"highLightDataRef",on:{"on-submit":r.handleHighLightSubmit}})],1)},WB=[],UB=Vt(zB,GB,WB,!1,null,"166e8692");const Id=UB.exports;return Id.install=function(n){n.component("SnakerFlowDesigner",Id)},Id});
|