You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/Upload.6bcec76c.js

383 lines
44 KiB

import{bD as V,h as t,b as L,c as h,e as C,d as A,y as R,bE as H,N as j,bF as de,bG as ue,bH as ce,bI as fe,u as ge,x as Q,bJ as Te,z as te,A as he,n as $e,q as G,bp as ee,ba as Se,L as Le,M as De,bK as pe,r as W,v as ze,aK as _e,bw as Fe,K as Z,bL as Ie,ay as Oe,bC as Ue,bx as je,bM as re,f as U,au as Ne,bN as Ee,o as Me,t as F,s as Ae,p as He,bO as qe,ab as We,R as ie,V as Xe,w as ne}from"./index.d4f5aad2.js";var Ve=V("attach",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),Ge=V("trash",t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},t("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),t("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),t("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),t("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),Ke=V("download",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),Ye=V("cancel",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("path",{d:"M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.353
color: var(--n-icon-color);
transition: color .3s var(--n-bezier);
`),C("line",`
width: 100%;
display: block;
`,[h("progress-content",`
display: flex;
align-items: center;
`,[h("progress-graph",{flex:1})]),h("progress-custom-content",{marginLeft:"14px"}),h("progress-icon",`
width: 30px;
padding-left: 14px;
height: var(--n-icon-size-line);
line-height: var(--n-icon-size-line);
font-size: var(--n-icon-size-line);
`,[C("as-text",`
color: var(--n-text-color-line-outer);
text-align: center;
width: 40px;
font-size: var(--n-font-size);
padding-left: 4px;
transition: color .3s var(--n-bezier);
`)])]),C("circle, dashboard",{width:"120px"},[h("progress-custom-content",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
`),h("progress-text",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
color: inherit;
font-size: var(--n-font-size-circle);
color: var(--n-text-color-circle);
font-weight: var(--n-font-weight-circle);
transition: color .3s var(--n-bezier);
white-space: nowrap;
`),h("progress-icon",`
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
color: var(--n-icon-color);
font-size: var(--n-icon-size-circle);
`)]),C("multiple-circle",`
width: 200px;
color: inherit;
`,[h("progress-text",`
font-weight: var(--n-font-weight-circle);
color: var(--n-text-color-circle);
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
transition: color .3s var(--n-bezier);
`)]),h("progress-content",{position:"relative"}),h("progress-graph",{position:"relative"},[h("progress-graph-circle",[L("svg",{verticalAlign:"bottom"}),h("progress-graph-circle-fill",`
stroke: var(--n-fill-color);
transition:
opacity .3s var(--n-bezier),
stroke .3s var(--n-bezier),
stroke-dasharray .3s var(--n-bezier);
`,[C("empty",{opacity:0})]),h("progress-graph-circle-rail",`
transition: stroke .3s var(--n-bezier);
overflow: hidden;
stroke: var(--n-rail-color);
`)]),h("progress-graph-line",[C("indicator-inside",[h("progress-graph-line-rail",`
height: 16px;
line-height: 16px;
border-radius: 10px;
`,[h("progress-graph-line-fill",`
height: inherit;
border-radius: 10px;
`),h("progress-graph-line-indicator",`
background: #0000;
white-space: nowrap;
text-align: right;
margin-left: 14px;
margin-right: 14px;
height: inherit;
font-size: 12px;
color: var(--n-text-color-line-inner);
transition: color .3s var(--n-bezier);
`)])]),C("indicator-inside-label",`
height: 16px;
display: flex;
align-items: center;
`,[h("progress-graph-line-rail",`
flex: 1;
transition: background-color .3s var(--n-bezier);
`),h("progress-graph-line-indicator",`
background: var(--n-fill-color);
font-size: 12px;
transform: translateZ(0);
display: flex;
vertical-align: middle;
height: 16px;
line-height: 16px;
padding: 0 10px;
border-radius: 10px;
position: absolute;
white-space: nowrap;
color: var(--n-text-color-line-inner);
transition:
right .2s var(--n-bezier),
color .3s var(--n-bezier),
background-color .3s var(--n-bezier);
`)]),h("progress-graph-line-rail",`
position: relative;
overflow: hidden;
height: var(--n-rail-height);
border-radius: 5px;
background-color: var(--n-rail-color);
transition: background-color .3s var(--n-bezier);
`,[h("progress-graph-line-fill",`
background: var(--n-fill-color);
position: relative;
border-radius: 5px;
height: inherit;
width: 100%;
max-width: 0%;
transition:
background-color .3s var(--n-bezier),
max-width .2s var(--n-bezier);
`,[C("processing",[L("&::after",`
content: "";
background-image: var(--n-line-bg-processing);
animation: progress-processing-animation 2s var(--n-bezier) infinite;
`)])])])])])]),L("@keyframes progress-processing-animation",`
0% {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 100%;
opacity: 1;
}
66% {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
opacity: 0;
}
100% {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
opacity: 0;
}
`)]);const Qe={success:t(de,null),error:t(ue,null),warning:t(ce,null),info:t(fe,null)};var et=A({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:String,status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:n}){const r=R(()=>H(e.height)),i=R(()=>e.railBorderRadius!==void 0?H(e.railBorderRadius):e.height!==void 0?H(e.height,{c:.5}):""),o=R(()=>e.fillBorderRadius!==void 0?H(e.fillBorderRadius):e.railBorderRadius!==void 0?H(e.railBorderRadius):e.height!==void 0?H(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:s,railColor:u,railStyle:c,percentage:d,unit:l,indicatorTextColor:a,status:f,showIndicator:y,fillColor:p,processing:k,clsPrefix:v}=e;return t("div",{class:`${v}-progress-content`,role:"none"},t("div",{class:`${v}-progress-graph`,"aria-hidden":!0},t("div",{class:[`${v}-progress-graph-line`,{[`${v}-progress-graph-line--indicator-${s}`]:!0}]},t("div",{class:`${v}-progress-graph-line-rail`,style:[{backgroundColor:u,height:r.value,borderRadius:i.value},c]},t("div",{class:[`${v}-progress-graph-line-fill`,k&&`${v}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,backgroundColor:p,height:r.value,lineHeight:r.value,borderRadius:o.value}},s==="inside"?t("div",{class:`${v}-progress-graph-line-indicator`,style:{color:a}},d,l):null)))),y&&s==="outside"?t("div",null,n.default?t("div",{class:`${v}-progress-custom-content`,style:{color:a},role:"none"},n.default()):f==="default"?t("div",{role:"none",class:`${v}-progress-icon ${v}-progress-icon--as-text`,style:{color:a}},d,l):t("div",{class:`${v}-progress-icon`,"aria-hidden":!0},t(j,{clsPrefix:v},{default:()=>Qe[f]}))):null)}}});const tt={success:t(de,null),error:t(ue,null),warning:t(ce,null),info:t(fe,null)};var rt=A({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:String,railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:n}){function r(i,o,s){const{gapDegree:u,viewBoxWidth:c,strokeWidth:d}=e,l=50,a=0,f=l,y=0,p=2*l,k=50+d/2,v=`M ${k},${k} m ${a},${f}
a ${l},${l} 0 1 1 ${y},${-p}
a ${l},${l} 0 1 1 ${-y},${p}`,B=Math.PI*2*l,D={stroke:s,strokeDasharray:`${i/100*(B-u)}px ${c*8}px`,strokeDashoffset:`-${u/2}px`,transformOrigin:o?"center":void 0,transform:o?`rotate(${o}deg)`:void 0};return{pathString:v,pathStyle:D}}return()=>{const{fillColor:i,railColor:o,strokeWidth:s,offsetDegree:u,status:c,percentage:d,showIndicator:l,indicatorTextColor:a,unit:f,gapOffsetDegree:y,clsPrefix:p}=e,{pathString:k,pathStyle:v}=r(100,0,o),{pathString:B,pathStyle:D}=r(d,u,i),T=100+s;return t("div",{class:`${p}-progress-content`,role:"none"},t("div",{class:`${p}-progress-graph`,"aria-hidden":!0},t("div",{class:`${p}-progress-graph-circle`,style:{transform:y?`rotate(${y}deg)`:void 0}},t("svg",{viewBox:`0 0 ${T} ${T}`},t("g",null,t("path",{class:`${p}-progress-graph-circle-rail`,d:k,"stroke-width":s,"stroke-linecap":"round",fill:"none",style:v})),t("g",null,t("path",{class:[`${p}-progress-graph-circle-fill`,d===0&&`${p}-progress-graph-circle-fill--empty`],d:B,"stroke-width":s,"stroke-linecap":"round",fill:"none",style:D}))))),l?t("div",null,n.default?t("div",{class:`${p}-progress-custom-content`,role:"none"},n.default()):c!=="default"?t("div",{class:`${p}-progress-icon`,"aria-hidden":!0},t(j,{clsPrefix:p},{default:()=>tt[c]})):t("div",{class:`${p}-progress-text`,style:{color:a},role:"none"},t("span",{class:`${p}-progress-text__percentage`},d),t("span",{class:`${p}-progress-text__unit`},f))):null)}}});function oe(e,n,r=100){return`m ${r/2} ${r/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}var it=A({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:n}){const r=R(()=>e.percentage.map((o,s)=>`${Math.PI*o/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*s)-e.circleGap*s)*2}, ${e.viewBoxWidth*8}`));return()=>{const{viewBoxWidth:i,strokeWidth:o,circleGap:s,showIndicator:u,fillColor:c,railColor:d,railStyle:l,percentage:a,clsPrefix:f}=e;return t("div",{class:`${f}-progress-content`,role:"none"},t("div",{class:`${f}-progress-graph`,"aria-hidden":!0},t("div",{class:`${f}-progress-graph-circle`},t("svg",{viewBox:`0 0 ${i} ${i}`},a.map((y,p)=>t("g",{key:p},t("path",{class:`${f}-progress-graph-circle-rail`,d:oe(i/2-o/2*(1+2*p)-s*p,o,i),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:d[p]},l[p]]}),t("path",{class:[`${f}-progress-graph-circle-fill`,y===0&&`${f}-progress-graph-circle-fill--empty`],d:oe(i/2-o/2*(1+2*p)-s*p,o,i),"stroke-width":o,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:r.value[p],strokeDashoffset:0,stroke:c[p]}})))))),u&&n.default?t("div",null,t("div",{class:`${f}-progress-text`},n.default())):null)}}});const nt=Object.assign(Object.assign({},Q.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number});var ot=A({name:"Progress",props:nt,setup(e){const n=R(()=>e.indicatorPlacement||e.indicatorPosition),r=R(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:i,inlineThemeDisabled:o}=ge(e),s=Q("Progress","-progress",Je,Te,e,i),u=R(()=>{const{status:d}=e,{common:{cubicBezierEaseInOut:l},self:{fontSize:a,fontSizeCircle:f,railColor:y,railHeight:p,iconSizeCircle:k,iconSizeLine:v,textColorCircle:
display: block;
`)]),C("drag-over",[h("upload-dragger",`
border: var(--n-dragger-border-hover);
`)])]),h("upload-dragger",`
cursor: pointer;
box-sizing: border-box;
width: 100%;
text-align: center;
border-radius: var(--n-border-radius);
padding: 24px;
opacity: 1;
transition:
opacity .3s var(--n-bezier),
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier);
background-color: var(--n-dragger-color);
border: var(--n-dragger-border);
`,[L("&:hover",`
border: var(--n-dragger-border-hover);
`),C("disabled",`
cursor: not-allowed;
`)]),h("upload-trigger",`
display: inline-block;
box-sizing: border-box;
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[L("+",[h("upload-file-list","margin-top: 8px;")]),C("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`),C("image-card",`
width: 96px;
height: 96px;
`,[h("base-icon",`
font-size: 24px;
`),h("upload-dragger",`
padding: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
`)])]),h("upload-file-list",`
line-height: var(--n-line-height);
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[L("a, img","outline: none;"),C("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`,[h("upload-file","cursor: not-allowed;")]),C("grid",`
display: grid;
grid-template-columns: repeat(auto-fill, 96px);
grid-gap: 8px;
margin-top: 0;
`),h("upload-file",`
display: block;
box-sizing: border-box;
cursor: default;
padding: 0px 12px 0 6px;
transition: background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
`,[re(),h("progress",[re({foldPadding:!0})]),L("&:hover",`
background-color: var(--n-item-color-hover);
`,[h("upload-file-info",[U("action",`
opacity: 1;
`)])]),C("image-type",`
border-radius: var(--n-border-radius);
text-decoration: underline;
text-decoration-color: #0000;
`,[h("upload-file-info",`
padding-top: 0px;
padding-bottom: 0px;
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
`,[h("progress",`
padding: 2px 0;
margin-bottom: 0;
`),U("name",`
padding: 0 8px;
`),U("thumbnail",`
width: 32px;
height: 32px;
font-size: 28px;
display: flex;
justify-content: center;
align-items: center;
`,[L("img",`
width: 100%;
`)])])]),C("text-type",[h("progress",`
box-sizing: border-box;
padding-bottom: 6px;
margin-bottom: 6px;
`)]),C("image-card-type",`
position: relative;
width: 96px;
height: 96px;
border: var(--n-item-border-image-card);
border-radius: var(--n-border-radius);
padding: 0;
display: flex;
align-items: center;
justify-content: center;
transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
overflow: hidden;
`,[h("progress",`
position: absolute;
left: 8px;
bottom: 8px;
right: 8px;
width: unset;
`),h("upload-file-info",`
padding: 0;
width: 100%;
height: 100%;
`,[U("thumbnail",`
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 36px;
`,[L("img",`
width: 100%;
`)])]),L("&::before",`
position: absolute;
z-index: 1;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-radius: inherit;
opacity: 0;
transition: opacity .2s var(--n-bezier);
content: "";
`),L("&:hover",[L("&::before","opacity: 1;"),h("upload-file-info",[U("thumbnail","opacity: .12;")])])]),C("error-status",[L("&:hover",`
background-color: var(--n-item-color-hover-error);
`),h("upload-file-info",[U("name","color: var(--n-item-text-color-error);"),U("thumbnail","color: var(--n-item-text-color-error);")]),C("image-card-type",`
border: var(--n-item-border-image-card-error);
`)]),C("with-url",`
cursor: pointer;
`,[h("upload-file-info",[U("name",`
color: var(--n-item-text-color-success);
text-decoration-color: var(--n-item-text-color-success);
`,[L("a",`
text-decoration: underline;
`)])])]),h("upload-file-info",`
position: relative;
padding-top: 6px;
padding-bottom: 6px;
display: flex;
flex-wrap: nowrap;
`,[U("thumbnail",`
font-size: 18px;
opacity: 1;
transition: opacity .2s var(--n-bezier);
color: var(--n-item-icon-color);
`,[h("base-icon",`
margin-right: 2px;
vertical-align: middle;
transition: color .3s var(--n-bezier);
`)]),U("action",`
padding-top: inherit;
padding-bottom: inherit;
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 80px;
display: flex;
align-items: center;
transition: opacity .2s var(--n-bezier);
justify-content: flex-end;
opacity: 0;
`,[h("button",[L("&:not(:last-child)",{marginRight:"4px"}),h("base-icon",[L("svg",[Ne()])])]),C("image-type",`
position: relative;
max-width: 80px;
width: auto;
`),C("image-card-type",`
z-index: 2;
position: absolute;
width: 100%;
height: 100%;
left: 0;
right: 0;
bottom: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
`)]),U("name",`
color: var(--n-item-text-color);
flex: 1;
display: flex;
justify-content: center;
text-overflow: ellipsis;
overflow: hidden;
flex-direction: column;
text-decoration-color: #0000;
font-size: var(--n-font-size);
transition:
color .3s var(--n-bezier),
text-decoration-color .3s var(--n-bezier);
`,[L("a",`
color: inherit;
text-decoration: underline;
`)])])])]),h("upload-file-input",`
display: block;
width: 0;
height: 0;
opacity: 0;
`)]),se=globalThis&&globalThis.__awaiter||function(e,n,r,i){function o(s){return s instanceof r?s:new r(function(u){u(s)})}return new(r||(r=Promise))(function(s,u){function c(a){try{l(i.next(a))}catch(f){u(f)}}function d(a){try{l(i.throw(a))}catch(f){u(f)}}function l(a){a.done?s(a.value):o(a.value).then(c,d)}l((i=i.apply(e,n||[])).next())})};function xt(e,n,r){const{doChange:i,xhrMap:o}=e;let s=0;function u(d){var l;let a=Object.assign({},n,{status:"error",percentage:s});o.delete(n.id),a=X(((l=e.onError)===null||l===void 0?void 0:l.call(e,{file:a,event:d}))||a),i(a,d)}function c(d){var l;if(e.isErrorState){if(e.isErrorState(r)){u(d);return}}else if(r.status<200||r.status>=300){u(d);return}let a=Object.assign({},n,{status:"finished",percentage:s});o.delete(n.id),a=X(((l=e.onFinish)===null||l===void 0?void 0:l.call(e,{file:a,event:d}))||a),i(a,d)}return{handleXHRLoad:c,handleXHRError:u,handleXHRAbort(d){const l=Object.assign({},n,{status:"removed",file:null,percentage:s});o.delete(n.id),i(l,d)},handleXHRProgress(d){const l=Object.assign({},n,{status:"uploading"});if(d.lengthComputable){const a=Math.ceil(d.loaded/d.total*100);l.percentage=a,s=a}i(l,d)}}}function Ct(e){const{inst:n,file:r,data:i,headers:o,withCredentials:s,action:u,customRequest:c}=e,{doChange:d}=e.inst;let l=0;c({file:r,data:i,headers:o,withCredentials:s,action:u,onProgress(a){const f=Object.assign({},r,{status:"uploading"}),y=a.percent;f.percentage=y,l=y,d(f)},onFinish(){var a;let f=Object.assign({},r,{status:"finished",percentage:l});f=X(((a=n.onFinish)===null||a===void 0?void 0:a.call(n,{file:f}))||f),d(f)},onError(){var a;let f=Object.assign({},r,{status:"error",percentage:l});f=X(((a=n.onError)===null||a===void 0?void 0:a.call(n,{file:f}))||f),d(f)}})}function Rt(e,n,r){const i=xt(e,n,r);r.onabort=i.handleXHRAbort,r.onerror=i.handleXHRError,r.onload=i.handleXHRLoad,r.upload&&(r.upload.onprogress=i.handleXHRProgress)}function xe(e,n){return typeof e=="function"?e({file:n}):e||{}}function kt(e,n,r){const i=xe(n,r);!i||Object.keys(i).forEach(o=>{e.setRequestHeader(o,i[o])})}function Bt(e,n,r){const i=xe(n,r);!i||Object.keys(i).forEach(o=>{e.append(o,i[o])})}function Pt(e,n,r,{method:i,action:o,withCredentials:s,responseType:u,headers:c,data:d}){const l=new XMLHttpRequest;l.responseType=u,e.xhrMap.set(r.id,l),l.withCredentials=s;const a=new FormData;if(Bt(a,d,r),a.append(n,r.file),Rt(e,r,l),o!==void 0){l.open(i.toUpperCase(),o),kt(l,c,r),l.send(a);const f=Object.assign({},r,{status:"uploading"});e.doChange(f)}}const Tt=Object.assign(Object.assign({},Q.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>st?ye(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object});var St=A({name:"Upload",props:Tt,setup(e){e.abstract&&e.listType==="image-card"&&ee("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:n,inlineThemeDisabled:r}=ge(e),i=Q("Upload","-upload",wt,Ee,e,n),o=Me(e),s=R(()=>{const{max:g}=e;return g!==void 0?p