@wyltils/ems-editor 1.0.49 → 1.0.50

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/index.es.js CHANGED
@@ -24727,7 +24727,7 @@ const Ert = { class: "formNode" }, Irt = {
24727
24727
  c.value = !0;
24728
24728
  try {
24729
24729
  r.httpRequest(m).then((v) => {
24730
- c.value = !1, v && v.success && m.parse && (g(v, p.id), o.value.buttonSuccess && $s.success(o.value.buttonSuccessTips)), v && !v.success && m.parse && (g(v, p.id), o.value.buttonError && $s.error(v.msg || "操作失败!"));
24730
+ c.value = !1, v && v.success && (m.parse && g(v, p.id), o.value.buttonSuccess && $s.success(o.value.buttonSuccessTips)), v && !v.success && (m.parse && g(v, p.id), o.value.buttonError && $s.error(v.msg || "操作失败!"));
24731
24731
  });
24732
24732
  } catch (v) {
24733
24733
  c.value = !1, $s.error("操作失败!"), console.error(v);
@@ -24893,7 +24893,7 @@ const Ert = { class: "formNode" }, Irt = {
24893
24893
  ]);
24894
24894
  };
24895
24895
  }
24896
- }, krt = /* @__PURE__ */ Vn(Irt, [["__scopeId", "data-v-a11b243d"]]), HAe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADMElEQVR4AeyZPYgTQRTH39topXKXXU/lUFAkEVstchYBBQsrscmhaHGFCkkQPxALG8/C6vA7u0GuOBBFSGMjNoofYCPYa7IHd4WFIGRF7c7L+N5e9pLL7W52klw2C1nmZWbfzM78f/smO8msAhE/hgBhB3AYgWEEurwD9hRSdfNe3DDfR8qK5llmV1TDvA8IVxHgaKRMwDNVL09zBCaBDgHwIUpGkgFQucAA40AHitpHK5c4FgVjrSSZ0zgDcCGyNgQIO3QDE4HR4te9ml6Z0ozyqZ1Pf2wJemMGAkA1Kk8UsWlBIM4JUF4u/f3zXeXHewCK0AE0wzQA8CKsPUbp9AotrF+2PjLHqOyZQgWIF8unae3JeqmjhfXw5hhkvOrZHyoA1vAki/A1hAm/+lABSNgIWbu0x69BuAAKlv3EcR0iLnLuZaEC0BPnnZcwxy9AvHXKbrkEgNvl3fms7P5XIGq3vXoRCAUrm3juVc/+UAFYQDV/YLoO8ZnPhYCfAOIT3fkbJP4S+/ysI4AxfWGXWpyf8+tYpo4hqrnEBBla+cSOai6ZtnLJmSB9dASwjMslEGJK1SvXgwyykW2kAWiJv0YhTtuiEGdUff6EXQ7pQwpg5PG3faTzLlkjoSips+buhqO/JSmAWCz2wkXeNvgHJRd/X1yBAehH101SlCJbnwQcoak1u77C20PtM2RdgwcC0PTFgwLgjrccu+Y8fakv26U2HyScf6Cx+K4hAgEIXAr2yER8oBmV4376m8Q7zbqCaAug0t4LjeQ+daiiNQnAEq8TrX4+dxHPbraOIXwBthfMQ4DKLR5BwuL2OtFygY94p2VHEL4ANQXo35LTv0wu0pr9T2vlmgDiVxoCSEN4AshOHUeBkwuALEHkJcQ7l0pBuAJohUqqg6njCFjNCaJAJ/y0oUwqBYZwBRAKPpQabmMaB4JYA8DTho30pMgGIdkQrKnZmoU1APhp41hzi/DLGXB0Ned1XQ2AuiNq2RAg7IhxBH71XET/OvzNAG/6N16vRxKvlWouMck7ALToROodGW25nKvmkmc4AmDRDoAVkfdjqzrr+0U2QK8D28/+Ig/wHwAA///iiMh1AAAABklEQVQDAClVhH+eelZjAAAAAElFTkSuQmCC", Nrt = { class: "imgNode" }, Mrt = ["src"], Art = {
24896
+ }, krt = /* @__PURE__ */ Vn(Irt, [["__scopeId", "data-v-3943f259"]]), HAe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADMElEQVR4AeyZPYgTQRTH39topXKXXU/lUFAkEVstchYBBQsrscmhaHGFCkkQPxALG8/C6vA7u0GuOBBFSGMjNoofYCPYa7IHd4WFIGRF7c7L+N5e9pLL7W52klw2C1nmZWbfzM78f/smO8msAhE/hgBhB3AYgWEEurwD9hRSdfNe3DDfR8qK5llmV1TDvA8IVxHgaKRMwDNVL09zBCaBDgHwIUpGkgFQucAA40AHitpHK5c4FgVjrSSZ0zgDcCGyNgQIO3QDE4HR4te9ml6Z0ozyqZ1Pf2wJemMGAkA1Kk8UsWlBIM4JUF4u/f3zXeXHewCK0AE0wzQA8CKsPUbp9AotrF+2PjLHqOyZQgWIF8unae3JeqmjhfXw5hhkvOrZHyoA1vAki/A1hAm/+lABSNgIWbu0x69BuAAKlv3EcR0iLnLuZaEC0BPnnZcwxy9AvHXKbrkEgNvl3fms7P5XIGq3vXoRCAUrm3juVc/+UAFYQDV/YLoO8ZnPhYCfAOIT3fkbJP4S+/ysI4AxfWGXWpyf8+tYpo4hqrnEBBla+cSOai6ZtnLJmSB9dASwjMslEGJK1SvXgwyykW2kAWiJv0YhTtuiEGdUff6EXQ7pQwpg5PG3faTzLlkjoSips+buhqO/JSmAWCz2wkXeNvgHJRd/X1yBAehH101SlCJbnwQcoak1u77C20PtM2RdgwcC0PTFgwLgjrccu+Y8fakv26U2HyScf6Cx+K4hAgEIXAr2yER8oBmV4376m8Q7zbqCaAug0t4LjeQ+daiiNQnAEq8TrX4+dxHPbraOIXwBthfMQ4DKLR5BwuL2OtFygY94p2VHEL4ANQXo35LTv0wu0pr9T2vlmgDiVxoCSEN4AshOHUeBkwuALEHkJcQ7l0pBuAJohUqqg6njCFjNCaJAJ/y0oUwqBYZwBRAKPpQabmMaB4JYA8DTho30pMgGIdkQrKnZmoU1APhp41hzi/DLGXB0Ned1XQ2AuiNq2RAg7IhxBH71XET/OvzNAG/6N16vRxKvlWouMck7ALToROodGW25nKvmkmc4AmDRDoAVkfdjqzrr+0U2QK8D28/+Ig/wHwAA///iiMh1AAAABklEQVQDAClVhH+eelZjAAAAAElFTkSuQmCC", Nrt = { class: "imgNode" }, Mrt = ["src"], Art = {
24897
24897
  __name: "imageNode",
24898
24898
  setup(n) {
24899
24899
  Li("getNode");
package/dist/index.umd.js CHANGED
@@ -804,7 +804,7 @@
804
804
  display: block;
805
805
  background-color: #808080;
806
806
  }
