epic-designer-gold 1.0.4 → 1.0.5

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.
Files changed (56) hide show
  1. package/dist/{attributeView-DEg9mFCt.cjs → attributeView-B2dWB_U2.cjs} +1 -1
  2. package/dist/{attributeView-CPrGnVQ8.js → attributeView-Cu_tjo9A.js} +3 -3
  3. package/dist/{axios-BAhOY32t.cjs → axios-B8aFvCWj.cjs} +1 -1
  4. package/dist/{axios-BFVeUxau.js → axios-Bb3STC1u.js} +1 -1
  5. package/dist/{index-C5-ZZLug.cjs → index-21c4Pe3i.cjs} +1 -1
  6. package/dist/{index-Sin3ac_7.js → index-B553TaXm.js} +1 -1
  7. package/dist/{index-Dru9G2MF.js → index-BLJT8e0Q.js} +3 -3
  8. package/dist/{index-CIwV58Ko.js → index-BULuVnVl.js} +9 -9
  9. package/dist/{index-CtkdvWFN.cjs → index-BV9SE7wG.cjs} +1 -1
  10. package/dist/{index-BEXliJtJ.cjs → index-BhcwWM1G.cjs} +1 -1
  11. package/dist/{index-ykB9CsYG.cjs → index-Bn8pwpgq.cjs} +1 -1
  12. package/dist/{index-C2Sx6r6b.cjs → index-Bxi3JLms.cjs} +1 -1
  13. package/dist/{index-BstMY1Nn.js → index-Bybwt7-u.js} +1 -1
  14. package/dist/{index-BPmq8lmK.js → index-CEDIwmNK.js} +2 -2
  15. package/dist/{index-DdsHIglg.js → index-CEvDmc0a.js} +2 -2
  16. package/dist/{index-dUOJH8fj.js → index-CHCOxt3B.js} +3 -3
  17. package/dist/{index-BN_dXDiO.cjs → index-CI3dhGXT.cjs} +1 -1
  18. package/dist/{index-Bsv8EECz.js → index-CMbBKMQU.js} +2 -2
  19. package/dist/{index-KGGnmoAO.cjs → index-CYAKMqdR.cjs} +1 -1
  20. package/dist/{index-D7z34DMU.js → index-CgwN4ucQ.js} +2 -2
  21. package/dist/{index-BoVrWUpL.js → index-CjIIhZdV.js} +3 -3
  22. package/dist/{index-DddOVmF6.cjs → index-Cq6eLpKZ.cjs} +1 -1
  23. package/dist/{index-D3Uft3bJ.cjs → index-CqeRfqUw.cjs} +1 -1
  24. package/dist/{index-BPRzjSrH.cjs → index-CrV5FaWU.cjs} +2 -2
  25. package/dist/{index-BiXYEiWV.js → index-D0kQz_zt.js} +1 -1
  26. package/dist/index-DR80h8IU.js +4 -0
  27. package/dist/{index-dcjty1Ho.cjs → index-DUMEtCCN.cjs} +1 -1
  28. package/dist/{index-CgisEnmm.cjs → index-DddTXMY9.cjs} +1 -1
  29. package/dist/{index-g1W7IHK_.cjs → index-DeFAvWuV.cjs} +1 -1
  30. package/dist/{index-B8V7odtp.cjs → index-DeZ09CHf.cjs} +1 -1
  31. package/dist/{index-DO5DuUPL.js → index-Dg7MK40D.js} +1 -1
  32. package/dist/{index-C6C5D9M8.js → index-DxNdcsD-.js} +2 -2
  33. package/dist/{index-DAhVvQNH.cjs → index-DzxQG0o7.cjs} +1 -1
  34. package/dist/{index-Cwgv4MbW.js → index-VblxMq6V.js} +2 -2
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +2 -2
  37. package/dist/{outline-Coy4TGIa.cjs → outline-CK-jNomF.cjs} +1 -1
  38. package/dist/{outline-CG-aHThT.js → outline-DxCKINRN.js} +2 -2
  39. package/dist/{sign-C0z0Ygs4.js → sign-B-FCN_7O.js} +2 -2
  40. package/dist/{sign-BlMhTkWG.cjs → sign-Dho4kHTC.cjs} +1 -1
  41. package/dist/{styleView-D0W-N4vW.cjs → styleView-CRUqDcCl.cjs} +1 -1
  42. package/dist/{styleView-CkbdwQhA.js → styleView-ClMjCfMk.js} +3 -3
  43. package/dist/{tree.vue_vue_type_script_setup_true_lang-RWHCYpkY.js → tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js} +1 -1
  44. package/dist/{tree.vue_vue_type_script_setup_true_lang-KKt_Qgqv.cjs → tree.vue_vue_type_script_setup_true_lang-DDDqMedP.cjs} +1 -1
  45. package/dist/ui/elementPlus/index.cjs +1 -1
  46. package/dist/ui/elementPlus/index.js +4 -4
  47. package/dist/ui/naiveUi/index.cjs +1 -1
  48. package/dist/ui/naiveUi/index.js +1 -1
  49. package/dist/{uploadFile-Bh5GyGFd.js → uploadFile-Bc5Rxk0b.js} +1 -1
  50. package/dist/{uploadFile-CmKFRZMw.cjs → uploadFile-oB2-NP-v.cjs} +1 -1
  51. package/dist/{uploadImage-DENhzttU.cjs → uploadImage-4tgp3t7X.cjs} +1 -1
  52. package/dist/{uploadImage-CcMA6CyX.cjs → uploadImage-CF7fobUP.cjs} +1 -1
  53. package/dist/{uploadImage-CbVsUivh.js → uploadImage-CGXm3zNQ.js} +1 -1
  54. package/dist/{uploadImage-qHq6JX83.js → uploadImage-COCC3pxH.js} +1 -1
  55. package/package.json +1 -1
  56. package/dist/index-BY9j66Gp.js +0 -4
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./index-BPRzjSrH.cjs"),l=require("./axios-BAhOY32t.cjs"),g=require("./index-DddOVmF6.cjs"),b=["title"],B=e.defineComponent({__name:"attributeView",setup(P){const{t:r}=g.useLocale(),d=e.inject("designer"),u=e.inject("pageSchema"),f=e.inject("revoke"),h=l.pluginManager.getComponentConfings(),c=e.computed(()=>d.state.checkedNode);function y(n){var a;return typeof n.show=="boolean"?n.show:typeof n.show=="function"?(a=n.show)==null?void 0:a.call(n,{values:c.value}):!0}const i=e.ref([]);e.watchEffect(()=>{var o,t,s;const n=(o=d.state.checkedNode)==null?void 0:o.type;if(!d.state.checkedNode||!n)return[];const a=((t=h[n])==null?void 0:t.config.attribute)??[];i.value=[{label:r("componentId"),type:"input",field:"id",componentProps:{disabled:!0}},...a],d.state.checkedNode.id===((s=u.schemas[0])==null?void 0:s.id)&&i.value.push({label:r("canvasWidth"),type:"EInputSize",field:"canvas.width",editData:u},{label:r("canvasHeight"),type:"EInputSize",field:"canvas.height",editData:u})});function m(n,a,o,t=c.value){typeof o.onChange=="function"&&o.onChange({value:n,values:t,componentAttributes:i}),o.changeSync?l.setValueByPath(t,a,n):e.nextTick(()=>{l.setValueByPath(t,a,n)}),f.push(u.schemas,r("editComponentProperties"))}function v(n,a,o=c.value){e.nextTick(()=>{l.setValueByPath(o,"componentProps.dynamicId",n)})}return(n,a)=>{var o;return e.openBlock(),e.createElementBlock("div",{class:"epic-attribute-view",key:(o=c.value)==null?void 0:o.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,t=>{var s;return e.openBlock(),e.createElementBlock("div",{key:t.field},[y(t)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["epic-attr-item",t.layout])},[t.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"epic-attr-label",title:t.label},e.toDisplayString(t.label),9,b)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["epic-attr-input",{"block!":t.layout==="vertical"}])},[e.createVNode(e.unref(k._sfc_main),{componentSchema:{...t,componentProps:{...t.componentProps,...t.field==="componentProps.defaultValue"?(s=c.value)==null?void 0:s.componentProps:{},input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},dynamicId:e.unref(l.getValueByPath)(t.editData??c.value,"componentProps.dynamicId"),"model-value":e.unref(l.getValueByPath)(t.editData??c.value,t.field),"onUpdate:modelValue":p=>m(p,t.field,t,t.editData),"onUpdate:dynamicId":p=>v(p)},null,8,["componentSchema","dynamicId","model-value","onUpdate:modelValue","onUpdate:dynamicId"])],2)],2)):e.createCommentVNode("",!0)])}),128))])}}});exports.default=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("./index-CrV5FaWU.cjs"),l=require("./axios-B8aFvCWj.cjs"),g=require("./index-Cq6eLpKZ.cjs"),b=["title"],B=e.defineComponent({__name:"attributeView",setup(P){const{t:r}=g.useLocale(),d=e.inject("designer"),u=e.inject("pageSchema"),f=e.inject("revoke"),h=l.pluginManager.getComponentConfings(),c=e.computed(()=>d.state.checkedNode);function y(n){var a;return typeof n.show=="boolean"?n.show:typeof n.show=="function"?(a=n.show)==null?void 0:a.call(n,{values:c.value}):!0}const i=e.ref([]);e.watchEffect(()=>{var o,t,s;const n=(o=d.state.checkedNode)==null?void 0:o.type;if(!d.state.checkedNode||!n)return[];const a=((t=h[n])==null?void 0:t.config.attribute)??[];i.value=[{label:r("componentId"),type:"input",field:"id",componentProps:{disabled:!0}},...a],d.state.checkedNode.id===((s=u.schemas[0])==null?void 0:s.id)&&i.value.push({label:r("canvasWidth"),type:"EInputSize",field:"canvas.width",editData:u},{label:r("canvasHeight"),type:"EInputSize",field:"canvas.height",editData:u})});function m(n,a,o,t=c.value){typeof o.onChange=="function"&&o.onChange({value:n,values:t,componentAttributes:i}),o.changeSync?l.setValueByPath(t,a,n):e.nextTick(()=>{l.setValueByPath(t,a,n)}),f.push(u.schemas,r("editComponentProperties"))}function v(n,a,o=c.value){e.nextTick(()=>{l.setValueByPath(o,"componentProps.dynamicId",n)})}return(n,a)=>{var o;return e.openBlock(),e.createElementBlock("div",{class:"epic-attribute-view",key:(o=c.value)==null?void 0:o.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,t=>{var s;return e.openBlock(),e.createElementBlock("div",{key:t.field},[y(t)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["epic-attr-item",t.layout])},[t.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"epic-attr-label",title:t.label},e.toDisplayString(t.label),9,b)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["epic-attr-input",{"block!":t.layout==="vertical"}])},[e.createVNode(e.unref(k._sfc_main),{componentSchema:{...t,componentProps:{...t.componentProps,...t.field==="componentProps.defaultValue"?(s=c.value)==null?void 0:s.componentProps:{},input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},dynamicId:e.unref(l.getValueByPath)(t.editData??c.value,"componentProps.dynamicId"),"model-value":e.unref(l.getValueByPath)(t.editData??c.value,t.field),"onUpdate:modelValue":p=>m(p,t.field,t,t.editData),"onUpdate:dynamicId":p=>v(p)},null,8,["componentSchema","dynamicId","model-value","onUpdate:modelValue","onUpdate:dynamicId"])],2)],2)):e.createCommentVNode("",!0)])}),128))])}}});exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as S, inject as f, computed as V, ref as C, watchEffect as N, openBlock as s, createElementBlock as l, Fragment as E, renderList as U, normalizeClass as v, toDisplayString as B, createCommentVNode as y, createElementVNode as D, createVNode as x, unref as h, nextTick as g } from "vue";
2
- import { _ as z } from "./index-CIwV58Ko.js";
3
- import { p as j, j as b, s as m } from "./axios-BFVeUxau.js";
4
- import { u as F } from "./index-DO5DuUPL.js";
2
+ import { _ as z } from "./index-BULuVnVl.js";
3
+ import { p as j, j as b, s as m } from "./axios-Bb3STC1u.js";
4
+ import { u as F } from "./index-Dg7MK40D.js";
5
5
  const L = ["title"], $ = /* @__PURE__ */ S({
6
6
  __name: "attributeView",
7
7
  setup(T) {
@@ -1,4 +1,4 @@
1
- "use strict";var dt=Object.defineProperty;var pt=(t,e,n)=>e in t?dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>pt(t,typeof e!="symbol"?e+"":e,n);const q=require("vue"),ht=require("./index-DddOVmF6.cjs"),J=(t,e)=>q.defineAsyncComponent({loader:t,loadingComponent:e,delay:80});function Z(t=10){const e="abcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++){const s=Math.floor(Math.random()*e.length);n+=e[s]}return n}function mt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const{t:Re}=ht.useLocale();function K(t,e=new WeakMap){if(typeof t!="object"||t===null)return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const r=t.map(s=>K(s,e));return e.set(t,r),r}const n={};return e.set(t,n),Object.keys(t).forEach(r=>{n[r]=K(t[r],e)}),n}function yt(t){const[e]=Ie([K(t)],n=>{var s,o;const r={...n,id:`${n.type}_${Z(8)}`};return(r.field||r.input)&&!((o=(s=He.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&o.fixedField)&&(r.field=r.id),r});return e}function me(t,e,n=!0){for(const[r,s]of Object.entries(e)){let o=t==null?void 0:t[r];o&&s&&typeof o=="object"&&typeof s=="object"?(Array.isArray(o)&&!Array.isArray(s)?o=t[r]={}:!Array.isArray(o)&&Array.isArray(s)&&(o=t[r]=[]),me(o,s,n)):t[r]=s}n&&Object.keys(t).reverse().forEach(r=>{e.hasOwnProperty(r)||(Array.isArray(t)?t.splice(Number(r),1):delete t[r])})}function gt(t,e,n=[],r=new WeakMap){const s=o=>{if(Array.isArray(o))return o.map(s);if(typeof o=="object"&&o!==null){if(r.has(o))return"[Circular]";r.set(o,!0);const i=Object.keys(o).sort(),c={};return i.forEach(f=>{n.includes(f)||(c[f]=s(o[f]))}),r.delete(o),c}else return o};return JSON.stringify(s(t))===JSON.stringify(s(e))}function wt(t,e){const n=[];let r=!1;function s(o){if(n.push(o),o.id===e&&(r=!0),!r&&o.children!=null&&o.children.length>0)for(let i=0;i<o.children.length&&(s(o.children[i]),!r);i++);if(!r&&o.slots)for(let i in o.slots)for(let c=0;c<o.slots[i].length&&(s(o.slots[i][c]),!r);c++);r||n.pop()}return t.forEach(s),r||console.error(`没有查询到id为${e}的节点`),n}function bt(t,e,n){const r=e.split(".");let s=t;for(let o=0;o<r.length;o++){if(s==null)return n;s=s[r[o]]}return s===void 0?n:s}function St(t,e,n){const r=e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let s=t;for(let o=0;o<r.length-1;o++){const i=r[o];s[i]==null&&(s[i]=isNaN(Number(r[o+1]))?{}:[]),s=s[i]}return s[r[r.length-1]]=n,t}function Et(t,e="default"){return Ue(t,e).map(r=>r.field)}function Ue(t,e="default"){const n=H(t,s=>{var o;return s.type==="form"&&(((o=s.componentProps)==null?void 0:o.name)??s.name===e)},!0);return H((n==null?void 0:n.children)??[],s=>!!s.input,!1,s=>s.type!=="subform")}function H(t,e,n=!1,r){const s=[],o=[...t];for(;o.length;){const i=o.pop();if(i!=null&&i.children&&(!r||r(i))&&o.push(...i.children),i!=null&&i.slots&&(!r||r(i)))for(let c in i.slots)o.push(...i.slots[c]);if(e(i)&&(s.push(i),n))return i}return n?!1:s}function Ie(t,e,n){const r=[...t];for(;r.length;){const s=r.pop();if(s!=null&&s.children&&(!n||n(s))&&r.push(...s.children),s!=null&&s.slots&&(!n||n(s)))for(let o in s.slots)r.push(...s.slots[o]);me(s,e(s))}return t}function Rt(t,e){const n=H(t,r=>r.id===e,!0);if(!n)throw new Error(`没有查询到id为${e}的节点`);return n}function Ct(t,e){const n=[{type:"",children:t}];let r=0,s=null;if(H(n,o=>{if(s=o.children??null,!s){if(o!=null&&o.slots)for(let i in o.slots){s=o.slots[i];for(let c=0;c<s.length;c++)if(s[c].id===e)return r=c,!0}return!1}for(let i=0;i<s.length;i++)if(s[i].id===e)return r=i,!0;return!1},!0),!s)throw new Error(`没有查询到id为${e}的节点`);return{list:s,schema:s[r],index:r}}function At(t){const e={schemas:[{type:"page",id:"root",label:Re("page"),children:[{label:Re("form"),type:"form",icon:"epic-icon-daibanshixiang",labelWidth:t.config.labelWidth||100,name:"default",componentProps:{layout:t.config.layout||"horizontal",labelWidth:t.config.labelWidth||100,labelLayout:t.config.labelLayout==="flex"?"fixed":"flex",labelCol:t.config.labelCol||{span:5},wrapperCol:t.config.wrapperCol||{span:19},hideRequiredMark:t.config.hideRequiredMark||!1,colon:t.config.colon||!0,labelAlign:t.config.labelAlign||"right",size:t.config.size||"middle"},children:[],id:"form_"+Z()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return e.schemas[0].children[0].children=k(t.list),e}function k(t,e){return t.map(n=>{var f,l,u;let r=n.type??"";const s=n.options??{},o=(d,g)=>{r===d&&(r=g,s.defaultValue&&(s.defaultValue=JSON.parse(s.defaultValue)))};if(o("uploadImg","upload-image"),o("uploadFile","upload-file"),r==="date"&&s.range&&(s.type="daterange",delete s.range),(r==="date"||r==="time")&&(s.valueFormat=s.format),r==="textarea"){const{minRows:d,maxRows:g}=s;s.autoSize={minRows:d,maxRows:g},delete s.minRows,delete s.maxRows}r==="number"&&!s.precision&&delete s.precision,s.width&&(s.style={width:s.width},delete s.width),r==="grid"&&(r="row"),e&&e.type==="grid"&&(r="col",s.span=n.span,n.key=Z());const i={label:n.label,type:r,icon:n.icon||"",field:n.model,componentProps:s,id:n.key};return(s.noFormItem||!s.showLabel)&&(i.noFormItem=!0,delete s.noFormItem,delete s.showLabel),s.clearable&&(s.allowClear=!0,delete s.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(r)&&(i.input=!0,((l=(f=n.rules)==null?void 0:f[0])==null?void 0:l.required)===!1&&n.rules.shift(),((u=n.rules)==null?void 0:u.length)>0&&(i.rules=n.rules)),n.list&&(i.children=k(n.list,n)),n.columns&&(i.children=k(n.columns,n)),n.trs&&(i.children=k(n.trs,n)),n.tds&&(i.children=k(n.tds,n)),i})}function Ot(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(s){s(n)}),(r=t.get("*"))&&r.slice().map(function(s){s(e,n)})}}}const Me=Ot();class qe{constructor(){T(this,"initialized",q.ref(!1));T(this,"sourceData",[]);T(this,"components",{});T(this,"componentConfigs",{});T(this,"baseComponentTypes",[]);T(this,"componentSchemaGroups",q.ref([]));T(this,"hiddenComponents",[]);T(this,"formSchemas",[{label:"表单",type:"form",componentProps:{layout:"horizontal",name:"default",labelWidth:100,labelLayout:"fixed",labelCol:{span:5},wrapperCol:{span:19},colon:!0,labelAlign:"right",labelPlacement:"left"},children:[],id:"root"}]);T(this,"componentGroupNameMap",{});T(this,"sortedGroups",["表单","布局"]);T(this,"viewsContainers",{activitybars:q.shallowRef([]),rightSidebars:q.shallowRef([])});T(this,"publicMethods",{})}component(e,n){typeof n=="function"&&(n=J(n)),this.components[e]=n}registerComponent(e){this.component(e.defaultSchema.type,e.component),e.defaultSchema.input&&(e.config.action||(e.config.action=[]),e.config.action.unshift({type:"setValue",describe:"设置值",argsConfigs:[{...e.defaultSchema,label:"设置数据",field:"0"}]},{type:"getValue",describe:"获取值"})),this.componentConfigs[e.defaultSchema.type]=e,this.computedComponentSchemaGroups()}removeComponent(e){delete this.componentConfigs[e],delete this.components[e]}setSourceData(e){this.sourceData=e,Me.emit("updateSource",new Date)}getSourceData(){return Object.prototype.toString.call(this.sourceData)==="[object Array]"?this.sourceData:[]}setBaseComponentTypes(e){this.baseComponentTypes=e}addBaseComponentTypes(e){this.baseComponentTypes.push(e)}removeBaseComponents(){this.baseComponentTypes.forEach(e=>{this.removeComponent(e)}),this.setBaseComponentTypes([]),this.computedComponentSchemaGroups()}getComponents(){return this.components}getComponent(e){return this.components[e]}registerActivitybar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.activitybars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.activitybars.value[n]=e:this.viewsContainers.activitybars.value.push(e)}getActivitybars(){return this.viewsContainers.activitybars.value}hideActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!1)}showActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!0)}registerRightSidebar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.rightSidebars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.rightSidebars.value[n]=e:this.viewsContainers.rightSidebars.value.push(e)}getRightSidebars(){return this.viewsContainers.rightSidebars.value}hideRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!1)}showRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!0)}getComponentConfings(){return this.componentConfigs}getComponentConfingByType(e){return this.componentConfigs[e]}computedComponentSchemaGroups(){const e=[];Object.values(this.componentConfigs).forEach(n=>{if(!this.hiddenComponents.includes(n.defaultSchema.type)&&n.groupName){const r=this.componentGroupNameMap[n.groupName]??n.groupName;let s=e.findIndex(i=>i.title===r);s===-1&&(e.push({title:r,list:[]}),s=e.length-1);let o=e[s].list.findIndex(i=>i.type===n.defaultSchema.type);o!==-1?e[s].list[o]=n.defaultSchema:e[s].list.push(n.defaultSchema)}}),e.sort((n,r)=>{const s=this.sortedGroups.indexOf(n.title),o=this.sortedGroups.indexOf(r.title);return s===-1?1:o===-1?-1:s-o}),e.forEach(n=>{n.list.sort((r,s)=>{var c,f;const o=((c=this.componentConfigs[r.type])==null?void 0:c.sort)??1e3,i=((f=this.componentConfigs[s.type])==null?void 0:f.sort)??1e3;return o-i})}),this.componentSchemaGroups.value=e}getComponentSchemaGroups(){return this.componentSchemaGroups}setComponentGroupNameMap(e,n){this.componentGroupNameMap[e]=n}clearComponentGroupNameMap(){this.componentGroupNameMap={}}setSortedGroups(e){this.sortedGroups=e,this.computedComponentSchemaGroups()}clearSortedGroups(){this.sortedGroups=[],this.computedComponentSchemaGroups()}hideComponent(e){this.hiddenComponents.push(e),this.computedComponentSchemaGroups()}showComponent(e){this.hiddenComponents=this.hiddenComponents.filter(n=>n!==e),this.computedComponentSchemaGroups()}setHideComponents(e){this.hiddenComponents=e,this.computedComponentSchemaGroups()}setInitialized(e){this.initialized.value=e}addPublicMethod(e){const n=e.methodName??e.name,r=e.method??e.handler;this.publicMethods[n]={...e,name:n,handler:r}}removePublicMethod(e){delete this.publicMethods[e]}}const He=new qe;function ze(t,e){return function(){return t.apply(e,arguments)}}const{toString:Tt}=Object.prototype,{getPrototypeOf:ye}=Object,Y=(t=>e=>{const n=Tt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=t=>(t=t.toLowerCase(),e=>Y(e)===t),ee=t=>e=>typeof e===t,{isArray:U}=Array,z=ee("undefined");function xt(t){return t!==null&&!z(t)&&t.constructor!==null&&!z(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const je=P("ArrayBuffer");function Pt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&je(t.buffer),e}const Nt=ee("string"),x=ee("function"),Ge=ee("number"),te=t=>t!==null&&typeof t=="object",Bt=t=>t===!0||t===!1,W=t=>{if(Y(t)!=="object")return!1;const e=ye(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ft=P("Date"),Lt=P("File"),_t=P("Blob"),Dt=P("FileList"),vt=t=>te(t)&&x(t.pipe),kt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||x(t.append)&&((e=Y(t))==="formdata"||e==="object"&&x(t.toString)&&t.toString()==="[object FormData]"))},Ut=P("URLSearchParams"),[It,Mt,qt,Ht]=["ReadableStream","Request","Response","Headers"].map(P),zt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function j(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),U(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let c;for(r=0;r<i;r++)c=o[r],e.call(null,t[c],c,t)}}function Ve(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const _=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Je=t=>!z(t)&&t!==_;function ce(){const{caseless:t}=Je(this)&&this||{},e={},n=(r,s)=>{const o=t&&Ve(e,s)||s;W(e[o])&&W(r)?e[o]=ce(e[o],r):W(r)?e[o]=ce({},r):U(r)?e[o]=r.slice():e[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&j(arguments[r],n);return e}const jt=(t,e,n,{allOwnKeys:r}={})=>(j(e,(s,o)=>{n&&x(s)?t[o]=ze(s,n):t[o]=s},{allOwnKeys:r}),t),Gt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vt=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Jt=(t,e,n,r)=>{let s,o,i;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=n!==!1&&ye(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},$t=t=>{if(!t)return null;if(U(t))return t;let e=t.length;if(!Ge(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Kt=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ye(Uint8Array)),Xt=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Qt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Zt=P("HTMLFormElement"),Yt=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ce=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),en=P("RegExp"),We=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};j(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},tn=t=>{We(t,(e,n)=>{if(x(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(x(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nn=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return U(t)?r(t):r(String(t).split(e)),n},rn=()=>{},sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,se="abcdefghijklmnopqrstuvwxyz",Ae="0123456789",$e={DIGIT:Ae,ALPHA:se,ALPHA_DIGIT:se+se.toUpperCase()+Ae},on=(t=16,e=$e.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function an(t){return!!(t&&x(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const cn=t=>{const e=new Array(10),n=(r,s)=>{if(te(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const o=U(r)?[]:{};return j(r,(i,c)=>{const f=n(i,s+1);!z(f)&&(o[c]=f)}),e[s]=void 0,o}}return r};return n(t,0)},ln=P("AsyncFunction"),un=t=>t&&(te(t)||x(t))&&x(t.then)&&x(t.catch),Ke=((t,e)=>t?setImmediate:e?((n,r)=>(_.addEventListener("message",({source:s,data:o})=>{s===_&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),_.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(_.postMessage)),fn=typeof queueMicrotask<"u"?queueMicrotask.bind(_):typeof process<"u"&&process.nextTick||Ke,a={isArray:U,isArrayBuffer:je,isBuffer:xt,isFormData:kt,isArrayBufferView:Pt,isString:Nt,isNumber:Ge,isBoolean:Bt,isObject:te,isPlainObject:W,isReadableStream:It,isRequest:Mt,isResponse:qt,isHeaders:Ht,isUndefined:z,isDate:Ft,isFile:Lt,isBlob:_t,isRegExp:en,isFunction:x,isStream:vt,isURLSearchParams:Ut,isTypedArray:Kt,isFileList:Dt,forEach:j,merge:ce,extend:jt,trim:zt,stripBOM:Gt,inherits:Vt,toFlatObject:Jt,kindOf:Y,kindOfTest:P,endsWith:Wt,toArray:$t,forEachEntry:Xt,matchAll:Qt,isHTMLForm:Zt,hasOwnProperty:Ce,hasOwnProp:Ce,reduceDescriptors:We,freezeMethods:tn,toObjectSet:nn,toCamelCase:Yt,noop:rn,toFiniteNumber:sn,findKey:Ve,global:_,isContextDefined:Je,ALPHABET:$e,generateString:on,isSpecCompliantForm:an,toJSONObject:cn,isAsyncFn:ln,isThenable:un,setImmediate:Ke,asap:fn};function m(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Xe=m.prototype,Qe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Qe[t]={value:t}});Object.defineProperties(m,Qe);Object.defineProperty(Xe,"isAxiosError",{value:!0});m.from=(t,e,n,r,s,o)=>{const i=Object.create(Xe);return a.toFlatObject(t,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,t.message,e,n,r,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const dn=null;function le(t){return a.isPlainObject(t)||a.isArray(t)}function Ze(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function Oe(t,e,n){return t?t.concat(e).map(function(s,o){return s=Ze(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function pn(t){return a.isArray(t)&&!t.some(le)}const hn=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!a.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&pn(p)||(a.isFileList(p)||a.endsWith(y,"[]"))&&(w=a.toArray(p)))return y=Ze(y),w.forEach(function(R,N){!(a.isUndefined(R)||R===null)&&e.append(i===!0?Oe([y],N,o):i===null?y:y+"[]",l(R))}),!1}return le(p)?!0:(e.append(Oe(h,y,o),l(p)),!1)}const d=[],g=Object.assign(hn,{defaultVisitor:u,convertValue:l,isVisitable:le});function S(p,y){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),a.forEach(p,function(w,E){(!(a.isUndefined(w)||w===null)&&s.call(e,w,a.isString(E)?E.trim():E,y,g))===!0&&S(w,y?y.concat(E):[E])}),d.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return S(t),e}function Te(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ge(t,e){this._pairs=[],t&&ne(t,this,e)}const Ye=ge.prototype;Ye.append=function(e,n){this._pairs.push([e,n])};Ye.toString=function(e){const n=e?function(r){return e.call(this,r,Te)}:Te;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function et(t,e,n){if(!e)return t;const r=n&&n.encode||mn,s=n&&n.serialize;let o;if(s?o=s(e,n):o=a.isURLSearchParams(e)?e.toString():new ge(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class xe{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn=typeof URLSearchParams<"u"?URLSearchParams:ge,gn=typeof FormData<"u"?FormData:null,wn=typeof Blob<"u"?Blob:null,bn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:gn,Blob:wn},protocols:["http","https","file","blob","url","data"]},we=typeof window<"u"&&typeof document<"u",ue=typeof navigator=="object"&&navigator||void 0,Sn=we&&(!ue||["ReactNative","NativeScript","NS"].indexOf(ue.product)<0),En=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rn=we&&window.location.href||"http://localhost",Cn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:we,hasStandardBrowserEnv:Sn,hasStandardBrowserWebWorkerEnv:En,navigator:ue,origin:Rn},Symbol.toStringTag,{value:"Module"})),A={...Cn,...bn};function An(t,e){return ne(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return A.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function On(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Tn(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function nt(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Tn(s[i])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,s)=>{e(On(r),s,n,0)}),n}return null}function xn(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const G={transitional:tt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(e);if(o&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(nt(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return An(e,this.formSerializer).toString();if((c=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ne(c?{"files[]":e}:e,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),xn(e)):e}],transformResponse:[function(e){const n=this.transitional||G.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{G.headers[t]={}});const Pn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nn=t=>{const e={};let n,r,s;return t&&t.split(`
1
+ "use strict";var dt=Object.defineProperty;var pt=(t,e,n)=>e in t?dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>pt(t,typeof e!="symbol"?e+"":e,n);const q=require("vue"),ht=require("./index-Cq6eLpKZ.cjs"),J=(t,e)=>q.defineAsyncComponent({loader:t,loadingComponent:e,delay:80});function Z(t=10){const e="abcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let r=0;r<t;r++){const s=Math.floor(Math.random()*e.length);n+=e[s]}return n}function mt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const{t:Re}=ht.useLocale();function K(t,e=new WeakMap){if(typeof t!="object"||t===null)return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const r=t.map(s=>K(s,e));return e.set(t,r),r}const n={};return e.set(t,n),Object.keys(t).forEach(r=>{n[r]=K(t[r],e)}),n}function yt(t){const[e]=Ie([K(t)],n=>{var s,o;const r={...n,id:`${n.type}_${Z(8)}`};return(r.field||r.input)&&!((o=(s=He.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&o.fixedField)&&(r.field=r.id),r});return e}function me(t,e,n=!0){for(const[r,s]of Object.entries(e)){let o=t==null?void 0:t[r];o&&s&&typeof o=="object"&&typeof s=="object"?(Array.isArray(o)&&!Array.isArray(s)?o=t[r]={}:!Array.isArray(o)&&Array.isArray(s)&&(o=t[r]=[]),me(o,s,n)):t[r]=s}n&&Object.keys(t).reverse().forEach(r=>{e.hasOwnProperty(r)||(Array.isArray(t)?t.splice(Number(r),1):delete t[r])})}function gt(t,e,n=[],r=new WeakMap){const s=o=>{if(Array.isArray(o))return o.map(s);if(typeof o=="object"&&o!==null){if(r.has(o))return"[Circular]";r.set(o,!0);const i=Object.keys(o).sort(),c={};return i.forEach(f=>{n.includes(f)||(c[f]=s(o[f]))}),r.delete(o),c}else return o};return JSON.stringify(s(t))===JSON.stringify(s(e))}function wt(t,e){const n=[];let r=!1;function s(o){if(n.push(o),o.id===e&&(r=!0),!r&&o.children!=null&&o.children.length>0)for(let i=0;i<o.children.length&&(s(o.children[i]),!r);i++);if(!r&&o.slots)for(let i in o.slots)for(let c=0;c<o.slots[i].length&&(s(o.slots[i][c]),!r);c++);r||n.pop()}return t.forEach(s),r||console.error(`没有查询到id为${e}的节点`),n}function bt(t,e,n){const r=e.split(".");let s=t;for(let o=0;o<r.length;o++){if(s==null)return n;s=s[r[o]]}return s===void 0?n:s}function St(t,e,n){const r=e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let s=t;for(let o=0;o<r.length-1;o++){const i=r[o];s[i]==null&&(s[i]=isNaN(Number(r[o+1]))?{}:[]),s=s[i]}return s[r[r.length-1]]=n,t}function Et(t,e="default"){return Ue(t,e).map(r=>r.field)}function Ue(t,e="default"){const n=H(t,s=>{var o;return s.type==="form"&&(((o=s.componentProps)==null?void 0:o.name)??s.name===e)},!0);return H((n==null?void 0:n.children)??[],s=>!!s.input,!1,s=>s.type!=="subform")}function H(t,e,n=!1,r){const s=[],o=[...t];for(;o.length;){const i=o.pop();if(i!=null&&i.children&&(!r||r(i))&&o.push(...i.children),i!=null&&i.slots&&(!r||r(i)))for(let c in i.slots)o.push(...i.slots[c]);if(e(i)&&(s.push(i),n))return i}return n?!1:s}function Ie(t,e,n){const r=[...t];for(;r.length;){const s=r.pop();if(s!=null&&s.children&&(!n||n(s))&&r.push(...s.children),s!=null&&s.slots&&(!n||n(s)))for(let o in s.slots)r.push(...s.slots[o]);me(s,e(s))}return t}function Rt(t,e){const n=H(t,r=>r.id===e,!0);if(!n)throw new Error(`没有查询到id为${e}的节点`);return n}function Ct(t,e){const n=[{type:"",children:t}];let r=0,s=null;if(H(n,o=>{if(s=o.children??null,!s){if(o!=null&&o.slots)for(let i in o.slots){s=o.slots[i];for(let c=0;c<s.length;c++)if(s[c].id===e)return r=c,!0}return!1}for(let i=0;i<s.length;i++)if(s[i].id===e)return r=i,!0;return!1},!0),!s)throw new Error(`没有查询到id为${e}的节点`);return{list:s,schema:s[r],index:r}}function At(t){const e={schemas:[{type:"page",id:"root",label:Re("page"),children:[{label:Re("form"),type:"form",icon:"epic-icon-daibanshixiang",labelWidth:t.config.labelWidth||100,name:"default",componentProps:{layout:t.config.layout||"horizontal",labelWidth:t.config.labelWidth||100,labelLayout:t.config.labelLayout==="flex"?"fixed":"flex",labelCol:t.config.labelCol||{span:5},wrapperCol:t.config.wrapperCol||{span:19},hideRequiredMark:t.config.hideRequiredMark||!1,colon:t.config.colon||!0,labelAlign:t.config.labelAlign||"right",size:t.config.size||"middle"},children:[],id:"form_"+Z()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return e.schemas[0].children[0].children=k(t.list),e}function k(t,e){return t.map(n=>{var f,l,u;let r=n.type??"";const s=n.options??{},o=(d,g)=>{r===d&&(r=g,s.defaultValue&&(s.defaultValue=JSON.parse(s.defaultValue)))};if(o("uploadImg","upload-image"),o("uploadFile","upload-file"),r==="date"&&s.range&&(s.type="daterange",delete s.range),(r==="date"||r==="time")&&(s.valueFormat=s.format),r==="textarea"){const{minRows:d,maxRows:g}=s;s.autoSize={minRows:d,maxRows:g},delete s.minRows,delete s.maxRows}r==="number"&&!s.precision&&delete s.precision,s.width&&(s.style={width:s.width},delete s.width),r==="grid"&&(r="row"),e&&e.type==="grid"&&(r="col",s.span=n.span,n.key=Z());const i={label:n.label,type:r,icon:n.icon||"",field:n.model,componentProps:s,id:n.key};return(s.noFormItem||!s.showLabel)&&(i.noFormItem=!0,delete s.noFormItem,delete s.showLabel),s.clearable&&(s.allowClear=!0,delete s.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(r)&&(i.input=!0,((l=(f=n.rules)==null?void 0:f[0])==null?void 0:l.required)===!1&&n.rules.shift(),((u=n.rules)==null?void 0:u.length)>0&&(i.rules=n.rules)),n.list&&(i.children=k(n.list,n)),n.columns&&(i.children=k(n.columns,n)),n.trs&&(i.children=k(n.trs,n)),n.tds&&(i.children=k(n.tds,n)),i})}function Ot(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(s){s(n)}),(r=t.get("*"))&&r.slice().map(function(s){s(e,n)})}}}const Me=Ot();class qe{constructor(){T(this,"initialized",q.ref(!1));T(this,"sourceData",[]);T(this,"components",{});T(this,"componentConfigs",{});T(this,"baseComponentTypes",[]);T(this,"componentSchemaGroups",q.ref([]));T(this,"hiddenComponents",[]);T(this,"formSchemas",[{label:"表单",type:"form",componentProps:{layout:"horizontal",name:"default",labelWidth:100,labelLayout:"fixed",labelCol:{span:5},wrapperCol:{span:19},colon:!0,labelAlign:"right",labelPlacement:"left"},children:[],id:"root"}]);T(this,"componentGroupNameMap",{});T(this,"sortedGroups",["表单","布局"]);T(this,"viewsContainers",{activitybars:q.shallowRef([]),rightSidebars:q.shallowRef([])});T(this,"publicMethods",{})}component(e,n){typeof n=="function"&&(n=J(n)),this.components[e]=n}registerComponent(e){this.component(e.defaultSchema.type,e.component),e.defaultSchema.input&&(e.config.action||(e.config.action=[]),e.config.action.unshift({type:"setValue",describe:"设置值",argsConfigs:[{...e.defaultSchema,label:"设置数据",field:"0"}]},{type:"getValue",describe:"获取值"})),this.componentConfigs[e.defaultSchema.type]=e,this.computedComponentSchemaGroups()}removeComponent(e){delete this.componentConfigs[e],delete this.components[e]}setSourceData(e){this.sourceData=e,Me.emit("updateSource",new Date)}getSourceData(){return Object.prototype.toString.call(this.sourceData)==="[object Array]"?this.sourceData:[]}setBaseComponentTypes(e){this.baseComponentTypes=e}addBaseComponentTypes(e){this.baseComponentTypes.push(e)}removeBaseComponents(){this.baseComponentTypes.forEach(e=>{this.removeComponent(e)}),this.setBaseComponentTypes([]),this.computedComponentSchemaGroups()}getComponents(){return this.components}getComponent(e){return this.components[e]}registerActivitybar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.activitybars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.activitybars.value[n]=e:this.viewsContainers.activitybars.value.push(e)}getActivitybars(){return this.viewsContainers.activitybars.value}hideActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!1)}showActivitybar(e,n="title"){const r=this.viewsContainers.activitybars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.activitybars.value[r].visible=!0)}registerRightSidebar(e){typeof e.component=="function"&&(e.component=J(e.component)),typeof e.visible>"u"&&(e.visible=!0);const n=this.viewsContainers.rightSidebars.value.findIndex(r=>r.id===e.id);n!==-1?this.viewsContainers.rightSidebars.value[n]=e:this.viewsContainers.rightSidebars.value.push(e)}getRightSidebars(){return this.viewsContainers.rightSidebars.value}hideRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!1)}showRightSidebar(e,n="title"){const r=this.viewsContainers.rightSidebars.value.findIndex(s=>s[n]===e);r!==-1&&(this.viewsContainers.rightSidebars.value[r].visible=!0)}getComponentConfings(){return this.componentConfigs}getComponentConfingByType(e){return this.componentConfigs[e]}computedComponentSchemaGroups(){const e=[];Object.values(this.componentConfigs).forEach(n=>{if(!this.hiddenComponents.includes(n.defaultSchema.type)&&n.groupName){const r=this.componentGroupNameMap[n.groupName]??n.groupName;let s=e.findIndex(i=>i.title===r);s===-1&&(e.push({title:r,list:[]}),s=e.length-1);let o=e[s].list.findIndex(i=>i.type===n.defaultSchema.type);o!==-1?e[s].list[o]=n.defaultSchema:e[s].list.push(n.defaultSchema)}}),e.sort((n,r)=>{const s=this.sortedGroups.indexOf(n.title),o=this.sortedGroups.indexOf(r.title);return s===-1?1:o===-1?-1:s-o}),e.forEach(n=>{n.list.sort((r,s)=>{var c,f;const o=((c=this.componentConfigs[r.type])==null?void 0:c.sort)??1e3,i=((f=this.componentConfigs[s.type])==null?void 0:f.sort)??1e3;return o-i})}),this.componentSchemaGroups.value=e}getComponentSchemaGroups(){return this.componentSchemaGroups}setComponentGroupNameMap(e,n){this.componentGroupNameMap[e]=n}clearComponentGroupNameMap(){this.componentGroupNameMap={}}setSortedGroups(e){this.sortedGroups=e,this.computedComponentSchemaGroups()}clearSortedGroups(){this.sortedGroups=[],this.computedComponentSchemaGroups()}hideComponent(e){this.hiddenComponents.push(e),this.computedComponentSchemaGroups()}showComponent(e){this.hiddenComponents=this.hiddenComponents.filter(n=>n!==e),this.computedComponentSchemaGroups()}setHideComponents(e){this.hiddenComponents=e,this.computedComponentSchemaGroups()}setInitialized(e){this.initialized.value=e}addPublicMethod(e){const n=e.methodName??e.name,r=e.method??e.handler;this.publicMethods[n]={...e,name:n,handler:r}}removePublicMethod(e){delete this.publicMethods[e]}}const He=new qe;function ze(t,e){return function(){return t.apply(e,arguments)}}const{toString:Tt}=Object.prototype,{getPrototypeOf:ye}=Object,Y=(t=>e=>{const n=Tt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=t=>(t=t.toLowerCase(),e=>Y(e)===t),ee=t=>e=>typeof e===t,{isArray:U}=Array,z=ee("undefined");function xt(t){return t!==null&&!z(t)&&t.constructor!==null&&!z(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const je=P("ArrayBuffer");function Pt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&je(t.buffer),e}const Nt=ee("string"),x=ee("function"),Ge=ee("number"),te=t=>t!==null&&typeof t=="object",Bt=t=>t===!0||t===!1,W=t=>{if(Y(t)!=="object")return!1;const e=ye(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ft=P("Date"),Lt=P("File"),_t=P("Blob"),Dt=P("FileList"),vt=t=>te(t)&&x(t.pipe),kt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||x(t.append)&&((e=Y(t))==="formdata"||e==="object"&&x(t.toString)&&t.toString()==="[object FormData]"))},Ut=P("URLSearchParams"),[It,Mt,qt,Ht]=["ReadableStream","Request","Response","Headers"].map(P),zt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function j(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),U(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let c;for(r=0;r<i;r++)c=o[r],e.call(null,t[c],c,t)}}function Ve(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const _=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Je=t=>!z(t)&&t!==_;function ce(){const{caseless:t}=Je(this)&&this||{},e={},n=(r,s)=>{const o=t&&Ve(e,s)||s;W(e[o])&&W(r)?e[o]=ce(e[o],r):W(r)?e[o]=ce({},r):U(r)?e[o]=r.slice():e[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&j(arguments[r],n);return e}const jt=(t,e,n,{allOwnKeys:r}={})=>(j(e,(s,o)=>{n&&x(s)?t[o]=ze(s,n):t[o]=s},{allOwnKeys:r}),t),Gt=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vt=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Jt=(t,e,n,r)=>{let s,o,i;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!c[i]&&(e[i]=t[i],c[i]=!0);t=n!==!1&&ye(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},$t=t=>{if(!t)return null;if(U(t))return t;let e=t.length;if(!Ge(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Kt=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ye(Uint8Array)),Xt=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Qt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Zt=P("HTMLFormElement"),Yt=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ce=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),en=P("RegExp"),We=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};j(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},tn=t=>{We(t,(e,n)=>{if(x(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(x(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nn=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return U(t)?r(t):r(String(t).split(e)),n},rn=()=>{},sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,se="abcdefghijklmnopqrstuvwxyz",Ae="0123456789",$e={DIGIT:Ae,ALPHA:se,ALPHA_DIGIT:se+se.toUpperCase()+Ae},on=(t=16,e=$e.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function an(t){return!!(t&&x(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const cn=t=>{const e=new Array(10),n=(r,s)=>{if(te(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const o=U(r)?[]:{};return j(r,(i,c)=>{const f=n(i,s+1);!z(f)&&(o[c]=f)}),e[s]=void 0,o}}return r};return n(t,0)},ln=P("AsyncFunction"),un=t=>t&&(te(t)||x(t))&&x(t.then)&&x(t.catch),Ke=((t,e)=>t?setImmediate:e?((n,r)=>(_.addEventListener("message",({source:s,data:o})=>{s===_&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),_.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(_.postMessage)),fn=typeof queueMicrotask<"u"?queueMicrotask.bind(_):typeof process<"u"&&process.nextTick||Ke,a={isArray:U,isArrayBuffer:je,isBuffer:xt,isFormData:kt,isArrayBufferView:Pt,isString:Nt,isNumber:Ge,isBoolean:Bt,isObject:te,isPlainObject:W,isReadableStream:It,isRequest:Mt,isResponse:qt,isHeaders:Ht,isUndefined:z,isDate:Ft,isFile:Lt,isBlob:_t,isRegExp:en,isFunction:x,isStream:vt,isURLSearchParams:Ut,isTypedArray:Kt,isFileList:Dt,forEach:j,merge:ce,extend:jt,trim:zt,stripBOM:Gt,inherits:Vt,toFlatObject:Jt,kindOf:Y,kindOfTest:P,endsWith:Wt,toArray:$t,forEachEntry:Xt,matchAll:Qt,isHTMLForm:Zt,hasOwnProperty:Ce,hasOwnProp:Ce,reduceDescriptors:We,freezeMethods:tn,toObjectSet:nn,toCamelCase:Yt,noop:rn,toFiniteNumber:sn,findKey:Ve,global:_,isContextDefined:Je,ALPHABET:$e,generateString:on,isSpecCompliantForm:an,toJSONObject:cn,isAsyncFn:ln,isThenable:un,setImmediate:Ke,asap:fn};function m(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Xe=m.prototype,Qe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Qe[t]={value:t}});Object.defineProperties(m,Qe);Object.defineProperty(Xe,"isAxiosError",{value:!0});m.from=(t,e,n,r,s,o)=>{const i=Object.create(Xe);return a.toFlatObject(t,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,t.message,e,n,r,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const dn=null;function le(t){return a.isPlainObject(t)||a.isArray(t)}function Ze(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function Oe(t,e,n){return t?t.concat(e).map(function(s,o){return s=Ze(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function pn(t){return a.isArray(t)&&!t.some(le)}const hn=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!a.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&pn(p)||(a.isFileList(p)||a.endsWith(y,"[]"))&&(w=a.toArray(p)))return y=Ze(y),w.forEach(function(R,N){!(a.isUndefined(R)||R===null)&&e.append(i===!0?Oe([y],N,o):i===null?y:y+"[]",l(R))}),!1}return le(p)?!0:(e.append(Oe(h,y,o),l(p)),!1)}const d=[],g=Object.assign(hn,{defaultVisitor:u,convertValue:l,isVisitable:le});function S(p,y){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),a.forEach(p,function(w,E){(!(a.isUndefined(w)||w===null)&&s.call(e,w,a.isString(E)?E.trim():E,y,g))===!0&&S(w,y?y.concat(E):[E])}),d.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return S(t),e}function Te(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ge(t,e){this._pairs=[],t&&ne(t,this,e)}const Ye=ge.prototype;Ye.append=function(e,n){this._pairs.push([e,n])};Ye.toString=function(e){const n=e?function(r){return e.call(this,r,Te)}:Te;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function et(t,e,n){if(!e)return t;const r=n&&n.encode||mn,s=n&&n.serialize;let o;if(s?o=s(e,n):o=a.isURLSearchParams(e)?e.toString():new ge(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class xe{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(r){r!==null&&e(r)})}}const tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn=typeof URLSearchParams<"u"?URLSearchParams:ge,gn=typeof FormData<"u"?FormData:null,wn=typeof Blob<"u"?Blob:null,bn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:gn,Blob:wn},protocols:["http","https","file","blob","url","data"]},we=typeof window<"u"&&typeof document<"u",ue=typeof navigator=="object"&&navigator||void 0,Sn=we&&(!ue||["ReactNative","NativeScript","NS"].indexOf(ue.product)<0),En=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rn=we&&window.location.href||"http://localhost",Cn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:we,hasStandardBrowserEnv:Sn,hasStandardBrowserWebWorkerEnv:En,navigator:ue,origin:Rn},Symbol.toStringTag,{value:"Module"})),A={...Cn,...bn};function An(t,e){return ne(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return A.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function On(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Tn(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function nt(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Tn(s[i])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,s)=>{e(On(r),s,n,0)}),n}return null}function xn(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const G={transitional:tt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(e);if(o&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(nt(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return An(e,this.formSerializer).toString();if((c=a.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ne(c?{"files[]":e}:e,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),xn(e)):e}],transformResponse:[function(e){const n=this.transitional||G.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{G.headers[t]={}});const Pn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nn=t=>{const e={};let n,r,s;return t&&t.split(`
2
2
  `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&Pn[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Pe=Symbol("internals");function M(t){return t&&String(t).trim().toLowerCase()}function $(t){return t===!1||t==null?t:a.isArray(t)?t.map($):String(t)}function Bn(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Fn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function oe(t,e,n,r,s){if(a.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function Ln(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function _n(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,o,i){return this[r].call(this,e,s,o,i)},configurable:!0})})}class O{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(c,f,l){const u=M(f);if(!u)throw new Error("header name must be a non-empty string");const d=a.findKey(s,u);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||f]=$(c))}const i=(c,f)=>a.forEach(c,(l,u)=>o(l,u,f));if(a.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(a.isString(e)&&(e=e.trim())&&!Fn(e))i(Nn(e),n);else if(a.isHeaders(e))for(const[c,f]of e.entries())o(f,c,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=M(e),e){const r=a.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return Bn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=M(e),e){const r=a.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||oe(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(i){if(i=M(i),i){const c=a.findKey(r,i);c&&(!n||oe(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(e)?e.forEach(o):o(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!e||oe(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=$(s),delete n[o];return}const c=e?Ln(o):String(o).trim();c!==o&&delete n[o],n[c]=$(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
3
3
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Pe]=this[Pe]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=M(i);r[c]||(_n(s,i),r[c]=!0)}return a.isArray(e)?e.forEach(o):o(e),this}}O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(O.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});a.freezeMethods(O);function ie(t,e){const n=this||G,r=e||n,s=O.from(r.headers);let o=r.data;return a.forEach(t,function(c){o=c.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function rt(t){return!!(t&&t.__CANCEL__)}function I(t,e,n){m.call(this,t??"canceled",m.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(I,m,{__CANCEL__:!0});function st(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Dn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function vn(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),u=r[o];i||(i=l),n[s]=f,r[s]=l;let d=o,g=0;for(;d!==s;)g+=n[d++],d=d%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-i<e)return;const S=u&&l-u;return S?Math.round(g*1e3/S):void 0}}function kn(t,e){let n=0,r=1e3/e,s,o;const i=(l,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const X=(t,e,n=3)=>{let r=0;const s=vn(50,250);return kn(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=i-r,l=s(f),u=i<=c;r=i;const d={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&u?(c-i)/l:void 0,event:o,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(d)},n)},Ne=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Be=t=>(...e)=>a.asap(()=>t(...e)),Un=A.hasStandardBrowserEnv?function(){const e=A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),In=A.hasStandardBrowserEnv?{write(t,e,n,r,s,o){const i=[t+"="+encodeURIComponent(e)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Mn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function qn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ot(t,e){return t&&!Mn(e)?qn(t,e):e}const Fe=t=>t instanceof O?{...t}:t;function v(t,e){e=e||{};const n={};function r(l,u,d){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:d},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,d){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,d)}else return r(l,u,d)}function o(l,u){if(!a.isUndefined(u))return r(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,d){if(d in e)return r(l,u);if(d in t)return r(void 0,l)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(l,u)=>s(Fe(l),Fe(u),!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=f[u]||s,g=d(t[u],e[u],u);a.isUndefined(g)&&d!==c||(n[u]=g)}),n}const it=t=>{const e=v({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=e;e.headers=i=O.from(i),e.url=et(ot(e.baseURL,e.url),t.params,t.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(a.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[l,...u]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(e)),r||r!==!1&&Un(e.url))){const l=s&&o&&In.read(o);l&&i.set(s,l)}return e},Hn=typeof XMLHttpRequest<"u",zn=Hn&&function(t){return new Promise(function(n,r){const s=it(t);let o=s.data;const i=O.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,u,d,g,S,p;function y(){S&&S(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function w(){if(!h)return;const R=O.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),C={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:R,config:t,request:h};st(function(L){n(L),y()},function(L){r(L),y()},C),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new m("Request aborted",m.ECONNABORTED,t,h)),h=null)},h.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||tt;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),r(new m(N,C.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&a.forEach(i.toJSON(),function(N,C){h.setRequestHeader(C,N)}),a.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),l&&([g,p]=X(l,!0),h.addEventListener("progress",g)),f&&h.upload&&([d,S]=X(f),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(u=R=>{h&&(r(!R||R.type?new I(null,t,h):R),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const E=Dn(s.url);if(E&&A.protocols.indexOf(E)===-1){r(new m("Unsupported protocol "+E+":",m.ERR_BAD_REQUEST,t));return}h.send(o||null)})},jn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof m?u:new I(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new m(`timeout ${e} of ms exceeded`,m.ETIMEDOUT))},e);const c=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},Gn=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},Vn=async function*(t,e){for await(const n of Jn(t))yield*Gn(n,e)},Jn=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Le=(t,e,n,r)=>{const s=Vn(t,e);let o=0,i,c=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){c(),f.close();return}let d=u.byteLength;if(n){let g=o+=d;n(g)}f.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",at=re&&typeof ReadableStream=="function",Wn=re&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ct=(t,...e)=>{try{return!!t(...e)}catch{return!1}},$n=at&&ct(()=>{let t=!1;const e=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),_e=64*1024,fe=at&&ct(()=>a.isReadableStream(new Response("").body)),Q={stream:fe&&(t=>t.body)};re&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Q[e]&&(Q[e]=a.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new m(`Response type '${e}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const Kn=async t=>{if(t==null)return 0;if(a.isBlob(t))return t.size;if(a.isSpecCompliantForm(t))return(await new Request(A.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(a.isArrayBufferView(t)||a.isArrayBuffer(t))return t.byteLength;if(a.isURLSearchParams(t)&&(t=t+""),a.isString(t))return(await Wn(t)).byteLength},Xn=async(t,e)=>{const n=a.toFiniteNumber(t.getContentLength());return n??Kn(e)},Qn=re&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:g}=it(t);l=l?(l+"").toLowerCase():"text";let S=jn([s,o&&o.toAbortSignal()],i),p;const y=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let h;try{if(f&&$n&&n!=="get"&&n!=="head"&&(h=await Xn(u,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),B;if(a.isFormData(r)&&(B=C.headers.get("content-type"))&&u.setContentType(B),C.body){const[L,V]=Ne(h,X(Be(f)));r=Le(C.body,_e,L,V)}}a.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;p=new Request(e,{...g,signal:S,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let E=await fetch(p);const R=fe&&(l==="stream"||l==="response");if(fe&&(c||R&&y)){const C={};["status","statusText","headers"].forEach(Ee=>{C[Ee]=E[Ee]});const B=a.toFiniteNumber(E.headers.get("content-length")),[L,V]=c&&Ne(B,X(Be(c),!0))||[];E=new Response(Le(E.body,_e,L,()=>{V&&V(),y&&y()}),C)}l=l||"text";let N=await Q[a.findKey(Q,l)||"text"](E,t);return!R&&y&&y(),await new Promise((C,B)=>{st(C,B,{data:N,headers:O.from(E.headers),status:E.status,statusText:E.statusText,config:t,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,t,p),{cause:w.cause||w}):m.from(w,w&&w.code,t,p)}}),de={http:dn,xhr:zn,fetch:Qn};a.forEach(de,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const De=t=>`- ${t}`,Zn=t=>a.isFunction(t)||t===null||t===!1,lt={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let o=0;o<e;o++){n=t[o];let i;if(r=n,!Zn(n)&&(r=de[(i=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=e?o.length>1?`since :
4
4
  `+o.map(De).join(`
@@ -2,7 +2,7 @@ var ct = Object.defineProperty;
2
2
  var lt = (t, e, n) => e in t ? ct(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var T = (t, e, n) => lt(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { defineAsyncComponent as ut, ref as Se, shallowRef as Ee } from "vue";
5
- import { u as ft } from "./index-DO5DuUPL.js";
5
+ import { u as ft } from "./index-Dg7MK40D.js";
6
6
  const ee = (t, e) => ut({
7
7
  loader: t,
8
8
  loadingComponent: e,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("./axios-BAhOY32t.cjs"),O=require("./index-BPRzjSrH.cjs"),U=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),oe=require("./vuedraggable.umd-BqhSJIAi.cjs"),le={class:"epic-widget-action-item whitespace-nowrap"},ae={key:0,class:"flex items-center"},re=e.defineComponent({__name:"previewWidgets",setup(F,{expose:R}){const p=e.inject("pageManager",{}),g=e.inject("pageSchema"),l=e.inject("designer"),b=e.inject("designerProps"),c=e.inject("revoke"),h=e.ref(null),B=e.ref(null),C=e.ref(null),$=e.ref(!1),a=e.ref(!1),r=e.ref(!0),i=e.ref("top"),{canvasScale:s,disabledZoom:N}=O.useStore();let o=null;const j=e.computed(()=>{const t=l.state.checkedNode;return!(!(t!=null&&t.id)||b.value.lockDefaultSchemaEdit&&p.defaultComponentIds.value.includes(t==null?void 0:t.id)||t.type==="table-col")}),z=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table-col"}),V=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table"}),m=e.computed(()=>{var v,_,x,u,M,L;const t=p.componentInstances.value,d=(v=l.state.checkedNode)==null?void 0:v.id;if((x=(_=l.state.checkedNode)==null?void 0:_.componentProps)!=null&&x.hidden)return null;const f=w.pluginManager.getComponentConfingByType((u=l.state.checkedNode)==null?void 0:u.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((M=l.state.checkedNode)==null?void 0:M.noFormItem)!==!0)return(L=t[d+"formItem"])==null?void 0:L.$el;const n=t[d];return!(n!=null&&n.$el)||(n==null?void 0:n.$el.nodeName)==="#text"||!(n!=null&&n.$el.getBoundingClientRect)?null:n==null?void 0:n.$el}),y=e.computed(()=>{var v,_,x,u;const t=p.componentInstances.value,d=(v=l.state.hoverNode)==null?void 0:v.id,f=w.pluginManager.getComponentConfingByType((_=l.state.hoverNode)==null?void 0:_.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((x=l.state.hoverNode)==null?void 0:x.noFormItem)!==!0)return(u=t[d+"formItem"])==null?void 0:u.$el;const n=t[d];return(n==null?void 0:n.$el.nodeName)==="#text"?null:n==null?void 0:n.$el}),{mutationObserver:k,observerConfig:D}=Q(J),{startTimedQuery:W,stopTimedQuery:E}=O.useTimedQuery(J);e.watch(()=>m.value,t=>{if(t){$.value=!0,k.observe(t,D);const d=t.parentNode;d&&(d.ondragstart=()=>{r.value=!1,W()},d.ondragend=()=>{r.value=!0,E()}),J()}else $.value=!1});const{mutationObserver:S,observerConfig:T}=Q(Z);e.watch(()=>y.value,t=>{t&&(S.observe(t,T),Z())});let H=0;e.watch(()=>{var t;return(t=l.state.hoverNode)==null?void 0:t.id},t=>{if(t){a.value=!0,clearTimeout(H);return}H=setTimeout(()=>{a.value=!1},300)});let A=0,I=0;function J(){const t=m.value;if(!t||!o)return;const{top:d,left:f}=o==null?void 0:o.getBoundingClientRect(),{top:n,left:v,width:_,height:x}=t.getBoundingClientRect(),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u,P=x/u;h.value&&(h.value.style.width=`${_/u}px`,h.value.style.height=`${P}px`,h.value.style.top=`${M/u}px`,h.value.style.left=`${L/u}px`,X(M,L)),C.value&&(M<45&&P<100?(C.value.style.top="",C.value.style.bottom="-30px",C.value.style["border-radius"]="0px 0px 4px 4px",i.value="bottom"):M<45?(C.value.style.top="0px",C.value.style["border-radius"]="0px 0px 4px 0",i.value="center"):(C.value.style.top="-30px",C.value.style["border-radius"]="4px 4px 0px 0px",i.value="top"))}function X(t,d){const f=m.value;if(!o||!f)return;const n=o.getBoundingClientRect(),{width:v}=f.getBoundingClientRect(),_=N.value?1:s.value,x=t/_-n.top;let u=d/_-n.left+v/_;u<n.width&&(u=0);const M=o.scrollTop-n.height/3+60,L=o.scrollTop+n.height/3*2,P=o.scrollLeft-n.width+200,q=o.scrollLeft+n.width-200;Math.abs(x-A)<10&&Math.abs(u-I)<10||(A=x,I=u,!(x>M&&x<L&&u>P&&u<q)&&(o.scrollTop=x,o.scrollLeft=u))}function Z(){var P,q;const t=y.value;if(!t)return;const{top:d,left:f}=(o==null?void 0:o.getBoundingClientRect())??{top:0,left:0},{top:n,left:v,width:_,height:x}=((P=t.getBoundingClientRect)==null?void 0:P.call(t))??((q=t.nextElementSibling)==null?void 0:q.getBoundingClientRect()),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u;B.value&&(B.value.style.width=`${_/u}px`,B.value.style.height=`${x/u}px`,B.value.style.top=`${M/u}px`,B.value.style.left=`${L/u}px`)}function Q(t){const d=window.MutationObserver,f={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new d(t),observerConfig:f}}function Y(){var n,v;const t=w.findSchemaInfoById(g.schemas,((n=l.state.checkedNode)==null?void 0:n.id)??"root");if(!t||!t.list||!t.list.length||!t.list[0].children||!t.list[0].children.length)return!1;let d=JSON.parse(JSON.stringify((v=t.list[0])==null?void 0:v.children[0]));d.children.forEach((_,x)=>{d.children[x].children=[]});const f=w.generateNewSchema(d);t.list[0].children.push(f),l.setCheckedNode(f),c.push(g.schemas,"表格增加一行")}function G(){var f,n,v,_;const t=w.findSchemaInfoById(g.schemas,((f=l.state.checkedNode)==null?void 0:f.id)??"root");if(!((n=t==null?void 0:t.list)!=null&&n.length)||!((_=(v=t.list[0])==null?void 0:v.children)!=null&&_.length))return!1;t.list[0].children.forEach(x=>{const u=x.children.length+1,M=Math.floor(24/u);x.children.forEach(L=>{L.componentProps.span=M}),x.children.push(w.generateNewSchema({type:"table-col",children:[],componentProps:{span:M}}))}),c.push(g.schemas,"表格增加一列")}function ee(){var _;const t=w.findSchemaInfoById(g.schemas,((_=l.state.checkedNode)==null?void 0:_.id)??"root");if(!t)return!1;const{list:d,schema:f,index:n}=t,v=w.generateNewSchema(f);d.splice(n+1,0,v),l.setCheckedNode(v),c.push(g.schemas,"复制组件")}function te(){var v;const t=w.findSchemaInfoById(g.schemas,((v=l.state.checkedNode)==null?void 0:v.id)??"root");if(!t)return!1;let{list:d,schema:f,index:n}=t;d.splice(n,1),n===d.length&&n--,l.setCheckedNode(d[n]),c.push(g.schemas,"删除组件")}function ne(t){o=t,o==null||o.addEventListener("scroll",()=>{J()}),O.useResizeObserver(m,J),O.useResizeObserver(y,Z)}return R({handleInit:ne}),(t,d)=>{var f,n,v,_,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:h,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",i.value+" "+(r.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:C},[e.createElementVNode("div",le,e.toDisplayString((n=e.unref(w.pluginManager).getComponentConfingByType(((f=e.unref(l).state.checkedNode)==null?void 0:f.type)??""))==null?void 0:n.defaultSchema.label),1),j.value||V.value||z.value?(e.openBlock(),e.createElementBlock("div",ae,[j.value?(e.openBlock(),e.createElementBlock("div",{key:0,title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:ee},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:1,title:"插入新行",class:"epic-widget-action-item pointer-events-auto",onClick:Y},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:2,title:"插入新列",class:"epic-widget-action-item pointer-events-auto",onClick:G,style:{transform:"rotate(270deg)"}},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("div",{key:3,title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:te},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--delete-outline-rounded"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,$.value&&((v=e.unref(l).state.checkedNode)==null?void 0:v.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:B,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,a.value&&((_=e.unref(l).state.checkedNode)==null?void 0:_.id)!==((x=e.unref(l).state.hoverNode)==null?void 0:x.id)]])],64)}}}),se=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(F,{emit:R}){const p=e.inject("designer"),g=e.inject("pageSchema"),l=e.inject("revoke"),b=F,c=R,h=e.computed({get(){return b.schemas},set(r){c("update:schemas",r)}});function B(r){p.setCheckedNode(h.value[r]),p.setDisableHover(!0)}function C(){p.setDisableHover(),l.push(g.schemas,"拖拽组件")}function $(){l.push(g.schemas,"插入组件")}function a(r){var i,s,N;return r.id===((i=g.schemas[0])==null?void 0:i.id)||(N=(s=w.pluginManager.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&N.immovable?"unmover-item":"draggable-item"}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(oe.draggable),e.mergeProps({modelValue:h.value,"onUpdate:modelValue":i[0]||(i[0]=s=>h.value=s),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:i[1]||(i[1]=s=>B(s.oldIndex)),onEnd:i[2]||(i[2]=s=>C()),onAdd:i[3]||(i[3]=s=>{B(s.newIndex),$()})}),{item:e.withCtx(({element:s,index:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",a(s)]),key:N},[e.createVNode(K,{schema:s},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),K=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(F){const R=e.useAttrs(),p=e.inject("designer"),g=e.inject("pageManager",{}),l=e.inject("pageSchema",{}),b=e.ref(null);e.provide("nodeAttrs",R);const c=F,h=e.computed(()=>{var N,o,j,z,V;const a=g.componentInstances.value,r=(N=c.schema)==null?void 0:N.id,i=w.pluginManager.getComponentConfingByType((o=c.schema)==null?void 0:o.type)??null;if(!r||!(a!=null&&a[r]))return null;if(i!=null&&i.defaultSchema.input&&((j=c.schema)==null?void 0:j.noFormItem)!==!0)return(z=a[r+"formItem"])==null?void 0:z.$el;const s=a[r];return((V=s==null?void 0:s.$el)==null?void 0:V.nodeName)==="#text"?null:s==null?void 0:s.$el});e.watch(()=>h.value,a=>{a==null||a.addEventListener("click",B,!1),a==null||a.addEventListener("mouseover",C,!1),a==null||a.addEventListener("mouseout",$,!1)}),e.onUnmounted(()=>{var a,r,i;(a=h.value)==null||a.removeEventListener("click",B,!1),(r=h.value)==null||r.removeEventListener("mouseover",C,!1),(i=h.value)==null||i.removeEventListener("mouseout",$,!1)});function B(a){a.stopPropagation(),p.setCheckedNode(c.schema)}function C(a){var r;c.schema.id!==((r=l.schemas[0])==null?void 0:r.id)&&(a.stopPropagation(),p.setHoverNode(c.schema))}function $(a){a.stopPropagation(),p.setHoverNode(null)}return(a,r)=>{var s,N;const i=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(O._sfc_main),{ref_key:"nodeRef",ref:b,componentSchema:c.schema},e.createSlots({_:2},[(N=(s=e.unref(w.pluginManager).getComponentConfingByType(c.schema.type))==null?void 0:s.editConstraints)!=null&&N.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.schema.children,o=>(e.openBlock(),e.createBlock(i,{key:o.id,schema:o},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[c.schema.children?(e.openBlock(),e.createBlock(se,{key:0,schemas:c.schema.children,"onUpdate:schemas":r[0]||(r[0]=o=>c.schema.children=o)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),ce={class:"min-w-750px rounded h-full"},ie=e.defineComponent({__name:"previewJson",setup(F,{expose:R}){const p=w.pluginManager.getComponent("modal"),g=w.pluginManager.getComponent("monacoEditor"),l={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},b=e.ref(null),c=e.ref(!1),h=e.inject("pageSchema");function B(){c.value=!1}function C(){c.value=!0,b.value?b.value.setValue(JSON.stringify(h,null,2)):setTimeout(()=>{C()},300)}function $(a="epic-data.json"){const r=JSON.stringify(h,null,2);var i=`data:text/json;charset=utf-8,${encodeURIComponent(r)}`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",a),s.click()}return R({handleOpen:C}),(a,r)=>(e.openBlock(),e.createBlock(e.unref(p),{modelValue:c.value,"onUpdate:modelValue":r[0]||(r[0]=i=>c.value=i),title:"查看数据",class:"w-900px",width:"900px",onClose:B,onOk:$,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.createVNode(e.unref(g),{ref_key:"monacoEditorRef",ref:b,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:l,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),de={class:"epic-edit-toolbar flex items-center justify-between px-2"},ue={class:"flex-1 h-full flex items-center"},fe={key:0,class:"epic-divider"},pe=["title","onClick"],he={class:"flex-1 h-full flex items-center justify-end"},me={key:0,class:"flex items-center ml-12px"},ve={class:"pr-8px w-82px cursor-pointer"},ge={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},ye=["title","onClick"],ke=e.defineComponent({__name:"toolbar",setup(F){const R=w.pluginManager.getComponent("select"),{canvasScale:p,disabledZoom:g}=O.useStore(),l=e.ref("pc"),b=e.inject("pageSchema"),c=e.inject("designer"),h=e.inject("revoke"),B=e.ref(null),C=[{icon:"icon--epic--computer-outline-rounded",title:"pc",key:"pc"},{icon:"icon--epic--tablet-android-outline-rounded",title:"平板",key:"pad"},{icon:"icon--epic--phone-iphone-outline-sharp",title:"手机",key:"mobile"}],$=e.computed(()=>[{icon:"icon--epic--trash",title:"清空",on:o},{icon:"icon--epic--undo",title:"撤销",on:s,disabled:!h.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:N,disabled:!h.undoList.value.length}]),a=e.ref(null),r=e.computed({get(){return`${(p.value*100).toFixed(0)}%`},set(m){const y=parseFloat(m);p.value=y/100}}),i=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function s(){const m=h.undo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function N(){const m=h.redo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function o(){c.reset()}function j(m){var D;const y=(D=m.target.files)==null?void 0:D[0];if(!y)return;m.target.value=null;const k=new FileReader;k.readAsText(y),k.onload=W=>{var E;z((E=W.target)==null?void 0:E.result)}}function z(m){try{let y=JSON.parse(m??"");y.schemas||(y=w.convertKFormData(y)),w.deepCompareAndModify(b,y)}catch(y){console.error(y)}}function V(m){c.handleToggleDeviceMode(m),l.value=m;const y={pc:{},pad:{width:"780px",mode:m},mobile:{width:"390px",height:"844px",mode:m}};b.canvas=y[m],console.log("%c [ pageSchema ]-248","font-size:13px; background:pink; color:#bf2c9f;",b)}return(m,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",de,[e.createElementVNode("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(k,D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D},[k.divider?(e.openBlock(),e.createElementBlock("div",fe)):e.createCommentVNode("",!0),e.createElementVNode("div",{title:k.title,class:e.normalizeClass(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer",{disabled:k.disabled}]),onClick:k.on},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,pe)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:a,accept:".json,.txt",onChange:j},null,544),[[e.vShow,!1]]),e.createElementVNode("div",he,[e.unref(g)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ve,[e.createVNode(e.unref(R),{value:r.value,"onUpdate:value":y[0]||(y[0]=k=>r.value=k),modelValue:r.value,"onUpdate:modelValue":y[1]||(y[1]=k=>r.value=k),options:i,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",ge,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(C,k=>e.createElementVNode("div",{key:k.key,title:k.title,class:e.normalizeClass(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm",{checked:k.key===l.value}]),onClick:D=>V(k.key)},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,ye)),64))])])]),e.createVNode(ie,{ref_key:"previewJson",ref:B},null,512)],64))}}),xe={class:"h-full flex flex-col relative"},be=["draggable"],_e=e.defineComponent({__name:"editScreenContainer",setup(F){const R=e.inject("pageSchema"),p=e.ref(null),g=e.ref(null),l=e.ref(null),{pressSpace:b,disabledZoom:c}=O.useStore(),{handleElementDragStart:h,handleElementDrag:B,handleElementDragEnd:C}=O.useElementDrag(p),{width:$,height:a}=O.useElementSize(p),{canvasScale:r,handleZoom:i}=O.useElementZoom(g);let s=0,N=0;const o=e.ref({}),j=e.ref({}),z=e.ref({}),V=e.shallowRef({width:0,height:0});e.watchEffect(y),e.watch(z,()=>{e.nextTick(m)});function m(){l.value&&(V.value={width:l.value.clientWidth,height:l.value.clientHeight})}function y(){var E,S;z.value={width:((E=R.canvas)==null?void 0:E.width)??"0",height:((S=R.canvas)==null?void 0:S.height)??"0"}}O.watchOnce($,k),e.watch(V,k);function k(){let E=V.value.width||s,S=V.value.height||N;o.value={width:$.value+E+"px",height:a.value+S+"px"},j.value={width:E+"px",height:S+"px"},D()}function D(){e.nextTick(()=>{var A;let E=V.value.width||s;const T=(V.value.height||N)/2,H=E/2;(A=p.value)==null||A.scrollTo(H,T)})}O.useResizeObserver(p,W),O.useResizeObserver(g,W);function W(){var S;if(!p.value)return;const E=p.value.getBoundingClientRect();if(s=E.width-60,N=E.height-80,!c.value)if(V.value.width===0)r.value=1;else{const T=(s-20)/V.value.width,H=N/(V.value.height||((S=g.value)==null?void 0:S.clientHeight)||1),A=Math.abs(T-1)<Math.abs(H-1);let I=1;A?I=T:I=H,(T<1||H<1)&&(I=Math.min(T,H)),I<1.4&&I>.5&&(r.value=I)}O.debounce(k,50)()}return(E,S)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(ke),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:p,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(b)}]),draggable:e.unref(b),onWheel:S[0]||(S[0]=(...T)=>e.unref(i)&&e.unref(i)(...T)),onDragstart:S[1]||(S[1]=(...T)=>e.unref(h)&&e.unref(h)(...T)),onDragend:S[2]||(S[2]=(...T)=>e.unref(C)&&e.unref(C)(...T)),onDrag:S[3]||(S[3]=(...T)=>e.unref(B)&&e.unref(B)(...T))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:g,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(b)}),style:e.normalizeStyle(j.value)},[e.renderSlot(E.$slots,"default")],6)],512)],4)],42,be),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:l,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(z.value)},null,4)]))}}),Ce={class:"epic-edit-canvas"},Ne=e.defineComponent({__name:"index",setup(F){const R=e.ref(null),p=e.ref(null),g=e.inject("pageSchema"),l=e.computed(()=>g.schemas[0]),b=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var c;(c=p.value)==null||c.handleInit(R.value)}),(c,h)=>(e.openBlock(),e.createElementBlock("section",Ce,[e.createVNode(_e,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:R,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(b.value)},[e.createVNode(K,{schema:l.value},null,8,["schema"]),e.createVNode(re,{ref_key:"ePreviewWidgetsRef",ref:p},null,512)],4)]),_:1})]))}});exports.default=Ne;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("./axios-B8aFvCWj.cjs"),O=require("./index-CrV5FaWU.cjs"),U=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),oe=require("./vuedraggable.umd-BqhSJIAi.cjs"),le={class:"epic-widget-action-item whitespace-nowrap"},ae={key:0,class:"flex items-center"},re=e.defineComponent({__name:"previewWidgets",setup(F,{expose:R}){const p=e.inject("pageManager",{}),g=e.inject("pageSchema"),l=e.inject("designer"),b=e.inject("designerProps"),c=e.inject("revoke"),h=e.ref(null),B=e.ref(null),C=e.ref(null),$=e.ref(!1),a=e.ref(!1),r=e.ref(!0),i=e.ref("top"),{canvasScale:s,disabledZoom:N}=O.useStore();let o=null;const j=e.computed(()=>{const t=l.state.checkedNode;return!(!(t!=null&&t.id)||b.value.lockDefaultSchemaEdit&&p.defaultComponentIds.value.includes(t==null?void 0:t.id)||t.type==="table-col")}),z=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table-col"}),V=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table"}),m=e.computed(()=>{var v,_,x,u,M,L;const t=p.componentInstances.value,d=(v=l.state.checkedNode)==null?void 0:v.id;if((x=(_=l.state.checkedNode)==null?void 0:_.componentProps)!=null&&x.hidden)return null;const f=w.pluginManager.getComponentConfingByType((u=l.state.checkedNode)==null?void 0:u.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((M=l.state.checkedNode)==null?void 0:M.noFormItem)!==!0)return(L=t[d+"formItem"])==null?void 0:L.$el;const n=t[d];return!(n!=null&&n.$el)||(n==null?void 0:n.$el.nodeName)==="#text"||!(n!=null&&n.$el.getBoundingClientRect)?null:n==null?void 0:n.$el}),y=e.computed(()=>{var v,_,x,u;const t=p.componentInstances.value,d=(v=l.state.hoverNode)==null?void 0:v.id,f=w.pluginManager.getComponentConfingByType((_=l.state.hoverNode)==null?void 0:_.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((x=l.state.hoverNode)==null?void 0:x.noFormItem)!==!0)return(u=t[d+"formItem"])==null?void 0:u.$el;const n=t[d];return(n==null?void 0:n.$el.nodeName)==="#text"?null:n==null?void 0:n.$el}),{mutationObserver:k,observerConfig:D}=Q(J),{startTimedQuery:W,stopTimedQuery:E}=O.useTimedQuery(J);e.watch(()=>m.value,t=>{if(t){$.value=!0,k.observe(t,D);const d=t.parentNode;d&&(d.ondragstart=()=>{r.value=!1,W()},d.ondragend=()=>{r.value=!0,E()}),J()}else $.value=!1});const{mutationObserver:S,observerConfig:T}=Q(Z);e.watch(()=>y.value,t=>{t&&(S.observe(t,T),Z())});let H=0;e.watch(()=>{var t;return(t=l.state.hoverNode)==null?void 0:t.id},t=>{if(t){a.value=!0,clearTimeout(H);return}H=setTimeout(()=>{a.value=!1},300)});let A=0,I=0;function J(){const t=m.value;if(!t||!o)return;const{top:d,left:f}=o==null?void 0:o.getBoundingClientRect(),{top:n,left:v,width:_,height:x}=t.getBoundingClientRect(),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u,P=x/u;h.value&&(h.value.style.width=`${_/u}px`,h.value.style.height=`${P}px`,h.value.style.top=`${M/u}px`,h.value.style.left=`${L/u}px`,X(M,L)),C.value&&(M<45&&P<100?(C.value.style.top="",C.value.style.bottom="-30px",C.value.style["border-radius"]="0px 0px 4px 4px",i.value="bottom"):M<45?(C.value.style.top="0px",C.value.style["border-radius"]="0px 0px 4px 0",i.value="center"):(C.value.style.top="-30px",C.value.style["border-radius"]="4px 4px 0px 0px",i.value="top"))}function X(t,d){const f=m.value;if(!o||!f)return;const n=o.getBoundingClientRect(),{width:v}=f.getBoundingClientRect(),_=N.value?1:s.value,x=t/_-n.top;let u=d/_-n.left+v/_;u<n.width&&(u=0);const M=o.scrollTop-n.height/3+60,L=o.scrollTop+n.height/3*2,P=o.scrollLeft-n.width+200,q=o.scrollLeft+n.width-200;Math.abs(x-A)<10&&Math.abs(u-I)<10||(A=x,I=u,!(x>M&&x<L&&u>P&&u<q)&&(o.scrollTop=x,o.scrollLeft=u))}function Z(){var P,q;const t=y.value;if(!t)return;const{top:d,left:f}=(o==null?void 0:o.getBoundingClientRect())??{top:0,left:0},{top:n,left:v,width:_,height:x}=((P=t.getBoundingClientRect)==null?void 0:P.call(t))??((q=t.nextElementSibling)==null?void 0:q.getBoundingClientRect()),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u;B.value&&(B.value.style.width=`${_/u}px`,B.value.style.height=`${x/u}px`,B.value.style.top=`${M/u}px`,B.value.style.left=`${L/u}px`)}function Q(t){const d=window.MutationObserver,f={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new d(t),observerConfig:f}}function Y(){var n,v;const t=w.findSchemaInfoById(g.schemas,((n=l.state.checkedNode)==null?void 0:n.id)??"root");if(!t||!t.list||!t.list.length||!t.list[0].children||!t.list[0].children.length)return!1;let d=JSON.parse(JSON.stringify((v=t.list[0])==null?void 0:v.children[0]));d.children.forEach((_,x)=>{d.children[x].children=[]});const f=w.generateNewSchema(d);t.list[0].children.push(f),l.setCheckedNode(f),c.push(g.schemas,"表格增加一行")}function G(){var f,n,v,_;const t=w.findSchemaInfoById(g.schemas,((f=l.state.checkedNode)==null?void 0:f.id)??"root");if(!((n=t==null?void 0:t.list)!=null&&n.length)||!((_=(v=t.list[0])==null?void 0:v.children)!=null&&_.length))return!1;t.list[0].children.forEach(x=>{const u=x.children.length+1,M=Math.floor(24/u);x.children.forEach(L=>{L.componentProps.span=M}),x.children.push(w.generateNewSchema({type:"table-col",children:[],componentProps:{span:M}}))}),c.push(g.schemas,"表格增加一列")}function ee(){var _;const t=w.findSchemaInfoById(g.schemas,((_=l.state.checkedNode)==null?void 0:_.id)??"root");if(!t)return!1;const{list:d,schema:f,index:n}=t,v=w.generateNewSchema(f);d.splice(n+1,0,v),l.setCheckedNode(v),c.push(g.schemas,"复制组件")}function te(){var v;const t=w.findSchemaInfoById(g.schemas,((v=l.state.checkedNode)==null?void 0:v.id)??"root");if(!t)return!1;let{list:d,schema:f,index:n}=t;d.splice(n,1),n===d.length&&n--,l.setCheckedNode(d[n]),c.push(g.schemas,"删除组件")}function ne(t){o=t,o==null||o.addEventListener("scroll",()=>{J()}),O.useResizeObserver(m,J),O.useResizeObserver(y,Z)}return R({handleInit:ne}),(t,d)=>{var f,n,v,_,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:h,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",i.value+" "+(r.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:C},[e.createElementVNode("div",le,e.toDisplayString((n=e.unref(w.pluginManager).getComponentConfingByType(((f=e.unref(l).state.checkedNode)==null?void 0:f.type)??""))==null?void 0:n.defaultSchema.label),1),j.value||V.value||z.value?(e.openBlock(),e.createElementBlock("div",ae,[j.value?(e.openBlock(),e.createElementBlock("div",{key:0,title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:ee},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:1,title:"插入新行",class:"epic-widget-action-item pointer-events-auto",onClick:Y},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:2,title:"插入新列",class:"epic-widget-action-item pointer-events-auto",onClick:G,style:{transform:"rotate(270deg)"}},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("div",{key:3,title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:te},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--delete-outline-rounded"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,$.value&&((v=e.unref(l).state.checkedNode)==null?void 0:v.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:B,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,a.value&&((_=e.unref(l).state.checkedNode)==null?void 0:_.id)!==((x=e.unref(l).state.hoverNode)==null?void 0:x.id)]])],64)}}}),se=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(F,{emit:R}){const p=e.inject("designer"),g=e.inject("pageSchema"),l=e.inject("revoke"),b=F,c=R,h=e.computed({get(){return b.schemas},set(r){c("update:schemas",r)}});function B(r){p.setCheckedNode(h.value[r]),p.setDisableHover(!0)}function C(){p.setDisableHover(),l.push(g.schemas,"拖拽组件")}function $(){l.push(g.schemas,"插入组件")}function a(r){var i,s,N;return r.id===((i=g.schemas[0])==null?void 0:i.id)||(N=(s=w.pluginManager.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&N.immovable?"unmover-item":"draggable-item"}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(oe.draggable),e.mergeProps({modelValue:h.value,"onUpdate:modelValue":i[0]||(i[0]=s=>h.value=s),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:i[1]||(i[1]=s=>B(s.oldIndex)),onEnd:i[2]||(i[2]=s=>C()),onAdd:i[3]||(i[3]=s=>{B(s.newIndex),$()})}),{item:e.withCtx(({element:s,index:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",a(s)]),key:N},[e.createVNode(K,{schema:s},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),K=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(F){const R=e.useAttrs(),p=e.inject("designer"),g=e.inject("pageManager",{}),l=e.inject("pageSchema",{}),b=e.ref(null);e.provide("nodeAttrs",R);const c=F,h=e.computed(()=>{var N,o,j,z,V;const a=g.componentInstances.value,r=(N=c.schema)==null?void 0:N.id,i=w.pluginManager.getComponentConfingByType((o=c.schema)==null?void 0:o.type)??null;if(!r||!(a!=null&&a[r]))return null;if(i!=null&&i.defaultSchema.input&&((j=c.schema)==null?void 0:j.noFormItem)!==!0)return(z=a[r+"formItem"])==null?void 0:z.$el;const s=a[r];return((V=s==null?void 0:s.$el)==null?void 0:V.nodeName)==="#text"?null:s==null?void 0:s.$el});e.watch(()=>h.value,a=>{a==null||a.addEventListener("click",B,!1),a==null||a.addEventListener("mouseover",C,!1),a==null||a.addEventListener("mouseout",$,!1)}),e.onUnmounted(()=>{var a,r,i;(a=h.value)==null||a.removeEventListener("click",B,!1),(r=h.value)==null||r.removeEventListener("mouseover",C,!1),(i=h.value)==null||i.removeEventListener("mouseout",$,!1)});function B(a){a.stopPropagation(),p.setCheckedNode(c.schema)}function C(a){var r;c.schema.id!==((r=l.schemas[0])==null?void 0:r.id)&&(a.stopPropagation(),p.setHoverNode(c.schema))}function $(a){a.stopPropagation(),p.setHoverNode(null)}return(a,r)=>{var s,N;const i=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(O._sfc_main),{ref_key:"nodeRef",ref:b,componentSchema:c.schema},e.createSlots({_:2},[(N=(s=e.unref(w.pluginManager).getComponentConfingByType(c.schema.type))==null?void 0:s.editConstraints)!=null&&N.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.schema.children,o=>(e.openBlock(),e.createBlock(i,{key:o.id,schema:o},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[c.schema.children?(e.openBlock(),e.createBlock(se,{key:0,schemas:c.schema.children,"onUpdate:schemas":r[0]||(r[0]=o=>c.schema.children=o)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),ce={class:"min-w-750px rounded h-full"},ie=e.defineComponent({__name:"previewJson",setup(F,{expose:R}){const p=w.pluginManager.getComponent("modal"),g=w.pluginManager.getComponent("monacoEditor"),l={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},b=e.ref(null),c=e.ref(!1),h=e.inject("pageSchema");function B(){c.value=!1}function C(){c.value=!0,b.value?b.value.setValue(JSON.stringify(h,null,2)):setTimeout(()=>{C()},300)}function $(a="epic-data.json"){const r=JSON.stringify(h,null,2);var i=`data:text/json;charset=utf-8,${encodeURIComponent(r)}`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",a),s.click()}return R({handleOpen:C}),(a,r)=>(e.openBlock(),e.createBlock(e.unref(p),{modelValue:c.value,"onUpdate:modelValue":r[0]||(r[0]=i=>c.value=i),title:"查看数据",class:"w-900px",width:"900px",onClose:B,onOk:$,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.createVNode(e.unref(g),{ref_key:"monacoEditorRef",ref:b,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:l,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),de={class:"epic-edit-toolbar flex items-center justify-between px-2"},ue={class:"flex-1 h-full flex items-center"},fe={key:0,class:"epic-divider"},pe=["title","onClick"],he={class:"flex-1 h-full flex items-center justify-end"},me={key:0,class:"flex items-center ml-12px"},ve={class:"pr-8px w-82px cursor-pointer"},ge={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},ye=["title","onClick"],ke=e.defineComponent({__name:"toolbar",setup(F){const R=w.pluginManager.getComponent("select"),{canvasScale:p,disabledZoom:g}=O.useStore(),l=e.ref("pc"),b=e.inject("pageSchema"),c=e.inject("designer"),h=e.inject("revoke"),B=e.ref(null),C=[{icon:"icon--epic--computer-outline-rounded",title:"pc",key:"pc"},{icon:"icon--epic--tablet-android-outline-rounded",title:"平板",key:"pad"},{icon:"icon--epic--phone-iphone-outline-sharp",title:"手机",key:"mobile"}],$=e.computed(()=>[{icon:"icon--epic--trash",title:"清空",on:o},{icon:"icon--epic--undo",title:"撤销",on:s,disabled:!h.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:N,disabled:!h.undoList.value.length}]),a=e.ref(null),r=e.computed({get(){return`${(p.value*100).toFixed(0)}%`},set(m){const y=parseFloat(m);p.value=y/100}}),i=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function s(){const m=h.undo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function N(){const m=h.redo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function o(){c.reset()}function j(m){var D;const y=(D=m.target.files)==null?void 0:D[0];if(!y)return;m.target.value=null;const k=new FileReader;k.readAsText(y),k.onload=W=>{var E;z((E=W.target)==null?void 0:E.result)}}function z(m){try{let y=JSON.parse(m??"");y.schemas||(y=w.convertKFormData(y)),w.deepCompareAndModify(b,y)}catch(y){console.error(y)}}function V(m){c.handleToggleDeviceMode(m),l.value=m;const y={pc:{},pad:{width:"780px",mode:m},mobile:{width:"390px",height:"844px",mode:m}};b.canvas=y[m],console.log("%c [ pageSchema ]-248","font-size:13px; background:pink; color:#bf2c9f;",b)}return(m,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",de,[e.createElementVNode("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(k,D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D},[k.divider?(e.openBlock(),e.createElementBlock("div",fe)):e.createCommentVNode("",!0),e.createElementVNode("div",{title:k.title,class:e.normalizeClass(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer",{disabled:k.disabled}]),onClick:k.on},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,pe)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:a,accept:".json,.txt",onChange:j},null,544),[[e.vShow,!1]]),e.createElementVNode("div",he,[e.unref(g)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ve,[e.createVNode(e.unref(R),{value:r.value,"onUpdate:value":y[0]||(y[0]=k=>r.value=k),modelValue:r.value,"onUpdate:modelValue":y[1]||(y[1]=k=>r.value=k),options:i,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",ge,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(C,k=>e.createElementVNode("div",{key:k.key,title:k.title,class:e.normalizeClass(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm",{checked:k.key===l.value}]),onClick:D=>V(k.key)},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,ye)),64))])])]),e.createVNode(ie,{ref_key:"previewJson",ref:B},null,512)],64))}}),xe={class:"h-full flex flex-col relative"},be=["draggable"],_e=e.defineComponent({__name:"editScreenContainer",setup(F){const R=e.inject("pageSchema"),p=e.ref(null),g=e.ref(null),l=e.ref(null),{pressSpace:b,disabledZoom:c}=O.useStore(),{handleElementDragStart:h,handleElementDrag:B,handleElementDragEnd:C}=O.useElementDrag(p),{width:$,height:a}=O.useElementSize(p),{canvasScale:r,handleZoom:i}=O.useElementZoom(g);let s=0,N=0;const o=e.ref({}),j=e.ref({}),z=e.ref({}),V=e.shallowRef({width:0,height:0});e.watchEffect(y),e.watch(z,()=>{e.nextTick(m)});function m(){l.value&&(V.value={width:l.value.clientWidth,height:l.value.clientHeight})}function y(){var E,S;z.value={width:((E=R.canvas)==null?void 0:E.width)??"0",height:((S=R.canvas)==null?void 0:S.height)??"0"}}O.watchOnce($,k),e.watch(V,k);function k(){let E=V.value.width||s,S=V.value.height||N;o.value={width:$.value+E+"px",height:a.value+S+"px"},j.value={width:E+"px",height:S+"px"},D()}function D(){e.nextTick(()=>{var A;let E=V.value.width||s;const T=(V.value.height||N)/2,H=E/2;(A=p.value)==null||A.scrollTo(H,T)})}O.useResizeObserver(p,W),O.useResizeObserver(g,W);function W(){var S;if(!p.value)return;const E=p.value.getBoundingClientRect();if(s=E.width-60,N=E.height-80,!c.value)if(V.value.width===0)r.value=1;else{const T=(s-20)/V.value.width,H=N/(V.value.height||((S=g.value)==null?void 0:S.clientHeight)||1),A=Math.abs(T-1)<Math.abs(H-1);let I=1;A?I=T:I=H,(T<1||H<1)&&(I=Math.min(T,H)),I<1.4&&I>.5&&(r.value=I)}O.debounce(k,50)()}return(E,S)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(ke),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:p,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(b)}]),draggable:e.unref(b),onWheel:S[0]||(S[0]=(...T)=>e.unref(i)&&e.unref(i)(...T)),onDragstart:S[1]||(S[1]=(...T)=>e.unref(h)&&e.unref(h)(...T)),onDragend:S[2]||(S[2]=(...T)=>e.unref(C)&&e.unref(C)(...T)),onDrag:S[3]||(S[3]=(...T)=>e.unref(B)&&e.unref(B)(...T))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:g,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(b)}),style:e.normalizeStyle(j.value)},[e.renderSlot(E.$slots,"default")],6)],512)],4)],42,be),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:l,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(z.value)},null,4)]))}}),Ce={class:"epic-edit-canvas"},Ne=e.defineComponent({__name:"index",setup(F){const R=e.ref(null),p=e.ref(null),g=e.inject("pageSchema"),l=e.computed(()=>g.schemas[0]),b=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var c;(c=p.value)==null||c.handleInit(R.value)}),(c,h)=>(e.openBlock(),e.createElementBlock("section",Ce,[e.createVNode(_e,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:R,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(b.value)},[e.createVNode(K,{schema:l.value},null,8,["schema"]),e.createVNode(re,{ref_key:"ePreviewWidgetsRef",ref:p},null,512)],4)]),_:1})]))}});exports.default=Ne;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as d, computed as p, ref as _, shallowRef as m, openBlock as i, createElementBlock as s, createElementVNode as t, Fragment as f, renderList as h, normalizeClass as u, createVNode as k, unref as C, toDisplayString as b, createBlock as y, resolveDynamicComponent as B } from "vue";
2
- import { p as g } from "./axios-BFVeUxau.js";
2
+ import { p as g } from "./axios-Bb3STC1u.js";
3
3
  import { _ as x } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
4
4
  const E = { class: "flex relative" }, w = { class: "epic-action-bar" }, D = { class: "epic-actions-container" }, N = ["title", "onClick"], V = { class: "text-14px" }, $ = { class: "epic-sidebar-container" }, M = /* @__PURE__ */ d({
5
5
  name: "EActivityBar",
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as $, inject as M, resolveComponent as z, openBlock as r, createBlock as I, unref as t, isRef as U, withCtx as B, createElementVNode as c, normalizeClass as w, createVNode as s, createCommentVNode as O, createElementBlock as V, ref as A, reactive as D, onMounted as R, watch as T, provide as j, Fragment as F, renderList as q, toDisplayString as x, withDirectives as G, vShow as H, createTextVNode as J } from "vue";
2
2
  import { d as K } from "./vuedraggable.umd-D2S7Eo7p.js";
3
- import { p, E as N } from "./axios-BFVeUxau.js";
3
+ import { p, E as N } from "./axios-Bb3STC1u.js";
4
4
  import { _ as C } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
5
- import { g as S } from "./index-CIwV58Ko.js";
5
+ import { g as S } from "./index-BULuVnVl.js";
6
6
  import "element-plus";
7
- import { u as P } from "./index-DO5DuUPL.js";
7
+ import { u as P } from "./index-Dg7MK40D.js";
8
8
  import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const W = {
10
10
  key: 0,
@@ -1,6 +1,6 @@
1
1
  import { ref as V, reactive as te, defineComponent as ne, openBlock as B, createBlock as W, unref as F, mergeProps as me, withCtx as R, renderSlot as L, getCurrentInstance as re, inject as q, watch as $, useAttrs as Ve, provide as J, shallowRef as Me, computed as z, watchEffect as ie, onUnmounted as Ee, resolveComponent as Ne, resolveDynamicComponent as Fe, createVNode as K, createCommentVNode as be, useSlots as Re, createElementBlock as he, Suspense as Ae, createElementVNode as Q, Fragment as $e, renderList as Ue, nextTick as ae, effectScope as Be, isRef as Te, getCurrentScope as Le, onScopeDispose as Je, onMounted as ve, normalizeClass as He, toRaw as we } from "vue";
2
- import { p as U, f as ze, d as oe, a as Y, b as xe, c as Ke, E as ee, e as De, l as j, g as We, h as Ze } from "./axios-BFVeUxau.js";
3
- import { a as Se, u as ge } from "./index-DO5DuUPL.js";
2
+ import { p as U, f as ze, d as oe, a as Y, b as xe, c as Ke, E as ee, e as De, l as j, g as We, h as Ze } from "./axios-Bb3STC1u.js";
3
+ import { a as Se, u as ge } from "./index-Dg7MK40D.js";
4
4
  function Ft(e, n) {
5
5
  let s = null;
6
6
  return (...a) => {
@@ -1075,7 +1075,7 @@ const St = { class: "min-w-750px rounded" }, Et = { class: "h-full rounded" }, b
1075
1075
  "updateSourceData"
1076
1076
  ],
1077
1077
  setup(e, { expose: n, emit: s }) {
1078
- const { t: a } = ge(), i = j(() => import("./index-D7z34DMU.js")), l = j(() => import("./index-Sin3ac_7.js")), p = j(() => import("./index-Cwgv4MbW.js")), h = j(() => import("./index-BiXYEiWV.js")), v = j(() => import("./index-DgcFxYFp.js")), I = Ie(), E = Ge(), o = e;
1078
+ const { t: a } = ge(), i = j(() => import("./index-CgwN4ucQ.js")), l = j(() => import("./index-B553TaXm.js")), p = j(() => import("./index-VblxMq6V.js")), h = j(() => import("./index-D0kQz_zt.js")), v = j(() => import("./index-DgcFxYFp.js")), I = Ie(), E = Ge(), o = e;
1079
1079
  let b = {
1080
1080
  schemas: [
1081
1081
  {
@@ -1263,7 +1263,7 @@ defineExpose({
1263
1263
  })) : (B(), he("div", At));
1264
1264
  }
1265
1265
  }), Ot = {
1266
- component: async () => await import("./index-BstMY1Nn.js"),
1266
+ component: async () => await import("./index-Bybwt7-u.js"),
1267
1267
  defaultSchema: {
1268
1268
  label: "代码编辑器",
1269
1269
  type: "monacoEditor",
@@ -1313,24 +1313,24 @@ defineExpose({
1313
1313
  }
1314
1314
  }, { t: le } = ge();
1315
1315
  function Pt(e) {
1316
- e.component("EInputSize", async () => await import("./index-BPmq8lmK.js")), e.component("EColEditor", async () => await import("./index-Bsv8EECz.js")), e.component("EActionEditor", async () => await import("./index-dUOJH8fj.js")), e.component("ERuleEditor", async () => await import("./index-BoVrWUpL.js")), e.component("EOptionsEditor", async () => await import("./index-Dru9G2MF.js")), e.component("ENode", async () => await import("./index-BY9j66Gp.js")), e.component("EDataSource", async () => await import("./index-C6C5D9M8.js")), e.registerActivitybar({
1316
+ e.component("EInputSize", async () => await import("./index-CEDIwmNK.js")), e.component("EColEditor", async () => await import("./index-CMbBKMQU.js")), e.component("EActionEditor", async () => await import("./index-CHCOxt3B.js")), e.component("ERuleEditor", async () => await import("./index-CjIIhZdV.js")), e.component("EOptionsEditor", async () => await import("./index-BLJT8e0Q.js")), e.component("ENode", async () => await import("./index-DR80h8IU.js")), e.component("EDataSource", async () => await import("./index-DxNdcsD-.js")), e.registerActivitybar({
1317
1317
  id: "component_view",
1318
1318
  title: le("component"),
1319
1319
  icon: "icon--epic--extension-outline",
1320
- component: async () => await import("./index-DdsHIglg.js")
1320
+ component: async () => await import("./index-CEvDmc0a.js")
1321
1321
  }), e.registerActivitybar({
1322
1322
  id: "outline_view",
1323
1323
  title: le("outline"),
1324
1324
  icon: "icon--epic--account-tree-outline-rounded",
1325
- component: async () => await import("./outline-CG-aHThT.js")
1325
+ component: async () => await import("./outline-DxCKINRN.js")
1326
1326
  }), e.registerRightSidebar({
1327
1327
  id: "attribute_view",
1328
1328
  title: le("attribute"),
1329
- component: async () => await import("./attributeView-CPrGnVQ8.js")
1329
+ component: async () => await import("./attributeView-Cu_tjo9A.js")
1330
1330
  }), e.registerRightSidebar({
1331
1331
  id: "style_view",
1332
1332
  title: le("style"),
1333
- component: async () => await import("./styleView-CkbdwQhA.js")
1333
+ component: async () => await import("./styleView-ClMjCfMk.js")
1334
1334
  }), [Ot, Ct].forEach((s) => {
1335
1335
  e.registerComponent(s);
1336
1336
  });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./axios-BAhOY32t.cjs"),b=require("./index-DddOVmF6.cjs"),V=e.defineComponent({__name:"index",props:{modelValue:{}},emits:["update:modelValue"],setup(v,{emit:i}){const{t:p}=b.useLocale(),s=r.pluginManager.getComponent("input"),d=r.pluginManager.getComponent("select"),m=v,c=i,l=e.ref(null),t=e.ref("px"),f=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"vw",value:"vw"},{label:"vh",value:"vh"},{label:"rem",value:"rem"},{label:"em",value:"em"},{label:"pt",value:"pt"}];e.watch(()=>m.modelValue,n=>{if(!n)return;if(typeof n=="number"){l.value=String(n),t.value="px";return}const u=parseFloat(n);if(isNaN(u))return l.value=null,!1;const a=/^(\d+(\.\d+)?)(px|%|vw|vh|rem|em|pt){1}$/,o=n.trim().match(a);l.value=(o==null?void 0:o[1])??null,t.value=(o==null?void 0:o[3])??""},{immediate:!0}),e.watch(()=>t.value+l.value,()=>{x()});function x(){e.nextTick(()=>c("update:modelValue",l.value?l.value+t.value:void 0))}return(n,u)=>(e.openBlock(),e.createBlock(e.unref(s),{class:"epic-input-size",modelValue:l.value,"onUpdate:modelValue":u[2]||(u[2]=a=>l.value=a),value:l.value,"onUpdate:value":u[3]||(u[3]=a=>l.value=a),type:"number",min:"0",placeholder:e.unref(p)("pleaseEnter")},{suffix:e.withCtx(()=>[e.createVNode(e.unref(d),{value:t.value,"onUpdate:value":u[0]||(u[0]=a=>t.value=a),modelValue:t.value,"onUpdate:modelValue":u[1]||(u[1]=a=>t.value=a),style:{width:"68px"},options:f},null,8,["value","modelValue"])]),_:1},8,["modelValue","value","placeholder"]))}});exports.default=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./axios-B8aFvCWj.cjs"),b=require("./index-Cq6eLpKZ.cjs"),V=e.defineComponent({__name:"index",props:{modelValue:{}},emits:["update:modelValue"],setup(v,{emit:i}){const{t:p}=b.useLocale(),s=r.pluginManager.getComponent("input"),d=r.pluginManager.getComponent("select"),m=v,c=i,l=e.ref(null),t=e.ref("px"),f=[{label:"px",value:"px"},{label:"%",value:"%"},{label:"vw",value:"vw"},{label:"vh",value:"vh"},{label:"rem",value:"rem"},{label:"em",value:"em"},{label:"pt",value:"pt"}];e.watch(()=>m.modelValue,n=>{if(!n)return;if(typeof n=="number"){l.value=String(n),t.value="px";return}const u=parseFloat(n);if(isNaN(u))return l.value=null,!1;const a=/^(\d+(\.\d+)?)(px|%|vw|vh|rem|em|pt){1}$/,o=n.trim().match(a);l.value=(o==null?void 0:o[1])??null,t.value=(o==null?void 0:o[3])??""},{immediate:!0}),e.watch(()=>t.value+l.value,()=>{x()});function x(){e.nextTick(()=>c("update:modelValue",l.value?l.value+t.value:void 0))}return(n,u)=>(e.openBlock(),e.createBlock(e.unref(s),{class:"epic-input-size",modelValue:l.value,"onUpdate:modelValue":u[2]||(u[2]=a=>l.value=a),value:l.value,"onUpdate:value":u[3]||(u[3]=a=>l.value=a),type:"number",min:"0",placeholder:e.unref(p)("pleaseEnter")},{suffix:e.withCtx(()=>[e.createVNode(e.unref(d),{value:t.value,"onUpdate:value":u[0]||(u[0]=a=>t.value=a),modelValue:t.value,"onUpdate:modelValue":u[1]||(u[1]=a=>t.value=a),style:{width:"68px"},options:f},null,8,["value","modelValue"])]),_:1},8,["modelValue","value","placeholder"]))}});exports.default=V;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./axios-BAhOY32t.cjs"),h=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-BPRzjSrH.cjs");require("element-plus");const C=require("./index-DddOVmF6.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E={key:0,class:"pl-4"},B=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:f}){const o=_,m=c.pluginManager.getComponent("input"),v=e.inject("tree",!1),d=f,r=k.useVModel(o,"modelValue",d);function s(l){const n={label:"",value:""};l.children?l.children.push(n):l.children=[n]}function V(l){r.value=r.value.filter((n,p)=>p!==l)}return(l,n)=>{const p=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(b.draggable),{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=a=>e.isRef(r)?r.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:g})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(v)?"grid-cols-[16px_auto_auto_16px_16px]":"grid-cols-[16px_auto_auto_16px]","option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])},[e.createVNode(e.unref(h._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(m),{modelValue:a.label,"onUpdate:modelValue":t=>a.label=t,value:a.label,"onUpdate:value":t=>a.label=t,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(m),{modelValue:a.value,"onUpdate:modelValue":t=>a.value=t,value:a.value,"onUpdate:value":t=>a.value=t,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(v)?(e.openBlock(),e.createBlock(e.unref(h._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:t=>s(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(h._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:t=>V(g)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(p,{modelValue:a.children,"onUpdate:modelValue":t=>a.children=t},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),S={class:""},U={class:"epic-tabs-box"},M=["title","onClick"],D={key:0},I={key:1},O={style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},q=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(_,{emit:f}){const{t:o}=C.useLocale(),m=c.pluginManager.getComponent("button"),v=c.pluginManager.getComponent("select"),d=e.ref([]),r=e.reactive({title:o("static")}),s=_,V=f;c.EventBus.on("deleteSourceData",t=>{n.value===t&&(n.value="",l.value=[])}),c.EventBus.on("updateSource",t=>{d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id}))}),e.onMounted(()=>{d.value=c.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id}))});const l=k.useVModel(s,"modelValue",V),n=k.useVModel(s,"dynamicId",V);e.watch(()=>n.value,async()=>{n.value?r.title=o("dynamic"):r.title=o("static")},{immediate:!0});const p=[{title:o("static")},{title:o("dynamic")}];async function a(t){r.title=t.title,t.title===o("static")?(l.value=[],n.value=""):(l.value=[],d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id})))}s.modelValue,e.provide("tree",s.tree);function g(){const t=e.reactive({label:"",value:""});l.value.length?l.value=[...l.value,t]:l.value=[t]}return(t,u)=>{var y;return e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",null,[e.createElementVNode("div",U,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(p,(i,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:r.title===i.title}]),key:x,title:i.title,onClick:w=>a(i)},e.toDisplayString(i.title),11,M)),64))]),r.title===e.unref(o)("static")?(e.openBlock(),e.createElementBlock("div",D,[e.withDirectives(e.createElementVNode("div",{class:"py-4 my-2 text-center text-gray-400 bg-white"},e.toDisplayString(e.unref(o)("noOptions")),513),[[e.vShow,!((y=e.unref(l))!=null&&y.length)]]),e.createVNode(B,{modelValue:e.unref(l),"onUpdate:modelValue":u[0]||(u[0]=i=>e.isRef(l)?l.value=i:null)},null,8,["modelValue"]),e.createVNode(e.unref(m),{onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("addOption")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("span",O,e.toDisplayString(e.unref(o)("dataSources")),1),e.createVNode(e.unref(v),{modelValue:e.unref(n),"onUpdate:modelValue":u[1]||(u[1]=i=>e.isRef(n)?n.value=i:null),placeholder:e.unref(o)("pleaseSelectDataSource"),clearable:"",options:d.value},null,8,["modelValue","placeholder","options"])]))])])}}}),$=N._export_sfc(q,[["__scopeId","data-v-040f106d"]]);exports.default=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./axios-B8aFvCWj.cjs"),h=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-CrV5FaWU.cjs");require("element-plus");const C=require("./index-Cq6eLpKZ.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E={key:0,class:"pl-4"},B=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:f}){const o=_,m=c.pluginManager.getComponent("input"),v=e.inject("tree",!1),d=f,r=k.useVModel(o,"modelValue",d);function s(l){const n={label:"",value:""};l.children?l.children.push(n):l.children=[n]}function V(l){r.value=r.value.filter((n,p)=>p!==l)}return(l,n)=>{const p=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(b.draggable),{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=a=>e.isRef(r)?r.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:g})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(v)?"grid-cols-[16px_auto_auto_16px_16px]":"grid-cols-[16px_auto_auto_16px]","option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])},[e.createVNode(e.unref(h._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(m),{modelValue:a.label,"onUpdate:modelValue":t=>a.label=t,value:a.label,"onUpdate:value":t=>a.label=t,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(m),{modelValue:a.value,"onUpdate:modelValue":t=>a.value=t,value:a.value,"onUpdate:value":t=>a.value=t,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(v)?(e.openBlock(),e.createBlock(e.unref(h._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:t=>s(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(h._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:t=>V(g)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(p,{modelValue:a.children,"onUpdate:modelValue":t=>a.children=t},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),S={class:""},U={class:"epic-tabs-box"},M=["title","onClick"],D={key:0},I={key:1},O={style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},q=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(_,{emit:f}){const{t:o}=C.useLocale(),m=c.pluginManager.getComponent("button"),v=c.pluginManager.getComponent("select"),d=e.ref([]),r=e.reactive({title:o("static")}),s=_,V=f;c.EventBus.on("deleteSourceData",t=>{n.value===t&&(n.value="",l.value=[])}),c.EventBus.on("updateSource",t=>{d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id}))}),e.onMounted(()=>{d.value=c.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id}))});const l=k.useVModel(s,"modelValue",V),n=k.useVModel(s,"dynamicId",V);e.watch(()=>n.value,async()=>{n.value?r.title=o("dynamic"):r.title=o("static")},{immediate:!0});const p=[{title:o("static")},{title:o("dynamic")}];async function a(t){r.title=t.title,t.title===o("static")?(l.value=[],n.value=""):(l.value=[],d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id})))}s.modelValue,e.provide("tree",s.tree);function g(){const t=e.reactive({label:"",value:""});l.value.length?l.value=[...l.value,t]:l.value=[t]}return(t,u)=>{var y;return e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",null,[e.createElementVNode("div",U,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(p,(i,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:r.title===i.title}]),key:x,title:i.title,onClick:w=>a(i)},e.toDisplayString(i.title),11,M)),64))]),r.title===e.unref(o)("static")?(e.openBlock(),e.createElementBlock("div",D,[e.withDirectives(e.createElementVNode("div",{class:"py-4 my-2 text-center text-gray-400 bg-white"},e.toDisplayString(e.unref(o)("noOptions")),513),[[e.vShow,!((y=e.unref(l))!=null&&y.length)]]),e.createVNode(B,{modelValue:e.unref(l),"onUpdate:modelValue":u[0]||(u[0]=i=>e.isRef(l)?l.value=i:null)},null,8,["modelValue"]),e.createVNode(e.unref(m),{onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("addOption")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("span",O,e.toDisplayString(e.unref(o)("dataSources")),1),e.createVNode(e.unref(v),{modelValue:e.unref(n),"onUpdate:modelValue":u[1]||(u[1]=i=>e.isRef(n)?n.value=i:null),placeholder:e.unref(o)("pleaseSelectDataSource"),clearable:"",options:d.value},null,8,["modelValue","placeholder","options"])]))])])}}}),$=N._export_sfc(q,[["__scopeId","data-v-040f106d"]]);exports.default=$;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./axios-BAhOY32t.cjs"),k=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),V=require("./index-DddOVmF6.cjs"),f={key:0,class:"epic-del-btn"},g=["onClick"],h=e.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(r,{emit:u}){const{t:s}=V.useLocale(),d=c.pluginManager.getComponent("number"),p=r,i=u,o=e.computed({get(){return p.modelValue},set(t){i("update:modelValue",t)}});function m(){const t={type:"col",children:[],componentProps:{span:12},id:c.getUUID()};o.value.push(t)}function _(t){o.value=o.value.filter((v,n)=>t!==n)}return(t,v)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"EColEditor-item"},[e.createVNode(e.unref(d),{value:n.componentProps.span,"onUpdate:value":l=>n.componentProps.span=l,modelValue:n.componentProps.span,"onUpdate:modelValue":l=>n.componentProps.span=l,style:{width:"100%"},min:1,max:24},null,8,["value","onUpdate:value","modelValue","onUpdate:modelValue"]),o.value.length>1?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",{onClick:l=>_(a)},[e.createVNode(e.unref(k._sfc_main),{name:"icon--epic--trash"})],8,g)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{class:"add-btn",onClick:m},e.toDisplayString(e.unref(s)("add")),1)]))}});exports.default=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./axios-B8aFvCWj.cjs"),k=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),V=require("./index-Cq6eLpKZ.cjs"),f={key:0,class:"epic-del-btn"},g=["onClick"],h=e.defineComponent({__name:"index",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(r,{emit:u}){const{t:s}=V.useLocale(),d=c.pluginManager.getComponent("number"),p=r,i=u,o=e.computed({get(){return p.modelValue},set(t){i("update:modelValue",t)}});function m(){const t={type:"col",children:[],componentProps:{span:12},id:c.getUUID()};o.value.push(t)}function _(t){o.value=o.value.filter((v,n)=>t!==n)}return(t,v)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"EColEditor-item"},[e.createVNode(e.unref(d),{value:n.componentProps.span,"onUpdate:value":l=>n.componentProps.span=l,modelValue:n.componentProps.span,"onUpdate:modelValue":l=>n.componentProps.span=l,style:{width:"100%"},min:1,max:24},null,8,["value","onUpdate:value","modelValue","onUpdate:modelValue"]),o.value.length>1?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",{onClick:l=>_(a)},[e.createVNode(e.unref(k._sfc_main),{name:"icon--epic--trash"})],8,g)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{class:"add-btn",onClick:m},e.toDisplayString(e.unref(s)("add")),1)]))}});exports.default=h;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./axios-BAhOY32t.cjs"),m=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),f={class:"epic-breadcrumb pl-4 py-2 truncate h-40px flex items-center"},h={key:0,class:"flex items-center"},v={key:0},k=["onClick","onMouseenter"],g=e.defineComponent({__name:"breadcrumb",setup(_){const t=e.inject("designer");function i(r){t.setCheckedNode(r)}return(r,n)=>(e.openBlock(),e.createElementBlock("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).state.matched,(l,c)=>{var a;return e.openBlock(),e.createElementBlock("span",{key:c},[c>e.unref(t).state.matched.length-4?(e.openBlock(),e.createElementBlock("span",h,[e.unref(t).state.matched.length>3&&c===e.unref(t).state.matched.length-3?(e.openBlock(),e.createElementBlock("span",v,"...")):e.createCommentVNode("",!0),c!==0?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:1,class:"m-1",name:"icon--epic--arrow-forward-ios-rounded"})):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"node-item cursor-pointer",onClick:o=>i(l),onMouseenter:e.withModifiers(o=>e.unref(t).setHoverNode(l),["stop"]),onMouseleave:n[0]||(n[0]=e.withModifiers(o=>e.unref(t).setHoverNode(null),["stop"]))},e.toDisplayString(l.label??((a=e.unref(p.pluginManager).getComponentConfingByType(l.type))==null?void 0:a.defaultSchema.label)),41,k)])):e.createCommentVNode("",!0)])}),128))]))}}),B={key:0,class:"epic-right-sidebar-container relative"},C={class:"w-308px"},b={class:"epic-actions-container"},y=["title","onClick"],N={class:"epic-sidebar-content"},E=e.defineComponent({__name:"index",setup(_){var a;const t=e.ref(!1),i=e.computed(()=>p.pluginManager.viewsContainers.rightSidebars.value.filter(o=>o.visible)),r=e.ref(0),n=e.shallowRef(null);n.value=(a=i.value[0])==null?void 0:a.component;function l(){t.value=!t.value}function c(o,s){if(r.value===s)return!1;n.value=o.component,r.value=s}return(o,s)=>n.value?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",{class:"epic-right-sidebar-hide-btn absolute left--18px top-80px cursor-pointer rounded-full flex justify-center items-center w-28px h-28px z-9",onClick:l},[e.createVNode(e.unref(m._sfc_main),{class:e.normalizeClass(["transition-all",{"rotate-180":t.value}]),name:"icon--epic--arrow-forward-ios-rounded"},null,8,["class"])]),s[0]||(s[0]=e.createElementVNode("div",{class:"w-10px"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["epic-right-sidebar w-308px",{hide:t.value}])},[e.createElementVNode("div",C,[e.createVNode(g),e.createElementVNode("ul",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(u,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["epic-action-item",{checked:r.value===d}]),title:u.title,onClick:V=>c(u,d)},e.toDisplayString(u.title),11,y))),128))]),e.createElementVNode("div",N,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value)))])])],2)])):e.createCommentVNode("",!0)}});exports.default=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./axios-B8aFvCWj.cjs"),m=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),f={class:"epic-breadcrumb pl-4 py-2 truncate h-40px flex items-center"},h={key:0,class:"flex items-center"},v={key:0},k=["onClick","onMouseenter"],g=e.defineComponent({__name:"breadcrumb",setup(_){const t=e.inject("designer");function i(r){t.setCheckedNode(r)}return(r,n)=>(e.openBlock(),e.createElementBlock("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).state.matched,(l,c)=>{var a;return e.openBlock(),e.createElementBlock("span",{key:c},[c>e.unref(t).state.matched.length-4?(e.openBlock(),e.createElementBlock("span",h,[e.unref(t).state.matched.length>3&&c===e.unref(t).state.matched.length-3?(e.openBlock(),e.createElementBlock("span",v,"...")):e.createCommentVNode("",!0),c!==0?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:1,class:"m-1",name:"icon--epic--arrow-forward-ios-rounded"})):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"node-item cursor-pointer",onClick:o=>i(l),onMouseenter:e.withModifiers(o=>e.unref(t).setHoverNode(l),["stop"]),onMouseleave:n[0]||(n[0]=e.withModifiers(o=>e.unref(t).setHoverNode(null),["stop"]))},e.toDisplayString(l.label??((a=e.unref(p.pluginManager).getComponentConfingByType(l.type))==null?void 0:a.defaultSchema.label)),41,k)])):e.createCommentVNode("",!0)])}),128))]))}}),B={key:0,class:"epic-right-sidebar-container relative"},C={class:"w-308px"},b={class:"epic-actions-container"},y=["title","onClick"],N={class:"epic-sidebar-content"},E=e.defineComponent({__name:"index",setup(_){var a;const t=e.ref(!1),i=e.computed(()=>p.pluginManager.viewsContainers.rightSidebars.value.filter(o=>o.visible)),r=e.ref(0),n=e.shallowRef(null);n.value=(a=i.value[0])==null?void 0:a.component;function l(){t.value=!t.value}function c(o,s){if(r.value===s)return!1;n.value=o.component,r.value=s}return(o,s)=>n.value?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",{class:"epic-right-sidebar-hide-btn absolute left--18px top-80px cursor-pointer rounded-full flex justify-center items-center w-28px h-28px z-9",onClick:l},[e.createVNode(e.unref(m._sfc_main),{class:e.normalizeClass(["transition-all",{"rotate-180":t.value}]),name:"icon--epic--arrow-forward-ios-rounded"},null,8,["class"])]),s[0]||(s[0]=e.createElementVNode("div",{class:"w-10px"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["epic-right-sidebar w-308px",{hide:t.value}])},[e.createElementVNode("div",C,[e.createVNode(g),e.createElementVNode("ul",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(u,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["epic-action-item",{checked:r.value===d}]),title:u.title,onClick:V=>c(u,d)},e.toDisplayString(u.title),11,y))),128))]),e.createElementVNode("div",N,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value)))])])],2)])):e.createCommentVNode("",!0)}});exports.default=E;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as g, ref as p, onMounted as h, watch as v, nextTick as V, openBlock as _, createElementBlock as T } from "vue";
