@gct-paas/core-web 0.1.4-dev.17 → 0.1.4-dev.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-lEgNpoW5.js +1 -0
- package/dist/cropper-DyP6CFER.js +1 -0
- package/dist/{de_DE-WZ3EB5Ei.js → de_DE-DIDpd1gQ.js} +1 -1
- package/dist/{en_US-CsMalKr8.js → en_US-BaP-b1tP.js} +1 -1
- package/dist/{es_ES-B9hxIQ3B.js → es_ES-NOVlNQnw.js} +1 -1
- package/dist/{fr_FR-C6_kWsnc.js → fr_FR-Bk_x0L7S.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-Bh5yjd5R.js → ja_JP-CeseBQS9.js} +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/dist/{monaco-editor-BhuLUOmL.js → monaco-editor-DCEyjUmJ.js} +1 -1
- package/dist/{pt_PT-BWSTPDc8.js → pt_PT-DFlFmzXZ.js} +1 -1
- package/dist/{ru_RU-BhsOXNnH.js → ru_RU-C5XPaRfl.js} +1 -1
- package/dist/{tr_TR-DFflgWBG.js → tr_TR-CODhj5X1.js} +1 -1
- package/dist/useMonacoEditor-kyCCXYcK.js +1 -0
- package/dist/{vi_VN-pWDyqq2t.js → vi_VN-BjwID8XV.js} +1 -1
- package/dist/{zh_CN-TmE4LVWm.js → zh_CN-BKmwBYsr.js} +1 -1
- package/dist/{zh_TW-CkLTTF7p.js → zh_TW-BSGEo2Qx.js} +1 -1
- package/es/components/icon-next/src/IconNext.vue.d.ts +2 -2
- package/es/components/icon-next/src/IconNext.vue.mjs +2 -2
- package/es/components/icon-next/src/IconNext.vue_vue_type_script_setup_true_name_IconNext_lang.mjs +1 -1
- package/es/components/icon-next/src/{IconNext.vue_vue_type_style_index_0_scoped_c5a83130_lang.css → IconNext.vue_vue_type_style_index_0_scoped_360a87c9_lang.css} +3 -3
- package/es/components/icon-next/src/IconNextPicker.vue_vue_type_style_index_0_lang.css +3 -0
- package/es/index.d.ts +2 -1
- package/es/index.mjs +10 -2
- package/es/modules/gct-table/editor/gct-table-date/gct-table-date.mjs +1 -1
- package/es/modules/gct-table/editor/gct-table-text/gct-table-text.mjs +1 -1
- package/es/modules/global-modal/src/props.mjs +2 -4
- package/es/modules/picture-cropper/index.d.ts +6 -0
- package/es/modules/picture-cropper/index.mjs +5 -0
- package/es/modules/{Cropper → picture-cropper}/src/CopperFreeModal.vue.d.ts +2 -3
- package/es/modules/{Cropper → picture-cropper}/src/CopperFreeModal.vue.mjs +3 -3
- package/es/modules/{Cropper → picture-cropper}/src/CopperFreeModal.vue_vue_type_script_setup_true_name_CropperModal_lang.mjs +1 -1
- package/es/modules/{Cropper/src/CopperFreeModal.vue_vue_type_style_index_0_scoped_d24895d3_lang.css → picture-cropper/src/CopperFreeModal.vue_vue_type_style_index_0_scoped_488ed4c7_lang.css} +10 -10
- package/es/modules/{Cropper → picture-cropper}/src/CopperModal.vue.d.ts +2 -3
- package/es/modules/{Cropper → picture-cropper}/src/CopperModal.vue.mjs +3 -3
- package/es/modules/{Cropper → picture-cropper}/src/CopperModal.vue_vue_type_script_setup_true_name_CropperModal_lang.mjs +1 -1
- package/es/modules/{Cropper/src/CopperModal.vue_vue_type_style_index_0_scoped_a65b9ff7_lang.css → picture-cropper/src/CopperModal.vue_vue_type_style_index_0_scoped_ceff5f65_lang.css} +14 -14
- package/es/modules/{Cropper → picture-cropper}/src/Cropper.vue.mjs +1 -1
- package/es/modules/{Cropper → picture-cropper}/src/Cropper.vue_vue_type_script_lang.mjs +3 -4
- package/es/modules/{Cropper → picture-cropper}/src/CropperAvatar.vue.d.ts +2 -3
- package/es/modules/{Cropper → picture-cropper}/src/CropperAvatar.vue.mjs +3 -3
- package/es/modules/{Cropper → picture-cropper}/src/CropperAvatar.vue_vue_type_script_setup_true_name_CropperAvatar_lang.mjs +10 -9
- package/es/modules/{Cropper/src/CropperAvatar.vue_vue_type_style_index_0_scoped_683cf5bb_lang.css → picture-cropper/src/CropperAvatar.vue_vue_type_style_index_0_scoped_af219c4c_lang.css} +7 -7
- package/es/modules/{Cropper → picture-cropper}/src/CropperFree.vue.d.ts +2 -3
- package/es/modules/{Cropper → picture-cropper}/src/CropperFree.vue.mjs +3 -3
- package/es/modules/{Cropper → picture-cropper}/src/CropperFree.vue_vue_type_script_setup_true_name_CropperPhoto_lang.mjs +22 -17
- package/es/modules/{Cropper/src/CropperFree.vue_vue_type_style_index_0_scoped_dc019220_lang.css → picture-cropper/src/CropperFree.vue_vue_type_style_index_0_scoped_f287eb8f_lang.css} +16 -16
- package/es/modules/picture-preview/index.d.ts +2 -0
- package/es/modules/picture-preview/index.mjs +2 -0
- package/es/modules/picture-preview/src/Functional.vue.d.ts +60 -0
- package/es/modules/picture-preview/src/Functional.vue.mjs +6 -0
- package/es/modules/picture-preview/src/Functional.vue_vue_type_script_lang.mjs +287 -0
- package/es/modules/picture-preview/src/Functional.vue_vue_type_style_index_0_lang.css +101 -0
- package/es/modules/picture-preview/src/functional.d.ts +2 -0
- package/es/modules/picture-preview/src/functional.mjs +19 -0
- package/es/modules/picture-preview/src/picture-preview.vue.d.ts +51 -0
- package/es/modules/picture-preview/src/picture-preview.vue.mjs +6 -0
- package/es/modules/picture-preview/src/picture-preview.vue_vue_type_script_setup_true_lang.mjs +49 -0
- package/es/modules/picture-preview/src/picture-preview.vue_vue_type_style_index_0_lang.css +70 -0
- package/es/modules/picture-preview/src/typing.d.ts +51 -0
- package/package.json +5 -5
- package/dist/BpmnApproval.vue-BQUAB11v.js +0 -1
- package/dist/BpmnBusiness.vue-C5duJF50.js +0 -1
- package/dist/BpmnEnd.vue-BjEcQnG0.js +0 -1
- package/dist/BpmnExclusive.vue-Cx276gAF.js +0 -1
- package/dist/BpmnForm.vue-CF07AB3T.js +0 -1
- package/dist/BpmnJoin.vue-DZgck71H.js +0 -1
- package/dist/BpmnJs.vue-BdKux96j.js +0 -1
- package/dist/BpmnMessage.vue-DABYKBdz.js +0 -1
- package/dist/BpmnParallel.vue-CUi6RogD.js +0 -1
- package/dist/BpmnStart.vue-lvEOgVJW.js +0 -1
- package/dist/NodeFlow.vue-DsiKwCpI.js +0 -1
- package/dist/NodeTools.vue-CKtwcfn2.js +0 -1
- package/dist/NodeTooltips.vue-BuKpNXoA.js +0 -1
- package/dist/enums-DefcbOFc.js +0 -1
- package/dist/node-popover.vue-CnA0OEQf.js +0 -1
- package/dist/useGctBpmn-wMjCfvFc.js +0 -1
- package/dist/useMonacoEditor-no1c2RQN.js +0 -1
- package/es/modules/Cropper/index.d.ts +0 -5
- package/es/modules/Cropper/index.mjs +0 -11
- package/es/modules/Cropper/src/typing.d.ts +0 -11
- /package/dist/{objectSpread2-BL8YUfIz.js → objectSpread2-Cr8AaZiL.js} +0 -0
- /package/es/modules/gct-table/editor/{gct-table-text/gct-table-text.css → gct-table-date/gct-table-date.css} +0 -0
- /package/es/modules/{Cropper → picture-cropper}/src/Cropper.vue.d.ts +0 -0
- /package/es/modules/{Cropper → picture-cropper}/src/Cropper.vue_vue_type_style_index_0_lang.css +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as e}from"./useMonacoEditor-no1c2RQN.js";import{n as s,o as n,r as l,s as i,t}from"./NodeTooltips.vue-BuKpNXoA.js";import{t as o}from"./NodeTools.vue-CKtwcfn2.js";import{a as d,i as a,n as c,o as r,r as u,t as h}from"./NodeFlow.vue-DsiKwCpI.js";import{n as p}from"./enums-DefcbOFc.js";import{n as f,t as v}from"./useGctBpmn-wMjCfvFc.js";import{Fragment as m,computed as g,createBlock as _,createCommentVNode as y,createElementBlock as w,createElementVNode as E,createTextVNode as k,createVNode as x,defineComponent as N,inject as C,normalizeClass as F,normalizeStyle as I,openBlock as b,renderList as M,resolveComponent as D,toDisplayString as P,unref as S,withModifiers as j}from"vue";import{useI18n as z}from"vue-i18n";var T=["width","height"],B=["id","d"],G=/* @__PURE__ */N({__name:"NodeBranchEntrySvg",props:{nodes:{},height:{},radius:{},size:{}},setup(e){const s=e,{nodeInstStatusMap:i}=l(C("uniqueFlowKey")),t=g(()=>{const e=c(s.nodes,{...s});return e.paths.forEach((e,l)=>{console.log("form index map 2",s.nodes[l].id);const t=[n.COMPLETED,n.RUNNING].includes(i.value[s.nodes[l].id]?.status);e.no=t?100:0,e.finished=t}),e.paths.sort((e,s)=>e.no-s.no),e});return(e,s)=>(b(),w("svg",{width:t.value.width,height:t.value.height},[(b(!0),w(m,null,M(t.value.paths,e=>(b(),w("path",{id:e.id,key:e.id,class:F(["gf__svg-line",{"inst-finished":e.finished}]),d:e.d},null,10,B))),128))],8,T))}}),L=["width","height"],O=["id","d"],R=/* @__PURE__ */N({__name:"NodeBranchExitSvg",props:{node:{},nodes:{},size:{}},setup(e){const s=e,{nodeInstStatusMap:n}=l(C("uniqueFlowKey")),i=g(()=>{const e=u(s.nodes,{...s});return e.paths.forEach((e,l)=>{const i=a(s.nodes[l],n.value);e.no=i?100:0,e.finished=i}),e.paths.sort((e,s)=>e.no-s.no),e});return(e,s)=>(b(),w("svg",{width:i.value.width,height:i.value.height},[(b(!0),w(m,null,M(i.value.paths,e=>(b(),w("path",{id:e.id,key:e.id,class:F(["gf__svg-line",{"inst-finished":e.finished}]),d:e.d},null,10,O))),128))],8,L))}}),q={class:"gf__node"},K=["title"],U={class:"gf__flows"},A=["onClick"],H={class:"gct-bpmn__case-card--description flex items-center"},J=["title"],Q={key:2,class:"case-tools"},V=["title","onClick"],W=["title","onClick"],X=/* @__PURE__ */N({__name:"BpmnExclusive",props:{prev:{},node:{}},setup(e){const s=e,{t:c}=z(),{onNodeClick:u,nodeSelectedId:N,setFlowSelected:C,isReadonly:T,isInstMode:B,nodeInstStatusMap:L}=l(),{getI18nName:O}=v(),X=g(()=>c(O(s?.node.data))||s?.node.data?.name),Y=g(()=>c("sys.add")),Z=g(()=>c("sys.delete")),$=g(()=>s.node.type===p.BpmnParallel);return(l,p)=>{const v=D("file-add-outlined");return b(),w("div",{class:"flex flex-col items-center",style:I({"--node-color":$.value?"#FF980E":"#088c49"})},[E("div",q,[x(o,{node:e.node},null,8,["node"]),x(t,{node:e.node},null,8,["node"]),E("div",{class:F(["gct-bpmn__exclusive",{selected:S(N)===e.node.id,"inst-mode":S(B),"is-pending":S(L)[e.node.id]?.status===S(n).PENDING}]),style:I({"--color":S(i)[S(L)[e.node.id]?.status]||($.value?"#FF980E":"#088c49")}),onClick:p[0]||(p[0]=s=>{return n=e.node,u(n),void C();var n})},[E("div",null,[E("i",{class:F(["iconfont lh-[1em]",[$.value?"icon-binghangfenzhi":"icon-fenzhi"]])},null,2)]),E("div",{title:X.value,class:"flex-1 ell"},P(S(c)(S(O)(e.node.data))||e.node.data?.name),9,K)],6)]),x(G,{nodes:e.node.children},null,8,["nodes"]),E("div",U,[(b(!0),w(m,null,M(e.node.children,(l,o)=>(b(),w("div",{key:l.id,class:"gf__flow"},[x(d,{class:F({"inst-finished":[S(n).RUNNING,S(n).COMPLETED].includes(S(L)[l.id]?.status)})},null,8,["class"]),E("div",{class:F(["gct-bpmn__case-card",{"inst-mode":S(B),"is-pending":S(L)[e.node.id]?.status===S(n).PENDING}]),style:I({"--case-color":S(i)[S(L)[l.id]?.status]||"#e8ebf0"}),onClick:s=>{return n=e.node,i=l.id,u(n),void(n.children.slice(-1)[0].id===i?C():C(i));var n,i}},[x(t,{node:l},null,8,["node"]),o+1===e.node.children.length?(b(),w(m,{key:0},[E("div",{class:F(["gct-bpmn__case-card--title",{"inst-mode":S(B)}]),style:I({"--color":S(B)?S(i)[S(L)[l.id]?.status]||"#666666":$.value?"#FF980E":"#088c49"})},P(S(c)("sys.process.else")),7),p[1]||(p[1]=E("div",{class:"gct-bpmn__case-card--description flex items-center"},[E("div",{class:"color-[#797A7D] ell w-full"},[k(" 当"),E("span",{class:"color-[#252525] ml-4px mr-4px"},"上述条件都不满足"),k("时 ")])],-1))],64)):(b(),w(m,{key:1},[E("div",{class:"gct-bpmn__case-card--title",style:I({"--color":S(B)?S(i)[S(L)[l.id]?.status]||"#666666":$.value?"#FF980E":"#088c49"})},P(S(c)("sys.process.condition"))+P(o+1),5),E("div",H,[E("div",{class:"color-[#252525] ell w-full",title:l.caseCfg?.name},P(S(c)(S(O)(l.caseCfg))||l.caseCfg?.name),9,J)])],64)),S(T)?y("",!0):(b(),w("div",Q,[o+1<e.node.children.length?(b(),w("div",{key:0,class:"case-tool__item primary",title:Y.value,onClick:j(e=>(e=>{const n=f(s.node.children.length);s.node.children.splice(e+1,0,n)})(o),["stop"])},[x(v,{class:"text-12px"})],8,V)):y("",!0),o+1<e.node.children.length&&e.node.children.length>2?(b(),w("div",{key:1,class:"case-tool__item error",title:Z.value,onClick:j(e=>(e=>{s.node.children.splice(e,1)})(o),["stop"])},[...p[2]||(p[2]=[E("i",{class:"iconfont icon-shanchu1 lh-1em important-text-12px"},null,-1)])],8,W)):y("",!0)]))],14,A),E("div",{class:F(["gf__line--with-actions",{"inst-finished":S(L)[l.id]?.status===S(n).COMPLETED}])},[S(T)?y("",!0):(b(),_(r,{key:0,list:l.children,"is-flow-start":!0,parent:e.node,flow:l},null,8,["list","parent","flow"]))],2),l.children.length?(b(),_(d,{key:0,class:F({"inst-finished":S(L)[l.id]?.status===S(n).COMPLETED})},null,8,["class"])):y("",!0),x(h,{node:e.node,flow:l,"flow-index":o,"flow-size":e.node.children.length,"parent-id":l.id},null,8,["node","flow","flow-index","flow-size","parent-id"]),E("div",{class:F(["gf__line-pad",{"inst-finished":S(a)(l,S(L))}])},null,2)]))),128))]),x(R,{node:e.node,nodes:e.node.children},null,8,["node","nodes"])],4)}}}),Y=/* @__PURE__ */e({default:()=>Z}),Z=/* @__PURE__ */s(X,[["__scopeId","data-v-3bd1f759"]]);export{Y as n,Z as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as o,t as n}from"./NodeTooltips.vue-BuKpNXoA.js";import{t as d}from"./NodeTools.vue-CKtwcfn2.js";import"./enums-DefcbOFc.js";import{t}from"./useGctBpmn-wMjCfvFc.js";import{computed as a,createElementBlock as s,createElementVNode as l,createVNode as i,defineComponent as m,normalizeClass as r,openBlock as c,toDisplayString as p,unref as u}from"vue";import{useI18n as f}from"vue-i18n";var v=["title"],_=/* @__PURE__ */e(/* @__PURE__ */m({__name:"BpmnForm",props:{node:{}},setup(e){const m=e,{t:_}=f(),g=a(()=>_(b(m?.node.data))||m?.node.data?.name),{onNodeClick:j,nodeSelectedId:N}=o(),{getI18nName:b}=t();return(o,t)=>(c(),s("div",{class:"gf__node",onClick:t[0]||(t[0]=o=>u(j)(e.node))},[i(d,{node:e.node},null,8,["node"]),i(n,{node:e.node},null,8,["node"]),l("div",{class:r(["gct-bpmn__message",{selected:u(N)===e.node.id}])},[t[1]||(t[1]=l("div",null,[l("i",{class:"iconfont icon-liuchengbiaodan lh-[1em]"})],-1)),l("div",{title:g.value,class:"flex-1 ell"},p(u(_)(u(b)(e.node.data))||e.node.data?.name),9,v)],2)]))}}),[["__scopeId","data-v-9b3ff993"]]);export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o,r as n,s,t as d}from"./NodeTooltips.vue-BuKpNXoA.js";import{t}from"./NodeTools.vue-CKtwcfn2.js";import"./enums-DefcbOFc.js";import{t as a}from"./useGctBpmn-wMjCfvFc.js";import{computed as i,createElementBlock as l,createElementVNode as m,createVNode as c,defineComponent as r,normalizeClass as u,normalizeStyle as p,openBlock as f,toDisplayString as v,unref as _}from"vue";import{useI18n as j}from"vue-i18n";var I={class:"ks-row-center"},N=["title"],g=/* @__PURE__ */e(/* @__PURE__ */r({__name:"BpmnJoin",props:{node:{}},setup(e){const r=e,{t:g}=j(),h=i(()=>g(T(r?.node.data))||r?.node.data?.name),{onNodeClick:k,nodeSelectedId:C,isInstMode:E,nodeInstStatusMap:M}=n(),{getI18nName:T}=a();return(n,a)=>(f(),l("div",{class:"gf__node",onClick:a[0]||(a[0]=o=>_(k)(e.node))},[m("div",I,[m("div",{class:u(["gf__line",{"inst-finished":_(M)[e.node.id]?.status===_(o).COMPLETED}])},null,2)]),c(t,{node:e.node},null,8,["node"]),c(d,{node:e.node},null,8,["node"]),m("div",{class:u(["gct-bpmn__join",{selected:_(C)===e.node.id,"inst-mode":_(E),"is-pending":_(M)[e.node.id]?.status===_(o).PENDING}]),style:p({"--color":_(s)[_(M)[e.node.id]?.status]||"#ff980e"})},[a[1]||(a[1]=m("div",null,[m("i",{class:"iconfont icon-juhejiedian lh-[1em]"})],-1)),m("div",{title:h.value,class:"flex-1 ell"},v(_(g)(_(T)(e.node.data))||e.node.data?.name),9,N)],6)]))}}),[["__scopeId","data-v-ca589cf7"]]);export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o,r as n,s as d,t as s}from"./NodeTooltips.vue-BuKpNXoA.js";import{t}from"./NodeTools.vue-CKtwcfn2.js";import"./enums-DefcbOFc.js";import{n as a,t as l}from"./node-popover.vue-CnA0OEQf.js";import{createElementBlock as i,createElementVNode as m,createVNode as p,defineComponent as r,normalizeClass as u,normalizeStyle as c,openBlock as f,toDisplayString as v,unref as _,withCtx as j}from"vue";var I=["title"],N=/* @__PURE__ */e(/* @__PURE__ */r({__name:"BpmnJs",props:{node:{}},setup(e){const{onNodeClick:r,nodeSelectedId:N,isInstMode:b,nodeInstStatusMap:g}=n();return(n,k)=>(f(),i("div",{class:"gf__node",onClick:k[0]||(k[0]=o=>_(r)(e.node))},[p(t,{node:e.node},null,8,["node"]),p(s,{node:e.node},null,8,["node"]),p(a,{node:e.node},null,8,["node"]),p(l,{node:e.node},{default:j(()=>[m("div",{class:u(["gct-bpmn__js",{selected:_(N)===e.node.id,"inst-mode":_(b),"is-pending":_(g)[e.node.id]?.status===_(o).PENDING}]),style:c({"--color":_(d)[_(g)[e.node.id]?.status]||"#1fb1ea"})},[k[1]||(k[1]=m("div",null,[m("i",{class:"iconfont icon-jiaobenjiedian lh-[1em]"})],-1)),m("div",{title:e.node.data?.name,class:"flex-1 ell"},v(e.node.data?.name),9,I)],6)]),_:1},8,["node"])]))}}),[["__scopeId","data-v-fe1a0f65"]]);export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o,r as n,s as d,t as s}from"./NodeTooltips.vue-BuKpNXoA.js";import{t}from"./NodeTools.vue-CKtwcfn2.js";import"./enums-DefcbOFc.js";import{n as a,t as i}from"./node-popover.vue-CnA0OEQf.js";import{createElementBlock as l,createElementVNode as m,createVNode as c,defineComponent as p,normalizeClass as r,normalizeStyle as u,openBlock as v,toDisplayString as f,unref as _,withCtx as g}from"vue";var I=["title"],N=/* @__PURE__ */e(/* @__PURE__ */p({__name:"BpmnMessage",props:{node:{}},setup(e){const{onNodeClick:p,nodeSelectedId:N,nodeInstStatusMap:j,isInstMode:x}=n();return(n,h)=>(v(),l("div",{class:"gf__node",onClick:h[0]||(h[0]=o=>_(p)(e.node))},[c(t,{node:e.node},null,8,["node"]),c(s,{node:e.node},null,8,["node"]),c(a,{node:e.node},null,8,["node"]),c(i,{node:e.node,width:306},{default:g(()=>[m("div",{class:r(["gct-bpmn__message",{selected:_(N)===e.node.id,"inst-mode":_(x),"is-pending":_(j)[e.node.id]?.status===_(o).PENDING}]),style:u({"--color":_(d)[_(j)[e.node.id]?.status]||"#6931ec"})},[h[1]||(h[1]=m("div",null,[m("i",{class:"iconfont icon-xiaoxitongzhi lh-[1em]"})],-1)),m("div",{title:e.node.data?.name,class:"flex-1 ell"},f(e.node.data?.name),9,I)],6)]),_:1},8,["node"])]))}}),[["__scopeId","data-v-2cf7c11b"]]);export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./NodeTooltips.vue-BuKpNXoA.js";import"./NodeTools.vue-CKtwcfn2.js";import"./NodeFlow.vue-DsiKwCpI.js";import"./enums-DefcbOFc.js";import"./useGctBpmn-wMjCfvFc.js";import{t as e}from"./BpmnExclusive.vue-Cx276gAF.js";import{createBlock as o,defineComponent as p,openBlock as r}from"vue";var s=/* @__PURE__ */p({__name:"BpmnParallel",props:{pre:{},node:{}},setup:p=>(s,m)=>(r(),o(e,{pre:p.pre,node:p.node},null,8,["pre","node"]))});export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,s as o,t as d}from"./NodeTooltips.vue-BuKpNXoA.js";import"./enums-DefcbOFc.js";import{t as n}from"./useGctBpmn-wMjCfvFc.js";import{createElementBlock as a,createElementVNode as s,createVNode as p,defineComponent as r,normalizeClass as l,normalizeStyle as m,openBlock as i,toDisplayString as c,unref as u}from"vue";import{useI18n as x}from"vue-i18n";var _=["title"],v=/* @__PURE__ */e(/* @__PURE__ */r({__name:"BpmnStart",props:{node:{}},setup(e){const{t:r}=x(),{onNodeClick:v,nodeSelectedId:f,nodeInstStatusMap:I}=t(),{getI18nName:g}=n();return(t,n)=>(i(),a("div",{class:"gf__node",onClick:n[0]||(n[0]=t=>u(v)(e.node))},[p(d,{node:e.node},null,8,["node"]),s("div",{title:u(r)(u(g)(e.node.data))||e.node.data?.name,class:l(["gct-bpmn__start h-36px w-66px rounded-18px color-white text-center lh-36px ell pl-10px pr-10px",{selected:u(f)===e.node.id}]),style:m({"--color":u(o)[u(I)[e.node.id]?.status]||"#3168ec"})},c(u(r)(u(g)(e.node.data))||e.node.data?.name),15,_)]))}}),[["__scopeId","data-v-48d0dd49"]]);export{v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,i as n,n as o,o as l,r as d,t as i}from"./NodeTooltips.vue-BuKpNXoA.js";import{t as s}from"./NodeTools.vue-CKtwcfn2.js";import{Fragment as t,computed as c,createBlock as a,createCommentVNode as r,createElementBlock as p,createElementVNode as u,createTextVNode as f,createVNode as w,defineComponent as v,inject as y,mergeProps as _,normalizeClass as h,normalizeProps as k,normalizeStyle as $,onMounted as m,openBlock as x,provide as g,renderList as C,renderSlot as N,resolveComponent as F,resolveDynamicComponent as M,toDisplayString as b,unref as D,withCtx as L}from"vue";import{IconPark as z}from"@icon-park/vue-next/es/all";var K={key:1,class:"gct-flow__node gct-flow__node--app flex items-center"},E={class:"gct-flow__node-icon"},q={class:"gct-flow__node-content"},S=/* @__PURE__ */v({__name:"NodeApp",props:{node:{}},setup(e){const{onNodeClick:n,nodeRenderMap:o,gctFlowDataMap:l}=d(y("uniqueFlowKey"));return(d,t)=>(x(),p("div",{class:"gf__node",onClick:t[0]||(t[0]=o=>D(n)(e.node))},[w(s,{node:e.node},null,8,["node"]),w(i,{node:e.node},null,8,["node"]),D(o)[e.node.type]?(x(),a(M(D(o)[e.node.type]),_({key:e.node.id},d.$props),null,16)):(x(),p("div",K,[u("div",E,[w(D(z),{type:"api-app"})]),u("div",q,[u("div",null,"N"+b(D(l)[e.node.id].idx+1)+".--",1),t[1]||(t[1]=u("div",null,"--",-1))])]))]))}}),I={class:"action-list"},Q=["onClick"],R=/* @__PURE__ */v({__name:"LineActions",props:{node:{},prev:{},next:{},list:{},isFlowStart:{type:Boolean},parent:{},flow:{}},setup(o){const l=o,{onNodeCreate:i,gctFlowOpts:s}=d(y("uniqueFlowKey")),f=c(()=>(s.value.actions??[{key:e.App,name:"连接器",icon:"iconpark:api-app",color:"#3168ec"},{key:e.Switch,name:"分支",icon:"iconfont:icon-fenzhi",color:"#088c49"},{key:e.Loop,name:"循环",icon:"iconfont:icon-xunhuan",color:"#f54547"},{key:e.End,name:"结束",icon:"iconfont:icon-jieshu",color:"#3168ec"}]).map(e=>{const[n,o]=e.icon.split(":");return{...e,_iconNs_:n,_iconValue_:o}}).filter(e=>!e.hide||"function"==typeof e.hide&&!e.hide(l))),w=e=>{const n=l.list.find(n=>n.id===e);return n.data?.nextKey?w(n.data.nextKey):n.id};return(e,o)=>{const d=F("icon-park"),s=F("a-popover");return x(),a(s,{trigger:"click",placement:"right","overlay-class-name":"list-actions-overlay"},{content:L(()=>[u("div",I,[(x(!0),p(t,null,C(f.value,e=>(x(),p("div",{key:e.key,class:"action-item",onClick:o=>(({key:e})=>{const o=n[e]();if(l.isFlowStart)l.list.unshift(o);else{let e=l.node?.id;const n=l.node?.data?.nextKey;n&&(e=w(n));const d=l.list.findIndex(n=>n.id===e);if(-1===d)return;l.list.splice(d+1,0,o)}i(o,l.parent,l.flow)})({key:e.key})},[u("div",{style:$({"--color":e.color})},["iconfont"===e._iconNs_?(x(),p("i",{key:0,class:h(["iconfont",e._iconValue_])},null,2)):"iconpark"===e._iconNs_?(x(),a(d,{key:1,type:e._iconValue_},null,8,["type"])):r("",!0)],4),u("span",null,b(e.name),1)],8,Q))),128))])]),default:L(()=>[N(e.$slots,"default",{},()=>[o[0]||(o[0]=u("div",{class:"line-actions"},[u("div")],-1))])]),_:3})}}}),j={class:"line-arrow"},P=/* @__PURE__ */o({},[["render",function(e,n){return x(),p("div",j)}],["__scopeId","data-v-4e7c750f"]]),A={class:"c-flow__node--view--main"},T={key:1},V={class:"node-tools"},B={class:"flows"},O={class:"flow-before"},W={key:0,class:"bool bool__y"},Y={key:1,class:"bool bool__n"},G=/* @__PURE__ */v({__name:"NodeBool",props:{node:{}},setup(e){const{nodeClick:n,gctFlowDataMap:o,nodeData:l,nodeContentRenderDescMap:i}=d(y("uniqueFlowKey"));return m(()=>{}),(d,c)=>(x(),p("div",{class:h("c-flow__node--"+e.node.type)},[u("div",{class:h(["c-flow__node--view flex items-center relative",[D(l)?.id===e.node.id&&"selected-node"]]),onClick:c[0]||(c[0]=o=>D(n)(e.node))},[c[1]||(c[1]=u("div",{class:"icon-box"},[u("i",{class:"iconfont icon-panduan"})],-1)),u("div",A,[u("div",null,"N"+b(D(o)[e.node.id].idx+1)+".判断",1),D(i)[e.node.type]?(x(),a(M(D(i)[e.node.type]),k(_({key:0},d.$props)),null,16)):(x(),p("div",T,b(e.node.id),1))]),u("div",V,[w(s,{node:e.node},null,8,["node"])]),c[2]||(c[2]=f(" > ",-1))],2),c[7]||(c[7]=u("div",{class:"group1"},[u("div",{class:"line1"})],-1)),u("div",B,[(x(!0),p(t,null,C(e.node.children,(n,o)=>(x(),p("div",{key:n.id,class:"flow"},[u("div",O,[0===o?(x(),p("span",W,[...c[3]||(c[3]=[u("span",null,"是",-1),u("span",null,"(",-1),u("span",null,"Y",-1),u("span",null,")",-1)])])):(x(),p("span",Y,[...c[4]||(c[4]=[u("span",null,"否",-1),u("span",null,"(",-1),u("span",null,"N",-1),u("span",null,")",-1)])]))]),w(R,{list:n.children,"is-flow-start":""},null,8,["list"]),n.children.length>0?(x(),a(P,{key:0})):r("",!0),w(Fe,{node:e.node,flow:n,"parent-id":n.id,"flow-index":o,"flow-size":e.node.children.length},null,8,["node","flow","parent-id","flow-index","flow-size"]),c[5]||(c[5]=u("div",{class:"line-pad"},null,-1)),c[6]||(c[6]=u("div",{class:"flow-after"},null,-1))]))),128))])],2))}}),H={class:"c-flow__node--view--main"},J={key:1},U={class:"node-tools"},X={class:"loop-content"},Z={class:"group1"},ee={class:"flows"},ne={key:0,class:"h168px ks-column justify-center"},oe=/* @__PURE__ */v({__name:"NodeLoop",props:{node:{}},setup(e){const{gctFlowDataMap:n,nodeClick:o,nodeData:l,nodeContentRenderDescMap:i}=d(y("uniqueFlowKey"));return(d,c)=>{const r=F("a-button");return x(),p("div",{class:h("c-flow__node--"+e.node.type)},[u("div",{class:h(["c-flow__node--view flex items-center relative",[D(l)?.id===e.node.id&&"selected-node"]]),onClick:c[0]||(c[0]=n=>D(o)(e.node))},[c[1]||(c[1]=u("div",{class:"icon-box"},[u("i",{class:"iconfont icon-xunhuan"})],-1)),u("div",H,[u("div",null,"N"+b(D(n)[e.node.id].idx+1)+".循环",1),D(i)[e.node.type]?(x(),a(M(D(i)[e.node.type]),k(_({key:0},d.$props)),null,16)):(x(),p("div",J,"循环处理列表"))]),u("div",U,[w(s,{node:e.node},null,8,["node"])])],2),u("div",X,[u("div",Z,[w(P),c[2]||(c[2]=u("span",{class:"node-text"},"循环执行",-1))]),u("div",ee,[(x(!0),p(t,null,C(e.node.children,(n,o)=>(x(),p("div",{key:n.id,class:"flow flow--single"},[n.children.length?(x(),p(t,{key:1},[c[5]||(c[5]=u("div",{class:"flow-before"},null,-1)),w(R,{list:n.children,"is-flow-start":""},null,8,["list"]),w(P),w(Fe,{node:e.node,flow:n,"flow-index":o,"flow-size":e.node.children.length,"parent-id":n.id},null,8,["node","flow","flow-index","flow-size","parent-id"])],64)):(x(),p("div",ne,[w(R,{list:n.children,"is-flow-start":""},{default:L(()=>[w(r,{type:"link"},{icon:L(()=>[...c[3]||(c[3]=[u("i",{class:"iconfont icon-tianjia mr4px",style:{"font-size":"14px"}},null,-1)])]),default:L(()=>[c[4]||(c[4]=f(" 新步骤 ",-1))]),_:1})]),_:1},8,["list"])]))]))),128))])])],2)}}}),le={class:"c-flow__node--view--main"},de={key:1},ie={class:"node-tools"},se={key:0,class:"flows"},te=/* @__PURE__ */v({__name:"NodeSwitch",props:{node:{}},setup(o){const l=o,{gctFlowDataMap:i,onNodeCreate:c,onNodeClick:f,nodeData:v,nodeContentRenderDescMap:$}=d(y("uniqueFlowKey")),m=()=>{const o=n[e.Flow]();o.children.push(n[e.Condition](),n[e.App]()),l.node.children.splice(l.node.children.length-1,0,o),c(o)};return(e,n)=>(x(),p("div",{class:h("c-flow__node--"+o.node.type)},[u("div",{class:h(["c-flow__node--view flex items-center relative",[D(v)?.id===o.node.id&&"selected-node"]]),onClick:n[0]||(n[0]=e=>D(f)(o.node))},[n[1]||(n[1]=u("div",{class:"icon-box"},[u("i",{class:"iconfont icon-fenzhi"})],-1)),u("div",le,[u("div",null,"N"+b(D(i)[o.node.id].idx+1)+".分支",1),D($)[o.node.type]?(x(),a(M(D($)[o.node.type]),k(_({key:0},e.$props)),null,16)):(x(),p("div",de,"添加条件,按照优先级执行"))]),u("div",ie,[w(s,{node:o.node},null,8,["node"])])],2),u("div",{class:"group1"},[u("div",{class:"add-flow",onClick:m},"添加分支条件"),n[2]||(n[2]=u("div",{class:"line1"},null,-1))]),o.node.children.length?(x(),p("div",se,[(x(!0),p(t,null,C(o.node.children,(e,l)=>(x(),p("div",{key:e.id,class:"flow"},[n[3]||(n[3]=u("div",{class:"flow-before"},null,-1)),w(P),w(Fe,{node:o.node,flow:e,"flow-index":l,"flow-size":o.node.children.length,"parent-id":e.id},null,8,["node","flow","flow-index","flow-size","parent-id"]),n[4]||(n[4]=u("div",{class:"line-pad"},null,-1)),n[5]||(n[5]=u("div",{class:"flow-after"},null,-1))]))),128))])):r("",!0)],2))}}),ce=["id"],ae={key:0},re={key:1},pe={key:1},ue={class:"node-tools"},fe=/* @__PURE__ */v({__name:"NodeCondition",props:{node:{},list:{}},setup(e){const{gctFlowDataMap:n,onNodeClick:o,nodeData:l,nodeContentRenderDescMap:i}=d(y("uniqueFlowKey")),t=y("flowData");return(d,c)=>(x(),p("div",{class:h("c-flow__node--"+e.node.type),onClick:c[0]||(c[0]=n=>D(o)(e.node))},[u("div",{id:e.node.id,class:h(["c-flow__node--view relative",[D(l)?.id===e.node.id&&"selected-node"]])},[u("div",null,[u("span",null,"N"+b(D(n)[e.node.id].idx+1)+".",1),D(t).flowIndex+1===D(t).flowSize?(x(),p("span",ae," 其他")):(x(),p("span",re," 条件"+b(D(t).flowIndex+1),1))]),D(i)[e.node.type]?(x(),a(M(D(i)[e.node.type]),k(_({key:0},d.$props)),null,16)):(x(),p("div",pe,b(e.node.id),1)),u("div",ue,[w(s,{node:e.node},null,8,["node"])])],10,ce)],2))}}),we={class:"c-flow__node--view--main"},ve={key:1},ye={class:"node-tools"},_e=/* @__PURE__ */v({__name:"NodeEnd",props:{node:{}},setup(e){const{nodeClick:n,nodeData:o,nodeContentRenderDescMap:l}=d(y("uniqueFlowKey"));return(d,i)=>(x(),p("div",{class:h("c-flow__node--"+e.node.type)},[u("div",{class:h(["c-flow__node--view flex items-center",[D(o)?.id===e.node.id&&"selected-node"]]),onClick:i[0]||(i[0]=o=>D(n)(e.node))},[i[2]||(i[2]=u("div",{class:"icon-box"},[u("i",{class:"iconfont icon-jieshu"})],-1)),u("div",we,[i[1]||(i[1]=u("div",null,"结束",-1)),D(l)[e.node.type]?(x(),a(M(D(l)[e.node.type]),k(_({key:0},d.$props)),null,16)):(x(),p("div",ve,"---"))]),u("div",ye,[w(s,{node:e.node},null,8,["node"])])],2)],2))}});function he(n,o){if(n.type===e.Flow){if(0===n.children.length)return o[n.id]?.status===l.COMPLETED;const e=n.children?.filter(e=>!e.hidden);return he(e[e.length-1],o)}return"bpmnExclusive"===n.type||"bpmnParallel"===n.type||"bpmnInclusiveS"===n.type?n.children.some(e=>he(e,o)):o[n.id]?.status===l.COMPLETED}function ke(e){return e.map(e=>{if(0===e.children.length)return 1;const n=e.children.map(e=>{if(["bpmnExclusive","bpmnParallel","bizParallel","bizParallelReal","bizExclusive","parallel","loop","exclusive"].includes(e.type)&&!e.fold){const n=ke(e.children).reduce((e,n)=>e+n,0);return"loop"===e.type?n+1:n}return 1});return Math.max(...n)})}function $e(e,{height:n=60,radius:o=10,size:l=268}={}){const d=ke(e),i=d.reduce((e,n)=>e+n,0),s=l,t=n,c=n/2,a=o,r=s*i,p=r/2;let u=0;return{width:r,height:t,paths:e.map((e,n)=>{const o=u*s+d[n]*s/2;u+=d[n];const l={id:e.id,no:n,d:void 0,finished:!1};return l.d=o===p?`M${p},0 L${p},${t}`:o<p?`M${p},0 L${p},${c-a} Q${p},${c} ${p-a},${c} L${o+a},${c} Q${o},${c} ${o},${c+a} L${o},${t}`:`M${p},0 L${p},${c-a} Q${p},${c} ${p+a},${c} L${o-a},${c} Q${o},${c} ${o},${c+a} L${o},${t}`,l})}}function me(e,{size:n=268}={}){const o=ke(e),l=o.reduce((e,n)=>e+n,0),d=n,i=d*l,s=i/2;let t=0;return{width:i,height:20,paths:e.map((e,n)=>{const l=t*d+o[n]*d/2;t+=o[n];const i={id:e.id,no:n,d:null,finished:!1};return i.d=l===s?`M${s},0 L${s},20`:l<s?`M${l},0 L${l},0 Q${l},10 ${l+10},10 L${s-10},10 Q${s},10 ${s},20 L${s},20`:`M${l},0 L${l},0 Q${l},10 ${l-10},10 L${s+10},10 Q${s},10 ${s},20 L${s},20`,i})}}var xe=["id"],ge={key:0,class:"new-step"},Ce=/* @__PURE__ */o(/* @__PURE__ */v({__name:"NodeWrapper",props:{node:{},prev:{},next:{},list:{},flow:{},parent:{}},setup(n){const o=n,{isReadonly:l,gctFlowData:i,gctFlowDataLastNode:s,nodeInstStatusMap:t}=d(y("uniqueFlowKey")),f=c(()=>!1!==o.node.allowNext&&(!l.value||o.node.id!==s.value?.id)),w=c(()=>he(o.node,t.value));return(o,d)=>(x(),p("div",{id:n.node.id,class:"gct-flow__wrapper"},[d[0]||(d[0]=u("div",{class:"gct-flow__wrapper--before"},null,-1)),u("div",{class:h(["gct-flow__wrapper--content",{readonly:D(l)}])},[N(o.$slots,"default",{},void 0,!0)],2),f.value?(x(),p("div",{key:0,class:h(["gf__line--with-actions",{"line--dashed":n.node?.type===D(e).End,"inst-finished":w.value}])},[D(l)?r("",!0):(x(),a(R,k(_({key:0},o.$props)),{default:L(()=>[n.node.id===D(i)?.children.slice(-1)[0].id?(x(),p("div",ge,b("添加新步骤"))):r("",!0)]),_:1},16)),n.node.id!==n.list.filter(e=>!e.hidden).slice(-1)[0].id?(x(),a(P,{key:1})):r("",!0)],2)):r("",!0)],8,xe))}}),[["__scopeId","data-v-4ff4f245"]]),Ne={class:"gct-flow__flow"},Fe=/* @__PURE__ */v({__name:"NodeFlow",props:{node:{},flow:{},flowIndex:{default:0},flowSize:{default:1}},setup(n){const o={[e.App]:S,[e.Bool]:G,[e.Loop]:oe,[e.Switch]:te,[e.Condition]:fe,[e.End]:_e};g("flowData",n);const{customNodeViewMap:l}=d(y("uniqueFlowKey"));return(e,d)=>(x(),p("div",Ne,[(x(!0),p(t,null,C(n.flow.children?.filter(e=>!e.hidden),(e,d)=>(x(),a(Ce,{key:e.id,node:e,prev:n.flow.children[d-1],next:n.flow.children[d+1],list:n.flow.children,flow:n.flow,parent:n.node},{default:L(()=>[D(l)[e.type]?(x(),a(M(D(l)[e.type]),{key:0,node:e,prev:n.flow.children[d-1],next:n.flow.children[d+1],list:n.flow.children},null,8,["node","prev","next","list"])):(x(),a(M(o[e.type]),{key:1,node:e,prev:n.flow.children[d-1],next:n.flow.children[d+1],list:n.flow.children},null,8,["node","prev","next","list"]))]),_:2},1032,["node","prev","next","list","flow","parent"]))),128))]))}});export{P as a,he as i,$e as n,R as o,me as r,Fe as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as o}from"./NodeTooltips.vue-BuKpNXoA.js";import{computed as t,createCommentVNode as l,createElementBlock as s,createElementVNode as n,defineComponent as d,inject as i,openBlock as a,withModifiers as r}from"vue";import{useI18n as c}from"vue-i18n";var p=["title"],m=/* @__PURE__ */e(/* @__PURE__ */d({__name:"NodeTools",props:{node:{}},setup(e){const d=e,{deleteNodeById:m}=o(i("uniqueFlowKey")),{t:u}=c(),v=t(()=>u("sys.delete"));return(o,t)=>(a(),s("div",{class:"node-tools",onClick:t[1]||(t[1]=r(()=>{},["stop"]))},[!1!==e.node.allowDelete?(a(),s("div",{key:0,title:v.value,class:"node-tool__item",onClick:t[0]||(t[0]=()=>(({key:e})=>{"delete"===e&&(d.node.allowDelete||m(d.node.id))})({key:"delete"}))},[...t[2]||(t[2]=[n("i",{class:"iconfont icon-shanchu1 lh-1em important-text-12px"},null,-1)])],8,p)):l("",!0)]))}}),[["__scopeId","data-v-b326cfcf"]]);export{m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Fragment as e,computed as t,createCommentVNode as n,createElementBlock as o,createElementVNode as l,createVNode as i,defineComponent as a,openBlock as c,ref as d,renderList as u,resolveComponent as s,shallowRef as r,toDisplayString as p,withCtx as v}from"vue";var f=/* @__PURE__ */function(e){return e.Flow="flow",e.App="app",e.Loop="loop",e.End="end",e.Bool="bool",e.Switch="switch",e.Condition="condition",e}({}),N=/* @__PURE__ */function(e){return e.COMPLETED="COMPLETED",e.RUNNING="RUNNING",e.PENDING="PENDING",e.EXCEPTION="EXCEPTION",e}({}),h={[N.COMPLETED]:"#309C41",[N.RUNNING]:"#3168EC",[N.PENDING]:"#8F8F8F"},w=/* @__PURE__ */function(e){return e.FIXED="FIXED",e.SYS="SYS",e.FIELD="FIELD",e}({});function F(e=8){let t=Math.random().toString(36).substring(2,10);for(;t.length<e;)t+=Math.random().toString(36).substring(2,10);return t.substring(0,e)}var g=class{static[f.Flow](e={}){return{...e,id:f.Flow+F(),type:f.Flow,children:[]}}static[f.App](e={}){return{...e,id:f.App+F(),type:f.App}}},I=/* @__PURE__ */new Map,y=(e="commonFlow")=>(I[e]||(I[e]=function(){const e=d({}),n=()=>({id:f.Flow+F(),type:f.Flow,children:[]}),o=d(n()),l=t(()=>{const e=o.value?.children?.length;return 0===e?null:o.value.children[e-1]});function i(e){e&&(o.value=e)}const a=t(()=>{const e={};if(!o.value)return e;let t=0;const n=(o,l=[],i)=>{o.forEach((a,c)=>{const d={idx:i?void 0:t+=1,pIds:[...l],prev:0===c?void 0:o[c+1]?.id,next:c===o.length-1?void 0:o[c-1]?.id,node:a,mainFlowNode:0===l.length};e[a.id]=d,a.children&&n(a.children,[...l,a.id],Number("parallel"===a.type))})};return n(o.value.children),e}),c=t(()=>!!e.value?.readonly);function u(t){e.value.readonly=t}const s=d(),p=d();function v(e){s.value=e}function N(e){p.value=e}const h=t(()=>{if(s.value)return a.value[s.value]?.node}),w=r({});function I(e){Object.assign(w.value,e)}const y=r({});function E(e,t){g[e]=t.generator,y.value[e]=t.nodeView}const D=d(100),S=t(()=>D.value+"%"),M=[25,200],m=e=>{D.value<=M[0]&&-1===e||D.value>=M[1]&&1===e||(D.value=D.value+25*e)},C=d({}),G=t(()=>!!e.value?.instMode);function O(t){e.value.instMode=t}function P(e){C.value=e}function x(){e.value={},o.value=n(),s.value="",p.value="",D.value=100,C.value={}}return function(){return{init:function(t){e.value=t,o.value=n()},reset:x,gctFlowOpts:e,gctFlowData:o,gctFlowDataLastNode:l,gctFlowDataMap:a,setGctFlowData:i,resetGctFlowData:function(){o.value=n()},customNodeViewMap:y,registerCustomNode:E,nodeRenderMap:w,registerNodeRender:I,addNode:function(e,t,n){const l=g[e],i=l?l(t):{...t,id:e+F(),type:e};return n&&"function"==typeof n&&n(i),o.value?.children.push(i),i},addNextNode:function(e,t,n,l){const i=g[t],a=i?i(n):{...n,id:t+F(),type:t};return function t(n){const o=n.findIndex(t=>t.id===e);o>-1?n.splice(l?o:o+1,0,a):n.forEach(e=>{e.children&&t(e.children)})}(o.value?.children),a},deleteNodeById:function(e){!function t(n){for(let o=n.length-1;o>=0;o--){const l=n[o];l.id===e||l.syncDeleteById===e?n.splice(o,1):l.children&&t(l.children)}}(o.value?.children),e===s.value&&v(o.value?.children[0]?.id)},nodeSelectedId:s,setNodeSelected:v,flowSelectedId:p,setFlowSelected:N,nodeSelectedData:h,isReadonly:c,setReadonly:u,displayScale:D,displayScaleText:S,changeDisplayScale:m,onNodeClick:function(t){v(t.id),N("");const{onNodeClick:n}=e.value??{};n&&"function"==typeof n&&n(t)},onNodeCreate:function(t,n,o){p.value="",t.type===f.Flow?v(t.children[0].id):v(t.id);const{onNodeCreate:l}=e.value??{};l&&"function"==typeof l&&l(t,n,o)},isInstMode:G,setInstMode:O,nodeInstStatusMap:C,setNodeInstStatusMap:P}}}()),I[e]()),E=(e,t)=>{const n=e.__vccOpts||e;for(const[o,l]of t)n[o]=l;return n},D={key:0,class:"node-tooltip"},S={class:"tips-wrap"},M=/* @__PURE__ */E(/* @__PURE__ */a({__name:"NodeTooltips",props:{node:{}},setup:t=>(a,d)=>{const r=s("a-tooltip");return t.node.tooltips&&t.node.tooltips.length?(c(),o("div",D,[i(r,{placement:"right"},{title:v(()=>[l("div",S,[(c(!0),o(e,null,u(t.node.tooltips,(e,t)=>(c(),o("div",{key:t,class:"tips-item"},p(t+1)+". "+p(e),1))),128))])]),default:v(()=>[d[0]||(d[0]=l("i",{class:"iconfont icon-jinggao1 text-[#F54547]"},null,-1))]),_:1})])):n("",!0)}}),[["__scopeId","data-v-66328fc9"]]);export{F as a,f as c,g as i,w as l,E as n,N as o,y as r,h as s,M as t};
|
package/dist/enums-DefcbOFc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=/* @__PURE__ */function(e){return e.BpmnStart="bpmnStart",e.BpmnSubmit="bpmnSubmit",e.BpmnApproval="bpmnApproval",e.BpmnEnd="bpmnEnd",e.BpmnExclusive="bpmnExclusive",e.BpmnJs="bpmnJs",e.BpmnMessage="bpmnMessage",e.BpmnParallel="bpmnParallel",e.BpmnJoin="bpmnJoin",e.BpmnForm="bpmnForm",e.BpmnBusiness="bpmnBusiness",e}({}),n=/* @__PURE__ */function(e){return e.Resubmit="Resubmit",e.End="Terminate",e.Withdraw="Withdraw",e.Approve="Approve",e.Refuse="Refuse",e.Reassign="Reassign",e.Countersign="Countersign",e.Reject="Reject",e}({}),t=/* @__PURE__ */function(e){return e.Required="Required",e.Optional="Optional",e.ApproveRequired="ApproveRequired",e.RefuseRequired="RefuseRequired",e.ReassignRequired="ReassignRequired",e.RejectRequired="RejectRequired",e.CountersignRequired="CountersignRequired",e}({}),r=/* @__PURE__ */function(e){return e.ApprovedByOne="ApprovedByOne",e.ApprovedByAll="ApprovedByAll",e}({}),i=/* @__PURE__ */function(e){return e.EQ="eq",e.GT="gt",e.GE="ge",e.LT="lt",e.LE="le",e.NE="ne",e.IS_NULL="isNull",e.IS_NOT_NULL="isNotNull",e.CONTAINS="contains",e.NOT_CONTAINS="notContains",e}({}),E=/* @__PURE__ */function(e){return e.String="String",e.Integer="Integer",e.Double="Double",e.Long="Long",e.Time="LocalTime",e.Date="LocalDate",e.DateTime="LocalDateTime",e.Boolean="Boolean",e}({}),o=/* @__PURE__ */function(e){return e.PRIMARY_KEY="primary_key",e.ASSOCIATED_PRIMARY_KEY="associated_primary_key",e.TEXT="text",e.LONG_TEXT="long_text",e.INTEGER="integer",e.LONG="long",e.DOUBLE="double",e.DECIMAL="decimal",e.BOOLEAN="boolean",e.DATE="date",e.TIME="time",e.DATE_TIME="date_time",e.IMAGE="image",e.ATTACHMENT="attachment",e.SERIAL="serial_number",e.MASTERSLAVE="master_slave",e.USER="user",e.USER_MULTI="user_multi",e.ORG="org",e.ORG_MULTI="org_multi",e.ENUM="enum",e.ENUM_MULTI="enum_multi",e.OPTION="option",e.OPTION_MULTI="option_multi",e.REF="ref",e.REF_MULTI="ref_multi",e.RDO_REF="rdo_ref",e.EXPRESSION="expression",e.EXPRESSION_CONDITION="expression_condition",e.AGG="agg",e.ESOP="esop",e.TRANSACTION="transaction",e.LABEL_TEMPLATE="label_template",e.LABEL_TEMPLATE_REF="label_template_ref",e.DOCUMENT_TEMPLATE="document_template",e.SERIALRULE="serial_number_rule",e.PRINTER="printer",e.MESSAGE_TMPL="message_tmpl",e.RANGE_USER="range_user",e.SIGNATURE="electronic_signature",e.ONLINE_FORM_TEMPLATE="online_form_tmpl",e.E_DHR_TEMPLATE="edhr_tmpl",e.ONLINE_FORM="online_form",e.DATA_TABLE_FORMULA="data_table_formula",e.READONLYCMP="readonlycmp",e.MATERIAL_NO="material_no",e.PRODUCT="product",e.DEVICE="device",e.Biz_Process="biz_process",e.TENANT="tenant",e}({}),a={[o.TEXT]:E.String,[o.LONG_TEXT]:E.String,[o.DECIMAL]:E.Double,[o.DOUBLE]:E.Double,[o.INTEGER]:E.Integer,[o.LONG]:E.Long,[o.BOOLEAN]:E.Boolean,[o.DATE]:E.Date,[o.TIME]:E.Time,[o.DATE_TIME]:E.DateTime,[o.OPTION]:E.String,[o.OPTION_MULTI]:E.String,[o.ENUM]:E.String,[o.ENUM_MULTI]:E.String,[o.REF]:E.String,[o.REF_MULTI]:E.String,[o.USER]:E.String,[o.USER_MULTI]:E.String,[o.ORG]:E.String,[o.ORG_MULTI]:E.String},T=/* @__PURE__ */function(e){return e.Manual="Manual",e.Model="Model",e.Node="Node",e}({});export{T as a,a as c,i,t as l,e as n,E as o,n as r,o as s,r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as s,r as t}from"./NodeTooltips.vue-BuKpNXoA.js";import{n as a,s as l}from"./enums-DefcbOFc.js";import{Fragment as o,computed as n,createBlock as i,createCommentVNode as p,createElementBlock as r,createElementVNode as d,createVNode as u,defineComponent as c,normalizeClass as m,normalizeStyle as v,onBeforeMount as g,openBlock as x,ref as E,renderList as y,renderSlot as R,resolveComponent as A,resolveDynamicComponent as N,toDisplayString as T,unref as D,vShow as U,withCtx as M,withDirectives as I}from"vue";import{useI18n as S}from"vue-i18n";import{api as h}from"@gct-paas/api";var k={class:"absolute top-0px -right-20px"},Y={key:1,class:"iconfont icon-jinhangzhongw text-[#3168ec] lh-1"},P=/* @__PURE__ */c({__name:"node-inst-status",props:{node:{}},setup(e){const a=e,{nodeInstStatusMap:l}=t(),o=n(()=>l.value[a.node.id]?.data||{});return(e,t)=>{const a=A("check-outlined");return x(),r("div",k,[o.value.statusMsg===D(s).COMPLETED?(x(),r("div",{key:0,class:m(["h-16px w-16px rounded-[50%] text-white text-12px ks-row-center-middle","task-node-status__bg--"+o.value.statusMsg])},[u(a)],2)):p("",!0),o.value.statusMsg===D(s).RUNNING?(x(),r("i",Y)):p("",!0)])}}}),C={key:0,class:"user-avator-list max-h474px overflow-y-auto px16px"},f=["src"],L=["title"],b={class:"text-[#8F8F8F] text-[12px]"},O={key:1,class:"px16px ks-row flex-wrap overflow-hidden max-h372px overflow-y-auto flex-wrap",style:{"row-gap":"8px","column-gap":"8px"}},B=["title"],F=/* @__PURE__ */function(e){return e.DYN_SUBMITTER_MANAGER="DYN_SUBMITTER_MANAGER",e.DYN_SUBMITTER_DEPT_PRINCIPAL="DYN_SUBMITTER_DEPT_PRINCIPAL",e.DYN_MODEL_USERS="DYN_MODEL_USERS",e.DYN_MODEL_USER_MANAGER="DYN_MODEL_USER_MANAGER",e.DYN_DEPT_PRINCIPAL="DYN_DEPT_PRINCIPAL",e.DYN_MODEL_ORG="DYN_MODEL_ORG",e.DYN_MODEL_DEPT_PRINCIPAL="DYN_MODEL_DEPT_PRINCIPAL",e}(F||{}),w=/* @__PURE__ */e(/* @__PURE__ */c({__name:"user-list",props:{userList:{},tag:{},modelKey:{}},setup(e){const s=e,t=E([]),a=E([]);g(async()=>{if(s.tag){a.value=await i();const e=s.tag?.split(",")||[],l=p(e);0!==l.length&&await u(l),t.value=a.value.filter(s=>e.includes(s.value)),console.log("props",s.tag,a,t)}});const n=e=>{if(!e)return{};const{value:s}=e;let t,a;return s.includes("ROLE:")?(t="icon-jiaose1",a="#00B2F8"):s.includes("USER_GROUP:")?(t="icon-yonghuzu1",a="#00D627"):s.includes("ORG:")?(t="icon-bumen1",a="#FF6937"):s.includes("USER:")?(t="icon-renyuan2",a="#2C71FC"):(t="icon-dongtai",a="#B445F5"),{icon:t,iconColor:a,textColor:""}},i=async()=>{const[e,s,t,a]=await Promise.all([h.apaas.role.getList({}),h.apaas.userGroup.getList(),h.apaas.designerCommon.getGetVisibleOrg(),c()]);console.log("get--",e,s,t,a);const o=(e,s)=>(a?.[e]??[]).map(e=>({value:`${s}:${e.key}`,label:e.name}));return[...(e??[]).map(e=>({...e,value:`ROLE:${e.id}`,label:e.name,iconExtraProps:{}})),...(s??[]).map(e=>({...e,value:`USER_GROUP:${e.id}`,label:e.name})),...(t??[]).map(e=>({...e,value:`ORG:${e.id}`,label:e.name})),...(t??[]).map(e=>({...e,value:`${F.DYN_DEPT_PRINCIPAL}:${e.id}`,label:e.name})),...o(l.USER,F.DYN_MODEL_USERS),...o(l.USER,F.DYN_MODEL_USER_MANAGER),...o(l.USER_MULTI,F.DYN_MODEL_USERS),...o(l.USER_MULTI,F.DYN_MODEL_USER_MANAGER),...o(l.ORG,F.DYN_MODEL_DEPT_PRINCIPAL),...o(l.ORG_MULTI,F.DYN_MODEL_DEPT_PRINCIPAL),{value:`${F.DYN_SUBMITTER_MANAGER}:current`,label:"申请人直属上级"},{value:`${F.DYN_SUBMITTER_DEPT_PRINCIPAL}:current`,label:"申请人部门负责人"}]},p=e=>e.filter(e=>e.includes("USER:")&&!a.value.some(s=>s.value===e)).map(e=>e.replace(/USER:/,"")),u=async e=>{const s=(await h.platform.orgUserPicker.getTenantManagementUserListByIds({ids:e.join(",")})??[]).map(e=>({...e,value:`USER:${e.id}`,label:e.fullname}));a.value.push(...s)};async function c(){if(!s.modelKey)return[];const e=await h.apaas.fieldMeta.getList({modelKey:s.modelKey});return e?e.filter(e=>e.type===l.USER||e.type===l.ORG||e.type===l.USER_MULTI||e.type===l.ORG_MULTI).reduce((e,s)=>(e[s.type]||(e[s.type]=[]),e[s.type].push(s),e),{}):void 0}return(s,a)=>e.userList?.length?(x(),r("div",C,[(x(!0),r(o,null,y(e.userList,(e,s)=>(x(),r("div",{key:s,class:"user-item bg-[#FBFBFC] rounded-4px p8px ks-row-middle"},[d("img",{src:"/minio/"+e.avatar||D("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAABRCAYAAACqj0o2AAAAAXNSR0IArs4c6QAADeJJREFUeF7lXAl0lNUV/t4/k8m+T8IWspCETSkCWkFtIbVVKSCIFClgjQgFLVawrdBTrfboOQWXAkpZSohpCQpVEMoieMBEBYsixQUDmgkz2dhmsg9kkvnnfz3vTybOTCYz/2TeP7H1nZNzksx997/3m/vevf99912CEI/TRmNCHImZApC7KHAbgExOItSA4AiA0hapZe+YrKxGTnz9siF+KTgQlJSUaNOzRt8nwTGHgUcALQe2PlhQGwOTAMVV1LorLyuL/a3aUBXEz8pr0qLDIhYDWAogQTUtfMEJahEIKbBJ0rrrslIvqSGDKiBWV1sGtUl4jlLMV9/qlMJCbZRgU7tEV/MGkyuIJUZjRLoQt4JSaSVAIpSqF1o6GcxVNZJ1Na9lzg3EClP9FAppLYCc0ILS66eZNBpNftbgxPd6zaFzYtAgMusbTGJeAcjCYIXpk/kEm6qlluXBWGVQIFZVNWbbJXE/BYb3CQCcHkqBcxC0U3PTEyp6w7LXILLlK0HaQYCY3jz42zaHAlYIZFZuevLhQGXrFYiGSvNiSsn6b4/nDVRt7/QUEAVCfpudkbwuEI4Bg1hRWfc0pfSZQB7yv0ZLCHkmOyP5T0rlDgjE7wKATuACAVIxiBWVdY9RSlkI890ZhC7JyUjZ7E9hRSCWV9XdCYnu/3/bA/2BI++REGZkZyYd8EXrF0QWxrRJ4qf/L17YH3Cen3d4be0NvsIfnyDKr3Ek9nQo40BJktDU2Ix2ux1ajQaxcTHQ6XSB6s6VnsWRNbRlTE8BuU8QDZWWjaBYwlUiL8zqLPUwGIw4f96EmuoLcDgcblR6fTJycrMwYuQw9OuXorY4XvlTkILczORF3j7sEURjdcNEh8NRqpbEzOK+PHMOpz75FJcuXVH8mPT0NIyfcCOGZPPK5Sp+NAiEqd72R68gdrwPx57lmHXukpSB98XnZTj2wQm0tFiVa+BBmTs0G5PybkVyclKveQQ+kRqqqXWU57L2CmJ5pflpQgn3gLq29iLePngEFnNd4PJ7maHRaDBhwk0Yf8uN0GpVTpZ3Pt9b/NgNxC+NV/qHE2LknQ/86MQpvFd6DJJEuQDoyiQ1NQVTpt0Rov2S2qi9LTc3N62mKzD31Ki80ryGULKMl6Zs+TLrY0tYzcGsMj0jDSNHDsOIkUPVtUyCopwM/YNeQVTDCt/avR9fnTOoiV833tHRURg/4SaMGTtKFTBZEH7Nbssa3WmNbsu5otLyZ0qxkpfG77/3IT48/jEvdgHzYcv8nplTkJikyhnZczmZ+qeYUF0gMo+cRmKqCYg+YGm9TKiqrMFr29/kwSooHmFhYTKQKoREjdXGL1Ly8vLELhArTPXzKKTioCR2mVxYsB1Xrph5sQuKD9svfzZ7OjKz0oPi4zmZgM7PzkzZ3gWiwWR+mx2s83jK119VYPeufTxYceMRHh6OBQ/NQ3xCHDeeFNifm6mfJoPISjtiScxFXmHN3j0Hcbbsa27C8mLEvPb0GT/lxQ7MwVhpS4oMoqHS8gAoinhx3/DXQjQ3NfNi55fPuDHDUXG+Fo1NLT5pBYHg18uWICIi3C9PpQQEAitQkEF8FRT5Sif6ohNFES8+v54HK0U8MjMGYPmv5sB6tRWF/9iHCmOtz3mz75vB1cmwep8OEE2WagBpiqT2Q8TSWBs3FPJg5ZdHdHQkVj5+P5KT4mVau13E5sI9KDtn7HHuxEm3YsItN/nlHQCBiZSX16SRsAgGIpdhNluwdQs3J9+jTFqtBo8smonhQ92zOQ6HhIKivfjsjPcA/4Yxo3DX5Nu56OpkQsqrLNOJhD28uF6+bMarW7fzYueVT7guDIsfmtENQCcxs8iNBbtx7uvKbvNZ9ufeWdO4ykcqKi0rKMUqXlwb6huxeRM3H9VNLLYH5s+bgtSURJ8iX2u1YfVftsFsca/1zMgcjJ/PvZeXujIfwtOpMIbXrrXi5bV+D8gCViJtYCryJo7D98eNhEYjKJpvNF3AS6+85pY5YkndufNnKZqvlIgYTJYSAJOUTlBC98LqV7ql+D3nsXAjK2MgBgzQIz42Wv7YIUloa7PLvwuCgJjoSPTvl4S0QaldzkPJ811pdu0txdHSk13/UglEczlAuJbDbdr4Khobmrzqyzzq3ZNvw7ixwxEVqX4JI1vWTz37N7S2tsnyqLKcy01mM6+kgxO1nTvegvF89009fXA/LF5wDxITYgM1qKDoDxw6jgOHP5R58H5rkffEcpPFzvtQvrTkGE78+xM3xVP0CVjx+P0hsT5PxK1XbVj5x/Xy3qhKiGMwWbjn68vKvsK/9rzdpQuL6Z584kG/HjUoc/MzecOWXThTdh4qBNtgjoU7iFbrVax/eUuXWrNn3o5JPxirJkZ+eR8/8Tm27zyMGfdMwfARuX7pAyEgBpO5lVf2xvXBRYWvyefJLDRhy1hpWBKI8IHQ1tU3yQ7m4UcWcE2Hde6J/B0LY8wO5Uve/QC/WzYfgwelBqKvarSr1mzH3PmzufNnjuUsUaHmOi6KoPaCWT7GTIjWQKvxWzvFXTknw9Z2CS3XJEj2q9DootHazncHUyXYZsInxgggIKi3OpAYLSA2SqMaSP4YX24U0WanSEvWwtLsgM3OGcRyk2UbAeb7EyTQz8PDCJJiNbhYLyJSR5ASH5oKBU85JUpRaxGh0xLo4zW4UCeyjDTXwSzxDwCe48q1k5k+TgOrTUJspIBInbL3Xd5yUAo0X3OAEKBdBK61SbwfAe6pME8J+3opO+W5UG+H6F6xxw1M7klZT8nYMuqf2DdL2SkL2w/ZvqjWcB4PsHy6agV/AxK1CNP2nXdusDrQ0sp/GbMvhQI1smYVJss2qoJzcX7zcVGCHOb0xWDvy7UqOJMuXQiKOkHkW/3gCZZAgIFJWrAcYqhH01UHmq6pY4WyLgT5XYf3MSTWzDub4wpYfJSA+BBbo0OiuFAvgnlodQa1tVDrgC7TKDdZ9hFgqjoPA/rCGutbHHKIpd6gh3IyUya7FDSZ51EQVc86o8MFJMeFZm9kbyVXVPTIHStZmJ+dmfRNQRPrGDI4axQr41KlmM9pDSwAjwpXN/AWHR0hjUNFI6SglhpqHcyK4N12eoPJ8iyAJ9Uz/45l3Y+FPColJNj+Z24WYeOcZPDEhPWRyM3Q/77DIl0Gq4ZAWIRRTQfDHsdOPPslaLlndkIFIEBtbZRmObuadIs5eJ9D92TVDEh9nBYsUcFjsCXMMjTtomquuEtMSuja3IyU5c5/dNOgozYnnB2jqn6eyR7OAvG4KI2cIOjtYB6YvZWoF8q4SuZuhd2Ws5M01JfDtRogNlKDmAhBMZgMMJaRaW6VYA+B9TmxoYQ+k5uR4nYr38e1tJgveB/q+7M0Zo0RYQQROkHO/3kudZYbvGqjaLNLcnY6NJbnJrWpmraMUHQtjU3rbBa035/ian0epgUGJIa5sWf7HnsD6atBNZpJuV6aEfm+qmuq2wLQkDUNYpYYptWAgEKnZUcM7oE5e40zN4lgN9tYDBhSSyTYlJOhf9jbF+j30ngaiT2txkGWUxh2ba3s7DmcOVOGEcOyMHP6HaCUQrK3QRLbu8tMCAStTv5hxU/FO/dj4MCBGDaU71mymysJ5tI4Y2QwXMmhWoEByb2JUHVNDQ4efAd19fWyzKwS7LFHHsD11w2V/6aUndC1y2ASIkAI04FowkA6Xfnrb+zHkXePy7Ts9lTepB8ie0gW19XO2hcQURqTk5Pa4906RYFFZzemPbyCcGZ9JaXv46OP3et1mPaJCXF4auVSxMd/U/S07+BRTLh5LPTJ3xR2vn/8JP5evLsbYKNHj8KdP7mdy50+dsUCApnqr2uTIhBli6w0LwYlm4L9mtntgjd37cF5o6lHVtePHIrlj3Zc4nRaW3JyIp5YvkgGstxgwkvrtsIuencyaWmDMHPG3YiJ6ah77O0ghCxT0q1JMYiyxw6yO5MSAJ0K3zvjTlRVX8TJU593YcCAXJQ/G5u3vo6GRt/3ZFL0ejzwi7m9bsKhSnMhpybBAHn4naM49Z/TvTWMgOcNGZKJ2bNmynttICMQABnfgCzRBcjHJEpfDGSPrDhvxM5/7gpEFy60P8qbiPE3K7u3wvZAQuhSJV2ZXIXrFYiMQWfXpjeVeG22jDdvKURTCK+qOZVkN0x/uTAfiYm+bxswLyxAmOOvG5O3b7bXIMrOpiP8YccKPptQfnzyFI4cZfX1fTO+N+o6TJ0yuceHs+ZBRJSm+QpjfEkeFIiMsdz+RYhd46sJ0cbNBWhoCFnv8G76slPGhxcvRHx8x/U110FBC2qo9dE+a4fqKkx5dcNE4nCwW0BuRQAsoN5WvKNvTNDlqV72RgOBsKw3y9dTmaAt0ZWh3AJBiFlB5D4SHfnIo++Weg2qQ41q//79sCD/fvYeZCNEWFUlNX/7WkS7gsK6mugEwsBcUlhUHHHp0uVQY+ZtSYvLly0t1hH6lGtPGx6CcbVET4EYmGtfWPcbh0NcCEJUPUXs2WvQRgoU2MX2zcVb16jSW0ZVEJ2K5efnR5DIAfcRic6Rr8ARqH30wHLdhwiwo6Wuee8bb2zofVMyBaYaEhBd5cjPX5agi4ueLrY7Jmm12h+LosjlsjoAE6X0GCHkkGSzHSgqWhuycCDkIHp+sU+vfjntUq1lnOQQh4OS4ZRKmSAkDRQJIDRBkmhHcSOFDaBWjUZjESXHJZ1OV9Pebj8HSs+0O+ip7QXPd/XuUmA8XEn+CzYbSUiSvfM/AAAAAElFTkSuQmCC"),width:"24",height:"24",style:{"border-radius":"50%"}},null,8,f),d("div",{class:"text-[#474747] ml4px ks-col ell",title:e.username},T(e.username),9,L),d("div",b,T(e.time),1)]))),128))])):(x(),r("div",O,[(x(!0),r(o,null,y(t.value,(e,s)=>(x(),r("div",{key:s,class:"bg-[#FBFBFC] rounded-4px p4px ks-row-middle gap-4px max-w100%"},[d("i",{class:m([`iconfont ${n(e)?.icon}`,"icon-next"]),style:v({fontSize:"16px",lineHeight:1,"--color":n(e)?.iconColor,"--size":"16px"})},null,6),d("div",{class:"ell",title:e.label},T(e.label),9,B)]))),128))]))}}),[["__scopeId","data-v-439e2f12"]]),Q={class:"content py16px"},J={key:0,class:"ks-row-middle text-[#797A7D] mb16px px16px"},H={key:1,class:"px16px mb8px text-[#212528]"},G=/* @__PURE__ */c({__name:"BpmnApproval",props:{data:{}},setup(e){const t=e,{t:a}=S(),l=E(t.data?.statusMsg===s.COMPLETED?"2":"1"),o=n(()=>{const{approvedUsers:e,unApprovedUsers:s}=t.data;return("1"===l.value?s:e)?.map(e=>({avatar:e.middle,username:e.left,time:e.right}))||[]}),i=n(()=>{if(t.data?.statusMsg===s.RUNNING){const{approvedUsers:e,unApprovedUsers:s}=t.data;let a=(e?.length>s?.length?e.length:s?.length)||0;return a>10&&(a=10),40*a+8*(a-1)}return 0});return(t,n)=>{const c=A("a-divider");return x(),r("div",Q,[e.data.statusMsg===D(s).RUNNING?(x(),r("div",J,[d("div",{class:m(["ks-col text-center cursor-pointer",["1"===l.value&&"text-[#3168EC]"]]),onClick:n[0]||(n[0]=e=>l.value="1")},T(D(a)("sys.process.unapproved"))+"("+T(e.data.unApprovedUsers?.length??0)+") ",3),u(c,{type:"vertical","orientation-margin":12,style:{height:"18px",top:"0"}}),d("div",{class:m(["ks-col text-center cursor-pointer",["2"===l.value&&"text-[#3168EC]"]]),onClick:n[1]||(n[1]=e=>l.value="2")},T(D(a)("sys.process.approved"))+"("+T(e.data.approvedUsers?.length??0)+") ",3)])):p("",!0),e.data.statusMsg===D(s).PENDING?(x(),r("div",H,T(D(a)("sys.process.approver")),1)):p("",!0),d("div",{style:v({height:i.value?`${i.value}px`:"auto"})},[u(w,{"user-list":o.value,tag:e.data?.congifString,"model-key":e.data.modelKey},null,8,["user-list","tag","model-key"])],4)])}}}),K={class:"content py16px"},_={class:"px16px"},j={key:0,class:"text-[#666666] mb12px"},W={class:"ks-row text-[#212528]",style:{"column-gap":"4px"}},X=["title"],Z={key:1,class:"ks-row-start text-[#212528] mt12px",style:{"column-gap":"4px"}},V={class:"ell ks-col"},z={key:0,class:"text-[#309C41] ell"},q={key:1,class:"text-[#F54547] ell"},$={class:"text-[12px] text-[#8F8F8F]",style:{"line-height":"24px"}},ee={class:"text-[#212528] mt12px"},se={class:"mt9px mx--16px"},te=/* @__PURE__ */c({__name:"BpmnMessage",props:{data:{}},setup(e){const t=e,{t:a}=S(),l=n(()=>{const{approvedUsers:e}=t.data;return e?.map(e=>({avatar:e.middle,username:e.left,time:e.right}))||[]});return(t,o)=>(x(),r("div",K,[d("div",_,[e.data.statusMsg===D(s).COMPLETED?(x(),r("div",j,T(D(a)("sys.process.bpmnMessageNodeTip")),1)):p("",!0),d("div",W,[d("div",null,T(D(a)("sys.menu.MessageTemplate"))+":",1),d("div",{class:"ell ks-col break-all",title:e.data.msgTmplName},T(e.data.msgTmplName),9,X)]),e.data.statusMsg===D(s).COMPLETED?(x(),r("div",Z,[d("div",null,T(D(a)("sys.message.pushResult"))+":",1),d("div",V,[e.data.messages?.SUCCEED?(x(),r("div",z,T(D(a)("sys.pageDesigner.numOfSuccesses",{num:e.data.messages?.SUCCEED})),1)):p("",!0),e.data.messages?.FAILURE?(x(),r("div",q,T(D(a)("sys.pageDesigner.numOfError",{num:e.data.messages?.FAILURE})),1)):p("",!0)]),d("div",$,T(e.data.finishTime),1)])):p("",!0),d("div",ee,T(D(a)("sys.process.messagePusher")),1),d("div",se,[u(w,{"user-list":l.value,tag:e.data?.congifString,"model-key":e.data.modelKey},null,8,["user-list","tag","model-key"])])])]))}}),ae={class:"content p16px text-[#212528]"},le={class:"ks-row-middle"},oe=["title"],ne=["title"],ie={key:0,class:"ks-row-middle mt8px"},pe=["title"],re=["title"],de={class:"text-[12px] text-[#8F8F8F]"},ue=/* @__PURE__ */c({__name:"BpmnJs",props:{data:{}},setup(e){const{t:s}=S(),t=n(()=>s("sys.script")),a=n(()=>s("sys.pageDesigner.executiveResult")),l=n(()=>s("sys.success"));return(o,n)=>(x(),r("div",ae,[d("div",le,[d("div",{class:m(["ell text-right mr8px",[e.data.finishTime&&"w64px"]]),title:t.value},T(D(s)("sys.script"))+": ",11,oe),d("div",{class:"ell ks-col break-all",title:e.data.scriptName},T(e.data.scriptName),9,ne)]),e.data.finishTime?(x(),r("div",ie,[d("div",{class:"w64px ell text-right mr8px",title:a.value},T(D(s)("sys.pageDesigner.executiveResult"))+": ",9,pe),d("div",{class:"ell ks-col text-[#309C41]",title:l.value},T(D(s)("sys.success")),9,re),d("div",de,T(e.data.finishTime),1)])):p("",!0)]))}}),ce={class:"header px12px py8px bg-[#FAFAFA] border-b-[1px] border-b-[#F0F0F0] ks-row-middle flex-nowrap"},me={class:"ell ks-col text-[#212528] ks-row"},ve=["title"],ge=/* @__PURE__ */c({__name:"node-popover",props:{node:{},width:{}},setup(e){const s=e,{t:l}=S(),{nodeInstStatusMap:o}=t(),p={[a.BpmnApproval]:G,[a.BpmnMessage]:te,[a.BpmnJs]:ue},r=n(()=>o.value[s.node.id]?.data);return(s,t)=>{const o=A("a-popover");return r.value?(x(),i(o,{key:0,placement:"rightTop","overlay-class-name":"task-node-status__popover"},{content:M(()=>[d("div",{class:"rounded-8px overflow-hidden",style:v({width:`${e.width??263}px`})},[d("div",ce,[d("div",me,[d("div",{class:"ell",title:e.node.data?.name},T(e.node.data?.name),9,ve),I(d("div",null," ("+T(D(l)(`sys.process.processApproveWay.${e.node.data?.approveWay}`))+") ",513),[[U,e.node.type===D(a).BpmnApproval]])]),d("div",{class:m(["node-status text-[12px]",`node-status-${r.value.statusMsg}`])},T(D(l)(`sys.process.flowNodeInstStatus.${r.value.statusMsg}`)),3)]),(x(),i(N(p[e.node.type]),{data:r.value},null,8,["data"]))],4)]),default:M(()=>[R(s.$slots,"default")]),_:3})):R(s.$slots,"default",{key:1})}}});export{P as n,ge as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,l as n,r as a}from"./NodeTooltips.vue-BuKpNXoA.js";import{a as r,c as o,i,l as s,n as c,o as p,r as l,t as d}from"./enums-DefcbOFc.js";import{defineAsyncComponent as m}from"vue";var u=Object.defineProperty,f=(e,t)=>{let n={};for(var a in e)u(n,a,{get:e[a],enumerable:!0});return t||u(n,Symbol.toStringTag,{value:"Module"}),n},y=e=>{const{name:t}=e.data;if(!t)return"节点名称不能为空"},g=/* @__PURE__ */f({bpmnTransformer:()=>b,generator:()=>h,nodeView:()=>v,validator:()=>x}),h=function(t={}){const n="Approval_"+e(),a=c.BpmnApproval;return{...t,id:n,type:a,data:{key:n,name:"审批节点",...t.data,type:a,opinionConfig:{enabled:!0,opinionType:[s.Required]}}}},b=function(e){const{key:t,name:n,approveWay:a,buttonConfig:r}=e.data,o=r?.find(e=>e.type===l.Reject);return{tag:"bpmn:userTask",attrs:{id:t,name:n,"camunda:assignee":"${assignee}"},children:[{tag:"bpmn:extensionElements",children:[{tag:"camunda:field",attrs:{name:"REJECT_TO_NODE",stringValue:o?.dismissTo}},{tag:"camunda:field",attrs:{name:"REJECT_APPROVE_TYPE",stringValue:o?.dismissRule}}]},{tag:"bpmn:multiInstanceLoopCharacteristics",attrs:{isSequential:!1,"camunda:collection":`\${approveUserDelegate.execute(execution, '${t}')}`,"camunda:elementVariable":"assignee"},children:[{tag:"bpmn:completionCondition",text:"${nrOfCompletedInstances == "+(a!==d.ApprovedByAll?1:"nrOfInstances")+"}"}]}]}},v=m(()=>import("./BpmnApproval.vue-BQUAB11v.js")),x=[y,e=>{const{enabled:t,opinionType:n}=e.data?.opinionConfig??{};if(t&&!n)return"审批意见不能为空"}],w=/* @__PURE__ */f({bpmnTransformer:()=>E,generator:()=>B,nodeView:()=>$,validator:()=>C}),B=function(t={}){const n="Activity_"+e(),a=c.BpmnBusiness;return{...t,id:n,type:a,data:{key:n,name:"表单隐藏节点",type:a,builtinMsgEnabled:0,msgReceiverConfig:""}}},E=function(e){const{data:t}=e;return{tag:"bpmn:serviceTask",attrs:{id:t.key,name:t.name,"camunda:expression":`\${formTaskDelegate.execute(execution,'${t.key}','${t.nextKey}')}`}}},$=m(()=>import("./BpmnBusiness.vue-C5duJF50.js")),C=[y],T=/* @__PURE__ */f({bpmnTransformer:()=>k,generator:()=>_,nodeView:()=>S,validator:()=>A}),_=function(e={}){const t="__end__",n=c.BpmnEnd;return{...e,id:t,type:n,data:{key:t,name:"结束",type:n}}},k=function(e){const{data:t}=e;return{tag:"bpmn:endEvent",attrs:{id:t.key,name:t.name}}},S=m(()=>import("./BpmnEnd.vue-BjEcQnG0.js")),A=[y],D=/* @__PURE__ */f({bpmnTransformer:()=>j,caseElseGenerator:()=>O,caseIfGenerator:()=>F,generator:()=>N,nodeView:()=>J,validator:()=>I}),N=function(t={}){const n="Exclusive_"+e(),a=c.BpmnExclusive;return{...t,id:n,type:a,data:{key:n,name:"条件分支",type:a},children:[F(),O()]}},F=function(n){return{id:"Case_"+e(),type:t.Flow,caseCfg:{name:"条件"+(n||1),type:"JSON"},children:[]}},O=function(){return{id:"Case_"+e()+"_else",type:t.Flow,caseCfg:{name:"否则"},children:[]}},j=function(e){const{key:t,name:n}=e.data;return{tag:"bpmn:exclusiveGateway",attrs:{id:t,name:n}}},J=m(()=>import("./BpmnExclusive.vue-Cx276gAF.js").then(e=>e.n)),I=[y],P=/* @__PURE__ */f({bpmnTransformer:()=>V,generator:()=>M,nodeView:()=>R,validator:()=>G}),M=function(t={}){const n="Activity_"+e(),a=c.BpmnForm;return{...t,id:n,type:c.BpmnForm,data:{key:n,name:"表单节点",type:a,builtinMsgEnabled:0,msgReceiverConfig:""}}},V=function(e){const{data:t}=e;return{tag:"bpmn:receiveTask",attrs:{id:t.key,name:t.name}}},R=m(()=>import("./BpmnForm.vue-CF07AB3T.js")),G=[y,e=>{const{builtinMsgEnabled:t,msgTmplKey:n,msgReceiverConfig:a}=e.data??{},r=[];return t&&!n&&r.push("消息模板不能为空"),t&&!a&&r.push("消息推送人不能为空"),r},e=>{const{onlineFormTmplId:t}=e.data??{};if(!t)return"在线表单不能为空"}],K=/* @__PURE__ */f({bpmnTransformer:()=>U,generator:()=>L,nodeView:()=>q,validator:()=>z}),L=function(t={}){const n="Gateway_"+e(),a=c.BpmnJoin;return{...t,id:n,type:a,allowDelete:!1,data:{key:n,name:"聚合节点",type:a}}},U=function(e){const{data:t}=e;return{tag:"bpmn:inclusiveGateway",attrs:{id:t.key,name:t.name}}},q=m(()=>import("./BpmnJoin.vue-DZgck71H.js")),z=[y],X=/* @__PURE__ */f({bpmnTransformer:()=>W,generator:()=>Q,nodeView:()=>Y,validator:()=>H}),Q=function(t={}){const n="Activity_"+e(),a=c.BpmnJs;return{...t,id:n,type:a,data:{key:n,name:"脚本节点",type:a}}},W=function(e){const{data:t}=e;return{tag:"bpmn:serviceTask",attrs:{id:t.key,name:t.name,"camunda:expression":`\${scriptTaskDelegate.execute(execution,'${t.key}')}`}}},Y=m(()=>import("./BpmnJs.vue-BdKux96j.js")),H=[y,e=>{const{events:t}=e.data;if(!t||!t.length)return"脚本不能为空"}],Z=/* @__PURE__ */f({bpmnTransformer:()=>te,generator:()=>ee,nodeView:()=>ne,validator:()=>ae}),ee=function(t={}){const n="Activity_"+e(),a=c.BpmnMessage;return{...t,id:n,type:c.BpmnMessage,data:{key:n,name:"消息通知",type:a,msgTmplKey:""}}},te=function(e){const{data:t}=e;return{tag:"bpmn:serviceTask",attrs:{id:t.key,name:t.name,"camunda:expression":`\${sendTaskDelegate.execute(execution,'${t.key}')}`}}},ne=m(()=>import("./BpmnMessage.vue-DABYKBdz.js")),ae=[y,e=>{const{msgTmplKey:t}=e.data;if(!t)return"消息模板不能为空"}],re=/* @__PURE__ */f({DefaultCaseElement:()=>ie,bpmnTransformer:()=>pe,caseElseGenerator:()=>ce,caseIfGenerator:()=>se,generator:()=>oe,nodeView:()=>le,validator:()=>de}),oe=function(t={}){const n="Gateway_"+e()+"_fork",a=c.BpmnParallel;return{...t,id:n,type:a,allowNext:!1,data:{key:n,name:"并行分支",type:a},children:[se(),ce()]}},ie={type:p.String,operator:i.EQ,lType:r.Model,rType:r.Manual},se=function(){return{id:"Case_"+e(),type:t.Flow,caseCfg:{name:"条件",type:"JSON",json:{logicalOperators:"and",elements:[{type:"condition",element:{...ie}}]}},children:[]}},ce=function(){return{id:"Case_"+e()+"_else",type:t.Flow,caseCfg:{name:"否则"},children:[]}},pe=function(e){const{key:t,name:n}=e.data;return{tag:"bpmn:inclusiveGateway",attrs:{id:t,name:n}}},le=m(()=>import("./BpmnParallel.vue-CUi6RogD.js")),de=[y],me=/* @__PURE__ */f({bpmnTransformer:()=>fe,generator:()=>ue,nodeView:()=>ye}),ue=function(e={}){const t="__start__",n=c.BpmnStart;return{...e,id:t,type:n,data:{key:t,name:"开始",type:n}}},fe=function(e){const{data:t}=e;return{tag:"bpmn:startEvent",attrs:{id:t.key,name:t.name}}},ye=m(()=>import("./BpmnStart.vue-lvEOgVJW.js")),ge=/* @__PURE__ */f({bpmnTransformer:()=>be,generator:()=>he,nodeView:()=>ve,validator:()=>xe}),he=function(e={}){const t="__initiator__",n=c.BpmnSubmit;return{...e,id:t,type:c.BpmnSubmit,data:{key:t,name:"开始",...e.data,type:n}}},be=function(e){const{data:t}=e;return{tag:"bpmn:userTask",attrs:{id:t.key,name:t.name}}},ve=m(()=>import("./BpmnStart.vue-lvEOgVJW.js")),xe=[y],we=/* @__PURE__ */Object.assign({"./bpmnApproval.ts":g,"./bpmnBusiness.ts":w,"./bpmnEnd.ts":T,"./bpmnExclusive.ts":D,"./bpmnForm.ts":P,"./bpmnJoin.ts":K,"./bpmnJs.ts":X,"./bpmnMessage.ts":Z,"./bpmnParallel.ts":re,"./bpmnStart.ts":me,"./bpmnSubmit.ts":ge}),Be=Object.keys(we).reduce((e,t)=>(e[t.match(/([a-zA-z\-0-9_]+)(?=.ts)/g)[0]]={...we[t]},e),{}),Ee="function"==typeof Buffer,$e=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),Ce=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Te=((()=>{let e={};Ce.forEach((t,n)=>e[t]=n)})(),String.fromCharCode.bind(String)),_e=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_")),ke="function"==typeof btoa?e=>btoa(e):Ee?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,a,r,o="";const i=e.length%3;for(let s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(a=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=n<<16|a<<8|r,o+=Ce[t>>18&63]+Ce[t>>12&63]+Ce[t>>6&63]+Ce[63&t]}return i?o.slice(0,i-3)+"===".substring(i):o},Se=Ee?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let n=0,a=e.length;n<a;n+=4096)t.push(Te.apply(null,e.subarray(n,n+4096)));return ke(t.join(""))},Ae=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Te(192|t>>>6)+Te(128|63&t):Te(224|t>>>12&15)+Te(128|t>>>6&63)+Te(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Te(240|t>>>18&7)+Te(128|t>>>12&63)+Te(128|t>>>6&63)+Te(128|63&t)},De=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ne=Ee?e=>Buffer.from(e,"utf8").toString("base64"):$e?e=>Se($e.encode(e)):e=>ke(e.replace(De,Ae)),Fe=(e,t=!1)=>t?_e(Ne(e)):Ne(e);function Oe(e=0){return 0===e?"":Array(e).fill(" ").join("")}function je(e,t,n,a){return e?n?`<![CDATA[\${bizProcChoiceExecutor.executeExp(execution,'${t}')}]]>`:`<![CDATA[\${pmChoiceExecutor.executeExp(execution,'${t}','${a}')}]]>`:n?`<![CDATA[\${bizProcChoiceExecutor.execute(execution,'${t}')}]]>`:`<![CDATA[\${pmChoiceExecutor.execute(execution,'${t}','${a}')}]]>`}function Je(e,t=0){const{tag:n,attrs:a={},children:r=[],text:o}=e,i=Object.keys(a).length>0?" "+Object.keys(a).map(e=>`${e}="${a[e]}"`).join(" "):"";return o?`${Oe(t)}<${n}${i}>${o}</${n}>`:r.length>0?`${Oe(t)}<${n}${i}>\n${r.map(e=>Je(e,t+2)).join("\n")}\n${Oe(t)}</${n}>`:`${Oe(t)}<${n}${i} />`}function Ie(e){const{result:t,valueType:a}=e;return a===n.FIELD?"${"+(t.split("$")[1]||t)+"}":a===n.FIXED?t:"${"+t+"}"}function Pe(e){const t=[];return e.forEach(e=>{if("group"===e.type)t.push({type:"conditionGroup",element:{logicalOperators:e.operatorType.toLowerCase(),elements:Pe(e.children)}});else{const{key:a,type:r}=e.leftValue;t.push({type:"condition",element:{left:"${"+a+"}",operator:e.operatorValue,right:(n=e.rightValue,n.length>1?n.map(e=>Ie(e)):Ie(n[0])),type:o[r]}})}var n}),t}var Me=class{static transfer(e,n,a=!1){const r=[],o=function(e,n=!1,a){const r=/* @__PURE__ */new Set,o=[],i=[],s={};let p=[];const l=e=>{e.forEach(e=>{const{type:t}=e;a&&"function"==typeof a&&a(JSON.parse(JSON.stringify(e.data)));const n={data:Be[t].bpmnTransformer(e),nodeId:e.id,type:t};if(s[e.id]=e,o.push(n),(e.type===c.BpmnExclusive||e.type===c.BpmnParallel)&&e.children){const t=e.children.map(t=>(s[t.id]=t,t.children.length>0?e.id+" -> "+t.id+" -> "+t.children.map(e=>e.id).join(" -> "):e.id+" -> "+t.id));p=p.map(n=>n.includes(e.id)?t.map(t=>n.replace(e.id,t)):n).flat(),p=[...new Set(p)],e.children.forEach(e=>{l(e.children)})}})};p.push(e.children.map(e=>e.id).join(" -> ")),l(e.children),console.log("bpmnPaths",p),console.log("bpmnNodeArrayTmp",o),p.forEach(e=>{const n=e.split(" -> ");n.forEach((e,a)=>{if(s[e].type===t.Flow)return;const o=n[a+1];if(o)if(s[o].type===t.Flow){const t=n[a+2];if(!t)return;r.add(`${e} -> ${t}:${o}`)}else r.add(`${e} -> ${o}`)})}),console.log("bpmnFlowSet",r),console.log("bpmnNodeMap",s);for(const t of r.keys()){console.log("生成sequenceFlow",t);const[e,a]=t.split(" -> "),r={tag:"bpmn:sequenceFlow",attrs:{id:`Flow_${Math.random().toString(36).substring(2,10)}`,sourceRef:e,targetRef:a}};if(a.includes(":")){const[e,t]=a.split(":");r.attrs.id=t,r.attrs.targetRef=e;const o=s[t];let i="";if(o.caseCfg.type){if("FORMULA"===o.caseCfg.type){const{exp:e,relationColumns:a}=o.caseCfg.formula,r=JSON.stringify({exp:e,relationColumns:a});i=je(!0,Fe(r),n,t)}else if(o.caseCfg.json){const e=Pe(JSON.parse(o.caseCfg.json.dataRuleConfig))[0].element;i=je(!1,Fe(JSON.stringify(e)),n,t)}r.children=[{tag:"bpmn:conditionExpression",attrs:{"xsi:type":"bpmn:tFormalExpression"},text:i}]}}i.push(r)}console.log("bpmnFlowArray",i);const d={tag:"bpmn:definitions",attrs:{id:"Definitions","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","xmlns:di":"http://www.omg.org/spec/DD/20100524/DI",exporter:"GCT",exporterVersion:"5.2.2",targetNamespace:"http://bpmn.io/schema/bpmn","xmlns:camunda":"http://camunda.org/schema/1.0/bpmn"},children:[{tag:"bpmn:process",attrs:{id:"__process__",isExecutable:"true"},children:[...o.map(e=>{const t={...e.data};t.children??=[];const n=i.filter(e=>e.attrs.targetRef===t.attrs.id).map(e=>({tag:"bpmn:incoming",text:e.attrs.id})),a=i.filter(e=>e.attrs.sourceRef===t.attrs.id).map(e=>({tag:"bpmn:outgoing",text:e.attrs.id}));if(e.type!==c.BpmnParallel&&e.type!==c.BpmnExclusive||(t.attrs.default=a[a.length-1].text),t.children.unshift(...a),t.children.unshift(...n),e.type===c.BpmnApproval){const e=t.children.findIndex(e=>"bpmn:extensionElements"===e.tag),n=t.children.splice(e,1)[0];t.children.unshift(n)}return t}),...i]}]};return console.log(d),d}(e,a,e=>{r.push(e)});return n?.processId&&(o.children[0].attrs.id=n.processId),{xml:Je(o),nodes:r}}},{addNode:Ve,addNextNode:Re,gctFlowData:Ge,setNodeSelected:Ke,registerCustomNode:Le,setGctFlowData:Ue,resetGctFlowData:qe,nodeSelectedId:ze,gctFlowDataMap:Xe}=a();function Qe(e,t=!1){e?Ue("string"==typeof e?JSON.parse(e):e):(qe(),Ve(t?c.BpmnStart:c.BpmnSubmit,{allowDelete:!1}),Ve(c.BpmnEnd,{allowDelete:!1,allowNext:!1})),ze.value&&JSON.stringify(Ge.value).includes(`"id":"${ze.value}"`)||Ke(Ge.value.children[0].id)}function We(){return JSON.stringify(Ge.value)}function Ye(e,t=!1){const n=JSON.parse(JSON.stringify(Ge.value));if(!t){const e=Be[c.BpmnStart].generator();n.children.unshift(e)}return Me.transfer(n,e,t)}function He(e,t,n){if(e.type===c.BpmnParallel){const{id:t}=e,n=Re(t,c.BpmnJoin,{syncDeleteById:t}),a=t.slice(0,t.lastIndexOf("_fork"));n.id=a+"_join",n.data.key=a+"_join"}if(e.type===c.BpmnForm){const t=Re(e.id,c.BpmnBusiness,{syncDeleteById:e.id,hidden:!0},!0);t.data.nextKey=e.id,e.data.prevKey=t.id}t?.type===c.BpmnParallel&&e.type===c.BpmnApproval&&(e.data.key=`Approval_${t.id}_${n.id}_${e.id}`,e.id=`Approval_${t.id}_${n.id}_${e.id}`)}function Ze(e,t){let n=!0;const a="string"==typeof e?Xe.value[e]?.node:e;if(!a)return console.warn("节点不存在或者已经被删除"),{valid:!0};const r=Be[a.type]?.validator,o=t&&t(a)||[];let i=[];return r&&(r.forEach(e=>{const t=e(a);t&&i.push(t)}),i=[...i.flat(),...o],a.tooltips=i,i.length>0&&(n=!1)),a.type!==c.BpmnExclusive&&a.type!==c.BpmnParallel||a.children.forEach((e,t,a)=>{if(t+1>=a.length)return;const r=(e=>{const{name:t,type:n,json:a,formula:r}=e.caseCfg,o=[];return t||o.push("分支名称不能为空"),"FORMULA"!==n||r?.exp?"JSON"!==n||a?.dataRule||o.push("字段条件不能为空"):o.push("条件表达式不能为空"),o})(e);e.tooltips=r,r.length>0&&(n=!1)}),{valid:n}}function et(e){const t=[],n=a=>{a.forEach(a=>{const r=Ze(a,e).valid;t.push(r),a.children&&n(a.children)})};return n(Ge.value.children),{valid:t.every(e=>e)}}function tt(){console.log("flow--",Ge.value);let e=[];const t=[],n=a=>{a.forEach(a=>{if(t.push(JSON.parse(JSON.stringify(a.data))),(a.type===c.BpmnExclusive||a.type===c.BpmnParallel)&&a.children){const t=a.children.map(e=>[a.id,e.id,...e.children?.map(e=>e.id)||[]]);e=e.map(e=>{const n=Array.isArray(e)?e?.findIndex(e=>e===a.id):-1;return n>-1?t.map(t=>{const a=[...e];return a.splice(n,1,...t),a}):[...e]}).flat(),e=[...new Set(e)],a.children.forEach(e=>{n(e.children)})}})};return e.push(Ge.value.children.map(e=>e.id)),n(Ge.value.children),console.log("bpmnPaths",e),{bpmnFlowPathNodeIds:e,bpmnNodes:t}}function nt(e){const{i18n:t}=e||{},n=t?JSON.parse(t):"";return n?n.i18nKey:""}function at(){return{init:Qe,addNode:Ve,resetGctFlowData:qe,toJson:We,toBpmnData:Ye,onNodeCreate:He,validateNode:Ze,validate:et,toFlowPathNodeIds:tt,getI18nName:nt}}Object.keys(Be).forEach(e=>{Le(e,Be[e])});export{F as n,at as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Modal as e,OverlayContainer as t,VITE_MINIO_PATH as r,useNamespace as n}from"@gct-paas/core";import*as o from"vue";import{computed as i,createVNode as a,defineComponent as s,h as c,isVNode as u,provide as l,reactive as d,ref as f,resolveComponent as h}from"vue";import{isFunction as g,isString as p}from"lodash-es";import{ConfigProvider as v,message as m}from"ant-design-vue";var y=Object.create,b=Object.defineProperty,O=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,D=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),I=(e,t)=>{let r={};for(var n in e)b(r,n,{get:e[n],enumerable:!0});return t||b(r,Symbol.toStringTag,{value:"Module"}),r},E=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var o,i=w(t),a=0,s=i.length;a<s;a++)o=i[a],S.call(e,o)||o===r||b(e,o,{get:(e=>t[e]).bind(null,o),enumerable:!(n=O(t,o))||n.enumerable});return e},C=(e,t,r)=>(r=null!=e?y(D(e)):{},E(!t&&e&&e.__esModule?r:b(r,"default",{value:e,enumerable:!0}),e)),P=(e,t)=>{const r=e.__vccOpts||e;for(const[n,o]of t)r[n]=o;return r},j=class{info(e,t){return new Promise(r=>{m.info(e,t?.duration,r)})}success(e,t){return new Promise(r=>{m.success(e,t?.duration,r)})}warning(e,t){return new Promise(r=>{m.warning(e,t?.duration,r)})}error(e,t){return new Promise(r=>{m.error(e,t?.duration,r)})}};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function x(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach(function(t){x(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach(function(t){_(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function L(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(o,n))}}}function H(e){return{}.toString.call(e).includes("Object")}function U(e){return"function"==typeof e}var F=L(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),q=function(e,t){return H(t)||F("changeType"),Object.keys(t).some(function(t){return r=e,n=t,!Object.prototype.hasOwnProperty.call(r,n);var r,n})&&F("changeField"),t},B=function(e){U(e)||F("selectorType")},W=function(e){U(e)||H(e)||F("handlerType"),H(e)&&Object.values(e).some(function(e){return!U(e)})&&F("handlersType")},$=function(e){var t;e||F("initialIsRequired"),H(e)||F("initialType"),t=e,Object.keys(t).length||F("initialContent")};function V(e,t){return U(t)?t(e.current):t}function z(e,t){return e.current=k(k({},e.current),t),t}function G(e,t,r){return U(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null===(n=t[r])||void 0===n?void 0:n.call(t,e.current[r])}),r}var X,Y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$(e),W(t);var r={current:e},n=L(G)(r,t),o=L(z)(r),i=L(q)(e),a=L(V)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return B(e),e(r.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(n,o,i,a)(e)}]},K={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},J=(X=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return n.length>=X.length?X.apply(this,n):function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(t,[].concat(n,o))}})(K),Q=function(e){var t;return e||J("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||J("configType"),e.urls?(console.warn(K.deprecation),{paths:{vs:e.urls.monacoBase}}):e};function Z(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],Z(e[r],t[r]))}),R(R({},e),t)}var ee={type:"cancelation",msg:"operation is manually canceled"};function te(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(ee):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var re,ne=["monaco"],oe=function(e){if(Array.isArray(e))return e}(re=Y({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,o,i,a=[],s=!0,c=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw n}}return a}}(re)||function(e){if(e){if("string"==typeof e)return N(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?N(e,2):void 0}}(re)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),ie=oe[0],ae=oe[1];function se(e){return document.body.appendChild(e)}function ce(e){var t,r,n=ie(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return o.onload=function(){return e()},o.onerror=n.reject,o}function ue(){var e=ie(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;le(r),e.resolve(r)},function(t){e.reject(t)})}function le(e){ie().monaco||ae({monaco:e})}var de=new Promise(function(e,t){return ae({resolve:e,reject:t})}),fe={config:function(e){var t=Q(e),r=t.monaco,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,ne);ae(function(e){return{config:Z(e.config,n),monaco:r}})},init:function(){var e=ie(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(ae({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),te(de);if(window.monaco&&window.monaco.editor)return le(window.monaco),e.resolve(window.monaco),te(de);!function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(se,ce)(ue)}return te(de)},__getMonacoInstance:function(){return ie(function(e){return e.monaco})}},he=new class{_monacoInstance=null;_loadingPromise=null;constructor(){this._configureLoader()}_configureLoader(){fe.config({paths:{vs:location.origin+"/extras/monaco-editor/0.55.1/min/vs"}})}async loadMonaco(){if(this._monacoInstance)return this._monacoInstance;if(this._loadingPromise)return this._loadingPromise;this._loadingPromise=fe.init();try{return this._monacoInstance=await this._loadingPromise,console.info("✓ Monaco Editor loaded successfully"),this._monacoInstance}catch(e){throw console.error("✗ Failed to load Monaco Editor:",e),this._loadingPromise=null,e}}getMonaco(){return this._monacoInstance}isMonacoLoaded(){return null!==this._monacoInstance}async createMonacoEditor(e,t){return(await this.loadMonaco()).editor.create(e,t)}async createMonacoDiffEditor(e,t){return(await this.loadMonaco()).editor.createDiffEditor(e,t)}async createMonacoModel(e,t,r){return(await this.loadMonaco()).editor.createModel(e,t,r)}},ge=/* @__PURE__ */I({Vue:()=>o,Vue2:()=>{},del:()=>ye,install:()=>ve,isVue2:()=>!1,isVue3:()=>!0,set:()=>me});import*as pe from"vue";function ve(){}function me(e,t,r){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,r),r):(e[t]=r,r)}function ye(e,t){Array.isArray(e)?e.splice(t,1):delete e[t]}E(ge,pe,"default");var be=Symbol.for("DndContextType");function Oe(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var we="function"==typeof Symbol&&Symbol.observable||"@@observable",De=function(){return Math.random().toString(36).substring(7).split("").join(".")},Se={INIT:"@@redux/INIT"+De(),REPLACE:"@@redux/REPLACE"+De(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+De()}};function Te(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(Oe(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(Oe(1));return r(Te)(e,t)}if("function"!=typeof e)throw new Error(Oe(2));var o=e,i=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function l(){if(c)throw new Error(Oe(3));return i}function d(e){if("function"!=typeof e)throw new Error(Oe(4));if(c)throw new Error(Oe(5));var t=!0;return u(),s.push(e),function(){if(t){if(c)throw new Error(Oe(6));t=!1,u();var r=s.indexOf(e);s.splice(r,1),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(Oe(7));if(void 0===e.type)throw new Error(Oe(8));if(c)throw new Error(Oe(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=s,r=0;r<t.length;r++)(0,t[r])();return e}return f({type:Se.INIT}),(n={dispatch:f,subscribe:d,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Oe(10));o=e,f({type:Se.REPLACE})}})[we]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Oe(11));function r(){e.next&&e.next(l())}return r(),{unsubscribe:t(r)}}})[we]=function(){return this},e},n}function Ie(e,t,...r){if("undefined"!=typeof process&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=/* @__PURE__ */new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;e=new Error(t.replace(/%s/g,function(){return r[n++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function Ee(e){return"object"==typeof e}var Ce="dnd-core/INIT_COORDS",Pe="dnd-core/BEGIN_DRAG",je="dnd-core/PUBLISH_DRAG_SOURCE",Ne="dnd-core/HOVER",xe="dnd-core/DROP",Me="dnd-core/END_DRAG";function Re(e,t){return{type:Ce,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var _e={type:Ce,payload:{clientOffset:null,sourceClientOffset:null}};function Ae(e){return function(t=[],r={publishSource:!0}){const{publishSource:n=!0,clientOffset:o,getSourceClientOffset:i}=r,a=e.getMonitor(),s=e.getRegistry();e.dispatch(Re(o)),function(e,t,r){Ie(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){Ie(r.getSource(e),"Expected sourceIds to be registered.")})}(t,a,s);const c=function(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,a);if(null==c)return void e.dispatch(_e);let u=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(e){Ie("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),u=i(c)}e.dispatch(Re(o,u));const l=s.getSource(c).beginDrag(a,c);return null!=l?(function(e){Ie(Ee(e),"Item must be an object.")}(l),s.pinSource(c),{type:Pe,payload:{itemType:s.getSourceType(c),item:l,sourceId:c,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!n}}):void 0}}function ke(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){ke(e,t,r[t])})}return e}function He(e){return function(t={}){const r=e.getMonitor(),n=e.getRegistry();!function(e){Ie(e.isDragging(),"Cannot call drop while not dragging."),Ie(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r),function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r).forEach((o,i)=>{const a={type:xe,payload:{dropResult:Le({},t,Ue(o,i,n,r))}};e.dispatch(a)})}}function Ue(e,t,r,n){const o=r.getTarget(e);let i=o?o.drop(n,e):void 0;return function(e){Ie(void 0===e||Ee(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:n.getDropResult()),i}function Fe(e){return function(){const t=e.getMonitor(),r=e.getRegistry();!function(e){Ie(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const n=t.getSourceId();return null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:Me}}}function qe(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function Be(e){return function(t,{clientOffset:r}={}){!function(e){Ie(Array.isArray(e),"Expected targetIds to be an array.")}(t);const n=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,r){for(let n=e.length-1;n>=0;n--){const o=e[n];qe(t.getTargetType(o),r)||e.splice(n,1)}}(n,i,o.getItemType()),function(e,t,r){Ie(t.isDragging(),"Cannot call hover while not dragging."),Ie(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const t=e[n];Ie(e.lastIndexOf(t)===n,"Expected targetIds to be unique in the passed array."),Ie(r.getTarget(t),"Expected targetIds to be registered.")}}(n,o,i),function(e,t,r){e.forEach(function(e){r.getTarget(e).hover(t,e)})}(n,o,i),{type:Ne,payload:{targetIds:n,clientOffset:r||null}}}}function We(e){return function(){if(e.getMonitor().isDragging())return{type:je}}}var $e=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store,r=function(e){return{beginDrag:Ae(e),publishDragSource:We(e),hover:Be(e),drop:He(e),endDrag:Fe(e)}}(this);return Object.keys(r).reduce((n,o)=>{const i=r[o];var a;return n[o]=(a=i,(...r)=>{const n=a.apply(e,r);void 0!==n&&t(n)}),n},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function Ve(e,t){return{x:e.x-t.x,y:e.y-t.y}}var ze=[],Ge=[];ze.__IS_NONE__=!0,Ge.__IS_ALL__=!0;var Xe=class{subscribeToStateChange(e,t={}){const{handlerIds:r}=t;Ie("function"==typeof e,"listener must be a function."),Ie(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{o===n||o===n+1&&!function(e,t){return e!==ze&&(e===Ge||void 0===t||(r=t,n=e,r.filter(e=>n.indexOf(e)>-1)).length>0);var r,n}(t.dirtyHandlerIds,r)||e()}finally{n=o}})}subscribeToOffsetChange(e){Ie("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Ie(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);return Ie(t,`Expected to find a valid target. targetId=${e}`),!(!this.isDragging()||this.didDrop())&&qe(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);return Ie(t,`Expected to find a valid source. sourceId=${e}`),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:r}=t;if(!this.isDragging())return!1;const n=this.registry.getTargetType(e),o=this.getItemType();if(o&&!qe(n,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return r?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return t&&r&&n?Ve((i=n,{x:(o=t).x+i.x,y:o.y+i.y}),r):null;var o,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:r}=e;return t&&r?Ve(t,r):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},Ye="undefined"!=typeof global?global:self,Ke=Ye.MutationObserver||Ye.WebKitMutationObserver;function Je(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}var Qe,Ze="function"==typeof Ke?function(e){let t=1;const r=new Ke(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:Je,et=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},tt=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,r=e.length-this.index;t<r;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ze(this.flush),this.requestErrorThrow=Je(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},rt=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new et(this.onError,e=>t[t.length]=e);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(tt.registerPendingError),nt="dnd-core/ADD_SOURCE",ot="dnd-core/ADD_TARGET",it="dnd-core/REMOVE_SOURCE",at="dnd-core/REMOVE_TARGET";function st(e,t){t&&Array.isArray(e)?e.forEach(e=>st(e,!1)):Ie("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(Qe||(Qe={}));var ct=0;function ut(e){switch(e[0]){case"S":return Qe.SOURCE;case"T":return Qe.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function lt(e,t){const r=e.entries();let n=!1;do{const{done:e,value:[,o]}=r.next();if(o===t)return!0;n=!!e}while(!n);return!1}var dt=class{addSource(e,t){st(e),function(e){Ie("function"==typeof e.canDrag,"Expected canDrag to be a function."),Ie("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Ie("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const r=this.addHandler(Qe.SOURCE,e,t);return this.store.dispatch(function(e){return{type:nt,payload:{sourceId:e}}}(r)),r}addTarget(e,t){st(e,!0),function(e){Ie("function"==typeof e.canDrop,"Expected canDrop to be a function."),Ie("function"==typeof e.hover,"Expected hover to be a function."),Ie("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const r=this.addHandler(Qe.TARGET,e,t);return this.store.dispatch(function(e){return{type:ot,payload:{targetId:e}}}(r)),r}containsHandler(e){return lt(this.dragSources,e)||lt(this.dropTargets,e)}getSource(e,t=!1){return Ie(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Ie(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Ie(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Ie(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return ut(e)===Qe.SOURCE}isTargetId(e){return ut(e)===Qe.TARGET}removeSource(e){var t;Ie(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:it,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},tt.enqueueTask(rt.create(t))}removeTarget(e){Ie(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:at,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Ie(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Ie(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){const n=function(e){const t=(ct++).toString();switch(e){case Qe.SOURCE:return`S${t}`;case Qe.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}(e);return this.types.set(n,t),e===Qe.SOURCE?this.dragSources.set(n,r):e===Qe.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=/* @__PURE__ */new Map,this.dragSources=/* @__PURE__ */new Map,this.dropTargets=/* @__PURE__ */new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},ft=(e,t)=>e===t;function ht(e=ze,t){switch(t.type){case Ne:break;case nt:case ot:case at:case it:return ze;default:return Ge}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,o=function(e,t){const r=/* @__PURE__ */new Map,n=e=>{r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);const o=[];return r.forEach((e,t)=>{1===e&&o.push(t)}),o}(r,n);if(!(o.length>0)&&function(e,t,r=ft){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}(r,n))return ze;const i=n[n.length-1],a=r[r.length-1];return i!==a&&(i&&o.push(i),a&&o.push(a)),o}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function vt(e=pt,t){const{payload:r}=t;switch(t.type){case Ce:case Pe:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Ne:return n=e.clientOffset,o=r.clientOffset,!n&&!o||n&&o&&n.x===o.x&&n.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){gt(e,t,r[t])})}return e}({},e,{clientOffset:r.clientOffset});case Me:case xe:return pt;default:return e}var n,o}function mt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){mt(e,t,r[t])})}return e}var bt={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ot(e=bt,t){const{payload:r}=t;switch(t.type){case Pe:return yt({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case je:return yt({},e,{isSourcePublic:!0});case Ne:return yt({},e,{targetIds:r.targetIds});case at:return-1===e.targetIds.indexOf(r.targetId)?e:yt({},e,{targetIds:(n=e.targetIds,o=r.targetId,n.filter(e=>e!==o))});case xe:return yt({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Me:return yt({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var n,o}function wt(e=0,t){switch(t.type){case nt:case ot:return e+1;case it:case at:return e-1;default:return e}}function Dt(e=0){return e+1}function St(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){St(e,t,r[t])})}return e}function It(e={},t){return{dirtyHandlerIds:ht(e.dirtyHandlerIds,{type:t.type,payload:Tt({},t.payload,{prevTargetIds:(r=e,n=[],"dragOperation.targetIds".split(".").reduce((e,t)=>e&&e[t]?e[t]:n||null,r))})}),dragOffset:vt(e.dragOffset,t),refCount:wt(e.refCount,t),dragOperation:Ot(e.dragOperation,t),stateId:Dt(e.stateId)};var r,n}function Et(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ct=0,Pt=Symbol.for("__VUE_DND_CONTEXT_INSTANCE__");function jt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t;return o[Pt]||(o[Pt]=function(e,t,r={},n=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Te(It,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(n),i=new $e(o,new Xe(o,new dt(o))),a=e(i,t,r);return i.receiveBackend(a),i}(e,t,r,n)),o[Pt]}function Nt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:window}var xt=(0,ge.defineComponent)({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(e,t){var r,n,o,i,a=t.slots,s=(o=function(e){return function(e){return"manager"in e&&e.manager}(e)?[e.manager,!1]:[jt(e.backend,e.context,e.options,e.debugMode),!e.context]}(e),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(o,i)||function(e,t){if(e){if("string"==typeof e)return Et(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Et(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],u=s[1];return u&&++Ct,(0,ge.onUnmounted)(function(){if(u){var e=Nt();0===--Ct&&(e[Pt]=null)}}),r=c,(0,ge.provide)(be,r),function(){var e;return null!==(n=null===(e=a.default)||void 0===e?void 0:e.call(a))&&void 0!==n?n:null}}});(0,ge.defineComponent)({props:{connect:{type:Function,required:!0},src:{type:String,required:!0}},setup:function(e){return(0,ge.watchEffect)(function(){if("undefined"!=typeof Image){var t=!1,r=new Image;return r.src=e.src,r.onload=function(){e.connect(r),t=!0},function(){t&&e.connect(null)}}}),function(){return null}}});var Mt=!1,Rt=!1,_t=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.sourceId=e},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){Ie(!Mt,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Mt=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Mt=!1}},t.isDragging=function(){if(!this.sourceId)return!1;Ie(!Rt,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Rt=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Rt=!1}},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.isDraggingSource=function(e){return this.internalMonitor.isDraggingSource(e)},t.isOverTarget=function(e,t){return this.internalMonitor.isOverTarget(e,t)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(e){return this.internalMonitor.subscribeToOffsetChange(e)},t.canDragSource=function(e){return this.internalMonitor.canDragSource(e)},t.canDropOnTarget=function(e){return this.internalMonitor.canDropOnTarget(e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}(),At=!1,kt=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.targetId=e},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.canDrop=function(){if(!this.targetId)return!1;Ie(!At,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return At=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{At=!1}},t.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();function Lt(e){return function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((t=r)&&t.__v_skip&&function(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a <div>, or turn it into a drag source or a drop target itself.")}(),!function(e){return!!(r=e)&&!0===r.__v_isVNode&&"symbol"!=((t=e.type)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t,r}(r)){var o=r;return e(o,n),o}}}function Ht(e){var t={};return Object.keys(e).forEach(function(r){var n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{var o=Lt(n);t[r]=function(){return o}}}),t}function Ut(e,t,r,n){let o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<i.length;c++){const a=i[c];if(!s(a))return!1;const u=e[a],l=t[a];if(o=r?r.call(n,u,l,a):void 0,!1===o||void 0===o&&u!==l)return!1}return!0}function Ft(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var qt=/* @__PURE__ */function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Ht({dragSource:function(e,t){r.clearDragSource(),r.dragSourceOptions=t||null,r.dragSourceNode=e,r.reconnectDragSource()},dragPreview:function(e,t){r.clearDragPreview(),r.dragPreviewOptions=t||null,r.dragPreviewNode=e,r.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceOptionsInternal=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,r,n=e.prototype;return n.receiveHandlerId=function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())},n.reconnect=function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)},n.reconnectDragSource=function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t},n.reconnectDragPreview=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(t?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)},n.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},n.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},n.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},n.didDragSourceOptionsChange=function(){return!Ut(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},n.didDragPreviewOptionsChange=function(){return!Ut(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},n.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},n.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},n.clearDragSource=function(){this.dragSourceNode=null},n.clearDragPreview=function(){this.dragPreviewNode=null},t=e,(r=[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}])&&Ft(t.prototype,r),e}();function Bt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Wt=/* @__PURE__ */function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Ht({dropTarget:function(e,t){r.clearDropTarget(),r.dropTargetOptions=t,(0,ge.isRef)(e)?r.dropTargetRef=e:r.dropTargetNode=e,r.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,r,n=e.prototype;return n.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},n.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},n.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},n.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},n.didOptionsChange=function(){return!Ut(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},n.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},n.clearDropTarget=function(){this.dropTargetRef=null,this.dropTargetNode=null},t=e,(r=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.value}}])&&Bt(t.prototype,r),e}(),$t=/* @__PURE__ */function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=r,this.connector=n}var t=e.prototype;return t.beginDrag=function(){var e,t=this.spec,r=this.monitor;return null!=(e="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(r):{})?e:null},t.canDrag=function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)},t.isDragging=function(e,t){var r=this.spec,n=this.monitor,o=r.isDragging;return o?o(n):t===e.getSourceId()},t.endDrag=function(){var e=this.spec,t=this.monitor,r=this.connector,n=e.end;n&&n(t.getItem(),t),r.reconnect()},e}();function Vt(){var e=(0,ge.inject)(be);return Ie(null!=e,"Expected drag drop context"),e}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gt(e,t,r){var n=Vt(),o=function(e,t,r){var n=(0,ge.computed)(function(){return new $t((0,ge.unref)(e),(0,ge.unref)(t),(0,ge.unref)(r))});return(0,ge.watchEffect)(function(){n.value.spec=(0,ge.unref)(e)}),n}(e,t,r),i=function(e){return(0,ge.computed)(function(){var t=(0,ge.unref)(e).type;return Ie(null!=t,"spec.type must be defined"),t})}(e);(0,ge.watchEffect)(function(e){if(null!=(0,ge.unref)(i)){var a=(u=function(e,t,r){var n=r.getRegistry(),o=n.addSource(e,t);return[o,function(){return n.removeSource(o)}]}((0,ge.unref)(i),(0,ge.unref)(o),(0,ge.unref)(n)),l=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(u,l)||function(e,t){if(e){if("string"==typeof e)return zt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zt(e,t):void 0}}(u,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];(0,ge.unref)(t).receiveHandlerId(s),(0,ge.unref)(r).receiveHandlerId(s),e(c)}var u,l})}function Xt(e){return(0,ge.computed)(function(){return"function"==typeof e?e():e})}var Yt=/* @__PURE__ */C(/* @__PURE__ */T((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!==o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!==o--;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}})());function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jt(e,t,r){var n,o,i=(n=function(e,t,r){var n=(0,ge.ref)((0,ge.unref)(t)((0,ge.unref)(e))),o=function(){var o=(0,ge.unref)(t)((0,ge.unref)(e));(0,Yt.default)(n.value,o)||(n.value=o,r&&r())};return(0,ge.watchEffect)(o),[n,o]}(e,t,r),o=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(n,o)||function(e,t){if(e){if("string"==typeof e)return Kt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kt(e,t):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],s=i[1];return(0,ge.watchEffect)(function(t){var r=(0,ge.unref)(e).getHandlerId();null!=r&&t((0,ge.unref)(e).subscribeToStateChange(s,{handlerIds:[r]}))}),a}function Qt(e,t,r){return Jt(t,e||function(){return{}},function(){return(0,ge.unref)(r).reconnect()})}function Zt(e,t){var r=(0,ge.reactive)({el:null,options:(0,ge.unref)(t)});return(0,ge.watchEffect)(function(){e(r)},{flush:"post"}),function(e,n){me(r,"el",e);var o=(0,ge.unref)(t)||n;return(0,Yt.default)(r.options,o)||me(r,"options",o),(0,ge.unref)(e)}}function er(e,t){return Zt(function(t){(0,ge.unref)(e).hooks.dragSource()(t.el,t.options)},(0,ge.computed)(function(){return(0,ge.unref)(t).options}))}function tr(e,t){return Zt(function(t){(0,ge.unref)(e).hooks.dragPreview()(t.el,t.options)},(0,ge.computed)(function(){return(0,ge.unref)(t).previewOptions}))}function rr(e){var t,r=Xt(e),n=(t=Vt(),(0,ge.computed)(function(){return new _t((0,ge.unref)(t))})),o=function(e,t){var r=Vt(),n=(0,ge.computed)(function(){return new qt((0,ge.unref)(r).getBackend())});return(0,ge.watchEffect)(function(t){n.value.dragSourceOptions=(0,ge.unref)(e)||null,(0,ge.unref)(n).reconnect(),t(function(){n.value.disconnectDragSource()})}),(0,ge.watchEffect)(function(e){n.value.dragPreviewOptions=(0,ge.unref)(t)||null,(0,ge.unref)(n).reconnect(),e(function(){n.value.disconnectDragPreview()})}),n}((0,ge.computed)(function(){return(0,ge.unref)(r).options}),(0,ge.computed)(function(){return(0,ge.unref)(r).previewOptions}));return Gt(r,n,o),[Qt((0,ge.computed)(function(){return(0,ge.unref)(r).collect||function(){return{}}}),n,o),er(o,r),tr(o,r)]}var nr=/* @__PURE__ */function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=r}var t=e.prototype;return t.canDrop=function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)},t.hover=function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)},t.drop=function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)},e}();function or(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ir(e,t,r){var n=Vt(),o=function(e,t){var r=(0,ge.computed)(function(){return new nr((0,ge.unref)(e),(0,ge.unref)(t))});return(0,ge.watchEffect)(function(){r.value.spec=(0,ge.unref)(e)}),r}(e,t),i=function(e){return(0,ge.computed)(function(){var t=(0,ge.unref)(e).accept;return Ie(null!=t,"accept must be defined"),Array.isArray(t)?t:[t]})}(e);(0,ge.watchEffect)(function(e){var a,s,c=(a=function(e,t,r){var n=(0,ge.unref)(r).getRegistry(),o=n.addTarget((0,ge.unref)(e),(0,ge.unref)(t));return[o,function(){return n.removeTarget(o)}]}(i,o,n),s=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(a,s)||function(e,t){if(e){if("string"==typeof e)return or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?or(e,t):void 0}}(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],l=c[1];(0,ge.unref)(t).receiveHandlerId(u),(0,ge.unref)(r).receiveHandlerId(u),e(l)})}function ar(e,t){return Zt(function(t){(0,ge.unref)(e).hooks.dropTarget()(t.el,t.options)},(0,ge.computed)(function(){return(0,ge.unref)(t).options}))}function sr(e){var t,r=Xt(e),n=(t=Vt(),(0,ge.computed)(function(){return new kt((0,ge.unref)(t))})),o=function(e){var t=Vt(),r=(0,ge.computed)(function(){return new Wt((0,ge.unref)(t).getBackend())});return(0,ge.watchEffect)(function(t){r.value.dropTargetOptions=(0,ge.unref)(e)||null,r.value.reconnect(),t(function(){return r.value.disconnectDropTarget()})}),r}((0,ge.computed)(function(){return(0,ge.unref)(r).options}));return ir(r,n,o),[Qt((0,ge.computed)(function(){return(0,ge.unref)(r).collect||function(){return{}}}),n,o),ar(o,r)]}function cr(e){let t=null;return()=>(null==t&&(t=e()),t)}var ur=class{enter(e){const t=this.entered.length;return this.entered=function(e,t){const r=/* @__PURE__ */new Set,n=e=>r.add(e);e.forEach(n),t.forEach(n);const o=[];return r.forEach(e=>o.push(e)),o}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var r,n;return this.entered=(r=this.entered.filter(this.isNodeInDocument),n=e,r.filter(e=>e!==n)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},lr=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(r=>{const n=this.config.exposeProperties[r];null!=n&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},dr=/* @__PURE__ */I({FILE:()=>fr,HTML:()=>pr,TEXT:()=>gr,URL:()=>hr}),fr="__NATIVE_FILE__",hr="__NATIVE_URL__",gr="__NATIVE_TEXT__",pr="__NATIVE_HTML__";function vr(e,t,r){const n=t.reduce((t,r)=>t||e.getData(r),"");return null!=n?n:r}var mr={[fr]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[pr]:{exposeProperties:{html:(e,t)=>vr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[hr]:{exposeProperties:{urls:(e,t)=>vr(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[gr]:{exposeProperties:{text:(e,t)=>vr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function yr(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(mr).filter(e=>{const r=mr[e];return!!(null==r?void 0:r.matchesTypes)&&r.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}var br=cr(()=>/firefox/i.test(navigator.userAgent)),Or=cr(()=>Boolean(window.safari)),wr=class{interpolate(e){const{xs:t,ys:r,c1s:n,c2s:o,c3s:i}=this;let a=t.length-1;if(e===t[a])return r[a];let s,c=0,u=i.length-1;for(;c<=u;){s=Math.floor(.5*(c+u));const n=t[s];if(n<e)c=s+1;else{if(!(n>e))return r[s];u=s-1}}a=Math.max(0,u);const l=e-t[a],d=l*l;return r[a]+n[a]*l+o[a]*d+i[a]*l*d}constructor(e,t){const{length:r}=e,n=[];for(let h=0;h<r;h++)n.push(h);n.sort((t,r)=>e[t]<e[r]?-1:1);const o=[],i=[],a=[];let s,c;for(let h=0;h<r-1;h++)s=e[h+1]-e[h],c=t[h+1]-t[h],i.push(s),o.push(c),a.push(c/s);const u=[a[0]];for(let h=0;h<i.length-1;h++){const e=a[h],t=a[h+1];if(e*t<=0)u.push(0);else{s=i[h];const r=i[h+1],n=s+r;u.push(3*n/((n+r)/e+(n+s)/t))}}u.push(a[a.length-1]);const l=[],d=[];let f;for(let h=0;h<u.length-1;h++){f=a[h];const e=u[h],t=1/i[h],r=e+u[h+1]-f-f;l.push((f-e-r)*t),d.push(r*t*t)}this.xs=e,this.ys=t,this.c1s=u,this.c2s=l,this.c3s=d}};function Dr(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function Sr(e){return{x:e.clientX,y:e.clientY}}var Tr=class{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function Ir(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){Ir(e,t,r[t])})}return e}var Cr=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);const n=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",n),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",n),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const r=t=>this.handleDragEnter(t,e),n=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",n),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",n),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Er({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Er({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(dr).some(t=>dr[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const r=mr[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new lr(r);return n.loadDataTransfer(t),n}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=/* @__PURE__ */new Map,this.sourcePreviewNodeOptions=/* @__PURE__ */new Map,this.sourceNodes=/* @__PURE__ */new Map,this.sourceNodeOptions=/* @__PURE__ */new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Dr(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const r=Sr(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:n}=e,o=yr(n);if(this.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:i,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=function(e,t,r,n,o){const i=function(e){var t;return"IMG"===e.nodeName&&(br()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),a=Dr(i?e:t),s={x:r.x-a.x,y:r.y-a.y},{offsetWidth:c,offsetHeight:u}=e,{anchorX:l,anchorY:d}=n,{dragPreviewWidth:f,dragPreviewHeight:h}=function(e,t,r,n){let o=e?t.width:r,i=e?t.height:n;return Or()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(i,t,c,u),{offsetX:g,offsetY:p}=o,v=0===p||p;return{x:0===g||g?g:new wr([0,.5,1],[s.x,s.x/c*f,s.x+f-c]).interpolate(l),y:v?p:(()=>{let e=new wr([0,.5,1],[s.y,s.y/u*h,s.y+h-u]).interpolate(d);return Or()&&i&&(e+=(window.devicePixelRatio-1)*h),e})()}}(t,o,r,{anchorX:e,anchorY:i},{offsetX:a,offsetY:s});n.setDragImage(o,c.x,c.y)}}try{null==n||n.setData("application/json",{})}catch(i){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(n&&!n.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)),!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:r}=e,n=yr(r);n&&this.beginDragNativeItem(n,r)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Sr(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{var t;this.dragOverTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Sr(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;this.dropTargetIds=[],this.isDraggingNativeItem()?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):yr(e.dataTransfer)&&e.preventDefault(),this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Sr(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Tr(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new ur(this.isNodeInDocument)}},Pr=function(e,t,r){return new Cr(e,t,r)},jr={"zh-CN":()=>import("./zh_CN-TmE4LVWm.js"),"en-US":()=>import("./en_US-CsMalKr8.js"),"pt-PT":()=>import("./pt_PT-BWSTPDc8.js"),"tr-TR":()=>import("./tr_TR-DFflgWBG.js"),"zh-TW":()=>import("./zh_TW-CkLTTF7p.js"),"ja-JP":()=>import("./ja_JP-Bh5yjd5R.js"),"vi-VN":()=>import("./vi_VN-pWDyqq2t.js"),"de-GE":()=>import("./de_DE-WZ3EB5Ei.js"),"fr-FR":()=>import("./fr_FR-C6_kWsnc.js"),"es-ES":()=>import("./es_ES-B9hxIQ3B.js"),"ru-RU":()=>import("./ru_RU-BhsOXNnH.js")},Nr=f({locale:""});function xr(){if(Nr.value.locale!==_gct.i18n.global.locale){const e=jr[_gct.i18n.global.locale];e&&e().then(e=>{Nr.value=e.default})}return{getAntdLocale:Nr}}var Mr=d({});function Rr(){return{themeVars:Mr,setPrimaryColor:function(e){Mr.primaryColor=e,v.config({theme:{primaryColor:e}})}}}function _r(e,t,r={}){const n=r.minValue??10,o=f(e),a=d({offset:"offsetWidth",client:"clientX",clientMove:0,rowType:t,offsetWidth:2e3});function s(e){const t=e-a.clientMove;o.value=c(c(o.value)+t),a.clientMove=e}function c(e){return"right"===a.rowType||"bottom"===a.rowType?a.offsetWidth-e:e}return{moveDomDown:function(e,t,r){const n=t,o=e;a.offsetWidth=n[a.offset]??0,a.clientMove=o[a.client]??0,e.preventDefault(),document.onmousemove=e=>{s(e[a.client]??0)},document.onmouseup=()=>{document.onmouseup=null,document.onmousemove=null,r?.()}},moveMobileDomDown:function(e,t,r){const n=t,o=e.touches[0];o&&(a.offsetWidth=n[a.offset]??0,a.clientMove=o[a.client]??0,e.preventDefault(),document.ontouchmove=e=>{s(e.touches[0][a.client]??0)},document.ontouchend=()=>{document.ontouchend=null,document.ontouchmove=null,r?.()})},start:i({get:()=>o.value<n?n:o.value>a.offsetWidth-n?a.offsetWidth-n:o.value,set(e){o.value=e}})}}var Ar={};function kr(e,{random:t=!0}={}){if(!e)return"/404.png";const n=`${r}${e.startsWith("/")?"":"/"}${e}`;if(!t)return n;if(Ar[e]&&Date.now()-Ar[e].timestamp<6e4)return`${n}?${Ar[e].random}`;Object.keys(Ar).length>100&&(Ar={});const o=Math.random();return Ar[e]={random:o,timestamp:Date.now()},`${n}?${o}`}function Lr(e){return e?`${r}${e.startsWith("/")?"":"/"}${e}`:e}var Hr=/* @__PURE__ */s({props:{opts:{type:Object,default:()=>({})}},setup(t,r){const o=n("modal"),i=f(!1),s=f(!!t.opts.defaultFullscreen),d=()=>{s.value=!s.value},g=f({});t.opts&&Object.assign(g.value,t.opts);let p=null;const m=new e({dismiss:e=>{i.value=!1,p=e,r.emit("dismiss",p)},setOptions(e){Object.assign(g.value,e)}});l("modal",m);const y=e=>m.dismiss(e);r.expose({present:()=>{i.value=!0},dismiss:y});const b=f(!1),O=async()=>{if(m.ok)try{b.value=!0;const e=await m.ok();b.value=!1,!e||!0!==e.ok&&!0!==e.close||y(e)}finally{b.value=!1}else console.warn("打开模态未实现ok方法")},w=async()=>{m.cancel&&!1===await m.cancel()||y()},{getAntdLocale:D}=xr();return()=>{let e;const t=r.slots.default?.();return t&&t.length>0&&(t[0].props.modal=m),a(v,{locale:D.value},{default:()=>{return[a(xt,{backend:Pr},(r=e=c(h("a-modal"),{visible:i.value,class:[o.b(),g.value.placement&&o.m(g.value.placement),g.value.modalClass,o.is("hidden-footer",!1===g.value.showFooter),o.is("hidden-close-btn",!1===g.value.showCloseBtn),o.is("hidden-cancel-btn",!1===g.value.showCancelBtn),o.is("full-screen",s.value)],centered:!0,onOk:O,confirmLoading:b.value,onCancel:w,okText:"确认",okButtonProps:{disabled:m.state.okDisabled},...g.value},[!1!==g.value.canFullscreen?a("div",{class:o.e("full-screen"),onClick:d},[a("i",{class:"iconfont "+(s.value?"icon-tuichuquanping":"icon-quanping")},null)]):null,t]),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!u(r)?e:{default:()=>[e]}))];var r}})}}}),Ur=class{async modal(e,t,r){const n=this.createModal(e,t,r);return n.present(),n.onWillDismiss()}createModal(e,r,n){return function(e,r){return new t(Hr,e,r)}(g(e)?e:()=>c(function(e){return p(e)?h(e):e}(e),{...r}),n)}},Fr=new Ur,qr=(e,t)=>(e.install=r=>{const n=e.name||e.displayName;n&&(r.component(n,e),t&&(r.config.globalProperties[t]=e))},e),Br={VS:"vs",BLACK:"hc-black",DARK:"vs-dark"},Wr={JS:"javascript",SQL:"sql",PWSH:"powershell",JAVA:"java",C_SHARP:"csharp",JSON:"json"},$r=class{value;title;language;theme;readonly};export{P as _,Ur as a,C as b,kr as c,xr as d,sr as f,j as g,fe as h,qr as i,_r as l,he as m,$r as n,Fr as o,rr as p,Br as r,Lr as s,Wr as t,Rr as u,T as v,I as y};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { withInstall } from "../../utils/with-install.mjs";
|
|
2
|
-
import "../../utils/index.mjs";
|
|
3
|
-
import Cropper_default from "./src/Cropper.vue.mjs";
|
|
4
|
-
import CropperAvatar_default from "./src/CropperAvatar.vue.mjs";
|
|
5
|
-
import CropperFree_default from "./src/CropperFree.vue.mjs";
|
|
6
|
-
//#region src/modules/Cropper/index.ts
|
|
7
|
-
var CropperImage = withInstall(Cropper_default);
|
|
8
|
-
var CropperAvatar = withInstall(CropperAvatar_default);
|
|
9
|
-
var CropperFree = withInstall(CropperFree_default);
|
|
10
|
-
//#endregion
|
|
11
|
-
export { CropperAvatar, CropperFree, CropperImage };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/es/modules/{Cropper → picture-cropper}/src/Cropper.vue_vue_type_style_index_0_lang.css
RENAMED
|
File without changes
|