import{CasQ,a6asce,Jaske,a8asfe,basN,Rasf,a5asV,aUash,dasq,aWasEe,aasK,oasb,easU,wasF,casT,Maswe,adasRe,tasx,faso,nasg,has$,gask,qasA,aLasB,sasS,EasD,a_asPe,aaasY,alas$e,a$asFe,b0asCe,b1asSe,b2asTe,b3asLe,b4asUe,yaspe,jasG,BasBe,aQasW,b5asZ,b6asDe,b7asOe,b8asje,Dasee,aKasAe,b9asKe,PasNe,Hasqe,aXaste,Yasae,FasMe,a9asHe,las_e}from"./index-Bh7OCVQ6.js";import{casM}from"./index-DX856o1n.js";import{Easze}from"./el-progress-C9JvFucC.js";import{fasse}from"./index-kerXeogY.js";import{casoe}from"./el-form-item-Cnd30Gmc.js";constIe="ElUpload";varXe=classextendsError{constructor(t,i,n,d){super(t),this.name="UploadAjaxError",this.status=i,this.method=n,this.url=d}};functionne(t,i,n){letd;returnn.response?d=`${n.response.error||n.response}`:n.responseText?d=`${n.responseText}`:d=`fail to ${i.method}${t}${n.status}`,newXe(d,n.status,i.method,t)}functionVe(t){consti=t.responseText||t.response;if(!i)returni;try{returnJSON.parse(i)}catch{returni}}constxe=t=>{typeofXMLHttpRequest>"u"&&Q(Ie,"XMLHttpRequest is undefined");consti=newXMLHttpRequest,n=t.action;i.upload&&i.upload.addEventListener("progress",r=>{constu=r;u.percent=r.total>0?r.loaded/r.total*100:0,t.onProgress(u)});constd=newFormData;if(t.data)for(const[r,u]ofObject.entries(t.data))ce(u)?u.length===2&&u[0]instanceofBlob&&ke(u[1])?d.append(r,u[0],u[1]):u.forEach(w=>{d.append(r,w)}):d.append(r,u);d.append(t.filename,t.file,t.file.name),i.addEventListener("error",()=>{t.onError(ne(n,t,i))}),i.addEventListener("load",()=>{if(i.status<200||i.status>=300)returnt.onError(ne(n,t,i));t.onSuccess(Ve(i))}),i.open(t.method,n,!0),t.withCredentials&&"withCredentials"ini&&(i.withCredentials=!0);constp=t.headers||{};if(pinstanceofHeaders)p.forEach((r,u)=>i.setRequestHeader(u,r));elsefor(const[r,u]ofObject.entries(p))fe(u)||i.setRequestHeader(r,String(u));returni.send(d),i},ve=["text","picture","picture-card"];letGe=1;constJ=()=>Date.now()+Ge++,ye=N({action:{type:String,default:"#"},headers:{type:f(Object)},method:{type:String,default:"post"},data:{type:f([Object,Function,Promise]),default:()=>V({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:f(Array),default:()=>V([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:ve,default:"text"},httpRequest:{type:f(Function),default:xe},disabled:{type:Boolean,default:void0},limit:Number,directory:Boolean}),We=N({...ye,beforeUpload:{type:f(Function),default:h},beforeRemove:{type:f(Function)},onRemove:{type:f(Function),default:h},onChange:{type:f(Function),default:h},onPreview:{type:f(Function),default:h},onSuccess:{type:f(Function),default:h},onProgress:{type:f(Function),default:h},onError:{type:f(Function),default:h},onExceed:{type:f(Function),default:h},crossorigin:{type:f(String)}}),me=Symbol("uploadContextKey"),Je=N({files:{type:f(Array),default:()=>V([])},disabled:{type:Boolean,default:void0},handlePreview:{type:f(Function),default:h},listType:{type:String,values:ve,default:"text"},crossorigin:{type:f(String)}}),Qe={remove:t=>!!t},Ye=N({...ye,beforeUpload:{type:f(Function),default:h},onRemove:{type:f(Function),default:h},onStart:{type:f(Function),default:h},onSuccess:{type:f(Function),default:h},onProgress:{type:f(Function),default:h},onError:{type:f(Function),default:h},onExceed:{type:f(Function),default:h}}),Ze=N({disabled:{type:Boolean,default:void0},directory:Boolean}),et={file:t=>ce(t)},tt=["tabindex","aria-disabled","onKeydown"],at=["src","crossorigin"],st=["onClick"],ot=["title"],nt=["onClick"],lt=["onClick"];varrt=q({name:"ElUploadList",__name:"upload-list",props:Je,emits:Qe,setup(t,{emit:i}){constn=t,d=i,{t:p}=Ee(),r=K("upload"),u=K("icon"),w=K("list"),y=M(),P=pe(!1),C=G(()=>[r.b("list"),r.bm("list",n.listType),r.is("disabled",y.value)]),E=c=>{d("remove",c)};return(c,v)=>(b(),U(Ue,{tag:"ul",class:g(C.value),name:o(w).b()},{default:F(()=>[(b(!0),T