import{u as ie,r as ue,_ as ce,o as ma,i as La,d as Je,a as Te,j as Ma,k as Ba,C as We,E as Xe}from"./dialog.e118d761.js";import{d as Q,c as d,f as Z,w as ve,t as he,i as $a,n as Ke,o as Qe,aI as l,bC as re,bt as Ta,aK as Fe,bE as pa,by as Ra,bg as Na,bh as Va,bD as Aa,b as Ha,aU as et,h as Ka}from"./arco.7f845a67.js";import{f as Le,af as ha,c as de,w as Se,d as Ee,O as _e,ap as qa,i as ya,e as Be,b as Ze,H as lt}from"./index.d0c9d757.js";import{_ as Pe,b as ot,i as Xa}from"./helper.ab125cae.js";import{u as ge,_ as q,a as ba}from"./useConfig.f1b2a203.js";import{l as we,b as tt,e as Oa,a as Za,h as Ga,d as Ya,C as Ja,B as wa}from"./form-model.48301551.js";import{o as Wa,e as Qa,T as Ge,v as en,w as tn,x as an,f as nn,n as rn,y as ln,l as on,u as un,z as cn,r as sn}from"./dep-6deb4e3a.3e2fa927.js";import{s as vn,L as Re,u as dn,i as fn}from"./index.d9aaa170.js";import{a as gn}from"./slot.696d5493.js";import{_ as oe}from"./dep-83cdf63a.1fe6124c.js";import{L as at}from"./index.e98108d6.js";import{B as pe}from"./index.b5a0fec5.js";import{D as mn}from"./index.b224bfad.js";import{S as it}from"./index.36386460.js";function ut(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ct(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-delete",r.value]),c=d(()=>ct(ct({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(pn,i.value)}});const _a=hn;function st(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function vt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-download",r.value]),c=d(()=>vt(vt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(yn,i.value)}});const On=bn;function dt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ft(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-file-excel",r.value]),c=d(()=>ft(ft({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(wn,i.value)}});const Pn=_n;function gt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function mt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-file-pdf",r.value]),c=d(()=>mt(mt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Cn,i.value)}});const Sn=Fn;function pt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ht(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-file-powerpoint",r.value]),c=d(()=>ht(ht({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(jn,i.value)}});const In=xn;function yt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function bt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-file-word",r.value]),c=d(()=>bt(bt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Dn,i.value)}});const En=Un;function Ot(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function wt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-file",r.value]),c=d(()=>wt(wt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(zn,i.value)}});const Ln=kn;function _t(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Pt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-image-error",r.value]),c=d(()=>Pt(Pt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Mn,i.value)}});const Pa=Bn;function Ct(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Ft(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-image",r.value]),c=d(()=>Ft(Ft({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue($n,i.value)}});const Ca=Tn;function St(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function jt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-mirror",r.value]),c=d(()=>jt(jt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Rn,i.value)}});const Vn=Nn;function xt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function It(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-refresh",r.value]),c=d(()=>It(It({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(An,i.value)}});const Bl=Hn;function Dt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Ut(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-rotation",r.value]),c=d(()=>Ut(Ut({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Kn,i.value)}});const Xn=qn;function Et(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function zt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-time-filled",r.value]),c=d(()=>zt(zt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Zn,i.value)}});const Fa=Gn;function kt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Lt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-upload",r.value]),c=d(()=>Lt(Lt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Yn,i.value)}});const Wn=Jn;function Mt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Bt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-video",r.value]),c=d(()=>Bt(Bt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(Qn,i.value)}});const tr=er;function $t(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Tt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-zoom-in",r.value]),c=d(()=>Tt(Tt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(ar,i.value)}});const rr=nr;function Rt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Nt(t){for(var e=1;et.size),{className:r,style:o}=ie(n),s=d(()=>["t-icon","t-icon-zoom-out",r.value]),c=d(()=>Nt(Nt({},o.value),a.style)),i=d(()=>({class:s.value,style:c.value,onClick:v=>{var u;return(u=t.onClick)===null||u===void 0?void 0:u.call(t,{e:v})}}));return()=>ue(lr,i.value)}});const ir=or;/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var ur=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.svg|.gif|.bmp)/i,cr=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.svg|.gif|.bmp|.dwg|.dxf|.svf|.tif|.tiff|.arw)/i,sr=/(.pdf)/i,vr=/(.xlsx|.xls|.csv|.xlc|.xlm|.xlt|.xlw)/i,dr=/(.dox|docx|.document|.wps|.wdb|.msword)/i,fr=/(.ppt|.pptx|.key)/i,Sa=/(.avi|.mp4|.wmv|.mpg|.mpeg|.mov|.rm|.ram|.swf|.flv|.rmvb|.flash|.mid|.3gp)/i,gr=/(.mp2|.mp3|.mp4|.ogg|.3gpp|.ac3|.au)/i,Vt={"audio/*":gr,"video/*":Sa,"image/*":cr,".ico":/image\/vnd.microsoft.icon/i,".doc":/application\/msword/i,".docx":/application\/vnd.openxmlformats-officedocument.wordprocessingml.document/i,".xls":/application\/vnd.ms-excel/i,".xlsx":/application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet/i,".ppt":/application\/vnd.ms-powerpoint/i,".pptx":/application\/vnd.openxmlformats-officedocument.presentationml.presentation/i,".vsd":/application\/vnd.visio/i,".txt":/text\/plain/i,".abw":/application\/x-abiword/i,".avi":/video\/x-msvideo/i,".azw":/application\/vnd.amazon.ebook/i,".bin":/application\/octet-stream/i,".cda":/application\/x-cdf/i,".mpkg":/application\/vnd.apple.installer+xml/i,".odp":/application\/vnd.oasis.opendocument.presentation/i,".ods":/application\/vnd.oasis.opendocument.spreadsheet/i,".odt":/application\/vnd.oasis.opendocument.text/i,".oga":/audio\/ogg/i,".ogv":/video\/ogg/i,".ogx":/application\/ogg/i},me={B:1,KB:1024,MB:1048576,GB:1073741824};function mr(t){return t=me.KB&&t=me.MB&&t=me.GB?"".concat((t/me.GB).toFixed(1)," GB"):""}function ja(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=new Date,a=e.getMonth()+1;a=a<10?"0".concat(a):a;var n="".concat(e.getFullYear(),"-").concat(a,"-").concat(e.getDate()),r="".concat(e.getHours(),":").concat(e.getMinutes(),":").concat(e.getSeconds());return t?[n,r].join(" "):n}function Ue(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,n=t,r=0,o=0;if(!n)return"";for(var s=0;ss-a&&o=1024&&t<1048576?"".concat((t/1024).toFixed(1)," KB"):t>=1048576?"".concat((t/1048576).toFixed(1)," MB"):""}function hr(t,e,a){var n=["B","KB","MB","GB"],r=1,o=n.indexOf(a);o===-1&&(we.warn("Upload","`sizeLimit.unit` can only be one of ".concat(n.join())),o=r);var s=me[a];return t>e*s}function yr(t){return new Promise(function(e){if(!t){e("");return}var a=new FileReader;a.readAsDataURL(t),a.onload=function(n){var r;e((r=n.target)===null||r===void 0?void 0:r.result)}})}function br(t,e,a){var n=e||a;if(!t)return!0;if(!n)return!1;for(var r=t.split(",").map(function(v){return v.trim()}),o=0,s=r.length;o1&&arguments[1]!==void 0?arguments[1]:"",a=[],n=0;n"u")){var e=window.getComputedStyle(t),a=e.getPropertyValue("box-sizing")||e.getPropertyValue("-moz-box-sizing")||e.getPropertyValue("-webkit-box-sizing"),n=parseFloat(e.getPropertyValue("padding-bottom"))+parseFloat(e.getPropertyValue("padding-top")),r=parseFloat(e.getPropertyValue("border-bottom-width"))+parseFloat(e.getPropertyValue("border-top-width")),o=wr.map(function(s){return"".concat(s,":").concat(e.getPropertyValue(s))}).join(";");return{sizingStyle:o,paddingSize:n,borderSize:r,boxSizing:a}}}function At(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;fe||(fe=document.createElement("textarea"),document.body.appendChild(fe));var n=_r(t),r=n.paddingSize,o=n.borderSize,s=n.boxSizing,c=n.sizingStyle;fe.setAttribute("style","".concat(c,";").concat(Or)),fe.value=t.value||t.placeholder||"";var i=fe.scrollHeight,v={};s==="border-box"?i+=o:s==="content-box"&&(i-=r),fe.value="";var u=fe.scrollHeight-r;if(e!==null){var g=u*e;s==="border-box"&&(g=g+r+o),i=Math.max(g,i),v.minHeight="".concat(g,"px")}if(a!==null){var y=u*a;s==="border-box"&&(y=y+r+o),i=Math.min(y,i)}return v.height="".concat(i,"px"),fe.parentNode&&fe.parentNode.removeChild(fe),fe=null,v}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Pr={allowInputOverMax:{type:Boolean,default:!1},autofocus:Boolean,autosize:{type:[Boolean,Object],default:!1},disabled:Boolean,maxcharacter:{type:Number},maxlength:{type:[Number,String]},name:{type:String,default:""},placeholder:{type:String,default:void 0},readonly:Boolean,status:{type:String,validator:function(e){return["default","success","warning","error"].includes(e)}},tips:{type:[String,Function]},value:{type:[String,Number]},modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Ht(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Cr(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:"",x=I.value,A=String(f);!x||x.value!==A&&(x.value=A,C.value=A)},P=function(f){var x=f.target,A=x.value;if(e.maxcharacter&&e.maxcharacter>=0){var H=ot(A,e.maxcharacter);A=Le(H)==="object"&&H.characters}!k.value&&R(A,{e:f}),Ke(function(){return j(A)}),F()},h=function(f){P(f)},D=function(){k.value=!0},Y=function(f){k.value=!1,P(f)},ee=function(f,x){var A;if(!w.value){var H="on".concat(f[0].toUpperCase()).concat(f.slice(1));(A=e[H])===null||A===void 0||A.call(e,C.value,{e:x})}},X=function(f){ee("keydown",f)},T=function(f){ee("keyup",f)},N=function(f){ee("keypress",f)},B=function(f){var x;F(),!w.value&&(_.value=!0,(x=e.onFocus)===null||x===void 0||x.call(e,C.value,{e:f}))},V=$a(Za,void 0),p=function(f){var x;F(),_.value=!1,(x=e.onBlur)===null||x===void 0||x.call(e,C.value,{e:f}),V==null||V.handleBlur()},U=d(function(){return[s.value,q(q({},"".concat(o.value,"-is-disabled"),w.value),"".concat(o.value,"-is-readonly"),e.readonly)]}),$=d(function(){return Kt({autofocus:e.autofocus,disabled:w.value,readonly:e.readonly,placeholder:e.placeholder,maxlength:!e.allowInputOverMax&&e.maxlength||void 0,name:e.name||void 0})}),J=d(function(){var O=ot(String(C.value||""));return Le(O)==="object"?O.length:O}),W=d(function(){return{value:[void 0,null].includes(C.value)?void 0:String(C.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}),E=Ga(W),z=E.tStatus;ve(function(){return C.value},function(){return F()}),ve(I,function(O){!O||F()}),ve(function(){return e.autofocus},function(O){O&&I.value.focus()}),ve(M,function(O){var f=n.style;vn(I.value,ha(f,O))}),ve(C,function(){Ke(function(){return F()})}),ve(function(){return e.autosize},F,{deep:!0}),r({focus:S,blur:b}),Qe(function(){F()});var L=de();return function(){var O,f=Kt({onFocus:B,onBlur:p,onKeydown:X,onKeyup:T,onKeypress:N}),x=ba(),A=x.STATUS,H=d(function(){return["".concat(s.value,"__inner"),q(q(q(q({},"".concat(o.value,"-is-").concat(z.value),z.value),A.value.disabled,w.value),A.value.focused,_.value),"".concat(o.value,"-resize-none"),Le(e.autosize)==="object"),"narrow-scrollbar"]}),K=L("tips"),ae=K&&l("div",{class:"".concat(c.value," ").concat(s.value,"__tips--").concat(e.status||"normal")},[K]),le=e.maxcharacter&&l("span",{class:i.value},["".concat(J.value,"/").concat(e.maxcharacter)])||!e.maxcharacter&&e.maxlength&&l("span",{class:i.value},["".concat(C.value?(O=String(C.value))===null||O===void 0?void 0:O.length:0,"/").concat(e.maxlength)]);return l("div",re({class:U.value},Wa(n,["style"])),[l("textarea",re({onInput:h,onCompositionstart:D,onCompositionend:Y,ref:I,value:C.value,class:H.value},f,$.value),null),ae||le?l("div",{class:["".concat(s.value,"__info_wrapper"),q({},"".concat(s.value,"__info_wrapper_align"),!ae)]},[ae,le]):null])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var $l=Se(Fr);/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Sr={alt:{type:String,default:""},error:{type:[String,Function]},fallback:{type:String,default:""},fit:{type:String,default:"fill",validator:function(e){return e?["contain","cover","fill","none","scale-down"].includes(e):!0}},gallery:Boolean,lazy:Boolean,loading:{type:[String,Function]},overlayContent:{type:[String,Function]},overlayTrigger:{type:String,default:"always",validator:function(e){return e?["always","hover"].includes(e):!0}},placeholder:{type:[String,Function]},position:{type:String,default:"center"},referrerpolicy:{type:String,default:"strict-origin-when-cross-origin",validator:function(e){return e?["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"].includes(e):!0}},shape:{type:String,default:"square",validator:function(e){return e?["circle","round","square"].includes(e):!0}},src:{type:[String,Object]},srcset:{type:Object},onError:Function,onLoad:Function};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var jr=Q({name:"TImage",props:Sr,setup:function(e){var a=Z(null),n=Z(null),r=null,o=he(e),s=o.src,c=de();Qe(function(){var T;if((T=n.value)!==null&&T!==void 0&&T.complete&&!e.lazy&&I(),!(!e.lazy||!a.value)){var N=Qa(a.value,null,R,0);r=N}}),Ta(function(){a.value&&r&&r.unobserve(a.value)});var i=Ee("image"),v=i.classPrefix,u=i.globalConfig,g=Z(s.value);ve([s,u],function(T){var N=Pe(T,2),B=N[0],V=N[1],p=V||{},U=p.replaceImageSrc,$=_e(U)?U(e):B;$===g.value&&g.value||(g.value=$)},{immediate:!0});var y=qe(g),m=y.previewUrl;ve([m],function(){_.value=!1,w.value=!1});var C=Z(!e.lazy),R=function(){C.value=!0},w=Z(!1),M=function(N){var B;w.value=!0,(B=e.onLoad)===null||B===void 0||B.call(e,{e:N})},I=function(){var N=new Event("load");Object.defineProperty(N,"target",{value:n.value,enumerable:!0}),M(N)},_=Z(!1),k=function(N){var B;_.value=!0,(B=e.onError)===null||B===void 0||B.call(e,{e:N}),e.fallback&&(g.value=e.fallback,_.value=!1)},S=d(function(){return e.overlayTrigger==="hover"}),b=d(function(){return["".concat(v.value,"-image"),"".concat(v.value,"-image--fit-").concat(e.fit),"".concat(v.value,"-image--position-").concat(e.position)]}),F=Z(!S.value),j=function(){S.value&&(F.value=!F.value)},P=function(){var N=c("placeholder");return N?l("div",{class:"".concat(v.value,"-image__placeholder")},[N]):null},h=function(){return e.gallery?l("div",{class:"".concat(v.value,"-image__gallery-shadow")},null):null},D=function(){var N=X("overlayContent");return N?l("div",{class:["".concat(v.value,"-image__overlay-content"),!F.value&&"".concat(v.value,"-image__overlay-content--hidden")]},[N]):null};function Y(){return l("picture",null,[Object.entries(e.srcset).map(function(T){var N=Pe(T,2),B=N[0],V=N[1];return l("source",{type:B,srcset:V},null)}),ee()])}function ee(){var T=typeof g.value=="string"?g.value:m.value;return l("img",{ref:n,src:T,onError:k,onLoad:M,class:b.value,alt:e.alt,referrerpolicy:e.referrerpolicy},null)}var X=qa();return function(){return l("div",re({ref:a,class:["".concat(v.value,"-image__wrapper"),"".concat(v.value,"-image__wrapper--shape-").concat(e.shape),e.gallery&&"".concat(v.value,"-image__wrapper--gallery"),S.value&&"".concat(v.value,"-image__wrapper--need-hover")],onMouseenter:j,onMouseleave:j},ma(e,["src","alt","fit","position","shape","placeholder","loading","error","overlayTrigger","overlayContent","lazy","gallery","onLoad","onError"])),[P(),h(),(_.value||!C.value)&&l("div",{class:"".concat(v.value,"-image")},null),!(_.value||!C.value)&&(e.srcset&&Object.keys(e.srcset).length?Y():ee()),!(_.value||!C.value)&&!w.value&&l("div",{class:"".concat(v.value,"-image__loading")},[c("loading")||l(it,{direction:"vertical",size:8,align:"center"},{default:function(){return[l(Ca,{size:"24px"},null),typeof e.loading=="string"?e.loading:u.value.loadingText]}})]),_.value&&l("div",{class:"".concat(v.value,"-image__error")},[X("error",{defaultNode:l(it,{direction:"vertical",size:8,align:"center"},{default:function(){return[l(Pa,{size:"24px"},null),typeof e.error=="string"?e.error:u.value.errorText]}})})]),D()])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var $e=Se(jr);/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Me={closeBtn:{type:[Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:!0},closeOnOverlay:Boolean,draggable:{type:Boolean,default:void 0},imageScale:{type:Object},images:{type:Array,default:function(){return[]}},index:{type:Number,default:void 0},defaultIndex:{type:Number,default:0},mode:{type:String,default:"modal",validator:function(e){return e?["modal","modeless"].includes(e):!0}},navigationArrow:{type:[Boolean,Function],default:!0},showOverlay:{type:Boolean,default:void 0},title:{type:[String,Function]},trigger:{type:[String,Function]},viewerScale:{type:Object},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onClose:Function,onIndexChange:Function};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Oe=Q({name:"TImageModalIcon",props:{disabled:Boolean,onClick:Function,label:String,icon:Function},setup:function(e){var a=ge(),n=de(),r=d(function(){return["".concat(a.value,"-image-viewer__modal-icon"),q({},"".concat(a.value,"-is-disabled"),e.disabled)]});return function(){return l("div",{class:r.value,onClick:e.onClick},[n("icon"),e.label&&l("span",{class:"".concat(a.value,"-image-viewer__modal-icon-label")},[e.label])])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function qt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function xr(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{max:2,min:.5,step:.5},e=t.max,a=t.min,n=t.step,r=t.defaultScale,o=Z(r!=null?r:1),s=function(){var g=tn(o.value,n);v(g)},c=function(){var g=an(o.value,n);v(g)},i=function(){o.value=r!=null?r:1},v=function(g){var y=g;ge&&(y=e),o.value=y};return ve(function(){return t},function(){return i()}),{scale:o,onZoomIn:s,onZoomOut:c,resetScale:i}}function Br(){var t=Z(0),e=90,a=function(){t.value+=e},n=function(){t.value=0};return{rotate:t,onRotate:a,resetRotate:n}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Da=Q({name:"TImageItem",props:{rotate:Number,scale:Number,mirror:Number,src:[String,Object],placementSrc:[String,Object]},setup:function(e){var a=he(e),n=a.src,r=a.placementSrc,o=ge(),s=Z(!1),c=Z(!1),i=kr({translateX:0,translateY:0}),v=i.transform,u=i.mouseDownHandler,g=Ee("imageViewer"),y=g.globalConfig,m=y.value.errorText,C=d(function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:!e.placementSrc||c.value?"block":"none"}}),R=d(function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:c.value?"none":"block"}}),w=d(function(){var b=v.value,F=b.translateX,j=b.translateY;return{transform:"translate(".concat(F,"px, ").concat(j,"px) scale(").concat(e.mirror,", 1)")}}),M=function(){s.value=!1,c.value=!1},I=qe(n),_=I.previewUrl,k=qe(r),S=k.previewUrl;return ve([_,S],function(){M()}),function(){return l("div",{class:"".concat(o.value,"-image-viewer__modal-pic")},[l("div",{class:"".concat(o.value,"-image-viewer__modal-box"),style:w.value},[s.value&&l("div",{class:"".concat(o.value,"-image-viewer__img-error")},[l("div",{class:"".concat(o.value,"-image-viewer__img-error-content")},[l(Pa,{size:"4em"},null),l("div",{class:"".concat(o.value,"-image-viewer__img-error-text")},[m])])]),!s.value&&!!e.placementSrc&&S.value&&l("img",{class:"".concat(o.value,"-image-viewer__modal-image"),onMousedown:function(F){F.stopPropagation(),u(F)},src:S.value,style:R.value,alt:"image",draggable:"false"},null),!s.value&&_.value&&l("img",{class:"".concat(o.value,"-image-viewer__modal-image"),onMousedown:function(F){F.stopPropagation(),u(F)},src:_.value,onLoad:function(){return c.value=!0},onError:function(){return s.value=!0},style:C.value,alt:"image",draggable:"false"},null)])])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var $r=Q({name:"TImageViewerModal",props:{zIndex:Number,visible:Boolean,index:Number,images:Me.images,scale:Number,rotate:Number,mirror:Number,title:Me.title,currentImage:{type:Object,default:function(){return{}}},onRotate:Function,onZoomIn:Function,onZoomOut:Function,onMirror:Function,onReset:Function,onClose:Me.onClose,draggable:{type:Boolean,default:!0},viewerScale:{type:Object,default:function(){return{}}},showOverlay:Boolean,closeBtn:Me.closeBtn},setup:function(e){var a=ge(),n=de(),r=d(function(){return{minWidth:e.viewerScale.minWidth,minHeight:e.viewerScale.minHeight}});return function(){return l(mn,{destroyOnClose:!0,attach:"body",onClose:e.onClose,visible:e.visible,placement:"center",mode:"modeless",width:1e3,cancelBtn:null,confirmBtn:null,draggable:e.draggable,zIndex:e.zIndex,showOverlay:e.showOverlay,class:"".concat(a.value,"-image-viewer__dialog"),header:n("title",""),footer:function(){return l("div",{class:"".concat(a.value,"-image-viewer-mini__footer")},[l(Ia,{onZoomIn:e.onZoomIn,onZoomOut:e.onZoomOut,scale:e.scale,currentImage:e.currentImage,onRotate:e.onRotate,onMirror:e.onMirror,onReset:e.onReset},null)])}},{default:function(){return[l("div",{class:"".concat(a.value,"-image-viewer-mini__content"),style:r.value},[l(Da,{rotate:e.rotate,scale:e.scale,mirror:e.mirror,src:e.currentImage.mainImage,placementSrc:e.currentImage.thumbnail},null)])]}})}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var De=function(t){return t.left="ArrowLeft",t.up="ArrowUp",t.right="ArrowRight",t.down="ArrowDown",t.esc="Escape",t}(De||{});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Zt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Tr(t){for(var e=1;e=E.value.length?C.value:G,{trigger:"next"})},A=function(G){R(G,{trigger:"current"})},H=function(){_(!0)},K=function(G){var ne;_(!1),(ne=e.onClose)===null||ne===void 0||ne.call(e,G)},ae=function(G){K({e:G,trigger:"close-btn"})},le=function(G){e.closeOnOverlay&&K({e:G,trigger:"overlay"})},ye=function(G){switch(G.stopPropagation(),G.code){case De.left:f();break;case De.right:x();break;case De.up:N();break;case De.down:B();break;case De.esc:e.closeOnEscKeydown&&O()&&K({e:G,trigger:"esc"});break}},Ce=Z();ve(function(){return I.value},function(te){clearTimeout(S.value),te?(k.value=!1,Ke().then(function(){var G,ne;(G=Ce.value)===null||G===void 0||(ne=G.focus)===null||ne===void 0||ne.call(G)}),W()):S.value=setTimeout(function(){k.value=!0},200)});var be=function(G){G.preventDefault();var ne=G.deltaY;ne>0?B():N()},je=d(function(){return{transform:"translateX(calc(-".concat(C.value," * (40px / 9 * 16 + 4px)))")}}),ze=function(){return l("div",{class:F.value},[l(Oe,{icon:function(){return l(rn,null,null)},class:"".concat(r.value,"__header-pre-bt"),onClick:P},null),l("div",{class:"".concat(r.value,"__header-prev")},[l("div",{class:"".concat(r.value,"__header-trans"),style:je.value},[E.value.map(function(G,ne){return l("div",{key:ne,class:["".concat(r.value,"__header-box"),q({},"".concat(n.value,"-is-active"),ne===C.value)]},[l($e,{src:G.thumbnail||G.mainImage,error:"",className:"".concat(r.value,"__header-img"),onClick:function(){return A(ne)}},null)])})])])])},xe=function(G){var ne=G==="prev"?0:180,Ie=o("navigationArrow",l(ln,{style:{transform:"rotate(".concat(ne,"deg)")},size:"24px"},null));return l(Oe,{class:"".concat(r.value,"__modal-").concat(G,"-bt"),onClick:G==="prev"?f:x,icon:function(){return Ie}},null)},ke=function(){if(e.closeBtn!==!1)return l("div",{class:["".concat(r.value,"__modal-icon"),"".concat(r.value,"__modal-close-bt")],onClick:ae},[o("closeBtn",l(Je,{size:"24px"},null))])};return function(){return e.mode==="modeless"?l(Fe,null,[o("trigger",{params:{open:H}}),l($r,{zIndex:j.value,visible:I.value,index:C.value,images:E.value,scale:T.value,rotate:U.value,mirror:D.value,currentImage:z.value,onRotate:$,onZoomIn:N,onZoomOut:B,onMirror:Y,onReset:W,onClose:K,draggable:e.draggable,showOverlay:c.value,title:e.title},null)]):l(Fe,null,[o("trigger",{params:{open:H}}),l(pa,{to:"body"},{default:function(){return[l(Ra,null,{default:function(){return[(I.value||!k.value)&&Na(l("div",{ref:Ce,class:b.value,style:{zIndex:j.value},onWheel:be,tabindex:-1,onKeydown:ye},[!!c.value&&l("div",{class:"".concat(r.value,"__modal-mask"),onClick:le},null),E.value.length>1&&l(Fe,null,[ze(),l("div",{class:"".concat(r.value,"__modal-index")},[e.title&&o("title"),"".concat(C.value+1,"/").concat(E.value.length)]),xe("prev"),xe("next")]),ke(),l(Ia,{onZoomIn:N,onZoomOut:B,onMirror:Y,onReset:W,onRotate:$,scale:T.value,currentImage:z.value},null),l(Da,{scale:T.value,rotate:U.value,mirror:D.value,src:z.value.mainImage,placementSrc:z.value.thumbnail},null)]),[[Va,I.value]])]}})]}})])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var nt=Se(Rr);/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Ua={asyncLoading:{type:[String,Function]},footer:{type:[String,Function]},header:{type:[String,Function]},layout:{type:String,default:"horizontal",validator:function(e){return e?["horizontal","vertical"].includes(e):!0}},scroll:{type:Object},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},split:Boolean,stripe:Boolean,onLoadMore:Function,onScroll:Function};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Ea=Q({name:"TListItem",props:Ua,setup:function(){var e=ge("list-item"),a=de();return function(){var n=a("content"),r=a("default"),o=a("action");return l("li",{class:e.value},[l("div",{class:"".concat(e.value,"-main")},[r||n,o&&l("li",{class:"".concat(e.value,"__action")},[o])])])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Gt="load-more",Nr="loading";/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Yt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Jt(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(v){throw v},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,c;return{s:function(){a=a.call(t)},n:function(){var v=a.next();return o=v.done,v},e:function(v){s=!0,c=v},f:function(){try{!o&&a.return!=null&&a.return()}finally{if(s)throw c}}}}function Ar(t,e){if(!!t){if(typeof t=="string")return Wt(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);if(a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set")return Array.from(t);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Wt(t,e)}}function Wt(t,e){(e==null||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);adocument.documentElement.clientHeight,z=E?Ba():0;o.value=document.createElement("style"),o.value.dataset.id="td_drawer_".concat(+new Date,"_").concat(Wr+=1),o.value.innerHTML=` html body { overflow-y: hidden; transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s; `.concat(e.mode==="push"?"":"width: calc(100% - ".concat(z,"px);"),` } `),r.value&&!e.showInAttachedElement&&e.preventScrollThrough&&document.head.appendChild(o.value),window.addEventListener("keydown",N)}),Ha(function(){B(),window.removeEventListener("keydown",N)}),function(){if(!n.value){var E=y("body","default"),z=g("header"),L=U();return l(pa,{disabled:!e.attach||!I.value,to:I.value},{default:function(){return[l("div",re({ref:j,class:P.value,style:{zIndex:e.zIndex},onKeydown:N,tabindex:0},a.attrs),[e.showOverlay&&l("div",{class:"".concat(m.value,"__mask"),onClick:J},null),l("div",{class:Y.value,style:D.value},[z&&l("div",{class:"".concat(m.value,"__header")},[z]),e.closeBtn&&l("div",{class:"".concat(m.value,"__close-btn"),onClick:$},[g("closeBtn",l(u,null,null))]),l("div",{class:["".concat(m.value,"__body"),"narrow-scrollbar"]},[E]),e.footer&&l("div",{class:"".concat(m.value,"__footer")},[g("footer",L)]),e.sizeDraggable&&l("div",{style:M.value,onMousedown:w},null)])])]}})}}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Nl=Se(Qr);/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var el={abridgeName:{type:Array},accept:{type:String,default:""},action:{type:String,default:""},allowUploadDuplicateFile:Boolean,autoUpload:{type:Boolean,default:!0},beforeAllFilesUpload:{type:Function},beforeUpload:{type:Function},cancelUploadButton:{type:[Object,Function]},data:{type:Object},default:{type:[String,Function]},disabled:Boolean,dragContent:{type:[String,Function]},draggable:{type:Boolean,default:void 0},fileListDisplay:{type:Function},files:{type:Array,default:void 0},defaultFiles:{type:Array,default:function(){return[]}},format:{type:Function},formatRequest:{type:Function},formatResponse:{type:Function},headers:{type:Object},imageViewerProps:{type:Object},inputAttributes:{type:Object},isBatchUpload:Boolean,locale:{type:Object},max:{type:Number,default:0},method:{type:String,default:"POST",validator:function(e){return e?["POST","GET","PUT","OPTION","PATCH","post","get","put","option","patch"].includes(e):!0}},mockProgressDuration:{type:Number},multiple:Boolean,name:{type:String,default:"file"},placeholder:{type:String,default:""},requestMethod:{type:Function},showImageFileName:{type:Boolean,default:!0},showThumbnail:Boolean,showUploadProgress:{type:Boolean,default:!0},sizeLimit:{type:[Number,Object]},status:{type:String,validator:function(e){return e?["default","success","warning","error"].includes(e):!0}},theme:{type:String,default:"file",validator:function(e){return e?["custom","file","file-input","file-flow","image","image-flow"].includes(e):!0}},tips:{type:[String,Function]},trigger:{type:Function},triggerButtonProps:{type:Object},uploadAllFilesInOneRequest:Boolean,uploadButton:{type:[Object,Function]},uploadPastedFiles:{type:Boolean,default:!0},useMockProgress:{type:Boolean,default:!0},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},withCredentials:Boolean,onCancelUpload:Function,onChange:Function,onDragenter:Function,onDragleave:Function,onDrop:Function,onFail:Function,onOneFileFail:Function,onOneFileSuccess:Function,onPreview:Function,onProgress:Function,onRemove:Function,onSelectChange:Function,onSuccess:Function,onValidate:Function,onWaitingUploadFilesChange:Function};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Ne={accept:String,files:Array,toUploadFiles:Array,displayFiles:Array,theme:String,abridgeName:Array,placeholder:String,classPrefix:String,tips:[String,Function],status:String,locale:Object,sizeOverLimitMessage:String,autoUpload:Boolean,uploadPastedFiles:Boolean,onPasteFileChange:Function,disabled:Boolean,uploading:Boolean,tipsClasses:[String,Array,Object],errorClasses:[String,Array,Object],placeholderClass:[String,Array,Object],showUploadProgress:Boolean,default:Function,fileListDisplay:Function,onRemove:Function,imageViewerProps:Object};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function ea(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function tl(t){for(var e=1;e1?"".concat(R,"[").concat(V,"]"):R;X[p]=B.raw}),j.length===1?X[R]=j[0].raw:X[R]=j.map(function(B){return B.raw}),X.length=j.length,k&&(X=k(X));var N=new FormData;return Object.keys(X).forEach(function(B){N.append(B,X[B])}),h.open(n,r,!0),Object.keys(i).forEach(function(B){h.setRequestHeader(B,i[B])}),h.onerror=function(B){S({event:B,file:g,files:j,XMLHttpRequest:h}),clearInterval(D),clearTimeout(Y)},h.ontimeout=function(B){S({event:B,file:g,files:j,XMLHttpRequest:h})},h.upload&&(h.upload.onprogress=function(B){var V,p=0;if(B.total>0&&(p=Math.round(B.loaded/B.total*100)),P=Math.max(p,P),P!==p&&((V=j[0])===null||V===void 0?void 0:V.percent)!==P){var U=j.map(function($){return Ae(Ae({},$),{},{percent:P})});b({event:B,percent:P,file:g||U[0],files:U,type:"real",XMLHttpRequest:h})}}),h.onload=function(B){var V={};V.XMLHttpRequest=h;var p=h.status<200||h.status>=300;if(p)return S({event:B,file:g,files:j,response:V,XMLHttpRequest:h});var U=h.responseText||h.response;try{V=JSON.parse(U)}catch{V=U,we.error("Upload","response does not a valid json")}clearInterval(D),clearTimeout(Y),j.forEach(function($){var J;$.percent=100,$.status="success",$.uploadTime=((J=V)===null||J===void 0?void 0:J.uploadTime)||ja()}),Le(V)==="object"&&(V.XMLHttpRequest=h),F({event:B,file:g||j[0],files:oe(j),XMLHttpRequest:h,response:V})},h.send(N),h.upload.requestParams=X,h.upload.requestHeaders=i,h}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function ua(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function se(t){for(var e=1;e=0?se(se({},t[v]),i):i;n.push(u)},o=0,s=e.length;o2&&arguments[2]!==void 0?arguments[2]:void 0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return t.map(function(r){var o=r;_e(e)&&(o=e(r));var s=se({raw:r,lastModified:r.lastModified,name:r.name,size:r.size,type:r.type,percent:n,status:a},o);return s})}function ml(t){var e=t.files,a=t.uploadValue,n=t.max,r=t.allowUploadDuplicateFile;return new Promise(function(o){var s=e.filter(function(w){var M=a.find(function(I){return I.name===w.name});return r||!M}),c=!1;if(s.lengthn&&(v=!0)}var g=Ye(s,t.format,t.autoUpload?"progress":"waiting"),y;if(t.beforeAllFilesUpload){var m,C=(m=t.beforeAllFilesUpload)===null||m===void 0?void 0:m.call(t,g);y=C instanceof Promise?C:new Promise(function(w){return w(C)})}var R=g.map(function(w){return new Promise(function(M){sl(w,{beforeUpload:t.beforeUpload,sizeLimit:t.sizeLimit}).then(function(I){var _=Pe(I,2),k=_[0],S=_[1];k?M({file:w,validateResult:{type:"FILE_OVER_SIZE_LIMIT",extra:k}}):S===!1&&M({file:w,validateResult:{type:"CUSTOM_BEFORE_UPLOAD"}}),M({file:w})})})});Promise.all([y].concat(R)).then(function(w){var M=sn(w),I=M[0],_=M.slice(1);o(I===!1?{lengthOverLimit:v,hasSameNameFile:c,validateResult:{type:"BEFORE_ALL_FILES_UPLOAD"},files:g}:{lengthOverLimit:v,hasSameNameFile:c,fileValidateList:_,files:g})})})}function pl(t,e){var a=[],n=[],r=[];return t.forEach(function(o){var s,c;if(((s=o.validateResult)===null||s===void 0?void 0:s.type)==="CUSTOM_BEFORE_UPLOAD"){n.push(o.file);return}if(((c=o.validateResult)===null||c===void 0?void 0:c.type)==="FILE_OVER_SIZE_LIMIT"){o.file.response||(o.file.response={}),o.file.response.error=o.file.response.error||e(o.validateResult.extra),a.push(o);return}r.push(o.file)}),{sizeLimitErrors:a,beforeUploadErrorFiles:n,toFiles:r}}function hl(t){return t.isBatchUpload&&t.status||t.status==="fail"?"reupload":t.status==="progress"?"uploading":t.status==="success"||!t.autoUpload&&t.status==="waiting"?t.multiple?"continueUpload":"reupload":"fileInput"}function yl(t){var e=t.multiple,a=t.uploadValue,n=t.toUploadFiles,r=t.autoUpload,o=r?n:n.filter(function(s){return s.status!=="success"});return e&&!t.isBatchUpload?r?(o.length?a.concat(o):a)||[]:a:(o.length?o:a)||[]}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function va(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function He(t){for(var e=1;e