@vtj/ui 0.12.53 → 0.12.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -9,10 +9,10 @@ import { VXETable as jt, VxeTableFilterModule as yl, VxeTableEditModule as bl, V
9
9
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
10
10
  * @name @vtj/ui
11
11
  * @author CHC chenhuachun1549@dingtalk.com
12
- * @version 0.12.53
12
+ * @version 0.12.55
13
13
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
14
14
  */
15
- const t2 = "0.12.53", Dl = {
15
+ const t2 = "0.12.55", Dl = {
16
16
  default: 14,
17
17
  small: 12,
18
18
  large: 18
package/dist/index.umd.js CHANGED
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/ui
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.12.53
5
+ * @version 0.12.55
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
- */const ie="0.12.53",Te={default:14,small:12,large:18},Wn={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number},hoverEffect:{type:Boolean}};function Ve(o){return typeof o=="string"?o:`${o}px`}function tt(o=0,t){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const e=Number.parseInt(o);return Math.floor(t*e/100)}return Number.parseInt(o)}function Ut(o,t={}){const n={...t};return typeof o=="boolean"?n:Object.assign(n,o||{})}const Lt="__VTJ_UI_INSTALLED__",mt=Symbol("ADAPTER_KEY");function Vt(){const o=Vue.getCurrentInstance(),t=o==null?void 0:o.appContext.config.globalProperties.$adapter;return t||Vue.inject(mt,{})}const Yr={getCustom:async o=>VtjUtils.storage.get(o,{type:"local"}),saveCustom:async o=>{VtjUtils.storage.save(o.id,o,{type:"local"})}},Gr={install(o,t={}){const n=Object.assign(Yr,t),{components:e=[],fieldEditors:r={}}=n;Yo(r);for(const l of e)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(mt,n)}},Jn=(o=[])=>({install:(n,e={})=>{n[Lt]||(n[Lt]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),e.adapter&&n.provide(mt,e.adapter))}});let Ue;const Qn=new RegExp(`\\<script.*src=["'](?<src>[^"']+)`,"gm");let Wr=60*1e3;async function Jr(){var e;const o=await fetch("?t="+Date.now()).then(r=>r.text());Qn.lastIndex=0;let t=[],n;for(;n=Qn.exec(o);)(e=n.groups)!=null&&e.src&&t.push(n.groups.src);return t}async function Qr(){const o=await Jr();if(!Ue)return Ue=o,!1;let t=!1;Ue.length!==o.length&&(t=!0);for(let n=0;n<Ue.length;n++)if(Ue[n]!==o[n]){t=!0;break}return Ue=o,t}async function Zr(){await ElementPlus.ElMessageBox.confirm("系统发现新版本,请确认是否需要更新。如果确定,系统将会重新登录,请注意存档。",{title:"系统更新",type:"warning",closeOnClickModal:!1}).catch(()=>!1)&&(top||window).location.reload()}function Zn(o){setTimeout(async()=>{await Qr()&&await Zr(),Zn()},o||Wr)}function el(o){Zn(o)}const tl=["src"],de=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Wn,setup(o){const t=o,n=Vue.useAttrs(),e=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!t.icon)return null;const i=e==null?void 0:e.appContext.app;return typeof t.icon=="object"?Vue.markRaw(t.icon):(i==null?void 0:i.component(t.icon))||t.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick,"is-hover-effect":t.hoverEffect};return!r.value&&t.icon&&(i[t.icon]=!0),i}),u=Vue.computed(()=>({"background-color":t.background,"border-radius":t.radius?Ve(t.radius):void 0,padding:t.padding?Ve(t.padding):void 0})),a=Vue.computed(()=>{var i,s;return typeof t.size=="number"?t.size:(s=(i=Te[t.size])!=null?i:Number.parseInt(t.size))!=null?s:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:t.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:t.src},null,8,tl)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),nl={class:"x-menu__wrapper"},ol={key:1,class:"x-menu__title"},rl={key:0,class:"x-menu__title"},eo=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{}},setup(o){const t=o,n=Vue.getCurrentInstance(),e=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||t.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>t.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:t.item.disabled},t.subMenu,{index:String(t.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",nl,[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",ol,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])),_:1,__:[0]},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(t.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{key:i.id,item:i,subMenu:t.subMenu,defaultIcon:t.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(t.item.id),disabled:t.item.disabled},{title:Vue.withCtx(()=>[t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",rl,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])),_:1,__:[1]},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Se=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&e("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{item:{...s,icon:s.icon},defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),Ht={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean}};function ll(o){return Vue.computed(()=>{const t=o.tooltip;if(t)return typeof t=="string"?{content:t}:t})}function al(o){return Vue.computed(()=>{const t=o.badge;if(t)return typeof t=="object"?t:{value:t}})}function ul(o){return Vue.computed(()=>{const{dropdown:t,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},t||{})})}function to(o){const t=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const e=t==null?void 0:t.appContext.app;return{icon:typeof n=="string"&&(e==null?void 0:e.component(n))||n}}else return n;return null})}function De(o){const t=to(o);return t.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(de,t.value)})):void 0}function ht(o,t){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(t):!!n})}function no(o,t,n){const e=Vue.shallowRef(t),r=Vue.ref(!1),l=async a=>{const i=Vue.unref(o);return i?typeof i=="function"?await i(a):i:t},u=async a=>(r.value=!0,await l(a).then(i=>(e.value=i||t,r.value=!1,Vue.unref(e))));return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:e,loading:r,loader:u}}function il(o=1e3){const t=Vue.ref(0);let n;const e=()=>{n=VtjUtils.rAF(()=>{++t.value,t.value<o&&e()})};return Vue.onMounted(e),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>t.value>=r}function oo(o=[]){const t=Vue.useSlots();return Object.keys(t).filter(n=>!o.includes(n))}const sl={key:0},cl=Vue.defineComponent({__name:"Trigger",props:Ht,emits:["click"],setup(o,{emit:t}){const n=o,e=t,r=De(Vue.toRef(n,"icon")),l=ht(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return e("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",sl,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0)],2))}}),dl=["draggable"],Q=Vue.defineComponent({name:"XAction",__name:"Action",props:Ht,emits:["click","command","dragstart","dragend"],setup(o,{emit:t}){const n=o,e=Vue.useSlots(),r=t,l=ll(n),u=al(n),a=ul(n),i=ht(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=b=>{var _;if(i.value)return;const w=(_=n.menus)==null?void 0:_.find(C=>C.command===b);w&&r("command",Vue.toRaw(w))},p=b=>{s&&r("dragstart",Vue.toRaw(n),b)},f=b=>{s&&r("dragend",Vue.toRaw(n),b)},V=b=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(b)),h=b=>Vue.h(ElementPlus.ElDropdown,{...a.value,disabled:i.value,onCommand:m},{default:()=>[b],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((w,_)=>Vue.h(ElementPlus.ElDropdownItem,w,()=>e.item?e.item({item:w,index:_}):w.label)))]}),v=b=>Vue.h(ElementPlus.ElTooltip,{...l.value,disabled:i.value},()=>[b]),y=Vue.computed(()=>{var _;let b=Vue.h(Vue.markRaw(cl),{...n,onClick:d});const w=(_=e.default)==null?void 0:_.call(e);return w&&w.length&&(b=w[0]),u.value&&(b=V(b)),a.value&&(b=h(b)),l.value&&(b=v(b)),b});return(b,w)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(y.value)))],42,dl))}}),ro={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},ze=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:ro,emits:["click","command"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...n.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...n.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),l=a=>{e("click",a)},u=(a,i)=>{e("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(ht)(n.disabled,s).value},{ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),lo={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},j=Vue.defineComponent({name:"XContainer",__name:"Container",props:lo,setup(o,{expose:t}){const n=o,e=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!e.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?Ve(c):void 0,height:d?Ve(d):void 0}});return t({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),ao={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},fl={class:"x-header__content"},pl={key:0,class:"x-header__actions"},Xt=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:ao,setup(o){const t=o,n=De(Vue.toRef(t,"icon")),e=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${t.size}`]:!!t.size&&t.size!=="default","is-border":t.border,"is-pointer":!!e.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(e).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(e).onClickIcon||Vue.unref(e).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",fl,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.content),1)])]),t.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(e).onClick&&Vue.unref(e).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",pl,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),uo={badge:{type:Object},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Le=Vue.defineComponent({name:"XPanel",__name:"Panel",props:uo,setup(o,{expose:t}){const n=o,e=Vue.ref(),r=Vue.computed(()=>({"x-panel__badge-wrapper":!!n.badge,"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.badge===null?null:n.badge?`is-badge-${n.badge.type}`:""),u=Vue.computed(()=>n.header===null||n.header===void 0?null:typeof n.header=="string"?{content:n.header,size:n.size}:{...n.header,size:n.size}),a=Vue.computed(()=>!!u.value),i=Vue.computed(()=>n.fit||n.height?"auto":void 0);return t({bodyRef:e}),(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[a.value||s.$slots.header?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(Xt),Vue.normalizeProps(Vue.guardReactiveProps(u.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(j),Vue.mergeProps({ref_key:"bodyRef",ref:e,flex:!1,overflow:i.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"default")]),_:3},16,["overflow"]),s.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0),n.badge?(Vue.openBlock(),Vue.createElementBlock("div",{key:2,class:Vue.normalizeClass(["x-panel__badge",l.value])},Vue.toDisplayString(n.badge.text),3)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),io="user-select-none";class qt{constructor(t,n={}){Ee(this,"scope");Ee(this,"dragging",!1);this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:t,handle:n}=this.options;return t?this.el.querySelector(t):n}getTarget(){const{target:t="body"}=this.options;return typeof t=="string"?document.querySelector(t):Vue.unref(t)||document.body}init(){const{el:t,options:n}=this,{disabled:e,delay:r=150,onStart:l,onEnd:u}=n;if(e)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=t.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(t,{initialValue:{x:c.x,y:c.y},...n,handle:i,onStart:(f,V)=>{document.body.classList.add(io),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=t.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(io),this.dragging&&d){this.dragging=!1;const{x:h,y:v}=f,y=this.getPosition(d,c,h,v);u&&u(y,V),d=null}}});Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);t.style.left=`${f.x}px`,t.style.top=`${f.y}px`}})}getPosition(t,n,e,r){const{edge:l=50}=this.options,u=-n.width+t.x+l,a=t.width+t.x-l,i=t.y,s=t.height+t.y-l,c=Math.min(a,Math.max(e,u)),d=Math.min(s,Math.max(r,i));return{x:c-t.x,y:d-t.y}}destory(){this.scope.stop()}}const so={mounted(o,t){const n=t.value||{},e=new qt(o,n);o.__draggable__=e},updated(o,t){const n=t.value||{};let e=o.__draggable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__draggable__=new qt(o,n))},unmounted(o){const t=o.__draggable__;t&&(t.destory(),o.__draggable__=null)}},Kt="user-select-none";class Yt{constructor(t,n={}){Ee(this,"scope");Ee(this,"resizing",Vue.ref(!1));Ee(this,"direction",Vue.ref(""));Ee(this,"MIE",null);Ee(this,"cleanMousedown");Ee(this,"cleanMouseup");this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:t,options:n}=this,{disabled:e,onStart:r,onEnd:l}=n;if(e)return;this.MIE=VueUse.useMouseInElement(t),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,t.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(t.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(Kt):s.classList.remove(Kt)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:t,direction:n,resizing:e,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!t||!e.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=t,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:h=99999,maxHeight:v=99999}=r;if(u.includes("e")){const y=Math.min(Math.max(s.value,f),h);l.style.width=`${y}px`}if(u.includes("s")){const y=Math.min(Math.max(c.value,V),v);l.style.height=`${y}px`}if(u.includes("w")){const y=Math.min(Math.max(m.value-s.value,f),h);l.style.width=`${y}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const y=Math.min(Math.max(d.value-c.value,V),v);this.el.style.height=`${y}px`,this.el.style.top=`${i.value}px`}p&&p(u,t)}getDirection(){if(!this.MIE)return"";const{elementX:t,elementY:n,elementHeight:e,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>e.value-a&&(i+="s"),u.includes("w")&&t.value<=a?i+="w":u.includes("e")&&t.value>r.value-a&&(i+="e"),i}destory(){var n;const t=document.body;t.style.cursor="",t.classList.remove(Kt),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const Gt={mounted(o,t){const n=t.value||{},e=new Yt(o,n);o.__resizable__=e},updated(o,t){const n=t.value||{};let e=o.__resizable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__resizable__=new Yt(o,n))},unmounted(o){const t=o.__resizable__;t&&(t.destory(),o.__resizable__=null)}},co={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean},pure:{type:Boolean}};let He=1e3;function ml(o,t){const{width:n,height:e}=VueUse.useElementSize(t),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++He,dragging:!1,resizing:!1});return Vue.watch([n,e],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=tt(o.width,l),r.height=tt(o.height,u),r.left=o.left?tt(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?tt(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{He=Math.max(l.zIndex,He)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Vl(o,t){const n=Vue.computed(()=>{const{width:a,height:i,top:s,left:c,zIndex:d}=t;return{width:`${a}px`,height:`${i}px`,top:`${s}px`,left:`${c}px`,zIndex:d}}),e=Vue.computed(()=>{const{zIndex:a}=t;return{zIndex:a}}),r=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary,"is-pure":!!o.pure})),l=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-dragging":t.dragging,"is-resizing":t.resizing})),u=Vue.computed(()=>({zIndex:t.zIndex}));return{styles:n,classes:r,wrapperClass:l,modalStyle:u,zIndexStyle:e}}function hl(o,t,n){const e=c=>{t.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=async()=>{(!o.beforeClose||await o.beforeClose())&&(n("update:modelValue",!1),n("close"),n("destroy"))};return{close:r,changeMode:e,show:()=>e("normal"),hide:()=>e("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(t.zIndex=Math.max(t.zIndex,++He))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function gl(o,t,n,e){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return{...VtjUtils.isObject(o.draggable)?o.draggable:{},disabled:r,target:e,selector:".x-panel__header",onStart(u){t.dragging=!0,t.zIndex=Math.max(t.zIndex,++He),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(t.mode==="maximized")return;const{x:a,y:i}=u;t.left=a,t.top=i,t.dragging=!1,n("dragEnd",u)}}})}function vl(o,t,n){return Vue.computed(()=>{var r;const e=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return{minWidth:200,minHeight:150,...VtjUtils.isObject(o.resizable)?o.resizable:{},disabled:e,dirs:["e","s","w"],onStart(l,u){t.resizing=!0,t.zIndex=Math.max(t.zIndex,++He),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();t.left=u.elementPositionX.value-a.x,t.top=u.elementPositionY.value-a.y,t.width=u.elementWidth.value,t.height=u.elementHeight.value,t.resizing=!1,n("resizeEnd",l,u)}}})}function yl(o,t){const n=o.componentInstance;if(!n)return;let e=null;return Vue.onMounted(()=>{const r=Vue.unref(t),l=Vue.unref(r==null?void 0:r.bodyRef);e=n.$el,l&&l.$el&&l.$el.appendChild(e)}),Vue.onUnmounted(()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),{componentInstance:n}}const wl=["src"],Xe=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:co,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:t,emit:n}){const e=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=ml(e,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V,zIndexStyle:h}=Vl(e,i),{changeMode:v,active:y,close:b,show:w,hide:_,submit:C,cancel:g}=hl(e,i,r),x=gl(e,i,r,u),S=vl(e,i,r),I=yl(e,a);Vue.watchEffect(async()=>{e.modelValue?(await Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")}),Vue.onUnmounted(()=>{document.body.classList.remove("x-dialog-visible")});const z=Vue.computed(()=>{var N;return(N=a.value)==null?void 0:N.$el});return t({$vtjEl:z,panelRef:a,state:i,maximized:s,minimized:c,changeMode:v,show:w,hide:_,submit:C,cancel:g,close:b,componentInstance:I}),(N,T)=>e.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)]),style:Vue.normalizeStyle(Vue.unref(h))},[e.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Le),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:e.icon,subtitle:e.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:e.size,body:{padding:e.bodyPadding},onClick:Vue.unref(y)},N.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"actions"),e.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[0]||(T[0]=A=>Vue.unref(v)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),e.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[2]||(T[2]=A=>Vue.unref(v)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Popup),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[1]||(T[1]=A=>Vue.unref(v)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),e.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:e.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(b)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"default",{},()=>[e.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.content),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:e.src,class:"x-dialog__frame"},null,8,wl)):Vue.createCommentVNode("",!0)])]),_:2},[e.cancel||e.submit||N.$slots.footer||N.$slots.extra||N.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"handle"),e.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:e.size,onClick:Vue.unref(g)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.cancel=="string"?e.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),e.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:e.size,onClick:Vue.unref(C)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.submit=="string"?e.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(so),Vue.unref(x)],[Vue.unref(Gt),Vue.unref(S)]])],6)])):Vue.createCommentVNode("",!0)}});function gt(o,t){const n=document.createElement("div"),e=Vue.createVNode(Xe,o);e.appContext=t!=null?t:gt._context,Vue.render(e,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return e.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:e,destroy:r}}const bl=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const t=o;return(n,e)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":t.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(j),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),e[0]||(e[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3,__:[0]})]),_:3},8,["class"])),[[Vue.unref(Gt),{dirs:["e"],disabled:t.collapsed,maxWidth:500,minWidth:200}]])}}),Cl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:t}){const n=o,e=t,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,e("update:keyword",l.value)},s=()=>{e("update:collasped",!n.collasped)},c=()=>{e("update:keyword",l.value)},d=()=>{e("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(de),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),_l=["src"],kl={key:0},El=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const t=o,n=VueRouter.useRouter(),e=()=>{t.url&&n.push(t.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":t.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:e},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[t.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:t.logo},null,8,_l)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[t.title?(Vue.openBlock(),Vue.createElementBlock("span",kl,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),vt="__favorites__",yt="__search__",Sl=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=Vue.computed(()=>n.menus||[]),r=t,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:vt,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:vt+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:yt,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:yt+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),e.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),xl="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",fo=140,po={logo:{type:String,default:xl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function},userCardWidth:{type:Number,default:350},pure:{type:Boolean}},Wt=Symbol(),Jt="$mask",Bl={class:"x-mask-tabs__trigger"},Pl={key:1},Nl=["onDragstart","onDragend"],Tl={key:1},Dl=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:t}){const n=o,e=t,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu||!!c.menu.hidden},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){e("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&e("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&e("remove",d)},a=c=>{switch(c.name){case"refresh":e("refresh",c.value);break;case"favorite":e("toggleFavorite",c.value);break;case"dialog":e("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",Bl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",Pl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",Tl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,Nl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ze),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),zl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const t=VueUse.useDark(),n=Vue.computed(()=>t.value?VtjIcons.Sunny:VtjIcons.Moon),e=()=>{t.value=!t.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:e},null,8,["icon"]))}}),Il={class:"x-mask-toolbar__menu-item"},Ml=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{e("closeTab",s.command)},u=s=>{switch(s.command){case"all":e("closeAllTabs");break;case"other":e("closeOtherTabs");break;default:e("clickTab",s.command);break}},a=s=>{e("actionClick",s)},i=(s,c)=>{e("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Q),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",Il,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ze),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(zl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),Al=Vue.defineComponent({__name:"Avatar",props:{avatar:{},width:{default:350}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:t.width,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:t.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["width","disabled"]))}}),mo=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{},pure:{type:Boolean}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:Vue.normalizeClass(["x-mask__inner",{"is-pure":t.pure}])},[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:t.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})],2)]),_:3}))}});function Rl(){const o=Vue.ref(!1),t=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:t,favorite:n}}function $l(o){const t=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:t,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function Vo(o,t){let n=[];return o.forEach(e=>{e=t?t(e):e,e.children?n=n.concat(Vo(e.children,t)):n.push(e)}),n}function Fl(o,t){const n=VueRouter.useRouter(),e=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>Vo(e.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,h=u.value.get(V);if(!h){console.warn("找不到菜单",f);return}const{type:v="route",url:y,title:b,icon:w}=h;if(!y){a.value=h,t("select",h);return}if(v==="route"){VtjUtils.isUrl(y)||y.startsWith("//")?window.open(y):(a.value=h,n.push(y).catch(_=>_));return}if(v==="window"){window.open(y);return}v==="dialog"&&gt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:b,icon:w,src:y})},s=async()=>{var f,V;e.value=typeof o.menus=="function"?await o.menus()||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?await o.favorites()||[]:(V=o.favorites)!=null?V:[]},c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:e,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function Ol(o,t,n,e,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/fo)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(M=>!M.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=M=>n.value.find(k=>k.url===M),V=M=>l.fullPath===M.url,h=M=>r.value.id===M.id,v=M=>r.value.id===M?r.value:i.value.find(k=>k.id===M),y=Vue.ref(""),b=Vue.computed(()=>v(y.value)),w=M=>{u.push(M.url).catch(k=>k)},_=M=>{y.value=M.id,l.fullPath!==M.url&&w(M)},C=()=>{w(r.value)},g=M=>{const k=i.value.find(E=>E.url===M.url||E.id===M.id);k?_(k):(i.value.unshift(M),_(M))},x=async M=>{var we;const{url:k=l.fullPath,icon:E,title:D}=M||{},O=a[k],X=VtjUtils.uid(),ue=VtjUtils.upperFirstCamelCase(k);return{id:X,name:ue,url:k,icon:E,title:D||((we=f(l.path))==null?void 0:we.title)||"新建页签",closable:!0,menu:M,...O?await O():{}}},S=async(M,k)=>{if(!(!k&&!await ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1))){if(i.value=i.value.filter(E=>E.id!==M.id),y.value===M.id){const E=i.value[0];w(E||r.value)}return M}},I=M=>{const k=i.value.findIndex(E=>E.id===M.id);if(k>=0){const E=i.value[k];i.value.splice(k,1,Object.assign(E,M))}},z=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value;return i.value=[],_(r.value),k},N=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value.filter(E=>E.id!==y.value);return i.value=i.value.filter(E=>E.id===y.value),k},T=M=>{const k=i.value.filter(E=>E.id!==M.id);i.value=[M,...k],_(M)},A=async M=>{b.value&&b.value.closable&&(h(b.value)||(await S(b.value,!0),await VtjUtils.delay(0),M?u.push(M):u.push(r.value.url)))},Y=async()=>{await Vue.nextTick();const M=r.value.url===l.path,k=f(l.fullPath);if(M)y.value=r.value.id;else{const E=await x(k);g(E)}await Vue.nextTick(),e.value=k||null};return Vue.watch(n,Y),Vue.watch(l,Y,{immediate:!0}),Vue.provide(Wt,a),{tabRef:s,tabs:i,showTabs:m,currentTab:b,changeTab:w,removeTab:S,updateTab:I,addTab:g,home:r,tabValue:y,isCurrentTab:V,activeHome:C,activeTab:_,dropdownTabs:p,removeAllTabs:z,removeOtherTabs:N,moveToShow:T,closeCurrnetTab:A}}function jl(o,t){const n=new Map,e=Vue.ref([]),r=Vue.reactive({}),l=Vue.getCurrentInstance(),u={},{updateTab:a,isCurrentTab:i,activeHome:s,tabs:c}=o,d=(w,_)=>{const C=_.fullPath;if(n.has(C))return n.get(C);{const g=VtjUtils.upperFirstCamelCase(C),x={name:g,setup(){const S=Vue.computed(()=>r[C]||document.body),I=Vue.computed(()=>!r[C]),z=Vue.computed(()=>!e.value.includes(g));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw({..._})),()=>z.value?Vue.h(Vue.Teleport,{to:S.value,disabled:I.value},[Vue.h(w)]):null}};return n.set(C,x),x}},m=w=>{w.dialog=void 0,delete r[w.url];const _=u[w.id];_&&(_.destroy(),delete u[w.id],a(w))},p=(w=[])=>{w.forEach(_=>{m(_)})},f=async w=>{w.dialog={...w.dialog,pure:t.pure,onMinimized:()=>{m(w)},onClose:async()=>{m(w),c.value=c.value.filter(C=>C.id!==w.id)}},a(w);const _=gt({title:w.title,icon:w.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0,...w.dialog,onOpen(C){var g,x;r[w.url]=(x=(g=C.refs.panelRef)==null?void 0:g.bodyRef)==null?void 0:x.$el}},l==null?void 0:l.appContext);return await Vue.nextTick(),i(w)&&s(),u[w.id]=_,_},V=async w=>{e.value=[w.name],await Vue.nextTick(),e.value=[]},h=async w=>{e.value=w.map(_=>_.name),await Vue.nextTick(),e.value=[]},v=w=>(w.preventDefault(),!1),y=w=>{if(w.dataTransfer){const _=w.dataTransfer.getData("tab"),C=c.value.find(g=>g.id===_);if(C){const{clientX:g,clientY:x}=w;C.dialog={left:g,top:x},f(C)}}},b=w=>!!r[w];return VueUse.useEventListener(document,"dragover",v),VueUse.useEventListener(document,"drop",y),{createView:d,openDialog:f,refresh:V,exclude:e,cleanCache:h,hasDialog:b,closeDialog:m,closeDialogs:p}}const ho=Vue.defineComponent({name:"XMask",__name:"Mask",props:po,emits:["select","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=$l(n),{collapsed:l,keyword:u,favorite:a}=Rl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Fl(n,e),{tabRef:f,showTabs:V,currentTab:h,changeTab:v,removeTab:y,tabs:b,updateTab:w,isCurrentTab:_,activeHome:C,removeAllTabs:g,removeOtherTabs:x,dropdownTabs:S,moveToShow:I,closeCurrnetTab:z}=Ol(n,e,c,d,r),{createView:N,openDialog:T,closeDialog:A,refresh:Y,exclude:M,cleanCache:k,closeDialogs:E}=jl({tabs:b,updateTab:w,isCurrentTab:_,activeHome:C},n),D=async H=>{await y(H)&&await k([H])},O=async()=>{const H=await g();H&&(E(H),await k(H))},X=async()=>{const H=await x();H&&(E(H),await k(H))},ue=H=>{e("actionClick",H)},we=(H,te)=>{e("actionCommand",H,te)},Yn=async H=>{const te=Vue.toValue(H||h);te&&(te.dialog&&A(te),await y(te,!0),await VtjUtils.delay(50))};return Vue.watch(h,H=>{H!=null&&H.dialog&&A(H)}),Vue.provide(Jt,{tabs:b,flatMenus:c,favorites:s,updateTab:w,active:d,currentTab:h,closeCurrnetTab:z,close:Yn}),(H,te)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(mo,{key:1,createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(bl,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(El,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(Cl,{collasped:Vue.unref(l),"onUpdate:collasped":te[0]||(te[0]=Z=>Vue.isRef(l)?l.value=Z:null),favorite:Vue.unref(a),"onUpdate:favorite":te[1]||(te[1]=Z=>Vue.isRef(a)?a.value=Z:null),keyword:Vue.unref(u),"onUpdate:keyword":te[2]||(te[2]=Z=>Vue.isRef(u)?u.value=Z:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(Sl,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(j),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Z;return[Vue.createVNode(Dl,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Z=Vue.unref(h))==null?void 0:Z.id,onClick:Vue.unref(v),onToggleFavorite:Vue.unref(p),onRemove:D,onDialog:Vue.unref(T),onRefresh:Vue.unref(Y)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(Ml,{tabs:Vue.unref(S),actions:n.actions,theme:n.theme,onCloseOtherTabs:X,onCloseAllTabs:O,onCloseTab:D,onClickTab:Vue.unref(I),onActionClick:ue,onActionCommand:we},{default:Vue.withCtx(()=>[Vue.createVNode(Al,{avatar:n.avatar,width:n.userCardWidth},Vue.createSlots({_:2},[H.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(H.$slots,"user")]),key:"0"}:void 0]),1032,["avatar","width"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(mo,{createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])]),_:3})],64))]),_:3},8,["class"]))}});function Ul(o={}){const t=VueRouter.useRoute(),n=Vue.inject(Wt,null),e=Vue.inject(Jt,null);if(n){const l=typeof o=="function"?o:async()=>o;n[t.fullPath]=l}return{tab:Vue.computed(()=>e?e.tabs.value.find(l=>l.url===t.fullPath):null),mask:e}}const Qt=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,e=t,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);e("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`},{ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Ll=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Hl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Ie={filterResetMethod(o){const{options:t,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}t.forEach(e=>{e.value=""})},filterRecoverMethod(o){const{option:t,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}t.value=""},filterMethod(o){const{option:t,row:n,column:e}=o;if(e.filterMethod)return e.filterMethod(o);const{value:r}=t,l=n[e.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Xl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,cellValue:r,onChange:l}=Fe(t.renderOpts,t.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput"]))}}),ql={class:"x-grid__filter"},Zt=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,state:r,load:l,onChange:u,onKeyup:a}=Mt(t.renderOpts,t.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",ql,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput","onKeyup"])]))}}),qe={autofocus:".el-input__inner",renderDefault(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]},renderEdit(o,t){return[Vue.h(Xl,{params:t,renderOpts:o})]},renderCell(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]}},Kl={cellClassName:"x-grid__edit",...qe,...Ie,renderFilter(o,t){return[Vue.h(Zt,{params:t,renderOpts:o})]}};/**!
7
+ */const ie="0.12.55",Te={default:14,small:12,large:18},Wn={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number},hoverEffect:{type:Boolean}};function Ve(o){return typeof o=="string"?o:`${o}px`}function tt(o=0,t){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const e=Number.parseInt(o);return Math.floor(t*e/100)}return Number.parseInt(o)}function Ut(o,t={}){const n={...t};return typeof o=="boolean"?n:Object.assign(n,o||{})}const Lt="__VTJ_UI_INSTALLED__",mt=Symbol("ADAPTER_KEY");function Vt(){const o=Vue.getCurrentInstance(),t=o==null?void 0:o.appContext.config.globalProperties.$adapter;return t||Vue.inject(mt,{})}const Yr={getCustom:async o=>VtjUtils.storage.get(o,{type:"local"}),saveCustom:async o=>{VtjUtils.storage.save(o.id,o,{type:"local"})}},Gr={install(o,t={}){const n=Object.assign(Yr,t),{components:e=[],fieldEditors:r={}}=n;Yo(r);for(const l of e)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(mt,n)}},Jn=(o=[])=>({install:(n,e={})=>{n[Lt]||(n[Lt]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),e.adapter&&n.provide(mt,e.adapter))}});let Ue;const Qn=new RegExp(`\\<script.*src=["'](?<src>[^"']+)`,"gm");let Wr=60*1e3;async function Jr(){var e;const o=await fetch("?t="+Date.now()).then(r=>r.text());Qn.lastIndex=0;let t=[],n;for(;n=Qn.exec(o);)(e=n.groups)!=null&&e.src&&t.push(n.groups.src);return t}async function Qr(){const o=await Jr();if(!Ue)return Ue=o,!1;let t=!1;Ue.length!==o.length&&(t=!0);for(let n=0;n<Ue.length;n++)if(Ue[n]!==o[n]){t=!0;break}return Ue=o,t}async function Zr(){await ElementPlus.ElMessageBox.confirm("系统发现新版本,请确认是否需要更新。如果确定,系统将会重新登录,请注意存档。",{title:"系统更新",type:"warning",closeOnClickModal:!1}).catch(()=>!1)&&(top||window).location.reload()}function Zn(o){setTimeout(async()=>{await Qr()&&await Zr(),Zn()},o||Wr)}function el(o){Zn(o)}const tl=["src"],de=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Wn,setup(o){const t=o,n=Vue.useAttrs(),e=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!t.icon)return null;const i=e==null?void 0:e.appContext.app;return typeof t.icon=="object"?Vue.markRaw(t.icon):(i==null?void 0:i.component(t.icon))||t.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick,"is-hover-effect":t.hoverEffect};return!r.value&&t.icon&&(i[t.icon]=!0),i}),u=Vue.computed(()=>({"background-color":t.background,"border-radius":t.radius?Ve(t.radius):void 0,padding:t.padding?Ve(t.padding):void 0})),a=Vue.computed(()=>{var i,s;return typeof t.size=="number"?t.size:(s=(i=Te[t.size])!=null?i:Number.parseInt(t.size))!=null?s:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:t.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:t.src},null,8,tl)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),nl={class:"x-menu__wrapper"},ol={key:1,class:"x-menu__title"},rl={key:0,class:"x-menu__title"},eo=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{}},setup(o){const t=o,n=Vue.getCurrentInstance(),e=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||t.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>t.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:t.item.disabled},t.subMenu,{index:String(t.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",nl,[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",ol,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])),_:1,__:[0]},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(t.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{key:i.id,item:i,subMenu:t.subMenu,defaultIcon:t.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(t.item.id),disabled:t.item.disabled},{title:Vue.withCtx(()=>[t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",rl,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])),_:1,__:[1]},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Se=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&e("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{item:{...s,icon:s.icon},defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),Ht={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean}};function ll(o){return Vue.computed(()=>{const t=o.tooltip;if(t)return typeof t=="string"?{content:t}:t})}function al(o){return Vue.computed(()=>{const t=o.badge;if(t)return typeof t=="object"?t:{value:t}})}function ul(o){return Vue.computed(()=>{const{dropdown:t,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},t||{})})}function to(o){const t=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const e=t==null?void 0:t.appContext.app;return{icon:typeof n=="string"&&(e==null?void 0:e.component(n))||n}}else return n;return null})}function De(o){const t=to(o);return t.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(de,t.value)})):void 0}function ht(o,t){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(t):!!n})}function no(o,t,n){const e=Vue.shallowRef(t),r=Vue.ref(!1),l=async a=>{const i=Vue.unref(o);return i?typeof i=="function"?await i(a):i:t},u=async a=>(r.value=!0,await l(a).then(i=>(e.value=i||t,r.value=!1,Vue.unref(e))));return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:e,loading:r,loader:u}}function il(o=1e3){const t=Vue.ref(0);let n;const e=()=>{n=VtjUtils.rAF(()=>{++t.value,t.value<o&&e()})};return Vue.onMounted(e),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>t.value>=r}function oo(o=[]){const t=Vue.useSlots();return Object.keys(t).filter(n=>!o.includes(n))}const sl={key:0},cl=Vue.defineComponent({__name:"Trigger",props:Ht,emits:["click"],setup(o,{emit:t}){const n=o,e=t,r=De(Vue.toRef(n,"icon")),l=ht(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return e("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",sl,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0)],2))}}),dl=["draggable"],Q=Vue.defineComponent({name:"XAction",__name:"Action",props:Ht,emits:["click","command","dragstart","dragend"],setup(o,{emit:t}){const n=o,e=Vue.useSlots(),r=t,l=ll(n),u=al(n),a=ul(n),i=ht(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=b=>{var _;if(i.value)return;const w=(_=n.menus)==null?void 0:_.find(C=>C.command===b);w&&r("command",Vue.toRaw(w))},p=b=>{s&&r("dragstart",Vue.toRaw(n),b)},f=b=>{s&&r("dragend",Vue.toRaw(n),b)},V=b=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(b)),h=b=>Vue.h(ElementPlus.ElDropdown,{...a.value,disabled:i.value,onCommand:m},{default:()=>[b],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((w,_)=>Vue.h(ElementPlus.ElDropdownItem,w,()=>e.item?e.item({item:w,index:_}):w.label)))]}),v=b=>Vue.h(ElementPlus.ElTooltip,{...l.value,disabled:i.value},()=>[b]),y=Vue.computed(()=>{var _;let b=Vue.h(Vue.markRaw(cl),{...n,onClick:d});const w=(_=e.default)==null?void 0:_.call(e);return w&&w.length&&(b=w[0]),u.value&&(b=V(b)),a.value&&(b=h(b)),l.value&&(b=v(b)),b});return(b,w)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(y.value)))],42,dl))}}),ro={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},ze=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:ro,emits:["click","command"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...n.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...n.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),l=a=>{e("click",a)},u=(a,i)=>{e("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(ht)(n.disabled,s).value},{ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),lo={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},j=Vue.defineComponent({name:"XContainer",__name:"Container",props:lo,setup(o,{expose:t}){const n=o,e=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!e.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?Ve(c):void 0,height:d?Ve(d):void 0}});return t({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),ao={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},fl={class:"x-header__content"},pl={key:0,class:"x-header__actions"},Xt=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:ao,setup(o){const t=o,n=De(Vue.toRef(t,"icon")),e=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${t.size}`]:!!t.size&&t.size!=="default","is-border":t.border,"is-pointer":!!e.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(e).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(e).onClickIcon||Vue.unref(e).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",fl,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.content),1)])]),t.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(e).onClick&&Vue.unref(e).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",pl,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),uo={badge:{type:Object},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Le=Vue.defineComponent({name:"XPanel",__name:"Panel",props:uo,setup(o,{expose:t}){const n=o,e=Vue.ref(),r=Vue.computed(()=>({"x-panel__badge-wrapper":!!n.badge,"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.badge===null?null:n.badge?`is-badge-${n.badge.type}`:""),u=Vue.computed(()=>n.header===null||n.header===void 0?null:typeof n.header=="string"?{content:n.header,size:n.size}:{...n.header,size:n.size}),a=Vue.computed(()=>!!u.value),i=Vue.computed(()=>n.fit||n.height?"auto":void 0);return t({bodyRef:e}),(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[a.value||s.$slots.header?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(Xt),Vue.normalizeProps(Vue.guardReactiveProps(u.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(j),Vue.mergeProps({ref_key:"bodyRef",ref:e,flex:!1,overflow:i.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"default")]),_:3},16,["overflow"]),s.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(j),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0),n.badge?(Vue.openBlock(),Vue.createElementBlock("div",{key:2,class:Vue.normalizeClass(["x-panel__badge",l.value])},Vue.toDisplayString(n.badge.text),3)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),io="user-select-none";class qt{constructor(t,n={}){Ee(this,"scope");Ee(this,"dragging",!1);this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:t,handle:n}=this.options;return t?this.el.querySelector(t):n}getTarget(){const{target:t="body"}=this.options;return typeof t=="string"?document.querySelector(t):Vue.unref(t)||document.body}init(){const{el:t,options:n}=this,{disabled:e,delay:r=150,onStart:l,onEnd:u}=n;if(e)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=t.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(t,{initialValue:{x:c.x,y:c.y},...n,handle:i,onStart:(f,V)=>{document.body.classList.add(io),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=t.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(io),this.dragging&&d){this.dragging=!1;const{x:h,y:v}=f,y=this.getPosition(d,c,h,v);u&&u(y,V),d=null}}});Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);t.style.left=`${f.x}px`,t.style.top=`${f.y}px`}})}getPosition(t,n,e,r){const{edge:l=50}=this.options,u=-n.width+t.x+l,a=t.width+t.x-l,i=t.y,s=t.height+t.y-l,c=Math.min(a,Math.max(e,u)),d=Math.min(s,Math.max(r,i));return{x:c-t.x,y:d-t.y}}destory(){this.scope.stop()}}const so={mounted(o,t){const n=t.value||{},e=new qt(o,n);o.__draggable__=e},updated(o,t){const n=t.value||{};let e=o.__draggable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__draggable__=new qt(o,n))},unmounted(o){const t=o.__draggable__;t&&(t.destory(),o.__draggable__=null)}},Kt="user-select-none";class Yt{constructor(t,n={}){Ee(this,"scope");Ee(this,"resizing",Vue.ref(!1));Ee(this,"direction",Vue.ref(""));Ee(this,"MIE",null);Ee(this,"cleanMousedown");Ee(this,"cleanMouseup");this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:t,options:n}=this,{disabled:e,onStart:r,onEnd:l}=n;if(e)return;this.MIE=VueUse.useMouseInElement(t),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,t.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(t.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(Kt):s.classList.remove(Kt)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:t,direction:n,resizing:e,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!t||!e.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=t,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:h=99999,maxHeight:v=99999}=r;if(u.includes("e")){const y=Math.min(Math.max(s.value,f),h);l.style.width=`${y}px`}if(u.includes("s")){const y=Math.min(Math.max(c.value,V),v);l.style.height=`${y}px`}if(u.includes("w")){const y=Math.min(Math.max(m.value-s.value,f),h);l.style.width=`${y}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const y=Math.min(Math.max(d.value-c.value,V),v);this.el.style.height=`${y}px`,this.el.style.top=`${i.value}px`}p&&p(u,t)}getDirection(){if(!this.MIE)return"";const{elementX:t,elementY:n,elementHeight:e,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>e.value-a&&(i+="s"),u.includes("w")&&t.value<=a?i+="w":u.includes("e")&&t.value>r.value-a&&(i+="e"),i}destory(){var n;const t=document.body;t.style.cursor="",t.classList.remove(Kt),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const Gt={mounted(o,t){const n=t.value||{},e=new Yt(o,n);o.__resizable__=e},updated(o,t){const n=t.value||{};let e=o.__resizable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__resizable__=new Yt(o,n))},unmounted(o){const t=o.__resizable__;t&&(t.destory(),o.__resizable__=null)}},co={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean},pure:{type:Boolean}};let He=1e3;function ml(o,t){const{width:n,height:e}=VueUse.useElementSize(t),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++He,dragging:!1,resizing:!1});return Vue.watch([n,e],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=tt(o.width,l),r.height=tt(o.height,u),r.left=o.left?tt(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?tt(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{He=Math.max(l.zIndex,He)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Vl(o,t){const n=Vue.computed(()=>{const{width:a,height:i,top:s,left:c,zIndex:d}=t;return{width:`${a}px`,height:`${i}px`,top:`${s}px`,left:`${c}px`,zIndex:d}}),e=Vue.computed(()=>{const{zIndex:a}=t;return{zIndex:a}}),r=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary,"is-pure":!!o.pure})),l=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-dragging":t.dragging,"is-resizing":t.resizing})),u=Vue.computed(()=>({zIndex:t.zIndex}));return{styles:n,classes:r,wrapperClass:l,modalStyle:u,zIndexStyle:e}}function hl(o,t,n){const e=c=>{t.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=async()=>{(!o.beforeClose||await o.beforeClose())&&(n("update:modelValue",!1),n("close"),n("destroy"))};return{close:r,changeMode:e,show:()=>e("normal"),hide:()=>e("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(t.zIndex=Math.max(t.zIndex,++He))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function gl(o,t,n,e){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return{...VtjUtils.isObject(o.draggable)?o.draggable:{},disabled:r,target:e,selector:".x-panel__header",onStart(u){t.dragging=!0,t.zIndex=Math.max(t.zIndex,++He),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(t.mode==="maximized")return;const{x:a,y:i}=u;t.left=a,t.top=i,t.dragging=!1,n("dragEnd",u)}}})}function vl(o,t,n){return Vue.computed(()=>{var r;const e=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return{minWidth:200,minHeight:150,...VtjUtils.isObject(o.resizable)?o.resizable:{},disabled:e,dirs:["e","s","w"],onStart(l,u){t.resizing=!0,t.zIndex=Math.max(t.zIndex,++He),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();t.left=u.elementPositionX.value-a.x,t.top=u.elementPositionY.value-a.y,t.width=u.elementWidth.value,t.height=u.elementHeight.value,t.resizing=!1,n("resizeEnd",l,u)}}})}function yl(o,t){const n=o.componentInstance;if(!n)return;let e=null;return Vue.onMounted(()=>{const r=Vue.unref(t),l=Vue.unref(r==null?void 0:r.bodyRef);e=n.$el,l&&l.$el&&l.$el.appendChild(e)}),Vue.onUnmounted(()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),{componentInstance:n}}const wl=["src"],Xe=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:co,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:t,emit:n}){const e=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=ml(e,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V,zIndexStyle:h}=Vl(e,i),{changeMode:v,active:y,close:b,show:w,hide:_,submit:C,cancel:g}=hl(e,i,r),x=gl(e,i,r,u),S=vl(e,i,r),I=yl(e,a);Vue.watchEffect(async()=>{e.modelValue?(await Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")}),Vue.onUnmounted(()=>{document.body.classList.remove("x-dialog-visible")});const z=Vue.computed(()=>{var N;return(N=a.value)==null?void 0:N.$el});return t({$vtjEl:z,panelRef:a,state:i,maximized:s,minimized:c,changeMode:v,show:w,hide:_,submit:C,cancel:g,close:b,componentInstance:I}),(N,T)=>e.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)]),style:Vue.normalizeStyle(Vue.unref(h))},[e.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Le),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:e.icon,subtitle:e.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:e.size,body:{padding:e.bodyPadding},onClick:Vue.unref(y)},N.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"actions"),e.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[0]||(T[0]=A=>Vue.unref(v)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),e.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[2]||(T[2]=A=>Vue.unref(v)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Popup),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[1]||(T[1]=A=>Vue.unref(v)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),e.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:e.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(b)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"default",{},()=>[e.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.content),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:e.src,class:"x-dialog__frame"},null,8,wl)):Vue.createCommentVNode("",!0)])]),_:2},[e.cancel||e.submit||N.$slots.footer||N.$slots.extra||N.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(j),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"handle"),e.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:e.size,onClick:Vue.unref(g)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.cancel=="string"?e.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),e.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:e.size,onClick:Vue.unref(C)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.submit=="string"?e.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(so),Vue.unref(x)],[Vue.unref(Gt),Vue.unref(S)]])],6)])):Vue.createCommentVNode("",!0)}});function gt(o,t){const n=document.createElement("div"),e=Vue.createVNode(Xe,o);e.appContext=t!=null?t:gt._context,Vue.render(e,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return e.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:e,destroy:r}}const bl=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const t=o;return(n,e)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":t.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(j),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),e[0]||(e[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3,__:[0]})]),_:3},8,["class"])),[[Vue.unref(Gt),{dirs:["e"],disabled:t.collapsed,maxWidth:500,minWidth:200}]])}}),Cl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:t}){const n=o,e=t,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,e("update:keyword",l.value)},s=()=>{e("update:collasped",!n.collasped)},c=()=>{e("update:keyword",l.value)},d=()=>{e("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(de),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),_l=["src"],kl={key:0},El=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const t=o,n=VueRouter.useRouter(),e=()=>{t.url&&n.push(t.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":t.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:e},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[t.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:t.logo},null,8,_l)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(j),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[t.title?(Vue.openBlock(),Vue.createElementBlock("span",kl,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),vt="__favorites__",yt="__search__",Sl=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=Vue.computed(()=>n.menus||[]),r=t,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:vt,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:vt+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:yt,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:yt+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),e.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(j),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(j),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),xl="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",fo=140,po={logo:{type:String,default:xl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function},userCardWidth:{type:Number,default:350},pure:{type:Boolean}},Wt=Symbol(),Jt="$mask",Bl={class:"x-mask-tabs__trigger"},Pl={key:1},Nl=["onDragstart","onDragend"],Tl={key:1},Dl=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:t}){const n=o,e=t,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu||!!c.menu.hidden},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){e("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&e("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&e("remove",d)},a=c=>{switch(c.name){case"refresh":e("refresh",c.value);break;case"favorite":e("toggleFavorite",c.value);break;case"dialog":e("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",Bl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",Pl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",Tl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,Nl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ze),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),zl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const t=VueUse.useDark(),n=Vue.computed(()=>t.value?VtjIcons.Sunny:VtjIcons.Moon),e=()=>{t.value=!t.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:e},null,8,["icon"]))}}),Il={class:"x-mask-toolbar__menu-item"},Ml=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{e("closeTab",s.command)},u=s=>{switch(s.command){case"all":e("closeAllTabs");break;case"other":e("closeOtherTabs");break;default:e("clickTab",s.command);break}},a=s=>{e("actionClick",s)},i=(s,c)=>{e("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Q),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",Il,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(de),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ze),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(zl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),Al=Vue.defineComponent({__name:"Avatar",props:{avatar:{},width:{default:350}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:t.width,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:t.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["width","disabled"]))}}),mo=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{},pure:{type:Boolean}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:Vue.normalizeClass(["x-mask__inner",{"is-pure":t.pure}])},[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:t.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})],2)]),_:3}))}});function Rl(){const o=Vue.ref(!1),t=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:t,favorite:n}}function $l(o){const t=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:t,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function Vo(o,t){let n=[];return o.forEach(e=>{e=t?t(e):e,e.children?n=n.concat(Vo(e.children,t)):n.push(e)}),n}function Fl(o,t){const n=VueRouter.useRouter(),e=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>Vo(e.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,h=u.value.get(V);if(!h){console.warn("找不到菜单",f);return}const{type:v="route",url:y,title:b,icon:w}=h;if(!y){a.value=h,t("select",h);return}if(v==="route"){VtjUtils.isUrl(y)||y.startsWith("//")?window.open(y):(a.value=h,n.push(y).catch(_=>_));return}if(v==="window"){window.open(y);return}v==="dialog"&&gt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:b,icon:w,src:y})},s=async()=>{var f,V;e.value=typeof o.menus=="function"?await o.menus()||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?await o.favorites()||[]:(V=o.favorites)!=null?V:[]},c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:e,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function Ol(o,t,n,e,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/fo)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(M=>!M.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=M=>n.value.find(k=>k.url===M),V=M=>l.fullPath===M.url,h=M=>r.value.id===M.id,v=M=>r.value.id===M?r.value:i.value.find(k=>k.id===M),y=Vue.ref(""),b=Vue.computed(()=>v(y.value)),w=M=>{u.push(M.url).catch(k=>k)},_=M=>{y.value=M.id,l.fullPath!==M.url&&w(M)},C=()=>{w(r.value)},g=M=>{const k=i.value.find(E=>E.url===M.url||E.id===M.id);k?_(k):(i.value.unshift(M),_(M))},x=async M=>{var we;const{url:k=l.fullPath,icon:E,title:D}=M||{},O=a[k],X=VtjUtils.uid(),ue=VtjUtils.upperFirstCamelCase(k);return{id:X,name:ue,url:k,icon:E,title:D||((we=f(l.path))==null?void 0:we.title)||"新建页签",closable:!0,menu:M,...O?await O():{}}},S=async(M,k)=>{if(!(!k&&!await ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1))){if(i.value=i.value.filter(E=>E.id!==M.id),y.value===M.id){const E=i.value[0];w(E||r.value)}return M}},I=M=>{const k=i.value.findIndex(E=>E.id===M.id);if(k>=0){const E=i.value[k];i.value.splice(k,1,Object.assign(E,M))}},z=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value;return i.value=[],_(r.value),k},N=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value.filter(E=>E.id!==y.value);return i.value=i.value.filter(E=>E.id===y.value),k},T=M=>{const k=i.value.filter(E=>E.id!==M.id);i.value=[M,...k],_(M)},A=async M=>{b.value&&b.value.closable&&(h(b.value)||(await S(b.value,!0),await VtjUtils.delay(0),M?u.push(M):u.push(r.value.url)))},Y=async()=>{await Vue.nextTick();const M=r.value.url===l.path,k=f(l.fullPath);if(M)y.value=r.value.id;else{const E=await x(k);g(E)}await Vue.nextTick(),e.value=k||null};return Vue.watch(n,Y),Vue.watch(l,Y,{immediate:!0}),Vue.provide(Wt,a),{tabRef:s,tabs:i,showTabs:m,currentTab:b,changeTab:w,removeTab:S,updateTab:I,addTab:g,home:r,tabValue:y,isCurrentTab:V,activeHome:C,activeTab:_,dropdownTabs:p,removeAllTabs:z,removeOtherTabs:N,moveToShow:T,closeCurrnetTab:A}}function jl(o,t){const n=new Map,e=Vue.ref([]),r=Vue.reactive({}),l=Vue.getCurrentInstance(),u={},{updateTab:a,isCurrentTab:i,activeHome:s,tabs:c}=o,d=(w,_)=>{const C=_.fullPath;if(n.has(C))return n.get(C);{const g=VtjUtils.upperFirstCamelCase(C),x={name:g,setup(){const S=Vue.computed(()=>r[C]||document.body),I=Vue.computed(()=>!r[C]),z=Vue.computed(()=>!e.value.includes(g));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw({..._})),()=>z.value?Vue.h(Vue.Teleport,{to:S.value,disabled:I.value},[Vue.h(w)]):null}};return n.set(C,x),x}},m=w=>{w.dialog=void 0,delete r[w.url];const _=u[w.id];_&&(_.destroy(),delete u[w.id],a(w))},p=(w=[])=>{w.forEach(_=>{m(_)})},f=async w=>{w.dialog={...w.dialog,pure:t.pure,onMinimized:()=>{m(w)},onClose:async()=>{m(w),c.value=c.value.filter(C=>C.id!==w.id)}},a(w);const _=gt({title:w.title,icon:w.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0,...w.dialog,onOpen(C){var g,x;r[w.url]=(x=(g=C.refs.panelRef)==null?void 0:g.bodyRef)==null?void 0:x.$el}},l==null?void 0:l.appContext);return await Vue.nextTick(),i(w)&&s(),u[w.id]=_,_},V=async w=>{e.value=[w.name],await Vue.nextTick(),e.value=[]},h=async w=>{e.value=w.map(_=>_.name),await Vue.nextTick(),e.value=[]},v=w=>(w.preventDefault(),!1),y=w=>{if(w.dataTransfer){const _=w.dataTransfer.getData("tab"),C=c.value.find(g=>g.id===_);if(C){const{clientX:g,clientY:x}=w;C.dialog={left:g,top:x},f(C)}}},b=w=>!!r[w];return VueUse.useEventListener(document,"dragover",v),VueUse.useEventListener(document,"drop",y),{createView:d,openDialog:f,refresh:V,exclude:e,cleanCache:h,hasDialog:b,closeDialog:m,closeDialogs:p}}const ho=Vue.defineComponent({name:"XMask",__name:"Mask",props:po,emits:["select","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=$l(n),{collapsed:l,keyword:u,favorite:a}=Rl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Fl(n,e),{tabRef:f,showTabs:V,currentTab:h,changeTab:v,removeTab:y,tabs:b,updateTab:w,isCurrentTab:_,activeHome:C,removeAllTabs:g,removeOtherTabs:x,dropdownTabs:S,moveToShow:I,closeCurrnetTab:z}=Ol(n,e,c,d,r),{createView:N,openDialog:T,closeDialog:A,refresh:Y,exclude:M,cleanCache:k,closeDialogs:E}=jl({tabs:b,updateTab:w,isCurrentTab:_,activeHome:C},n),D=async H=>{await y(H)&&await k([H])},O=async()=>{const H=await g();H&&(E(H),await k(H))},X=async()=>{const H=await x();H&&(E(H),await k(H))},ue=H=>{e("actionClick",H)},we=(H,te)=>{e("actionCommand",H,te)},Yn=async H=>{const te=Vue.toValue(H||h);te&&(te.dialog&&A(te),await y(te,!0),await VtjUtils.delay(50))};return Vue.watch(h,H=>{H!=null&&H.dialog&&A(H)}),Vue.provide(Jt,{tabs:b,flatMenus:c,favorites:s,updateTab:w,active:d,currentTab:h,closeCurrnetTab:z,close:Yn}),(H,te)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(j),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(mo,{key:1,createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(bl,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(El,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(Cl,{collasped:Vue.unref(l),"onUpdate:collasped":te[0]||(te[0]=Z=>Vue.isRef(l)?l.value=Z:null),favorite:Vue.unref(a),"onUpdate:favorite":te[1]||(te[1]=Z=>Vue.isRef(a)?a.value=Z:null),keyword:Vue.unref(u),"onUpdate:keyword":te[2]||(te[2]=Z=>Vue.isRef(u)?u.value=Z:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(Sl,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(j),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(j),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Z;return[Vue.createVNode(Dl,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Z=Vue.unref(h))==null?void 0:Z.id,onClick:Vue.unref(v),onToggleFavorite:Vue.unref(p),onRemove:D,onDialog:Vue.unref(T),onRefresh:Vue.unref(Y)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(Ml,{tabs:Vue.unref(S),actions:n.actions,theme:n.theme,onCloseOtherTabs:X,onCloseAllTabs:O,onCloseTab:D,onClickTab:Vue.unref(I),onActionClick:ue,onActionCommand:we},{default:Vue.withCtx(()=>[Vue.createVNode(Al,{avatar:n.avatar,width:n.userCardWidth},Vue.createSlots({_:2},[H.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(H.$slots,"user")]),key:"0"}:void 0]),1032,["avatar","width"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(mo,{createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])]),_:3})],64))]),_:3},8,["class"]))}});function Ul(o={}){const t=VueRouter.useRoute(),n=Vue.inject(Wt,null),e=Vue.inject(Jt,null);if(n){const l=typeof o=="function"?o:async()=>o;n[t.fullPath]=l}return{tab:Vue.computed(()=>e?e.tabs.value.find(l=>l.url===t.fullPath):null),mask:e}}const Qt=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,e=t,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);e("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`},{ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Ll=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Hl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Ie={filterResetMethod(o){const{options:t,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}t.forEach(e=>{e.value=""})},filterRecoverMethod(o){const{option:t,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}t.value=""},filterMethod(o){const{option:t,row:n,column:e}=o;if(e.filterMethod)return e.filterMethod(o);const{value:r}=t,l=n[e.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Xl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,cellValue:r,onChange:l}=Fe(t.renderOpts,t.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput"]))}}),ql={class:"x-grid__filter"},Zt=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,state:r,load:l,onChange:u,onKeyup:a}=Mt(t.renderOpts,t.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",ql,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput","onKeyup"])]))}}),qe={autofocus:".el-input__inner",renderDefault(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]},renderEdit(o,t){return[Vue.h(Xl,{params:t,renderOpts:o})]},renderCell(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]}},Kl={cellClassName:"x-grid__edit",...qe,...Ie,renderFilter(o,t){return[Vue.h(Zt,{params:t,renderOpts:o})]}};/**!
8
8
  * Sortable 1.15.6
9
9
  * @author RubaXa <trash@rubaxa.org>
10
10
  * @author owenm <owen23355@gmail.com>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/ui",
3
3
  "private": false,
4
- "version": "0.12.53",
4
+ "version": "0.12.55",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -24,13 +24,13 @@
24
24
  "node": ">=16.0.0"
25
25
  },
26
26
  "dependencies": {
27
- "@vueuse/core": "~13.3.0",
27
+ "@vueuse/core": "~13.5.0",
28
28
  "element-plus": "~2.10.0",
29
29
  "sortablejs": "~1.15.6",
30
30
  "vxe-table": "~4.6.17",
31
31
  "vxe-table-plugin-menus": "~4.0.3",
32
- "@vtj/utils": "~0.12.53",
33
- "@vtj/icons": "~0.12.53"
32
+ "@vtj/icons": "~0.12.55",
33
+ "@vtj/utils": "~0.12.55"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/qrcode": "^1.5.5",
@@ -38,7 +38,7 @@
38
38
  "qrcode": "~1.5.3",
39
39
  "vue": "~3.5.5",
40
40
  "vue-router": "~4.5.0",
41
- "@vtj/cli": "~0.12.7"
41
+ "@vtj/cli": "~0.12.8"
42
42
  },
43
43
  "files": [
44
44
  "dist",
@@ -114,7 +114,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
114
114
  readonly __epPropKey: true;
115
115
  };
116
116
  readonly type: {
117
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
117
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
118
118
  readonly required: false;
119
119
  readonly validator: ((val: unknown) => boolean) | undefined;
120
120
  __epPropKey: true;
@@ -311,7 +311,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
311
311
  readonly __epPropKey: true;
312
312
  };
313
313
  readonly type: {
314
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
314
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
315
315
  readonly required: false;
316
316
  readonly validator: ((val: unknown) => boolean) | undefined;
317
317
  __epPropKey: true;
@@ -507,7 +507,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
507
507
  readonly __epPropKey: true;
508
508
  };
509
509
  readonly type: {
510
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
510
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
511
511
  readonly required: false;
512
512
  readonly validator: ((val: unknown) => boolean) | undefined;
513
513
  __epPropKey: true;
@@ -756,7 +756,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
756
756
  readonly __epPropKey: true;
757
757
  };
758
758
  readonly type: {
759
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
759
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
760
760
  readonly required: false;
761
761
  readonly validator: ((val: unknown) => boolean) | undefined;
762
762
  __epPropKey: true;
@@ -953,7 +953,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
953
953
  readonly __epPropKey: true;
954
954
  };
955
955
  readonly type: {
956
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
956
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
957
957
  readonly required: false;
958
958
  readonly validator: ((val: unknown) => boolean) | undefined;
959
959
  __epPropKey: true;
@@ -1149,7 +1149,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1149
1149
  readonly __epPropKey: true;
1150
1150
  };
1151
1151
  readonly type: {
1152
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
1152
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
1153
1153
  readonly required: false;
1154
1154
  readonly validator: ((val: unknown) => boolean) | undefined;
1155
1155
  __epPropKey: true;
@@ -28,7 +28,7 @@ export declare function useDropdown(props: ActionProps): ComputedRef<Partial< Ex
28
28
  readonly __epPropKey: true;
29
29
  };
30
30
  readonly type: {
31
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
31
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
32
32
  readonly required: false;
33
33
  readonly validator: ((val: unknown) => boolean) | undefined;
34
34
  __epPropKey: true;
@@ -95,7 +95,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
95
95
  readonly __epPropKey: true;
96
96
  };
97
97
  readonly type: {
98
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
98
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
99
99
  readonly required: false;
100
100
  readonly validator: ((val: unknown) => boolean) | undefined;
101
101
  __epPropKey: true;
@@ -291,7 +291,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
291
291
  readonly __epPropKey: true;
292
292
  };
293
293
  readonly type: {
294
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
294
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
295
295
  readonly required: false;
296
296
  readonly validator: ((val: unknown) => boolean) | undefined;
297
297
  __epPropKey: true;
@@ -525,7 +525,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
525
525
  readonly __epPropKey: true;
526
526
  };
527
527
  readonly type: {
528
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
528
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
529
529
  readonly required: false;
530
530
  readonly validator: ((val: unknown) => boolean) | undefined;
531
531
  __epPropKey: true;
@@ -721,7 +721,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
721
721
  readonly __epPropKey: true;
722
722
  };
723
723
  readonly type: {
724
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
724
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
725
725
  readonly required: false;
726
726
  readonly validator: ((val: unknown) => boolean) | undefined;
727
727
  __epPropKey: true;
@@ -32,9 +32,9 @@ declare function __VLS_template(): {
32
32
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
33
33
  readonly method: string;
34
34
  readonly action: string;
35
+ readonly accept: string;
35
36
  readonly withCredentials: boolean;
36
37
  readonly showFileList: boolean;
37
- readonly accept: string;
38
38
  readonly fileList: UploadUserFile[];
39
39
  readonly autoUpload: boolean;
40
40
  readonly listType: "picture" | "text" | "picture-card";
@@ -295,9 +295,9 @@ declare function __VLS_template(): {
295
295
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
296
296
  readonly method: string;
297
297
  readonly action: string;
298
+ readonly accept: string;
298
299
  readonly withCredentials: boolean;
299
300
  readonly showFileList: boolean;
300
- readonly accept: string;
301
301
  readonly fileList: UploadUserFile[];
302
302
  readonly autoUpload: boolean;
303
303
  readonly listType: "picture" | "text" | "picture-card";
@@ -346,9 +346,9 @@ declare function __VLS_template(): {
346
346
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
347
347
  readonly method: string;
348
348
  readonly action: string;
349
+ readonly accept: string;
349
350
  readonly withCredentials: boolean;
350
351
  readonly showFileList: boolean;
351
- readonly accept: string;
352
352
  readonly fileList: UploadUserFile[];
353
353
  readonly autoUpload: boolean;
354
354
  readonly listType: "picture" | "text" | "picture-card";
@@ -799,9 +799,9 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
799
799
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
800
800
  readonly method: string;
801
801
  readonly action: string;
802
+ readonly accept: string;
802
803
  readonly withCredentials: boolean;
803
804
  readonly showFileList: boolean;
804
- readonly accept: string;
805
805
  readonly fileList: UploadUserFile[];
806
806
  readonly autoUpload: boolean;
807
807
  readonly listType: "picture" | "text" | "picture-card";
@@ -1062,9 +1062,9 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1062
1062
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
1063
1063
  readonly method: string;
1064
1064
  readonly action: string;
1065
+ readonly accept: string;
1065
1066
  readonly withCredentials: boolean;
1066
1067
  readonly showFileList: boolean;
1067
- readonly accept: string;
1068
1068
  readonly fileList: UploadUserFile[];
1069
1069
  readonly autoUpload: boolean;
1070
1070
  readonly listType: "picture" | "text" | "picture-card";
@@ -1113,9 +1113,9 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1113
1113
  readonly onProgress: (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
1114
1114
  readonly method: string;
1115
1115
  readonly action: string;
1116
+ readonly accept: string;
1116
1117
  readonly withCredentials: boolean;
1117
1118
  readonly showFileList: boolean;
1118
- readonly accept: string;
1119
1119
  readonly fileList: UploadUserFile[];
1120
1120
  readonly autoUpload: boolean;
1121
1121
  readonly listType: "picture" | "text" | "picture-card";
@@ -118,7 +118,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
118
118
  readonly __epPropKey: true;
119
119
  };
120
120
  readonly type: {
121
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
121
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
122
122
  readonly required: false;
123
123
  readonly validator: ((val: unknown) => boolean) | undefined;
124
124
  __epPropKey: true;
@@ -314,7 +314,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
314
314
  readonly __epPropKey: true;
315
315
  };
316
316
  readonly type: {
317
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
317
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
318
318
  readonly required: false;
319
319
  readonly validator: ((val: unknown) => boolean) | undefined;
320
320
  __epPropKey: true;
@@ -560,7 +560,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
560
560
  readonly __epPropKey: true;
561
561
  };
562
562
  readonly type: {
563
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
563
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
564
564
  readonly required: false;
565
565
  readonly validator: ((val: unknown) => boolean) | undefined;
566
566
  __epPropKey: true;
@@ -756,7 +756,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
756
756
  readonly __epPropKey: true;
757
757
  };
758
758
  readonly type: {
759
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
759
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
760
760
  readonly required: false;
761
761
  readonly validator: ((val: unknown) => boolean) | undefined;
762
762
  __epPropKey: true;
@@ -129,7 +129,7 @@ declare function __VLS_template(): {
129
129
  }>>, {
130
130
  size: ComputedRef<"" | "small" | "default" | "large">;
131
131
  validateMessage: Ref<string>;
132
- validateState: Ref<"" | "error" | "validating" | "success">;
132
+ validateState: Ref<"" | "error" | "success" | "validating">;
133
133
  validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult;
134
134
  clearValidate: () => void;
135
135
  resetField: () => void;
@@ -236,7 +236,7 @@ declare function __VLS_template(): {
236
236
  }>>, "size" | "required" | "validateState" | "clearValidate" | "validate" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "validateMessage" | "resetField"> & ShallowUnwrapRef<{
237
237
  size: ComputedRef<"" | "small" | "default" | "large">;
238
238
  validateMessage: Ref<string>;
239
- validateState: Ref<"" | "error" | "validating" | "success">;
239
+ validateState: Ref<"" | "error" | "success" | "validating">;
240
240
  validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult;
241
241
  clearValidate: () => void;
242
242
  resetField: () => void;
@@ -526,7 +526,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
526
526
  }>>, {
527
527
  size: ComputedRef<"" | "small" | "default" | "large">;
528
528
  validateMessage: Ref<string>;
529
- validateState: Ref<"" | "error" | "validating" | "success">;
529
+ validateState: Ref<"" | "error" | "success" | "validating">;
530
530
  validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult;
531
531
  clearValidate: () => void;
532
532
  resetField: () => void;
@@ -633,7 +633,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
633
633
  }>>, "size" | "required" | "validateState" | "clearValidate" | "validate" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage" | "validateMessage" | "resetField"> & ShallowUnwrapRef<{
634
634
  size: ComputedRef<"" | "small" | "default" | "large">;
635
635
  validateMessage: Ref<string>;
636
- validateState: Ref<"" | "error" | "validating" | "success">;
636
+ validateState: Ref<"" | "error" | "success" | "validating">;
637
637
  validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult;
638
638
  clearValidate: () => void;
639
639
  resetField: () => void;
@@ -23,6 +23,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
23
23
  } & {
24
24
  readonly default: true;
25
25
  };
26
+ readonly showWeekNumber: BooleanConstructor;
26
27
  readonly ariaLabel: StringConstructor;
27
28
  readonly emptyValues: ArrayConstructor;
28
29
  readonly valueOnClear: {
@@ -235,6 +236,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
235
236
  readonly rangeSeparator: string;
236
237
  readonly shortcuts: unknown[];
237
238
  readonly showNow: boolean;
239
+ readonly showWeekNumber: boolean;
238
240
  readonly arrowControl: boolean;
239
241
  readonly unlinkPanels: boolean;
240
242
  readonly isRange: boolean;
@@ -262,6 +264,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
262
264
  } & {
263
265
  readonly default: true;
264
266
  };
267
+ readonly showWeekNumber: BooleanConstructor;
265
268
  readonly ariaLabel: StringConstructor;
266
269
  readonly emptyValues: ArrayConstructor;
267
270
  readonly valueOnClear: {
@@ -474,6 +477,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
474
477
  readonly rangeSeparator: string;
475
478
  readonly shortcuts: unknown[];
476
479
  readonly showNow: boolean;
480
+ readonly showWeekNumber: boolean;
477
481
  readonly arrowControl: boolean;
478
482
  readonly unlinkPanels: boolean;
479
483
  readonly isRange: boolean;
@@ -39,6 +39,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
39
39
  readonly validateEvent: boolean;
40
40
  readonly inputStyle: StyleValue;
41
41
  readonly rows: number;
42
+ readonly inputmode: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
42
43
  readonly clearable: boolean;
43
44
  readonly showPassword: boolean;
44
45
  readonly showWordLimit: boolean;
@@ -59,10 +60,12 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
59
60
  readonly inputStyle: string | false | CSSProperties | StyleValue[] | null;
60
61
  readonly rows: number;
61
62
  readonly size?: ("" | "large" | "default" | "small") | undefined;
63
+ readonly name?: string | undefined;
62
64
  readonly form?: string | undefined;
63
65
  readonly id?: string | undefined;
64
66
  readonly ariaLabel?: string | undefined;
65
67
  readonly resize?: ("none" | "horizontal" | "vertical" | "both") | undefined;
68
+ readonly inputmode?: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
66
69
  readonly maxlength?: (string | number) | undefined;
67
70
  readonly minlength?: (string | number) | undefined;
68
71
  readonly formatter?: Function | undefined;
@@ -83,7 +86,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
83
86
  onMouseenter?: ((evt: MouseEvent) => any) | undefined | undefined;
84
87
  onMouseleave?: ((evt: MouseEvent) => any) | undefined | undefined;
85
88
  onClear?: (() => any) | undefined | undefined;
86
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "type" | "disabled" | "id" | "tabindex" | "autofocus" | "modelValue" | "validateEvent" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows">;
89
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "type" | "disabled" | "id" | "tabindex" | "autofocus" | "modelValue" | "validateEvent" | "inputmode" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows">;
87
90
  $attrs: {
88
91
  [x: string]: unknown;
89
92
  };
@@ -99,6 +102,15 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
99
102
  $emit: ((event: "clear") => void) & ((event: "input", value: string) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "change", value: string) => void) & ((event: "compositionend", evt: CompositionEvent) => void) & ((event: "compositionstart", evt: CompositionEvent) => void) & ((event: "compositionupdate", evt: CompositionEvent) => void) & ((event: "keydown", evt: Event | KeyboardEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void) & ((event: "mouseleave", evt: MouseEvent) => void) & ((event: "update:modelValue", value: string) => void);
100
103
  $el: any;
101
104
  $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{
105
+ readonly inputmode: {
106
+ readonly type: PropType<"none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined>;
107
+ readonly required: false;
108
+ readonly validator: ((val: unknown) => boolean) | undefined;
109
+ __epPropKey: true;
110
+ } & {
111
+ readonly default: undefined;
112
+ };
113
+ readonly name: StringConstructor;
102
114
  readonly ariaLabel: StringConstructor;
103
115
  readonly id: {
104
116
  readonly type: PropType<string>;
@@ -297,6 +309,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
297
309
  readonly validateEvent: boolean;
298
310
  readonly inputStyle: StyleValue;
299
311
  readonly rows: number;
312
+ readonly inputmode: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
300
313
  readonly clearable: boolean;
301
314
  readonly showPassword: boolean;
302
315
  readonly showWordLimit: boolean;
@@ -334,11 +347,21 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
334
347
  readonly validateEvent: boolean;
335
348
  readonly inputStyle: StyleValue;
336
349
  readonly rows: number;
350
+ readonly inputmode: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
337
351
  readonly clearable: boolean;
338
352
  readonly showPassword: boolean;
339
353
  readonly showWordLimit: boolean;
340
354
  readonly autofocus: boolean;
341
355
  }> & Omit<Readonly< ExtractPropTypes<{
356
+ readonly inputmode: {
357
+ readonly type: PropType<"none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined>;
358
+ readonly required: false;
359
+ readonly validator: ((val: unknown) => boolean) | undefined;
360
+ __epPropKey: true;
361
+ } & {
362
+ readonly default: undefined;
363
+ };
364
+ readonly name: StringConstructor;
342
365
  readonly ariaLabel: StringConstructor;
343
366
  readonly id: {
344
367
  readonly type: PropType<string>;
@@ -499,7 +522,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
499
522
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
500
523
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
501
524
  onClear?: (() => any) | undefined;
502
- }, "clear" | "type" | "disabled" | "ref" | "input" | "select" | "textarea" | "id" | "tabindex" | "focus" | "autofocus" | "blur" | "modelValue" | "validateEvent" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
525
+ }, "clear" | "type" | "disabled" | "ref" | "input" | "select" | "textarea" | "id" | "tabindex" | "focus" | "autofocus" | "blur" | "modelValue" | "validateEvent" | "inputmode" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
503
526
  input: ShallowRef<HTMLInputElement | undefined>;
504
527
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
505
528
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -253,7 +253,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
253
253
  };
254
254
  tagType: {
255
255
  default: string;
256
- type: PropType<"success" | "primary" | "warning" | "info" | "danger">;
256
+ type: PropType<"primary" | "success" | "warning" | "info" | "danger">;
257
257
  required: false;
258
258
  validator: ((val: unknown) => boolean) | undefined;
259
259
  __epPropKey: true;
@@ -416,13 +416,13 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
416
416
  showClose: ComputedRef<boolean>;
417
417
  iconComponent: ComputedRef<(string | Component) | undefined>;
418
418
  iconReverse: ComputedRef<string>;
419
- validateState: ComputedRef<"" | "error" | "validating" | "success">;
419
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
420
420
  validateIcon: ComputedRef<"" | Component>;
421
421
  showNewOption: ComputedRef<boolean>;
422
422
  updateOptions: () => void;
423
423
  collapseTagSize: ComputedRef<"default" | "small">;
424
424
  setSelected: () => void;
425
- selectDisabled: ComputedRef<boolean | undefined>;
425
+ selectDisabled: ComputedRef<boolean>;
426
426
  emptyText: ComputedRef<string | null>;
427
427
  handleCompositionStart: (event: CompositionEvent) => void;
428
428
  handleCompositionUpdate: (event: CompositionEvent) => void;
@@ -498,7 +498,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
498
498
  collapseTags: boolean;
499
499
  maxCollapseTags: number;
500
500
  collapseTagsTooltip: boolean;
501
- tagType: "success" | "primary" | "warning" | "info" | "danger";
501
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
502
502
  tagEffect: "dark" | "light" | "plain";
503
503
  automaticDropdown: boolean;
504
504
  allowCreate: boolean;
@@ -658,7 +658,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
658
658
  };
659
659
  tagType: {
660
660
  default: string;
661
- type: PropType<"success" | "primary" | "warning" | "info" | "danger">;
661
+ type: PropType<"primary" | "success" | "warning" | "info" | "danger">;
662
662
  required: false;
663
663
  validator: ((val: unknown) => boolean) | undefined;
664
664
  __epPropKey: true;
@@ -821,13 +821,13 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
821
821
  showClose: ComputedRef<boolean>;
822
822
  iconComponent: ComputedRef<(string | Component) | undefined>;
823
823
  iconReverse: ComputedRef<string>;
824
- validateState: ComputedRef<"" | "error" | "validating" | "success">;
824
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
825
825
  validateIcon: ComputedRef<"" | Component>;
826
826
  showNewOption: ComputedRef<boolean>;
827
827
  updateOptions: () => void;
828
828
  collapseTagSize: ComputedRef<"default" | "small">;
829
829
  setSelected: () => void;
830
- selectDisabled: ComputedRef<boolean | undefined>;
830
+ selectDisabled: ComputedRef<boolean>;
831
831
  emptyText: ComputedRef<string | null>;
832
832
  handleCompositionStart: (event: CompositionEvent) => void;
833
833
  handleCompositionUpdate: (event: CompositionEvent) => void;
@@ -903,7 +903,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
903
903
  collapseTags: boolean;
904
904
  maxCollapseTags: number;
905
905
  collapseTagsTooltip: boolean;
906
- tagType: "success" | "primary" | "warning" | "info" | "danger";
906
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
907
907
  tagEffect: "dark" | "light" | "plain";
908
908
  automaticDropdown: boolean;
909
909
  allowCreate: boolean;
@@ -33,6 +33,7 @@ declare const _default: DefineComponent<GridEditorProps, {
33
33
  readonly validateEvent: boolean;
34
34
  readonly inputStyle: StyleValue;
35
35
  readonly rows: number;
36
+ readonly inputmode: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
36
37
  readonly clearable: boolean;
37
38
  readonly showPassword: boolean;
38
39
  readonly showWordLimit: boolean;
@@ -53,10 +54,12 @@ declare const _default: DefineComponent<GridEditorProps, {
53
54
  readonly inputStyle: string | false | CSSProperties | StyleValue[] | null;
54
55
  readonly rows: number;
55
56
  readonly size?: ("" | "large" | "default" | "small") | undefined;
57
+ readonly name?: string | undefined;
56
58
  readonly form?: string | undefined;
57
59
  readonly id?: string | undefined;
58
60
  readonly ariaLabel?: string | undefined;
59
61
  readonly resize?: ("none" | "horizontal" | "vertical" | "both") | undefined;
62
+ readonly inputmode?: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
60
63
  readonly maxlength?: (string | number) | undefined;
61
64
  readonly minlength?: (string | number) | undefined;
62
65
  readonly formatter?: Function | undefined;
@@ -77,7 +80,7 @@ declare const _default: DefineComponent<GridEditorProps, {
77
80
  onMouseenter?: ((evt: MouseEvent) => any) | undefined | undefined;
78
81
  onMouseleave?: ((evt: MouseEvent) => any) | undefined | undefined;
79
82
  onClear?: (() => any) | undefined | undefined;
80
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "type" | "disabled" | "id" | "tabindex" | "autofocus" | "modelValue" | "validateEvent" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows">;
83
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "type" | "disabled" | "id" | "tabindex" | "autofocus" | "modelValue" | "validateEvent" | "inputmode" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows">;
81
84
  $attrs: {
82
85
  [x: string]: unknown;
83
86
  };
@@ -93,6 +96,15 @@ declare const _default: DefineComponent<GridEditorProps, {
93
96
  $emit: ((event: "clear") => void) & ((event: "input", value: string) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "change", value: string) => void) & ((event: "compositionend", evt: CompositionEvent) => void) & ((event: "compositionstart", evt: CompositionEvent) => void) & ((event: "compositionupdate", evt: CompositionEvent) => void) & ((event: "keydown", evt: Event | KeyboardEvent) => void) & ((event: "mouseenter", evt: MouseEvent) => void) & ((event: "mouseleave", evt: MouseEvent) => void) & ((event: "update:modelValue", value: string) => void);
94
97
  $el: any;
95
98
  $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{
99
+ readonly inputmode: {
100
+ readonly type: PropType<"none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined>;
101
+ readonly required: false;
102
+ readonly validator: ((val: unknown) => boolean) | undefined;
103
+ __epPropKey: true;
104
+ } & {
105
+ readonly default: undefined;
106
+ };
107
+ readonly name: StringConstructor;
96
108
  readonly ariaLabel: StringConstructor;
97
109
  readonly id: {
98
110
  readonly type: PropType<string>;
@@ -291,6 +303,7 @@ declare const _default: DefineComponent<GridEditorProps, {
291
303
  readonly validateEvent: boolean;
292
304
  readonly inputStyle: StyleValue;
293
305
  readonly rows: number;
306
+ readonly inputmode: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
294
307
  readonly clearable: boolean;
295
308
  readonly showPassword: boolean;
296
309
  readonly showWordLimit: boolean;
@@ -328,11 +341,21 @@ declare const _default: DefineComponent<GridEditorProps, {
328
341
  readonly validateEvent: boolean;
329
342
  readonly inputStyle: StyleValue;
330
343
  readonly rows: number;
344
+ readonly inputmode: "none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined;
331
345
  readonly clearable: boolean;
332
346
  readonly showPassword: boolean;
333
347
  readonly showWordLimit: boolean;
334
348
  readonly autofocus: boolean;
335
349
  }> & Omit<Readonly< ExtractPropTypes<{
350
+ readonly inputmode: {
351
+ readonly type: PropType<"none" | "text" | "search" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined>;
352
+ readonly required: false;
353
+ readonly validator: ((val: unknown) => boolean) | undefined;
354
+ __epPropKey: true;
355
+ } & {
356
+ readonly default: undefined;
357
+ };
358
+ readonly name: StringConstructor;
336
359
  readonly ariaLabel: StringConstructor;
337
360
  readonly id: {
338
361
  readonly type: PropType<string>;
@@ -493,7 +516,7 @@ declare const _default: DefineComponent<GridEditorProps, {
493
516
  onMouseenter?: ((evt: MouseEvent) => any) | undefined;
494
517
  onMouseleave?: ((evt: MouseEvent) => any) | undefined;
495
518
  onClear?: (() => any) | undefined;
496
- }, "clear" | "type" | "disabled" | "ref" | "input" | "select" | "textarea" | "id" | "tabindex" | "focus" | "autofocus" | "blur" | "modelValue" | "validateEvent" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
519
+ }, "clear" | "type" | "disabled" | "ref" | "input" | "select" | "textarea" | "id" | "tabindex" | "focus" | "autofocus" | "blur" | "modelValue" | "validateEvent" | "inputmode" | "autosize" | "autocomplete" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "containerRole" | "inputStyle" | "rows" | "textareaStyle" | "isComposing" | "resizeTextarea"> & ShallowUnwrapRef<{
497
520
  input: ShallowRef<HTMLInputElement | undefined>;
498
521
  textarea: ShallowRef<HTMLTextAreaElement | undefined>;
499
522
  ref: ComputedRef<HTMLInputElement | HTMLTextAreaElement | undefined>;
@@ -406,7 +406,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
406
406
  readonly __epPropKey: true;
407
407
  };
408
408
  readonly type: {
409
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
409
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
410
410
  readonly required: false;
411
411
  readonly validator: ((val: unknown) => boolean) | undefined;
412
412
  __epPropKey: true;
@@ -602,7 +602,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
602
602
  readonly __epPropKey: true;
603
603
  };
604
604
  readonly type: {
605
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
605
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
606
606
  readonly required: false;
607
607
  readonly validator: ((val: unknown) => boolean) | undefined;
608
608
  __epPropKey: true;
@@ -853,7 +853,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
853
853
  readonly __epPropKey: true;
854
854
  };
855
855
  readonly type: {
856
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
856
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
857
857
  readonly required: false;
858
858
  readonly validator: ((val: unknown) => boolean) | undefined;
859
859
  __epPropKey: true;
@@ -1049,7 +1049,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1049
1049
  readonly __epPropKey: true;
1050
1050
  };
1051
1051
  readonly type: {
1052
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
1052
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
1053
1053
  readonly required: false;
1054
1054
  readonly validator: ((val: unknown) => boolean) | undefined;
1055
1055
  __epPropKey: true;
@@ -310,7 +310,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
310
310
  };
311
311
  tagType: {
312
312
  default: string;
313
- type: PropType<"success" | "primary" | "warning" | "info" | "danger">;
313
+ type: PropType<"primary" | "success" | "warning" | "info" | "danger">;
314
314
  required: false;
315
315
  validator: ((val: unknown) => boolean) | undefined;
316
316
  __epPropKey: true;
@@ -473,13 +473,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
473
473
  showClose: ComputedRef<boolean>;
474
474
  iconComponent: ComputedRef<(string | Component) | undefined>;
475
475
  iconReverse: ComputedRef<string>;
476
- validateState: ComputedRef<"" | "error" | "validating" | "success">;
476
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
477
477
  validateIcon: ComputedRef<"" | Component>;
478
478
  showNewOption: ComputedRef<boolean>;
479
479
  updateOptions: () => void;
480
480
  collapseTagSize: ComputedRef<"default" | "small">;
481
481
  setSelected: () => void;
482
- selectDisabled: ComputedRef<boolean | undefined>;
482
+ selectDisabled: ComputedRef<boolean>;
483
483
  emptyText: ComputedRef<string | null>;
484
484
  handleCompositionStart: (event: CompositionEvent) => void;
485
485
  handleCompositionUpdate: (event: CompositionEvent) => void;
@@ -555,7 +555,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
555
555
  collapseTags: boolean;
556
556
  maxCollapseTags: number;
557
557
  collapseTagsTooltip: boolean;
558
- tagType: "success" | "primary" | "warning" | "info" | "danger";
558
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
559
559
  tagEffect: "dark" | "light" | "plain";
560
560
  automaticDropdown: boolean;
561
561
  allowCreate: boolean;
@@ -715,7 +715,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
715
715
  };
716
716
  tagType: {
717
717
  default: string;
718
- type: PropType<"success" | "primary" | "warning" | "info" | "danger">;
718
+ type: PropType<"primary" | "success" | "warning" | "info" | "danger">;
719
719
  required: false;
720
720
  validator: ((val: unknown) => boolean) | undefined;
721
721
  __epPropKey: true;
@@ -878,13 +878,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
878
878
  showClose: ComputedRef<boolean>;
879
879
  iconComponent: ComputedRef<(string | Component) | undefined>;
880
880
  iconReverse: ComputedRef<string>;
881
- validateState: ComputedRef<"" | "error" | "validating" | "success">;
881
+ validateState: ComputedRef<"" | "error" | "success" | "validating">;
882
882
  validateIcon: ComputedRef<"" | Component>;
883
883
  showNewOption: ComputedRef<boolean>;
884
884
  updateOptions: () => void;
885
885
  collapseTagSize: ComputedRef<"default" | "small">;
886
886
  setSelected: () => void;
887
- selectDisabled: ComputedRef<boolean | undefined>;
887
+ selectDisabled: ComputedRef<boolean>;
888
888
  emptyText: ComputedRef<string | null>;
889
889
  handleCompositionStart: (event: CompositionEvent) => void;
890
890
  handleCompositionUpdate: (event: CompositionEvent) => void;
@@ -960,7 +960,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
960
960
  collapseTags: boolean;
961
961
  maxCollapseTags: number;
962
962
  collapseTagsTooltip: boolean;
963
- tagType: "success" | "primary" | "warning" | "info" | "danger";
963
+ tagType: "primary" | "success" | "warning" | "info" | "danger";
964
964
  tagEffect: "dark" | "light" | "plain";
965
965
  automaticDropdown: boolean;
966
966
  allowCreate: boolean;
@@ -123,7 +123,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
123
123
  readonly __epPropKey: true;
124
124
  };
125
125
  readonly type: {
126
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
126
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
127
127
  readonly required: false;
128
128
  readonly validator: ((val: unknown) => boolean) | undefined;
129
129
  __epPropKey: true;
@@ -335,7 +335,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
335
335
  readonly __epPropKey: true;
336
336
  };
337
337
  readonly type: {
338
- readonly type: PropType<"" | "success" | "primary" | "warning" | "info" | "danger" | "default" | "text">;
338
+ readonly type: PropType<"" | "primary" | "success" | "warning" | "info" | "danger" | "default" | "text">;
339
339
  readonly required: false;
340
340
  readonly validator: ((val: unknown) => boolean) | undefined;
341
341
  __epPropKey: true;
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/ui
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.12.52
5
+ * @version 0.12.54
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.12.52";
8
+ export declare const version = "0.12.54";