ss-component-new 1.1.85 → 1.1.87

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 (39) hide show
  1. package/dist/{array-D2zrIzej.js → array-C8gxudwq.js} +2 -2
  2. package/dist/{array-D8U2pGTC.cjs → array-q8pUBU30.cjs} +1 -1
  3. package/dist/{cloneDeep-8zu2YtRV.cjs → cloneDeep-B3VC5L8Z.cjs} +1 -1
  4. package/dist/{cloneDeep-DuEirD61.js → cloneDeep-BpK0E_ef.js} +1 -1
  5. package/dist/{index-CdiwcgWn.cjs → index-B-jDNH2e.cjs} +1 -1
  6. package/dist/index-B7LUAJqu.cjs +1 -0
  7. package/dist/{index-Bk6z8NoT.cjs → index-BLoamlbm.cjs} +1 -1
  8. package/dist/{index-CPAniSJJ.cjs → index-BW-bmuq0.cjs} +1 -1
  9. package/dist/{index-DADq4uib.cjs → index-C6UYDisz.cjs} +1 -1
  10. package/dist/{index-DzijCTQM.js → index-CQuV8YFa.js} +2 -2
  11. package/dist/{index-DORpNeEv.js → index-CQvBB7B8.js} +1 -1
  12. package/dist/{index-CefBKPRE.cjs → index-CdxjVh-X.cjs} +1 -1
  13. package/dist/{index-By9M6a6K.cjs → index-DZAs9vSe.cjs} +1 -1
  14. package/dist/{index-D0BrZauT.js → index-Dakgk1fr.js} +2 -2
  15. package/dist/index-Dc21Fkf9.js +345 -0
  16. package/dist/{index-3JVabNmb.js → index-DtoLslf_.js} +1 -1
  17. package/dist/{index-Dk3AafH9.js → index-gsysGhDn.js} +1 -1
  18. package/dist/{index-BviuenkT.js → index-iaj5xJUJ.js} +3 -3
  19. package/dist/index-nChhWjuh.js +43 -0
  20. package/dist/index-wRmYoZQa.cjs +1 -0
  21. package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-Ce-Paygw.js +618 -0
  22. package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-CwZAxgWm.cjs +7 -0
  23. package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-sXEqRck_.js → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B67eMpk2.js} +2 -2
  24. package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CoTrTiyZ.cjs → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CL3yi2CW.cjs} +1 -1
  25. package/dist/{main-BJ49BQ83.js → main-BIsSHE8k.js} +3 -3
  26. package/dist/{main-BrFLjXjC.cjs → main-C_3s_51_.cjs} +1 -1
  27. package/dist/{ss-component.cjs.js → ss-component.cjs} +1 -1
  28. package/dist/{ss-component-new.css → ss-component.css} +1 -1
  29. package/dist/{ss-component.es.js → ss-component.js} +6 -6
  30. package/dist/ss-component2.cjs +1 -0
  31. package/dist/{router.es.js → ss-component2.js} +1 -1
  32. package/package.json +1 -1
  33. package/dist/index-BK00mV7O.js +0 -37
  34. package/dist/index-DK-C6XIG.js +0 -351
  35. package/dist/index-P-XWFKEv.cjs +0 -1
  36. package/dist/index-bTbhSpJ8.cjs +0 -1
  37. package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-BufoMCSS.cjs +0 -4
  38. package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-CSfAQ28_.js +0 -254
  39. package/dist/router.cjs.js +0 -1