807
- `,N0e="has-widget-transform",tx=["nw","n","ne","e","se","s","sw","w"],_1=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"],Pnt={minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,rotateGrid:15,rotatable:!0,preserveAspectRatio:!1,orthogonalResizing:!0,restrictedResizing:!1,autoScrollOnResizing:!0,allowReverse:!0};class M0e extends Wl{get model(){return this.graph.model}get view(){return this.graph.renderer.findViewByCell(this.node)}get containerClassName(){return this.prefixClassName("widget-transform")}get resizeClassName(){return`${this.containerClassName}-resize`}get rotateClassName(){return`${this.containerClassName}-rotate`}constructor(e,t,i){super(),this.node=t,this.graph=i,this.options=Object.assign(Object.assign({},Pnt),e),this.render(),this.startListening()}startListening(){this.delegateEvents({[`mousedown .${this.resizeClassName}`]:"startResizing",[`touchstart .${this.resizeClassName}`]:"startResizing",[`mousedown .${this.rotateClassName}`]:"startRotating",[`touchstart .${this.rotateClassName}`]:"startRotating"}),this.model.on("*",this.update,this),this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this),this.node.on("removed",this.remove,this),this.model.on("reseted",this.remove,this),this.view.on("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.on("cell:knob:mouseup",this.onKnobMouseUp,this)}stopListening(){this.undelegateEvents(),this.model.off("*",this.update,this),this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this),this.node.off("removed",this.remove,this),this.model.off("reseted",this.remove,this),this.view.off("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.off("cell:knob:mouseup",this.onKnobMouseUp,this)}renderHandles(){this.container=document.createElement("div");const e=document.createElement("div");Ii(e,"draggable","false");const t=e.cloneNode(!0);tt(t,this.rotateClassName);const i=_1.map(r=>{const s=e.cloneNode(!0);return tt(s,this.resizeClassName),Ii(s,"data-position",r),s});this.empty(),Go(this.container,[...i,t])}render(){return this.renderHandles(),this.view&&this.view.addClass(N0e),tt(this.container,this.containerClassName),Pd(this.container,"no-orth-resize",this.options.preserveAspectRatio||!this.options.orthogonalResizing),Pd(this.container,"no-resize",!this.options.resizable),Pd(this.container,"no-rotate",!this.options.rotatable),this.options.className&&tt(this.container,this.options.className),this.graph.container.appendChild(this.container),this.update()}update(){const e=this.graph.matrix(),t=this.node.getBBox();t.x*=e.a,t.x+=e.e,t.y*=e.d,t.y+=e.f,t.width*=e.a,t.height*=e.d;const i=Xa(this.node.getAngle()),r=i!==0?`rotate(${i}deg)`:"";return un(this.container,{transform:r,width:t.width,height:t.height,left:t.x,top:t.y}),this.updateResizerDirections(),this}remove(){return this.view&&this.view.removeClass(N0e),super.remove()}onKnobMouseDown(){this.startHandle()}onKnobMouseUp(){this.stopHandle()}updateResizerDirections(){const e=Xa(this.node.getAngle()),t=Math.floor(e*(tx.length/360));if(t!==this.prevShift){const i=tx.slice(t).concat(tx.slice(0,t)),r=o=>`${this.containerClassName}-cursor-${o}`;this.container.querySelectorAll(`.${this.resizeClassName}`).forEach((o,a)=>{dr(o,tx.map(l=>r(l)).join(" ")),tt(o,r(i[a]))}),this.prevShift=t}}getTrueDirection(e){const t=Xa(this.node.getAngle());let i=_1.indexOf(e);return i+=Math.floor(t*(_1.length/360)),i%=_1.length,_1[i]}toValidResizeDirection(e){return{top:"top-left",bottom:"bottom-right",left:"bottom-left",right:"top-right"}[e]||e}startResizing(e){e.stopPropagation(),this.model.startBatch("resize",{cid:this.cid});const t=Ii(e.target,"data-position");this.prepareResizing(e,t),this.startAction(e)}prepareResizing(e,t){const i=this.getTrueDirection(t);let r=0,s=0;t.split("-").forEach(c=>{r={left:-1,right:1}[c]||r,s={top:-1,bottom:1}[c]||s});const o=this.toValidResizeDirection(t),a={"top-right":"bottomLeft","top-left":"bottomRight","bottom-left":"topRight","bottom-right":"topLeft"}[o],l=Xa(this.node.getAngle());this.setEventData(e,{selector:a,direction:o,trueDirection:i,relativeDirection:t,angle:l,resizeX:r,resizeY:s,action:"resizing"})}startRotating(e){e.stopPropagation(),this.model.startBatch("rotate",{cid:this.cid});const t=this.node.getBBox().getCenter(),i=this.normalizeEvent(e),r=this.graph.snapToGrid(i.clientX,i.clientY);this.setEventData(e,{center:t,action:"rotating",angle:Xa(this.node.getAngle()),start:te.create(r).theta(t)}),this.startAction(e)}onMouseMove(e){const t=this.graph.findViewByCell(this.node);let i=this.getEventData(e);if(i.action){const r=this.normalizeEvent(e);let s=r.clientX,o=r.clientY;const a=this.graph.getPlugin("scroller"),l=this.options.restrictedResizing;if(l===!0||typeof l=="number"){const f=l===!0?0:l,g=a?Math.max(f,8):f,p=this.graph.container.getBoundingClientRect();s=d1(s,p.left+g,p.right-g),o=d1(o,p.top+g,p.bottom-g)}else this.options.autoScrollOnResizing&&a&&a.autoScroll(s,o);const c=this.graph.snapToGrid(s,o),h=this.graph.getGridSize(),d=this.node,u=this.options;if(i.action==="resizing"){i=i,i.resized||(t&&(t.addClass("node-resizing"),this.notify("node:resize",e,t)),i.resized=!0);const f=d.getBBox(),g=te.create(c).rotate(i.angle,f.getCenter()).diff(f[i.selector]);let p=i.resizeX?g.x*i.resizeX:f.width,m=i.resizeY?g.y*i.resizeY:f.height;const v=p,_=m;if(p=Rd(p,h),m=Rd(m,h),p=Math.max(p,u.minWidth||h),m=Math.max(m,u.minHeight||h),p=Math.min(p,u.maxWidth||1/0),m=Math.min(m,u.maxHeight||1/0),u.preserveAspectRatio){const y=f.width*m/f.height,C=f.height*p/f.width;p<y?m=C:p=y}const b=i.relativeDirection;if(u.allowReverse&&(v<=-p||_<=-m)){let y;b==="left"?v<=-p&&(y="right"):b==="right"?v<=-p&&(y="left"):b==="top"?_<=-m&&(y="bottom"):b==="bottom"?_<=-m&&(y="top"):b==="top-left"?v<=-p&&_<=-m?y="bottom-right":v<=-p?y="top-right":_<=-m&&(y="bottom-left"):b==="top-right"?v<=-p&&_<=-m?y="bottom-left":v<=-p?y="top-left":_<=-m&&(y="bottom-right"):b==="bottom-left"?v<=-p&&_<=-m?y="top-right":v<=-p?y="bottom-right":_<=-m&&(y="top-left"):b==="bottom-right"&&(v<=-p&&_<=-m?y="top-left":v<=-p?y="bottom-left":_<=-m&&(y="top-right"));const C=y;this.stopHandle();const x=this.container.querySelector(`.${this.resizeClassName}[data-position="${C}"]`);this.startHandle(x),this.prepareResizing(e,C),this.onMouseMove(e)}if(f.width!==p||f.height!==m){const y={ui:!0,direction:i.direction,relativeDirection:i.relativeDirection,trueDirection:i.trueDirection,minWidth:u.minWidth,minHeight:u.minHeight,maxWidth:u.maxWidth,maxHeight:u.maxHeight,preserveAspectRatio:u.preserveAspectRatio===!0};d.resize(p,m,y),this.notify("node:resizing",e,t)}}else if(i.action==="rotating"){i=i,i.rotated||(t&&(t.addClass("node-rotating"),this.notify("node:rotate",e,t)),i.rotated=!0);const f=d.getAngle(),g=i.start-te.create(c).theta(i.center);let p=i.angle+g;u.rotateGrid&&(p=Rd(p,u.rotateGrid)),p=Xa(p),f!==p&&(d.rotate(p,{absolute:!0}),this.notify("node:rotating",e,t))}}}onMouseUp(e){const t=this.getEventData(e);t.action&&(this.stopAction(e),this.model.stopBatch(t.action==="resizing"?"resize":"rotate",{cid:this.cid}))}startHandle(e){if(this.handle=e||null,tt(this.container,`${this.containerClassName}-active`),e){tt(e,`${this.containerClassName}-active-handle`);const t=e.getAttribute("data-position");if(t){const i=tx[_1.indexOf(t)];tt(this.container,`${this.containerClassName}-cursor-${i}`)}}}stopHandle(){if(dr(this.container,`${this.containerClassName}-active`),this.handle){dr(this.handle,`${this.containerClassName}-active-handle`);const e=this.handle.getAttribute("data-position");if(e){const t=tx[_1.indexOf(e)];dr(this.container,`${this.containerClassName}-cursor-${t}`)}this.handle=null}}startAction(e){this.startHandle(e.target),this.graph.view.undelegateEvents(),this.delegateDocumentEvents(E_e,e.data)}stopAction(e){this.stopHandle(),this.undelegateDocumentEvents(),this.graph.view.delegateEvents();const t=this.graph.findViewByCell(this.node),i=this.getEventData(e);t&&(t.removeClass(`node-${i.action}`),i.action==="resizing"&&i.resized?this.notify("node:resized",e,t):i.action==="rotating"&&i.rotated&&this.notify("node:rotated",e,t))}notify(e,t,i,r={}){if(i){const s=i.graph,o=s.view.normalizeEvent(t),a=s.snapToGrid(o.clientX,o.clientY);this.trigger(e,Object.assign({e:o,view:i,node:i.cell,cell:i.cell,x:a.x,y:a.y},r))}}dispose(){this.stopListening(),this.remove(),this.off()}}Ri([Pi()],M0e.prototype,"dispose",null),be.prototype.createTransformWidget=function(n){const e=this.getPlugin("transform");return e&&e.createWidget(n),this},be.prototype.clearTransformWidgets=function(){const n=this.getPlugin("transform");return n&&n.clearWidgets(),this};let A0e=class extends Ja{constructor(e={}){super(),this.name="transform",this.widgets=new Map,this.disabled=!1,this.options=e,gv(this.name,Rnt)}init(e){this.graph=e,!this.disabled&&this.startListening()}startListening(){this.graph.on("node:click",this.onNodeClick,this),this.graph.on("blank:mousedown",this.onBlankMouseDown,this)}stopListening(){this.graph.off("node:click",this.onNodeClick,this),this.graph.off("blank:mousedown",this.onBlankMouseDown,this)}enable(){this.disabled&&(this.disabled=!1,this.startListening())}disable(){this.disabled||(this.disabled=!0,this.stopListening())}isEnabled(){return!this.disabled}createWidget(e){this.clearWidgets();const t=this.createTransform(e);t&&(this.widgets.set(e,t),t.on("*",(i,r)=>{this.trigger(i,r),this.graph.trigger(i,r)}))}onNodeClick({node:e}){this.createWidget(e)}onBlankMouseDown(){this.clearWidgets()}createTransform(e){const t=this.getTransformOptions(e);return t.resizable||t.rotatable?new M0e(t,e,this.graph):null}parseOptionGroup(e,t,i){const r={};return Object.keys(i||{}).forEach(s=>{const o=i[s];r[s]=typeof o=="function"?o.call(e,t):o}),r}getTransformOptions(e){this.options.resizing||(this.options.resizing={enabled:!1}),this.options.rotating||(this.options.rotating={enabled:!1}),typeof this.options.resizing=="boolean"&&(this.options.resizing={enabled:this.options.resizing}),typeof this.options.rotating=="boolean"&&(this.options.rotating={enabled:this.options.rotating});const t=this.parseOptionGroup(this.graph,e,this.options.resizing),i=this.parseOptionGroup(this.graph,e,this.options.rotating);return{resizable:!!t.enabled,minWidth:t.minWidth||0,maxWidth:t.maxWidth||Number.MAX_SAFE_INTEGER,minHeight:t.minHeight||0,maxHeight:t.maxHeight||Number.MAX_SAFE_INTEGER,orthogonalResizing:typeof t.orthogonal=="boolean"?t.orthogonal:!0,restrictedResizing:!!t.restrict,autoScrollOnResizing:typeof t.autoScroll=="boolean"?t.autoScroll:!0,preserveAspectRatio:!!t.preserveAspectRatio,allowReverse:typeof t.allowReverse=="boolean"?t.allowReverse:!0,rotatable:!!i.enabled,rotateGrid:i.grid||15}}clearWidgets(){this.widgets.forEach((e,t)=>{this.graph.getCellById(t.id)&&e.dispose()}),this.widgets.clear()}dispose(){this.clearWidgets(),this.stopListening(),this.off(),pv(this.name)}};Ri([Pi()],A0e.prototype,"dispose",null);function R0e(n){const e=wa.getForeignObjectMarkup();return n?[{tagName:n,selector:"body"},e]:[e]}be.registerNode("vue-shape",{view:"vue-shape-view",markup:R0e(),attrs:{body:{fill:"none",stroke:"none",refWidth:"100%",refHeight:"100%"},fo:{refWidth:"100%",refHeight:"100%"}},propHooks(n){if(n.markup==null){const e=n.primer;if(e){n.markup=R0e(e);let t={};switch(e){case"circle":t={refCx:"50%",refCy:"50%",refR:"50%"};break;case"ellipse":t={refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%"};break}n.attrs=Kn({},{body:Object.assign({refWidth:null,refHeight:null},t)},n.attrs||{})}}return n}},!0);var Ont=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(n);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(t[i[r]]=n[i[r]]);return t};const P0e={};function Vnt(n){const{shape:e,component:t,inherit:i}=n,r=Ont(n,["shape","component","inherit"]);if(!e)throw new Error("should specify shape in config");P0e[e]={component:t},be.registerNode(e,Object.assign({inherit:i||"vue-shape"},r),!0)}let aT=!1;const M3=w.reactive({});function Fnt(n,e,t,i,r){aT&&(M3[n]=w.markRaw(w.defineComponent({render:()=>w.h(w.Teleport,{to:t},[w.h(e,{node:i,graph:r})]),provide:()=>({getNode:()=>i,getGraph:()=>r})})))}function Bnt(n){aT&&delete M3[n]}function O0e(){return aT}let A3=null;function mG(){return A3&&aT?null:(aT=!0,A3=w.defineComponent({setup(){return w.onBeforeUnmount(()=>{A3=null}),()=>w.h(w.Fragment,{},Object.keys(M3).map(n=>w.h(M3[n])))}}),A3)}class b1 extends Dh{getComponentContainer(){return this.selectors&&this.selectors.foContent}confirmUpdate(e){const t=super.confirmUpdate(e);return this.handleAction(t,b1.action,()=>{this.renderVueComponent()})}targetId(){return`${this.graph.view.cid}:${this.cell.id}`}renderVueComponent(){this.unmountVueComponent();const e=this.getComponentContainer(),t=this.cell,i=this.graph;if(e){const{component:r}=P0e[t.shape];r&&(O0e()?Fnt(this.targetId(),r,e,t,i):(this.vm=w.createApp({render(){return w.h(r,{node:t,graph:i})},provide(){return{getNode:()=>t,getGraph:()=>i}}}),this.vm.mount(e)))}}unmountVueComponent(){const e=this.getComponentContainer();return this.vm&&(this.vm.unmount(),this.vm=null),e&&(e.innerHTML=""),e}onMouseDown(e,t,i){const r=e.target;if(r.tagName.toLowerCase()==="input"){const o=r.getAttribute("type");if(o==null||["text","password","number","email","search","tel","url"].includes(o))return}super.onMouseDown(e,t,i)}unmount(){return O0e()&&Bnt(this.targetId()),this.unmountVueComponent(),super.unmount(),this}}b1.action="vue",b1.config({bootstrap:[b1.action],actions:{component:b1.action}}),Dh.registry.register("vue-shape-view",b1,!0);const bn=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},Wnt=bn({__name:"vueNode",setup(n){w.useCssVars(l=>({v65a95155:i.value.color,v1c79657d:i.value.opacity,v9c7a4d52:i.value.borderStyle,v6581e4be:i.value.borderWidth+"px",v9e4229ee:i.value.borderColor,v77368961:i.value.borderRadius+"px",v4d75d247:i.value.backgroundColor}));let t=w.inject("getNode")();const i=w.ref(t.getData()),r=w.ref(128),s=w.ref(128),o=({current:l})=>{r.value=l.width,s.value=l.height},a=({current:l})=>{i.value={...i.value,...l}};return w.provide("x6NodeData",i),w.provide("width",r),w.provide("height",s),w.onMounted(()=>{r.value=t.size().width,s.value=t.size().height,t.on("change:data",a),t.on("change:size",o)}),w.onBeforeUnmount(()=>{t.off("change:data",a),t.off("change:size",o)}),(l,c)=>i.value.visible===void 0||i.value.visible?(w.openBlock(),w.createElementBlock("div",{key:0,style:w.normalizeStyle({width:r.value+"px",height:s.value+"px",backgroundImage:i.value.backgroundImage&&i.value.backgroundImage!=="none"?`url(${i.value.backgroundImage})`:"none"}),class:"vueNode"},[w.renderSlot(l.$slots,"default",{},void 0,!0)],4)):w.createCommentVNode("",!0)}},[["__scopeId","data-v-3b36406f"]]),Hnt={class:"svgNode"},znt=["innerHTML"],$nt=["src"],Unt=["xlink:href"],Gnt=bn({__name:"svgNode",setup(n){w.inject("getNode");const e=w.inject("width"),t=w.inject("height"),i=w.inject("x6NodeData"),r=w.computed(()=>{var a;return{fontSize:`${Math.min(e.value,t.value)}px`,color:((a=i.value)==null?void 0:a.color)||"#ffffff"}}),s=w.computed(()=>({width:"100%",height:"100%"})),o=w.computed(()=>{var a;return{width:"100%",height:"100%",color:((a=i.value)==null?void 0:a.color)||"#ffffff"}});return w.onMounted(()=>{}),w.onBeforeUnmount(()=>{}),(a,l)=>(w.openBlock(),w.createElementBlock("div",Hnt,[w.unref(i).svgContent?(w.openBlock(),w.createElementBlock("div",{key:0,class:"svg-inline",style:w.normalizeStyle(o.value),innerHTML:w.unref(i).svgContent},null,12,znt)):w.unref(i).imgData?(w.openBlock(),w.createElementBlock("img",{key:1,src:w.unref(i).imgData,style:w.normalizeStyle(s.value)},null,12,$nt)):(w.openBlock(),w.createElementBlock("svg",{key:2,class:"svg-icon","aria-hidden":"true",style:w.normalizeStyle(r.value)},[w.createElementVNode("use",{"xlink:href":"#"+w.unref(i).icon},null,8,Unt)],4))]))}},[["__scopeId","data-v-fdb5a2e6"]]),jnt=["title"],qnt=bn({__name:"textNode",setup(n){const e=w.inject("x6NodeData"),t=w.computed(()=>{const s=e.value||{};return{justifyContent:s.justifyContent||"center",alignItems:s.alignItems||"center",padding:s.padding||"0",overflow:s.overflow||"hidden",backgroundColor:"transparent"}}),i=w.computed(()=>{const s=e.value||{},o=s.textOverflow==="ellipsis",a=s.whiteSpace||(o?"nowrap":"pre-wrap"),l=!s.lineHeight&&s.lineHeight!==0?"1.4":typeof s.lineHeight=="number"?s.lineHeight<=10?`${s.lineHeight}`:`${s.lineHeight}px`:s.lineHeight;return{color:s.color||"#ffffff",fontWeight:s.fontWeight||400,fontSize:`${s.fontSize||16}px`,letterSpacing:`${s.letterSpacing||0}px`,fontFamily:s.fontFamily||"inherit",fontStyle:s.fontStyle||"normal",textDecoration:s.textDecoration||"none",textAlign:s.textAlign||"center",lineHeight:l,whiteSpace:a,wordBreak:s.wordBreak||"break-word",textOverflow:s.textOverflow||"clip",overflow:"hidden",display:s.display||"block"}}),r=w.computed(()=>{const s=e.value.text;if(s==="")return"";const o=e.value.toFix;return Number.isFinite(+s)?(+s).toFixed(o??2):String(s??"--")});return(s,o)=>(w.openBlock(),w.createElementBlock("div",{class:"textNode",style:w.normalizeStyle(t.value),title:w.unref(e).text},[w.createElementVNode("span",{class:"textContent",style:w.normalizeStyle(i.value)},w.toDisplayString(r.value),5)],12,jnt))}},[["__scopeId","data-v-f2bddc8c"]]);function Knt(n=5){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let t="";for(let i=0;i<n;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function vG(n){let e=String(n).trim().replace(/[^\w\u4e00-\u9fa5]/g,"");return e||(e="key"),/^\d/.test(e)&&(e="_"+e),e+Knt()}function R3(n={},e,t){const i=String(e||"").split(".").filter(Boolean),r={...n};let s=r;return i.forEach((o,a)=>{if(a===i.length-1)s[o]=t;else{const l=s[o];s[o]=l&&typeof l=="object"&&!Array.isArray(l)?{...l}:{},s=s[o]}}),r}function _G(n={},e){const t=String(e||"").split(".").filter(Boolean);let i=n;for(const r of t){if(i==null||typeof i!="object")return;i=i[r]}return i}function V0e(n,e=200){let t=null;return function(...i){clearTimeout(t),t=setTimeout(()=>{n.apply(this,i)},e)}}const Ynt={class:"formNode"},Xnt=bn({__name:"formNode",setup(n){const e=w.inject("graph")();let i=w.inject("getNode")();const r=w.inject("x6NodeData"),s=w.inject("topoApi"),o=w.computed(()=>r.value.model),a=w.ref(r.value.model.modelValue);w.watch(()=>a.value,p=>{const m=i.getData();m.model.modelValue!=p&&(m.model.modelValue=p,i.setData(m,{deep:!1}))}),w.watch(()=>r.value.model.modelValue,p=>{a.value=p});const l=p=>{switch(p){case"date":return"YYYY-MM-DD";case"datetime":return"YYYY-MM-DD HH:mm:ss";case"week":return"[Week] ww";case"month":return"YYYY-MM";case"year":return"YYYY";case"daterange":return"YYYY-MM-DD";case"datetimerange":return"YYYY-MM-DD HH:mm:ss";case"monthrange":return"YYYY-MM";case"yearrange":return"YYYY"}},c=w.ref(!1),h=()=>{o.value.buttonConfirm?an.ElMessageBox.confirm(o.value.buttonConfirmTips,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{r.value.dataSource.type=="http"&&u(i)}).catch(()=>{}):(console.log(a.value,r.value),setTimeout(()=>{r.value.dataSource.type=="http"&&u(i),r.value.dataSource.type=="node"&&f(i)},200))},d=p=>{var m,v;if(p.params&&Array.isArray(p.params)&&p.params.length>0){let _=JSON.parse(JSON.stringify(p));delete _.params;const b={};for(let y of p.params)y.key&&(y.value&&e.getCellById(y.value)?b[y.key]=(v=(m=e.getCellById(y.value).getData())==null?void 0:m.model)==null?void 0:v.modelValue:b[y.key]=y.value);return _.params=b,_}return p},u=p=>{const m=d(r.value.dataSource);if(m.type=="http"&&m.httpUrl){c.value=!0;try{s.httpRequest(m).then(v=>{c.value=!1,v&&v.success&&m.parse&&(g(v,p.id),o.value.buttonSuccess&&an.ElMessage.success(o.value.buttonSuccessTips)),v&&!v.success&&m.parse&&(g(v,p.id),o.value.buttonError&&an.ElMessage.error(v.msg||"操作失败!"))})}catch(v){c.value=!1,an.ElMessage.error("操作失败!"),console.error(v)}}else an.ElMessage.error("未绑定请求!")},f=p=>{g({},p.id)},g=(p,m)=>{var b;const v=e.getCellById(m);if(!v)return console.error(m,e.toJSON()),!1;const _=v.getData();if(v&&_)if(_.dataSource.parse){let y={};(b=_.dataSource.bindNode)==null||b.forEach(L=>{const D=e.getCellById(L).getData(),E=D.dataSource.fields;y[e.getCellById(L).getData().name]=Object.keys(E).reduce((k,T)=>(k[T]=_G(D,E[T])??null,k),{})});const C=new Function("data","$",_.dataSource.parse);_.dataSource.type=="opcua"?C({payload:p,pointTemp:_.dataSource.point},y):(_.dataSource.type=="http"||_.dataSource.type=="node")&&C(p,y);const x=e.toJSON().cells;for(let L in y){let D=x.find(E=>{var k;return((k=E==null?void 0:E.data)==null?void 0:k.name)===L});if(D){D=e.getCellById(D.id);const E=D.data.dataSource.fields,k=y[L];Object.keys(k).forEach(T=>{if(k[T]!==null){const I=E[T],N=k[T];D.setData(R3(D.getData(),I,N),{deep:!1})}})}}}else an.ElMessage.error("没有执行操作!")};return(p,m)=>{const v=w.resolveComponent("el-input"),_=w.resolveComponent("el-switch"),b=w.resolveComponent("el-option"),y=w.resolveComponent("el-select"),C=w.resolveComponent("el-date-picker"),x=w.resolveComponent("el-input-number"),L=w.resolveComponent("el-button");return w.openBlock(),w.createElementBlock("div",Ynt,[w.unref(r).type=="input"?(w.openBlock(),w.createBlock(v,{key:0,modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=D=>a.value=D),placeholder:o.value.placeholder,type:o.value.inputType,clearable:""},null,8,["modelValue","placeholder","type"])):w.createCommentVNode("",!0),w.unref(r).type=="switch"?(w.openBlock(),w.createBlock(_,{key:1,modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=D=>a.value=D),size:o.value.size,class:"ml-2",style:w.normalizeStyle({"--el-switch-on-color":o.value.buttonOnColor,"--el-switch-off-color":o.value.buttonOffColor}),onChange:h},null,8,["modelValue","size","style"])):w.createCommentVNode("",!0),w.unref(r).type=="select"?(w.openBlock(),w.createBlock(y,{key:2,modelValue:a.value,"onUpdate:modelValue":m[2]||(m[2]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,clearable:"",style:{width:"100%",height:"100%"}},{default:w.withCtx(()=>{var D,E;return[(D=o.value)!=null&&D.option?(w.openBlock(!0),w.createElementBlock(w.Fragment,{key:0},w.renderList((E=o.value)==null?void 0:E.option,(k,T)=>(w.openBlock(),w.createBlock(b,{label:k.label,value:k.value},null,8,["label","value"]))),256)):w.createCommentVNode("",!0)]}),_:1},8,["modelValue","size","placeholder"])):w.createCommentVNode("",!0),w.unref(r).type=="selectMore"?(w.openBlock(),w.createBlock(y,{key:3,modelValue:a.value,"onUpdate:modelValue":m[3]||(m[3]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,multiple:"","collapse-tags":"",clearable:"",style:{width:"100%",height:"100%"}},{default:w.withCtx(()=>{var D,E;return[(D=o.value)!=null&&D.option?(w.openBlock(!0),w.createElementBlock(w.Fragment,{key:0},w.renderList((E=o.value)==null?void 0:E.option,(k,T)=>(w.openBlock(),w.createBlock(b,{label:k.label,value:k.value},null,8,["label","value"]))),256)):w.createCommentVNode("",!0)]}),_:1},8,["modelValue","size","placeholder"])):w.createCommentVNode("",!0),w.unref(r).type=="date"?(w.openBlock(),w.createBlock(C,{key:4,modelValue:a.value,"onUpdate:modelValue":m[4]||(m[4]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,type:o.value.dateType,clearable:"",style:{width:"100%"},format:l(o.value.dateType),"value-format":l(o.value.dateType)},null,8,["modelValue","size","placeholder","type","format","value-format"])):w.createCommentVNode("",!0),w.unref(r).type=="dateRange"?(w.openBlock(),w.createBlock(C,{key:5,modelValue:a.value,"onUpdate:modelValue":m[5]||(m[5]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,type:o.value.dateType,clearable:"",style:{width:"100%"},format:l(o.value.dateType),"value-format":l(o.value.dateType)},null,8,["modelValue","size","placeholder","type","format","value-format"])):w.createCommentVNode("",!0),w.unref(r).type=="number"?(w.openBlock(),w.createBlock(x,{key:6,modelValue:a.value,"onUpdate:modelValue":m[6]||(m[6]=D=>a.value=D),size:o.value.size,controls:!1,placeholder:o.value.placeholder,clearable:"",style:{width:"100%"}},null,8,["modelValue","size","placeholder"])):w.createCommentVNode("",!0),w.unref(r).type=="button"?(w.openBlock(),w.createBlock(L,{key:7,type:"primary",style:{width:"100%"},size:o.value.size,color:o.value.buttonColor,loading:c.value,disable:c.value,onClick:h},{default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(o.value.modelValue),1)]),_:1},8,["size","color","loading","disable"])):w.createCommentVNode("",!0)])}}},[["__scopeId","data-v-a11b243d"]]),F0e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADMElEQVR4AeyZPYgTQRTH39topXKXXU/lUFAkEVstchYBBQsrscmhaHGFCkkQPxALG8/C6vA7u0GuOBBFSGMjNoofYCPYa7IHd4WFIGRF7c7L+N5e9pLL7W52klw2C1nmZWbfzM78f/smO8msAhE/hgBhB3AYgWEEurwD9hRSdfNe3DDfR8qK5llmV1TDvA8IVxHgaKRMwDNVL09zBCaBDgHwIUpGkgFQucAA40AHitpHK5c4FgVjrSSZ0zgDcCGyNgQIO3QDE4HR4te9ml6Z0ozyqZ1Pf2wJemMGAkA1Kk8UsWlBIM4JUF4u/f3zXeXHewCK0AE0wzQA8CKsPUbp9AotrF+2PjLHqOyZQgWIF8unae3JeqmjhfXw5hhkvOrZHyoA1vAki/A1hAm/+lABSNgIWbu0x69BuAAKlv3EcR0iLnLuZaEC0BPnnZcwxy9AvHXKbrkEgNvl3fms7P5XIGq3vXoRCAUrm3juVc/+UAFYQDV/YLoO8ZnPhYCfAOIT3fkbJP4S+/ysI4AxfWGXWpyf8+tYpo4hqrnEBBla+cSOai6ZtnLJmSB9dASwjMslEGJK1SvXgwyykW2kAWiJv0YhTtuiEGdUff6EXQ7pQwpg5PG3faTzLlkjoSips+buhqO/JSmAWCz2wkXeNvgHJRd/X1yBAehH101SlCJbnwQcoak1u77C20PtM2RdgwcC0PTFgwLgjrccu+Y8fakv26U2HyScf6Cx+K4hAgEIXAr2yER8oBmV4376m8Q7zbqCaAug0t4LjeQ+daiiNQnAEq8TrX4+dxHPbraOIXwBthfMQ4DKLR5BwuL2OtFygY94p2VHEL4ANQXo35LTv0wu0pr9T2vlmgDiVxoCSEN4AshOHUeBkwuALEHkJcQ7l0pBuAJohUqqg6njCFjNCaJAJ/y0oUwqBYZwBRAKPpQabmMaB4JYA8DTho30pMgGIdkQrKnZmoU1APhp41hzi/DLGXB0Ned1XQ2AuiNq2RAg7IhxBH71XET/OvzNAG/6N16vRxKvlWouMck7ALToROodGW25nKvmkmc4AmDRDoAVkfdjqzrr+0U2QK8D28/+Ig/wHwAA///iiMh1AAAABklEQVQDAClVhH+eelZjAAAAAElFTkSuQmCC",Znt={class:"imgNode"},Jnt=["src"],Qnt=bn({__name:"imageNode",setup(n){w.inject("getNode");const e=w.inject("x6NodeData"),t=w.computed(()=>({width:`${e.value.imgWidth??50}px`,height:`${e.value.imgHeight??50}px`}));return w.onMounted(()=>{}),w.onBeforeUnmount(()=>{}),(i,r)=>(w.openBlock(),w.createElementBlock("div",Znt,[w.createElementVNode("img",{src:w.unref(e).imgData||w.unref(F0e),style:w.normalizeStyle(t.value)},null,12,Jnt)]))}},[["__scopeId","data-v-b89502c5"]]),ert={class:"tableNode"},trt={class:"table table--header"},irt=["onMousedown"],nrt={class:"table table--body"},rrt=["title"],srt=bn({__name:"tableNode",setup(n){const e=w.inject("x6NodeData"),t={rowHeight:32,colWidth:120,rowHeights:[],colWidths:[],rowHeightsEnabled:!1,header:{enabled:!0,height:36,backgroundColor:"#1f2a3a",color:"#e5e7eb",fontSize:12,fontWeight:600,borderColor:"#303746",borderWidth:1,textAlign:"center",aligns:[]},cell:{backgroundColor:"#121924",altBackgroundColor:"#101826",color:"#cbd5f5",fontSize:12,borderColor:"#303746",borderWidth:1},data:{header:[],rows:[]}},i=w.computed(()=>{var x;const C=((x=e.value)==null?void 0:x.table)||{};return{...t,...C,header:{...t.header,...C.header||{}},cell:{...t.cell,...C.cell||{}},data:{...t.data,...C.data||{}}}}),r=w.computed(()=>{var x;return(((x=i.value.data)==null?void 0:x.rows)||[]).length}),s=w.computed(()=>{var L,D;const C=(((L=i.value.data)==null?void 0:L.header)||[]).length,x=Math.max(0,...(((D=i.value.data)==null?void 0:D.rows)||[]).map(E=>(E==null?void 0:E.length)||0));return Math.max(C,x)}),o=w.computed(()=>{var C;return((C=i.value.header)==null?void 0:C.enabled)!==!1}),a=w.computed(()=>{var C;return Number((C=i.value.header)==null?void 0:C.height)||0}),l=w.computed(()=>o.value?{height:`calc(100% - ${a.value}px)`}:{height:"100%"}),c=w.ref(!1),h=w.computed(()=>{const C=i.value.colWidths||[],x=Number(i.value.colWidth)||0;return Array.from({length:s.value},(L,D)=>({width:Number(C[D])||x}))}),d=(C,x)=>{const L=Math.max(40,Math.round(x));if(!e.value)return;const D=e.value.table||{},E=Array.isArray(D.colWidths)?[...D.colWidths]:[];E[C]=L,e.value.table={...D,colWidths:E}},u=(C,x)=>{var M,P;const L=x+1;if(L>=h.value.length)return;C.preventDefault(),C.stopPropagation();const D=C.clientX,E=((M=h.value[x])==null?void 0:M.width)||0,k=((P=h.value[L])==null?void 0:P.width)||0;let T=0;const I=R=>{T=R.clientX-D;const W=40,$=-(E-W),z=k-W,K=Math.min(z,Math.max($,T));d(x,E+K),d(L,k-K)},N=()=>{const W=-(E-40),$=k-40,z=Math.min($,Math.max(W,T));d(x,E+z),d(L,k-z),window.removeEventListener("mousemove",I),window.removeEventListener("mouseup",N)};window.addEventListener("mousemove",I),window.addEventListener("mouseup",N)},f=()=>{const C=g.value;C&&(c.value=C.scrollHeight>C.clientHeight)},g=w.ref(null);w.onMounted(()=>{w.nextTick(f),window.addEventListener("resize",f)}),w.onBeforeUnmount(()=>{window.removeEventListener("resize",f)}),w.watch([r,s,a],()=>{w.nextTick(f)});const p=C=>{const x=Number(i.value.rowHeight)||0;if(!i.value.rowHeightsEnabled)return x;const L=i.value.rowHeights||[];return Number(L[C])||x},m=C=>{var L;return(((L=i.value.data)==null?void 0:L.header)||[])[C]??`列${C+1}`},v=(C,x)=>{var D,E;return((E=(((D=i.value.data)==null?void 0:D.rows)||[])[C])==null?void 0:E[x])??""},_=w.computed(()=>{const C=i.value.header||{};return{backgroundColor:C.backgroundColor,color:C.color,fontSize:`${C.fontSize}px`,fontWeight:C.fontWeight,textAlign:C.textAlign,border:`${C.borderWidth}px solid ${C.borderColor}`}}),b=C=>{const x=i.value.header||{};return(Array.isArray(x.aligns)?x.aligns:[])[C]||x.textAlign},y=(C,x)=>{const L=i.value.cell||{};return{backgroundColor:C%2===1&&L.altBackgroundColor||L.backgroundColor,color:L.color,fontSize:`${L.fontSize}px`,textAlign:b(x),border:`${L.borderWidth}px solid ${L.borderColor}`}};return(C,x)=>(w.openBlock(),w.createElementBlock("div",ert,[o.value?(w.openBlock(),w.createElementBlock("div",{key:0,class:"table-header",style:w.normalizeStyle({overflowY:c.value?"scroll":"hidden"})},[w.createElementVNode("table",trt,[w.createElementVNode("colgroup",null,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(L,D)=>(w.openBlock(),w.createElementBlock("col",{key:D,style:w.normalizeStyle({width:L.width+"px"})},null,4))),128))]),w.createElementVNode("thead",null,[w.createElementVNode("tr",{style:w.normalizeStyle({height:a.value+"px"})},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(L,D)=>(w.openBlock(),w.createElementBlock("th",{key:D,style:w.normalizeStyle(_.value)},[w.createTextVNode(w.toDisplayString(m(D))+" ",1),D<h.value.length-1?(w.openBlock(),w.createElementBlock("span",{key:0,class:"col-resize-handle",onMousedown:E=>u(E,D)},null,40,irt)):w.createCommentVNode("",!0)],4))),128))],4)])])],4)):w.createCommentVNode("",!0),w.createElementVNode("div",{class:"table-body",ref_key:"bodyWrapperRef",ref:g,style:w.normalizeStyle(l.value),onScroll:f},[w.createElementVNode("table",nrt,[w.createElementVNode("colgroup",null,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(L,D)=>(w.openBlock(),w.createElementBlock("col",{key:D,style:w.normalizeStyle({width:L.width+"px"})},null,4))),128))]),w.createElementVNode("tbody",null,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(r.value,L=>(w.openBlock(),w.createElementBlock("tr",{key:L,style:w.normalizeStyle({height:p(L-1)+"px"})},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(D,E)=>(w.openBlock(),w.createElementBlock("td",{key:E,style:w.normalizeStyle(y(L-1,E)),title:v(L-1,E)},w.toDisplayString(v(L-1,E)),13,rrt))),128))],4))),128))])])],36)]))}},[["__scopeId","data-v-e4aff2b8"]]);/*! *****************************************************************************
807
+ `,N0e="has-widget-transform",tx=["nw","n","ne","e","se","s","sw","w"],_1=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"],Pnt={minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,rotateGrid:15,rotatable:!0,preserveAspectRatio:!1,orthogonalResizing:!0,restrictedResizing:!1,autoScrollOnResizing:!0,allowReverse:!0};class M0e extends Wl{get model(){return this.graph.model}get view(){return this.graph.renderer.findViewByCell(this.node)}get containerClassName(){return this.prefixClassName("widget-transform")}get resizeClassName(){return`${this.containerClassName}-resize`}get rotateClassName(){return`${this.containerClassName}-rotate`}constructor(e,t,i){super(),this.node=t,this.graph=i,this.options=Object.assign(Object.assign({},Pnt),e),this.render(),this.startListening()}startListening(){this.delegateEvents({[`mousedown .${this.resizeClassName}`]:"startResizing",[`touchstart .${this.resizeClassName}`]:"startResizing",[`mousedown .${this.rotateClassName}`]:"startRotating",[`touchstart .${this.rotateClassName}`]:"startRotating"}),this.model.on("*",this.update,this),this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this),this.node.on("removed",this.remove,this),this.model.on("reseted",this.remove,this),this.view.on("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.on("cell:knob:mouseup",this.onKnobMouseUp,this)}stopListening(){this.undelegateEvents(),this.model.off("*",this.update,this),this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this),this.node.off("removed",this.remove,this),this.model.off("reseted",this.remove,this),this.view.off("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.off("cell:knob:mouseup",this.onKnobMouseUp,this)}renderHandles(){this.container=document.createElement("div");const e=document.createElement("div");Ii(e,"draggable","false");const t=e.cloneNode(!0);tt(t,this.rotateClassName);const i=_1.map(r=>{const s=e.cloneNode(!0);return tt(s,this.resizeClassName),Ii(s,"data-position",r),s});this.empty(),Go(this.container,[...i,t])}render(){return this.renderHandles(),this.view&&this.view.addClass(N0e),tt(this.container,this.containerClassName),Pd(this.container,"no-orth-resize",this.options.preserveAspectRatio||!this.options.orthogonalResizing),Pd(this.container,"no-resize",!this.options.resizable),Pd(this.container,"no-rotate",!this.options.rotatable),this.options.className&&tt(this.container,this.options.className),this.graph.container.appendChild(this.container),this.update()}update(){const e=this.graph.matrix(),t=this.node.getBBox();t.x*=e.a,t.x+=e.e,t.y*=e.d,t.y+=e.f,t.width*=e.a,t.height*=e.d;const i=Xa(this.node.getAngle()),r=i!==0?`rotate(${i}deg)`:"";return un(this.container,{transform:r,width:t.width,height:t.height,left:t.x,top:t.y}),this.updateResizerDirections(),this}remove(){return this.view&&this.view.removeClass(N0e),super.remove()}onKnobMouseDown(){this.startHandle()}onKnobMouseUp(){this.stopHandle()}updateResizerDirections(){const e=Xa(this.node.getAngle()),t=Math.floor(e*(tx.length/360));if(t!==this.prevShift){const i=tx.slice(t).concat(tx.slice(0,t)),r=o=>`${this.containerClassName}-cursor-${o}`;this.container.querySelectorAll(`.${this.resizeClassName}`).forEach((o,a)=>{dr(o,tx.map(l=>r(l)).join(" ")),tt(o,r(i[a]))}),this.prevShift=t}}getTrueDirection(e){const t=Xa(this.node.getAngle());let i=_1.indexOf(e);return i+=Math.floor(t*(_1.length/360)),i%=_1.length,_1[i]}toValidResizeDirection(e){return{top:"top-left",bottom:"bottom-right",left:"bottom-left",right:"top-right"}[e]||e}startResizing(e){e.stopPropagation(),this.model.startBatch("resize",{cid:this.cid});const t=Ii(e.target,"data-position");this.prepareResizing(e,t),this.startAction(e)}prepareResizing(e,t){const i=this.getTrueDirection(t);let r=0,s=0;t.split("-").forEach(c=>{r={left:-1,right:1}[c]||r,s={top:-1,bottom:1}[c]||s});const o=this.toValidResizeDirection(t),a={"top-right":"bottomLeft","top-left":"bottomRight","bottom-left":"topRight","bottom-right":"topLeft"}[o],l=Xa(this.node.getAngle());this.setEventData(e,{selector:a,direction:o,trueDirection:i,relativeDirection:t,angle:l,resizeX:r,resizeY:s,action:"resizing"})}startRotating(e){e.stopPropagation(),this.model.startBatch("rotate",{cid:this.cid});const t=this.node.getBBox().getCenter(),i=this.normalizeEvent(e),r=this.graph.snapToGrid(i.clientX,i.clientY);this.setEventData(e,{center:t,action:"rotating",angle:Xa(this.node.getAngle()),start:te.create(r).theta(t)}),this.startAction(e)}onMouseMove(e){const t=this.graph.findViewByCell(this.node);let i=this.getEventData(e);if(i.action){const r=this.normalizeEvent(e);let s=r.clientX,o=r.clientY;const a=this.graph.getPlugin("scroller"),l=this.options.restrictedResizing;if(l===!0||typeof l=="number"){const f=l===!0?0:l,g=a?Math.max(f,8):f,p=this.graph.container.getBoundingClientRect();s=d1(s,p.left+g,p.right-g),o=d1(o,p.top+g,p.bottom-g)}else this.options.autoScrollOnResizing&&a&&a.autoScroll(s,o);const c=this.graph.snapToGrid(s,o),h=this.graph.getGridSize(),d=this.node,u=this.options;if(i.action==="resizing"){i=i,i.resized||(t&&(t.addClass("node-resizing"),this.notify("node:resize",e,t)),i.resized=!0);const f=d.getBBox(),g=te.create(c).rotate(i.angle,f.getCenter()).diff(f[i.selector]);let p=i.resizeX?g.x*i.resizeX:f.width,m=i.resizeY?g.y*i.resizeY:f.height;const v=p,_=m;if(p=Rd(p,h),m=Rd(m,h),p=Math.max(p,u.minWidth||h),m=Math.max(m,u.minHeight||h),p=Math.min(p,u.maxWidth||1/0),m=Math.min(m,u.maxHeight||1/0),u.preserveAspectRatio){const y=f.width*m/f.height,C=f.height*p/f.width;p<y?m=C:p=y}const b=i.relativeDirection;if(u.allowReverse&&(v<=-p||_<=-m)){let y;b==="left"?v<=-p&&(y="right"):b==="right"?v<=-p&&(y="left"):b==="top"?_<=-m&&(y="bottom"):b==="bottom"?_<=-m&&(y="top"):b==="top-left"?v<=-p&&_<=-m?y="bottom-right":v<=-p?y="top-right":_<=-m&&(y="bottom-left"):b==="top-right"?v<=-p&&_<=-m?y="bottom-left":v<=-p?y="top-left":_<=-m&&(y="bottom-right"):b==="bottom-left"?v<=-p&&_<=-m?y="top-right":v<=-p?y="bottom-right":_<=-m&&(y="top-left"):b==="bottom-right"&&(v<=-p&&_<=-m?y="top-left":v<=-p?y="bottom-left":_<=-m&&(y="top-right"));const C=y;this.stopHandle();const x=this.container.querySelector(`.${this.resizeClassName}[data-position="${C}"]`);this.startHandle(x),this.prepareResizing(e,C),this.onMouseMove(e)}if(f.width!==p||f.height!==m){const y={ui:!0,direction:i.direction,relativeDirection:i.relativeDirection,trueDirection:i.trueDirection,minWidth:u.minWidth,minHeight:u.minHeight,maxWidth:u.maxWidth,maxHeight:u.maxHeight,preserveAspectRatio:u.preserveAspectRatio===!0};d.resize(p,m,y),this.notify("node:resizing",e,t)}}else if(i.action==="rotating"){i=i,i.rotated||(t&&(t.addClass("node-rotating"),this.notify("node:rotate",e,t)),i.rotated=!0);const f=d.getAngle(),g=i.start-te.create(c).theta(i.center);let p=i.angle+g;u.rotateGrid&&(p=Rd(p,u.rotateGrid)),p=Xa(p),f!==p&&(d.rotate(p,{absolute:!0}),this.notify("node:rotating",e,t))}}}onMouseUp(e){const t=this.getEventData(e);t.action&&(this.stopAction(e),this.model.stopBatch(t.action==="resizing"?"resize":"rotate",{cid:this.cid}))}startHandle(e){if(this.handle=e||null,tt(this.container,`${this.containerClassName}-active`),e){tt(e,`${this.containerClassName}-active-handle`);const t=e.getAttribute("data-position");if(t){const i=tx[_1.indexOf(t)];tt(this.container,`${this.containerClassName}-cursor-${i}`)}}}stopHandle(){if(dr(this.container,`${this.containerClassName}-active`),this.handle){dr(this.handle,`${this.containerClassName}-active-handle`);const e=this.handle.getAttribute("data-position");if(e){const t=tx[_1.indexOf(e)];dr(this.container,`${this.containerClassName}-cursor-${t}`)}this.handle=null}}startAction(e){this.startHandle(e.target),this.graph.view.undelegateEvents(),this.delegateDocumentEvents(E_e,e.data)}stopAction(e){this.stopHandle(),this.undelegateDocumentEvents(),this.graph.view.delegateEvents();const t=this.graph.findViewByCell(this.node),i=this.getEventData(e);t&&(t.removeClass(`node-${i.action}`),i.action==="resizing"&&i.resized?this.notify("node:resized",e,t):i.action==="rotating"&&i.rotated&&this.notify("node:rotated",e,t))}notify(e,t,i,r={}){if(i){const s=i.graph,o=s.view.normalizeEvent(t),a=s.snapToGrid(o.clientX,o.clientY);this.trigger(e,Object.assign({e:o,view:i,node:i.cell,cell:i.cell,x:a.x,y:a.y},r))}}dispose(){this.stopListening(),this.remove(),this.off()}}Ri([Pi()],M0e.prototype,"dispose",null),be.prototype.createTransformWidget=function(n){const e=this.getPlugin("transform");return e&&e.createWidget(n),this},be.prototype.clearTransformWidgets=function(){const n=this.getPlugin("transform");return n&&n.clearWidgets(),this};let A0e=class extends Ja{constructor(e={}){super(),this.name="transform",this.widgets=new Map,this.disabled=!1,this.options=e,gv(this.name,Rnt)}init(e){this.graph=e,!this.disabled&&this.startListening()}startListening(){this.graph.on("node:click",this.onNodeClick,this),this.graph.on("blank:mousedown",this.onBlankMouseDown,this)}stopListening(){this.graph.off("node:click",this.onNodeClick,this),this.graph.off("blank:mousedown",this.onBlankMouseDown,this)}enable(){this.disabled&&(this.disabled=!1,this.startListening())}disable(){this.disabled||(this.disabled=!0,this.stopListening())}isEnabled(){return!this.disabled}createWidget(e){this.clearWidgets();const t=this.createTransform(e);t&&(this.widgets.set(e,t),t.on("*",(i,r)=>{this.trigger(i,r),this.graph.trigger(i,r)}))}onNodeClick({node:e}){this.createWidget(e)}onBlankMouseDown(){this.clearWidgets()}createTransform(e){const t=this.getTransformOptions(e);return t.resizable||t.rotatable?new M0e(t,e,this.graph):null}parseOptionGroup(e,t,i){const r={};return Object.keys(i||{}).forEach(s=>{const o=i[s];r[s]=typeof o=="function"?o.call(e,t):o}),r}getTransformOptions(e){this.options.resizing||(this.options.resizing={enabled:!1}),this.options.rotating||(this.options.rotating={enabled:!1}),typeof this.options.resizing=="boolean"&&(this.options.resizing={enabled:this.options.resizing}),typeof this.options.rotating=="boolean"&&(this.options.rotating={enabled:this.options.rotating});const t=this.parseOptionGroup(this.graph,e,this.options.resizing),i=this.parseOptionGroup(this.graph,e,this.options.rotating);return{resizable:!!t.enabled,minWidth:t.minWidth||0,maxWidth:t.maxWidth||Number.MAX_SAFE_INTEGER,minHeight:t.minHeight||0,maxHeight:t.maxHeight||Number.MAX_SAFE_INTEGER,orthogonalResizing:typeof t.orthogonal=="boolean"?t.orthogonal:!0,restrictedResizing:!!t.restrict,autoScrollOnResizing:typeof t.autoScroll=="boolean"?t.autoScroll:!0,preserveAspectRatio:!!t.preserveAspectRatio,allowReverse:typeof t.allowReverse=="boolean"?t.allowReverse:!0,rotatable:!!i.enabled,rotateGrid:i.grid||15}}clearWidgets(){this.widgets.forEach((e,t)=>{this.graph.getCellById(t.id)&&e.dispose()}),this.widgets.clear()}dispose(){this.clearWidgets(),this.stopListening(),this.off(),pv(this.name)}};Ri([Pi()],A0e.prototype,"dispose",null);function R0e(n){const e=wa.getForeignObjectMarkup();return n?[{tagName:n,selector:"body"},e]:[e]}be.registerNode("vue-shape",{view:"vue-shape-view",markup:R0e(),attrs:{body:{fill:"none",stroke:"none",refWidth:"100%",refHeight:"100%"},fo:{refWidth:"100%",refHeight:"100%"}},propHooks(n){if(n.markup==null){const e=n.primer;if(e){n.markup=R0e(e);let t={};switch(e){case"circle":t={refCx:"50%",refCy:"50%",refR:"50%"};break;case"ellipse":t={refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%"};break}n.attrs=Kn({},{body:Object.assign({refWidth:null,refHeight:null},t)},n.attrs||{})}}return n}},!0);var Ont=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(n);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(t[i[r]]=n[i[r]]);return t};const P0e={};function Vnt(n){const{shape:e,component:t,inherit:i}=n,r=Ont(n,["shape","component","inherit"]);if(!e)throw new Error("should specify shape in config");P0e[e]={component:t},be.registerNode(e,Object.assign({inherit:i||"vue-shape"},r),!0)}let aT=!1;const M3=w.reactive({});function Fnt(n,e,t,i,r){aT&&(M3[n]=w.markRaw(w.defineComponent({render:()=>w.h(w.Teleport,{to:t},[w.h(e,{node:i,graph:r})]),provide:()=>({getNode:()=>i,getGraph:()=>r})})))}function Bnt(n){aT&&delete M3[n]}function O0e(){return aT}let A3=null;function mG(){return A3&&aT?null:(aT=!0,A3=w.defineComponent({setup(){return w.onBeforeUnmount(()=>{A3=null}),()=>w.h(w.Fragment,{},Object.keys(M3).map(n=>w.h(M3[n])))}}),A3)}class b1 extends Dh{getComponentContainer(){return this.selectors&&this.selectors.foContent}confirmUpdate(e){const t=super.confirmUpdate(e);return this.handleAction(t,b1.action,()=>{this.renderVueComponent()})}targetId(){return`${this.graph.view.cid}:${this.cell.id}`}renderVueComponent(){this.unmountVueComponent();const e=this.getComponentContainer(),t=this.cell,i=this.graph;if(e){const{component:r}=P0e[t.shape];r&&(O0e()?Fnt(this.targetId(),r,e,t,i):(this.vm=w.createApp({render(){return w.h(r,{node:t,graph:i})},provide(){return{getNode:()=>t,getGraph:()=>i}}}),this.vm.mount(e)))}}unmountVueComponent(){const e=this.getComponentContainer();return this.vm&&(this.vm.unmount(),this.vm=null),e&&(e.innerHTML=""),e}onMouseDown(e,t,i){const r=e.target;if(r.tagName.toLowerCase()==="input"){const o=r.getAttribute("type");if(o==null||["text","password","number","email","search","tel","url"].includes(o))return}super.onMouseDown(e,t,i)}unmount(){return O0e()&&Bnt(this.targetId()),this.unmountVueComponent(),super.unmount(),this}}b1.action="vue",b1.config({bootstrap:[b1.action],actions:{component:b1.action}}),Dh.registry.register("vue-shape-view",b1,!0);const bn=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},Wnt=bn({__name:"vueNode",setup(n){w.useCssVars(l=>({v65a95155:i.value.color,v1c79657d:i.value.opacity,v9c7a4d52:i.value.borderStyle,v6581e4be:i.value.borderWidth+"px",v9e4229ee:i.value.borderColor,v77368961:i.value.borderRadius+"px",v4d75d247:i.value.backgroundColor}));let t=w.inject("getNode")();const i=w.ref(t.getData()),r=w.ref(128),s=w.ref(128),o=({current:l})=>{r.value=l.width,s.value=l.height},a=({current:l})=>{i.value={...i.value,...l}};return w.provide("x6NodeData",i),w.provide("width",r),w.provide("height",s),w.onMounted(()=>{r.value=t.size().width,s.value=t.size().height,t.on("change:data",a),t.on("change:size",o)}),w.onBeforeUnmount(()=>{t.off("change:data",a),t.off("change:size",o)}),(l,c)=>i.value.visible===void 0||i.value.visible?(w.openBlock(),w.createElementBlock("div",{key:0,style:w.normalizeStyle({width:r.value+"px",height:s.value+"px",backgroundImage:i.value.backgroundImage&&i.value.backgroundImage!=="none"?`url(${i.value.backgroundImage})`:"none"}),class:"vueNode"},[w.renderSlot(l.$slots,"default",{},void 0,!0)],4)):w.createCommentVNode("",!0)}},[["__scopeId","data-v-3b36406f"]]),Hnt={class:"svgNode"},znt=["innerHTML"],$nt=["src"],Unt=["xlink:href"],Gnt=bn({__name:"svgNode",setup(n){w.inject("getNode");const e=w.inject("width"),t=w.inject("height"),i=w.inject("x6NodeData"),r=w.computed(()=>{var a;return{fontSize:`${Math.min(e.value,t.value)}px`,color:((a=i.value)==null?void 0:a.color)||"#ffffff"}}),s=w.computed(()=>({width:"100%",height:"100%"})),o=w.computed(()=>{var a;return{width:"100%",height:"100%",color:((a=i.value)==null?void 0:a.color)||"#ffffff"}});return w.onMounted(()=>{}),w.onBeforeUnmount(()=>{}),(a,l)=>(w.openBlock(),w.createElementBlock("div",Hnt,[w.unref(i).svgContent?(w.openBlock(),w.createElementBlock("div",{key:0,class:"svg-inline",style:w.normalizeStyle(o.value),innerHTML:w.unref(i).svgContent},null,12,znt)):w.unref(i).imgData?(w.openBlock(),w.createElementBlock("img",{key:1,src:w.unref(i).imgData,style:w.normalizeStyle(s.value)},null,12,$nt)):(w.openBlock(),w.createElementBlock("svg",{key:2,class:"svg-icon","aria-hidden":"true",style:w.normalizeStyle(r.value)},[w.createElementVNode("use",{"xlink:href":"#"+w.unref(i).icon},null,8,Unt)],4))]))}},[["__scopeId","data-v-fdb5a2e6"]]),jnt=["title"],qnt=bn({__name:"textNode",setup(n){const e=w.inject("x6NodeData"),t=w.computed(()=>{const s=e.value||{};return{justifyContent:s.justifyContent||"center",alignItems:s.alignItems||"center",padding:s.padding||"0",overflow:s.overflow||"hidden",backgroundColor:"transparent"}}),i=w.computed(()=>{const s=e.value||{},o=s.textOverflow==="ellipsis",a=s.whiteSpace||(o?"nowrap":"pre-wrap"),l=!s.lineHeight&&s.lineHeight!==0?"1.4":typeof s.lineHeight=="number"?s.lineHeight<=10?`${s.lineHeight}`:`${s.lineHeight}px`:s.lineHeight;return{color:s.color||"#ffffff",fontWeight:s.fontWeight||400,fontSize:`${s.fontSize||16}px`,letterSpacing:`${s.letterSpacing||0}px`,fontFamily:s.fontFamily||"inherit",fontStyle:s.fontStyle||"normal",textDecoration:s.textDecoration||"none",textAlign:s.textAlign||"center",lineHeight:l,whiteSpace:a,wordBreak:s.wordBreak||"break-word",textOverflow:s.textOverflow||"clip",overflow:"hidden",display:s.display||"block"}}),r=w.computed(()=>{const s=e.value.text;if(s==="")return"";const o=e.value.toFix;return Number.isFinite(+s)?(+s).toFixed(o??2):String(s??"--")});return(s,o)=>(w.openBlock(),w.createElementBlock("div",{class:"textNode",style:w.normalizeStyle(t.value),title:w.unref(e).text},[w.createElementVNode("span",{class:"textContent",style:w.normalizeStyle(i.value)},w.toDisplayString(r.value),5)],12,jnt))}},[["__scopeId","data-v-f2bddc8c"]]);function Knt(n=5){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let t="";for(let i=0;i<n;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function vG(n){let e=String(n).trim().replace(/[^\w\u4e00-\u9fa5]/g,"");return e||(e="key"),/^\d/.test(e)&&(e="_"+e),e+Knt()}function R3(n={},e,t){const i=String(e||"").split(".").filter(Boolean),r={...n};let s=r;return i.forEach((o,a)=>{if(a===i.length-1)s[o]=t;else{const l=s[o];s[o]=l&&typeof l=="object"&&!Array.isArray(l)?{...l}:{},s=s[o]}}),r}function _G(n={},e){const t=String(e||"").split(".").filter(Boolean);let i=n;for(const r of t){if(i==null||typeof i!="object")return;i=i[r]}return i}function V0e(n,e=200){let t=null;return function(...i){clearTimeout(t),t=setTimeout(()=>{n.apply(this,i)},e)}}const Ynt={class:"formNode"},Xnt=bn({__name:"formNode",setup(n){const e=w.inject("graph")();let i=w.inject("getNode")();const r=w.inject("x6NodeData"),s=w.inject("topoApi"),o=w.computed(()=>r.value.model),a=w.ref(r.value.model.modelValue);w.watch(()=>a.value,p=>{const m=i.getData();m.model.modelValue!=p&&(m.model.modelValue=p,i.setData(m,{deep:!1}))}),w.watch(()=>r.value.model.modelValue,p=>{a.value=p});const l=p=>{switch(p){case"date":return"YYYY-MM-DD";case"datetime":return"YYYY-MM-DD HH:mm:ss";case"week":return"[Week] ww";case"month":return"YYYY-MM";case"year":return"YYYY";case"daterange":return"YYYY-MM-DD";case"datetimerange":return"YYYY-MM-DD HH:mm:ss";case"monthrange":return"YYYY-MM";case"yearrange":return"YYYY"}},c=w.ref(!1),h=()=>{o.value.buttonConfirm?an.ElMessageBox.confirm(o.value.buttonConfirmTips,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{r.value.dataSource.type=="http"&&u(i)}).catch(()=>{}):(console.log(a.value,r.value),setTimeout(()=>{r.value.dataSource.type=="http"&&u(i),r.value.dataSource.type=="node"&&f(i)},200))},d=p=>{var m,v;if(p.params&&Array.isArray(p.params)&&p.params.length>0){let _=JSON.parse(JSON.stringify(p));delete _.params;const b={};for(let y of p.params)y.key&&(y.value&&e.getCellById(y.value)?b[y.key]=(v=(m=e.getCellById(y.value).getData())==null?void 0:m.model)==null?void 0:v.modelValue:b[y.key]=y.value);return _.params=b,_}return p},u=p=>{const m=d(r.value.dataSource);if(m.type=="http"&&m.httpUrl){c.value=!0;try{s.httpRequest(m).then(v=>{c.value=!1,v&&v.success&&(m.parse&&g(v,p.id),o.value.buttonSuccess&&an.ElMessage.success(o.value.buttonSuccessTips)),v&&!v.success&&(m.parse&&g(v,p.id),o.value.buttonError&&an.ElMessage.error(v.msg||"操作失败!"))})}catch(v){c.value=!1,an.ElMessage.error("操作失败!"),console.error(v)}}else an.ElMessage.error("未绑定请求!")},f=p=>{g({},p.id)},g=(p,m)=>{var b;const v=e.getCellById(m);if(!v)return console.error(m,e.toJSON()),!1;const _=v.getData();if(v&&_)if(_.dataSource.parse){let y={};(b=_.dataSource.bindNode)==null||b.forEach(L=>{const D=e.getCellById(L).getData(),E=D.dataSource.fields;y[e.getCellById(L).getData().name]=Object.keys(E).reduce((k,T)=>(k[T]=_G(D,E[T])??null,k),{})});const C=new Function("data","$",_.dataSource.parse);_.dataSource.type=="opcua"?C({payload:p,pointTemp:_.dataSource.point},y):(_.dataSource.type=="http"||_.dataSource.type=="node")&&C(p,y);const x=e.toJSON().cells;for(let L in y){let D=x.find(E=>{var k;return((k=E==null?void 0:E.data)==null?void 0:k.name)===L});if(D){D=e.getCellById(D.id);const E=D.data.dataSource.fields,k=y[L];Object.keys(k).forEach(T=>{if(k[T]!==null){const I=E[T],N=k[T];D.setData(R3(D.getData(),I,N),{deep:!1})}})}}}else an.ElMessage.error("没有执行操作!")};return(p,m)=>{const v=w.resolveComponent("el-input"),_=w.resolveComponent("el-switch"),b=w.resolveComponent("el-option"),y=w.resolveComponent("el-select"),C=w.resolveComponent("el-date-picker"),x=w.resolveComponent("el-input-number"),L=w.resolveComponent("el-button");return w.openBlock(),w.createElementBlock("div",Ynt,[w.unref(r).type=="input"?(w.openBlock(),w.createBlock(v,{key:0,modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=D=>a.value=D),placeholder:o.value.placeholder,type:o.value.inputType,clearable:""},null,8,["modelValue","placeholder","type"])):w.createCommentVNode("",!0),w.unref(r).type=="switch"?(w.openBlock(),w.createBlock(_,{key:1,modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=D=>a.value=D),size:o.value.size,class:"ml-2",style:w.normalizeStyle({"--el-switch-on-color":o.value.buttonOnColor,"--el-switch-off-color":o.value.buttonOffColor}),onChange:h},null,8,["modelValue","size","style"])):w.createCommentVNode("",!0),w.unref(r).type=="select"?(w.openBlock(),w.createBlock(y,{key:2,modelValue:a.value,"onUpdate:modelValue":m[2]||(m[2]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,clearable:"",style:{width:"100%",height:"100%"}},{default:w.withCtx(()=>{var D,E;return[(D=o.value)!=null&&D.option?(w.openBlock(!0),w.createElementBlock(w.Fragment,{key:0},w.renderList((E=o.value)==null?void 0:E.option,(k,T)=>(w.openBlock(),w.createBlock(b,{label:k.label,value:k.value},null,8,["label","value"]))),256)):w.createCommentVNode("",!0)]}),_:1},8,["modelValue","size","placeholder"])):w.createCommentVNode("",!0),w.unref(r).type=="selectMore"?(w.openBlock(),w.createBlock(y,{key:3,modelValue:a.value,"onUpdate:modelValue":m[3]||(m[3]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,multiple:"","collapse-tags":"",clearable:"",style:{width:"100%",height:"100%"}},{default:w.withCtx(()=>{var D,E;return[(D=o.value)!=null&&D.option?(w.openBlock(!0),w.createElementBlock(w.Fragment,{key:0},w.renderList((E=o.value)==null?void 0:E.option,(k,T)=>(w.openBlock(),w.createBlock(b,{label:k.label,value:k.value},null,8,["label","value"]))),256)):w.createCommentVNode("",!0)]}),_:1},8,["modelValue","size","placeholder"])):w.createCommentVNode("",!0),w.unref(r).type=="date"?(w.openBlock(),w.createBlock(C,{key:4,modelValue:a.value,"onUpdate:modelValue":m[4]||(m[4]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,type:o.value.dateType,clearable:"",style:{width:"100%"},format:l(o.value.dateType),"value-format":l(o.value.dateType)},null,8,["modelValue","size","placeholder","type","format","value-format"])):w.createCommentVNode("",!0),w.unref(r).type=="dateRange"?(w.openBlock(),w.createBlock(C,{key:5,modelValue:a.value,"onUpdate:modelValue":m[5]||(m[5]=D=>a.value=D),size:o.value.size,placeholder:o.value.placeholder,type:o.value.dateType,clearable:"",style:{width:"100%"},format:l(o.value.dateType),"value-format":l(o.value.dateType)},null,8,["modelValue","size","placeholder","type","format","value-format"])):w.createCommentVNode("",!0),w.unref(r).type=="number"?(w.openBlock(),w.createBlock(x,{key:6,modelValue:a.value,"onUpdate:modelValue":m[6]||(m[6]=D=>a.value=D),size:o.value.size,controls:!1,placeholder:o.value.placeholder,clearable:"",style:{width:"100%"}},null,8,["modelValue","size","placeholder"])):w.createCommentVNode("",!0),w.unref(r).type=="button"?(w.openBlock(),w.createBlock(L,{key:7,type:"primary",style:{width:"100%"},size:o.value.size,color:o.value.buttonColor,loading:c.value,disable:c.value,onClick:h},{default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(o.value.modelValue),1)]),_:1},8,["size","color","loading","disable"])):w.createCommentVNode("",!0)])}}},[["__scopeId","data-v-3943f259"]]),F0e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADMElEQVR4AeyZPYgTQRTH39topXKXXU/lUFAkEVstchYBBQsrscmhaHGFCkkQPxALG8/C6vA7u0GuOBBFSGMjNoofYCPYa7IHd4WFIGRF7c7L+N5e9pLL7W52klw2C1nmZWbfzM78f/smO8msAhE/hgBhB3AYgWEEurwD9hRSdfNe3DDfR8qK5llmV1TDvA8IVxHgaKRMwDNVL09zBCaBDgHwIUpGkgFQucAA40AHitpHK5c4FgVjrSSZ0zgDcCGyNgQIO3QDE4HR4te9ml6Z0ozyqZ1Pf2wJemMGAkA1Kk8UsWlBIM4JUF4u/f3zXeXHewCK0AE0wzQA8CKsPUbp9AotrF+2PjLHqOyZQgWIF8unae3JeqmjhfXw5hhkvOrZHyoA1vAki/A1hAm/+lABSNgIWbu0x69BuAAKlv3EcR0iLnLuZaEC0BPnnZcwxy9AvHXKbrkEgNvl3fms7P5XIGq3vXoRCAUrm3juVc/+UAFYQDV/YLoO8ZnPhYCfAOIT3fkbJP4S+/ysI4AxfWGXWpyf8+tYpo4hqrnEBBla+cSOai6ZtnLJmSB9dASwjMslEGJK1SvXgwyykW2kAWiJv0YhTtuiEGdUff6EXQ7pQwpg5PG3faTzLlkjoSips+buhqO/JSmAWCz2wkXeNvgHJRd/X1yBAehH101SlCJbnwQcoak1u77C20PtM2RdgwcC0PTFgwLgjrccu+Y8fakv26U2HyScf6Cx+K4hAgEIXAr2yER8oBmV4376m8Q7zbqCaAug0t4LjeQ+daiiNQnAEq8TrX4+dxHPbraOIXwBthfMQ4DKLR5BwuL2OtFygY94p2VHEL4ANQXo35LTv0wu0pr9T2vlmgDiVxoCSEN4AshOHUeBkwuALEHkJcQ7l0pBuAJohUqqg6njCFjNCaJAJ/y0oUwqBYZwBRAKPpQabmMaB4JYA8DTho30pMgGIdkQrKnZmoU1APhp41hzi/DLGXB0Ned1XQ2AuiNq2RAg7IhxBH71XET/OvzNAG/6N16vRxKvlWouMck7ALToROodGW25nKvmkmc4AmDRDoAVkfdjqzrr+0U2QK8D28/+Ig/wHwAA///iiMh1AAAABklEQVQDAClVhH+eelZjAAAAAElFTkSuQmCC",Znt={class:"imgNode"},Jnt=["src"],Qnt=bn({__name:"imageNode",setup(n){w.inject("getNode");const e=w.inject("x6NodeData"),t=w.computed(()=>({width:`${e.value.imgWidth??50}px`,height:`${e.value.imgHeight??50}px`}));return w.onMounted(()=>{}),w.onBeforeUnmount(()=>{}),(i,r)=>(w.openBlock(),w.createElementBlock("div",Znt,[w.createElementVNode("img",{src:w.unref(e).imgData||w.unref(F0e),style:w.normalizeStyle(t.value)},null,12,Jnt)]))}},[["__scopeId","data-v-b89502c5"]]),ert={class:"tableNode"},trt={class:"table table--header"},irt=["onMousedown"],nrt={class:"table table--body"},rrt=["title"],srt=bn({__name:"tableNode",setup(n){const e=w.inject("x6NodeData"),t={rowHeight:32,colWidth:120,rowHeights:[],colWidths:[],rowHeightsEnabled:!1,header:{enabled:!0,height:36,backgroundColor:"#1f2a3a",color:"#e5e7eb",fontSize:12,fontWeight:600,borderColor:"#303746",borderWidth:1,textAlign:"center",aligns:[]},cell:{backgroundColor:"#121924",altBackgroundColor:"#101826",color:"#cbd5f5",fontSize:12,borderColor:"#303746",borderWidth:1},data:{header:[],rows:[]}},i=w.computed(()=>{var x;const C=((x=e.value)==null?void 0:x.table)||{};return{...t,...C,header:{...t.header,...C.header||{}},cell:{...t.cell,...C.cell||{}},data:{...t.data,...C.data||{}}}}),r=w.computed(()=>{var x;return(((x=i.value.data)==null?void 0:x.rows)||[]).length}),s=w.computed(()=>{var L,D;const C=(((L=i.value.data)==null?void 0:L.header)||[]).length,x=Math.max(0,...(((D=i.value.data)==null?void 0:D.rows)||[]).map(E=>(E==null?void 0:E.length)||0));return Math.max(C,x)}),o=w.computed(()=>{var C;return((C=i.value.header)==null?void 0:C.enabled)!==!1}),a=w.computed(()=>{var C;return Number((C=i.value.header)==null?void 0:C.height)||0}),l=w.computed(()=>o.value?{height:`calc(100% - ${a.value}px)`}:{height:"100%"}),c=w.ref(!1),h=w.computed(()=>{const C=i.value.colWidths||[],x=Number(i.value.colWidth)||0;return Array.from({length:s.value},(L,D)=>({width:Number(C[D])||x}))}),d=(C,x)=>{const L=Math.max(40,Math.round(x));if(!e.value)return;const D=e.value.table||{},E=Array.isArray(D.colWidths)?[...D.colWidths]:[];E[C]=L,e.value.table={...D,colWidths:E}},u=(C,x)=>{var M,P;const L=x+1;if(L>=h.value.length)return;C.preventDefault(),C.stopPropagation();const D=C.clientX,E=((M=h.value[x])==null?void 0:M.width)||0,k=((P=h.value[L])==null?void 0:P.width)||0;let T=0;const I=R=>{T=R.clientX-D;const W=40,$=-(E-W),z=k-W,K=Math.min(z,Math.max($,T));d(x,E+K),d(L,k-K)},N=()=>{const W=-(E-40),$=k-40,z=Math.min($,Math.max(W,T));d(x,E+z),d(L,k-z),window.removeEventListener("mousemove",I),window.removeEventListener("mouseup",N)};window.addEventListener("mousemove",I),window.addEventListener("mouseup",N)},f=()=>{const C=g.value;C&&(c.value=C.scrollHeight>C.clientHeight)},g=w.ref(null);w.onMounted(()=>{w.nextTick(f),window.addEventListener("resize",f)}),w.onBeforeUnmount(()=>{window.removeEventListener("resize",f)}),w.watch([r,s,a],()=>{w.nextTick(f)});const p=C=>{const x=Number(i.value.rowHeight)||0;if(!i.value.rowHeightsEnabled)return x;const L=i.value.rowHeights||[];return Number(L[C])||x},m=C=>{var L;return(((L=i.value.data)==null?void 0:L.header)||[])[C]??`列${C+1}`},v=(C,x)=>{var D,E;return((E=(((D=i.value.data)==null?void 0:D.rows)||[])[C])==null?void 0:E[x])??""},_=w.computed(()=>{const C=i.value.header||{};return{backgroundColor:C.backgroundColor,color:C.color,fontSize:`${C.fontSize}px`,fontWeight:C.fontWeight,textAlign:C.textAlign,border:`${C.borderWidth}px solid ${C.borderColor}`}}),b=C=>{const x=i.value.header||{};return(Array.isArray(x.aligns)?x.aligns:[])[C]||x.textAlign},y=(C,x)=>{const L=i.value.cell||{};return{backgroundColor:C%2===1&&L.altBackgroundColor||L.backgroundColor,color:L.color,fontSize:`${L.fontSize}px`,textAlign:b(x),border:`${L.borderWidth}px solid ${L.borderColor}`}};return(C,x)=>(w.openBlock(),w.createElementBlock("div",ert,[o.value?(w.openBlock(),w.createElementBlock("div",{key:0,class:"table-header",style:w.normalizeStyle({overflowY:c.value?"scroll":"hidden"})},[w.createElementVNode("table",trt,[w.createElementVNode("colgroup",null,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(L,D)=>(w.openBlock(),w.createElementBlock("col",{key:D,style:w.normalizeStyle({width:L.width+"px"})},null,4))),128))]),w.createElementVNode("thead",null,[w.createElementVNode("tr",{style:w.normalizeStyle({height:a.value+"px"})},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(L,D)=>(w.openBlock(),w.createElementBlock("th",{key:D,style:w.normalizeStyle(_.value)},[w.createTextVNode(w.toDisplayString(m(D))+" ",1),D<h.value.length-1?(w.openBlock(),w.createElementBlock("span",{key:0,class:"col-resize-handle",onMousedown:E=>u(E,D)},null,40,irt)):w.createCommentVNode("",!0)],4))),128))],4)])])],4)):w.createCommentVNode("",!0),w.createElementVNode("div",{class:"table-body",ref_key:"bodyWrapperRef",ref:g,style:w.normalizeStyle(l.value),onScroll:f},[w.createElementVNode("table",nrt,[w.createElementVNode("colgroup",null,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(L,D)=>(w.openBlock(),w.createElementBlock("col",{key:D,style:w.normalizeStyle({width:L.width+"px"})},null,4))),128))]),w.createElementVNode("tbody",null,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(r.value,L=>(w.openBlock(),w.createElementBlock("tr",{key:L,style:w.normalizeStyle({height:p(L-1)+"px"})},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(h.value,(D,E)=>(w.openBlock(),w.createElementBlock("td",{key:E,style:w.normalizeStyle(y(L-1,E)),title:v(L-1,E)},w.toDisplayString(v(L-1,E)),13,rrt))),128))],4))),128))])])],36)]))}},[["__scopeId","data-v-e4aff2b8"]]);/*! *****************************************************************************
808
808
  Copyright (c) Microsoft Corporation.
809
809
 
810
810
  Permission to use, copy, modify, and/or distribute this software for any