@ccn-ui-kit/ui-kit 0.1.2
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.cjs +1 -0
- package/dist/index.js +5067 -0
- package/dist/packages/components/__tests__/loading.spec.d.ts +1 -0
- package/dist/packages/components/badge/index.d.ts +10 -0
- package/dist/packages/components/badge/src/badge.d.ts +25 -0
- package/dist/packages/components/breadcrumb/index.d.ts +12 -0
- package/dist/packages/components/breadcrumb/src/breadcrumb-item.d.ts +13 -0
- package/dist/packages/components/breadcrumb/src/breadcrumb.d.ts +10 -0
- package/dist/packages/components/button/index.d.ts +10 -0
- package/dist/packages/components/button/src/button.d.ts +25 -0
- package/dist/packages/components/date-picker/index.d.ts +10 -0
- package/dist/packages/components/date-picker/src/date-picker.d.ts +20 -0
- package/dist/packages/components/descriptions/index.d.ts +12 -0
- package/dist/packages/components/descriptions/src/descriptions-item.d.ts +13 -0
- package/dist/packages/components/descriptions/src/descriptions.d.ts +17 -0
- package/dist/packages/components/divider/index.d.ts +10 -0
- package/dist/packages/components/divider/src/divider.d.ts +20 -0
- package/dist/packages/components/dropdown/index.d.ts +12 -0
- package/dist/packages/components/dropdown/src/dropdown-item.d.ts +20 -0
- package/dist/packages/components/dropdown/src/dropdown.d.ts +46 -0
- package/dist/packages/components/form/index.d.ts +12 -0
- package/dist/packages/components/form/src/form-item.d.ts +45 -0
- package/dist/packages/components/form/src/form.d.ts +96 -0
- package/dist/packages/components/icon/index.d.ts +11 -0
- package/dist/packages/components/icon/src/icon.d.ts +18 -0
- package/dist/packages/components/icon/src/icons.d.ts +50 -0
- package/dist/packages/components/input/index.d.ts +10 -0
- package/dist/packages/components/input/src/input.d.ts +25 -0
- package/dist/packages/components/link/index.d.ts +10 -0
- package/dist/packages/components/link/src/link.d.ts +25 -0
- package/dist/packages/components/loading/index.d.ts +10 -0
- package/dist/packages/components/loading/src/loading.d.ts +15 -0
- package/dist/packages/components/menu/index.d.ts +14 -0
- package/dist/packages/components/menu/src/menu-item.d.ts +12 -0
- package/dist/packages/components/menu/src/menu.d.ts +40 -0
- package/dist/packages/components/menu/src/sub-menu.d.ts +12 -0
- package/dist/packages/components/message/index.d.ts +12 -0
- package/dist/packages/components/message/src/manager.d.ts +14 -0
- package/dist/packages/components/message/src/message.d.ts +28 -0
- package/dist/packages/components/modal/index.d.ts +10 -0
- package/dist/packages/components/modal/src/modal.d.ts +46 -0
- package/dist/packages/components/notification/index.d.ts +12 -0
- package/dist/packages/components/notification/src/manager.d.ts +14 -0
- package/dist/packages/components/notification/src/notification.d.ts +44 -0
- package/dist/packages/components/pagination/index.d.ts +10 -0
- package/dist/packages/components/pagination/src/pagination.d.ts +30 -0
- package/dist/packages/components/popconfirm/index.d.ts +10 -0
- package/dist/packages/components/popconfirm/src/popconfirm.d.ts +56 -0
- package/dist/packages/components/rich-editor/index.d.ts +10 -0
- package/dist/packages/components/rich-editor/src/rich-editor.d.ts +36 -0
- package/dist/packages/components/select/index.d.ts +10 -0
- package/dist/packages/components/select/src/select.d.ts +45 -0
- package/dist/packages/components/space/index.d.ts +10 -0
- package/dist/packages/components/space/src/space.d.ts +33 -0
- package/dist/packages/components/steps/index.d.ts +12 -0
- package/dist/packages/components/steps/src/step.d.ts +28 -0
- package/dist/packages/components/steps/src/steps.d.ts +46 -0
- package/dist/packages/components/table/index.d.ts +10 -0
- package/dist/packages/components/table/src/table.d.ts +56 -0
- package/dist/packages/components/tabs/index.d.ts +12 -0
- package/dist/packages/components/tabs/src/tab-pane.d.ts +22 -0
- package/dist/packages/components/tabs/src/tabs.d.ts +43 -0
- package/dist/packages/components/tree/index.d.ts +10 -0
- package/dist/packages/components/tree/src/tree.d.ts +134 -0
- package/dist/packages/components/upload/index.d.ts +10 -0
- package/dist/packages/components/upload/src/upload.d.ts +103 -0
- package/dist/packages/directives/index.d.ts +2 -0
- package/dist/packages/directives/loading/index.d.ts +11 -0
- package/dist/packages/directives/permission/index.d.ts +3 -0
- package/dist/packages/ui-kit/index.d.ts +34 -0
- package/dist/packages/utils/dom.d.ts +5 -0
- package/dist/packages/utils/index.d.ts +3 -0
- package/dist/packages/utils/types.d.ts +7 -0
- package/dist/packages/utils/vue-helper.d.ts +9 -0
- package/dist/play/main.d.ts +1 -0
- package/dist/play/vite.config.d.ts +2 -0
- package/package.json +23 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),ve={type:{type:String,default:"default"},size:{type:String,default:"medium"},plain:Boolean,round:Boolean,disabled:Boolean,loading:Boolean,"native-type":{type:String,default:"button"}},fe={click:t=>t instanceof MouseEvent},El=["type","disabled"],$l={key:0,class:"ui-button__loading"},he=e.defineComponent({__name:"button",props:ve,emits:fe,setup(t,{emit:n}){const l=t,o=n;function i(a){l.loading||l.disabled||o("click",a)}return(a,h)=>(e.openBlock(),e.createElementBlock("button",{type:a.nativeType,class:e.normalizeClass(["ui-button",`ui-button--${a.type}`,`ui-button--${a.size}`,{"is-plain":a.plain,"is-round":a.round,"is-disabled":a.disabled}]),disabled:a.disabled,onClick:i},[a.loading?(e.openBlock(),e.createElementBlock("span",$l)):e.createCommentVNode("v-if",!0),e.renderSlot(a.$slots,"default")],10,El))}}),xe={name:"UiButton",install(t){t.component("UiButton",he)}},ge={modelValue:{type:String,default:void 0},type:{type:String,default:"text"},placeholder:{type:String,default:""},disabled:Boolean,clearable:Boolean},ke={"update:modelValue":t=>typeof t=="string",input:t=>typeof t=="string",change:t=>typeof t=="string",clear:()=>!0},Vl=["type","value","placeholder","disabled"],be=e.defineComponent({__name:"input",props:ge,emits:ke,setup(t,{emit:n}){const l=t,o=n,i=e.ref(""),a=e.computed({get:()=>l.modelValue??i.value,set:v=>{i.value=v,o("update:modelValue",v)}});function h(v){const c=v.target.value;a.value=c,o("input",c)}function x(v){o("change",v.target.value)}function s(){a.value="",o("clear")}return(v,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-input",{"is-disabled":v.disabled}])},[e.createElementVNode("input",{class:"ui-input__inner",type:v.type,value:a.value,placeholder:v.placeholder,disabled:v.disabled,onInput:h,onChange:x},null,40,Vl),v.clearable&&a.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ui-input__clear",onClick:s},"×")):e.createCommentVNode("v-if",!0)],2))}}),Be={name:"UiInput",install(t){t.component("UiInput",be)}},_e={value:{type:[Number,String],default:0},max:{type:Number,default:void 0},isDot:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},type:{type:String,default:"danger"}},Sl={class:"ui-badge"},we=e.defineComponent({__name:"badge",props:_e,setup(t){const n=t,l=e.computed(()=>{if(n.isDot)return"";const o=n.value;return typeof o=="number"&&n.max!=null&&o>n.max?`${n.max}+`:o});return(o,i)=>(e.openBlock(),e.createElementBlock("div",Sl,[e.renderSlot(o.$slots,"default"),!o.hidden&&(o.isDot||l.value)?(e.openBlock(),e.createElementBlock("sup",{key:0,class:e.normalizeClass(["ui-badge__content",[`ui-badge--${o.type}`,{"is-dot":o.isDot}]])},[o.isDot?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(l.value),1)],64))],2)):e.createCommentVNode("v-if",!0)]))}}),Ce={name:"UiBadge",install(t){t.component("UiBadge",we)}},Me={separator:{type:String,default:"/"}},G=Symbol("ui-breadcrumb-separator"),zl={class:"ui-breadcrumb","aria-label":"breadcrumb"},Nl={class:"ui-breadcrumb__list"},Ee=e.defineComponent({__name:"breadcrumb",props:Me,setup(t){return e.provide(G,t.separator),(n,l)=>(e.openBlock(),e.createElementBlock("nav",zl,[e.createElementVNode("ol",Nl,[e.renderSlot(n.$slots,"default")])]))}}),$e={to:{type:String,default:""},replace:{type:Boolean,default:!1}},Ll={class:"ui-breadcrumb__item"},Hl={class:"ui-breadcrumb__separator"},Ve=e.defineComponent({__name:"breadcrumb-item",props:$e,setup(t){const n=t,l=e.inject(G,"/");function o(i){n.to&&!n.replace&&(window.history.pushState(null,"",n.to),window.dispatchEvent(new PopStateEvent("popstate")),i.preventDefault())}return(i,a)=>(e.openBlock(),e.createElementBlock("li",Ll,[e.createCommentVNode(" 当前页(无 to)用 span,可点击项(有 to)用 a "),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.to?"a":"span"),{class:"ui-breadcrumb__inner",href:n.to,onClick:e.withModifiers(o,["prevent"])},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["href"])),e.createElementVNode("span",Hl,e.toDisplayString(e.unref(l)),1)]))}}),Se={name:"UiBreadcrumb",install(t){t.component("UiBreadcrumb",Ee),t.component("UiBreadcrumbItem",Ve)}},ze={modelValue:{type:String,default:void 0},placeholder:{type:String,default:"请选择日期"},disabled:Boolean,clearable:Boolean},Ne={"update:modelValue":t=>typeof t=="string",change:t=>typeof t=="string",clear:()=>!0},Tl={class:"ui-date-panel"},Pl={class:"ui-date-panel__header"},Dl={class:"ui-date-panel__title"},Al={class:"ui-date-panel__week"},Ul={class:"ui-date-panel__body"},Fl=["onClick"],Il={class:"ui-date-panel__year-body"},Kl=["onClick"],Ol={class:"ui-date-panel__month-body"},ql=["onClick"],jl=e.defineComponent({__name:"date-panel",props:{modelValue:{}},emits:["select"],setup(t,{emit:n}){const l=t,o=n,i=["日","一","二","三","四","五","六"],a=Array.from({length:12},(k,V)=>`${V+1} 月`),h=new Date,x=e.ref(h.getFullYear()),s=e.ref(h.getMonth());if(l.modelValue){const k=l.modelValue.split("-").map(Number);k.length===3&&(x.value=k[0],s.value=k[1]-1)}const v=e.ref("date"),c=e.ref(x.value-5),f=e.computed(()=>{const k=[];for(let V=0;V<12;V++)k.push(c.value+V);return k});function p(k,V,z){const P=m=>String(m).padStart(2,"0");return`${k}-${P(V+1)}-${P(z)}`}const y=e.computed(()=>{const k=p(h.getFullYear(),h.getMonth(),h.getDate()),V=new Date(x.value,s.value+1,0).getDate(),z=new Date(x.value,s.value,1).getDay(),P=new Date(x.value,s.value,0).getDate(),m=[];for(let d=z-1;d>=0;d--){const B=P-d;m.push({key:`p-${B}`,day:B,value:p(x.value,s.value-1,B),otherMonth:!0,isToday:!1})}for(let d=1;d<=V;d++){const B=p(x.value,s.value,d);m.push({key:`c-${d}`,day:d,value:B,otherMonth:!1,isToday:B===k})}let r=1;for(;m.length<42;)m.push({key:`n-${r}`,day:r,value:p(x.value,s.value+1,r),otherMonth:!0,isToday:!1}),r++;return m});function b(){s.value===0?(s.value=11,x.value--):s.value--}function $(){s.value===11?(s.value=0,x.value++):s.value++}function N(){c.value=x.value-5,v.value="year"}function L(){v.value="month"}function M(){v.value="date"}function T(k){x.value=k,v.value="date"}function S(){c.value-=12}function w(){c.value+=12}function C(k){s.value=k,v.value="date"}function _(){x.value--}function u(){x.value++}function g(k){o("select",k.value)}return(k,V)=>(e.openBlock(),e.createElementBlock("div",Tl,[e.createElementVNode("div",Pl,[e.createCommentVNode(" 日历视图:‹ › 切月,点年份/月份进入对应网格 "),v.value==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{type:"button",class:"ui-date-panel__arrow",onClick:b},"‹"),e.createElementVNode("span",Dl,[e.createElementVNode("span",{class:"ui-date-panel__year-link",onClick:N},e.toDisplayString(x.value)+" 年",1),e.createElementVNode("span",{class:"ui-date-panel__month-link",onClick:L},e.toDisplayString(s.value+1)+" 月",1)]),e.createElementVNode("button",{type:"button",class:"ui-date-panel__arrow",onClick:$},"›")],64)):v.value==="year"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 年网格:‹ › 切年段,点标题返回 "),e.createElementVNode("button",{type:"button",class:"ui-date-panel__arrow",onClick:S},"‹"),e.createElementVNode("span",{class:"ui-date-panel__title ui-date-panel__title--back",onClick:M},e.toDisplayString(c.value)+" - "+e.toDisplayString(c.value+11)+" 年 ",1),e.createElementVNode("button",{type:"button",class:"ui-date-panel__arrow",onClick:w},"›")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" 月网格:‹ › 切年,点标题返回 "),e.createElementVNode("button",{type:"button",class:"ui-date-panel__arrow",onClick:_},"‹"),e.createElementVNode("span",{class:"ui-date-panel__title ui-date-panel__title--back",onClick:M},e.toDisplayString(x.value)+" 年 ",1),e.createElementVNode("button",{type:"button",class:"ui-date-panel__arrow",onClick:u},"›")],64))]),e.createCommentVNode(" 日历视图:星期 + 日期格 "),v.value==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Al,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,z=>e.createElementVNode("span",{key:z,class:"ui-date-panel__week-cell"},e.toDisplayString(z),1)),64))]),e.createElementVNode("div",Ul,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,z=>(e.openBlock(),e.createElementBlock("span",{key:z.key,class:e.normalizeClass(["ui-date-panel__cell",{"is-other":z.otherMonth,"is-today":z.isToday,"is-selected":z.value===t.modelValue}]),onClick:P=>g(z)},e.toDisplayString(z.day),11,Fl))),128))])],64)):v.value==="year"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 年网格:12 年 "),e.createElementVNode("div",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,z=>(e.openBlock(),e.createElementBlock("span",{key:z,class:e.normalizeClass(["ui-date-panel__year-cell",{"is-current":z===x.value}]),onClick:P=>T(z)},e.toDisplayString(z),11,Kl))),128))])],2112)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createCommentVNode(" 月网格:12 个月 "),e.createElementVNode("div",Ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(z,P)=>(e.openBlock(),e.createElementBlock("span",{key:z,class:e.normalizeClass(["ui-date-panel__month-cell",{"is-current":P===s.value}]),onClick:m=>C(P)},e.toDisplayString(z),11,ql))),128))])],2112))]))}}),Rl=["value","placeholder","disabled"],Le=e.defineComponent({__name:"date-picker",props:ze,emits:Ne,setup(t,{emit:n}){const l=t,o=n,i=e.ref(""),a=e.computed({get:()=>l.modelValue??i.value,set:b=>{i.value=b,o("update:modelValue",b)}}),h=e.ref(!1),x=e.ref();function s(){l.disabled||(h.value=!0)}function v(){h.value=!1}function c(){h.value?v():s()}function f(b){a.value=b,o("change",b),v()}function p(){a.value="",o("clear")}function y(b){x.value&&!x.value.contains(b.target)&&v()}return e.onMounted(()=>document.addEventListener("click",y)),e.onBeforeUnmount(()=>document.removeEventListener("click",y)),(b,$)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:x,class:e.normalizeClass(["ui-date-picker",{"is-disabled":b.disabled}])},[e.createElementVNode("div",{class:"ui-date-picker__trigger",onClick:c,onKeydown:e.withKeys(c,["enter"])},[e.createElementVNode("input",{class:"ui-date-picker__inner",value:a.value,placeholder:b.placeholder,disabled:b.disabled,readonly:""},null,8,Rl),b.clearable&&a.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ui-date-picker__clear",onClick:e.withModifiers(p,["stop"])},"×")):e.createCommentVNode("v-if",!0)],32),e.createCommentVNode(" @click.stop:面板内部点击不冒泡到 document,避免内部节点因视图切换被移除时误触发「点击外部关闭」 "),h.value?(e.openBlock(),e.createBlock(jl,{key:0,"model-value":a.value,onSelect:f,onClick:$[0]||($[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value"])):e.createCommentVNode("v-if",!0)],2))}}),He={name:"UiDatePicker",install(t){t.component("UiDatePicker",Le)}},Te={title:{type:String,default:""},column:{type:Number,default:3},border:{type:Boolean,default:!1}},Wl={key:0,class:"ui-descriptions__title"},Pe=e.defineComponent({__name:"descriptions",props:Te,setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-descriptions",{"is-bordered":n.border}])},[n.title?(e.openBlock(),e.createElementBlock("div",Wl,e.toDisplayString(n.title),1)):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 列数由 column prop 动态决定,子项通过 span 跨列 "),e.createElementVNode("div",{class:"ui-descriptions__body",style:e.normalizeStyle({gridTemplateColumns:`repeat(${n.column}, minmax(0, 1fr))`})},[e.renderSlot(n.$slots,"default")],4)],2))}}),De={label:{type:String,default:""},span:{type:Number,default:1}},Ql={key:0,class:"ui-descriptions__label"},Jl={class:"ui-descriptions__content"},Ae=e.defineComponent({__name:"descriptions-item",props:De,setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:"ui-descriptions__item",style:e.normalizeStyle({gridColumn:`span ${n.span}`})},[n.label?(e.openBlock(),e.createElementBlock("span",Ql,e.toDisplayString(n.label),1)):e.createCommentVNode("v-if",!0),e.createElementVNode("span",Jl,[e.renderSlot(n.$slots,"default")])],4))}}),Ue={name:"UiDescriptions",install(t){t.component("UiDescriptions",Pe),t.component("UiDescriptionsItem",Ae)}},Fe={direction:{type:String,default:"horizontal"},contentPosition:{type:String,default:"center"},dashed:{type:Boolean,default:!1}},Gl={key:0,class:"ui-divider__text"},Ie=e.defineComponent({__name:"divider",props:Fe,setup(t){const n=e.useSlots();return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-divider",[`ui-divider--${l.direction}`,`is-${l.contentPosition}`,{"is-dashed":l.dashed}]]),role:"separator"},[l.direction==="horizontal"&&e.unref(n).default?(e.openBlock(),e.createElementBlock("span",Gl,[e.renderSlot(l.$slots,"default")])):e.createCommentVNode("v-if",!0)],2))}}),Ke={name:"UiDivider",install(t){t.component("UiDivider",Ie)}},Oe={trigger:{type:String,default:"hover"},placement:{type:String,default:"bottom-start"},hideOnClick:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},disabled:{type:Boolean,default:!1}},qe={command:t=>!0,"visible-change":t=>!0},X=Symbol("ui-dropdown"),je=e.defineComponent({__name:"dropdown",props:Oe,emits:qe,setup(t,{emit:n}){const l=t,o=n,i=e.ref(!1),a=e.ref();let h=null,x=null;function s(){h&&(window.clearTimeout(h),h=null)}function v(){x&&(window.clearTimeout(x),x=null)}function c(){l.disabled||(v(),s(),h=window.setTimeout(()=>i.value=!0,l.showTimeout))}function f(){s(),v(),x=window.setTimeout(()=>i.value=!1,l.hideTimeout)}function p(){l.disabled||(s(),v(),i.value=!i.value)}function y(){l.trigger==="hover"&&c()}function b(){l.trigger==="hover"&&f()}function $(){l.trigger==="click"&&p()}function N(){if(l.trigger==="contextmenu"){if(l.disabled)return;s(),v(),i.value=!0}}function L(M){const T=a.value;!T||T.contains(M.target)||(i.value=!1)}return e.watch(i,M=>{M?document.addEventListener("mousedown",L):document.removeEventListener("mousedown",L),o("visible-change",M)}),e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",L),s(),v()}),e.provide(X,{handleItemClick:M=>{o("command",M),l.hideOnClick&&(i.value=!1)}}),(M,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:a,class:"ui-dropdown",onMouseenter:y,onMouseleave:b,onClick:$,onContextmenu:e.withModifiers(N,["prevent"])},[e.createElementVNode("div",{class:e.normalizeClass(["ui-dropdown__trigger",{"is-disabled":M.disabled}])},[e.renderSlot(M.$slots,"default")],2),e.createVNode(e.Transition,{name:"ui-dropdown-fade"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ui-dropdown__menu",`is-${M.placement}`])},[e.renderSlot(M.$slots,"dropdown")],2)):e.createCommentVNode("v-if",!0)]),_:3})],544))}}),Re={command:{type:[String,Number,Object,Boolean],default:void 0},disabled:{type:Boolean,default:!1},divided:{type:Boolean,default:!1}},We=e.defineComponent({__name:"dropdown-item",props:Re,setup(t){const n=t,l=e.inject(X,null);function o(){n.disabled||l==null||l.handleItemClick(n.command)}return(i,a)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["ui-dropdown__item",{"is-disabled":i.disabled,"is-divided":i.divided}]),onClick:o},[e.renderSlot(i.$slots,"default")],2))}}),Qe={name:"UiDropdown",install(t){t.component("UiDropdown",je),t.component("UiDropdownItem",We)}},Je={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},Y={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function Ge(t){return t in Y}const Xl={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Yl=["innerHTML"],Xe=e.defineComponent({__name:"icon",props:Je,setup(t){const n=t,l=e.computed(()=>Ge(n.name)?Y[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",Xl,[e.createElementVNode("g",{innerHTML:l.value},null,8,Yl)]))],6))}}),Ye={name:"UiIcon",install(t){t.component("UiIcon",Xe)}},Ze={type:{type:String,default:"default"},href:{type:String,default:""},target:{type:String,default:"_self"},underline:{type:Boolean,default:!0},disabled:Boolean},et={click:t=>t instanceof MouseEvent},Zl=["href","target"],tt=e.defineComponent({__name:"link",props:Ze,emits:et,setup(t,{emit:n}){const l=t,o=n;function i(a){if(l.disabled){a.preventDefault();return}o("click",a)}return(a,h)=>(e.openBlock(),e.createElementBlock("a",{class:e.normalizeClass(["ui-link",`ui-link--${a.type}`,{"is-underline":a.underline,"is-disabled":a.disabled}]),href:a.disabled?void 0:a.href||void 0,target:a.target,onClick:i},[e.renderSlot(a.$slots,"default")],10,Zl))}}),lt={name:"UiLink",install(t){t.component("UiLink",tt)}},nt={visible:Boolean,text:{type:String,default:""},fullscreen:Boolean,background:{type:String,default:""}},e1={class:"ui-loading__spinner"},t1={key:0,class:"ui-loading__text"},at=e.defineComponent({__name:"loading",props:nt,setup(t){return(n,l)=>n.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ui-loading",{"ui-loading--fullscreen":n.fullscreen}]),style:e.normalizeStyle({backgroundColor:n.background||void 0})},[e.createElementVNode("div",e1,[l[0]||(l[0]=e.createElementVNode("span",{class:"ui-loading__spinner-icon"},null,-1)),n.text?(e.openBlock(),e.createElementBlock("p",t1,e.toDisplayString(n.text),1)):e.createCommentVNode("v-if",!0)])],6)):e.createCommentVNode("v-if",!0)}}),ot={name:"UiLoading",install(t){t.component("UiLoading",at)}},it={mode:{type:String,default:"vertical"},defaultActive:{type:String,default:""},uniqueOpened:Boolean},rt={select:t=>typeof t=="string",open:t=>typeof t=="string",close:t=>typeof t=="string"},W=Symbol("ui-menu"),ct=e.defineComponent({__name:"menu",props:it,emits:rt,setup(t,{emit:n}){const l=t,o=n,i=e.ref(l.defaultActive),a=e.ref([]);function h(c){i.value=c,o("select",c)}function x(c){const f=a.value;a.value=f.filter(p=>p===c||c.startsWith(`${p}-`)),a.value.includes(c)||a.value.push(c),f.forEach(p=>{a.value.includes(p)||o("close",p)}),f.includes(c)||o("open",c)}function s(c){const f=a.value.filter(p=>p===c||p.startsWith(`${c}-`));f.length&&(a.value=a.value.filter(p=>!f.includes(p)),f.forEach(p=>o("close",p)))}function v(c){a.value.includes(c)?s(c):l.uniqueOpened?x(c):(a.value.push(c),o("open",c))}return e.provide(W,{mode:l.mode,activeIndex:i,uniqueOpened:l.uniqueOpened,select:h,subMenuOpenIndexes:a,toggleSubMenu:v,openSubMenu:x,closeSubMenu:s}),(c,f)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(["ui-menu",`ui-menu--${c.mode}`]),role:"menu"},[e.renderSlot(c.$slots,"default")],2))}}),st={index:{type:String,required:!0},disabled:Boolean},l1=["aria-disabled","onKeydown"],ut=e.defineComponent({__name:"menu-item",props:st,setup(t){const n=t,l=e.inject(W),o=e.computed(()=>(l==null?void 0:l.activeIndex.value)===n.index);function i(){n.disabled||!l||l.select(n.index)}return(a,h)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["ui-menu-item",{"is-active":o.value,"is-disabled":a.disabled}]),role:"menuitem",tabindex:"0","aria-disabled":a.disabled||void 0,onClick:i,onKeydown:[e.withKeys(e.withModifiers(i,["prevent"]),["enter"]),e.withKeys(e.withModifiers(i,["prevent"]),["space"])]},[e.renderSlot(a.$slots,"default")],42,l1))}}),dt={index:{type:String,required:!0},disabled:Boolean},n1=["aria-expanded","aria-disabled","onKeydown"],a1={class:"ui-sub-menu__children",role:"menu"},pt=e.defineComponent({__name:"sub-menu",props:dt,setup(t){const n=t,l=e.inject(W),o=e.computed(()=>!!(l!=null&&l.subMenuOpenIndexes.value.includes(n.index))),i=e.computed(()=>(l==null?void 0:l.mode)==="horizontal");function a(){n.disabled||!l||i.value||l.toggleSubMenu(n.index)}function h(){n.disabled||!l||!i.value||l.openSubMenu(n.index)}function x(){n.disabled||!l||!i.value||l.closeSubMenu(n.index)}return(s,v)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["ui-sub-menu",{"is-open":o.value,"is-disabled":s.disabled}]),role:"menuitem",onMouseenter:h,onMouseleave:x},[e.createElementVNode("div",{class:"ui-sub-menu__title",tabindex:"0",role:"button","aria-haspopup":"true","aria-expanded":o.value,"aria-disabled":s.disabled||void 0,onClick:a,onKeydown:[e.withKeys(e.withModifiers(a,["prevent"]),["enter"]),e.withKeys(e.withModifiers(a,["prevent"]),["space"])]},[e.renderSlot(s.$slots,"title"),v[0]||(v[0]=e.createElementVNode("span",{class:"ui-sub-menu__arrow"},"▾",-1))],40,n1),e.withDirectives(e.createElementVNode("ul",a1,[e.renderSlot(s.$slots,"default")],512),[[e.vShow,o.value]])],34))}}),yt={name:"UiMenu",install(t){t.component("UiMenu",ct),t.component("UiMenuItem",ut),t.component("UiSubMenu",pt)}},o1={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},mt={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function i1(t){return t in mt}const r1={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},c1=["innerHTML"],re=e.defineComponent({__name:"icon",props:o1,setup(t){const n=t,l=e.computed(()=>i1(n.name)?mt[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",r1,[e.createElementVNode("g",{innerHTML:l.value},null,8,c1)]))],6))}}),vt={type:{type:String,default:"info"},showClose:Boolean},s1={class:"ui-message__content"},Z=e.defineComponent({__name:"message",props:vt,emits:["close"],setup(t,{emit:n}){const l=n;return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-message",`ui-message--${o.type}`]),role:"alert"},[e.createVNode(e.unref(re),{name:o.type,class:"ui-message__icon",size:16},null,8,["name"]),e.createElementVNode("div",s1,[e.renderSlot(o.$slots,"default")]),o.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"ui-message__close",type:"button","aria-label":"关闭",onClick:i[0]||(i[0]=a=>l("close"))},[e.createVNode(e.unref(re),{name:"close",size:12})])):e.createCommentVNode("v-if",!0)],2))}}),u1=300;let F=null;function d1(){return(!F||!F.isConnected)&&(F=document.createElement("div"),F.className="ui-message-container",document.body.appendChild(F)),F}function O(t){const n=document.createElement("div");n.className="ui-message__item",d1().appendChild(n);let l=!1,o=null;const i=()=>{l||(l=!0,o&&clearTimeout(o),n.classList.add("is-leave"),setTimeout(()=>{var h;e.render(null,n),n.remove(),(h=t.onClose)==null||h.call(t)},u1))},a=e.createVNode(Z,{type:t.type??"info",showClose:t.showClose,onClose:i},{default:()=>t.message});return e.render(a,n),n.offsetHeight,n.classList.add("is-enter"),t.duration!==0&&(o=setTimeout(i,t.duration??3e3)),{close:i}}const q=t=>O(typeof t=="string"?{message:t}:t);q.success=(t,n)=>O({...n,message:t,type:"success"});q.warning=(t,n)=>O({...n,message:t,type:"warning"});q.info=(t,n)=>O({...n,message:t,type:"info"});q.error=(t,n)=>O({...n,message:t,type:"error"});const ft={name:"UiMessage",install(t){t.component("UiMessage",Z)}},p1={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},ht={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function y1(t){return t in ht}const m1={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},v1=["innerHTML"],f1=e.defineComponent({__name:"icon",props:p1,setup(t){const n=t,l=e.computed(()=>y1(n.name)?ht[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",m1,[e.createElementVNode("g",{innerHTML:l.value},null,8,v1)]))],6))}}),xt={modelValue:Boolean,title:{type:String,default:""},width:{type:[Number,String],default:500},top:{type:String,default:"15vh"},closeOnClickMask:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},center:Boolean,zIndex:Number},gt={"update:modelValue":t=>typeof t=="boolean",open:()=>!0,close:()=>!0,closed:()=>!0},h1=["aria-label"],x1={class:"ui-modal__header"},g1={class:"ui-modal__body"},k1={key:0,class:"ui-modal__footer"};let K=0,b1=2e3;const kt=e.defineComponent({__name:"modal",props:xt,emits:gt,setup(t,{emit:n}){const l=t,o=n,i=e.ref(null),a=e.ref(null),h=e.computed(()=>l.zIndex??a.value??2e3),x=e.computed(()=>typeof l.width=="number"?`${l.width}px`:l.width);let s=!1,v=null;e.watch(()=>l.modelValue,M=>{M&&!s?(s=!0,c()):!M&&s&&(s=!1,f())},{immediate:!0});function c(){N(),a.value=l.zIndex??++b1,v=document.activeElement,window.addEventListener("keydown",b),e.nextTick(()=>{var M;return(M=i.value)==null?void 0:M.focus()}),o("open")}function f(){L(),window.removeEventListener("keydown",b),o("close")}function p(){o("update:modelValue",!1)}function y(){l.closeOnClickMask&&p()}function b(M){M.key==="Escape"&&p()}function $(){o("closed"),v instanceof HTMLElement&&v.focus()}function N(){K+=1,K===1&&(document.documentElement.style.overflow="hidden")}function L(){K=Math.max(0,K-1),K===0&&(document.documentElement.style.overflow="")}return(M,T)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"ui-modal-fade",onAfterLeave:$},{default:e.withCtx(()=>[M.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ui-modal-overlay",style:e.normalizeStyle({zIndex:h.value}),onClick:e.withModifiers(y,["self"])},[e.createElementVNode("div",{ref_key:"dialogRef",ref:i,class:e.normalizeClass(["ui-modal",{"ui-modal--center":M.center}]),style:e.normalizeStyle({width:x.value,marginTop:M.center?void 0:M.top}),role:"dialog","aria-modal":"true","aria-label":M.title||void 0,tabindex:"-1"},[e.createElementVNode("header",x1,[e.renderSlot(M.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(M.title),1)])]),e.createElementVNode("div",g1,[e.renderSlot(M.$slots,"default")]),M.$slots.footer?(e.openBlock(),e.createElementBlock("footer",k1,[e.renderSlot(M.$slots,"footer")])):e.createCommentVNode("v-if",!0),M.showClose?(e.openBlock(),e.createElementBlock("button",{key:1,class:"ui-modal__close",type:"button","aria-label":"关闭",onClick:p},[e.createVNode(e.unref(f1),{name:"close",size:16})])):e.createCommentVNode("v-if",!0)],14,h1)],4)):e.createCommentVNode("v-if",!0)]),_:3})]))}}),bt={name:"UiModal",install(t){t.component("UiModal",kt)}},B1={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},Bt={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function _1(t){return t in Bt}const w1={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},C1=["innerHTML"],ce=e.defineComponent({__name:"icon",props:B1,setup(t){const n=t,l=e.computed(()=>_1(n.name)?Bt[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",w1,[e.createElementVNode("g",{innerHTML:l.value},null,8,C1)]))],6))}}),_t={type:{type:String,default:"info"},title:{type:String,default:""},showClose:{type:Boolean,default:!0}},M1={class:"ui-notification__main"},E1={key:0,class:"ui-notification__title"},$1={class:"ui-notification__content"},ee=e.defineComponent({__name:"notification",props:_t,emits:["close","click"],setup(t,{emit:n}){const l=n;return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-notification",`ui-notification--${o.type}`]),role:"alert",onClick:i[1]||(i[1]=a=>l("click"))},[e.createVNode(e.unref(ce),{name:o.type,class:"ui-notification__icon",size:22},null,8,["name"]),e.createElementVNode("div",M1,[o.title||o.$slots.title?(e.openBlock(),e.createElementBlock("div",E1,[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",$1,[e.renderSlot(o.$slots,"default")])]),o.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"ui-notification__close",type:"button","aria-label":"关闭",onClick:i[0]||(i[0]=e.withModifiers(a=>l("close"),["stop"]))},[e.createVNode(e.unref(ce),{name:"close",size:14})])):e.createCommentVNode("v-if",!0)],2))}}),V1=300,se={};function S1(t){let n=se[t];return(!n||!n.isConnected)&&(n=document.createElement("div"),n.className=`ui-notification-container ui-notification-container--${t}`,document.body.appendChild(n),se[t]=n),n}function j(t){const n=t.position??"top-right",l=document.createElement("div");l.className="ui-notification__item",S1(n).appendChild(l);let o=!1,i=null;const a=()=>{o||(o=!0,i&&clearTimeout(i),l.classList.add("is-leave"),setTimeout(()=>{var x;e.render(null,l),l.remove(),(x=t.onClose)==null||x.call(t)},V1))},h=e.createVNode(ee,{type:t.type??"info",title:t.title??"",showClose:t.showClose??!0,onClick:t.onClick,onClose:a},{default:()=>t.message});return e.render(h,l),l.offsetHeight,l.classList.add("is-enter"),t.duration!==0&&(i=setTimeout(a,t.duration??4500)),{close:a}}const R=t=>j(typeof t=="string"?{message:t}:t);R.success=(t,n)=>j({...n,message:t,type:"success"});R.warning=(t,n)=>j({...n,message:t,type:"warning"});R.info=(t,n)=>j({...n,message:t,type:"info"});R.error=(t,n)=>j({...n,message:t,type:"error"});const wt={name:"UiNotification",install(t){t.component("UiNotification",ee)}},z1={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},Ct={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function N1(t){return t in Ct}const L1={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},H1=["innerHTML"],ue=e.defineComponent({__name:"icon",props:z1,setup(t){const n=t,l=e.computed(()=>N1(n.name)?Ct[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",L1,[e.createElementVNode("g",{innerHTML:l.value},null,8,H1)]))],6))}}),Mt={modelValue:{type:Number,default:1},total:{type:Number,default:0},pageSize:{type:Number,default:10},pagerCount:{type:Number,default:7},layout:{type:String,default:"prev, pager, next"},disabled:Boolean},Et={"update:modelValue":t=>typeof t=="number",change:t=>typeof t=="number"},T1={key:0,class:"ui-pagination__total"},P1=["disabled"],D1={class:"ui-pagination__pager"},A1=["disabled","onClick"],U1=["disabled","aria-label","onClick"],F1=["disabled"],$t=e.defineComponent({__name:"pagination",props:Mt,emits:Et,setup(t,{emit:n}){const l=t,o=n,i=e.computed(()=>Math.max(1,Math.ceil(l.total/l.pageSize))),a=e.computed({get:()=>{const c=Number(l.modelValue)||1;return Math.min(Math.max(1,c),i.value)},set:c=>{const f=Math.min(Math.max(1,c),i.value);f!==a.value&&(o("update:modelValue",f),o("change",f))}});function h(c){return l.layout.split(",").map(f=>f.trim()).includes(c)}const x=e.computed(()=>{const c=i.value,f=Math.max(5,l.pagerCount);if(c<=f)return Array.from({length:c},(N,L)=>L+1);const p=Math.floor(f/2);let y=Math.max(1,a.value-p),b=Math.min(c,y+f-1);b-y<f-1&&(y=Math.max(1,b-f+1));const $=[];y>1&&($.push(1),y>2&&$.push("prev-more"));for(let N=y;N<=b;N++)$.push(N);return b<c&&(b<c-1&&$.push("next-more"),$.push(c)),$});function s(c){l.disabled||(a.value=a.value+c)}function v(c){l.disabled||c===a.value||(a.value=c)}return(c,f)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["ui-pagination",{"is-disabled":c.disabled}]),role:"navigation","aria-label":"分页"},[h("total")?(e.openBlock(),e.createElementBlock("span",T1,"共 "+e.toDisplayString(c.total)+" 条",1)):e.createCommentVNode("v-if",!0),h("prev")?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(["ui-pagination__btn",{"is-disabled":a.value===1}]),disabled:c.disabled||a.value===1,"aria-label":"上一页",onClick:f[0]||(f[0]=p=>s(-1))},[e.createVNode(e.unref(ue),{name:"arrow-left",size:12})],10,P1)):e.createCommentVNode("v-if",!0),e.createElementVNode("ul",D1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,p=>(e.openBlock(),e.createElementBlock("li",{key:p},[typeof p=="number"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["ui-pagination__item",{"is-active":p===a.value}]),disabled:c.disabled,onClick:y=>v(p)},e.toDisplayString(p),11,A1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"ui-pagination__item ui-pagination__more",disabled:c.disabled,"aria-label":p==="prev-more"?"向前多页":"向后多页",onClick:y=>s(p==="prev-more"?-(c.pagerCount-2):c.pagerCount-2)}," ••• ",8,U1))]))),128))]),h("next")?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["ui-pagination__btn",{"is-disabled":a.value===i.value}]),disabled:c.disabled||a.value===i.value,"aria-label":"下一页",onClick:f[1]||(f[1]=p=>s(1))},[e.createVNode(e.unref(ue),{name:"arrow-right",size:12})],10,F1)):e.createCommentVNode("v-if",!0)],2))}}),Vt={name:"UiPagination",install(t){t.component("UiPagination",$t)}},I1={type:{type:String,default:"default"},size:{type:String,default:"medium"},plain:Boolean,round:Boolean,disabled:Boolean,loading:Boolean,"native-type":{type:String,default:"button"}},K1={click:t=>t instanceof MouseEvent},O1=["type","disabled"],q1={key:0,class:"ui-button__loading"},de=e.defineComponent({__name:"button",props:I1,emits:K1,setup(t,{emit:n}){const l=t,o=n;function i(a){l.loading||l.disabled||o("click",a)}return(a,h)=>(e.openBlock(),e.createElementBlock("button",{type:a.nativeType,class:e.normalizeClass(["ui-button",`ui-button--${a.type}`,`ui-button--${a.size}`,{"is-plain":a.plain,"is-round":a.round,"is-disabled":a.disabled}]),disabled:a.disabled,onClick:i},[a.loading?(e.openBlock(),e.createElementBlock("span",q1)):e.createCommentVNode("v-if",!0),e.renderSlot(a.$slots,"default")],10,O1))}}),St={modelValue:{type:Boolean,default:!1},title:{type:String,default:""},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},confirmButtonType:{type:String,default:"primary"},placement:{type:String,default:"top"},width:{type:[Number,String],default:180},trigger:{type:String,default:"click"},disabled:Boolean},zt={"update:modelValue":t=>typeof t=="boolean",confirm:()=>!0,cancel:()=>!0,"visible-change":t=>typeof t=="boolean"},j1={class:"ui-popconfirm__body"},R1={class:"ui-popconfirm__footer"},A=8,Nt=e.defineComponent({__name:"popconfirm",props:St,emits:zt,setup(t,{emit:n}){const l=t,o=n,i=e.ref(),a=e.ref(),h=e.ref(l.modelValue),x=e.ref({}),s=e.ref(l.placement);let v=null,c=null;const f=e.computed(()=>typeof l.width=="number"?`${l.width}px`:l.width);e.watch(()=>l.modelValue,S=>{h.value=S}),e.watch(h,S=>{S!==l.modelValue&&o("update:modelValue",S),o("visible-change",S),S?(document.addEventListener("mousedown",L),window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),e.nextTick(p)):(document.removeEventListener("mousedown",L),window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p))},{immediate:!0}),e.watch(()=>l.placement,S=>{s.value=S,h.value&&e.nextTick(p)});function p(){const S=i.value,w=a.value;if(!S||!w)return;const C=S.getBoundingClientRect(),_=w.offsetWidth,u=w.offsetHeight,g=window.innerWidth,k=window.innerHeight;let[V,z="center"]=l.placement.split("-");V==="top"&&C.top-u-A<0&&C.bottom+u+A<=k?V="bottom":V==="bottom"&&C.bottom+u+A>k&&C.top-u-A>=0?V="top":V==="left"&&C.left-_-A<0&&C.right+_+A<=g?V="right":V==="right"&&C.right+_+A>g&&C.left-_-A>=0&&(V="left"),s.value=z==="center"?V:`${V}-${z}`;const P={start:C.left,center:C.left+C.width/2-_/2,end:C.right-_},m={start:C.top,center:C.top+C.height/2-u/2,end:C.bottom-u};let r,d;V==="top"||V==="bottom"?(d=P[z],r=V==="top"?C.top-u-A:C.bottom+A,d=Math.min(Math.max(d,0),Math.max(0,g-_))):(r=m[z],d=V==="left"?C.left-_-A:C.right+A,r=Math.min(Math.max(r,0),Math.max(0,k-u))),x.value={top:`${r}px`,left:`${d}px`,minWidth:f.value}}function y(){v&&window.clearTimeout(v),c&&window.clearTimeout(c),v=null,c=null}function b(){l.disabled||(y(),h.value=!h.value)}function $(){l.trigger!=="hover"||l.disabled||(y(),v=window.setTimeout(()=>h.value=!0,150))}function N(){l.trigger==="hover"&&(y(),c=window.setTimeout(()=>h.value=!1,150))}function L(S){var w,C;const _=S.target;(w=i.value)!=null&&w.contains(_)||(C=a.value)!=null&&C.contains(_)||(h.value=!1)}function M(){h.value=!1,o("confirm")}function T(){h.value=!1,o("cancel")}return e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",L),window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p),y()}),(S,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:i,class:"ui-popconfirm",onMouseenter:$,onMouseleave:N},[e.createElementVNode("div",{class:e.normalizeClass(["ui-popconfirm__trigger",{"is-disabled":S.disabled}]),onClick:b},[e.renderSlot(S.$slots,"default")],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"ui-popconfirm-fade"},{default:e.withCtx(()=>[h.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popperRef",ref:a,class:e.normalizeClass(["ui-popconfirm__popper",`is-${s.value}`]),style:e.normalizeStyle(x.value),role:"tooltip",onMouseenter:$,onMouseleave:N},[e.createElementVNode("div",j1,[e.renderSlot(S.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(S.title),1)])]),e.createElementVNode("div",R1,[e.createVNode(e.unref(de),{size:"small",onClick:T},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.cancelText),1)]),_:1}),e.createVNode(e.unref(de),{size:"small",type:S.confirmButtonType,onClick:M},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.confirmText),1)]),_:1},8,["type"])])],38)):e.createCommentVNode("v-if",!0)]),_:3})]))],544))}}),Lt={name:"UiPopconfirm",install(t){t.component("UiPopconfirm",Nt)}},te=Symbol("ui-form"),Ht={model:{type:Object,default:void 0},rules:{type:Object,default:()=>({})},labelWidth:{type:[Number,String],default:90},labelPosition:{type:String,default:"right"},inline:Boolean,disabled:Boolean,validateOnChange:{type:Boolean,default:!0}},Tt={submit:(t,n)=>typeof t=="boolean"},Pt=e.defineComponent({name:"UiForm",__name:"form",props:Ht,emits:Tt,setup(t,{expose:n,emit:l}){const o=t,i=l,a=e.reactive({}),h=e.computed(()=>o.model?e.reactive(o.model):a),x={};let s=!1;function v(){if(s||!o.model)return;const _=Object.keys(o.model);if(_.length){for(const u of _)x[u]=o.model[u];s=!0}}e.watch(()=>o.model,v,{immediate:!0});const c=new Set;function f(_){c.add(_)}function p(_){c.delete(_)}function y(_,u){const g=_.getProp();g&&(u[g]=_.getErrors())}async function b(_){let u=!0;const g={};return await Promise.all([...c].map(async k=>{await k.validate("submit")||(u=!1,y(k,g))})),_==null||_(u,g),u}async function $(_,u){let g=!0;const k={},V=_!=null&&_.length?[...c].filter(z=>z.getProp()&&_.includes(z.getProp())):[...c];return await Promise.all(V.map(async z=>{await z.validate("submit")||(g=!1,y(z,k))})),u==null||u(g,k),g}function N(_){_ in h.value&&(h.value[_]=_ in x?x[_]:void 0)}function L(){for(const _ of c)_.resetField()}function M(_){for(const u of c)(!(_!=null&&_.length)||u.getProp()&&_.includes(u.getProp()))&&u.clearValidate()}async function T(){const _=await b();i("submit",_,h.value)}const S=e.ref();function w(_){var u,g;const k=(u=S.value)==null?void 0:u.querySelector(`[data-prop="${_}"]`);if(k){k.scrollIntoView({block:"center"});const V=k.querySelector("input, textarea, select, [tabindex]");(g=V==null?void 0:V.focus)==null||g.call(V)}}const C={model:h,rules:e.computed(()=>o.rules),labelWidth:e.computed(()=>o.labelWidth),labelPosition:e.computed(()=>o.labelPosition),inline:e.computed(()=>o.inline),disabled:e.computed(()=>o.disabled),validateOnChange:e.computed(()=>o.validateOnChange),addField:f,removeField:p,resetField:N,clearValidate:M,validateField:$};return e.provide(te,C),n({validate:b,validateField:$,resetFields:L,clearValidate:M,scrollToField:w}),(_,u)=>(e.openBlock(),e.createElementBlock("form",{ref_key:"formRef",ref:S,class:e.normalizeClass(["ui-form",{"is-inline":_.inline}]),novalidate:"",onSubmit:e.withModifiers(T,["prevent"])},[e.renderSlot(_.$slots,"default",{model:h.value})],34))}}),Dt={prop:{type:String,default:""},label:{type:String,default:""},labelWidth:{type:[Number,String],default:void 0},labelPosition:{type:String,default:void 0},required:Boolean,rules:{type:[Object,Array],default:void 0},error:{type:String,default:""},showMessage:{type:Boolean,default:!0},disabled:Boolean},W1=["data-prop"],Q1={key:0,class:"ui-form-item__error"},At=e.defineComponent({name:"UiFormItem",__name:"form-item",props:Dt,setup(t){const n=t,l=e.inject(te,void 0),o=e.computed(()=>n.labelPosition??(l==null?void 0:l.labelPosition.value)??"right"),i=e.computed(()=>n.labelWidth??(l==null?void 0:l.labelWidth.value)),a=e.computed(()=>n.disabled??(l==null?void 0:l.disabled.value)),h=e.computed(()=>{if(o.value!=="top"&&i.value!==void 0)return{width:typeof i.value=="number"?`${i.value}px`:i.value}}),x=e.computed(()=>l==null?void 0:l.model.value);function s(){var r;return n.prop?(r=x.value)==null?void 0:r[n.prop]:void 0}function v(){var r;const d=[],B=n.prop?(r=l==null?void 0:l.rules.value)==null?void 0:r[n.prop]:void 0;return B&&d.push(...Array.isArray(B)?B:[B]),n.rules&&d.push(...Array.isArray(n.rules)?n.rules:[n.rules]),n.required&&!d.some(E=>E.required)&&d.push({required:!0}),d}function c(r,d){return r.filter(B=>B.trigger?(Array.isArray(B.trigger)?B.trigger:[B.trigger]).includes(d):d==="change")}const f=e.computed(()=>n.required||v().some(r=>r.required)),p=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,y=/^(https?:\/\/|ftp:\/\/)?[\w-]+(\.[\w-]+)+([/?].*)?$/i,b={string:r=>typeof r=="string",number:r=>typeof r=="number"||typeof r=="string"&&r.trim()!==""&&!Number.isNaN(Number(r)),boolean:r=>typeof r=="boolean",array:r=>Array.isArray(r),date:r=>r instanceof Date||typeof r=="string"&&!Number.isNaN(Date.parse(r)),email:r=>p.test(String(r??"")),url:r=>y.test(String(r??""))},$={number:"需为数字",array:"需为数组",date:"需为日期",email:"邮箱格式不正确",url:"URL 格式不正确"};function N(r){return r==null||r===""}function L(r){return typeof r=="number"?r:typeof r=="string"||Array.isArray(r)?r.length:0}async function M(r,d,B,E){if(r.required&&N(d))return r.message||`${E||B}不能为空`;if(!N(d)){if(r.type){const H=b[r.type];if(H&&!H(d))return r.message||$[r.type]||"格式不正确"}if(r.min!==void 0||r.max!==void 0){const H=L(d);if(r.min!==void 0&&H<r.min)return r.message||`${E||B}不能小于 ${r.min}`;if(r.max!==void 0&&H>r.max)return r.message||`${E||B}不能大于 ${r.max}`}if(r.pattern&&!r.pattern.test(String(d)))return r.message||"格式不正确";if(r.validator){let H;try{H=r.validator(d,x.value??{}),H instanceof Promise&&(H=await H)}catch{return r.message||"校验不通过"}if(typeof H=="string")return H;if(H===!1)return r.message||"校验不通过"}}}const T=e.ref([]),S=e.ref(""),w=e.computed(()=>n.error||S.value),C=e.computed(()=>w.value!==""),_=e.computed(()=>[`is-label-${o.value}`,{"is-required":f.value,"is-error":C.value,"is-disabled":a.value}]);function u(r){T.value=r,S.value=r[0]??""}function g(){T.value=[],S.value=""}async function k(r="submit"){if(!n.prop)return!0;const d=v(),B=r==="submit"?d:c(d,r);if(B.length===0)return!0;const E=[];for(const H of B){const D=await M(H,s(),n.prop,n.label);D&&E.push(D)}return E.length?u(E):g(),E.length===0}function V(){(l==null?void 0:l.validateOnChange.value)!==!1&&k("change")}function z(){(l==null?void 0:l.validateOnChange.value)!==!1&&k("blur")}function P(){n.prop&&(l==null||l.resetField(n.prop)),g()}const m={getProp:()=>n.prop,validate:k,resetField:P,clearValidate:g,getErrors:()=>[...T.value]};return e.onMounted(()=>l==null?void 0:l.addField(m)),e.onBeforeUnmount(()=>l==null?void 0:l.removeField(m)),(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-form-item",_.value]),"data-prop":r.prop||void 0},[r.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"ui-form-item__label",style:e.normalizeStyle(h.value)},e.toDisplayString(r.label),5)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"ui-form-item__content",onChangeCapture:V,onBlurCapture:z},[e.renderSlot(r.$slots,"default"),e.createVNode(e.Transition,{name:"ui-form-fade"},{default:e.withCtx(()=>[r.showMessage&&w.value?(e.openBlock(),e.createElementBlock("p",Q1,e.toDisplayString(w.value),1)):e.createCommentVNode("v-if",!0)]),_:1})],32)],10,W1))}}),Ut={name:"UiForm",install(t){t.component("UiForm",Pt),t.component("UiFormItem",At)}},J1={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},Ft={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function G1(t){return t in Ft}const X1={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Y1=["innerHTML"],pe=e.defineComponent({__name:"icon",props:J1,setup(t){const n=t,l=e.computed(()=>G1(n.name)?Ft[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",X1,[e.createElementVNode("g",{innerHTML:l.value},null,8,Y1)]))],6))}}),It={data:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},stripe:Boolean,border:Boolean,size:{type:String,default:"medium"},emptyText:{type:String,default:"暂无数据"}},Kt={"sort-change":t=>!0},Z1={class:"ui-table__inner"},en={class:"ui-table__head"},tn=["aria-sort"],ln=["onClick"],nn={class:"ui-table__sort-label"},an={class:"ui-table__sort-icons"},on={key:2},rn={class:"ui-table__body"},cn={key:0},sn=["colspan"],un=["innerHTML"],dn={key:2},Ot=e.defineComponent({__name:"table",props:It,emits:Kt,setup(t,{emit:n}){const l=t,o=n,i=e.useSlots(),a=e.ref({column:null,prop:"",order:null}),h=e.computed(()=>{const{prop:y,order:b}=a.value;if(!y||!b)return l.data;const $=b==="ascending"?1:-1;return[...l.data].sort((N,L)=>{const M=N[y],T=L[y];return M===T?0:M>T?$:-$})});function x(y){return y.width?{width:typeof y.width=="number"?`${y.width}px`:y.width}:void 0}function s(y,b){return b.prop?y[b.prop]:""}function v(y){return!!y&&!!i[y]}function c(y){if(!y.sortable||!y.prop)return;let b;a.value.prop!==y.prop?b="ascending":b=a.value.order==="ascending"?"descending":null,a.value={column:y,prop:y.prop,order:b},o("sort-change",{column:y,prop:y.prop,order:b})}function f(y,b){return a.value.order===y&&a.value.prop===b.prop}function p(y){if(!(a.value.prop!==y.prop||!a.value.order))return a.value.order}return(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-table",[`ui-table--${y.size}`,{"is-striped":y.stripe,"is-bordered":y.border}]])},[e.createElementVNode("table",Z1,[e.createElementVNode("colgroup",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.columns,($,N)=>(e.openBlock(),e.createElementBlock("col",{key:N,style:e.normalizeStyle(x($))},null,4))),128))]),e.createElementVNode("thead",en,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.columns,($,N)=>(e.openBlock(),e.createElementBlock("th",{key:N,class:e.normalizeClass(["ui-table__cell",[`is-${$.align||"left"}`,{"is-sortable":$.sortable}]]),"aria-sort":p($)},[v($.headerSlot)?e.renderSlot(y.$slots,$.headerSlot,{column:$,index:N},void 0,void 0,0):$.sortable?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"ui-table__sort-btn",onClick:L=>c($)},[e.createElementVNode("span",nn,e.toDisplayString($.label),1),e.createElementVNode("span",an,[e.createVNode(e.unref(pe),{name:"chevron-up",size:12,class:e.normalizeClass({"is-active":f("ascending",$)})},null,8,["class"]),e.createVNode(e.unref(pe),{name:"chevron-down",size:12,class:e.normalizeClass({"is-active":f("descending",$)})},null,8,["class"])])],8,ln)):(e.openBlock(),e.createElementBlock("span",on,e.toDisplayString($.label),1))],10,tn))),128))])]),e.createElementVNode("tbody",rn,[h.value.length===0?(e.openBlock(),e.createElementBlock("tr",cn,[e.createElementVNode("td",{class:"ui-table__empty",colspan:y.columns.length||1},[e.renderSlot(y.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(y.emptyText),1)])],8,sn)])):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,($,N)=>(e.openBlock(),e.createElementBlock("tr",{key:N},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.columns,(L,M)=>(e.openBlock(),e.createElementBlock("td",{key:M,class:e.normalizeClass(["ui-table__cell",`is-${L.align||"left"}`])},[v(L.slot)?e.renderSlot(y.$slots,L.slot,{row:$,column:L,index:N},void 0,void 0,0):L.formatter?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:L.formatter($,L,s($,L),N)},null,8,un)):(e.openBlock(),e.createElementBlock("span",dn,e.toDisplayString(s($,L)),1))],2))),128))]))),128))])])],2))}}),qt={name:"UiTable",install(t){t.component("UiTable",Ot)}},pn={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},jt={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function yn(t){return t in jt}const mn={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},vn=["innerHTML"],ye=e.defineComponent({__name:"icon",props:pn,setup(t){const n=t,l=e.computed(()=>yn(n.name)?jt[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",mn,[e.createElementVNode("g",{innerHTML:l.value},null,8,vn)]))],6))}}),le={label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",key:"key"},Rt={data:{type:Array,default:()=>[]},props:{type:Object,default:()=>({})},nodeKey:{type:String,default:""},showCheckbox:Boolean,checkStrictly:Boolean,defaultExpandAll:Boolean,defaultExpandedKeys:{type:Array,default:()=>[]},defaultCheckedKeys:{type:Array,default:()=>[]},expandOnClickNode:{type:Boolean,default:!0},currentNodeKey:{type:[String,Number],default:null},lazy:Boolean,load:{type:Function,default:void 0},emptyText:{type:String,default:"暂无数据"}},Wt={"update:current-node-key":null,"update:checked-keys":null,"node-click":(t,n,l)=>l instanceof MouseEvent,"node-expand":()=>!0,"node-collapse":()=>!0,check:(t,n)=>!0,"check-change":(t,n,l)=>!0,"node-contextmenu":(t,n,l)=>!0},ne=Symbol("ui-tree"),fn={key:2,class:"ui-tree-node__expand-placeholder"},hn=["checked","disabled"],xn={key:0,class:"ui-tree-node__children"},gn=e.defineComponent({__name:"tree-node",props:{node:{}},setup(t){const n=t,l=e.inject(ne),o=e.ref(null),i=e.computed(()=>(l==null?void 0:l.config.value)??le),a=e.computed(()=>n.node),h=e.computed(()=>!!l&&l.expandedKeys.value.has(a.value.key)),x=e.computed(()=>!!l&&l.checkedKeys.value.has(a.value.key)),s=e.computed(()=>!!l&&l.halfCheckedKeys.value.has(a.value.key)),v=e.computed(()=>!!l&&l.selectedKey.value===a.value.key),c=e.computed(()=>!!a.value.data[i.value.disabled]),f=e.computed(()=>!!l&&l.loadingKeys.value.has(a.value.key)),p=e.computed(()=>!!l&&l.showCheckbox.value),y=e.computed(()=>a.value.children);e.watchEffect(()=>{o.value&&(o.value.indeterminate=s.value)}),e.watch([h,()=>y.value.length],([M,T])=>{!l||!M||T>0||l.lazy.value&&!a.value.isLeaf&&!f.value&&l.loadNodeData(a.value)},{immediate:!0});function b(){l==null||l.toggleExpand(a.value)}function $(){l==null||l.toggleCheck(a.value,a.value.data)}function N(M){l==null||l.handleNodeClick(a.value,a.value.data,M)}function L(M){l==null||l.handleNodeContextMenu(a.value,a.value.data,M)}return(M,T)=>{const S=e.resolveComponent("TreeNode",!0);return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-tree-node",{"is-current":v.value,"is-expanded":h.value}])},[e.createCommentVNode(" 节点行 "),e.createElementVNode("div",{class:"ui-tree-node__content",style:e.normalizeStyle({paddingLeft:`${(a.value.level-1)*18+4}px`}),onClick:N,onContextmenu:e.withModifiers(L,["prevent"])},[e.createElementVNode("span",{class:e.normalizeClass(["ui-tree-node__expand-icon",{"is-loading":f.value}]),onClick:e.withModifiers(b,["stop"])},[f.value?(e.openBlock(),e.createBlock(e.unref(ye),{key:0,name:"loading",size:14,spin:""})):a.value.isLeaf?(e.openBlock(),e.createElementBlock("span",fn)):(e.openBlock(),e.createBlock(e.unref(ye),{key:1,name:h.value?"chevron-down":"chevron-right",size:14},null,8,["name"]))],2),p.value?(e.openBlock(),e.createElementBlock("label",{key:0,class:"ui-tree-node__checkbox",onClick:T[0]||(T[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("input",{ref_key:"checkboxEl",ref:o,type:"checkbox",checked:x.value,disabled:c.value,onChange:$},null,40,hn)])):e.createCommentVNode("v-if",!0),e.createElementVNode("span",{class:e.normalizeClass(["ui-tree-node__label",{"is-disabled":c.value}])},[e.renderSlot(M.$slots,"default",{node:a.value,data:a.value.data},()=>[e.createTextVNode(e.toDisplayString(a.value.data[i.value.label]),1)])],2)],36),e.createCommentVNode(" 子节点(v-if 移除空容器,v-show 负责展开动画) "),e.createVNode(e.Transition,{name:"ui-tree-node__fade"},{default:e.withCtx(()=>[y.value.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,w=>(e.openBlock(),e.createBlock(S,{key:w.key,node:w},{default:e.withCtx(()=>[e.renderSlot(M.$slots,"default",{node:w,data:w.data})]),_:2},1032,["node"]))),128))],512)),[[e.vShow,h.value]]):e.createCommentVNode("v-if",!0)]),_:3})],2)}}}),kn={class:"ui-tree"},bn={key:0,class:"ui-tree__empty"},Qt=e.defineComponent({__name:"tree",props:Rt,emits:Wt,setup(t,{expose:n,emit:l}){const o=t,i=l,a=e.computed(()=>({...le,...o.props})),h=e.computed(()=>o.nodeKey||a.value.key||"key"),x=e.reactive(new Map),s=e.computed(()=>Array.from(x.values()).filter(m=>m.level===1)),v=e.ref(new Set),c=e.ref(new Set),f=e.ref(new Set),p=e.ref(null),y=e.ref(new Set),b=e.reactive(new Set);function $(m,r,d,B){m.forEach((E,H)=>{const D=r?`${r.path}-${H}`:`${H}`,I=E[h.value],ie=I==null||I===""?`__gen-${D}`:I,Q={key:ie,data:E,parent:r,children:[],level:d,isLeaf:o.lazy?!!E[a.value.isLeaf]:!Array.isArray(E[a.value.children])||E[a.value.children].length===0,isLazy:o.lazy,path:D};x.set(ie,Q),r&&r.children.push(Q);const J=E[a.value.children];Array.isArray(J)&&J.length&&$(J,Q,d+1)})}let N=!1;function L(){x.clear(),$(o.data,null,1),N||(T(),N=!0),_()}function M(m){!o.load||y.value.has(m.key)||(y.value=new Set(y.value).add(m.key),o.load({key:m.key,level:m.level,data:m.data},r=>{const d=new Set(y.value);d.delete(m.key),y.value=d,b.add(m.key);const B=a.value.children,E=Array.isArray(m.data[B])?m.data[B]:[];m.data[B]=E.concat(r),r.length===0&&(m.data[a.value.isLeaf]=!0)}))}function T(){const m=new Set;o.defaultExpandAll&&x.forEach(r=>{r.isLeaf||m.add(r.key)}),o.defaultExpandedKeys.forEach(r=>m.add(r)),v.value=m,c.value=new Set(o.defaultCheckedKeys),p.value=o.currentNodeKey??null}e.watch(()=>o.currentNodeKey,m=>{p.value=m??null});function S(m){return!!m.data[a.value.disabled]}function w(m){let r=m.parent;for(;r;){if(!r.children.length){r=r.parent;continue}r.children.every(d=>c.value.has(d.key))?c.value.add(r.key):c.value.delete(r.key),r=r.parent}}function C(){const m=new Set;x.forEach(r=>{if(!r.children.length)return;const d=r.children.some(E=>c.value.has(E.key)),B=r.children.every(E=>c.value.has(E.key));d&&!B&&m.add(r.key)}),f.value=m}function _(){for(const m of c.value)x.has(m)||c.value.delete(m);o.checkStrictly||(x.forEach(m=>{m.children.length&&c.value.delete(m.key)}),Array.from(c.value).forEach(m=>{const r=x.get(m);r&&w(r)})),C()}function u(m,r){if(S(m))return;const d=!c.value.has(m.key),B=[],E=(H,D)=>{c.value.has(H.key)!==D&&B.push({node:H,checked:D}),D?c.value.add(H.key):c.value.delete(H.key)};if(o.checkStrictly)E(m,d);else{const H=D=>{E(D,d),D.children.forEach(H)};H(m),w(m),C()}B.forEach(({node:H,checked:D})=>i("check-change",H,H.data,D)),i("check",m,r),i("update:checked-keys",P())}function g(m){v.value.has(m.key)||(o.lazy&&!m.isLeaf&&m.children.length===0&&!b.has(m.key)&&M(m),v.value=new Set(v.value).add(m.key),i("node-expand",m,m.data))}function k(m){if(!m.isLeaf)if(v.value.has(m.key)){const r=new Set(v.value);r.delete(m.key),v.value=r,i("node-collapse",m,m.data)}else g(m)}function V(m,r,d){S(m)||(o.expandOnClickNode&&!m.isLeaf&&k(m),p.value=m.key,i("update:current-node-key",m.key),i("node-click",m,r,d))}function z(m,r,d){i("node-contextmenu",d,r,m)}function P(){return Array.from(c.value)}return e.provide(ne,{config:a,nodeKeyField:h,expandedKeys:v,checkedKeys:c,halfCheckedKeys:f,selectedKey:p,loadingKeys:y,showCheckbox:e.computed(()=>o.showCheckbox),checkStrictly:e.computed(()=>o.checkStrictly),expandOnClickNode:e.computed(()=>o.expandOnClickNode),lazy:e.computed(()=>o.lazy),isDisabledNode:S,toggleExpand:k,handleNodeClick:V,handleNodeContextMenu:z,toggleCheck:u,loadNodeData:M}),e.watch(()=>o.data,()=>L(),{deep:!0,immediate:!0}),n({getNode:m=>x.get(m)??null,getCheckedKeys:P,getCheckedNodes:()=>Array.from(x.values()).filter(m=>c.value.has(m.key)),getHalfCheckedKeys:()=>Array.from(f.value),getCurrentKey:()=>p.value,setCurrentKey:m=>{p.value=m??null,i("update:current-node-key",p.value)},setCheckedKeys:m=>{c.value=new Set(m),o.checkStrictly?C():_(),i("update:checked-keys",P())},setChecked:(m,r)=>{const d=x.get(m);d&&c.value.has(m)!==r&&u(d,d.data)},expandAll:()=>{const m=new Set;x.forEach(r=>{r.isLeaf||m.add(r.key)}),v.value=m},collapseAll:()=>{v.value=new Set}}),(m,r)=>(e.openBlock(),e.createElementBlock("div",kn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createBlock(gn,{key:d.key,node:d},{default:e.withCtx(({node:B,data:E})=>[e.renderSlot(m.$slots,"default",{node:B,data:E},()=>[e.createTextVNode(e.toDisplayString(E[a.value.label]),1)])]),_:3},8,["node"]))),128)),s.value.length?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",bn,e.toDisplayString(m.emptyText),1))]))}}),Jt={name:"UiTree",install(t){t.component("UiTree",Qt)}},Gt={modelValue:{type:[String,Number],default:""},type:{type:String,default:""},closable:Boolean},Xt={"update:modelValue":t=>typeof t=="string"||typeof t=="number","tab-click":t=>typeof t=="string"||typeof t=="number","tab-remove":t=>typeof t=="string"||typeof t=="number"},ae=Symbol("ui-tabs"),Bn={class:"ui-tabs__nav-wrap"},_n={class:"ui-tabs__nav",role:"tablist","aria-label":"页签"},wn=["aria-selected","disabled","onClick"],Cn={key:1},Mn=["onClick","onKeydown"],En={class:"ui-tabs__content"},Yt=e.defineComponent({__name:"tabs",props:Gt,emits:Xt,setup(t,{emit:n}){const l=t,o=n,i=e.ref([]),a=e.computed(()=>{if(i.value.some(p=>p.name===l.modelValue&&!p.disabled))return l.modelValue;const f=i.value.find(p=>!p.disabled);return f?f.name:""});function h(f){i.value.some(p=>p.name===f.name)||i.value.push(f)}function x(f){const p=i.value.findIndex(y=>y.name===f);p!==-1&&i.value.splice(p,1)}function s(f){f.disabled||(o("tab-click",f.name),a.value!==f.name&&o("update:modelValue",f.name))}function v(f){return f.closable??l.closable}function c(f){const p=i.value.findIndex(b=>b.name===f.name),y=a.value===f.name;if(o("tab-remove",f.name),y){const b=i.value[p+1]??i.value[p-1];b&&o("update:modelValue",b.name)}}return e.provide(ae,{activeName:a,type:l.type,closable:l.closable,registerPane:h,unregisterPane:x}),(f,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-tabs",`ui-tabs--${f.type||"default"}`])},[e.createElementVNode("div",Bn,[e.createElementVNode("div",_n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.name,type:"button",class:e.normalizeClass(["ui-tabs__item",{"is-active":a.value===y.name,"is-disabled":y.disabled}]),role:"tab","aria-selected":a.value===y.name,disabled:y.disabled,onClick:b=>s(y)},[y.labelSlot?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.labelSlot),{key:0})):(e.openBlock(),e.createElementBlock("span",Cn,e.toDisplayString(y.label||y.name),1)),v(y)?(e.openBlock(),e.createElementBlock("span",{key:2,class:"ui-tabs__close",role:"button",tabindex:"0","aria-label":"关闭该页签",onClick:e.withModifiers(b=>c(y),["stop"]),onKeydown:[e.withKeys(e.withModifiers(b=>c(y),["stop","prevent"]),["enter"]),e.withKeys(e.withModifiers(b=>c(y),["stop","prevent"]),["space"])]},"×",40,Mn)):e.createCommentVNode("v-if",!0)],10,wn))),128))])]),e.createElementVNode("div",En,[e.renderSlot(f.$slots,"default")])],2))}}),Zt={name:{type:[String,Number],required:!0},label:{type:String,default:""},disabled:Boolean,closable:{type:Boolean,default:void 0}},$n=["aria-hidden"],el=e.defineComponent({__name:"tab-pane",props:Zt,setup(t){const n=t,l=e.inject(ae),o=e.reactive({name:e.toRef(n,"name"),label:e.toRef(n,"label"),disabled:e.toRef(n,"disabled"),closable:e.toRef(n,"closable"),labelSlot:e.useSlots().label});l==null||l.registerPane(o),e.onBeforeUnmount(()=>l==null?void 0:l.unregisterPane(n.name));const i=e.computed(()=>(l==null?void 0:l.activeName.value)===n.name);return(a,h)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-tab-pane",{"is-active":i.value}]),role:"tabpanel","aria-hidden":!i.value},[e.renderSlot(a.$slots,"default")],10,$n)),[[e.vShow,i.value]])}}),tl={name:"UiTabs",install(t){t.component("UiTabs",Yt),t.component("UiTabPane",el)}},ll={modelValue:{type:String,default:void 0},placeholder:{type:String,default:"请输入内容"},disabled:Boolean,minHeight:{type:[Number,String],default:120},toolbar:{type:Array,default:void 0}},nl={"update:modelValue":t=>typeof t=="string",input:t=>typeof t=="string",change:t=>typeof t=="string",focus:()=>!0,blur:()=>!0},Vn={class:"ui-rich-editor__toolbar",role:"toolbar","aria-label":"格式工具栏"},Sn={key:0,class:"ui-rich-editor__divider","aria-hidden":"true"},zn=["disabled","title","aria-pressed","onClick"],Nn=["contenteditable","data-placeholder"],al=e.defineComponent({__name:"rich-editor",props:ll,emits:nl,setup(t,{emit:n}){const l=t,o=n,i=[{key:"bold",group:0,command:"bold",state:"bold",label:"B",title:"加粗"},{key:"italic",group:0,command:"italic",state:"italic",label:"I",title:"斜体"},{key:"underline",group:0,command:"underline",state:"underline",label:"U",title:"下划线"},{key:"strike",group:0,command:"strikeThrough",state:"strikeThrough",label:"S",title:"删除线"},{key:"header",group:1,command:"formatBlock",value:"H2",state:"formatBlock",label:"H2",title:"二级标题"},{key:"paragraph",group:1,command:"formatBlock",value:"P",state:"formatBlock",label:"P",title:"正文"},{key:"ul",group:2,command:"insertUnorderedList",state:"insertUnorderedList",label:"列表",title:"无序列表"},{key:"ol",group:2,command:"insertOrderedList",state:"insertOrderedList",label:"编号",title:"有序列表"},{key:"align-left",group:3,command:"justifyLeft",state:"justifyLeft",label:"左",title:"左对齐"},{key:"align-center",group:3,command:"justifyCenter",state:"justifyCenter",label:"中",title:"居中对齐"},{key:"align-right",group:3,command:"justifyRight",state:"justifyRight",label:"右",title:"右对齐"},{key:"link",group:4,command:"createLink",label:"链接",title:"插入链接",type:"link"},{key:"image",group:4,command:"insertImage",label:"图片",title:"插入图片",type:"image"},{key:"undo",group:5,command:"undo",label:"撤销",title:"撤销"},{key:"redo",group:5,command:"redo",label:"重做",title:"重做"},{key:"clear",group:5,command:"removeFormat",label:"清除",title:"清除格式"}],a=e.ref(l.modelValue??""),h=e.ref(null),x=e.ref(new Set),s=e.ref(!0),v=e.computed(()=>l.toolbar?i.filter(w=>l.toolbar.includes(w.key)):i),c=e.computed(()=>{const w=[];for(const C of v.value)w[C.group]||(w[C.group]=[]),w[C.group].push(C);return w.filter(C=>C.length>0)}),f=e.computed(()=>{const w=l.minHeight;return{minHeight:typeof w=="number"?`${w}px`:w}});function p(){var w;const C=((w=h.value)==null?void 0:w.innerHTML)??"";a.value=C,o("update:modelValue",C),o("input",C),N()}function y(w){const C=h.value;if(!(!C||l.disabled)){if(C.focus(),w.type==="link"){const _=window.prompt("请输入链接地址","https://");_&&document.execCommand("createLink",!1,_)}else if(w.type==="image"){const _=window.prompt("请输入图片地址");_&&document.execCommand("insertImage",!1,_)}else document.execCommand(w.command,!1,w.value);p(),b()}}function b(){const w=h.value;if(!w||document.activeElement!==w){x.value=new Set;return}const C=new Set;for(const _ of i)if(_.state)if(_.state==="formatBlock"){const u=String(document.queryCommandValue("formatBlock")||"").toLowerCase();u==="h2"?C.add("header"):u==="p"&&C.add("paragraph")}else $(_.state)&&C.add(_.key);x.value=C}function $(w){try{return document.queryCommandState(w)}catch{return!1}}function N(){const w=h.value;w&&(s.value=w.innerText.trim()==="")}function L(){const w=h.value;if(!w)return;const C=l.modelValue??a.value;w.innerHTML!==C&&(w.innerHTML=C),N()}function M(){p(),b()}function T(){o("focus"),b()}function S(){var w;o("change",((w=h.value)==null?void 0:w.innerHTML)??""),o("blur"),b()}return e.onMounted(()=>{L(),document.addEventListener("selectionchange",b)}),e.onBeforeUnmount(()=>{document.removeEventListener("selectionchange",b)}),e.watch(()=>l.modelValue,L),(w,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-rich-editor",{"is-disabled":w.disabled}])},[e.createElementVNode("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(_,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[u>0?(e.openBlock(),e.createElementBlock("span",Sn)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_,g=>(e.openBlock(),e.createElementBlock("button",{key:g.key,type:"button",class:e.normalizeClass(["ui-rich-editor__tool",{"is-active":x.value.has(g.key)}]),disabled:w.disabled,title:g.title,"aria-pressed":g.state?x.value.has(g.key):void 0,onMousedown:C[0]||(C[0]=e.withModifiers(()=>{},["prevent"])),onClick:k=>y(g)},e.toDisplayString(g.label),43,zn))),128))],64))),128))]),e.createElementVNode("div",{ref_key:"editorRef",ref:h,class:e.normalizeClass(["ui-rich-editor__content",{"is-empty":s.value}]),contenteditable:!w.disabled,"data-placeholder":w.placeholder,style:e.normalizeStyle(f.value),onInput:M,onFocus:T,onBlur:S,onKeyup:b,onMouseup:b},null,46,Nn)],2))}}),ol={name:"UiRichEditor",install(t){t.component("UiRichEditor",al)}},il={modelValue:{type:[String,Number,Array],default:void 0},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"请选择"},disabled:Boolean,clearable:Boolean,multiple:Boolean,filterable:Boolean},rl={"update:modelValue":t=>!0,change:t=>!0,clear:()=>!0,"visible-change":t=>typeof t=="boolean"},Ln=["aria-expanded","aria-disabled","tabindex"],Hn=["value","placeholder"],Tn=["onClick"],Pn=["value","placeholder"],Dn={key:1,class:"ui-select__selected is-placeholder"},An={class:"ui-select__suffix"},Un={key:0,class:"ui-select__list"},Fn=["aria-selected","onMouseenter","onClick"],In={class:"ui-select__item-label"},Kn={key:0,class:"ui-select__item-check"},On={key:1,class:"ui-select__empty"},cl=e.defineComponent({__name:"select",props:il,emits:rl,setup(t,{emit:n}){const l=t,o=n,i=e.ref(l.modelValue),a=e.ref(),h=e.ref(),x=e.ref(),s=e.ref(!1),v=e.ref(""),c=e.ref(-1),f=e.ref(!1),p=e.computed({get:()=>l.modelValue??i.value,set:d=>{i.value=d,o("update:modelValue",d)}}),y=e.computed(()=>{if(l.multiple){const d=Array.isArray(p.value)?p.value:[];return l.options.filter(B=>d.includes(B.value))}return l.options.filter(d=>d.value===p.value)}),b=e.computed(()=>{var d;return((d=y.value[0])==null?void 0:d.label)??""}),$=e.computed(()=>l.multiple?(Array.isArray(p.value)?p.value:[]).length>0:p.value!==void 0&&p.value!==null&&p.value!==""),N=e.computed(()=>{if(!l.filterable||!v.value.trim())return l.options;const d=v.value.trim().toLowerCase();return l.options.filter(B=>B.label.toLowerCase().includes(d))}),L=e.computed(()=>l.filterable?l.multiple?v.value:v.value||(s.value?"":b.value):"");function M(d){v.value=d.target.value,c.value=-1,s.value||S()}function T(){l.disabled||(s.value?s.value=!1:S())}function S(){l.disabled||s.value||(s.value=!0,e.nextTick(w))}function w(){const d=a.value,B=h.value;if(!d||!B)return;const E=d.getBoundingClientRect(),H=B.clientHeight||0,D=window.innerHeight-E.bottom,I=E.top;f.value=H>0&&D<H&&I>D}function C(){s.value&&w()}function _(){var d;l.filterable&&((d=x.value)==null||d.focus())}function u(d){if(!(l.disabled||d.disabled)){if(l.multiple){const B=Array.isArray(p.value)?[...p.value]:[],E=B.indexOf(d.value);E>=0?B.splice(E,1):B.push(d.value),p.value=B,e.nextTick(_)}else p.value=d.value,s.value=!1;o("change",p.value)}}function g(d){if(l.disabled||d.disabled)return;const B=Array.isArray(p.value)?[...p.value]:[],E=B.indexOf(d.value);E>=0&&(B.splice(E,1),p.value=B,o("change",p.value))}function k(){p.value=l.multiple?[]:void 0,o("change",p.value),o("clear")}function V(d){return l.multiple?(Array.isArray(p.value)?p.value:[]).includes(d.value):p.value===d.value}function z(d){if(!l.disabled)switch(d.key){case"ArrowDown":d.preventDefault(),s.value?P(1):S();break;case"ArrowUp":d.preventDefault(),s.value&&P(-1);break;case"Enter":if(d.preventDefault(),s.value){const B=N.value[c.value];B&&u(B)}else S();break;case"Escape":s.value&&(d.preventDefault(),s.value=!1);break}}function P(d){const B=N.value;if(!B.length)return;let E=c.value;for(let H=0;H<B.length;H++)if(E=(E+d+B.length)%B.length,!B[E].disabled){c.value=E;return}}function m(d){!a.value||a.value.contains(d.target)||(s.value=!1)}function r(d){var B;const E=d.relatedTarget;E instanceof Node&&(B=a.value)!=null&&B.contains(E)||(s.value=!1)}return e.watch(s,d=>{d?(document.addEventListener("mousedown",m),window.addEventListener("resize",C),document.addEventListener("scroll",C,!0),e.nextTick(_)):(document.removeEventListener("mousedown",m),window.removeEventListener("resize",C),document.removeEventListener("scroll",C,!0),v.value="",c.value=-1),o("visible-change",d)}),e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",m),window.removeEventListener("resize",C),document.removeEventListener("scroll",C,!0)}),(d,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:a,class:e.normalizeClass(["ui-select",{"is-disabled":d.disabled,"is-open":s.value,"is-multiple":d.multiple,"is-up":f.value}]),onKeydown:z,onFocusout:r},[e.createCommentVNode(" 触发器:点击展开,展示选中内容 "),e.createElementVNode("div",{class:"ui-select__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":s.value,"aria-disabled":d.disabled||void 0,tabindex:d.disabled?-1:0,onClick:T},[e.createCommentVNode(" 单选:可搜索时用输入框承载过滤词,否则用文案展示 "),d.multiple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 多选:标签 + 可选搜索框 "),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,E=>(e.openBlock(),e.createElementBlock("span",{key:String(E.value),class:"ui-select__tag"},[e.createTextVNode(e.toDisplayString(E.label)+" ",1),e.createElementVNode("span",{class:"ui-select__tag-close","aria-hidden":"true",onClick:e.withModifiers(H=>g(E),["stop"])},"×",8,Tn)]))),128)),d.filterable?(e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"filterInputRef",ref:x,class:"ui-select__filter",value:v.value,placeholder:y.value.length?"":d.placeholder,onInput:M,onFocus:S,onClick:B[1]||(B[1]=e.withModifiers(()=>{},["stop"]))},null,40,Pn)):e.createCommentVNode("v-if",!0),!d.filterable&&!y.value.length?(e.openBlock(),e.createElementBlock("span",Dn,e.toDisplayString(d.placeholder),1)):e.createCommentVNode("v-if",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[d.filterable?(e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"filterInputRef",ref:x,class:"ui-select__filter",value:L.value,placeholder:b.value||d.placeholder,onInput:M,onFocus:S,onClick:B[0]||(B[0]=e.withModifiers(()=>{},["stop"]))},null,40,Hn)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["ui-select__selected",{"is-placeholder":!b.value}])},e.toDisplayString(b.value||d.placeholder),3))],64)),e.createCommentVNode(" 后缀:清除按钮 + 箭头 "),e.createElementVNode("span",An,[d.clearable&&$.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"ui-select__clear","aria-hidden":"true",onClick:e.withModifiers(k,["stop"])},"×")):e.createCommentVNode("v-if",!0),B[3]||(B[3]=e.createElementVNode("span",{class:"ui-select__arrow","aria-hidden":"true"},"▾",-1))])],8,Ln),e.createCommentVNode(" 下拉面板 "),e.createVNode(e.Transition,{name:"ui-select-fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:h,class:"ui-select__panel",role:"listbox"},[N.value.length?(e.openBlock(),e.createElementBlock("ul",Un,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(E,H)=>(e.openBlock(),e.createElementBlock("li",{key:String(E.value),role:"option","aria-selected":V(E),class:e.normalizeClass(["ui-select__item",{"is-selected":V(E),"is-disabled":E.disabled,"is-highlighted":H===c.value}]),onMouseenter:D=>c.value=H,onMousedown:B[2]||(B[2]=e.withModifiers(()=>{},["prevent"])),onClick:D=>u(E)},[e.createElementVNode("span",In,e.toDisplayString(E.label),1),V(E)?(e.openBlock(),e.createElementBlock("span",Kn,"✓")):e.createCommentVNode("v-if",!0)],42,Fn))),128))])):(e.openBlock(),e.createElementBlock("div",On,e.toDisplayString(d.options.length?"无匹配数据":"暂无数据"),1))],512)):e.createCommentVNode("v-if",!0)]),_:1})],34))}}),sl={name:"UiSelect",install(t){t.component("UiSelect",cl)}},ul={size:{type:[Number,String,Array],default:8},direction:{type:String,default:"horizontal"},align:{type:String,default:"start"},wrap:Boolean,fill:Boolean,spacer:{type:[String,Object],default:void 0}},qn={key:0,class:"ui-space__spacer"},dl=e.defineComponent({__name:"space",props:ul,setup(t){const n=t,l=e.useSlots(),o={small:8,default:12,large:16};function i(s){return typeof s=="number"?`${s}px`:s in o?`${o[s]}px`:s}const a=e.computed(()=>{const s=n.size;if(Array.isArray(s))return{row:i(s[1]??s[0]),column:i(s[0])};const v=i(s);return{row:v,column:v}}),h=e.computed(()=>({"--ui-space-row-gap":a.value.row,"--ui-space-column-gap":a.value.column})),x=e.computed(()=>{var s;function v(f){return f.flatMap(p=>p.type===e.Fragment?v(p.children??[]):[p])}function c(f){return f.type===e.Comment||typeof f.children=="string"&&!f.children.trim()}return v(((s=l.default)==null?void 0:s.call(l))??[]).filter(f=>!c(f))});return(s,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-space",[`is-${s.direction}`,`is-${s.align}`,{"is-wrap":s.wrap,"is-fill":s.fill}]]),style:e.normalizeStyle(h.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(c,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c))),s.spacer&&f<x.value.length-1?(e.openBlock(),e.createElementBlock("span",qn,[typeof s.spacer=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.spacer),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.spacer),{key:1}))])):e.createCommentVNode("v-if",!0)],64))),128))],6))}}),pl={name:"UiSpace",install(t){t.component("UiSpace",dl)}},yl={active:{type:Number,default:0},direction:{type:String,default:"horizontal"},processStatus:{type:String,default:"process"},finishStatus:{type:String,default:"finish"},alignCenter:Boolean},oe=Symbol("ui-steps"),ml=e.defineComponent({__name:"steps",props:yl,setup(t){const n=t,l=e.ref([]);function o(a){l.value.includes(a)||l.value.push(a)}function i(a){const h=l.value.indexOf(a);h!==-1&&l.value.splice(h,1)}return e.provide(oe,{steps:l,active:e.toRef(n,"active"),direction:e.toRef(n,"direction"),processStatus:e.toRef(n,"processStatus"),finishStatus:e.toRef(n,"finishStatus"),alignCenter:e.toRef(n,"alignCenter"),registerStep:o,unregisterStep:i}),(a,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-steps",[`is-${a.direction}`,{"is-align-center":a.alignCenter}]])},[e.renderSlot(a.$slots,"default")],2))}}),jn={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},vl={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function Rn(t){return t in vl}const Wn={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Qn=["innerHTML"],Jn=e.defineComponent({__name:"icon",props:jn,setup(t){const n=t,l=e.computed(()=>Rn(n.name)?vl[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",Wn,[e.createElementVNode("g",{innerHTML:l.value},null,8,Qn)]))],6))}}),fl={title:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},status:{type:String,default:void 0},disabled:Boolean},Gn={class:"ui-step__head"},Xn={class:"ui-step__icon"},Yn={key:1,class:"ui-step__icon-mark"},Zn={key:2,class:"ui-step__icon-mark"},ea={key:3,class:"ui-step__icon-index"},ta={key:0,class:"ui-step__line"},la={class:"ui-step__main"},na={class:"ui-step__title"},aa={key:0,class:"ui-step__description"},hl=e.defineComponent({__name:"step",props:fl,setup(t){const n=t,l=e.inject(oe),o=e.reactive({status:n.status,disabled:n.disabled});l==null||l.registerStep(o),e.onBeforeUnmount(()=>l==null?void 0:l.unregisterStep(o));const i=e.computed(()=>l?l.steps.value.indexOf(o):-1),a=e.computed(()=>l?i.value===l.steps.value.length-1:!0),h=e.computed(()=>(l==null?void 0:l.direction.value)??"horizontal"),x=e.computed(()=>n.status?n.status:l?i.value<l.active.value?l.finishStatus.value:i.value===l.active.value?l.processStatus.value:"wait":"wait");return(s,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ui-step",[`is-${x.value}`,`is-${h.value}`,{"is-disabled":s.disabled,"is-last":a.value}]])},[e.createElementVNode("div",Gn,[e.createElementVNode("div",Xn,[e.renderSlot(s.$slots,"icon",{},()=>[s.icon?(e.openBlock(),e.createBlock(e.unref(Jn),{key:0,name:s.icon},null,8,["name"])):x.value==="finish"?(e.openBlock(),e.createElementBlock("span",Yn,"✓")):x.value==="error"?(e.openBlock(),e.createElementBlock("span",Zn,"✕")):(e.openBlock(),e.createElementBlock("span",ea,e.toDisplayString(i.value+1),1))])]),a.value?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("div",ta,[...v[0]||(v[0]=[e.createElementVNode("div",{class:"ui-step__line-inner"},null,-1)])]))]),e.createElementVNode("div",la,[e.createElementVNode("div",na,e.toDisplayString(s.title),1),s.description?(e.openBlock(),e.createElementBlock("div",aa,e.toDisplayString(s.description),1)):e.createCommentVNode("v-if",!0)])],2))}}),xl={name:"UiSteps",install(t){t.component("UiSteps",ml),t.component("UiStep",hl)}},oa={type:{type:String,default:"default"},size:{type:String,default:"medium"},plain:Boolean,round:Boolean,disabled:Boolean,loading:Boolean,"native-type":{type:String,default:"button"}},ia={click:t=>t instanceof MouseEvent},ra=["type","disabled"],ca={key:0,class:"ui-button__loading"},sa=e.defineComponent({__name:"button",props:oa,emits:ia,setup(t,{emit:n}){const l=t,o=n;function i(a){l.loading||l.disabled||o("click",a)}return(a,h)=>(e.openBlock(),e.createElementBlock("button",{type:a.nativeType,class:e.normalizeClass(["ui-button",`ui-button--${a.type}`,`ui-button--${a.size}`,{"is-plain":a.plain,"is-round":a.round,"is-disabled":a.disabled}]),disabled:a.disabled,onClick:i},[a.loading?(e.openBlock(),e.createElementBlock("span",ca)):e.createCommentVNode("v-if",!0),e.renderSlot(a.$slots,"default")],10,ra))}}),ua={name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:""},spin:Boolean},gl={search:'<circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" />',plus:'<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />',minus:'<line x1="5" y1="12" x2="19" y2="12" />',close:'<line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" />',check:'<polyline points="20 6 9 17 4 12" />',loading:'<path d="M21 12a9 9 0 1 1-6.219-8.56" />',refresh:'<polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" /><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />',delete:'<polyline points="3 6 5 6 21 6" /><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><line x1="10" y1="11" x2="10" y2="17" /><line x1="14" y1="11" x2="14" y2="17" />',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="7 10 12 15 17 10" /><line x1="12" y1="15" x2="12" y2="3" />',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><polyline points="17 8 12 3 7 8" /><line x1="12" y1="3" x2="12" y2="15" />',setting:'<circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /><polyline points="9 22 9 12 15 12 15 22" />',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2" /><line x1="16" y1="2" x2="16" y2="6" /><line x1="8" y1="2" x2="8" y2="6" /><line x1="3" y1="10" x2="21" y2="10" />',clock:'<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />',message:'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" />',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" /><path d="M13.73 21a2 2 0 0 1-3.46 0" />',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" /><polyline points="22,6 12,13 2,6" />',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" /><circle cx="12" cy="12" r="3" />',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5" /><polyline points="5 12 12 5 19 12" />',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" />',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12" /><polyline points="12 19 5 12 12 5" />',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" />',"chevron-up":'<polyline points="18 15 12 9 6 15" />',"chevron-down":'<polyline points="6 9 12 15 18 9" />',"chevron-left":'<polyline points="15 18 9 12 15 6" />',"chevron-right":'<polyline points="9 18 15 12 9 6" />',more:'<circle cx="12" cy="12" r="1" /><circle cx="19" cy="12" r="1" /><circle cx="5" cy="12" r="1" />',menu:'<line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="18" x2="21" y2="18" />',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2" /><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /><polyline points="15 3 21 3 21 9" /><line x1="10" y1="14" x2="21" y2="3" />',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /><polyline points="16 17 21 12 16 7" /><line x1="21" y1="12" x2="9" y2="12" />',grid:'<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" /><rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />',info:'<circle cx="12" cy="12" r="10" /><line x1="12" y1="16" x2="12" y2="12" /><line x1="12" y1="8" x2="12.01" y2="8" />',success:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><polyline points="22 4 12 14.01 9 11.01" />',warning:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" />',error:'<circle cx="12" cy="12" r="10" /><line x1="15" y1="9" x2="9" y2="15" /><line x1="9" y1="9" x2="15" y2="15" />',question:'<circle cx="12" cy="12" r="10" /><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /><line x1="12" y1="17" x2="12.01" y2="17" />',"plus-circle":'<circle cx="12" cy="12" r="10" /><line x1="12" y1="8" x2="12" y2="16" /><line x1="8" y1="12" x2="16" y2="12" />'};function da(t){return t in gl}const pa={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},ya=["innerHTML"],U=e.defineComponent({__name:"icon",props:ua,setup(t){const n=t,l=e.computed(()=>da(n.name)?gl[n.name]:""),o=e.computed(()=>({fontSize:typeof n.size=="number"?`${n.size}px`:n.size,...n.color?{color:n.color}:{}}));return(i,a)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["ui-icon",{"is-spin":i.spin}]),style:e.normalizeStyle(o.value),role:"img"},[(e.openBlock(),e.createElementBlock("svg",pa,[e.createElementVNode("g",{innerHTML:l.value},null,8,ya)]))],6))}}),kl={action:{type:String,default:""},name:{type:String,default:"file"},multiple:Boolean,accept:{type:String,default:""},disabled:Boolean,limit:{type:Number,default:0},headers:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})},withCredentials:Boolean,drag:Boolean,autoUpload:{type:Boolean,default:!0},showFileList:{type:Boolean,default:!0},listType:{type:String,default:"text"},fileList:{type:Array,default:()=>[]}},bl={"update:file-list":t=>!0,change:t=>!0,success:(t,n)=>!0,error:(t,n)=>!0,progress:(t,n)=>!0,remove:t=>!0,exceed:(t,n)=>!0},ma={class:"ui-upload"},va={key:0,class:"ui-upload__drag-inner"},fa={key:2,class:"ui-upload__card-add"},ha=["accept","multiple","disabled"],xa=["src","alt"],ga={key:1,class:"ui-upload__thumb-placeholder"},ka={class:"ui-upload__card-actions"},ba=["src","alt"],Ba={key:1,class:"ui-upload__file-icon"},_a={class:"ui-upload__file-info"},wa=["title"],Ca={class:"ui-upload__file-size"},Ma={class:"ui-upload__file-status"},Ea={key:0,class:"ui-upload__file-percent"},$a={key:2,class:"ui-upload__progress"},Bl=e.defineComponent({__name:"upload",props:kl,emits:bl,setup(t,{emit:n}){const l=t,o=n;let i=0;const a=e.ref([]),h=e.ref(),x=e.ref(!1),s=e.computed(()=>l.listType==="picture-card"),v=e.computed(()=>l.limit>0&&a.value.length>=l.limit);let c=null;e.watch(()=>l.fileList,u=>{u!==c&&(a.value=u.map(g=>({...g})))},{immediate:!0,deep:!0});function f(){c=a.value,o("update:file-list",a.value)}function p(){var u;l.disabled||v.value||(u=h.value)==null||u.click()}function y(u){const g=l.accept?u.filter(M):u;let k=g;if(l.limit>0){const z=Math.max(0,l.limit-a.value.length);g.length>z&&(o("exceed",g,l.limit),k=g.slice(0,z))}const V=k.map(b);l.autoUpload&&V.forEach(z=>T(z))}function b(u){const g={uid:++i,name:u.name,size:u.size,type:u.type,status:"ready",percentage:0,raw:u,url:u.type.startsWith("image/")?URL.createObjectURL(u):void 0};return a.value.push(g),o("change",a.value),f(),g}function $(u){const g=u.target,k=Array.from(g.files??[]);g.value="",y(k)}function N(u){!l.drag||l.disabled||v.value||(x.value=!0)}function L(u){var g;if(x.value=!1,!l.drag||l.disabled||v.value)return;const k=Array.from(((g=u.dataTransfer)==null?void 0:g.files)??[]);k.length&&y(k)}function M(u){return l.accept.split(",").map(g=>g.trim().toLowerCase()).filter(Boolean).some(g=>g==="*/*"||g===".*"?!0:g.endsWith("/*")?u.type.startsWith(g.slice(0,-1)):g.startsWith(".")?u.name.toLowerCase().endsWith(g):u.type===g)}function T(u){if(!l.action){u.status="success",u.percentage=100,o("success",u,void 0),f();return}u.status="uploading",u.percentage=0;const g=new XMLHttpRequest;g.open("POST",l.action),l.withCredentials&&(g.withCredentials=!0),Object.entries(l.headers).forEach(([V,z])=>g.setRequestHeader(V,z)),g.upload.addEventListener("progress",V=>{V.lengthComputable&&(u.percentage=Math.round(V.loaded/V.total*100),o("progress",u,u.percentage),f())}),g.addEventListener("load",()=>{g.status>=200&&g.status<300?(u.status="success",u.percentage=100,u.response=g.response,o("success",u,g.response)):(u.status="fail",u.response=g.response,o("error",u,new Error(`HTTP ${g.status}`))),f()}),g.addEventListener("error",()=>{u.status="fail",o("error",u,new Error("网络错误")),f()}),g.addEventListener("abort",()=>{u.status="ready",f()});const k=new FormData;Object.entries(l.data).forEach(([V,z])=>k.append(V,String(z))),k.append(l.name,u.raw,u.name),g.send(k)}function S(u){var g;const k=a.value.findIndex(V=>V.uid===u.uid);k>-1&&a.value.splice(k,1),(g=u.url)!=null&&g.startsWith("blob:")&&URL.revokeObjectURL(u.url),o("remove",u),o("change",a.value),f()}function w(u){u.url&&window.open(u.url,"_blank")}function C(u){return u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} KB`:`${(u/1024/1024).toFixed(1)} MB`}function _(u){const g=u.lastIndexOf(".");return g>-1?u.slice(g+1).toUpperCase():"FILE"}return(u,g)=>(e.openBlock(),e.createElementBlock("div",ma,[e.createCommentVNode(" 选择触发器(点击 / 拖拽) "),!u.disabled&&!v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ui-upload__trigger",{"ui-upload__trigger--card":s.value,"ui-upload__drag":u.drag,"is-dragging":u.drag&&x.value}]),onClick:p,onDragover:e.withModifiers(N,["prevent"]),onDragleave:g[0]||(g[0]=e.withModifiers(k=>x.value=!1,["prevent"])),onDrop:e.withModifiers(L,["prevent"])},[e.renderSlot(u.$slots,"trigger",{},()=>[e.renderSlot(u.$slots,"default",{},()=>[u.drag?(e.openBlock(),e.createElementBlock("div",va,[e.createVNode(e.unref(U),{name:"upload",size:28}),g[1]||(g[1]=e.createElementVNode("p",null,"将文件拖到此处,或点击上传",-1))])):s.value?(e.openBlock(),e.createElementBlock("div",fa,[e.createVNode(e.unref(U),{name:"plus",size:24}),g[3]||(g[3]=e.createElementVNode("span",null,"上传",-1))])):(e.openBlock(),e.createBlock(e.unref(sa),{key:1,type:"primary"},{default:e.withCtx(()=>[e.createVNode(e.unref(U),{name:"upload",style:{"margin-right":"4px"}}),g[2]||(g[2]=e.createTextVNode("点击上传 ",-1))]),_:1}))])])],34)):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 原生 input:不可见,只做文件选择 "),e.createElementVNode("input",{ref_key:"inputRef",ref:h,class:"ui-upload__input",type:"file",accept:u.accept,multiple:u.multiple,disabled:u.disabled,onChange:$},null,40,ha),e.createCommentVNode(" 文件列表 "),u.showFileList&&a.value.length?(e.openBlock(),e.createElementBlock("ul",{key:1,class:e.normalizeClass(["ui-upload__list",`ui-upload__list--${u.listType}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,k=>(e.openBlock(),e.createElementBlock("li",{key:k.uid,class:e.normalizeClass(["ui-upload__file",[`is-${k.status}`,{"is-card":s.value}]])},[e.createCommentVNode(" picture-card:卡片 + 悬浮操作 "),s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[k.url?(e.openBlock(),e.createElementBlock("img",{key:0,class:"ui-upload__thumb",src:k.url,alt:k.name},null,8,xa)):(e.openBlock(),e.createElementBlock("div",ga,e.toDisplayString(_(k.name)),1)),e.createElementVNode("div",ka,[e.createVNode(e.unref(U),{name:"eye",size:16,title:"预览",onClick:V=>w(k)},null,8,["onClick"]),e.createVNode(e.unref(U),{name:"delete",size:16,title:"移除",onClick:V=>S(k)},null,8,["onClick"])])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" text / picture:一行一条 "),k.url&&u.listType==="picture"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"ui-upload__thumb",src:k.url,alt:k.name},null,8,ba)):(e.openBlock(),e.createElementBlock("span",Ba,[e.createVNode(e.unref(U),{name:"link",size:16})])),e.createElementVNode("div",_a,[e.createElementVNode("span",{class:"ui-upload__file-name",title:k.name},e.toDisplayString(k.name),9,wa),e.createElementVNode("span",Ca,e.toDisplayString(C(k.size)),1)]),e.createElementVNode("div",Ma,[k.status==="uploading"?(e.openBlock(),e.createElementBlock("span",Ea,e.toDisplayString(k.percentage)+"%",1)):k.status==="success"?(e.openBlock(),e.createBlock(e.unref(U),{key:1,name:"check",class:"is-success",size:16})):k.status==="fail"?(e.openBlock(),e.createBlock(e.unref(U),{key:2,name:"error",class:"is-danger",size:16})):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(U),{name:"delete",class:"ui-upload__file-remove",size:16,title:"移除",onClick:V=>S(k)},null,8,["onClick"])],64)),e.createCommentVNode(" 上传进度条 "),k.status==="uploading"?(e.openBlock(),e.createElementBlock("div",$a,[e.createElementVNode("div",{class:"ui-upload__progress-bar",style:e.normalizeStyle({width:`${k.percentage}%`})},null,4)])):e.createCommentVNode("v-if",!0)],2))),128))],2)):e.createCommentVNode("v-if",!0)]))}}),_l={name:"UiUpload",install(t){t.component("UiUpload",Bl)}},Va={visible:Boolean,text:{type:String,default:""},fullscreen:Boolean,background:{type:String,default:""}},Sa={class:"ui-loading__spinner"},za={key:0,class:"ui-loading__text"},Na=e.defineComponent({__name:"loading",props:Va,setup(t){return(n,l)=>n.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["ui-loading",{"ui-loading--fullscreen":n.fullscreen}]),style:e.normalizeStyle({backgroundColor:n.background||void 0})},[e.createElementVNode("div",Sa,[l[0]||(l[0]=e.createElementVNode("span",{class:"ui-loading__spinner-icon"},null,-1)),n.text?(e.openBlock(),e.createElementBlock("p",za,e.toDisplayString(n.text),1)):e.createCommentVNode("v-if",!0)])],6)):e.createCommentVNode("v-if",!0)}}),wl={mounted(t,n){me(t,n)},updated(t,n){me(t,n)},unmounted(t){Cl(t)}};function me(t,n){const l=!!n.value;if(l&&!t.dataset.uiLoadingHost){La(t);const o=document.createElement("div");o.dataset.uiLoadingHost="";const i=e.createVNode(Na,{visible:!0,text:typeof n.value=="string"?n.value:"",fullscreen:!!n.modifiers.fullscreen});e.render(i,o),t.appendChild(o),t.dataset.uiLoadingHost="1"}else!l&&t.dataset.uiLoadingHost&&Cl(t)}function La(t){getComputedStyle(t).position==="static"&&(t.dataset.uiLoadingPos="static",t.style.position="relative")}function Cl(t){const n=t.querySelector("[data-ui-loading-host]");n&&(e.render(null,n),n.remove()),t.dataset.uiLoadingPos==="static"&&(t.style.position=""),delete t.dataset.uiLoadingHost,delete t.dataset.uiLoadingPos}const Ha={mounted(){}},Ta=[xe,Be,Ce,Se,He,Ue,Ke,Qe,Ye,lt,ot,yt,ft,bt,wt,Vt,Lt,Ut,qt,Jt,tl,ol,sl,pl,xl,_l];function Ml(t){Ta.forEach(n=>t.use(n)),t.directive("loading",wl)}const Pa={install:Ml};exports.Badge=we;exports.BadgePlugin=Ce;exports.Breadcrumb=Ee;exports.BreadcrumbItem=Ve;exports.BreadcrumbPlugin=Se;exports.Button=he;exports.ButtonPlugin=xe;exports.DatePicker=Le;exports.DatePickerPlugin=He;exports.Descriptions=Pe;exports.DescriptionsItem=Ae;exports.DescriptionsPlugin=Ue;exports.Divider=Ie;exports.DividerPlugin=Ke;exports.Dropdown=je;exports.DropdownItem=We;exports.DropdownPlugin=Qe;exports.Form=Pt;exports.FormItem=At;exports.FormPlugin=Ut;exports.Icon=Xe;exports.IconPlugin=Ye;exports.Input=be;exports.InputPlugin=Be;exports.Link=tt;exports.LinkPlugin=lt;exports.Loading=at;exports.LoadingPlugin=ot;exports.Menu=ct;exports.MenuItem=ut;exports.MenuPlugin=yt;exports.Message=Z;exports.MessagePlugin=ft;exports.Modal=kt;exports.ModalPlugin=bt;exports.Notification=ee;exports.NotificationPlugin=wt;exports.Pagination=$t;exports.PaginationPlugin=Vt;exports.Popconfirm=Nt;exports.PopconfirmPlugin=Lt;exports.RichEditor=al;exports.RichEditorPlugin=ol;exports.Select=cl;exports.SelectPlugin=sl;exports.Space=dl;exports.SpacePlugin=pl;exports.Step=hl;exports.Steps=ml;exports.StepsPlugin=xl;exports.SubMenu=pt;exports.TabPane=el;exports.Table=Ot;exports.TablePlugin=qt;exports.Tabs=Yt;exports.TabsPlugin=tl;exports.Tree=Qt;exports.TreePlugin=Jt;exports.Upload=Bl;exports.UploadPlugin=_l;exports.badgeProps=_e;exports.breadcrumbItemProps=$e;exports.breadcrumbProps=Me;exports.breadcrumbSeparatorKey=G;exports.buttonEmits=fe;exports.buttonProps=ve;exports.datePickerEmits=Ne;exports.datePickerProps=ze;exports.default=Pa;exports.defaultTreePropsConfig=le;exports.descriptionsItemProps=De;exports.descriptionsProps=Te;exports.dividerProps=Fe;exports.dropdownContextKey=X;exports.dropdownEmits=qe;exports.dropdownItemProps=Re;exports.dropdownProps=Oe;exports.formContextKey=te;exports.formEmits=Tt;exports.formItemProps=Dt;exports.formProps=Ht;exports.hasIcon=Ge;exports.iconProps=Je;exports.icons=Y;exports.inputEmits=ke;exports.inputProps=ge;exports.install=Ml;exports.linkEmits=et;exports.linkProps=Ze;exports.loadingProps=nt;exports.menuContextKey=W;exports.menuEmits=rt;exports.menuItemProps=st;exports.menuProps=it;exports.message=q;exports.messageProps=vt;exports.modalEmits=gt;exports.modalProps=xt;exports.notification=R;exports.notificationProps=_t;exports.paginationEmits=Et;exports.paginationProps=Mt;exports.popconfirmEmits=zt;exports.popconfirmProps=St;exports.richEditorEmits=nl;exports.richEditorProps=ll;exports.selectEmits=rl;exports.selectProps=il;exports.spaceProps=ul;exports.stepProps=fl;exports.stepsContextKey=oe;exports.stepsProps=yl;exports.subMenuProps=dt;exports.tabPaneProps=Zt;exports.tableEmits=Kt;exports.tableProps=It;exports.tabsContextKey=ae;exports.tabsEmits=Xt;exports.tabsProps=Gt;exports.treeContextKey=ne;exports.treeEmits=Wt;exports.treeProps=Rt;exports.uploadEmits=bl;exports.uploadProps=kl;exports.vLoading=wl;exports.vPermission=Ha;
|