@@ -5943,12 +5943,12 @@ const z9 = z4(F, "$notify"), M9 = [
5943
5943
  {
5944
5944
  path: "/login",
5945
5945
  name: "Login",
5946
- component: async () => import("./index-DORpNeEv.js")
5946
+ component: async () => import("./index-CQvBB7B8.js")
5947
5947
  },
5948
5948
  {
5949
5949
  path: "/model",
5950
5950
  name: "Model",
5951
- component: async () => import("./index-DK-C6XIG.js")
5951
+ component: async () => import("./index-Dc21Fkf9.js")
5952
5952
  // component: async ()=>import('@/components/views/model/component/main.vue'),
5953
5953
  // component: async ()=>import('@/components/views/canvas/index.vue'),
5954
5954
  // component: async ()=>import('@/components/views/test/index.vue'),
@@ -1,7 +1,7 @@
1
1
  import { createElementBlock as d, openBlock as D, createElementVNode as E, renderSlot as R, defineComponent as Y, ref as t, resolveComponent as e, createVNode as C, withCtx as I, reactive as K, watch as M, unref as U, toDisplayString as S, createTextVNode as l } from "vue";
2
2
  /* empty css */
3
3
  import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import { u as L, l as m } from "./index-DzijCTQM.js";
4
+ import { u as L, l as m } from "./index-CQuV8YFa.js";
5
5
  import { useRouter as O } from "vue-router";
6
6
  const H = {}, P = { class: "header-wrapper" }, v = { class: "header-horizontal" }, j = { class: "header-logo" }, h = { class: "header-cTitle" }, r = { class: "header-horizontal" }, G = { class: "header-eTitle" };
7
7
  function b(Q, s) {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const or=require("vue"),Ab=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ji=require("./cloneDeep-8zu2YtRV.cjs");/*! *****************************************************************************
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const or=require("vue"),Ab=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ji=require("./cloneDeep-B3VC5L8Z.cjs");/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,4 +1,4 @@
1
- "use strict";const n=require("vue"),B=require("./index-DADq4uib.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ft=require("./cloneDeep-8zu2YtRV.cjs"),dn=require("./index-sjmLPf8w.cjs"),fn=r=>r,pn=B.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:B.definePropType([String,Object,Array])},offset:{type:B.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),hn=n.defineComponent({name:"ElBadge"}),mn=n.defineComponent({...hn,props:pn,setup(r,{expose:t}){const e=r,o=B.useNamespace("badge"),a=n.computed(()=>e.isDot?"":B.isNumber(e.value)&&B.isNumber(e.max)?e.max<e.value?`${e.max}+`:`${e.value}`:`${e.value}`),l=n.computed(()=>{var i,s,u,c,f;return[{backgroundColor:e.color,marginRight:B.addUnit(-((s=(i=e.offset)==null?void 0:i[0])!=null?s:0)),marginTop:B.addUnit((c=(u=e.offset)==null?void 0:u[1])!=null?c:0)},(f=e.badgeStyle)!=null?f:{}]});return t({content:a}),(i,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(n.unref(o).b())},[n.renderSlot(i.$slots,"default"),n.createVNode(n.Transition,{name:`${n.unref(o).namespace.value}-zoom-in-center`,persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("sup",{class:n.normalizeClass([n.unref(o).e("content"),n.unref(o).em("content",i.type),n.unref(o).is("fixed",!!i.$slots.default),n.unref(o).is("dot",i.isDot),n.unref(o).is("hide-zero",!i.showZero&&e.value===0),i.badgeClass]),style:n.normalizeStyle(n.unref(l))},[n.renderSlot(i.$slots,"content",{value:n.unref(a)},()=>[n.createTextVNode(n.toDisplayString(n.unref(a)),1)])],6),[[n.vShow,!i.hidden&&(n.unref(a)||i.isDot||i.$slots.content)]])]),_:3},8,["name"])],2))}});var gn=B._export_sfc(mn,[["__file","badge.vue"]]);const vn=B.withInstall(gn);function yn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var tt={exports:{}},bn=tt.exports,Vt;function wn(){return Vt||(Vt=1,function(r,t){(function(e,o){r.exports=o()})(bn,function(){var e=1e3,o=6e4,a=36e5,l="millisecond",i="second",s="minute",u="hour",c="day",f="week",d="month",y="quarter",_="year",h="date",S="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var v=["th","st","nd","rd"],g=C%100;return"["+C+(v[(g-20)%10]||v[g]||v[0])+"]"}},D=function(C,v,g){var k=String(C);return!k||k.length>=v?C:""+Array(v+1-k.length).join(g)+C},z={s:D,z:function(C){var v=-C.utcOffset(),g=Math.abs(v),k=Math.floor(g/60),E=g%60;return(v<=0?"+":"-")+D(k,2,"0")+":"+D(E,2,"0")},m:function C(v,g){if(v.date()<g.date())return-C(g,v);var k=12*(g.year()-v.year())+(g.month()-v.month()),E=v.clone().add(k,d),O=g-E<0,V=v.clone().add(k+(O?-1:1),d);return+(-(k+(g-E)/(O?E-V:V-E))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:d,y:_,w:f,d:c,D:h,h:u,m:s,s:i,ms:l,Q:y}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},L="en",I={};I[L]=F;var w="$isDayjsObject",X=function(C){return C instanceof te||!(!C||!C[w])},b=function C(v,g,k){var E;if(!v)return L;if(typeof v=="string"){var O=v.toLowerCase();I[O]&&(E=O),g&&(I[O]=g,E=O);var V=v.split("-");if(!E&&V.length>1)return C(V[0])}else{var Y=v.name;I[Y]=v,E=Y}return!k&&E&&(L=E),E||!k&&L},A=function(C,v){if(X(C))return C.clone();var g=typeof v=="object"?v:{};return g.date=C,g.args=arguments,new te(g)},T=z;T.l=b,T.i=X,T.w=function(C,v){return A(C,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var te=function(){function C(g){this.$L=b(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[w]=!0}var v=C.prototype;return v.parse=function(g){this.$d=function(k){var E=k.date,O=k.utc;if(E===null)return new Date(NaN);if(T.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var V=E.match(p);if(V){var Y=V[2]-1||0,W=(V[7]||"0").substring(0,3);return O?new Date(Date.UTC(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,W)):new Date(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,W)}}return new Date(E)}(g),this.init()},v.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},v.$utils=function(){return T},v.isValid=function(){return this.$d.toString()!==S},v.isSame=function(g,k){var E=A(g);return this.startOf(k)<=E&&E<=this.endOf(k)},v.isAfter=function(g,k){return A(g)<this.startOf(k)},v.isBefore=function(g,k){return this.endOf(k)<A(g)},v.$g=function(g,k,E){return T.u(g)?this[k]:this.set(E,g)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(g,k){var E=this,O=!!T.u(k)||k,V=T.p(g),Y=function(ke,re){var we=T.w(E.$u?Date.UTC(E.$y,re,ke):new Date(E.$y,re,ke),E);return O?we:we.endOf(c)},W=function(ke,re){return T.w(E.toDate()[ke].apply(E.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(re)),E)},J=this.$W,Q=this.$M,ue=this.$D,$e="set"+(this.$u?"UTC":"");switch(V){case _:return O?Y(1,0):Y(31,11);case d:return O?Y(1,Q):Y(0,Q+1);case f:var Se=this.$locale().weekStart||0,Re=(J<Se?J+7:J)-Se;return Y(O?ue-Re:ue+(6-Re),Q);case c:case h:return W($e+"Hours",0);case u:return W($e+"Minutes",1);case s:return W($e+"Seconds",2);case i:return W($e+"Milliseconds",3);default:return this.clone()}},v.endOf=function(g){return this.startOf(g,!1)},v.$set=function(g,k){var E,O=T.p(g),V="set"+(this.$u?"UTC":""),Y=(E={},E[c]=V+"Date",E[h]=V+"Date",E[d]=V+"Month",E[_]=V+"FullYear",E[u]=V+"Hours",E[s]=V+"Minutes",E[i]=V+"Seconds",E[l]=V+"Milliseconds",E)[O],W=O===c?this.$D+(k-this.$W):k;if(O===d||O===_){var J=this.clone().set(h,1);J.$d[Y](W),J.init(),this.$d=J.set(h,Math.min(this.$D,J.daysInMonth())).$d}else Y&&this.$d[Y](W);return this.init(),this},v.set=function(g,k){return this.clone().$set(g,k)},v.get=function(g){return this[T.p(g)]()},v.add=function(g,k){var E,O=this;g=Number(g);var V=T.p(k),Y=function(Q){var ue=A(O);return T.w(ue.date(ue.date()+Math.round(Q*g)),O)};if(V===d)return this.set(d,this.$M+g);if(V===_)return this.set(_,this.$y+g);if(V===c)return Y(1);if(V===f)return Y(7);var W=(E={},E[s]=o,E[u]=a,E[i]=e,E)[V]||1,J=this.$d.getTime()+g*W;return T.w(J,this)},v.subtract=function(g,k){return this.add(-1*g,k)},v.format=function(g){var k=this,E=this.$locale();if(!this.isValid())return E.invalidDate||S;var O=g||"YYYY-MM-DDTHH:mm:ssZ",V=T.z(this),Y=this.$H,W=this.$m,J=this.$M,Q=E.weekdays,ue=E.months,$e=E.meridiem,Se=function(re,we,Fe,Ze){return re&&(re[we]||re(k,O))||Fe[we].slice(0,Ze)},Re=function(re){return T.s(Y%12||12,re,"0")},ke=$e||function(re,we,Fe){var Ze=re<12?"AM":"PM";return Fe?Ze.toLowerCase():Ze};return O.replace(M,function(re,we){return we||function(Fe){switch(Fe){case"YY":return String(k.$y).slice(-2);case"YYYY":return T.s(k.$y,4,"0");case"M":return J+1;case"MM":return T.s(J+1,2,"0");case"MMM":return Se(E.monthsShort,J,ue,3);case"MMMM":return Se(ue,J);case"D":return k.$D;case"DD":return T.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return Se(E.weekdaysMin,k.$W,Q,2);case"ddd":return Se(E.weekdaysShort,k.$W,Q,3);case"dddd":return Q[k.$W];case"H":return String(Y);case"HH":return T.s(Y,2,"0");case"h":return Re(1);case"hh":return Re(2);case"a":return ke(Y,W,!0);case"A":return ke(Y,W,!1);case"m":return String(W);case"mm":return T.s(W,2,"0");case"s":return String(k.$s);case"ss":return T.s(k.$s,2,"0");case"SSS":return T.s(k.$ms,3,"0");case"Z":return V}return null}(re)||V.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(g,k,E){var O,V=this,Y=T.p(k),W=A(g),J=(W.utcOffset()-this.utcOffset())*o,Q=this-W,ue=function(){return T.m(V,W)};switch(Y){case _:O=ue()/12;break;case d:O=ue();break;case y:O=ue()/3;break;case f:O=(Q-J)/6048e5;break;case c:O=(Q-J)/864e5;break;case u:O=Q/a;break;case s:O=Q/o;break;case i:O=Q/e;break;default:O=Q}return E?O:T.a(O)},v.daysInMonth=function(){return this.endOf(d).$D},v.$locale=function(){return I[this.$L]},v.locale=function(g,k){if(!g)return this.$L;var E=this.clone(),O=b(g,k,!0);return O&&(E.$L=O),E},v.clone=function(){return T.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},C}(),Z=te.prototype;return A.prototype=Z,[["$ms",l],["$s",i],["$m",s],["$H",u],["$W",c],["$M",d],["$y",_],["$D",h]].forEach(function(C){Z[C[1]]=function(v){return this.$g(v,C[0],C[1])}}),A.extend=function(C,v){return C.$i||(C(v,te,A),C.$i=!0),A},A.locale=b,A.isDayjs=X,A.unix=function(C){return A(1e3*C)},A.en=I[L],A.Ls=I,A.p={},A})}(tt)),tt.exports}var _n=wn();const Wt=yn(_n),En=B.buildProps({a11y:{type:Boolean,default:!0},locale:{type:B.definePropType(Object)},size:B.useSizeProp,button:{type:B.definePropType(Object)},experimentalFeatures:{type:B.definePropType(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:B.definePropType(Object)},zIndex:Number,namespace:{type:String,default:"el"},...B.useEmptyValuesProps}),fe={};n.defineComponent({name:"ElConfigProvider",props:En,setup(r,{slots:t}){n.watch(()=>r.message,o=>{Object.assign(fe,o??{})},{immediate:!0,deep:!0});const e=B.provideGlobalConfig(r);return()=>n.renderSlot(t,"default",{config:e==null?void 0:e.value})}});const jt=["success","info","warning","error"],ne=fn({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:B.isClient?document.body:void 0}),Cn=B.buildProps({customClass:{type:String,default:ne.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ne.dangerouslyUseHTMLString},duration:{type:Number,default:ne.duration},icon:{type:B.iconPropType,default:ne.icon},id:{type:String,default:ne.id},message:{type:B.definePropType([String,Object,Function]),default:ne.message},onClose:{type:B.definePropType(Function),default:ne.onClose},showClose:{type:Boolean,default:ne.showClose},type:{type:String,values:jt,default:ne.type},plain:{type:Boolean,default:ne.plain},offset:{type:Number,default:ne.offset},zIndex:{type:Number,default:ne.zIndex},grouping:{type:Boolean,default:ne.grouping},repeatNum:{type:Number,default:ne.repeatNum}}),Sn={destroy:()=>!0},he=n.shallowReactive([]),kn=r=>{const t=he.findIndex(a=>a.id===r),e=he[t];let o;return t>0&&(o=he[t-1]),{current:e,prev:o}},Dn=r=>{const{prev:t}=kn(r);return t?t.vm.exposed.bottom.value:0},Bn=(r,t)=>he.findIndex(o=>o.id===r)>0?16:t,xn=n.defineComponent({name:"ElMessage"}),Tn=n.defineComponent({...xn,props:Cn,emits:Sn,setup(r,{expose:t,emit:e}){const o=r,{Close:a}=B.TypeComponents,l=n.ref(!1),{ns:i,zIndex:s}=B.useGlobalComponentSettings("message"),{currentZIndex:u,nextZIndex:c}=s,f=n.ref(),d=n.ref(!1),y=n.ref(0);let _;const h=n.computed(()=>o.type?o.type==="error"?"danger":o.type:"info"),S=n.computed(()=>{const b=o.type;return{[i.bm("icon",b)]:b&&B.TypeComponentsMap[b]}}),p=n.computed(()=>o.icon||B.TypeComponentsMap[o.type]||""),M=n.computed(()=>Dn(o.id)),F=n.computed(()=>Bn(o.id,o.offset)+M.value),D=n.computed(()=>y.value+F.value),z=n.computed(()=>({top:`${F.value}px`,zIndex:u.value}));function L(){o.duration!==0&&({stop:_}=B.useTimeoutFn(()=>{w()},o.duration))}function I(){_==null||_()}function w(){d.value=!1,n.nextTick(()=>{var b;l.value||((b=o.onClose)==null||b.call(o),e("destroy"))})}function X({code:b}){b===B.EVENT_CODE.esc&&w()}return n.onMounted(()=>{L(),c(),d.value=!0}),n.watch(()=>o.repeatNum,()=>{I(),L()}),B.useEventListener(document,"keydown",X),B.useResizeObserver(f,()=>{y.value=f.value.getBoundingClientRect().height}),t({visible:d,bottom:D,close:w}),(b,A)=>(n.openBlock(),n.createBlock(n.Transition,{name:n.unref(i).b("fade"),onBeforeEnter:T=>l.value=!0,onBeforeLeave:b.onClose,onAfterLeave:T=>b.$emit("destroy"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{id:b.id,ref_key:"messageRef",ref:f,class:n.normalizeClass([n.unref(i).b(),{[n.unref(i).m(b.type)]:b.type},n.unref(i).is("closable",b.showClose),n.unref(i).is("plain",b.plain),b.customClass]),style:n.normalizeStyle(n.unref(z)),role:"alert",onMouseenter:I,onMouseleave:L},[b.repeatNum>1?(n.openBlock(),n.createBlock(n.unref(vn),{key:0,value:b.repeatNum,type:n.unref(h),class:n.normalizeClass(n.unref(i).e("badge"))},null,8,["value","type","class"])):n.createCommentVNode("v-if",!0),n.unref(p)?(n.openBlock(),n.createBlock(n.unref(B.ElIcon),{key:1,class:n.normalizeClass([n.unref(i).e("icon"),n.unref(S)])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(p))))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.renderSlot(b.$slots,"default",{},()=>[b.dangerouslyUseHTMLString?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),n.createElementVNode("p",{class:n.normalizeClass(n.unref(i).e("content")),innerHTML:b.message},null,10,["innerHTML"])],2112)):(n.openBlock(),n.createElementBlock("p",{key:0,class:n.normalizeClass(n.unref(i).e("content"))},n.toDisplayString(b.message),3))]),b.showClose?(n.openBlock(),n.createBlock(n.unref(B.ElIcon),{key:2,class:n.normalizeClass(n.unref(i).e("closeBtn")),onClick:n.withModifiers(w,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(a))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],46,["id"]),[[n.vShow,d.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var $n=B._export_sfc(Tn,[["__file","message.vue"]]);let Nn=1;const Ut=r=>{const t=!r||B.isString(r)||n.isVNode(r)||B.isFunction(r)?{message:r}:r,e={...ne,...t};if(!e.appendTo)e.appendTo=document.body;else if(B.isString(e.appendTo)){let o=document.querySelector(e.appendTo);B.isElement(o)||(B.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),o=document.body),e.appendTo=o}return B.isBoolean(fe.grouping)&&!e.grouping&&(e.grouping=fe.grouping),B.isNumber(fe.duration)&&e.duration===3e3&&(e.duration=fe.duration),B.isNumber(fe.offset)&&e.offset===16&&(e.offset=fe.offset),B.isBoolean(fe.showClose)&&!e.showClose&&(e.showClose=fe.showClose),e},On=r=>{const t=he.indexOf(r);if(t===-1)return;he.splice(t,1);const{handler:e}=r;e.close()},Mn=({appendTo:r,...t},e)=>{const o=`message_${Nn++}`,a=t.onClose,l=document.createElement("div"),i={...t,id:o,onClose:()=>{a==null||a(),On(f)},onDestroy:()=>{n.render(null,l)}},s=n.createVNode($n,i,B.isFunction(i.message)||n.isVNode(i.message)?{default:B.isFunction(i.message)?i.message:()=>i.message}:null);s.appContext=e||Ae._context,n.render(s,l),r.appendChild(l.firstElementChild);const u=s.component,f={id:o,vnode:s,vm:u,handler:{close:()=>{u.exposed.close()}},props:s.component.props};return f},Ae=(r={},t)=>{if(!B.isClient)return{close:()=>{}};const e=Ut(r);if(e.grouping&&he.length){const a=he.find(({vnode:l})=>{var i;return((i=l.props)==null?void 0:i.message)===e.message});if(a)return a.props.repeatNum+=1,a.props.type=e.type,a.handler}if(B.isNumber(fe.max)&&he.length>=fe.max)return{close:()=>{}};const o=Mn(e,t);return he.push(o),o.handler};jt.forEach(r=>{Ae[r]=(t={},e)=>{const o=Ut(t);return Ae({...o,type:r},e)}});function Vn(r){const t=[...he];for(const e of t)(!r||r===e.props.type)&&e.handler.close()}Ae.closeAll=Vn;Ae._context=null;const Bt=B.withInstallFunction(Ae,"$message");/**!
1
+ "use strict";const n=require("vue"),B=require("./index-C6UYDisz.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ft=require("./cloneDeep-B3VC5L8Z.cjs"),dn=require("./index-sjmLPf8w.cjs"),fn=r=>r,pn=B.buildProps({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:B.definePropType([String,Object,Array])},offset:{type:B.definePropType(Array),default:[0,0]},badgeClass:{type:String}}),hn=n.defineComponent({name:"ElBadge"}),mn=n.defineComponent({...hn,props:pn,setup(r,{expose:t}){const e=r,o=B.useNamespace("badge"),a=n.computed(()=>e.isDot?"":B.isNumber(e.value)&&B.isNumber(e.max)?e.max<e.value?`${e.max}+`:`${e.value}`:`${e.value}`),l=n.computed(()=>{var i,s,u,c,f;return[{backgroundColor:e.color,marginRight:B.addUnit(-((s=(i=e.offset)==null?void 0:i[0])!=null?s:0)),marginTop:B.addUnit((c=(u=e.offset)==null?void 0:u[1])!=null?c:0)},(f=e.badgeStyle)!=null?f:{}]});return t({content:a}),(i,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(n.unref(o).b())},[n.renderSlot(i.$slots,"default"),n.createVNode(n.Transition,{name:`${n.unref(o).namespace.value}-zoom-in-center`,persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("sup",{class:n.normalizeClass([n.unref(o).e("content"),n.unref(o).em("content",i.type),n.unref(o).is("fixed",!!i.$slots.default),n.unref(o).is("dot",i.isDot),n.unref(o).is("hide-zero",!i.showZero&&e.value===0),i.badgeClass]),style:n.normalizeStyle(n.unref(l))},[n.renderSlot(i.$slots,"content",{value:n.unref(a)},()=>[n.createTextVNode(n.toDisplayString(n.unref(a)),1)])],6),[[n.vShow,!i.hidden&&(n.unref(a)||i.isDot||i.$slots.content)]])]),_:3},8,["name"])],2))}});var gn=B._export_sfc(mn,[["__file","badge.vue"]]);const vn=B.withInstall(gn);function yn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var tt={exports:{}},bn=tt.exports,Vt;function wn(){return Vt||(Vt=1,function(r,t){(function(e,o){r.exports=o()})(bn,function(){var e=1e3,o=6e4,a=36e5,l="millisecond",i="second",s="minute",u="hour",c="day",f="week",d="month",y="quarter",_="year",h="date",S="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var v=["th","st","nd","rd"],g=C%100;return"["+C+(v[(g-20)%10]||v[g]||v[0])+"]"}},D=function(C,v,g){var k=String(C);return!k||k.length>=v?C:""+Array(v+1-k.length).join(g)+C},z={s:D,z:function(C){var v=-C.utcOffset(),g=Math.abs(v),k=Math.floor(g/60),E=g%60;return(v<=0?"+":"-")+D(k,2,"0")+":"+D(E,2,"0")},m:function C(v,g){if(v.date()<g.date())return-C(g,v);var k=12*(g.year()-v.year())+(g.month()-v.month()),E=v.clone().add(k,d),O=g-E<0,V=v.clone().add(k+(O?-1:1),d);return+(-(k+(g-E)/(O?E-V:V-E))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:d,y:_,w:f,d:c,D:h,h:u,m:s,s:i,ms:l,Q:y}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},L="en",I={};I[L]=F;var w="$isDayjsObject",X=function(C){return C instanceof te||!(!C||!C[w])},b=function C(v,g,k){var E;if(!v)return L;if(typeof v=="string"){var O=v.toLowerCase();I[O]&&(E=O),g&&(I[O]=g,E=O);var V=v.split("-");if(!E&&V.length>1)return C(V[0])}else{var Y=v.name;I[Y]=v,E=Y}return!k&&E&&(L=E),E||!k&&L},A=function(C,v){if(X(C))return C.clone();var g=typeof v=="object"?v:{};return g.date=C,g.args=arguments,new te(g)},T=z;T.l=b,T.i=X,T.w=function(C,v){return A(C,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var te=function(){function C(g){this.$L=b(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[w]=!0}var v=C.prototype;return v.parse=function(g){this.$d=function(k){var E=k.date,O=k.utc;if(E===null)return new Date(NaN);if(T.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var V=E.match(p);if(V){var Y=V[2]-1||0,W=(V[7]||"0").substring(0,3);return O?new Date(Date.UTC(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,W)):new Date(V[1],Y,V[3]||1,V[4]||0,V[5]||0,V[6]||0,W)}}return new Date(E)}(g),this.init()},v.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},v.$utils=function(){return T},v.isValid=function(){return this.$d.toString()!==S},v.isSame=function(g,k){var E=A(g);return this.startOf(k)<=E&&E<=this.endOf(k)},v.isAfter=function(g,k){return A(g)<this.startOf(k)},v.isBefore=function(g,k){return this.endOf(k)<A(g)},v.$g=function(g,k,E){return T.u(g)?this[k]:this.set(E,g)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(g,k){var E=this,O=!!T.u(k)||k,V=T.p(g),Y=function(ke,re){var we=T.w(E.$u?Date.UTC(E.$y,re,ke):new Date(E.$y,re,ke),E);return O?we:we.endOf(c)},W=function(ke,re){return T.w(E.toDate()[ke].apply(E.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(re)),E)},J=this.$W,Q=this.$M,ue=this.$D,$e="set"+(this.$u?"UTC":"");switch(V){case _:return O?Y(1,0):Y(31,11);case d:return O?Y(1,Q):Y(0,Q+1);case f:var Se=this.$locale().weekStart||0,Re=(J<Se?J+7:J)-Se;return Y(O?ue-Re:ue+(6-Re),Q);case c:case h:return W($e+"Hours",0);case u:return W($e+"Minutes",1);case s:return W($e+"Seconds",2);case i:return W($e+"Milliseconds",3);default:return this.clone()}},v.endOf=function(g){return this.startOf(g,!1)},v.$set=function(g,k){var E,O=T.p(g),V="set"+(this.$u?"UTC":""),Y=(E={},E[c]=V+"Date",E[h]=V+"Date",E[d]=V+"Month",E[_]=V+"FullYear",E[u]=V+"Hours",E[s]=V+"Minutes",E[i]=V+"Seconds",E[l]=V+"Milliseconds",E)[O],W=O===c?this.$D+(k-this.$W):k;if(O===d||O===_){var J=this.clone().set(h,1);J.$d[Y](W),J.init(),this.$d=J.set(h,Math.min(this.$D,J.daysInMonth())).$d}else Y&&this.$d[Y](W);return this.init(),this},v.set=function(g,k){return this.clone().$set(g,k)},v.get=function(g){return this[T.p(g)]()},v.add=function(g,k){var E,O=this;g=Number(g);var V=T.p(k),Y=function(Q){var ue=A(O);return T.w(ue.date(ue.date()+Math.round(Q*g)),O)};if(V===d)return this.set(d,this.$M+g);if(V===_)return this.set(_,this.$y+g);if(V===c)return Y(1);if(V===f)return Y(7);var W=(E={},E[s]=o,E[u]=a,E[i]=e,E)[V]||1,J=this.$d.getTime()+g*W;return T.w(J,this)},v.subtract=function(g,k){return this.add(-1*g,k)},v.format=function(g){var k=this,E=this.$locale();if(!this.isValid())return E.invalidDate||S;var O=g||"YYYY-MM-DDTHH:mm:ssZ",V=T.z(this),Y=this.$H,W=this.$m,J=this.$M,Q=E.weekdays,ue=E.months,$e=E.meridiem,Se=function(re,we,Fe,Ze){return re&&(re[we]||re(k,O))||Fe[we].slice(0,Ze)},Re=function(re){return T.s(Y%12||12,re,"0")},ke=$e||function(re,we,Fe){var Ze=re<12?"AM":"PM";return Fe?Ze.toLowerCase():Ze};return O.replace(M,function(re,we){return we||function(Fe){switch(Fe){case"YY":return String(k.$y).slice(-2);case"YYYY":return T.s(k.$y,4,"0");case"M":return J+1;case"MM":return T.s(J+1,2,"0");case"MMM":return Se(E.monthsShort,J,ue,3);case"MMMM":return Se(ue,J);case"D":return k.$D;case"DD":return T.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return Se(E.weekdaysMin,k.$W,Q,2);case"ddd":return Se(E.weekdaysShort,k.$W,Q,3);case"dddd":return Q[k.$W];case"H":return String(Y);case"HH":return T.s(Y,2,"0");case"h":return Re(1);case"hh":return Re(2);case"a":return ke(Y,W,!0);case"A":return ke(Y,W,!1);case"m":return String(W);case"mm":return T.s(W,2,"0");case"s":return String(k.$s);case"ss":return T.s(k.$s,2,"0");case"SSS":return T.s(k.$ms,3,"0");case"Z":return V}return null}(re)||V.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(g,k,E){var O,V=this,Y=T.p(k),W=A(g),J=(W.utcOffset()-this.utcOffset())*o,Q=this-W,ue=function(){return T.m(V,W)};switch(Y){case _:O=ue()/12;break;case d:O=ue();break;case y:O=ue()/3;break;case f:O=(Q-J)/6048e5;break;case c:O=(Q-J)/864e5;break;case u:O=Q/a;break;case s:O=Q/o;break;case i:O=Q/e;break;default:O=Q}return E?O:T.a(O)},v.daysInMonth=function(){return this.endOf(d).$D},v.$locale=function(){return I[this.$L]},v.locale=function(g,k){if(!g)return this.$L;var E=this.clone(),O=b(g,k,!0);return O&&(E.$L=O),E},v.clone=function(){return T.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},C}(),Z=te.prototype;return A.prototype=Z,[["$ms",l],["$s",i],["$m",s],["$H",u],["$W",c],["$M",d],["$y",_],["$D",h]].forEach(function(C){Z[C[1]]=function(v){return this.$g(v,C[0],C[1])}}),A.extend=function(C,v){return C.$i||(C(v,te,A),C.$i=!0),A},A.locale=b,A.isDayjs=X,A.unix=function(C){return A(1e3*C)},A.en=I[L],A.Ls=I,A.p={},A})}(tt)),tt.exports}var _n=wn();const Wt=yn(_n),En=B.buildProps({a11y:{type:Boolean,default:!0},locale:{type:B.definePropType(Object)},size:B.useSizeProp,button:{type:B.definePropType(Object)},experimentalFeatures:{type:B.definePropType(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:B.definePropType(Object)},zIndex:Number,namespace:{type:String,default:"el"},...B.useEmptyValuesProps}),fe={};n.defineComponent({name:"ElConfigProvider",props:En,setup(r,{slots:t}){n.watch(()=>r.message,o=>{Object.assign(fe,o??{})},{immediate:!0,deep:!0});const e=B.provideGlobalConfig(r);return()=>n.renderSlot(t,"default",{config:e==null?void 0:e.value})}});const jt=["success","info","warning","error"],ne=fn({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:B.isClient?document.body:void 0}),Cn=B.buildProps({customClass:{type:String,default:ne.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ne.dangerouslyUseHTMLString},duration:{type:Number,default:ne.duration},icon:{type:B.iconPropType,default:ne.icon},id:{type:String,default:ne.id},message:{type:B.definePropType([String,Object,Function]),default:ne.message},onClose:{type:B.definePropType(Function),default:ne.onClose},showClose:{type:Boolean,default:ne.showClose},type:{type:String,values:jt,default:ne.type},plain:{type:Boolean,default:ne.plain},offset:{type:Number,default:ne.offset},zIndex:{type:Number,default:ne.zIndex},grouping:{type:Boolean,default:ne.grouping},repeatNum:{type:Number,default:ne.repeatNum}}),Sn={destroy:()=>!0},he=n.shallowReactive([]),kn=r=>{const t=he.findIndex(a=>a.id===r),e=he[t];let o;return t>0&&(o=he[t-1]),{current:e,prev:o}},Dn=r=>{const{prev:t}=kn(r);return t?t.vm.exposed.bottom.value:0},Bn=(r,t)=>he.findIndex(o=>o.id===r)>0?16:t,xn=n.defineComponent({name:"ElMessage"}),Tn=n.defineComponent({...xn,props:Cn,emits:Sn,setup(r,{expose:t,emit:e}){const o=r,{Close:a}=B.TypeComponents,l=n.ref(!1),{ns:i,zIndex:s}=B.useGlobalComponentSettings("message"),{currentZIndex:u,nextZIndex:c}=s,f=n.ref(),d=n.ref(!1),y=n.ref(0);let _;const h=n.computed(()=>o.type?o.type==="error"?"danger":o.type:"info"),S=n.computed(()=>{const b=o.type;return{[i.bm("icon",b)]:b&&B.TypeComponentsMap[b]}}),p=n.computed(()=>o.icon||B.TypeComponentsMap[o.type]||""),M=n.computed(()=>Dn(o.id)),F=n.computed(()=>Bn(o.id,o.offset)+M.value),D=n.computed(()=>y.value+F.value),z=n.computed(()=>({top:`${F.value}px`,zIndex:u.value}));function L(){o.duration!==0&&({stop:_}=B.useTimeoutFn(()=>{w()},o.duration))}function I(){_==null||_()}function w(){d.value=!1,n.nextTick(()=>{var b;l.value||((b=o.onClose)==null||b.call(o),e("destroy"))})}function X({code:b}){b===B.EVENT_CODE.esc&&w()}return n.onMounted(()=>{L(),c(),d.value=!0}),n.watch(()=>o.repeatNum,()=>{I(),L()}),B.useEventListener(document,"keydown",X),B.useResizeObserver(f,()=>{y.value=f.value.getBoundingClientRect().height}),t({visible:d,bottom:D,close:w}),(b,A)=>(n.openBlock(),n.createBlock(n.Transition,{name:n.unref(i).b("fade"),onBeforeEnter:T=>l.value=!0,onBeforeLeave:b.onClose,onAfterLeave:T=>b.$emit("destroy"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{id:b.id,ref_key:"messageRef",ref:f,class:n.normalizeClass([n.unref(i).b(),{[n.unref(i).m(b.type)]:b.type},n.unref(i).is("closable",b.showClose),n.unref(i).is("plain",b.plain),b.customClass]),style:n.normalizeStyle(n.unref(z)),role:"alert",onMouseenter:I,onMouseleave:L},[b.repeatNum>1?(n.openBlock(),n.createBlock(n.unref(vn),{key:0,value:b.repeatNum,type:n.unref(h),class:n.normalizeClass(n.unref(i).e("badge"))},null,8,["value","type","class"])):n.createCommentVNode("v-if",!0),n.unref(p)?(n.openBlock(),n.createBlock(n.unref(B.ElIcon),{key:1,class:n.normalizeClass([n.unref(i).e("icon"),n.unref(S)])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(p))))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.renderSlot(b.$slots,"default",{},()=>[b.dangerouslyUseHTMLString?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),n.createElementVNode("p",{class:n.normalizeClass(n.unref(i).e("content")),innerHTML:b.message},null,10,["innerHTML"])],2112)):(n.openBlock(),n.createElementBlock("p",{key:0,class:n.normalizeClass(n.unref(i).e("content"))},n.toDisplayString(b.message),3))]),b.showClose?(n.openBlock(),n.createBlock(n.unref(B.ElIcon),{key:2,class:n.normalizeClass(n.unref(i).e("closeBtn")),onClick:n.withModifiers(w,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(a))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],46,["id"]),[[n.vShow,d.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var $n=B._export_sfc(Tn,[["__file","message.vue"]]);let Nn=1;const Ut=r=>{const t=!r||B.isString(r)||n.isVNode(r)||B.isFunction(r)?{message:r}:r,e={...ne,...t};if(!e.appendTo)e.appendTo=document.body;else if(B.isString(e.appendTo)){let o=document.querySelector(e.appendTo);B.isElement(o)||(B.debugWarn("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),o=document.body),e.appendTo=o}return B.isBoolean(fe.grouping)&&!e.grouping&&(e.grouping=fe.grouping),B.isNumber(fe.duration)&&e.duration===3e3&&(e.duration=fe.duration),B.isNumber(fe.offset)&&e.offset===16&&(e.offset=fe.offset),B.isBoolean(fe.showClose)&&!e.showClose&&(e.showClose=fe.showClose),e},On=r=>{const t=he.indexOf(r);if(t===-1)return;he.splice(t,1);const{handler:e}=r;e.close()},Mn=({appendTo:r,...t},e)=>{const o=`message_${Nn++}`,a=t.onClose,l=document.createElement("div"),i={...t,id:o,onClose:()=>{a==null||a(),On(f)},onDestroy:()=>{n.render(null,l)}},s=n.createVNode($n,i,B.isFunction(i.message)||n.isVNode(i.message)?{default:B.isFunction(i.message)?i.message:()=>i.message}:null);s.appContext=e||Ae._context,n.render(s,l),r.appendChild(l.firstElementChild);const u=s.component,f={id:o,vnode:s,vm:u,handler:{close:()=>{u.exposed.close()}},props:s.component.props};return f},Ae=(r={},t)=>{if(!B.isClient)return{close:()=>{}};const e=Ut(r);if(e.grouping&&he.length){const a=he.find(({vnode:l})=>{var i;return((i=l.props)==null?void 0:i.message)===e.message});if(a)return a.props.repeatNum+=1,a.props.type=e.type,a.handler}if(B.isNumber(fe.max)&&he.length>=fe.max)return{close:()=>{}};const o=Mn(e,t);return he.push(o),o.handler};jt.forEach(r=>{Ae[r]=(t={},e)=>{const o=Ut(t);return Ae({...o,type:r},e)}});function Vn(r){const t=[...he];for(const e of t)(!r||r===e.props.type)&&e.handler.close()}Ae.closeAll=Vn;Ae._context=null;const Bt=B.withInstallFunction(Ae,"$message");/**!
2
2
  * Sortable 1.15.6
3
3
  * @author RubaXa <trash@rubaxa.org>
4
4
  * @author owenm <owen23355@gmail.com>
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as gt, computed as Ie, createElementBlock as N, openBlock as y, normalizeClass as Me, unref as W, renderSlot as ge, createVNode as fe, Transition as wn, withCtx as B, withDirectives as Dn, createElementVNode as ae, normalizeStyle as se, createTextVNode as lt, toDisplayString as he, vShow as En, watch as Se, shallowReactive as Gn, ref as L, onMounted as Nt, createBlock as Y, createCommentVNode as J, resolveDynamicComponent as Qe, Fragment as pe, withModifiers as qn, nextTick as st, isVNode as Sn, render as on, resolveComponent as K, renderList as be, createSlots as Cn, mergeProps as Zn, normalizeProps as Jn, guardReactiveProps as Kn } from "vue";
2
- import { b as Jt, d as Fe, _ as xn, a as Qn, i as pt, c as an, w as eo, e as to, f as no, p as oo, g as Tn, h as ao, j as ro, T as rn, k as io, m as lo, n as ln, o as so, q as uo, s as co, t as sn, v as Ut, x as fo, y as ho, z as un, A as po, B as dn, C as go } from "./index-DzijCTQM.js";
2
+ import { b as Jt, d as Fe, _ as xn, a as Qn, i as pt, c as an, w as eo, e as to, f as no, p as oo, g as Tn, h as ao, j as ro, T as rn, k as io, m as lo, n as ln, o as so, q as uo, s as co, t as sn, v as Ut, x as fo, y as ho, z as un, A as po, B as dn, C as go } from "./index-CQuV8YFa.js";
3
3
  import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import { c as Pt } from "./cloneDeep-DuEirD61.js";
4
+ import { c as Pt } from "./cloneDeep-BpK0E_ef.js";
5
5
  import mo from "./index-DBKxwOZZ.js";
6
6
  const vo = (o) => o, bo = Jt({
7
7
  value: {
@@ -0,0 +1,345 @@
1
+ import { ref as g, onMounted as te, createElementBlock as v, openBlock as m, Fragment as H, renderList as Q, createElementVNode as F, createCommentVNode as M, toDisplayString as R, watch as B, createVNode as O, unref as E, createBlock as W, resolveDynamicComponent as ae } from "vue";
2
+ import { m as ne, a as oe, b as se } from "./index-iaj5xJUJ.js";
3
+ import { p as J, u as le, b as re, i as ce, e as ue, g as ie, a as me } from "./array-C8gxudwq.js";
4
+ import { u as X } from "./modelComp-B3sxj_Kp.js";
5
+ import { u as Z, s as P } from "./menu-BIINB-0Y.js";
6
+ import de from "./index-gsysGhDn.js";
7
+ import { e as z, a as he } from "./index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-Ce-Paygw.js";
8
+ import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ import { c as N } from "./cloneDeep-BpK0E_ef.js";
10
+ const ve = { class: "bread-content" }, fe = ["onClick"], ye = { key: 0 }, ge = {
11
+ __name: "index",
12
+ props: {
13
+ breadArray: {
14
+ type: Array,
15
+ default: () => []
16
+ }
17
+ },
18
+ emits: ["click"],
19
+ setup(w, { emit: T }) {
20
+ const e = w, k = g([]), h = T;
21
+ te(() => {
22
+ k.value = e == null ? void 0 : e.breadArray;
23
+ });
24
+ const f = (_) => {
25
+ h("click", _);
26
+ };
27
+ return (_, p) => (m(), v("div", ve, [
28
+ (m(!0), v(H, null, Q(k.value, (i, y) => (m(), v("div", {
29
+ key: y,
30
+ class: "bread-item"
31
+ }, [
32
+ F("div", {
33
+ class: "bread-title",
34
+ onClick: (x) => f(i)
35
+ }, R(i.value), 9, fe),
36
+ y !== k.value.length - 1 ? (m(), v("div", ye, R("/"))) : M("", !0)
37
+ ]))), 128))
38
+ ]));
39
+ }
40
+ }, _e = /* @__PURE__ */ Y(ge, [["__scopeId", "data-v-d55d3ede"]]);
41
+ function pe(w) {
42
+ var k, h, f, _;
43
+ const T = (h = (k = w[0]) == null ? void 0 : k.compData) == null ? void 0 : h.filter((p) => p.key !== "formContent"), e = (_ = (f = w[0]) == null ? void 0 : f.compData) == null ? void 0 : _.filter((p) => p.key === "formContent");
44
+ console.log("handleFormModel:", T, e, w);
45
+ }
46
+ const Ce = { class: "system-wrap" }, ke = {
47
+ key: 0,
48
+ class: "show-content"
49
+ }, De = {
50
+ key: 0,
51
+ class: "item-menu-content"
52
+ }, Se = {
53
+ key: 0,
54
+ class: "item-view-group"
55
+ }, Ae = {
56
+ __name: "index",
57
+ props: {
58
+ content: String,
59
+ jsonContents: Array
60
+ },
61
+ emits: ["change", "contentChange"],
62
+ setup(w, { emit: T }) {
63
+ const e = w, k = T, h = X(J);
64
+ le(J);
65
+ const f = g(!0), _ = Z(), p = g(!0), { itemData: i } = P(h), y = re(J), { activeMenuPath: x, activeMenuOpenPaths: q, menuTriggerType: ee, menus: U } = P(_), { selectIndex: $, selectTitle: C } = P(y), A = g([]), D = g([]), G = (t) => {
66
+ var o, s, a;
67
+ const n = (o = i.value) == null ? void 0 : o.find((l) => l.name === x.value);
68
+ D.value = (a = (s = n == null ? void 0 : n.compData) == null ? void 0 : s[0]) == null ? void 0 : a.contents, p.value = !0, p.value && (p.value = !1), k("change", {
69
+ wholeValue: A.value,
70
+ editValue: t
71
+ });
72
+ }, K = (t) => {
73
+ var r, c, d;
74
+ const n = N(A.value), o = n == null ? void 0 : n.map((u, S) => (S === (t == null ? void 0 : t.index) && (u.compData = t == null ? void 0 : t.contents), u));
75
+ let s = "";
76
+ (c = (r = N(o)) == null ? void 0 : r.filter((u) => (u == null ? void 0 : u.comp) === "Form")) == null || c.forEach((u) => {
77
+ var S;
78
+ (S = u == null ? void 0 : u.compData) == null || S.forEach((I) => {
79
+ var b;
80
+ (I == null ? void 0 : I.key) === "formContent" && ((b = I == null ? void 0 : I.contents) == null || b.forEach((j) => {
81
+ j.value !== "" && (s = s === "" ? j == null ? void 0 : j.value : s + "-" + (j == null ? void 0 : j.value));
82
+ }));
83
+ });
84
+ });
85
+ let a = C == null ? void 0 : C.value;
86
+ (a == null ? void 0 : a.length) > 0 ? a[0] = { key: "main", value: s } : (Array.isArray(a) || (a = []), a.push({ key: "main", value: s })), y.setSelectTitle(a), f.value = !1, A.value = o;
87
+ const l = (d = i.value) == null ? void 0 : d.map((u, S) => {
88
+ var I;
89
+ return u.name === x.value && (u.compData = (I = u.compData) == null ? void 0 : I.map((b) => ((b == null ? void 0 : b.key) === "groupContents" && (b.contents = A.value), b))), u;
90
+ });
91
+ h.setItemData(l), p.value && (p.value = !1), k("contentChange", {
92
+ wholeContent: i.value
93
+ });
94
+ }, L = (t) => {
95
+ var n, o;
96
+ if ((t == null ? void 0 : t.key) === "main")
97
+ y.setSelectIndex(""), y.setSelectMenu(""), y.setSelectTitle((n = C.value) == null ? void 0 : n[0]);
98
+ else {
99
+ const s = [];
100
+ let a = -1;
101
+ (o = C.value) == null || o.forEach((l, r) => {
102
+ (l == null ? void 0 : l.key) === (t == null ? void 0 : t.key) && (a = r), (a === -1 || a >= r) && s.push(l);
103
+ }), y.setSelectTitle(s), y.setSelectMenu(t == null ? void 0 : t.key);
104
+ }
105
+ };
106
+ B(
107
+ () => i.value,
108
+ () => {
109
+ var n, o, s, a, l, r, c, d;
110
+ if (!i.value || ((n = i.value) == null ? void 0 : n.length) === 0 || !f.value) return;
111
+ let t = null;
112
+ if (!x.value && Array.isArray(i.value))
113
+ t = (s = (o = N(i.value)) == null ? void 0 : o.filter((u) => (u == null ? void 0 : u.comp) === "Group")) == null ? void 0 : s[0], _.setActiveMenuPath(t == null ? void 0 : t.name);
114
+ else if (Array.isArray(i.value)) {
115
+ const u = (a = N(i.value)) == null ? void 0 : a.filter((S) => (S == null ? void 0 : S.comp) === "Group");
116
+ t = u == null ? void 0 : u.find((S) => S.name === x.value);
117
+ }
118
+ D.value = (r = (l = t == null ? void 0 : t.compData) == null ? void 0 : l[0]) == null ? void 0 : r.contents, A.value = (d = (c = t == null ? void 0 : t.compData) == null ? void 0 : c[0]) == null ? void 0 : d.contents, console.log("itemData监听", t, x.value, i.value);
119
+ },
120
+ { deep: !0, immediate: !0 }
121
+ ), B(() => x.value, (t) => {
122
+ var n, o, s, a, l, r;
123
+ if (t) {
124
+ const c = (n = N(i.value)) == null ? void 0 : n.find((d) => d.name === t);
125
+ if (t && c) {
126
+ D.value = (s = (o = c == null ? void 0 : c.compData) == null ? void 0 : o[0]) == null ? void 0 : s.contents, A.value = (l = (a = c == null ? void 0 : c.compData) == null ? void 0 : a[0]) == null ? void 0 : l.contents, console.log("点击-新-data:", t, D.value);
127
+ const d = (r = D.value) == null ? void 0 : r.filter((u) => u.comp === "Form");
128
+ pe(d);
129
+ } else
130
+ D.value = [], A.value = [];
131
+ y.setSelectTitle([]), y.setSelectIndex(""), y.setSelectMenu("");
132
+ }
133
+ }, {
134
+ immediate: !0
135
+ }), B(
136
+ () => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
137
+ () => {
138
+ var a, l, r;
139
+ if (((a = e == null ? void 0 : e.jsonContents) == null ? void 0 : a.length) > 0) {
140
+ h.setOriginalData(e == null ? void 0 : e.jsonContents), h.setItemData(e == null ? void 0 : e.jsonContents);
141
+ return;
142
+ }
143
+ if (!(e != null && e.content) || ((l = e == null ? void 0 : e.content) == null ? void 0 : l.length) === 0) return;
144
+ f.value = !0;
145
+ let t, n = [];
146
+ (r = e == null ? void 0 : e.content) == null || r.forEach((c) => {
147
+ ce(c) ? n.push(ue(c)) : z(c) ? n.push(z(c)) : n.push(he(c));
148
+ }), t = n[0];
149
+ const o = Array.isArray(t) && (t == null ? void 0 : t.find((c) => {
150
+ var d;
151
+ return ((d = c.comp) == null ? void 0 : d.toUpperCase()) === "MENU";
152
+ }));
153
+ _.setRawMenu(o ?? {});
154
+ const s = Array.isArray(t) && (t == null ? void 0 : t.find((c) => {
155
+ var d;
156
+ return ((d = c.comp) == null ? void 0 : d.toUpperCase()) === "SYSTEM";
157
+ }));
158
+ _.setSystemKey((s == null ? void 0 : s.name) ?? ""), h.setOriginalData(t), h.setItemData(t);
159
+ },
160
+ { deep: !0, immediate: !0 }
161
+ );
162
+ const V = (t) => ie(t);
163
+ return (t, n) => {
164
+ var o, s;
165
+ return m(), v("div", Ce, [
166
+ O(de, { class: "sys-aside" }),
167
+ ((o = D.value) == null ? void 0 : o.length) > 0 ? (m(), v("div", ke, [
168
+ ((s = E(C)) == null ? void 0 : s.length) > 1 ? (m(), v("div", De, [
169
+ (m(), W(_e, {
170
+ key: E(C),
171
+ breadArray: E(C),
172
+ onClick: L
173
+ }, null, 8, ["breadArray"]))
174
+ ])) : M("", !0),
175
+ (m(!0), v(H, null, Q(D.value, (a, l) => (m(), v("div", {
176
+ class: "item-content",
177
+ key: l
178
+ }, [
179
+ E($) === "" || l.toString() === E($) ? (m(), v("div", Se, R(a.name), 1)) : M("", !0),
180
+ E($) === "" || l.toString() === E($) ? (m(), W(ae(V(a.comp)), {
181
+ itemData: a == null ? void 0 : a.compData,
182
+ childItemData: a == null ? void 0 : a.itemChildData,
183
+ key: l,
184
+ onChange: G,
185
+ index: l,
186
+ onContentChange: K
187
+ }, null, 40, ["itemData", "childItemData", "index"])) : M("", !0)
188
+ ]))), 128))
189
+ ])) : M("", !0)
190
+ ]);
191
+ };
192
+ }
193
+ }, we = /* @__PURE__ */ Y(Ae, [["__scopeId", "data-v-c89dc4ab"]]), Ie = { class: "add-model-content" }, Me = {
194
+ key: 0,
195
+ class: "model-import-data"
196
+ }, xe = { class: "import-button" }, be = { key: 0 }, Te = {
197
+ key: 1,
198
+ class: "model-operate"
199
+ }, $e = { class: "model-select" }, je = { class: "model-fill" }, Ee = {
200
+ key: 2,
201
+ class: "model-view"
202
+ }, Fe = {
203
+ __name: "index",
204
+ props: {
205
+ mode: {
206
+ type: String,
207
+ default: "view"
208
+ },
209
+ content: {
210
+ type: String,
211
+ default: ""
212
+ },
213
+ jsonContents: {
214
+ type: Array,
215
+ default: () => []
216
+ },
217
+ showButton: {
218
+ type: Boolean,
219
+ default: !0
220
+ }
221
+ },
222
+ emits: ["change", "contentChange"],
223
+ setup(w, { emit: T }) {
224
+ const e = w, k = T, h = g([]), f = g([]), _ = g([]), p = g(0), i = X(J), y = Z(J), { itemData: x, originalData: q } = P(i), { activeMenuPath: ee } = P(y), U = g(null), $ = g(0), C = g([]), A = g(""), D = g(0), G = (n) => {
225
+ k("contentChange", n);
226
+ }, K = (n) => {
227
+ var s;
228
+ const o = (s = N(n == null ? void 0 : n.wholeValue)) == null ? void 0 : s.map((a) => {
229
+ var l;
230
+ return (a == null ? void 0 : a.comp) === "Form" && (a.compData = (l = a.compData) == null ? void 0 : l.map((r) => ((r == null ? void 0 : r.key) === "formContent" && (r.contents = me(r == null ? void 0 : r.contents)), r))), a;
231
+ });
232
+ k("change", {
233
+ originalContents: q.value,
234
+ currentContents: n == null ? void 0 : n.wholeValue,
235
+ editContent: n == null ? void 0 : n.editValue,
236
+ arrayToContents: o
237
+ });
238
+ };
239
+ B(
240
+ () => f.value,
241
+ () => {
242
+ D.value === f.value.length && f.value.length !== 0 && (h.value = f.value);
243
+ },
244
+ { deep: !0, immediate: !0 }
245
+ );
246
+ const L = () => {
247
+ U.value.click();
248
+ }, V = async (n) => {
249
+ const o = n.target.files;
250
+ if (!o) return;
251
+ new FileReader(), h.value = [], f.value = [], D.value = o.length;
252
+ const s = Array.from(o).map(async (a) => await new Promise((l) => {
253
+ const r = new FileReader();
254
+ r.onload = (c) => {
255
+ try {
256
+ f.value.push(c.target.result), C.value = t(c.target.result), $.value++;
257
+ } catch (d) {
258
+ console.error("解析失败:", d);
259
+ return;
260
+ }
261
+ }, r.onerror = () => l(`读取 ${a.name} 失败`), r.readAsText(a);
262
+ }));
263
+ await Promise.all(s);
264
+ };
265
+ B(
266
+ () => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
267
+ () => {
268
+ h.value = e == null ? void 0 : e.content, _.value = e == null ? void 0 : e.jsonContents;
269
+ },
270
+ { deep: !0, immediate: !0 }
271
+ ), B(
272
+ () => $.value,
273
+ () => {
274
+ var n;
275
+ ((n = C.value) == null ? void 0 : n.length) !== 0 && (i.setOriginalData(C.value), i.setItemData(C.value));
276
+ },
277
+ { deep: !0, immediate: !0 }
278
+ );
279
+ const t = (n) => {
280
+ let o = n.replace(/,/g, ",").replace(/;/g, ";").replace(/:/g, ":");
281
+ o = o.replace(/(\w+)\s*:/g, "$1:"), o = o.replace(/\r\n/g, "").replace(/\n/g, "").replace(/\t/g, "").replace(/\s+/g, " ").trim(), o = o.replace(/,\s*([}\]])/g, "$1"), o = o.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g, ": $2$4");
282
+ try {
283
+ return JSON.parse(o);
284
+ } catch (s) {
285
+ try {
286
+ const l = new Function(`return ${o}`)();
287
+ if (Array.isArray(l) || typeof l == "object")
288
+ return l;
289
+ throw new Error(`解析结果不是有效的数组或对象: ${s}`);
290
+ } catch (a) {
291
+ throw new Error(`无法解析JSON: ${a.message}`);
292
+ }
293
+ }
294
+ };
295
+ return (n, o) => {
296
+ var s;
297
+ return m(), v("div", Ie, [
298
+ ((s = e == null ? void 0 : e.jsonContents) == null ? void 0 : s.length) === 0 && (e != null && e.showButton) ? (m(), v("div", Me, [
299
+ F("div", xe, [
300
+ F("input", {
301
+ type: "file",
302
+ ref_key: "fileInput",
303
+ ref: U,
304
+ accept: ".txt, .inm",
305
+ onChange: V,
306
+ style: { display: "none" },
307
+ multiple: ""
308
+ }, null, 544),
309
+ F("button", {
310
+ onClick: L,
311
+ class: "import-button-content"
312
+ }, "导入文件"),
313
+ A.value ? (m(), v("span", be, R(A.value), 1)) : M("", !0)
314
+ ])
315
+ ])) : M("", !0),
316
+ (e == null ? void 0 : e.mode) === "edit" ? (m(), v("div", Te, [
317
+ F("div", $e, [
318
+ O(ne)
319
+ ]),
320
+ (m(), v("div", {
321
+ class: "model-show",
322
+ key: p.value
323
+ }, [
324
+ O(oe)
325
+ ])),
326
+ F("div", je, [
327
+ O(se)
328
+ ])
329
+ ])) : M("", !0),
330
+ (e == null ? void 0 : e.mode) === "view" ? (m(), v("div", Ee, [
331
+ (m(), W(we, {
332
+ content: h.value,
333
+ onChange: K,
334
+ jsonContents: _.value,
335
+ onContentChange: G,
336
+ key: p.value
337
+ }, null, 8, ["content", "jsonContents"]))
338
+ ])) : M("", !0)
339
+ ]);
340
+ };
341
+ }
342
+ }, Le = /* @__PURE__ */ Y(Fe, [["__scopeId", "data-v-0d13cfeb"]]);
343
+ export {
344
+ Le as default
345
+ };
@@ -1,6 +1,6 @@
1
1
  import { ref as Sp, onMounted as Ab, watch as vL, onUnmounted as cL, createElementBlock as Mb, openBlock as Ib, createVNode as pL } from "vue";