2
2
  import * as a from "monaco-editor";
3
- import { h as b } from "./index-CIwV58Ko.js";
3
+ import { h as b } from "./index-BULuVnVl.js";
4
4
  import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const x = /* @__PURE__ */ g({
6
6
  __name: "index",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as g, ref as p, watch as r, nextTick as w, openBlock as U, createBlock as y, unref as o, withCtx as C, createVNode as k } from "vue";
2
- import { p as v } from "./axios-BFVeUxau.js";
3
- import { u as N } from "./index-DO5DuUPL.js";
2
+ import { p as v } from "./axios-Bb3STC1u.js";
3
+ import { u as N } from "./index-Dg7MK40D.js";
4
4
  const A = /* @__PURE__ */ g({
5
5
  __name: "index",
6
6
  props: {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as E, inject as r, ref as w, computed as V, openBlock as h, createElementBlock as v, createElementVNode as a, createVNode as d, unref as o, withCtx as L, Fragment as F, renderList as M, normalizeClass as j, toDisplayString as f, mergeProps as q, withDirectives as z, vShow as A } from "vue";
2
2
  import { d as G } from "./vuedraggable.umd-D2S7Eo7p.js";
3
- import { p, i as B, q as H } from "./axios-BFVeUxau.js";
3
+ import { p, i as B, q as H } from "./axios-Bb3STC1u.js";
4
4
  import { _ as I } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
5
- import { u as J } from "./index-DO5DuUPL.js";
5
+ import { u as J } from "./index-Dg7MK40D.js";
6
6
  const K = { class: "epic-component-view flex flex-col" }, O = { class: "epic-search-box px-10px py-6px" }, Q = { class: "flex flex-1 overflow-auto" }, R = { class: "epic-tabs-box" }, W = ["title", "onClick"], X = { class: "h-full flex-1 overflow-auto py-2 box-border" }, Y = ["onClick"], Z = { class: "epic-componet-label flex-1 w-0 truncate" }, se = /* @__PURE__ */ E({
7
7
  __name: "index",
8
8
  setup(ee) {
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as U, inject as L, openBlock as p, createElementBlock as g, Fragment as A, renderList as T, createElementVNode as i, toDisplayString as O, createVNode as C, unref as _, withCtx as R, createCommentVNode as G, createTextVNode as J, ref as E, computed as S, withDirectives as F, normalizeClass as j, vShow as P, reactive as H, createBlock as K, nextTick as Q, toRaw as z, watch as W } from "vue";
2
- import { o as q, p as w, g as X, a as Y } from "./axios-BFVeUxau.js";
2
+ import { o as q, p as w, g as X, a as Y } from "./axios-Bb3STC1u.js";
3
3
  import { _ as D } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
4
4
  import { d as Z } from "./vuedraggable.umd-D2S7Eo7p.js";
5
- import { _ as ee } from "./tree.vue_vue_type_script_setup_true_lang-RWHCYpkY.js";
6
- import { _ as te } from "./index-CIwV58Ko.js";
5
+ import { _ as ee } from "./tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js";
6
+ import { _ as te } from "./index-BULuVnVl.js";
7
7
  const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-event-btn text-lg flex items-center text-$epic-text-secondary" }, ae = { class: "epic-action-editor-main" }, se = { class: "epic-editor-item rounded" }, ie = { class: "w-36px flex items-center text-lg" }, ce = { class: "flex-1" }, de = { key: 0 }, ue = { key: 1 }, re = { key: 2 }, pe = { class: "epic-action-box text-lg text-$epic-text-medium" }, me = ["onClick"], ve = ["onClick"], fe = /* @__PURE__ */ U({
8
8
  __name: "EActionEditorItem",
9
9
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./axios-BAhOY32t.cjs"),u=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),v={class:"flex relative"},d={class:"epic-action-bar"},_={class:"epic-actions-container"},p=["title","onClick"],m={class:"text-14px"},f={class:"epic-sidebar-container"},k=e.defineComponent({name:"EActivityBar",__name:"index",setup(h){const i=e.computed(()=>r.pluginManager.viewsContainers.activitybars.value.filter(n=>n.visible)),t=e.ref(0),c=e.shallowRef(null);c.value=i.value[0].component;function s(n,a){if(t.value===a)return t.value=null,!1;c.value=n.component,t.value=a}return(n,a)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",d,[e.createElementVNode("ul",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,o)=>(e.openBlock(),e.createElementBlock("li",{key:o,class:e.normalizeClass(["epic-action-item",{checked:t.value===o}]),title:l.title,onClick:y=>s(l,o)},[e.createVNode(e.unref(u._sfc_main),{class:"relative",name:l.icon},null,8,["name"]),e.createElementVNode("div",m,e.toDisplayString(l.title),1)],10,p))),128))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-left-sidebar",{hide:t.value===null}])},[e.createElementVNode("div",f,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value)))])],2)]))}});exports.default=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./axios-B8aFvCWj.cjs"),u=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),v={class:"flex relative"},d={class:"epic-action-bar"},_={class:"epic-actions-container"},p=["title","onClick"],m={class:"text-14px"},f={class:"epic-sidebar-container"},k=e.defineComponent({name:"EActivityBar",__name:"index",setup(h){const i=e.computed(()=>r.pluginManager.viewsContainers.activitybars.value.filter(n=>n.visible)),t=e.ref(0),c=e.shallowRef(null);c.value=i.value[0].component;function s(n,a){if(t.value===a)return t.value=null,!1;c.value=n.component,t.value=a}return(n,a)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",d,[e.createElementVNode("ul",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,o)=>(e.openBlock(),e.createElementBlock("li",{key:o,class:e.normalizeClass(["epic-action-item",{checked:t.value===o}]),title:l.title,onClick:y=>s(l,o)},[e.createVNode(e.unref(u._sfc_main),{class:"relative",name:l.icon},null,8,["name"]),e.createElementVNode("div",m,e.toDisplayString(l.title),1)],10,p))),128))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-left-sidebar",{hide:t.value===null}])},[e.createElementVNode("div",f,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value)))])],2)]))}});exports.default=k;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as g, computed as k, openBlock as a, createElementBlock as l, Fragment as y, renderList as C, createVNode as r, unref as s, createElementVNode as c, createCommentVNode as U, toDisplayString as P } from "vue";
2
- import { p as b, g as E } from "./axios-BFVeUxau.js";
2
+ import { p as b, g as E } from "./axios-Bb3STC1u.js";
3
3
  import { _ as N } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
4
- import { u as x } from "./index-DO5DuUPL.js";
4
+ import { u as x } from "./index-Dg7MK40D.js";
5
5
  const D = {
6
6
  key: 0,
7
7
  class: "epic-del-btn"