bilitoolkit-plugin-image-downloader 0.0.1 → 0.0.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.
@@ -0,0 +1 @@
1
+ .query-section[data-v-45cd76c0]{width:100%;display:flex;flex-direction:column;gap:10px}.query-section[data-v-45cd76c0] .el-button+.el-button{margin-left:0!important}.img-container[data-v-45cd76c0]{display:flex;flex-wrap:wrap;overflow-y:auto;gap:10px}.img-container>img[data-v-45cd76c0]{max-width:100%}
@@ -0,0 +1 @@
1
+ import{v as V,c as w,f as x,E as B}from"./download-DBjE6xGC.js";import{d as I,j as b,w as L,u as s,c as d,a as n,b as v,e as p,f as u,E as N,g as D,h as _,k as F,F as h,y as q,i as z,r as f,l as M,s as O,o as l,_ as T}from"./index-pBgDTaGA.js";const U={class:"query-section"},$={class:"img-container"},A=["src"],G=I({__name:"CommentEmoji",setup(H){const{loading:g,loadingData:c}=z(),r=f(""),a=f(),o=M(()=>{if(a.value){const i=a.value.content.emote;if(i)return Object.values(i)}return[]}),{assertLoggedIn:y}=b(),C=c(async()=>{y(),a.value=await w.comment.resolveCommentItem(r.value)??void 0,(!o.value||o.value.length===0)&&O("该评论暂无表情")}),k=c(async()=>{await x(o.value,a.value?.oid_str)});return(i,e)=>{const E=B,m=N,j=V;return L((l(),d(s(q),{class:"page"},{default:n(()=>[v("div",U,[p(E,{modelValue:r.value,"onUpdate:modelValue":e[0]||(e[0]=t=>r.value=t),modelModifiers:{trim:!0},placeholder:"请输入评论链接 / b23分享链接 (视频/动态/专栏底下的评论)"},{prepend:n(()=>[...e[2]||(e[2]=[u(" 评论链接 ",-1)])]),_:1},8,["modelValue"]),p(m,{type:"primary",onClick:s(C)},{default:n(()=>[...e[3]||(e[3]=[u("获取表情包",-1)])]),_:1},8,["onClick"]),o.value.length>0?(l(),d(m,{key:0,type:"primary",onClick:e[1]||(e[1]=t=>s(k)())},{default:n(()=>[...e[4]||(e[4]=[u("保存表情包",-1)])]),_:1})):D("",!0)]),v("div",$,[(l(!0),_(h,null,F(o.value,t=>(l(),_("img",{src:t.gif_url??t.url,alt:"cover",key:t.url,loading:"lazy"},null,8,A))),128))])]),_:1})),[[j,s(g)]])}}}),P=T(G,[["__scopeId","data-v-45cd76c0"]]);export{P as default};
@@ -0,0 +1 @@
1
+ .query-section[data-v-2c072521]{width:100%;display:flex;flex-direction:column;gap:10px}.query-section[data-v-2c072521] .el-button+.el-button{margin-left:0!important}.img-container[data-v-2c072521]{display:flex;flex-wrap:wrap;overflow-y:auto;gap:10px}.img-container>img[data-v-2c072521]{max-width:100%}
@@ -0,0 +1 @@
1
+ import{v as w,c as C,e as V,E as x}from"./download-DBjE6xGC.js";import{d as B,j as I,w as N,u as n,c as m,a as i,b as _,e as p,f as d,E as L,g as T,h as v,k as b,F,y as O,i as h,r as y,l as q,q as M,s as z,o as l,_ as H}from"./index-pBgDTaGA.js";const J={class:"query-section"},P={class:"img-container"},R=["src"],U=B({__name:"DynamicEmoji",setup(X){const{loading:f,loadingData:c}=h(),r=y(""),s=y(),a=q(()=>{if(s.value){const t=s.value.modules.module_dynamic.desc?.rich_text_nodes;return t?t.filter(e=>e.type==="RICH_TEXT_NODE_TYPE_EMOJI"):[]}else return[]}),{assertLoggedIn:g}=I(),E=c(async()=>{g();const t=await M(r.value);s.value=await C.dynamic.getDetail({id:t}),(!a.value||a.value.length===0)&&z("该动态暂无表情")}),k=c(async()=>{await V(a.value,s.value?.id_str)});return(t,e)=>{const D=x,u=L,j=w;return N((l(),m(n(O),{class:"page"},{default:i(()=>[_("div",J,[p(D,{modelValue:r.value,"onUpdate:modelValue":e[0]||(e[0]=o=>r.value=o),modelModifiers:{trim:!0},placeholder:"请输入动态链接 / b23分享链接 / 动态oid"},{prepend:i(()=>[...e[2]||(e[2]=[d(" 动态链接 ",-1)])]),_:1},8,["modelValue"]),p(u,{type:"primary",onClick:n(E)},{default:i(()=>[...e[3]||(e[3]=[d("获取表情包",-1)])]),_:1},8,["onClick"]),a.value.length>0?(l(),m(u,{key:0,type:"primary",onClick:e[1]||(e[1]=o=>n(k)())},{default:i(()=>[...e[4]||(e[4]=[d("保存表情包",-1)])]),_:1})):T("",!0)]),_("div",P,[(l(!0),v(F,null,b(a.value,o=>(l(),v("img",{src:o.emoji.icon_url,alt:"cover",key:o.emoji.icon_url,loading:"lazy"},null,8,R))),128))])]),_:1})),[[j,n(f)]])}}}),A=H(U,[["__scopeId","data-v-2c072521"]]);export{A as default};
@@ -1 +1 @@
1
- import{v as V,c as D,a as N,E as O}from"./download-UkVLILCM.js";import{d as x,j as B,w as L,u as l,c as _,a as i,b as v,e as f,f as p,E as b,g as h,h as g,k as I,F as P,y as T,i as F,r as y,l as $,m as j,s as M,o as r,_ as U}from"./index-Vo9mHza8.js";const q={class:"query-section"},Y={class:"img-container"},z=["src"],A=x({__name:"OpusPics",setup(G){const{loading:k,loadingData:d}=F(),u=y(""),s=y(),o=$(()=>{if(s.value){const a=s.value.item.modules??[];for(const e of a)if(e.module_type==="MODULE_TYPE_CONTENT")return(e.module_content?.paragraphs??[]).filter(t=>t.para_type===2&&t.pic?.pics!=null).map(t=>[...t.pic.pics.map(c=>c.url)]).flat()}return[]}),{assertLoggedIn:E}=B(),w=d(async()=>{E();const a=await j(u.value);s.value=await D.opus.getDetail({id:a}),(!o.value||o.value.length===0)&&M("该专栏暂无图片内容")}),C=d(async()=>{const a=s.value.item.basic.title.split(" - 哔哩哔哩")[0];await N(o.value,`${a} - ${s.value?.item.id_str}`)});return(a,e)=>{const m=O,t=b,c=V;return L((r(),_(l(T),{class:"page"},{default:i(()=>[v("div",q,[f(m,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=n=>u.value=n),modelModifiers:{trim:!0},placeholder:"请输入专栏链接 / b23分享链接"},{prepend:i(()=>[...e[2]||(e[2]=[p(" 专栏链接 ",-1)])]),_:1},8,["modelValue"]),f(t,{type:"primary",onClick:l(w)},{default:i(()=>[...e[3]||(e[3]=[p("获取图片",-1)])]),_:1},8,["onClick"]),o.value.length>0?(r(),_(t,{key:0,type:"primary",onClick:e[1]||(e[1]=n=>l(C)())},{default:i(()=>[...e[4]||(e[4]=[p("保存图片",-1)])]),_:1})):h("",!0)]),v("div",Y,[(r(!0),g(P,null,I(o.value,n=>(r(),g("img",{src:n,alt:"cover",key:n},null,8,z))),128))])]),_:1})),[[c,l(k)]])}}}),K=U(A,[["__scopeId","data-v-3ad36e84"]]);export{K as default};
1
+ import{v as V,c as D,a as N,E as O}from"./download-DBjE6xGC.js";import{d as b,j as x,w as B,u as l,c as _,a as i,b as v,e as f,f as p,E as L,g as h,h as g,k as I,F as P,y as T,i as F,r as y,l as $,m as j,s as M,o as r,_ as U}from"./index-pBgDTaGA.js";const q={class:"query-section"},z={class:"img-container"},Y=["src"],A=b({__name:"OpusPics",setup(G){const{loading:k,loadingData:d}=F(),u=y(""),s=y(),o=$(()=>{if(s.value){const a=s.value.item.modules??[];for(const e of a)if(e.module_type==="MODULE_TYPE_CONTENT")return(e.module_content?.paragraphs??[]).filter(t=>t.para_type===2&&t.pic?.pics!=null).map(t=>[...t.pic.pics.map(c=>c.url)]).flat()}return[]}),{assertLoggedIn:E}=x(),w=d(async()=>{E();const a=await j(u.value);s.value=await D.opus.getDetail({id:a}),(!o.value||o.value.length===0)&&M("该专栏暂无图片内容")}),C=d(async()=>{const a=s.value.item.basic.title.split(" - 哔哩哔哩")[0];await N(o.value,`${a} - ${s.value?.item.id_str}`)});return(a,e)=>{const m=O,t=L,c=V;return B((r(),_(l(T),{class:"page"},{default:i(()=>[v("div",q,[f(m,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=n=>u.value=n),modelModifiers:{trim:!0},placeholder:"请输入专栏链接 / b23分享链接"},{prepend:i(()=>[...e[2]||(e[2]=[p(" 专栏链接 ",-1)])]),_:1},8,["modelValue"]),f(t,{type:"primary",onClick:l(w)},{default:i(()=>[...e[3]||(e[3]=[p("获取图片",-1)])]),_:1},8,["onClick"]),o.value.length>0?(r(),_(t,{key:0,type:"primary",onClick:e[1]||(e[1]=n=>l(C)())},{default:i(()=>[...e[4]||(e[4]=[p("保存图片",-1)])]),_:1})):h("",!0)]),v("div",z,[(r(!0),g(P,null,I(o.value,n=>(r(),g("img",{src:n,alt:"cover",key:n,loading:"lazy"},null,8,Y))),128))])]),_:1})),[[c,l(k)]])}}}),K=U(A,[["__scopeId","data-v-420e2cfb"]]);export{K as default};
@@ -0,0 +1 @@
1
+ .query-section[data-v-420e2cfb]{width:100%;display:flex;flex-direction:column;gap:10px}.query-section[data-v-420e2cfb] .el-button+.el-button{margin-left:0!important}.img-container[data-v-420e2cfb]{display:flex;flex-wrap:wrap;overflow-y:auto;gap:10px}.img-container>img[data-v-420e2cfb]{max-width:100px;object-fit:cover;height:auto}
@@ -1 +1 @@
1
- import{v as w,c as U,b as V,g as x,E}from"./download-UkVLILCM.js";import{d as F,w as B,u as r,c as i,a as s,b as u,e as p,f as n,E as b,g as m,h as D,y as I,i as N,r as f,n as $,o as c,_ as q}from"./index-Vo9mHza8.js";const L={class:"query-section"},M={class:"cover-container"},S=["src"],T=F({__name:"UserFace",setup(j){const{loading:_,loadingData:v}=N(),o=f(""),a=f(),y=v(async()=>{const t=await $(o.value);a.value=await U.user.getUserCard({mid:t})}),g=async()=>{const t=a.value.card.face;await V(t,`${a.value.card.mid}${x(t)}`)};return(t,e)=>{const k=E,l=b,C=w;return B((c(),i(r(I),{class:"page"},{default:s(()=>[u("div",L,[p(k,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=d=>o.value=d),modelModifiers:{trim:!0},placeholder:"请输入用户链接 / b23分享链接 / 用户UID"},{prepend:s(()=>[...e[2]||(e[2]=[n(" 用户链接 ",-1)])]),_:1},8,["modelValue"]),p(l,{type:"primary",onClick:r(y)},{default:s(()=>[...e[3]||(e[3]=[n("获取头像",-1)])]),_:1},8,["onClick"]),a.value?.card.face?(c(),i(l,{key:0,type:"primary",onClick:e[1]||(e[1]=d=>g())},{default:s(()=>[...e[4]||(e[4]=[n("保存头像",-1)])]),_:1})):m("",!0)]),u("div",M,[a.value?.card.face?(c(),D("img",{key:0,src:a.value.card.face,alt:"cover"},null,8,S)):m("",!0)])]),_:1})),[[C,r(_)]])}}}),G=q(T,[["__scopeId","data-v-ee677cf8"]]);export{G as default};
1
+ import{v as w,c as U,b as V,g as x,E}from"./download-DBjE6xGC.js";import{d as F,w as B,u as r,c as i,a as s,b as u,e as p,f as n,E as b,g as m,h as D,y as I,i as N,r as f,n as $,o as c,_ as q}from"./index-pBgDTaGA.js";const L={class:"query-section"},M={class:"cover-container"},S=["src"],T=F({__name:"UserFace",setup(j){const{loading:_,loadingData:v}=N(),o=f(""),a=f(),y=v(async()=>{const t=await $(o.value);a.value=await U.user.getUserCard({mid:t})}),g=async()=>{const t=a.value.card.face;await V(t,`${a.value.card.mid}${x(t)}`)};return(t,e)=>{const k=E,l=b,C=w;return B((c(),i(r(I),{class:"page"},{default:s(()=>[u("div",L,[p(k,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=d=>o.value=d),modelModifiers:{trim:!0},placeholder:"请输入用户链接 / b23分享链接 / 用户UID"},{prepend:s(()=>[...e[2]||(e[2]=[n(" 用户链接 ",-1)])]),_:1},8,["modelValue"]),p(l,{type:"primary",onClick:r(y)},{default:s(()=>[...e[3]||(e[3]=[n("获取头像",-1)])]),_:1},8,["onClick"]),a.value?.card.face?(c(),i(l,{key:0,type:"primary",onClick:e[1]||(e[1]=d=>g())},{default:s(()=>[...e[4]||(e[4]=[n("保存头像",-1)])]),_:1})):m("",!0)]),u("div",M,[a.value?.card.face?(c(),D("img",{key:0,src:a.value.card.face,alt:"cover"},null,8,S)):m("",!0)])]),_:1})),[[C,r(_)]])}}}),G=q(T,[["__scopeId","data-v-ee677cf8"]]);export{G as default};
@@ -1 +1 @@
1
- import{v as k,c as w,d as B,g as I,E as x}from"./download-UkVLILCM.js";import{d as E,w as b,u as n,c,a,b as u,e as v,f as i,E as N,g as p,h as $,y as D,i as U,r as _,p as q,o as r,_ as F}from"./index-Vo9mHza8.js";const L={class:"query-section"},M={class:"cover-container"},S=["src"],T=E({__name:"VideoCover",setup(j){const{loading:m,loadingData:f}=U(),s=_(""),o=_(),y=f(async()=>{const t=await q(s.value);o.value=await w.videoInfo.getInfo(t)}),C=async()=>{const t=o.value.pic;await B(t,`${o.value.bvid}${I(t)}`)};return(t,e)=>{const V=x,l=N,g=k;return b((r(),c(n(D),{class:"page"},{default:a(()=>[u("div",L,[v(V,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=d=>s.value=d),modelModifiers:{trim:!0},placeholder:"请输入B站视频链接 / b23分享链接 / BV号 / av号"},{prepend:a(()=>[...e[2]||(e[2]=[i(" 视频链接 ",-1)])]),_:1},8,["modelValue"]),v(l,{type:"primary",onClick:n(y)},{default:a(()=>[...e[3]||(e[3]=[i("获取封面",-1)])]),_:1},8,["onClick"]),o.value?.pic?(r(),c(l,{key:0,type:"primary",onClick:e[1]||(e[1]=d=>C())},{default:a(()=>[...e[4]||(e[4]=[i("保存封面",-1)])]),_:1})):p("",!0)]),u("div",M,[o.value?.pic?(r(),$("img",{key:0,src:o.value.pic,alt:"cover"},null,8,S)):p("",!0)])]),_:1})),[[g,n(m)]])}}}),G=F(T,[["__scopeId","data-v-286be96a"]]);export{G as default};
1
+ import{v as k,c as w,d as B,g as I,E as x}from"./download-DBjE6xGC.js";import{d as E,w as b,u as n,c,a,b as u,e as v,f as i,E as N,g as p,h as $,y as D,i as U,r as _,p as q,o as r,_ as F}from"./index-pBgDTaGA.js";const L={class:"query-section"},M={class:"cover-container"},S=["src"],T=E({__name:"VideoCover",setup(j){const{loading:m,loadingData:f}=U(),s=_(""),o=_(),y=f(async()=>{const t=await q(s.value);o.value=await w.videoInfo.getInfo(t)}),C=async()=>{const t=o.value.pic;await B(t,`${o.value.bvid}${I(t)}`)};return(t,e)=>{const V=x,l=N,g=k;return b((r(),c(n(D),{class:"page"},{default:a(()=>[u("div",L,[v(V,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=d=>s.value=d),modelModifiers:{trim:!0},placeholder:"请输入B站视频链接 / b23分享链接 / BV号 / av号"},{prepend:a(()=>[...e[2]||(e[2]=[i(" 视频链接 ",-1)])]),_:1},8,["modelValue"]),v(l,{type:"primary",onClick:n(y)},{default:a(()=>[...e[3]||(e[3]=[i("获取封面",-1)])]),_:1},8,["onClick"]),o.value?.pic?(r(),c(l,{key:0,type:"primary",onClick:e[1]||(e[1]=d=>C())},{default:a(()=>[...e[4]||(e[4]=[i("保存封面",-1)])]),_:1})):p("",!0)]),u("div",M,[o.value?.pic?(r(),$("img",{key:0,src:o.value.pic,alt:"cover"},null,8,S)):p("",!0)])]),_:1})),[[g,n(m)]])}}}),G=F(T,[["__scopeId","data-v-286be96a"]]);export{G as default};
@@ -1 +1 @@
1
- import{t as ht,l as b,v as Ut,x as bt,z as Pe,A as re,u as s,B as Ge,C as Se,D as st,r as T,G as Kt,H as $,I as ce,J as Wt,K as je,L as yt,M as Yt,N as O,O as Xt,P as qt,Q as Zt,R as xt,S as lt,d as wt,T as Jt,U as Qt,V as _t,W as ea,X as ta,Y as aa,Z as it,$ as na,a0 as q,a1 as oa,a2 as sa,a3 as la,o as h,h as A,g as y,F as De,a4 as x,a5 as se,b as Z,c as N,a as j,a6 as J,a7 as Q,a8 as rt,a9 as xe,aa as we,ab as Ce,ac as ia,ad as ra,ae as ua,af as ca,ag as ke,ah as da,ai as fa,aj as ma,ak as va,al as le,w as pa,e as ga,am as ha,an as ba,ao as ya,ap as Ne,aq as ie,ar as ut,as as xa,at as wa,au as Ca,av as Ue,aw as _,ax as Fe}from"./index-Vo9mHza8.js";const Ee="update:modelValue",ct="change",He="input",Ia=["class","style"],Sa=/^on[A-Z]/,Ea=(e={})=>{const{excludeListeners:a=!1,excludeKeys:o}=e,t=b(()=>(o?.value||[]).concat(Ia)),n=bt();return n?b(()=>Ut(Object.entries(n.proxy?.$attrs).filter(([l])=>!t.value.includes(l)&&!(a&&Sa.test(l))))):(ht("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),b(()=>({})))},ka=e=>Pe?window.requestAnimationFrame(e):setTimeout(e,16),dt=e=>Pe?window.cancelAnimationFrame(e):clearTimeout(e);function Na(e){let a;function o(){if(e.value==null)return;const{selectionStart:n,selectionEnd:l,value:f}=e.value;n==null||l==null||(a={selectionStart:n,selectionEnd:l,value:f,beforeTxt:f.slice(0,Math.max(0,n)),afterTxt:f.slice(Math.max(0,l))})}function t(){if(e.value==null||a==null)return;const{value:n}=e.value,{beforeTxt:l,afterTxt:f,selectionStart:r}=a;if(l==null||f==null||r==null)return;let p=n.length;if(n.endsWith(f))p=n.length-f.length;else if(n.startsWith(l))p=l.length;else{const g=l[r-1],m=n.indexOf(g,r-1);m!==-1&&(p=m+1)}e.value.setSelectionRange(p,p)}return[o,t]}function Pa(e,{disabled:a,beforeFocus:o,afterFocus:t,beforeBlur:n,afterBlur:l}={}){const{emit:f}=bt(),r=Se(),p=T(!1),g=v=>{const I=st(o)?o(v):!1;s(a)||p.value||I||(p.value=!0,f("focus",v),t?.())},m=v=>{const I=st(n)?n(v):!1;s(a)||v.relatedTarget&&r.value?.contains(v.relatedTarget)||I||(p.value=!1,f("blur",v),l?.())},C=v=>{s(a)||Kt(v.target)||r.value?.contains(document.activeElement)&&r.value!==document.activeElement||e.value?.focus()};return re([r,()=>s(a)],([v,I])=>{v&&(I?v.removeAttribute("tabindex"):v.setAttribute("tabindex","-1"))}),Ge(r,"focus",g,!0),Ge(r,"blur",m,!0),Ge(r,"click",C,!0),{isFocused:p,wrapperRef:r,handleFocus:g,handleBlur:m}}function Fa({afterComposition:e,emit:a}){const o=T(!1),t=r=>{a?.("compositionstart",r),o.value=!0},n=r=>{a?.("compositionupdate",r),o.value=!0},l=r=>{a?.("compositionend",r),o.value&&(o.value=!1,$(()=>e(r)))};return{isComposing:o,handleComposition:r=>{r.type==="compositionend"?l(r):n(r)},handleCompositionStart:t,handleCompositionUpdate:n,handleCompositionEnd:l}}const La=Wt({id:{type:String,default:void 0},size:Yt,disabled:{type:Boolean,default:void 0},modelValue:{type:O([String,Number,Object]),default:""},modelModifiers:{type:O(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:O(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:O([Boolean,Object]),default:!1},autocomplete:{type:O(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:je,default:yt},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:je},prefixIcon:{type:je},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:O([Object,Array,String,Boolean]),default:()=>qt({})},countGraphemes:{type:O(Function)},autofocus:Boolean,rows:{type:Number,default:2},...Xt(["ariaLabel"]),inputmode:{type:O(String),default:void 0},name:String}),za={[Ee]:e=>ce(e),input:e=>ce(e),change:(e,a)=>ce(e)&&(a instanceof Event||a===void 0),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:e=>e===void 0||e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent};Zt(yt);let P;const Aa={height:"0",visibility:"hidden",overflow:xt()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ta=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],ft=e=>{const a=Number.parseFloat(e);return Number.isNaN(a)?e:a};function Va(e){const a=window.getComputedStyle(e),o=a.getPropertyValue("box-sizing"),t=Number.parseFloat(a.getPropertyValue("padding-bottom"))+Number.parseFloat(a.getPropertyValue("padding-top")),n=Number.parseFloat(a.getPropertyValue("border-bottom-width"))+Number.parseFloat(a.getPropertyValue("border-top-width"));return{contextStyle:Ta.map(l=>[l,a.getPropertyValue(l)]),paddingSize:t,borderSize:n,boxSizing:o}}function mt(e,a=1,o){if(!P){P=document.createElement("textarea");let m=document.body;!xt()&&e.parentNode&&(m=e.parentNode),m.appendChild(P)}const{paddingSize:t,borderSize:n,boxSizing:l,contextStyle:f}=Va(e);f.forEach(([m,C])=>P?.style.setProperty(m,C)),Object.entries(Aa).forEach(([m,C])=>P?.style.setProperty(m,C,"important")),P.value=e.value||e.placeholder||"";let r=P.scrollHeight;const p={};l==="border-box"?r=r+n:l==="content-box"&&(r=r-t),P.value="";const g=P.scrollHeight-t;if(lt(a)){let m=g*a;l==="border-box"&&(m=m+t+n),r=Math.max(m,r),p.minHeight=`${m}px`}if(lt(o)){let m=g*o;l==="border-box"&&(m=m+t+n),r=Math.min(m,r)}return p.height=`${r}px`,P.parentNode?.removeChild(P),P=void 0,p}const Ma=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],$a=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],vt="ElInput";var Ba=wt({name:vt,inheritAttrs:!1,__name:"input",props:La,emits:za,setup(e,{expose:a,emit:o}){const t=e,n=o,l=Jt(),f=Qt(),r=b(()=>[t.type==="textarea"?G.b():c.b(),c.m(S.value),c.is("disabled",V.value),c.is("exceed",Pt.value),{[c.b("group")]:f.prepend||f.append,[c.m("prefix")]:f.prefix||t.prefixIcon,[c.m("suffix")]:f.suffix||t.suffixIcon||t.clearable||t.showPassword,[c.bm("suffix","password-clear")]:ve.value&&Ve.value,[c.b("hidden")]:t.type==="hidden"},l.class]),p=b(()=>[c.e("wrapper"),c.is("focus",Ae.value)]),g=Ea(),m=b(()=>t.maxlength?.toString()),{form:C,formItem:v}=_t(),{inputId:I}=ea(t,{formItemContext:v}),S=ta(),V=aa(),c=it("input"),G=it("textarea"),H=Se(),L=Se(),ze=T(!1),U=T(!1),We=T(),Ye=T(),fe=Se(t.inputStyle),ee=T(""),me=T(),E=b(()=>H.value||L.value),{wrapperRef:Et,isFocused:Ae,handleFocus:Xe,handleBlur:qe}=Pa(E,{disabled:V,afterBlur(){t.validateEvent&&v?.validate?.("blur").catch(q)}}),Ze=b(()=>C?.statusIcon??!1),te=b(()=>v?.validateState||""),Je=b(()=>te.value&&ia[te.value]),kt=b(()=>U.value?ra:ua),Nt=b(()=>[l.style]),Qe=b(()=>[t.inputStyle,fe.value,{resize:t.resize},me.value?{height:me.value}:void 0]),M=b(()=>ca(t.modelValue)?"":String(t.modelValue)),Te=b(()=>t.clearable&&!V.value&&!t.readonly),ve=b(()=>Te.value&&!!M.value&&(Ae.value||ze.value)),Ve=b(()=>t.showPassword&&!V.value&&!!M.value),K=b(()=>t.showWordLimit&&!!m.value&&(t.type==="text"||t.type==="textarea")&&!V.value&&!t.readonly&&!t.showPassword),Me=b(()=>t.countGraphemes&&t.showWordLimit?t.countGraphemes(M.value):M.value.length),Pt=b(()=>!!K.value&&Me.value>Number(m.value)),Ft=b(()=>!!f.suffix||!!t.suffixIcon||t.clearable||t.showPassword||K.value||!!te.value&&Ze.value),Lt=b(()=>!!Object.keys(t.modelModifiers).length),[zt,At]=Na(H);let W;na(L,i=>{if(Tt(),!K.value&&!Te.value||t.resize!=="both"&&t.resize!=="horizontal")return;const{width:u}=i[0].target.getBoundingClientRect(),d=()=>{W=void 0,We.value={right:`calc(100% - ${u-10}px)`},Ye.value={right:`calc(100% - ${u-11}px)`}};W&&dt(W),W=ka(d)});const ae=()=>{const{type:i,autosize:u}=t;if(!(!Pe||i!=="textarea"||!L.value))if(u){const d=ke(u)?u.minRows:void 0,z=ke(u)?u.maxRows:void 0,k=mt(L.value,d,z);fe.value={overflowY:"hidden",...k},$(()=>{L.value.offsetHeight,fe.value=k})}else fe.value={minHeight:mt(L.value).minHeight}},Tt=(i=>{let u=!1;return()=>{if(u||!t.autosize){t.resize!=="none"&&setTimeout(()=>{me.value=L.value?.style.height});return}L.value?.offsetParent!==null&&(setTimeout(i),u=!0)}})(ae),Y=()=>{const i=E.value,u=t.formatter?t.formatter(M.value):M.value;!i||i.value===u||t.type==="file"||(i.value=u)},_e=i=>{const{trim:u,number:d}=t.modelModifiers;return u&&(i=i.trim()),d&&(i=`${ft(i)}`),t.formatter&&t.parser&&(i=t.parser(i)),i},$e=async i=>{if(tt.value)return;const{lazy:u}=t.modelModifiers;let{value:d}=i.target,z=!1;if(u){n(He,d);return}if(d=_e(d),t.countGraphemes&&m.value!=null){const k=Number(m.value),be=t.countGraphemes(d),X=t.countGraphemes(ee.value);if(be>k&&be>X)if(X>k)d=ee.value,z=!0;else{const B=ee.value,F=d;let w=0;for(;w<B.length&&w<F.length&&B[w]===F[w];)w++;let R=B.length,ne=F.length;for(;R>w&&ne>w&&B[R-1]===F[ne-1];)R--,ne--;const Gt=F.slice(0,w),jt=B.slice(w,R),nt=F.slice(w,ne),Dt=F.slice(ne),Ht=X-t.countGraphemes(jt),Re=Math.max(0,k-Ht);let oe="";if(Re>0)if(typeof Intl<"u"&&"Segmenter"in Intl){const Oe=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(const{segment:ye}of Oe.segment(nt)){const ot=oe+ye;if(t.countGraphemes(ot)>Re)break;oe=ot}}else for(const Oe of Array.from(nt)){const ye=oe+Oe;if(t.countGraphemes(ye)>Re)break;oe=ye}d=Gt+oe+Dt,z=!0}}if(String(d)===M.value){if(t.formatter||z){const k=i.target,be=k.value,X=k.selectionStart,B=k.selectionEnd;if(Y(),z&&E.value&&X!=null&&B!=null){const F=E.value.value,w=be.slice(Math.max(0,B));let R=Math.min(X,F.length);w&&F.endsWith(w)&&(R=F.length-w.length),E.value.setSelectionRange(R,R)}}return}ee.value=d,zt(),n(Ee,d),n(He,d),await $(),(t.formatter&&t.parser||!Lt.value)&&Y(),At()},et=async i=>{let{value:u}=i.target;u=_e(u),t.modelModifiers.lazy&&n(Ee,u),n(ct,u,i),await $(),Y()},{isComposing:tt,handleCompositionStart:pe,handleCompositionUpdate:ge,handleCompositionEnd:he}=Fa({emit:n,afterComposition:$e}),Vt=()=>{U.value=!U.value},Mt=()=>E.value?.focus(),$t=()=>E.value?.blur(),Bt=i=>{ze.value=!1,n("mouseleave",i)},Rt=i=>{ze.value=!0,n("mouseenter",i)},at=i=>{n("keydown",i)},Ot=()=>{E.value?.select()},Be=i=>{n(Ee,""),n(ct,""),n("clear",i),n(He,"")};return re(()=>t.modelValue,()=>{$(()=>{ae(),t.autosize&&(me.value=void 0)}),t.validateEvent&&v?.validate?.("change").catch(q)}),re(()=>M.value,i=>{ee.value=i},{immediate:!0}),re(M,i=>{if(!E.value)return;const{trim:u,number:d}=t.modelModifiers,z=E.value.value,k=(d||t.type==="number")&&!/^0\d/.test(z)?`${ft(z)}`:z;k!==i&&(document.activeElement===E.value&&E.value.type!=="range"&&u&&k.trim()===i||Y())}),re(()=>t.type,async()=>{await $(),Y(),ae()}),oa(()=>{!t.formatter&&t.parser&&ht(vt,"If you set the parser, you also need to set the formatter."),Y(),$(ae)}),sa(()=>{W&&dt(W)}),a({input:H,textarea:L,ref:E,textareaStyle:Qe,autosize:la(t,"autosize"),isComposing:tt,passwordVisible:U,focus:Mt,blur:$t,select:Ot,clear:Be,resizeTextarea:ae}),(i,u)=>(h(),A("div",{class:x([r.value,{[s(c).bm("group","append")]:i.$slots.append,[s(c).bm("group","prepend")]:i.$slots.prepend}]),style:we(Nt.value),onMouseenter:Rt,onMouseleave:Bt},[y(" input "),e.type!=="textarea"?(h(),A(De,{key:0},[y(" prepend slot "),i.$slots.prepend?(h(),A("div",{key:0,class:x(s(c).be("group","prepend"))},[se(i.$slots,"prepend")],2)):y("v-if",!0),Z("div",{ref_key:"wrapperRef",ref:Et,class:x(p.value)},[y(" prefix slot "),i.$slots.prefix||e.prefixIcon?(h(),A("span",{key:0,class:x(s(c).e("prefix"))},[Z("span",{class:x(s(c).e("prefix-inner"))},[se(i.$slots,"prefix"),e.prefixIcon?(h(),N(s(Q),{key:0,class:x(s(c).e("icon"))},{default:j(()=>[(h(),N(J(e.prefixIcon)))]),_:1},8,["class"])):y("v-if",!0)],2)],2)):y("v-if",!0),Z("input",rt({id:s(I),ref_key:"input",ref:H,class:s(c).e("inner")},s(g),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:m.value,type:e.showPassword?U.value?"text":"password":e.type,disabled:s(V),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-label":e.ariaLabel,placeholder:e.placeholder,style:e.inputStyle,form:e.form,autofocus:e.autofocus,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:u[0]||(u[0]=(...d)=>s(pe)&&s(pe)(...d)),onCompositionupdate:u[1]||(u[1]=(...d)=>s(ge)&&s(ge)(...d)),onCompositionend:u[2]||(u[2]=(...d)=>s(he)&&s(he)(...d)),onInput:$e,onChange:et,onKeydown:at}),null,16,Ma),y(" suffix slot "),Ft.value?(h(),A("span",{key:1,class:x(s(c).e("suffix"))},[Z("span",{class:x(s(c).e("suffix-inner"))},[Te.value?(h(),N(s(Q),{key:0,class:x([s(c).e("icon"),s(c).e("clear")]),style:we({visibility:ve.value?"visible":"hidden"}),onMousedown:xe(s(q),["prevent"]),onClick:Be},{default:j(()=>[(h(),N(J(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):y("v-if",!0),!ve.value||!Ve.value||!K.value?(h(),A(De,{key:1},[se(i.$slots,"suffix"),e.suffixIcon?(h(),N(s(Q),{key:0,class:x(s(c).e("icon"))},{default:j(()=>[(h(),N(J(e.suffixIcon)))]),_:1},8,["class"])):y("v-if",!0)],64)):y("v-if",!0),Ve.value?(h(),N(s(Q),{key:2,class:x([s(c).e("icon"),s(c).e("password")]),onClick:Vt,onMousedown:xe(s(q),["prevent"]),onMouseup:xe(s(q),["prevent"])},{default:j(()=>[se(i.$slots,"password-icon",{visible:U.value},()=>[(h(),N(J(kt.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):y("v-if",!0),K.value?(h(),A("span",{key:3,class:x([s(c).e("count"),s(c).is("outside",e.wordLimitPosition==="outside")])},[Z("span",{class:x(s(c).e("count-inner"))},Ce(Me.value)+" / "+Ce(m.value),3)],2)):y("v-if",!0),te.value&&Je.value&&Ze.value?(h(),N(s(Q),{key:4,class:x([s(c).e("icon"),s(c).e("validateIcon"),s(c).is("loading",te.value==="validating")])},{default:j(()=>[(h(),N(J(Je.value)))]),_:1},8,["class"])):y("v-if",!0)],2)],2)):y("v-if",!0)],2),y(" append slot "),i.$slots.append?(h(),A("div",{key:1,class:x(s(c).be("group","append"))},[se(i.$slots,"append")],2)):y("v-if",!0)],64)):(h(),A(De,{key:1},[y(" textarea "),Z("textarea",rt({id:s(I),ref_key:"textarea",ref:L,class:[s(G).e("inner"),s(c).is("focus",s(Ae)),s(G).is("clearable",e.clearable)]},s(g),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:m.value,tabindex:e.tabindex,disabled:s(V),readonly:e.readonly,autocomplete:e.autocomplete,style:Qe.value,"aria-label":e.ariaLabel,placeholder:e.placeholder,form:e.form,autofocus:e.autofocus,rows:e.rows,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:u[3]||(u[3]=(...d)=>s(pe)&&s(pe)(...d)),onCompositionupdate:u[4]||(u[4]=(...d)=>s(ge)&&s(ge)(...d)),onCompositionend:u[5]||(u[5]=(...d)=>s(he)&&s(he)(...d)),onInput:$e,onFocus:u[6]||(u[6]=(...d)=>s(Xe)&&s(Xe)(...d)),onBlur:u[7]||(u[7]=(...d)=>s(qe)&&s(qe)(...d)),onChange:et,onKeydown:at}),null,16,$a),ve.value?(h(),N(s(Q),{key:0,class:x([s(G).e("icon"),s(G).e("clear")]),style:we(Ye.value),onMousedown:xe(s(q),["prevent"]),onClick:Be},{default:j(()=>[(h(),N(J(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):y("v-if",!0),K.value?(h(),A("span",{key:1,style:we(We.value),class:x([s(c).e("count"),s(c).is("outside",e.wordLimitPosition==="outside")])},Ce(Me.value)+" / "+Ce(m.value),7)):y("v-if",!0)],64))],38))}}),Ra=Ba;const Wa=da(Ra);function Oa(e,a){let o;const t=T(!1),n=fa({...e,originalPosition:"",originalOverflow:"",visible:!1});function l(v){n.text=v}function f(){const v=n.parent,I=C.ns;if(!v.vLoadingAddClassList){let S=v.getAttribute("loading-number");S=Number.parseInt(S)-1,S?v.setAttribute("loading-number",S.toString()):(Ne(v,I.bm("parent","relative")),v.removeAttribute("loading-number")),Ne(v,I.bm("parent","hidden"))}r(),m.unmount()}function r(){C.$el?.parentNode?.removeChild(C.$el)}function p(){e.beforeClose&&!e.beforeClose()||(t.value=!0,clearTimeout(o),o=setTimeout(g,400),n.visible=!1,e.closed?.())}function g(){if(!t.value)return;const v=n.parent;t.value=!1,v.vLoadingAddClassList=void 0,f()}const m=ma(wt({name:"ElLoading",setup(v,{expose:I}){const{ns:S,zIndex:V}=va("loading");return I({ns:S,zIndex:V}),()=>{const c=n.spinner||n.svg,G=le("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...c?{innerHTML:c}:{}},[le("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),H=n.text?le("p",{class:S.b("text")},[n.text]):void 0;return le(ba,{name:S.b("fade"),onAfterLeave:g},{default:j(()=>[pa(ga("div",{style:{backgroundColor:n.background||""},class:[S.b("mask"),n.customClass,S.is("fullscreen",n.fullscreen)]},[le("div",{class:S.b("spinner")},[G,H])]),[[ha,n.visible]])])})}}}));Object.assign(m._context,a??{});const C=m.mount(document.createElement("div"));return{...ya(n),setText:l,removeElLoadingChild:r,close:p,handleAfterLeave:g,vm:C,get $el(){return C.$el}}}let Ie;const Ke=function(e={},a){if(!Pe)return;const o=Ga(e);if(o.fullscreen&&Ie)return Ie;const t=Oa({...o,closed:()=>{o.closed?.(),o.fullscreen&&(Ie=void 0)}},a??Ke._context);ja(o,o.parent,t),pt(o,o.parent,t),o.parent.vLoadingAddClassList=()=>pt(o,o.parent,t);let n=o.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",o.parent.setAttribute("loading-number",n),o.parent.appendChild(t.$el),$(()=>t.visible.value=o.visible),o.fullscreen&&(Ie=t),t},Ga=e=>{let a;return ce(e.target)?a=document.querySelector(e.target)??document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&(e.fullscreen??!0),lock:e.lock??!1,customClass:e.customClass||"",visible:e.visible??!0,beforeClose:e.beforeClose,closed:e.closed,target:a}},ja=async(e,a,o)=>{const{nextZIndex:t}=o.vm.zIndex||o.vm._.exposed.zIndex,n={};if(e.fullscreen)o.originalPosition.value=ie(document.body,"position"),o.originalOverflow.value=ie(document.body,"overflow"),n.zIndex=t();else if(e.parent===document.body){o.originalPosition.value=ie(document.body,"position"),await $();for(const l of["top","left"]){const f=l==="top"?"scrollTop":"scrollLeft";n[l]=`${e.target.getBoundingClientRect()[l]+document.body[f]+document.documentElement[f]-Number.parseInt(ie(document.body,`margin-${l}`),10)}px`}for(const l of["height","width"])n[l]=`${e.target.getBoundingClientRect()[l]}px`}else o.originalPosition.value=ie(a,"position");for(const[l,f]of Object.entries(n))o.$el.style[l]=f},pt=(e,a,o)=>{const t=o.vm.ns||o.vm._.exposed.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?Ne(a,t.bm("parent","relative")):ut(a,t.bm("parent","relative")),e.fullscreen&&e.lock?ut(a,t.bm("parent","hidden")):Ne(a,t.bm("parent","hidden"))};Ke._context=null;const ue=Symbol("ElLoading"),D=e=>`element-loading-${wa(e)}`,gt=(e,a)=>{const o=a.instance,t=g=>ke(a.value)?a.value[g]:void 0,n=g=>T(ce(g)&&o?.[g]||g),l=g=>n(t(g)||e.getAttribute(D(g))),f=t("fullscreen")??a.modifiers.fullscreen,r={text:l("text"),svg:l("svg"),svgViewBox:l("svgViewBox"),spinner:l("spinner"),background:l("background"),customClass:l("customClass"),fullscreen:f,target:t("target")??(f?void 0:e),body:t("body")??a.modifiers.body,lock:t("lock")??a.modifiers.lock},p=Ke(r);p._context=Ct._context,e[ue]={options:r,instance:p}},Da=(e,a)=>{for(const o of Object.keys(e))xa(e[o])&&(e[o].value=a[o])},Ct={mounted(e,a){a.value&&gt(e,a)},updated(e,a){const o=e[ue];if(!a.value){o?.instance.close(),e[ue]=null;return}o?Da(o.options,ke(a.value)?a.value:{text:e.getAttribute(D("text")),svg:e.getAttribute(D("svg")),svgViewBox:e.getAttribute(D("svgViewBox")),spinner:e.getAttribute(D("spinner")),background:e.getAttribute(D("background")),customClass:e.getAttribute(D("customClass"))}):gt(e,a)},unmounted(e){e[ue]?.instance.close(),e[ue]=null}};Ct._context=null;const Ya=new Ca;function It(e,a=255){if(!e)return e;const o=/[<>:"/\\|?*]/g;let t=e.replace(o,"_");return t=t.replace(/[\x00-\x1f\x7f]/g,"").trim(),t=t.replace(/[. ]$/,"_"),t.slice(0,a)}const Le=(...e)=>e.filter(a=>!!a).join("/").replace(/\/+/g,"/"),de=async(e,a,o,t=!0)=>{const l=await(await fetch(e)).arrayBuffer(),f=new Uint8Array(l),r=await _.file.getRootDir(),p=Le(r,a,It(o));return await _.file.write(p,f),t&&(await _.system.showItemInFolder(p),Fe("保存成功")),p},Xa=async(e,a)=>de(e,"cover",a),qa=async(e,a)=>de(e,"face",a),St=e=>{const o=e.split("?")[0].match(/\.[^.]+$/);return o?o[0]:""},Ha=e=>{try{return new URL(e).pathname.split("/").pop()||""}catch{return crypto.randomUUID()}},Za=async(e,a)=>{if(!e||e.length===0)return;const o=Le("emoji",a);let t=null;for(const{emoji:n}of e){const l=await de(n.icon_url,o,`${n.text}${St(n.icon_url)}`,!1);await Ue(500,777),t||(t=l)}await _.system.showItemInFolder(t),Fe("保存成功")},Ja=async(e,a)=>{if(!e||e.length===0)return;const o=Le("emoji",a);let t=null;for(const{text:n,url:l,gif_url:f}of e){const r=await de(f??l,o,`${n}${St(f??l)}`,!1);await Ue(500,777),t||(t=r)}await _.system.showItemInFolder(t),Fe("保存成功")},Qa=async(e,a)=>{if(!e||e.length===0)return;const o=Le("opus",It(a));let t=null;for(const n of e){const l=await de(n,o,Ha(n),!1);await Ue(100,333),t||(t=l)}await _.system.showItemInFolder(t),Fe("保存成功")};export{Wa as E,Qa as a,qa as b,Ya as c,Xa as d,Za as e,Ja as f,St as g,Ct as v};
1
+ import{t as ht,l as b,v as Ut,x as bt,z as Pe,A as re,u as s,B as Ge,C as Se,D as st,r as T,G as Kt,H as $,I as ce,J as Wt,K as je,L as yt,M as Yt,N as O,O as Xt,P as qt,Q as Zt,R as xt,S as lt,d as wt,T as Jt,U as Qt,V as _t,W as ea,X as ta,Y as aa,Z as it,$ as na,a0 as q,a1 as oa,a2 as sa,a3 as la,o as h,h as A,g as y,F as De,a4 as x,a5 as se,b as Z,c as N,a as j,a6 as J,a7 as Q,a8 as rt,a9 as xe,aa as we,ab as Ce,ac as ia,ad as ra,ae as ua,af as ca,ag as ke,ah as da,ai as fa,aj as ma,ak as va,al as le,w as pa,e as ga,am as ha,an as ba,ao as ya,ap as Ne,aq as ie,ar as ut,as as xa,at as wa,au as Ca,av as Ue,aw as _,ax as Fe}from"./index-pBgDTaGA.js";const Ee="update:modelValue",ct="change",He="input",Ia=["class","style"],Sa=/^on[A-Z]/,Ea=(e={})=>{const{excludeListeners:a=!1,excludeKeys:o}=e,t=b(()=>(o?.value||[]).concat(Ia)),n=bt();return n?b(()=>Ut(Object.entries(n.proxy?.$attrs).filter(([l])=>!t.value.includes(l)&&!(a&&Sa.test(l))))):(ht("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),b(()=>({})))},ka=e=>Pe?window.requestAnimationFrame(e):setTimeout(e,16),dt=e=>Pe?window.cancelAnimationFrame(e):clearTimeout(e);function Na(e){let a;function o(){if(e.value==null)return;const{selectionStart:n,selectionEnd:l,value:f}=e.value;n==null||l==null||(a={selectionStart:n,selectionEnd:l,value:f,beforeTxt:f.slice(0,Math.max(0,n)),afterTxt:f.slice(Math.max(0,l))})}function t(){if(e.value==null||a==null)return;const{value:n}=e.value,{beforeTxt:l,afterTxt:f,selectionStart:r}=a;if(l==null||f==null||r==null)return;let p=n.length;if(n.endsWith(f))p=n.length-f.length;else if(n.startsWith(l))p=l.length;else{const g=l[r-1],m=n.indexOf(g,r-1);m!==-1&&(p=m+1)}e.value.setSelectionRange(p,p)}return[o,t]}function Pa(e,{disabled:a,beforeFocus:o,afterFocus:t,beforeBlur:n,afterBlur:l}={}){const{emit:f}=bt(),r=Se(),p=T(!1),g=v=>{const I=st(o)?o(v):!1;s(a)||p.value||I||(p.value=!0,f("focus",v),t?.())},m=v=>{const I=st(n)?n(v):!1;s(a)||v.relatedTarget&&r.value?.contains(v.relatedTarget)||I||(p.value=!1,f("blur",v),l?.())},C=v=>{s(a)||Kt(v.target)||r.value?.contains(document.activeElement)&&r.value!==document.activeElement||e.value?.focus()};return re([r,()=>s(a)],([v,I])=>{v&&(I?v.removeAttribute("tabindex"):v.setAttribute("tabindex","-1"))}),Ge(r,"focus",g,!0),Ge(r,"blur",m,!0),Ge(r,"click",C,!0),{isFocused:p,wrapperRef:r,handleFocus:g,handleBlur:m}}function Fa({afterComposition:e,emit:a}){const o=T(!1),t=r=>{a?.("compositionstart",r),o.value=!0},n=r=>{a?.("compositionupdate",r),o.value=!0},l=r=>{a?.("compositionend",r),o.value&&(o.value=!1,$(()=>e(r)))};return{isComposing:o,handleComposition:r=>{r.type==="compositionend"?l(r):n(r)},handleCompositionStart:t,handleCompositionUpdate:n,handleCompositionEnd:l}}const La=Wt({id:{type:String,default:void 0},size:Yt,disabled:{type:Boolean,default:void 0},modelValue:{type:O([String,Number,Object]),default:""},modelModifiers:{type:O(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:O(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:O([Boolean,Object]),default:!1},autocomplete:{type:O(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:je,default:yt},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:je},prefixIcon:{type:je},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:O([Object,Array,String,Boolean]),default:()=>qt({})},countGraphemes:{type:O(Function)},autofocus:Boolean,rows:{type:Number,default:2},...Xt(["ariaLabel"]),inputmode:{type:O(String),default:void 0},name:String}),za={[Ee]:e=>ce(e),input:e=>ce(e),change:(e,a)=>ce(e)&&(a instanceof Event||a===void 0),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:e=>e===void 0||e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent};Zt(yt);let P;const Aa={height:"0",visibility:"hidden",overflow:xt()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ta=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],ft=e=>{const a=Number.parseFloat(e);return Number.isNaN(a)?e:a};function Va(e){const a=window.getComputedStyle(e),o=a.getPropertyValue("box-sizing"),t=Number.parseFloat(a.getPropertyValue("padding-bottom"))+Number.parseFloat(a.getPropertyValue("padding-top")),n=Number.parseFloat(a.getPropertyValue("border-bottom-width"))+Number.parseFloat(a.getPropertyValue("border-top-width"));return{contextStyle:Ta.map(l=>[l,a.getPropertyValue(l)]),paddingSize:t,borderSize:n,boxSizing:o}}function mt(e,a=1,o){if(!P){P=document.createElement("textarea");let m=document.body;!xt()&&e.parentNode&&(m=e.parentNode),m.appendChild(P)}const{paddingSize:t,borderSize:n,boxSizing:l,contextStyle:f}=Va(e);f.forEach(([m,C])=>P?.style.setProperty(m,C)),Object.entries(Aa).forEach(([m,C])=>P?.style.setProperty(m,C,"important")),P.value=e.value||e.placeholder||"";let r=P.scrollHeight;const p={};l==="border-box"?r=r+n:l==="content-box"&&(r=r-t),P.value="";const g=P.scrollHeight-t;if(lt(a)){let m=g*a;l==="border-box"&&(m=m+t+n),r=Math.max(m,r),p.minHeight=`${m}px`}if(lt(o)){let m=g*o;l==="border-box"&&(m=m+t+n),r=Math.min(m,r)}return p.height=`${r}px`,P.parentNode?.removeChild(P),P=void 0,p}const Ma=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],$a=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],vt="ElInput";var Ba=wt({name:vt,inheritAttrs:!1,__name:"input",props:La,emits:za,setup(e,{expose:a,emit:o}){const t=e,n=o,l=Jt(),f=Qt(),r=b(()=>[t.type==="textarea"?G.b():c.b(),c.m(S.value),c.is("disabled",V.value),c.is("exceed",Pt.value),{[c.b("group")]:f.prepend||f.append,[c.m("prefix")]:f.prefix||t.prefixIcon,[c.m("suffix")]:f.suffix||t.suffixIcon||t.clearable||t.showPassword,[c.bm("suffix","password-clear")]:ve.value&&Ve.value,[c.b("hidden")]:t.type==="hidden"},l.class]),p=b(()=>[c.e("wrapper"),c.is("focus",Ae.value)]),g=Ea(),m=b(()=>t.maxlength?.toString()),{form:C,formItem:v}=_t(),{inputId:I}=ea(t,{formItemContext:v}),S=ta(),V=aa(),c=it("input"),G=it("textarea"),H=Se(),L=Se(),ze=T(!1),U=T(!1),We=T(),Ye=T(),fe=Se(t.inputStyle),ee=T(""),me=T(),E=b(()=>H.value||L.value),{wrapperRef:Et,isFocused:Ae,handleFocus:Xe,handleBlur:qe}=Pa(E,{disabled:V,afterBlur(){t.validateEvent&&v?.validate?.("blur").catch(q)}}),Ze=b(()=>C?.statusIcon??!1),te=b(()=>v?.validateState||""),Je=b(()=>te.value&&ia[te.value]),kt=b(()=>U.value?ra:ua),Nt=b(()=>[l.style]),Qe=b(()=>[t.inputStyle,fe.value,{resize:t.resize},me.value?{height:me.value}:void 0]),M=b(()=>ca(t.modelValue)?"":String(t.modelValue)),Te=b(()=>t.clearable&&!V.value&&!t.readonly),ve=b(()=>Te.value&&!!M.value&&(Ae.value||ze.value)),Ve=b(()=>t.showPassword&&!V.value&&!!M.value),K=b(()=>t.showWordLimit&&!!m.value&&(t.type==="text"||t.type==="textarea")&&!V.value&&!t.readonly&&!t.showPassword),Me=b(()=>t.countGraphemes&&t.showWordLimit?t.countGraphemes(M.value):M.value.length),Pt=b(()=>!!K.value&&Me.value>Number(m.value)),Ft=b(()=>!!f.suffix||!!t.suffixIcon||t.clearable||t.showPassword||K.value||!!te.value&&Ze.value),Lt=b(()=>!!Object.keys(t.modelModifiers).length),[zt,At]=Na(H);let W;na(L,i=>{if(Tt(),!K.value&&!Te.value||t.resize!=="both"&&t.resize!=="horizontal")return;const{width:u}=i[0].target.getBoundingClientRect(),d=()=>{W=void 0,We.value={right:`calc(100% - ${u-10}px)`},Ye.value={right:`calc(100% - ${u-11}px)`}};W&&dt(W),W=ka(d)});const ae=()=>{const{type:i,autosize:u}=t;if(!(!Pe||i!=="textarea"||!L.value))if(u){const d=ke(u)?u.minRows:void 0,z=ke(u)?u.maxRows:void 0,k=mt(L.value,d,z);fe.value={overflowY:"hidden",...k},$(()=>{L.value.offsetHeight,fe.value=k})}else fe.value={minHeight:mt(L.value).minHeight}},Tt=(i=>{let u=!1;return()=>{if(u||!t.autosize){t.resize!=="none"&&setTimeout(()=>{me.value=L.value?.style.height});return}L.value?.offsetParent!==null&&(setTimeout(i),u=!0)}})(ae),Y=()=>{const i=E.value,u=t.formatter?t.formatter(M.value):M.value;!i||i.value===u||t.type==="file"||(i.value=u)},_e=i=>{const{trim:u,number:d}=t.modelModifiers;return u&&(i=i.trim()),d&&(i=`${ft(i)}`),t.formatter&&t.parser&&(i=t.parser(i)),i},$e=async i=>{if(tt.value)return;const{lazy:u}=t.modelModifiers;let{value:d}=i.target,z=!1;if(u){n(He,d);return}if(d=_e(d),t.countGraphemes&&m.value!=null){const k=Number(m.value),be=t.countGraphemes(d),X=t.countGraphemes(ee.value);if(be>k&&be>X)if(X>k)d=ee.value,z=!0;else{const B=ee.value,F=d;let w=0;for(;w<B.length&&w<F.length&&B[w]===F[w];)w++;let R=B.length,ne=F.length;for(;R>w&&ne>w&&B[R-1]===F[ne-1];)R--,ne--;const Gt=F.slice(0,w),jt=B.slice(w,R),nt=F.slice(w,ne),Dt=F.slice(ne),Ht=X-t.countGraphemes(jt),Re=Math.max(0,k-Ht);let oe="";if(Re>0)if(typeof Intl<"u"&&"Segmenter"in Intl){const Oe=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(const{segment:ye}of Oe.segment(nt)){const ot=oe+ye;if(t.countGraphemes(ot)>Re)break;oe=ot}}else for(const Oe of Array.from(nt)){const ye=oe+Oe;if(t.countGraphemes(ye)>Re)break;oe=ye}d=Gt+oe+Dt,z=!0}}if(String(d)===M.value){if(t.formatter||z){const k=i.target,be=k.value,X=k.selectionStart,B=k.selectionEnd;if(Y(),z&&E.value&&X!=null&&B!=null){const F=E.value.value,w=be.slice(Math.max(0,B));let R=Math.min(X,F.length);w&&F.endsWith(w)&&(R=F.length-w.length),E.value.setSelectionRange(R,R)}}return}ee.value=d,zt(),n(Ee,d),n(He,d),await $(),(t.formatter&&t.parser||!Lt.value)&&Y(),At()},et=async i=>{let{value:u}=i.target;u=_e(u),t.modelModifiers.lazy&&n(Ee,u),n(ct,u,i),await $(),Y()},{isComposing:tt,handleCompositionStart:pe,handleCompositionUpdate:ge,handleCompositionEnd:he}=Fa({emit:n,afterComposition:$e}),Vt=()=>{U.value=!U.value},Mt=()=>E.value?.focus(),$t=()=>E.value?.blur(),Bt=i=>{ze.value=!1,n("mouseleave",i)},Rt=i=>{ze.value=!0,n("mouseenter",i)},at=i=>{n("keydown",i)},Ot=()=>{E.value?.select()},Be=i=>{n(Ee,""),n(ct,""),n("clear",i),n(He,"")};return re(()=>t.modelValue,()=>{$(()=>{ae(),t.autosize&&(me.value=void 0)}),t.validateEvent&&v?.validate?.("change").catch(q)}),re(()=>M.value,i=>{ee.value=i},{immediate:!0}),re(M,i=>{if(!E.value)return;const{trim:u,number:d}=t.modelModifiers,z=E.value.value,k=(d||t.type==="number")&&!/^0\d/.test(z)?`${ft(z)}`:z;k!==i&&(document.activeElement===E.value&&E.value.type!=="range"&&u&&k.trim()===i||Y())}),re(()=>t.type,async()=>{await $(),Y(),ae()}),oa(()=>{!t.formatter&&t.parser&&ht(vt,"If you set the parser, you also need to set the formatter."),Y(),$(ae)}),sa(()=>{W&&dt(W)}),a({input:H,textarea:L,ref:E,textareaStyle:Qe,autosize:la(t,"autosize"),isComposing:tt,passwordVisible:U,focus:Mt,blur:$t,select:Ot,clear:Be,resizeTextarea:ae}),(i,u)=>(h(),A("div",{class:x([r.value,{[s(c).bm("group","append")]:i.$slots.append,[s(c).bm("group","prepend")]:i.$slots.prepend}]),style:we(Nt.value),onMouseenter:Rt,onMouseleave:Bt},[y(" input "),e.type!=="textarea"?(h(),A(De,{key:0},[y(" prepend slot "),i.$slots.prepend?(h(),A("div",{key:0,class:x(s(c).be("group","prepend"))},[se(i.$slots,"prepend")],2)):y("v-if",!0),Z("div",{ref_key:"wrapperRef",ref:Et,class:x(p.value)},[y(" prefix slot "),i.$slots.prefix||e.prefixIcon?(h(),A("span",{key:0,class:x(s(c).e("prefix"))},[Z("span",{class:x(s(c).e("prefix-inner"))},[se(i.$slots,"prefix"),e.prefixIcon?(h(),N(s(Q),{key:0,class:x(s(c).e("icon"))},{default:j(()=>[(h(),N(J(e.prefixIcon)))]),_:1},8,["class"])):y("v-if",!0)],2)],2)):y("v-if",!0),Z("input",rt({id:s(I),ref_key:"input",ref:H,class:s(c).e("inner")},s(g),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:m.value,type:e.showPassword?U.value?"text":"password":e.type,disabled:s(V),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-label":e.ariaLabel,placeholder:e.placeholder,style:e.inputStyle,form:e.form,autofocus:e.autofocus,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:u[0]||(u[0]=(...d)=>s(pe)&&s(pe)(...d)),onCompositionupdate:u[1]||(u[1]=(...d)=>s(ge)&&s(ge)(...d)),onCompositionend:u[2]||(u[2]=(...d)=>s(he)&&s(he)(...d)),onInput:$e,onChange:et,onKeydown:at}),null,16,Ma),y(" suffix slot "),Ft.value?(h(),A("span",{key:1,class:x(s(c).e("suffix"))},[Z("span",{class:x(s(c).e("suffix-inner"))},[Te.value?(h(),N(s(Q),{key:0,class:x([s(c).e("icon"),s(c).e("clear")]),style:we({visibility:ve.value?"visible":"hidden"}),onMousedown:xe(s(q),["prevent"]),onClick:Be},{default:j(()=>[(h(),N(J(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):y("v-if",!0),!ve.value||!Ve.value||!K.value?(h(),A(De,{key:1},[se(i.$slots,"suffix"),e.suffixIcon?(h(),N(s(Q),{key:0,class:x(s(c).e("icon"))},{default:j(()=>[(h(),N(J(e.suffixIcon)))]),_:1},8,["class"])):y("v-if",!0)],64)):y("v-if",!0),Ve.value?(h(),N(s(Q),{key:2,class:x([s(c).e("icon"),s(c).e("password")]),onClick:Vt,onMousedown:xe(s(q),["prevent"]),onMouseup:xe(s(q),["prevent"])},{default:j(()=>[se(i.$slots,"password-icon",{visible:U.value},()=>[(h(),N(J(kt.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):y("v-if",!0),K.value?(h(),A("span",{key:3,class:x([s(c).e("count"),s(c).is("outside",e.wordLimitPosition==="outside")])},[Z("span",{class:x(s(c).e("count-inner"))},Ce(Me.value)+" / "+Ce(m.value),3)],2)):y("v-if",!0),te.value&&Je.value&&Ze.value?(h(),N(s(Q),{key:4,class:x([s(c).e("icon"),s(c).e("validateIcon"),s(c).is("loading",te.value==="validating")])},{default:j(()=>[(h(),N(J(Je.value)))]),_:1},8,["class"])):y("v-if",!0)],2)],2)):y("v-if",!0)],2),y(" append slot "),i.$slots.append?(h(),A("div",{key:1,class:x(s(c).be("group","append"))},[se(i.$slots,"append")],2)):y("v-if",!0)],64)):(h(),A(De,{key:1},[y(" textarea "),Z("textarea",rt({id:s(I),ref_key:"textarea",ref:L,class:[s(G).e("inner"),s(c).is("focus",s(Ae)),s(G).is("clearable",e.clearable)]},s(g),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:m.value,tabindex:e.tabindex,disabled:s(V),readonly:e.readonly,autocomplete:e.autocomplete,style:Qe.value,"aria-label":e.ariaLabel,placeholder:e.placeholder,form:e.form,autofocus:e.autofocus,rows:e.rows,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:u[3]||(u[3]=(...d)=>s(pe)&&s(pe)(...d)),onCompositionupdate:u[4]||(u[4]=(...d)=>s(ge)&&s(ge)(...d)),onCompositionend:u[5]||(u[5]=(...d)=>s(he)&&s(he)(...d)),onInput:$e,onFocus:u[6]||(u[6]=(...d)=>s(Xe)&&s(Xe)(...d)),onBlur:u[7]||(u[7]=(...d)=>s(qe)&&s(qe)(...d)),onChange:et,onKeydown:at}),null,16,$a),ve.value?(h(),N(s(Q),{key:0,class:x([s(G).e("icon"),s(G).e("clear")]),style:we(Ye.value),onMousedown:xe(s(q),["prevent"]),onClick:Be},{default:j(()=>[(h(),N(J(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):y("v-if",!0),K.value?(h(),A("span",{key:1,style:we(We.value),class:x([s(c).e("count"),s(c).is("outside",e.wordLimitPosition==="outside")])},Ce(Me.value)+" / "+Ce(m.value),7)):y("v-if",!0)],64))],38))}}),Ra=Ba;const Wa=da(Ra);function Oa(e,a){let o;const t=T(!1),n=fa({...e,originalPosition:"",originalOverflow:"",visible:!1});function l(v){n.text=v}function f(){const v=n.parent,I=C.ns;if(!v.vLoadingAddClassList){let S=v.getAttribute("loading-number");S=Number.parseInt(S)-1,S?v.setAttribute("loading-number",S.toString()):(Ne(v,I.bm("parent","relative")),v.removeAttribute("loading-number")),Ne(v,I.bm("parent","hidden"))}r(),m.unmount()}function r(){C.$el?.parentNode?.removeChild(C.$el)}function p(){e.beforeClose&&!e.beforeClose()||(t.value=!0,clearTimeout(o),o=setTimeout(g,400),n.visible=!1,e.closed?.())}function g(){if(!t.value)return;const v=n.parent;t.value=!1,v.vLoadingAddClassList=void 0,f()}const m=ma(wt({name:"ElLoading",setup(v,{expose:I}){const{ns:S,zIndex:V}=va("loading");return I({ns:S,zIndex:V}),()=>{const c=n.spinner||n.svg,G=le("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...c?{innerHTML:c}:{}},[le("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),H=n.text?le("p",{class:S.b("text")},[n.text]):void 0;return le(ba,{name:S.b("fade"),onAfterLeave:g},{default:j(()=>[pa(ga("div",{style:{backgroundColor:n.background||""},class:[S.b("mask"),n.customClass,S.is("fullscreen",n.fullscreen)]},[le("div",{class:S.b("spinner")},[G,H])]),[[ha,n.visible]])])})}}}));Object.assign(m._context,a??{});const C=m.mount(document.createElement("div"));return{...ya(n),setText:l,removeElLoadingChild:r,close:p,handleAfterLeave:g,vm:C,get $el(){return C.$el}}}let Ie;const Ke=function(e={},a){if(!Pe)return;const o=Ga(e);if(o.fullscreen&&Ie)return Ie;const t=Oa({...o,closed:()=>{o.closed?.(),o.fullscreen&&(Ie=void 0)}},a??Ke._context);ja(o,o.parent,t),pt(o,o.parent,t),o.parent.vLoadingAddClassList=()=>pt(o,o.parent,t);let n=o.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",o.parent.setAttribute("loading-number",n),o.parent.appendChild(t.$el),$(()=>t.visible.value=o.visible),o.fullscreen&&(Ie=t),t},Ga=e=>{let a;return ce(e.target)?a=document.querySelector(e.target)??document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&(e.fullscreen??!0),lock:e.lock??!1,customClass:e.customClass||"",visible:e.visible??!0,beforeClose:e.beforeClose,closed:e.closed,target:a}},ja=async(e,a,o)=>{const{nextZIndex:t}=o.vm.zIndex||o.vm._.exposed.zIndex,n={};if(e.fullscreen)o.originalPosition.value=ie(document.body,"position"),o.originalOverflow.value=ie(document.body,"overflow"),n.zIndex=t();else if(e.parent===document.body){o.originalPosition.value=ie(document.body,"position"),await $();for(const l of["top","left"]){const f=l==="top"?"scrollTop":"scrollLeft";n[l]=`${e.target.getBoundingClientRect()[l]+document.body[f]+document.documentElement[f]-Number.parseInt(ie(document.body,`margin-${l}`),10)}px`}for(const l of["height","width"])n[l]=`${e.target.getBoundingClientRect()[l]}px`}else o.originalPosition.value=ie(a,"position");for(const[l,f]of Object.entries(n))o.$el.style[l]=f},pt=(e,a,o)=>{const t=o.vm.ns||o.vm._.exposed.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?Ne(a,t.bm("parent","relative")):ut(a,t.bm("parent","relative")),e.fullscreen&&e.lock?ut(a,t.bm("parent","hidden")):Ne(a,t.bm("parent","hidden"))};Ke._context=null;const ue=Symbol("ElLoading"),D=e=>`element-loading-${wa(e)}`,gt=(e,a)=>{const o=a.instance,t=g=>ke(a.value)?a.value[g]:void 0,n=g=>T(ce(g)&&o?.[g]||g),l=g=>n(t(g)||e.getAttribute(D(g))),f=t("fullscreen")??a.modifiers.fullscreen,r={text:l("text"),svg:l("svg"),svgViewBox:l("svgViewBox"),spinner:l("spinner"),background:l("background"),customClass:l("customClass"),fullscreen:f,target:t("target")??(f?void 0:e),body:t("body")??a.modifiers.body,lock:t("lock")??a.modifiers.lock},p=Ke(r);p._context=Ct._context,e[ue]={options:r,instance:p}},Da=(e,a)=>{for(const o of Object.keys(e))xa(e[o])&&(e[o].value=a[o])},Ct={mounted(e,a){a.value&&gt(e,a)},updated(e,a){const o=e[ue];if(!a.value){o?.instance.close(),e[ue]=null;return}o?Da(o.options,ke(a.value)?a.value:{text:e.getAttribute(D("text")),svg:e.getAttribute(D("svg")),svgViewBox:e.getAttribute(D("svgViewBox")),spinner:e.getAttribute(D("spinner")),background:e.getAttribute(D("background")),customClass:e.getAttribute(D("customClass"))}):gt(e,a)},unmounted(e){e[ue]?.instance.close(),e[ue]=null}};Ct._context=null;const Ya=new Ca;function It(e,a=255){if(!e)return e;const o=/[<>:"/\\|?*]/g;let t=e.replace(o,"_");return t=t.replace(/[\x00-\x1f\x7f]/g,"").trim(),t=t.replace(/[. ]$/,"_"),t.slice(0,a)}const Le=(...e)=>e.filter(a=>!!a).join("/").replace(/\/+/g,"/"),de=async(e,a,o,t=!0)=>{const l=await(await fetch(e)).arrayBuffer(),f=new Uint8Array(l),r=await _.file.getRootDir(),p=Le(r,a,It(o));return await _.file.write(p,f),t&&(await _.system.showItemInFolder(p),Fe("保存成功")),p},Xa=async(e,a)=>de(e,"cover",a),qa=async(e,a)=>de(e,"face",a),St=e=>{const o=e.split("?")[0].match(/\.[^.]+$/);return o?o[0]:""},Ha=e=>{try{return new URL(e).pathname.split("/").pop()||""}catch{return crypto.randomUUID()}},Za=async(e,a)=>{if(!e||e.length===0)return;const o=Le("emoji",a);let t=null;for(const{emoji:n}of e){const l=await de(n.icon_url,o,`${n.text}${St(n.icon_url)}`,!1);await Ue(500,777),t||(t=l)}await _.system.showItemInFolder(t),Fe("保存成功")},Ja=async(e,a)=>{if(!e||e.length===0)return;const o=Le("emoji",a);let t=null;for(const{text:n,url:l,gif_url:f}of e){const r=await de(f??l,o,`${n}${St(f??l)}`,!1);await Ue(500,777),t||(t=r)}await _.system.showItemInFolder(t),Fe("保存成功")},Qa=async(e,a)=>{if(!e||e.length===0)return;const o=Le("opus",It(a));let t=null;for(const n of e){const l=await de(n,o,Ha(n),!1);await Ue(100,333),t||(t=l)}await _.system.showItemInFolder(t),Fe("保存成功")};export{Wa as E,Qa as a,qa as b,Ya as c,Xa as d,Za as e,Ja as f,St as g,Ct as v};