2
2
  import { _ as Lb } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- import { c as Ki } from "./cloneDeep-DuEirD61.js";
3
+ import { c as Ki } from "./cloneDeep-BpK0E_ef.js";
4
4
  /*! *****************************************************************************
5
5
  Copyright (c) Microsoft Corporation.
6
6
 
@@ -1,4 +1,4 @@
1
- import { _ as c } from "./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-sXEqRck_.js";
1
+ import { _ as c } from "./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B67eMpk2.js";
2
2
  import { resolveComponent as o, createBlock as a, openBlock as u, withCtx as r, createVNode as l, createElementVNode as i, toDisplayString as p } from "vue";
3
3
  import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  function M(e, _, d, f, C, y) {
@@ -1,10 +1,10 @@
1
1
  import { createElementBlock as r, openBlock as n, Fragment as k, renderList as y, unref as F, createElementVNode as c, createBlock as f, resolveDynamicComponent as $, toDisplayString as C, ref as I, watch as L, resolveComponent as b, createVNode as R, withCtx as g, createCommentVNode as T } from "vue";
2
- import { p as V, s as U, g as M } from "./array-D2zrIzej.js";
3
- import { E as j } from "./index-DzijCTQM.js";
2
+ import { p as V, s as U, g as M } from "./array-C8gxudwq.js";
3
+ import { E as j } from "./index-CQuV8YFa.js";
4
4
  import { u as w } from "./modelComp-B3sxj_Kp.js";
5
5
  import { s as x } from "./menu-BIINB-0Y.js";
6
6
  import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
- import { c as v } from "./cloneDeep-DuEirD61.js";
7
+ import { c as v } from "./cloneDeep-BpK0E_ef.js";
8
8
  const q = { class: "type-select" }, z = ["onClick"], A = { class: "list-icon" }, G = {
9
9
  __name: "index",
10
10
  setup(N) {
@@ -0,0 +1,43 @@
1
+ import { ref as n, resolveComponent as r, createBlock as c, openBlock as s } from "vue";
2
+ /* empty css */
3
+ import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import "vue-router";
5
+ import "./array-C8gxudwq.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B67eMpk2.js";
7
+ import "./index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-Ce-Paygw.js";
8
+ const a = {
9
+ __name: "index",
10
+ props: {
11
+ mode: {
12
+ type: String,
13
+ default: "view"
14
+ },
15
+ content: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ jsonContents: {
20
+ type: Array,
21
+ default: () => []
22
+ },
23
+ showButton: {
24
+ type: Boolean,
25
+ default: !0
26
+ }
27
+ },
28
+ setup(e) {
29
+ const t = e;
30
+ return n(!1), (u, i) => {
31
+ const o = r("router-view");
32
+ return s(), c(o, {
33
+ mode: t == null ? void 0 : t.mode,
34
+ content: t == null ? void 0 : t.content,
35
+ jsonContents: t == null ? void 0 : t.jsonContents,
36
+ showButton: t == null ? void 0 : t.showButton
37
+ }, null, 8, ["mode", "content", "jsonContents", "showButton"]);
38
+ };
39
+ }
40
+ }, h = /* @__PURE__ */ m(a, [["__scopeId", "data-v-958cc72e"]]);
41
+ export {
42
+ h as default
43
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q=require("./index-BLoamlbm.cjs"),B=require("./array-q8pUBU30.cjs"),O=require("./modelComp-DAsVXKA0.cjs"),M=require("./menu-B_Az9K_F.cjs"),G=require("./index-BW-bmuq0.cjs"),R=require("./index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-CwZAxgWm.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),I=require("./cloneDeep-B3VC5L8Z.cjs"),L={class:"bread-content"},H=["onClick"],K={key:0},W={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(S,{emit:N}){const t=S,k=e.ref([]),f=N;e.onMounted(()=>{k.value=t==null?void 0:t.breadArray});const h=p=>{f("click",p)};return(p,y)=>(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(d,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:w=>h(d)},e.toDisplayString(d.value),9,H),v!==k.value.length-1?(e.openBlock(),e.createElementBlock("div",K,e.toDisplayString("/"))):e.createCommentVNode("",!0)]))),128))]))}},Y=J._export_sfc(W,[["__scopeId","data-v-d55d3ede"]]);function z(S){var k,f,h,p;const N=(f=(k=S[0])==null?void 0:k.compData)==null?void 0:f.filter(y=>y.key!=="formContent"),t=(p=(h=S[0])==null?void 0:h.compData)==null?void 0:p.filter(y=>y.key==="formContent");console.log("handleFormModel:",N,t,S)}const Q={class:"system-wrap"},X={key:0,class:"show-content"},Z={key:0,class:"item-menu-content"},ee={key:0,class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(S,{emit:N}){const t=S,k=N,f=O.useModelComp(B.pinia);B.useFormToTableComp(B.pinia);const h=e.ref(!0),p=M.useMenuState(),y=e.ref(!0),{itemData:d}=M.storeToRefs(f),v=B.useUnit(B.pinia),{activeMenuPath:w,activeMenuOpenPaths:P,menuTriggerType:U,menus:$}=M.storeToRefs(p),{selectIndex:A,selectTitle:g}=M.storeToRefs(v),D=e.ref([]),_=e.ref([]),b=n=>{var l,r,a;const o=(l=d.value)==null?void 0:l.find(c=>c.name===w.value);_.value=(a=(r=o==null?void 0:o.compData)==null?void 0:r[0])==null?void 0:a.contents,y.value=!0,y.value&&(y.value=!1),k("change",{wholeValue:D.value,editValue:n})},V=n=>{var s,u,m;const o=I.cloneDeep(D.value),l=o==null?void 0:o.map((i,C)=>(C===(n==null?void 0:n.index)&&(i.compData=n==null?void 0:n.contents),i));let r="";(u=(s=I.cloneDeep(l))==null?void 0:s.filter(i=>(i==null?void 0:i.comp)==="Form"))==null||u.forEach(i=>{var C;(C=i==null?void 0:i.compData)==null||C.forEach(E=>{var x;(E==null?void 0:E.key)==="formContent"&&((x=E==null?void 0:E.contents)==null||x.forEach(T=>{T.value!==""&&(r=r===""?T==null?void 0:T.value:r+"-"+(T==null?void 0:T.value))}))})});let a=g==null?void 0:g.value;(a==null?void 0:a.length)>0?a[0]={key:"main",value:r}:(Array.isArray(a)||(a=[]),a.push({key:"main",value:r})),v.setSelectTitle(a),h.value=!1,D.value=l;const c=(m=d.value)==null?void 0:m.map((i,C)=>{var E;return i.name===w.value&&(i.compData=(E=i.compData)==null?void 0:E.map(x=>((x==null?void 0:x.key)==="groupContents"&&(x.contents=D.value),x))),i});f.setItemData(c),y.value&&(y.value=!1),k("contentChange",{wholeContent:d.value})},j=n=>{var o,l;if((n==null?void 0:n.key)==="main")v.setSelectIndex(""),v.setSelectMenu(""),v.setSelectTitle((o=g.value)==null?void 0:o[0]);else{const r=[];let a=-1;(l=g.value)==null||l.forEach((c,s)=>{(c==null?void 0:c.key)===(n==null?void 0:n.key)&&(a=s),(a===-1||a>=s)&&r.push(c)}),v.setSelectTitle(r),v.setSelectMenu(n==null?void 0:n.key)}};e.watch(()=>d.value,()=>{var o,l,r,a,c,s,u,m;if(!d.value||((o=d.value)==null?void 0:o.length)===0||!h.value)return;let n=null;if(!w.value&&Array.isArray(d.value))n=(r=(l=I.cloneDeep(d.value))==null?void 0:l.filter(i=>(i==null?void 0:i.comp)==="Group"))==null?void 0:r[0],p.setActiveMenuPath(n==null?void 0:n.name);else if(Array.isArray(d.value)){const i=(a=I.cloneDeep(d.value))==null?void 0:a.filter(C=>(C==null?void 0:C.comp)==="Group");n=i==null?void 0:i.find(C=>C.name===w.value)}_.value=(s=(c=n==null?void 0:n.compData)==null?void 0:c[0])==null?void 0:s.contents,D.value=(m=(u=n==null?void 0:n.compData)==null?void 0:u[0])==null?void 0:m.contents,console.log("itemData监听",n,w.value,d.value)},{deep:!0,immediate:!0}),e.watch(()=>w.value,n=>{var o,l,r,a,c,s;if(n){const u=(o=I.cloneDeep(d.value))==null?void 0:o.find(m=>m.name===n);if(n&&u){_.value=(r=(l=u==null?void 0:u.compData)==null?void 0:l[0])==null?void 0:r.contents,D.value=(c=(a=u==null?void 0:u.compData)==null?void 0:a[0])==null?void 0:c.contents,console.log("点击-新-data:",n,_.value);const m=(s=_.value)==null?void 0:s.filter(i=>i.comp==="Form");z(m)}else _.value=[],D.value=[];v.setSelectTitle([]),v.setSelectIndex(""),v.setSelectMenu("")}},{immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var a,c,s;if(((a=t==null?void 0:t.jsonContents)==null?void 0:a.length)>0){f.setOriginalData(t==null?void 0:t.jsonContents),f.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||((c=t==null?void 0:t.content)==null?void 0:c.length)===0)return;h.value=!0;let n,o=[];(s=t==null?void 0:t.content)==null||s.forEach(u=>{B.isExpandStringToJson(u)?o.push(B.expandStringToJson(u)):R.expandNewStringToJson(u)?o.push(R.expandNewStringToJson(u)):o.push(R.expandContentStringToJson(u))}),n=o[0];const l=Array.isArray(n)&&(n==null?void 0:n.find(u=>{var m;return((m=u.comp)==null?void 0:m.toUpperCase())==="MENU"}));p.setRawMenu(l??{});const r=Array.isArray(n)&&(n==null?void 0:n.find(u=>{var m;return((m=u.comp)==null?void 0:m.toUpperCase())==="SYSTEM"}));p.setSystemKey((r==null?void 0:r.name)??""),f.setOriginalData(n),f.setItemData(n)},{deep:!0,immediate:!0});const F=n=>B.getComponent(n);return(n,o)=>{var l,r;return e.openBlock(),e.createElementBlock("div",Q,[e.createVNode(G.default,{class:"sys-aside"}),((l=_.value)==null?void 0:l.length)>0?(e.openBlock(),e.createElementBlock("div",X,[((r=e.unref(g))==null?void 0:r.length)>1?(e.openBlock(),e.createElementBlock("div",Z,[(e.openBlock(),e.createBlock(Y,{key:e.unref(g),breadArray:e.unref(g),onClick:j},null,8,["breadArray"]))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:c},[e.unref(A)===""||c.toString()===e.unref(A)?(e.openBlock(),e.createElementBlock("div",ee,e.toDisplayString(a.name),1)):e.createCommentVNode("",!0),e.unref(A)===""||c.toString()===e.unref(A)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(a.comp)),{itemData:a==null?void 0:a.compData,childItemData:a==null?void 0:a.itemChildData,key:c,onChange:b,index:c,onContentChange:V},null,40,["itemData","childItemData","index"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)])}}},ne=J._export_sfc(te,[["__scopeId","data-v-c89dc4ab"]]),ae={class:"add-model-content"},oe={key:0,class:"model-import-data"},le={class:"import-button"},re={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view"},de={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(S,{emit:N}){const t=S,k=N,f=e.ref([]),h=e.ref([]),p=e.ref([]),y=e.ref(0),d=O.useModelComp(B.pinia),v=M.useMenuState(B.pinia),{itemData:w,originalData:P}=M.storeToRefs(d),{activeMenuPath:U}=M.storeToRefs(v),$=e.ref(null),A=e.ref(0),g=e.ref([]),D=e.ref(""),_=e.ref(0),b=o=>{k("contentChange",o)},V=o=>{var r;const l=(r=I.cloneDeep(o==null?void 0:o.wholeValue))==null?void 0:r.map(a=>{var c;return(a==null?void 0:a.comp)==="Form"&&(a.compData=(c=a.compData)==null?void 0:c.map(s=>((s==null?void 0:s.key)==="formContent"&&(s.contents=B.arrayToNumberArray(s==null?void 0:s.contents)),s))),a});k("change",{originalContents:P.value,currentContents:o==null?void 0:o.wholeValue,editContent:o==null?void 0:o.editValue,arrayToContents:l})};e.watch(()=>h.value,()=>{_.value===h.value.length&&h.value.length!==0&&(f.value=h.value)},{deep:!0,immediate:!0});const j=()=>{$.value.click()},F=async o=>{const l=o.target.files;if(!l)return;new FileReader,f.value=[],h.value=[],_.value=l.length;const r=Array.from(l).map(async a=>await new Promise(c=>{const s=new FileReader;s.onload=u=>{try{h.value.push(u.target.result),g.value=n(u.target.result),A.value++}catch(m){console.error("解析失败:",m);return}},s.onerror=()=>c(`读取 ${a.name} 失败`),s.readAsText(a)}));await Promise.all(r)};e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{f.value=t==null?void 0:t.content,p.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>A.value,()=>{var o;((o=g.value)==null?void 0:o.length)!==0&&(d.setOriginalData(g.value),d.setItemData(g.value))},{deep:!0,immediate:!0});const n=o=>{let l=o.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");l=l.replace(/(\w+)\s*:/g,"$1:"),l=l.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),l=l.replace(/,\s*([}\]])/g,"$1"),l=l.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(l)}catch(r){try{const c=new Function(`return ${l}`)();if(Array.isArray(c)||typeof c=="object")return c;throw new Error(`解析结果不是有效的数组或对象: ${r}`)}catch(a){throw new Error(`无法解析JSON: ${a.message}`)}}};return(o,l)=>{var r;return e.openBlock(),e.createElementBlock("div",ae,[((r=t==null?void 0:t.jsonContents)==null?void 0:r.length)===0&&(t!=null&&t.showButton)?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",le,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:$,accept:".txt, .inm",onChange:F,style:{display:"none"},multiple:""},null,544),e.createElementVNode("button",{onClick:j,class:"import-button-content"},"导入文件"),D.value?(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(D.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(q.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:y.value},[e.createVNode(q.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(q.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:f.value,onChange:V,jsonContents:p.value,onContentChange:b,key:y.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=J._export_sfc(de,[["__scopeId","data-v-0d13cfeb"]]);exports.default=me;