import{O as un,P as sn,Q as cn,b as Kt,i as Yt,a2 as Re,aj as xe,aG as Kl,ah as Te,w as qt,as as Po,ar as Ll,at as kl,au as Ao,n as Pe,g as fe,c as jo,f as z,m as Lt,h as Fo,az as Un,l as Io,aH as Nl,aI as gr,o as dt,aJ as Ml,aA as Va,aK as Bl,aL as Ko,aq as zl,$ as H,aM as Hl,aN as Wl,aO as $l,av as Vl,d as ht,a1 as Ul,W as Ua,al as Xl,aP as pr,aQ as Gl,ab as Lo,X as En,aR as Yl,N as pa,k as Pa,a4 as ql,aS as Jl,a0 as rr,am as Zl,aT as Ql,aU as ei}from"./index.3e53dd4f.js";import{d as ze,c as N,f as W,w as de,o as yt,bN as ti,bO as ni,b as Ra,aI as L,n as Gt,t as Ke,i as br,aV as Ie,bA as ai,u as ri,x as oi,y as li,aY as ko,p as No,r as Xn,h as Ye,aU as dn,aZ as ii,g as Mo,s as ui}from"./arco.c29bba08.js";import{_ as Bo,b as zo,o as Ho,c as mr,t as si,d as or,T as Wo,p as Cn,P as ci,e as $o,u as di,f as kt,A as Vo,g as Uo,h as Xa,i as wr,E as Xo,j as Go,k as Yo,l as vi,m as ba,C as Ga,a as qo,n as fi,q as hi,r as gi}from"./dep-6deb4e3a.300404c4.js";import{i as xn,b as Jo,d as pi,_ as Zo,c as bi,l as Be,I as mi}from"./index.c4d5074a.js";import{_ as Ya,r as wn,i as wi,s as $n,v as Qo}from"./form-model.d4a8bc76.js";function yr(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;et.size),{className:r,style:o}=un(n),l=N(()=>["t-icon","t-icon-add-rectangle",r.value]),i=N(()=>Cr(Cr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>sn(yi,u.value)}});const xi=Ci;function xr(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 Sr(t){for(var e=1;et.size),{className:r,style:o}=un(n),l=N(()=>["t-icon","t-icon-chevron-right-circle",r.value]),i=N(()=>Sr(Sr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>sn(Si,u.value)}});const Ri=Oi;function Or(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 Rr(t){for(var e=1;et.size),{className:r,style:o}=un(n),l=N(()=>["t-icon","t-icon-edit-1",r.value]),i=N(()=>Rr(Rr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>sn(Ei,u.value)}});const _i=Di;function Er(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 Dr(t){for(var e=1;et.size),{className:r,style:o}=un(n),l=N(()=>["t-icon","t-icon-filter",r.value]),i=N(()=>Dr(Dr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>sn(Ti,u.value)}});const Ai=Pi;function _r(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;et.size),{className:r,style:o}=un(n),l=N(()=>["t-icon","t-icon-minus-rectangle",r.value]),i=N(()=>Tr(Tr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>sn(ji,u.value)}});const Ii=Fi;function Pr(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 Ar(t){for(var e=1;et.size),{className:r,style:o}=un(n),l=N(()=>["t-icon","t-icon-move",r.value]),i=N(()=>Ar(Ar({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>sn(Ki,u.value)}});const vc=Li;function jr(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 Fr(t){for(var e=1;et.size),{className:r,style:o}=un(n),l=N(()=>["t-icon","t-icon-setting",r.value]),i=N(()=>Fr(Fr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>sn(ki,u.value)}});const Mi=Ni;/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Bi={container:{type:[String,Function],default:function(){return function(){return window}}},content:{type:[String,Function]},default:{type:[String,Function]},offsetBottom:{type:Number,default:0},offsetTop:{type:Number,default:0},zIndex:{type:Number},onFixedChange:Function};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var zi=ze({name:"TAffix",props:Bi,emits:["fixedChange"],setup:function(e,a){var n,r=Kt("affix"),o=Yt(),l=W(null),i=W(null),u=W((n=document)===null||n===void 0?void 0:n.createElement("div")),s=W(!1),v=W(!1),d=W(),b=W(),p=0,w=function(){s.value||(p=window.requestAnimationFrame(function(){var R,O;p=0;var _=(R=(O=l.value)===null||O===void 0?void 0:O.getBoundingClientRect())!==null&&R!==void 0?R:{top:0,width:0,height:0},j=_.top,A=_.width,T=_.height,F=0;d.value instanceof HTMLElement&&(F=d.value.getBoundingClientRect().top);var P,K=j-F,D=d.value[d.value instanceof Window?"innerHeight":"clientHeight"]-T,m=F+D-e.offsetBottom;if(!xn(e.offsetTop)&&K<=e.offsetTop?P=F+e.offsetTop:!xn(e.offsetBottom)&&j>=m?P=m:P=!1,i.value){var h=P!==!1,g=l.value.contains(u.value);h?(i.value.className=r.value,b.value={top:"".concat(P,"px"),width:"".concat(A,"px"),height:"".concat(T,"px"),zIndex:e.zIndex},g||(u.value.style.width="".concat(A,"px"),u.value.style.height="".concat(T,"px"),l.value.appendChild(u.value))):(i.value.removeAttribute("class"),b.value=void 0,g&&u.value.remove()),a.emit("fixedChange",h,{top:Number(P)}),Re(e.onFixedChange)&&e.onFixedChange(h,{top:Number(P)})}s.value=!1}),s.value=!0)},y=function(){var x=Ya(wn.mark(function R(){return wn.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,Gt();case 2:if(!v.value){_.next=4;break}return _.abrupt("return");case 4:d.value=Kl(e.container),Te(d.value,"scroll",w),Te(window,"resize",w),v.value=!0;case 8:case"end":return _.stop()}},R)}));return function(){return x.apply(this,arguments)}}(),S=function(){!d.value||!v.value||(xe(d.value,"scroll",w),xe(window,"resize",w),p&&window.cancelAnimationFrame(p),v.value=!1)};return de(function(){return e.offsetTop},function(){w()}),de(function(){return e.offsetBottom},function(){w()}),de(function(){return e.zIndex},function(){w()}),yt(y),ti(y),ni(S),Ra(S),{affixWrapRef:l,affixRef:i,bindScroll:y,unbindScroll:S,handleScroll:w,scrollContainer:d,renderTNodeJSX:o,affixStyle:b}},render:function(){return L("div",{ref:"affixWrapRef"},[L("div",{ref:"affixRef",style:this.affixStyle},[this.renderTNodeJSX("default")])])}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Zn=qt(zi);/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Hi=Po,Wi=Bo,$i=zo,Vi=Ll,Ui=kl,Xi=Ao,Gi=200;function Yi(t,e,a,n){var r=-1,o=Wi,l=!0,i=t.length,u=[],s=e.length;if(!i)return u;a&&(e=Vi(e,Ui(a))),n?(o=$i,l=!1):e.length>=Gi&&(o=Xi,l=!1,e=new Hi(e));e:for(;++r2&&arguments[2]!==void 0?arguments[2]:{},n=a.window,r=n===void 0?nu:n,o=Zo(a,tu),l,i=r&&"MutationObserver"in r,u=function(){l&&(l.disconnect(),l=void 0)},s=de(function(){return au(t)},function(d){u(),i&&r&&d&&(l=new MutationObserver(e),l.observe(d,o))},{immediate:!0}),v=function(){u(),s()};return ru(v),{isSupported:i,stop:v}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Kr(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 Aa(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:!1;if(e.variant!=="outline"){var h=s.value.querySelector(w.value),g=m?"none":"all";if(!h){y.value={"transition-property":g,width:"0px",height:"9px",left:"0px",top:"0px"};return}var c=h.offsetWidth,f=h.offsetHeight,C=h.offsetLeft,E=h.offsetTop;c?y.value={"transition-property":g,width:"".concat(c,"px"),height:"".concat(f,"px"),left:"".concat(C,"px"),top:"".concat(E,"px")}:S()}},R;de(i,Ya(wn.mark(function D(){return wn.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,Gt();case 2:x();case 3:case"end":return h.stop()}},D)}))),yt(function(){x(!0),bi(s,si(Ya(wn.mark(function m(){return wn.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,Gt();case 2:x();case 3:case"end":return g.stop()}},m)})),300));var D=s.value.querySelector("".concat(w.value," .").concat(v.value,"__label"));D&&(R=ou(D,function(m){m.forEach(function(h){h.type==="characterData"&&x()})},{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}),ko(function(){var D;(D=R)===null||D===void 0||D.stop()});var O=Ke(e),_=O.name,j=O.disabled;No(tl,Xn({name:_,disabled:j,value:i,allowUncheck:e.allowUncheck,setValue:u}));var A=Kt("radio-group"),T=Un(),F=function(){if(e.variant.includes("filled")&&!wi(i.value))return L("div",{style:y.value,class:"".concat(A.value,"__bg-block")},null)},P=function(){var m;return(m=e.options)===null||m===void 0?void 0:m.map(function(h){var g=h;return(Io(h)||Lt(h))&&(g={value:h,label:h.toString()}),L(lr,{key:"radio-group-options-".concat(g.value,"-").concat(Math.random()),name:e.name,checked:i.value===g.value,disabled:"disabled"in g?g.disabled:e.disabled,value:g.value},{default:function(){return[Re(g.label)?g.label(Ye):g.label]}})})},K=N(function(){return["".concat(A.value),p.value[e.size],z(z(z({},"".concat(A.value,"__outline"),e.variant==="outline"),"".concat(A.value,"--filled"),e.variant.includes("filled")),"".concat(A.value,"--primary-filled"),e.variant==="primary-filled")]});return function(){return L("div",{ref:s,class:K.value},[T("default")||P(),F()])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Lr(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 ja(t){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:1,n=a,r=0,o=t.length;rn&&(n=u)}}return n}function rl(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=e,n=(t==null?void 0:t.children)||[],r=0,o=n.length;r1&&(y.rowspan=p),w>1&&(y.colspan=w),n.set(b,y),b!=null&&(d=b.children)!==null&&d!==void 0&&d.length?l(b.children,u):u.push(b)}},o=[];return r(t,o),{rowspanAndColspanMap:n,leafColumns:o}}function vu(t){var e=function n(r,o){for(var l,i=[],u=[],s=0,v=r.length;s1}),i=function(s,v,d,b,p,w){var y=Pe(s,3),S=y[0],x=y[1],R=y[2],O=z(z({},a.sortable,x),n.filterable,R),_=Re(b)?b(Ye,{col:v,colIndex:d}):void 0,j=Boolean(b!==void 0?b:v.ellipsis);return L("div",{class:O},[L("div",{class:a.title},[j?L(ir,{placement:"bottom",attach:t.attach||(p?function(){return p}:void 0),tooltipContent:_&&function(){return _},tooltipProps:dt(b)==="object"?b:void 0,classPrefix:w==null?void 0:w.classPrefix,overlayClassName:w==null?void 0:w.ellipsisOverlayClassName},gu(S)?S:{default:function(){return[S]}}):L("div",null,[S]),Boolean(x||R)&&L("div",{class:n.iconWrap},[x,R])])])};return{thList:o,isMultipleHeader:l,spansAndLeafNodes:r,renderTitleWidthIcon:i}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Br(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 pu(t){for(var e=1;eI}return!(C||e.value||f===d.value.length-1)},K=function(h,g,c,f){return g?j(h,g,c,f):T(c,f)},D=function(h,g,c){var f,C,E;if(!!S.draggingCol){var k=S.draggingCol,I=k.getBoundingClientRect(),M=(f=a.value)===null||f===void 0?void 0:f.getBoundingClientRect(),$=(C=v.value[g.colKey])===null||C===void 0?void 0:C.next,Y=(E=v.value[g.colKey])===null||E===void 0?void 0:E.prev,ee=R(g)?A(k,g,$,I,M):K(g,$,I,M),ne=ee.resizeLinePos,ae=ee.minResizeLineLeft,J=ee.maxResizeLineLeft;if(S.isDragging=!0,S.draggingStart=h.x,s!=null&&s.value){x.display="block",x.height="".concat(M.bottom-I.top,"px"),x.left="".concat(ne,"px");var B=a.value.parentElement.getBoundingClientRect();x.bottom="".concat(B.bottom-M.bottom,"px")}var X=function q(){var se;if(!!S.isDragging){var he=ne-parseFloat(x.left)||0,Le=r("calculate"),Ve=(se=v.value[g.colKey])===null||se===void 0?void 0:se.current;if(!!Ve){var qe=S.effectCol==="next"?Ve.nextSibling:Ve.prevSibling,Ne=pu({},Le),lt=g.resizable!==!1?g:qe,gt=S.effectCol==="next"?Ve.nextSibling:g,it=P(Ne,gt,he,c);S.effectCol==="next"?R(g)?k.dataset.colkey!==g.colKey?Ne[$.colKey]+=he:Ne[lt.colKey]+=he:(Ne[lt.colKey]-=he,it&&(Ne[$.colKey]+=he)):S.effectCol==="prev"&&(it&&(Ne[lt.colKey]+=he),Y&&(Ne[Y.colKey]-=he)),o(Ne);var Pt=F(Ne);l(Math.round(Pt)),i(),S.isDragging=!1,S.draggingCol=null,S.effectCol=null,k.style.cursor="",x.display="none",x.left="0",xe(document,"mouseup",q),xe(document,"mousemove",Q),document.onselectstart=b,document.ondragstart=p,u==null||u({columnsWidth:Ne})}}},Q=function(se){if(S.isDragging){var he=ne+se.x-S.draggingStart;x.left="".concat(Math.min(Math.max(he,ae),J),"px")}};Te(document,"mouseup",X),Te(document,"mousemove",Q),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1}}};return{resizeLineRef:s,resizeLineStyle:x,onColumnMouseover:O,onColumnMousedown:D,setEffectColMap:y}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function yu(){}var Cu=yu,Fa=Bl,xu=Cu,Su=Ko,Ou=1/0,Ru=Fa&&1/Su(new Fa([,-0]))[1]==Ou?function(t){return new Fa(t)}:xu,Eu=Ru,Du=Po,_u=Bo,Tu=zo,Pu=Ao,Au=Eu,ju=Ko,Fu=200;function Iu(t,e,a){var n=-1,r=_u,o=t.length,l=!0,i=[],u=i;if(a)l=!1,r=Tu;else if(o>=Fu){var s=e?null:Au(t);if(s)return ju(s);l=!1,r=Pu,u=new Du}else u=e?[]:i;e:for(;++na-1-n[1],u=a-n[1],s=(r==null?void 0:r.get(t))||{},v=z(z(z(z({},o.top,l),o.bottom,i),o.firstBottom,e===u),o.withoutBorderBottom,e===u-1),d={top:l?"".concat(s.top,"px"):void 0,bottom:i?"".concat(s.bottom,"px"):void 0};return{style:d,classes:v}}function Gu(t,e,a,n){var r=Ke(t),o=r.columns,l=r.tableLayout,i=r.tableContentWidth,u=r.fixedRows,s=r.firstFullRow,v=r.lastFullRow,d=r.maxHeight,b=r.headerAffixedTop,p=r.footerAffixedBottom,w=r.bordered,y=r.resizable,S=r.allowResizeColumnWidth,x=W([]),R=W(),O=W(),_=W(!1),j=W(!1),A=W(),T=W(6),F=W(new Map),P=Xn({left:!1,right:!1}),K=W({left:0,top:0}),D=W(0),m=W(0),h=W({}),g=W(!1),c=W(!1),f=W(!1),C=N(function(){var re,V;return(re=(V=S.value)!==null&&V!==void 0?V:y.value)!==null&&re!==void 0?re:!1}),E=N(function(){var re;return!(t.headerAffixedTop||t.footerAffixedBottom||t.horizontalScrollAffixedBottom||((re=t.scroll)===null||re===void 0?void 0:re.type)==="virtual")});function k(re){A.value=re}function I(re){for(var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,te=arguments.length>4?arguments[4]:void 0,le=0,ge=re.length;le2&&arguments[2]!==void 0?arguments[2]:{},te=0,le=V.length;te=0&&V[me].fixed!=="left";)me-=1;var Ee=V[me],Ae=te===0&&(Z==null?void 0:Z.left)||0,He=G.get((Ee==null?void 0:Ee.colKey)||te-1);ue&&(ue.left=((He==null?void 0:He.left)||Ae)+((He==null?void 0:He.width)||0)),(ge=pe.children)!==null&&ge!==void 0&&ge.length&&re(pe.children,G,ue)}},$=function re(V,G){for(var Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},te=V.length-1;te>=0;te--){var le,ge=V[te];if(ge.fixed==="left")return;for(var pe=G.get(ge.colKey||te),ue=te+1;ue=me.length-ue;xt--){var St=V[xt],be=H(me[xt],Ae),ve=G.get(be)||{},Fe=H(me[xt+1],Ae),Je=G.get(Fe)||{},Ge=0;xt===me.length-1&&(Ge=(te==null?void 0:te.getBoundingClientRect().height)||0),ve.bottom=(Je.bottom||Ge)+(Je.height||0),G.set(be,hn(hn({},ve),{},{height:(St==null?void 0:St.getBoundingClientRect().height)||0}))}},ne=function(V,G){if(F.value.clear(),!!V){var Z=V.querySelector("thead");Z&&Y(Z.children,G);var te=V.querySelector("tbody"),le=V.querySelector("tfoot");te&&ee(te.children,G,Z,le),F.value=G}},ae,J=function(V,G){if(!(!g.value||!V)){var Z=V.scrollLeft;if(!(ae===Z&&(!G||!G.skipScrollLimit))){ae=Z;var te=V.clientWidth+Z0;P.left===le&&P.right===te||(P.left=le&&f.value,P.right=te&&c.value)}}},B=function(V){for(var G=0;GO.value.clientHeight,j.value=O.value.scrollWidth>O.value.clientWidth;var G=O.value.getBoundingClientRect();K.value={top:G.top,left:G.left},clearTimeout(V)}},0)},q=function(V){m.value!==V&&(m.value=V)},se=function(){var V,G,Z=(V=O.value)===null||V===void 0?void 0:V.getBoundingClientRect();if(!!Z){var te=_.value?T.value:0;D.value=Z.width-te-(t.bordered?1:0);var le=A==null||(G=A.value)===null||G===void 0?void 0:G.getBoundingClientRect();le!=null&&le.width&&q(le.width)}},he=function(){var V,G,Z,te,le,ge,pe,ue;(V=n.paginationAffixRef.value)===null||V===void 0||(G=V.handleScroll)===null||G===void 0||G.call(V),(Z=n.horizontalScrollAffixRef.value)===null||Z===void 0||(te=Z.handleScroll)===null||te===void 0||te.call(Z),(le=n.headerTopAffixRef.value)===null||le===void 0||(ge=le.handleScroll)===null||ge===void 0||ge.call(le),(pe=n.footerBottomAffixRef.value)===null||pe===void 0||(ue=pe.handleScroll)===null||ue===void 0||ue.call(pe)},Le=function(V){for(var G={},Z=0,te=V.length;Z0&&arguments[0]!==void 0?arguments[0]:0,zt=arguments.length>1?arguments[1]:void 0;return tt+zt}),At=O.value.clientWidth,Bt=He-Ee;q(Math.max(At,Bt))}});var it=function(){qe(),Q(),he(),(g.value||_.value)&&(X(),J(O.value,{skipScrollLimit:!0}))},Pt=or(function(){it()},30),je=null;function Dn(re){typeof window>"u"||Va()<11||typeof window.ResizeObserver>"u"||(xe(window,"resize",Pt),je=new window.ResizeObserver(function(){var V=setTimeout(function(){it(),clearTimeout(V)},200)}),je.observe(re),R.value=re)}yt(function(){var re=Ml();T.value=re,qe();var V=g.value||_.value||!E.value||!x.value.length,G=typeof window<"u",Z=G&&typeof window.ResizeObserver<"u";(V&&Va()<11||!Z)&&Te(window,"resize",Pt)}),Ra(function(){var re,V;typeof window<"u"&&xe(window,"resize",Pt),(re=je)===null||re===void 0||re.unobserve(R.value),(V=je)===null||V===void 0||V.disconnect()});var _n=function(V){x.value=V},Tn=function(){X(),Q()};return{tableWidth:D,tableElmWidth:m,thWidthList:h,isFixedHeader:_,isWidthOverflow:j,tableContentRef:O,isFixedColumn:g,showColumnShadow:P,rowAndColFixedPosition:F,virtualScrollHeaderPos:K,scrollbarWidth:T,setData:_n,refreshTable:it,setTableElmWidth:q,emitScrollEvent:lt,updateThWidthListHandler:qe,updateColumnFixedShadow:J,setUseFixedTableElmRef:k,getThWidthList:gt,updateThWidthList:Ve,addTableResizeObserver:Dn,updateTableAfterColumnResize:Tn}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function $r(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 Yu(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:1,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:10,S=t.data,x=Boolean(!o.value&&S.length>y);if(v.value=x,x){var R=(w-1)*y,O=w*y;s.value=S.slice(R,O)}else s.value=S};de(function(){var p,w;return[(p=n.value)===null||p===void 0?void 0:p.current,(w=n.value)===null||w===void 0?void 0:w.pageSize,r.value.length,o]},function(){if(!(!n.value||!n.value.current)){var p=n.value,w=p.current,y=p.pageSize;u.value={current:w,pageSize:y},d(n.value.current,n.value.pageSize)}},{immediate:!0}),de([r],function(){var p,w;if(!(!n.value||!n.value.defaultCurrent)){var y=Boolean(n.value.current);y||d((p=u.value.current)!==null&&p!==void 0?p:n.value.defaultCurrent,(w=u.value.pageSize)!==null&&w!==void 0?w:n.value.defaultPageSize)}},{immediate:!0});var b=function(){if(!t.pagination)return null;var w=Yu({},t.pagination);return delete w.onChange,L("div",{class:"".concat(i.value,"-table__pagination")},[L(ci,Ie(w,{onChange:function(S){var x,R,O;(x=t.pagination)===null||x===void 0||(R=x.onChange)===null||R===void 0||R.call(x,S),u.value=S,d(S.current,S.pageSize),(O=t.onPageChange)===null||O===void 0||O.call(t,S,s.value)}}),{totalContent:e.slots.totalContent})])};return{isPaginateData:v,dataSource:s,innerPagination:u,renderPagination:b}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Ju(t){var e=W(),a=W(),n=W(),r=W(),o=W(),l=W(!0),i=W(!0),u=W(!0),s=!1,v=!1,d=N(function(){return t.scroll&&t.scroll.type==="virtual"&&(t.scroll.threshold||100)B.height},S=function(B){return Ul(B)?0:B.offsetTop||0},x=function(){var B,X,Q;if(!(!b.value&&!d.value)){var q=(B=e.value)===null||B===void 0?void 0:B.getBoundingClientRect(),se=(X=e.value)===null||X===void 0||(X=X.querySelector("thead"))===null||X===void 0?void 0:X.getBoundingClientRect(),he=(se==null?void 0:se.height)||0,Le=(Q=n.value)===null||Q===void 0?void 0:Q.getBoundingClientRect();if((t.headerAffixedTop||d.value)&&a.value){var Ve=S(t.headerAffixProps||t.headerAffixedTop),qe=(Le==null?void 0:Le.height)||0,Ne=Math.abs(q.top)-1*se.height),l.value=Ne}if(t.footerAffixedBottom&&n!==null&&n!==void 0&&n.value)i.value=y(Le,q,he);else if(t.horizontalScrollAffixedBottom&&r!==null&&r!==void 0&&r.value){var lt=r.value.getBoundingClientRect();i.value=y(lt,q,he)}if(t.paginationAffixedBottom&&o.value){var gt=o.value.getBoundingClientRect();u.value=y(gt,q,he)}}},R=function(){x()},O=function(){w(n.value)},_=function(){w(a.value)},j=function(){w(r.value)},A=function(){w(e.value)},T=function(){Te(n.value,"scroll",O)},F=function(){xe(n.value,"scroll",O)},P=function(){Te(a.value,"scroll",_),C()},K=function(){s||xe(a.value,"scroll",_),E()},D=function(){Te(r.value,"scroll",j)},m=function(){xe(r.value,"scroll",j)},h=function(){Te(e.value,"scroll",A),C()},g=function(){s||xe(e.value,"scroll",A),E()},c=function(){s=!0},f=function(){s=!1,v||(xe(a.value,"scroll",_),xe(e.value,"scroll",A))},C=function(){v=!0},E=function(){v=!1},k=[],I=function(B){var X=or(function(he){xe(B,"scroll",he)},200);function Q(){w(B),X(Q)}function q(he){he.composedPath().includes(B)&&(k.forEach(function(Le){return Le()}),k.length=0,Te(B,"scroll",Q),X(Q),k.push(function(){xe(B,"scroll",Q)}))}Te(B,"touchstart",q);function se(){xe(B,"touchstart",q)}return{removeElementTouchScrollListener:se}},M=[],$=function(){M.forEach(function(B){return B()}),M.length=0},Y=function(){xe(window,"mousedown",c),xe(window,"mouseup",f),$(),a.value&&(xe(a.value,"mouseenter",P),xe(a.value,"mouseleave",K)),n.value&&(xe(n.value,"mouseenter",T),xe(n.value,"mouseleave",F)),e.value&&(xe(e.value,"mouseenter",h),xe(e.value,"mouseleave",g)),r.value&&(xe(r.value,"mouseenter",D),xe(r.value,"mouseleave",m))},ee=function(){if(Te(window,"mousedown",c),Te(window,"mouseup",f),Y(),a.value){Te(a.value,"mouseenter",P),Te(a.value,"mouseleave",K);var B=I(a.value),X=B.removeElementTouchScrollListener;M.push(X)}if(t.footerAffixedBottom&&n.value){Te(n.value,"mouseenter",T),Te(n.value,"mouseleave",F);var Q=I(n.value),q=Q.removeElementTouchScrollListener;M.push(q)}if(t.horizontalScrollAffixedBottom&&r.value){Te(r.value,"mouseenter",D),Te(r.value,"mouseleave",m);var se=I(r.value),he=se.removeElementTouchScrollListener;M.push(he)}if((b.value||d.value)&&e.value){Te(e.value,"mouseenter",h),Te(e.value,"mouseleave",g);var Le=I(e.value),Ve=Le.removeElementTouchScrollListener;M.push(Ve)}},ne=function(){if(!(!b.value&&!t.paginationAffixedBottom))var B=setTimeout(function(){b.value||t.paginationAffixedBottom?Te(document,"scroll",R):xe(document,"scroll",R),clearTimeout(B)})};de([a,n,r,e],function(){ee(),w(),x()}),de(b,ne),de(function(){return[t.data,t.columns,t.headerAffixedTop,t.footerAffixedBottom,t.horizontalScrollAffixedBottom]},function(){w()}),Ra(function(){xe(document,"scroll",R),Y(),a.value=null,n.value=null,r.value=null,e.value=null});var ae=function(B){e.value=B,ne()};return{showAffixHeader:l,showAffixFooter:i,showAffixPagination:u,affixHeaderRef:a,affixFooterRef:n,horizontalScrollbarRef:r,paginationRef:o,onHorizontalScroll:w,setTableContentRef:ae,updateAffixHeaderOrFooter:x}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function sr(t,e){if(!!t){for(var a=t instanceof Array?t:[t],n={},r=0;r1&&(E.rowspan=I.rowspan),(($=I)===null||$===void 0?void 0:$.colspan)>1&&(E.colspan=I.colspan),I.skipped)return null}return F(k,{dataLength:h,rowAndColFixedPosition:g,columnLength:K.length,cellSpans:E,cellEmptyContent:e.cellEmptyContent})});return L("tr",Ie({ref:i},S.value,{style:(P=y.value)===null||P===void 0?void 0:P.style,class:x.value},j(m,e.rowIndex)),[O.value?[L("td",{style:{height:"".concat(_.value,"px"),border:"none"}},null)]:c])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Ur(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 ea(t){for(var e=1;e1)for(var S=p+1;S1)for(var y=s+1;y1&&(g.colspan=d.colspan),L("th",Ie({key:d.colKey,"data-colkey":d.colKey,class:A,style:P},g,w,D),[L("div",{class:e.tableBaseClass.thCellInner},[h?L(ir,{placement:"bottom",attach:e.attach||(e.theadRef?function(){return e.getTableNode(e.theadRef)}:void 0),tooltipContent:m&&function(){return m},tooltipProps:dt(d.ellipsisTitle)==="object"?d.ellipsisTitle:void 0,overlayClassName:e.ellipsisOverlayClassName,classPrefix:e.classPrefix},ns(K)?K:{default:function(){return[K]}}):K])])});return L("tr",{key:s},[v])})};return L("thead",{ref:"theadRef",class:this.theadClasses},[a(this.rowAndColFixedPosition,this.thWidthList)])}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Yr(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 ta(t){for(var e=1;e1&&(p.rowspan=w.rowspan),((S=w)===null||S===void 0?void 0:S.colspan)>1&&(p.colspan=w.colspan),w.skipped)return null}var R=ur(v,d,a.rowAndColFixedPosition,a.tableColFixedClasses),O=ta({},R.style);return(b=a.thWidthList)!==null&&b!==void 0&&b[v.colKey]&&(O.width="".concat(a.thWidthList[v.colKey],"px")),L("td",Ie(ta({key:v.colKey},p),{class:R.classes,style:O}),[a.renderTFootCell({row:l,rowIndex:i,col:v,colIndex:d})])})])}),o=this.renderTNode("footerSummary");return!o&&(!this.footData||!this.footData.length)?null:L("tfoot",{ref:"tFooterRef",class:n,style:{visibility:this.virtualScroll?"hidden":"visible"}},[o&&L("tr",{class:this.tableFullRowClasses.base},[L("td",{colspan:this.columns.length},[L("div",{class:this.tableFullRowClasses.innerFullElement},[o])])]),r])}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function as(t,e){var a=Ke(t),n=a.data,r=a.activeRowType,o=a.activeRowKeys,l=a.defaultActiveRowKeys,i=a.disableSpaceInactiveRow,u=W(-1),s=W(!1),v=W(!1),d=W(-1),b=kt(o,l.value,t.onActiveChange,"activeRowKeys"),p=Pe(b,2),w=p[0],y=p[1],S=function(h){var g=h.row,c=h.index,f=H(g,t.rowKey);if(r.value==="single"){var C=w.value.length>1?[f]:[];y(C,{type:"inactive",activeRowList:[{row:g,rowIndex:c}],currentRowData:g})}else if(r.value==="multiple"){for(var E=w.value.filter(function(Y){return Y!==f}),k=[],I=0,M=n.value.length;I0&&arguments[0]!==void 0?arguments[0]:!0;return L("colgroup",null,[p.map(function(q){var se={width:Nn((Q||w?n.thWidthList[q.colKey]:void 0)||q.width)||y};return q.minWidth&&(se.minWidth=Nn(q.minWidth)),!se.width&&!q.minWidth&&n.tableLayout==="fixed"&&(se.minWidth="80px"),L("col",{key:q.colKey,style:se},null)})])},x=function(){return n.showHeader===!1?null:!!(n.virtualConfig.isVirtualScroll.value||n.headerAffixedTop)&&(n.headerAffixedTop?L(Zn,Ie({offsetTop:0},Qn(n.headerAffixedTop),{onFixedChange:n.onFixedChange,ref:"headerTopAffixRef"}),Zr(h)?h:{default:function(){return[h]}}):n.isFixedHeader&&h)},R=function(){return L(Zn,Ie({offsetBottom:0},Qn(n.horizontalScrollAffixedBottom),{style:{marginTop:"-".concat(n.scrollbarWidth*2,"px")},horizontalScrollAffixedBottom:!0,ref:"horizontalScrollAffixRef"}),{default:function(){return[L("div",{ref:"horizontalScrollbarRef",class:["scrollbar",n.tableBaseClass.obviousScrollbar],style:{width:"".concat(n.tableWidth,"px"),overflow:"auto",opacity:Number(n.showAffixFooter)}},[L("div",{style:{width:"".concat(n.tableElmWidth,"px"),height:"5px"}},null)])]}})},O={isFixedHeader:this.isFixedHeader,rowAndColFixedPosition:this.rowAndColFixedPosition,isMultipleHeader:this.isMultipleHeader,bordered:this.bordered,maxHeight:this.maxHeight,height:this.height,spansAndLeafNodes:this.spansAndLeafNodes,thList:this.thList,thWidthList:this.thWidthList,resizable:this.resizable,columnResizeParams:this.columnResizeParams,classPrefix:this.classPrefix,ellipsisOverlayClassName:this.tableSize!=="medium"?this.sizeClassNames[this.tableSize]:"",attach:this.attach,showColumnShadow:this.showColumnShadow,thDraggable:this.thDraggable},_=Va()<=11?4:0,j=this.isWidthOverflow?this.scrollbarWidth:0,A=W((((r=this.affixHeaderRef)===null||r===void 0?void 0:r.getBoundingClientRect().height)||0)-_),T=setTimeout(function(){var X;A.value=(((X=n.affixHeaderRef)===null||X===void 0?void 0:X.getBoundingClientRect().height)||0)-_,clearTimeout(T)},0),F=N(function(){return A.value-j}),P=On.headerAffixedTop?Number(this.showAffixHeader):1,K=N(function(){return{width:"".concat(n.tableWidth,"px"),height:"".concat(F.value,"px"),opacity:P}}),D=this.bordered?1:0,m=Boolean((this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)&&this.tableWidth)&&L("div",{ref:"affixHeaderRef",style:{width:"".concat(this.tableWidth-D,"px"),opacity:Number(this.showAffixHeader)},class:["scrollbar",z({},this.tableBaseClass.affixedHeaderElm,this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)]},[L("table",{class:this.tableElmClasses,style:nt(nt({},this.tableElementStyles),{},{width:"".concat(this.tableElmWidth,"px")})},[S(!0),L(Gr,O,this.$slots)])]),h=L("div",{class:this.tableBaseClass.affixedHeaderWrap,style:K.value},[m]),g=this.isWidthOverflow?this.scrollbarWidth:0;this.bordered&&(g+=1);var c=Boolean(this.virtualConfig.isVirtualScroll.value||this.footerAffixedBottom),f=((o=this.footData)===null||o===void 0?void 0:o.length)||this.footerSummary||this.$slots.footerSummary,C=Boolean(c&&f&&this.tableWidth)&&L(Zn,Ie({class:this.tableBaseClass.affixedFooterWrap,onFixedChange:this.onFixedChange,offsetBottom:g||0},Qn(this.footerAffixedBottom),{style:{marginTop:"".concat(-1*(((l=this.tableFootHeight)!==null&&l!==void 0?l:0)+g),"px")},ref:"footerBottomAffixRef"}),{default:function(){return[L("div",{ref:"affixFooterRef",style:{width:"".concat(n.tableWidth-D,"px"),opacity:Number(n.showAffixFooter)},class:["scrollbar",z({},n.tableBaseClass.affixedFooterElm,n.footerAffixedBottom||n.virtualConfig.isVirtualScroll.value)]},[L("table",{class:n.tableElmClasses,style:nt(nt({},n.tableElementStyles),{},{width:"".concat(n.tableElmWidth,"px")})},[S(!0),L(qr,{rowKey:n.rowKey,isFixedHeader:n.isFixedHeader,rowAndColFixedPosition:v,footData:n.footData,columns:p,rowAttributes:n.rowAttributes,rowClassName:n.rowClassName,thWidthList:n.thWidthList,footerSummary:n.footerSummary,rowspanAndColspanInFooter:n.rowspanAndColspanInFooter},n.$slots)])])]}}),E="translate(0, ".concat(this.virtualConfig.scrollHeight.value+((i=this.tableFootHeight)!==null&&i!==void 0?i:0)+((u=A.value)!==null&&u!==void 0?u:0),"px)"),k={transform:E,"-ms-transform":E,"-moz-transform":E,"-webkit-transform":E},I=this.virtualConfig,M=nt(nt({classPrefix:this.classPrefix,ellipsisOverlayClassName:this.tableSize!=="medium"?this.sizeClassNames[this.tableSize]:"",rowAndColFixedPosition:v,showColumnShadow:this.showColumnShadow,data:I.isVirtualScroll.value?I.visibleData.value:b,virtualConfig:this.virtualConfig,columns:this.spansAndLeafNodes.leafColumns,tableElm:this.tableRef,tableWidth:this.tableWidth,isWidthOverflow:this.isWidthOverflow,scroll:this.scroll,cellEmptyContent:this.cellEmptyContent,tableContentElm:this.tableContentRef,handleRowMounted:this.virtualConfig.handleRowMounted,renderExpandedRow:this.renderExpandedRow},Cn(this.$props,dl)),{},{pagination:this.innerPagination,attach:this.attach,hoverRow:this.hoverRow,activeRow:this.tActiveRow,onRowClick:this.onInnerRowClick}),$=L("div",{ref:"tableContentRef",class:this.tableBaseClass.content,style:this.tableContentStyles,onScroll:this.onInnerVirtualScroll},[this.virtualConfig.isVirtualScroll.value&&L("div",{class:this.virtualScrollClasses.cursor,style:k},null),L("table",{ref:"tableElmRef",class:this.tableElmClasses,style:nt(nt({},this.tableElementStyles),{},{width:this.resizable&&this.isWidthOverflow&&this.tableElmWidth?"".concat(this.tableElmWidth,"px"):this.tableElementStyles.width})},[S(!1),this.showHeader&&L(Gr,nt(nt({},O),{},{thWidthList:w?this.thWidthList:{}}),this.$slots),L(ts,M,this.$slots),L(qr,{rowKey:this.rowKey,isFixedHeader:this.isFixedHeader,rowAndColFixedPosition:v,footData:this.footData,columns:p,rowAttributes:this.rowAttributes,rowClassName:this.rowClassName,footerSummary:this.footerSummary,rowspanAndColspanInFooter:this.rowspanAndColspanInFooter,virtualScroll:this.virtualConfig.isVirtualScroll.value},this.$slots)])]),Y=Re(this.loading)?this.loading:this.$slots.loading,ee=this.loading!==void 0&&L(Lo,Ie({loading:!!this.loading,text:Y,attach:this.tableRef?function(){return n.tableRef}:void 0,showOverlay:!0,size:"small"},this.loadingProps),null),ne=this.renderTNode("topContent"),ae=this.renderTNode("bottomContent"),J=L("div",{ref:"paginationRef",class:this.tableBaseClass.paginationWrap,style:{opacity:Number(this.showAffixPagination)}},[this.renderPagination()]),B=!!ae&&L("div",{ref:"bottomContentRef",class:this.tableBaseClass.bottomContent},[ae]);return L("div",{ref:"tableRef",tabindex:"0",class:this.dynamicBaseTableClasses,onFocus:this.onTableFocus,onBlur:this.onTableBlur},[!!ne&&L("div",{class:this.tableBaseClass.topContent},[ne]),x(),$,C,ee,B,this.showRightDivider&&L("div",{class:this.tableBaseClass.scrollbarDivider,style:{right:"".concat(this.scrollbarWidth,"px"),bottom:this.dividerBottom?"".concat(this.dividerBottom,"px"):void 0,height:"".concat((s=this.tableContentRef)===null||s===void 0?void 0:s.getBoundingClientRect().height,"px")}},null),this.horizontalScrollAffixedBottom&&R(),this.paginationAffixedBottom?L(Zn,Ie({offsetBottom:0},Qn(this.paginationAffixedBottom),{ref:"paginationAffixRef"}),Zr(J)?J:{default:function(){return[J]}}):J,L("div",{ref:"resizeLineRef",class:this.tableBaseClass.resizeLine,style:this.resizeLineStyle},null)])}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var hl={asyncLoading:{type:[String,Function]},columnController:{type:Object},columnControllerVisible:{type:Boolean,default:void 0},defaultColumnControllerVisible:{type:Boolean,default:void 0},columns:{type:Array,default:function(){return[]}},displayColumns:{type:Array,default:void 0},defaultDisplayColumns:{type:Array},dragSort:{type:String,validator:function(e){return e?["row","row-handler","col","row-handler-col","drag-col"].includes(e):!0}},dragSortOptions:{type:Object},editableCellState:{type:Function},editableRowKeys:{type:Array},expandIcon:{type:[Boolean,Function],default:!0},expandOnRowClick:Boolean,expandedRow:{type:[String,Function]},expandedRowKeys:{type:Array,default:void 0},defaultExpandedRowKeys:{type:Array,default:function(){return[]}},filterIcon:{type:Function},filterRow:{type:[String,Function]},filterValue:{type:Object,default:void 0},defaultFilterValue:{type:Object},hideSortTips:Boolean,indeterminateSelectedRowKeys:{type:Array},multipleSort:Boolean,reserveSelectedRowOnPaginate:{type:Boolean,default:!0},rowSelectionAllowUncheck:Boolean,rowSelectionType:{type:String,validator:function(e){return e?["single","multiple"].includes(e):!0}},selectOnRowClick:Boolean,selectedRowKeys:{type:Array,default:void 0},defaultSelectedRowKeys:{type:Array,default:function(){return[]}},showSortColumnBgColor:Boolean,sort:{type:[Object,Array],default:void 0},defaultSort:{type:[Object,Array]},sortIcon:{type:Function},sortOnRowDraggable:Boolean,onAsyncLoadingClick:Function,onCellClick:Function,onChange:Function,onColumnChange:Function,onColumnControllerVisibleChange:Function,onDataChange:Function,onDisplayColumnsChange:Function,onDragSort:Function,onExpandChange:Function,onFilterChange:Function,onRowEdit:Function,onRowValidate:Function,onSelectChange:Function,onSortChange:Function,onValidate:Function};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Qr(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 eo(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:new Set,a=0,n=t.length;a1&&arguments[1]!==void 0?arguments[1]:[];if((h=s.value)!==null&&h!==void 0&&(h=h.groupColumns)!==null&&h!==void 0&&h.length)return[];for(var c=0,f=m.length;c1&&arguments[1]!==void 0?arguments[1]:{},a=0,n=t.length;a0&&R.value.length0&&arguments[0]!==void 0?arguments[0]:{},f=fe(b.value),C=t.rowKey||"id",E=H(c,C),k=f.indexOf(E),I=k!==-1;if(S.value==="multiple")I?f.splice(k,1):f.push(E);else if(S.value==="single")f=I&&O.value?[]:[E];else{Be.warn("Table","`column.type` must be one of `multiple` and `single`");return}p(f,{selectedRowData:f.map(function(M){return w.value.get(M)}),currentRowKey:E,currentRowData:c,type:I?"uncheck":"check"})}function P(c){var f,C=t.rowKey||"id",E=x.value.map(function(M){return H(M,C)}),k=((f=n.value)===null||f===void 0?void 0:f.filter(function(M){return!E.includes(M)}))||[],I=c?[].concat(fe(k),fe(E)):fe(k);p(I,{selectedRowData:c?I.map(function(M){return w.value.get(M)}):[],type:c?"check":"uncheck",currentRowKey:"CHECK_ALL_BOX"})}function K(c){var f=["multiple","single"].includes(c.type);return f?na(na({},c),{},{width:c.width||64,className:[e.checkCell,c.className],cell:function(E,k){return T(k)},title:c.type==="multiple"?j():c.title}):c}var D=function(f){var C=f.row,E=f.index,k=t.columns.findIndex(function($){return $.colKey==="row-select"}),I=!1;if(k!==-1){var M;I=(M=A({row:C,rowIndex:E,col:t.columns[k],colIndex:k}))===null||M===void 0?void 0:M.disabled}I||F(C)};de([l,o],function(){for(var c=0,f=l.value.length;c1)],r={asc:this.globalConfig.sortAscendingOperationText,desc:this.globalConfig.sortDescendingOperationText},o=this.allowSortTypes.map(function(l){var i,u,s=l===e.sortOrder?a.iconActive:a.iconDefault,v=e.globalConfig.sortCancelOperationText,d=l===e.sortOrder?v:r[l];return((u=e.hideSortTips)!==null&&u!==void 0?u:e.globalConfig.hideSortTips)?e.getSortIcon(l,s):L(Wo,Ie({content:d,placement:"right",showArrow:!1,class:e.tableSortClasses.iconDirection[l]},e.tooltipProps),vs(i=e.getSortIcon(l,s))?i:{default:function(){return[i]}})});return L("div",{class:n},[o])}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function ro(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 hs(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},h=0,g=D.length;h * @author owenm * @license MIT */function io(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;e=0)&&(a[r]=t[r]);return a}function Cs(t,e){if(t==null)return{};var a=ys(t,e),n,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(a[n]=t[n]))}return a}var xs="1.15.2";function It(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Mt=It(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Gn=It(/Edge/i),uo=It(/firefox/i),Mn=It(/safari/i)&&!It(/chrome/i)&&!It(/android/i),bl=It(/iP(ad|od|hone)/i),ml=It(/chrome/i)&&It(/android/i),wl={capture:!1,passive:!1};function Oe(t,e,a){t.addEventListener(e,a,!Mt&&wl)}function Ce(t,e,a){t.removeEventListener(e,a,!Mt&&wl)}function ya(t,e){if(!!e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ss(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function wt(t,e,a,n){if(t){a=a||document;do{if(e!=null&&(e[0]===">"?t.parentNode===a&&ya(t,e):ya(t,e))||n&&t===a)return t;if(t===a)break}while(t=Ss(t))}return null}var so=/\s+/g;function ut(t,e,a){if(t&&e)if(t.classList)t.classList[a?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(so," ").replace(" "+e+" "," ");t.className=(n+(a?" "+e:"")).replace(so," ")}}function ie(t,e,a){var n=t&&t.style;if(n){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(a=t.currentStyle),e===void 0?a:a[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=a+(typeof a=="string"?"":"px")}}function Sn(t,e){var a="";if(typeof t=="string")a=t;else do{var n=ie(t,"transform");n&&n!=="none"&&(a=n+" "+a)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(a)}function yl(t,e,a){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(a)for(;r=o:l=r<=o,!l)return n;if(n===_t())break;n=Xt(n,!1)}return!1}function Rn(t,e,a,n){for(var r=0,o=0,l=t.children;o2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=Cs(n,As);Yn.pluginEvent.bind(oe)(e,a,Tt({dragEl:U,parentEl:$e,ghostEl:ce,rootEl:ke,nextEl:ln,lastDownEl:va,cloneEl:Me,cloneHidden:Ut,dragStarted:In,putSortable:Ze,activeSortable:oe.active,originalEvent:r,oldIndex:yn,oldDraggableIndex:zn,newIndex:st,newDraggableIndex:Vt,hideGhostForTarget:_l,unhideGhostForTarget:Tl,cloneNowHidden:function(){Ut=!0},cloneNowShown:function(){Ut=!1},dispatchSortableEvent:function(i){et({sortable:a,name:i,originalEvent:r})}},o))};function et(t){Ps(Tt({putSortable:Ze,cloneEl:Me,targetEl:U,rootEl:ke,oldIndex:yn,oldDraggableIndex:zn,newIndex:st,newDraggableIndex:Vt},t))}var U,$e,ce,ke,ln,va,Me,Ut,yn,st,zn,Vt,oa,Ze,mn=!1,Ca=!1,xa=[],an,mt,ka,Na,fo,ho,In,pn,Hn,Wn=!1,la=!1,fa,Qe,Ma=[],Za=!1,Sa=[],Da=typeof document<"u",ia=bl,go=Gn||Mt?"cssFloat":"float",js=Da&&!ml&&!bl&&"draggable"in document.createElement("div"),Rl=function(){if(!!Da){if(Mt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),El=function(e,a){var n=ie(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Rn(e,0,a),l=Rn(e,1,a),i=o&&ie(o),u=l&&ie(l),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Xe(o).width,v=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+Xe(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&i.float!=="none"){var d=i.float==="left"?"left":"right";return l&&(u.clear==="both"||u.clear===d)?"vertical":"horizontal"}return o&&(i.display==="block"||i.display==="flex"||i.display==="table"||i.display==="grid"||s>=r&&n[go]==="none"||l&&n[go]==="none"&&s+v>r)?"vertical":"horizontal"},Fs=function(e,a,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,l=n?e.width:e.height,i=n?a.left:a.top,u=n?a.right:a.bottom,s=n?a.width:a.height;return r===i||o===u||r+l/2===i+s/2},Is=function(e,a){var n;return xa.some(function(r){var o=r[ct].options.emptyInsertThreshold;if(!(!o||dr(r))){var l=Xe(r),i=e>=l.left-o&&e<=l.right+o,u=a>=l.top-o&&a<=l.bottom+o;if(i&&u)return n=r}}),n},Dl=function(e){function a(o,l){return function(i,u,s,v){var d=i.options.group.name&&u.options.group.name&&i.options.group.name===u.options.group.name;if(o==null&&(l||d))return!0;if(o==null||o===!1)return!1;if(l&&o==="clone")return o;if(typeof o=="function")return a(o(i,u,s,v),l)(i,u,s,v);var b=(l?i:u).options.group.name;return o===!0||typeof o=="string"&&o===b||o.join&&o.indexOf(b)>-1}}var n={},r=e.group;(!r||da(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=a(r.pull,!0),n.checkPut=a(r.put),n.revertClone=r.revertClone,e.group=n},_l=function(){!Rl&&ce&&ie(ce,"display","none")},Tl=function(){!Rl&&ce&&ie(ce,"display","")};Da&&!ml&&document.addEventListener("click",function(t){if(Ca)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ca=!1,!1},!0);var rn=function(e){if(U){e=e.touches?e.touches[0]:e;var a=Is(e.clientX,e.clientY);if(a){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=a,n.preventDefault=void 0,n.stopPropagation=void 0,a[ct]._onDragOver(n)}}},Ks=function(e){U&&U.parentNode[ct]._isOutsideThisEl(e.target)};function oe(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Nt({},e),t[ct]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return El(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,i){l.setData("Text",i.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:oe.supportPointer!==!1&&"PointerEvent"in window&&!Mn,emptyInsertThreshold:5};Yn.initializePlugins(this,t,a);for(var n in a)!(n in e)&&(e[n]=a[n]);Dl(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:js,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Oe(t,"pointerdown",this._onTapStart):(Oe(t,"mousedown",this._onTapStart),Oe(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Oe(t,"dragover",this),Oe(t,"dragenter",this)),xa.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Nt(this,Ds())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(pn=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,U):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var a=this,n=this.el,r=this.options,o=r.preventOnFilter,l=e.type,i=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,v=r.filter;if(Ws(n),!U&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||r.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Mn&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=wt(u,r.draggable,n,!1),!(u&&u.animated)&&va!==u)){if(yn=ft(u),zn=ft(u,r.draggable),typeof v=="function"){if(v.call(this,e,u,this)){et({sortable:a,rootEl:s,name:"filter",targetEl:u,toEl:n,fromEl:n}),at("filter",a,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(d){if(d=wt(s,d.trim(),n,!1),d)return et({sortable:a,rootEl:d,name:"filter",targetEl:u,fromEl:n,toEl:n}),at("filter",a,{evt:e}),!0}),v)){o&&e.cancelable&&e.preventDefault();return}r.handle&&!wt(s,r.handle,n,!1)||this._prepareDragStart(e,i,u)}}},_prepareDragStart:function(e,a,n){var r=this,o=r.el,l=r.options,i=o.ownerDocument,u;if(n&&!U&&n.parentNode===o){var s=Xe(n);if(ke=o,U=n,$e=U.parentNode,ln=U.nextSibling,va=n,oa=l.group,oe.dragged=U,an={target:U,clientX:(a||e).clientX,clientY:(a||e).clientY},fo=an.clientX-s.left,ho=an.clientY-s.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,U.style["will-change"]="all",u=function(){if(at("delayEnded",r,{evt:e}),oe.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!uo&&r.nativeDraggable&&(U.draggable=!0),r._triggerDragStart(e,a),et({sortable:r,name:"choose",originalEvent:e}),ut(U,l.chosenClass,!0)},l.ignore.split(",").forEach(function(v){yl(U,v.trim(),Ba)}),Oe(i,"dragover",rn),Oe(i,"mousemove",rn),Oe(i,"touchmove",rn),Oe(i,"mouseup",r._onDrop),Oe(i,"touchend",r._onDrop),Oe(i,"touchcancel",r._onDrop),uo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),at("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Gn||Mt))){if(oe.eventCanceled){this._onDrop();return}Oe(i,"mouseup",r._disableDelayedDrag),Oe(i,"touchend",r._disableDelayedDrag),Oe(i,"touchcancel",r._disableDelayedDrag),Oe(i,"mousemove",r._delayedDragTouchMoveHandler),Oe(i,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&Oe(i,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(u,l.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&Ba(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?Oe(document,"pointermove",this._onTouchMove):a?Oe(document,"touchmove",this._onTouchMove):Oe(document,"mousemove",this._onTouchMove):(Oe(U,"dragend",this),Oe(ke,"dragstart",this._onDragStart));try{document.selection?ha(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(mn=!1,ke&&U){at("dragStarted",this,{evt:a}),this.nativeDraggable&&Oe(document,"dragover",Ks);var n=this.options;!e&&ut(U,n.dragClass,!1),ut(U,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),et({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(mt){this._lastX=mt.clientX,this._lastY=mt.clientY,_l();for(var e=document.elementFromPoint(mt.clientX,mt.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(mt.clientX,mt.clientY),e!==a);)a=e;if(U.parentNode[ct]._isOutsideThisEl(e),a)do{if(a[ct]){var n=void 0;if(n=a[ct]._onDragOver({clientX:mt.clientX,clientY:mt.clientY,target:e,rootEl:a}),n&&!this.options.dragoverBubble)break}e=a}while(a=a.parentNode);Tl()}},_onTouchMove:function(e){if(an){var a=this.options,n=a.fallbackTolerance,r=a.fallbackOffset,o=e.touches?e.touches[0]:e,l=ce&&Sn(ce,!0),i=ce&&l&&l.a,u=ce&&l&&l.d,s=ia&&Qe&&vo(Qe),v=(o.clientX-an.clientX+r.x)/(i||1)+(s?s[0]-Ma[0]:0)/(i||1),d=(o.clientY-an.clientY+r.y)/(u||1)+(s?s[1]-Ma[1]:0)/(u||1);if(!oe.active&&!mn){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(et({rootEl:$e,name:"add",toEl:$e,fromEl:ke,originalEvent:e}),et({sortable:this,name:"remove",toEl:$e,originalEvent:e}),et({rootEl:$e,name:"sort",toEl:$e,fromEl:ke,originalEvent:e}),et({sortable:this,name:"sort",toEl:$e,originalEvent:e})),Ze&&Ze.save()):st!==yn&&st>=0&&(et({sortable:this,name:"update",toEl:$e,originalEvent:e}),et({sortable:this,name:"sort",toEl:$e,originalEvent:e})),oe.active&&((st==null||st===-1)&&(st=yn,Vt=zn),et({sortable:this,name:"end",toEl:$e,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){at("nulling",this),ke=U=$e=ce=ln=Me=va=Ut=an=mt=In=st=Vt=yn=zn=pn=Hn=Ze=oa=oe.dragged=oe.ghost=oe.clone=oe.active=null,Sa.forEach(function(e){e.checked=!0}),Sa.length=ka=Na=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":U&&(this._onDragOver(e),Ls(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,n=this.el.children,r=0,o=n.length,l=this.options;rr.right+o||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>r.bottom+o||t.clientX>n.right&&t.clientY>n.top}function Bs(t,e,a,n,r,o,l,i){var u=n?t.clientY:t.clientX,s=n?a.height:a.width,v=n?a.top:a.left,d=n?a.bottom:a.right,b=!1;if(!l){if(i&&fav+s*o/2:ud-fa)return-Hn}else if(u>v+s*(1-r)/2&&ud-s*o/2)?u>v+s/2?1:-1:0}function zs(t){return ft(U)0?(n.splice(a+1,0,n[e]),n.splice(e,1)):(n.splice(a,0,n[e]),n.splice(e+1,1)),n}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function mo(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 jn(t){for(var e=1;ec?c*(g-1)+K:K}var _=function(D){if(!(!x.value&&!S.value)){var m=D==null?void 0:D.querySelector("tbody");if(!m)return console.error("tbody does not exist."),null;var h=jn({animation:150,ghostClass:s.ghost,chosenClass:s.chosen,dragClass:s.dragging,filter:".".concat(d.base,",.").concat(b.row),onMove:function(c){return!Jl(c.related,d.base)},onEnd:function(c){var f;if(c.newIndex!==c.oldIndex){wo(c.item),yo(c.from,c.item,c.oldIndex);var C=c.oldIndex,E=c.newIndex;(Re(t.firstFullRow)&&t.firstFullRow(Ye)||e.slots.firstFullRow||e.slots["first-full-row"])&&(C-=1,E-=1),i.value&&(C=O(C,i.value),E=O(E,i.value));var k={data:l.value,currentIndex:C,current:l.value[C],targetIndex:E,target:l.value[E],newData:bo(fe(t.data),C,E),e:c,sort:"row"};k.currentData=k.newData,(f=t.onDragSort)===null||f===void 0||f.call(t,k)}}},t.dragSortOptions);!m||(S.value?new oe(m,jn({},h)):new oe(m,jn(jn({},h),{},{handle:".".concat(s.handle)})))}},j=function(D,m){var h=jn({animation:150,dataIdAttr:"data-colkey",direction:"vertical",ghostClass:s.ghost,chosenClass:s.chosen,dragClass:s.dragging,handle:".".concat(v.thCellInner),onEnd:function(c){var f;if(c.newIndex!==c.oldIndex){m&&(wo(c.item),yo(c.from,c.item,c.oldIndex));var C=c.oldIndex,E=c.newIndex,k=c.target,I=m?C:E,M=m?E:C,$=k.children[I],Y=k.children[M],ee=wa(p.value,$.dataset.colkey),ne=wa(p.value,Y.dataset.colkey);(!ee||!ee.colKey)&&Be.error("Table","colKey is missing in ".concat(JSON.stringify(ee))),(!ne||!ne.colKey)&&Be.error("Table","colKey is missing in ".concat(JSON.stringify(ne))),I=no(t.columns,ee.colKey),M=no(t.columns,ne.colKey);var ae={data:p.value,currentIndex:I,current:ee,targetIndex:M,target:ne,newData:bo(fe(t.columns),I,M),e:c,sort:"col"};ae.currentData=ae.newData,(f=t.onDragSort)===null||f===void 0||f.call(t,ae)}}},t.dragSortOptions);!D||new oe(D,h)},A=function(D){if(!(!R.value||!D)){var m=D.querySelectorAll("thead > tr");if(m.length<=1){var h=Pe(m,1),g=h[0];j(g,!0)}else m==null||m.forEach(function(c){j(c,!1)})}};function T(K){w.value=K}function F(K){p.value=K}de([w,p,o,a],function(K){var D=Pe(K,4),m=D[0];D[1],D[2];var h=D[3];P(m,h)});function P(K,D){var m=K;if(!(!K||!m.$el||!D.showElement))var h=setTimeout(function(){_(m.$el),A(m.$el);var g=setTimeout(function(){m.$refs.affixHeaderRef&&A(m.$refs.affixHeaderRef),clearTimeout(g)});clearTimeout(h)},60)}return{innerPagination:i,isRowDraggable:S,isRowHandlerDraggable:x,isColDraggable:R,setDragSortPrimaryTableRef:T,setDragSortColumns:F}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Us(t){var e=Yt(),a=ht("table",t.locale),n=a.globalConfig,r=ot(),o=r.isLoadingClass,l=r.isLoadMoreClass,i=r.asyncLoadingClass,u=N(function(){return[i,z(z({},o,t.asyncLoading==="loading"),l,t.asyncLoading==="load-more")]});function s(){var d;!Lt(t.asyncLoading)||(d=t.onAsyncLoadingClick)===null||d===void 0||d.call(t,{status:t.asyncLoading})}function v(){var d=e("asyncLoading");if(Lt(d)){var b=t.asyncLoading,p={"load-more":n.value.loadingMoreText,loading:n.value.loadingText}[String(b)];return L("div",{class:u.value,onClick:s},[L(Lo,{indicator:b==="loading",loading:!!b,size:"small",text:p},null)])}return[null,!1,void 0].includes(d)?null:L("div",{class:u.value,onClick:s},[d])}return{renderAsyncLoading:v}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Co(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 _e(t){for(var e=1;e2?E-2:0),I=2;I1?ne-1:0),J=1;J0&&arguments[0]!==void 0?arguments[0]:{errors:[],errorMap:{}},g=h.errorMap;g&&Object.assign(m,g)}),r.value=m,(D=t.onValidate)===null||D===void 0||D.call(t,{result:m}),F({result:m})},P)})},p=function(O,_,j){i.value[O]||(i.value[O]=rr(_)),Object.entries(j).forEach(function(A){var T=Pe(A,2),F=T[0],P=T[1];$n(i.value[O],F,P)})},w=function(O){if(t.editableRowKeys){var _=H(O.row,t.rowKey||"id"),j=n.get(_);if(j){var A=j.findIndex(function(T){return T.col.colKey===O.col.colKey});A===-1?j.push(O):j[A]=O,n.set(_,j)}else n.set(_,[O])}},y=function(){r.value={}},S=function(O){var _=Vn(O.row,t.rowKey,O.col.colKey,O.colIndex);O.isEdit?l.value[_]=O:delete l.value[_]},x=function(O){var _,j=O.row,A=O.col,T=H(j,t.rowKey||"id"),F=i.value[T];if(F&&(_=t.editableRowKeys)!==null&&_!==void 0&&_.includes(T)){var P=Fn({},F);return $n(P,A.colKey,H(F,A.colKey)),P}return j};return de(function(){var R;return(R=a.value)===null||R===void 0?void 0:R.join(",")},function(R){var O=R.split(","),_=Object.keys(i.value);_.forEach(function(j){O.includes(j)||delete i.value[j]})}),{editedFormData:i,errorListMap:r,editableKeysMap:o,validateTableData:b,validateRowData:v,onRuleChange:w,clearValidateData:y,onUpdateEditedCell:p,getEditRowData:x,onPrimaryTableCellEditChange:S}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function So(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;e1&&arguments[1]!==void 0?arguments[1]:!1,Je=[],Ge=function(){var Zt,Qt,en,tn,bt,we=jt({},ve[pt]),fn=((Zt=we.children)===null||Zt===void 0?void 0:Zt.length)||((Qt=j.value)===null||Qt===void 0?void 0:Qt.includes(we.colKey));if(!fn&&(e.columnController||e.displayColumns||e.defaultDisplayColumns)&&!Fe)return 1;we=I(we);var Ht=e.sort;if(we.sorter&&e.showSortColumnBgColor){var Pn=Ht instanceof Array?Ht:[Ht],nn=Pn.find(function(De){return De&&De.sortBy===we.colKey&&De.descending!==void 0});nn&&(we.className=we.className instanceof Array?we.className.concat(w.sortColumn):[we.className,w.sortColumn])}if(we.sorter||we.filter){var Ot=Ea(a.slots,we,pt),Rt=we,_a=Rt.ellipsisTitle;we.title=function(De,Se){var We,Et=we.sorter?g(Se):null,Wt=we.filter?J(Se):null,An=(We=i.value)===null||We===void 0?void 0:We.tableContentRef;return gt([Ot,Et,Wt],Se.col,Se.colIndex,_a,An,{classPrefix:v,ellipsisOverlayClassName:O.value!=="medium"?R[O.value]:""})},we.ellipsisTitle=!1}if((en=we.edit)!==null&&en!==void 0&&en.component){var Ta=we.cell;we.cell=function(De,Se){var We=jt(jt({},Se),{},{row:te(Se),oldCell:Ta,rowKey:e.rowKey||"id",tableBaseClass:b,cellEmptyContent:e.cellEmptyContent,onChange:Ae,onValidate:e.onRowValidate,onRuleChange:V,onEditableChange:le});if(e.editableRowKeys){var Et,Wt=H(Se.row,e.rowKey||"id");We.editable=_n.value[Wt]||!1;var An=[Wt,Se.col.colKey].join("__"),Jn=(Et=Dn.value)===null||Et===void 0?void 0:Et[An];Jn&&(We.errors=Jn)}return e.editableCellState&&(We.readonly=!e.editableCellState(Se)),L(Xs,Ie(We,{onUpdateEditedCell:Z}),a.slots)}}if((tn=we.children)!==null&&tn!==void 0&&tn.length){var ye;we.children=be(we.children,Fe||((ye=j.value)===null||ye===void 0?void 0:ye.includes(we.colKey)))}(!we.children||(bt=we.children)!==null&&bt!==void 0&&bt.length)&&Je.push(we)},pt=0,Jt=ve.length;pt2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=H(t,e);return a||n?"".concat(r,"_").concat(a||0,"_").concat(n||0,"}"):r}var Js=function(){function t(){ei(this,t),z(this,"treeDataMap",new Map),z(this,"expandAllRowIndex",void 0),this.treeDataMap=new Map}return Ql(t,[{key:"initialTreeStore",value:function(a,n,r){var o;(o=this.treeDataMap)===null||o===void 0||o.clear(),this.initialTreeDataMap(this.treeDataMap,a,n.find(function(l){return l.colKey==="row-select"}),r)}},{key:"getAllUniqueKeys",value:function(a,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],o=0,l=a.length;o2&&arguments[2]!==void 0?arguments[2]:[],o=0,l=a.length;o=0){var l=(o.expandChildrenLength||0)+1;if(n.splice(o.rowIndex,l),o.parent){var i=H(o.parent.row,r.childrenKey),u=i.findIndex(function(s){return H(s,r.rowKey)===a});i.splice(u,1),bn(this.treeDataMap,o.parent.row,-1*l,"delete",r)}this.treeDataMap.delete(a),on(this.treeDataMap,n,{minRowIndex:o.rowIndex,rowKey:r.rowKey,type:"remove"})}else Be.warn("EnhancedTable","Can not remove this node, which is not appeared.");return n}},{key:"removeChildren",value:function(a,n,r){var o=this.treeDataMap.get(a);if(o&&o.rowIndex>=0){var l=o.expandChildrenLength||0;l&&n.splice(o.rowIndex+1,l),o.parent&&bn(this.treeDataMap,o.parent.row,-1*l,"delete",r),o.expandChildrenLength=0,o.expanded=!1,$n(o.row,r.childrenKey,void 0),this.treeDataMap.set(a,o),l&&on(this.treeDataMap,n,{minRowIndex:o.rowIndex+1,rowKey:r.rowKey,type:"remove"})}else Be.warn("EnhancedTable","Can not remove this node's children, which is not appeared.");return n}},{key:"appendTo",value:function(a,n,r,o){var l=this.treeDataMap.get(a);if(!this.validateDataExist(l,a))return r;for(var i=H(l.row,o.childrenKey),u=l.expanded||!(i!=null&&i.length),s=n instanceof Array?n:[n],v=[],d=-1,b=0,p=s.length;bl){var y=a.slice(b,o),S=p.concat(w,y);a.splice(l,S.length),a.splice.apply(a,[l,0].concat(fe(S))),on(this.treeDataMap,a,{rowKey:r.rowKey,minRowIndex:l,maxRowIndex:d})}else{var x=a.slice(d,l),R=x.concat(w,p);a.splice(o,R.length),a.splice.apply(a,[o,0].concat(fe(R))),on(this.treeDataMap,a,{rowKey:r.rowKey,minRowIndex:o,maxRowIndex:b})}if(s.parent){for(var O=s.parent.row[r.childrenKey],_=0,j=-1,A=-1,T=0,F=O.length;T=2));T++);O[j]=n.target,O[A]=n.current}return{dataSource:a,result:!0}}},{key:"expandAll",value:function(a,n){var r=this;this.expandAllRowIndex=0;var o=[],l=function i(u,s){for(var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,d=0,b=u.length;d2&&arguments[2]!==void 0?arguments[2]:"data",l=[];return a.forEach(function(i){var u=H(i,n.rowKey),s=r.treeDataMap.get(u);!s.expanded||(o==="unique"?l.push(u):o==="data"?l.push(i):l.push(s))}),l}},{key:"initialTreeDataMap",value:function(a,n,r,o){for(var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,u=0,s=n.length;u0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=[],n=[],r=new Map,o=new Map,l=0,i=t.length;l0&&arguments[0]!==void 0?arguments[0]:"expand-all",A=arguments.length>1?arguments[1]:void 0,T=A||l.value;n.value=a.value.expandAll(T,r.value);var F=n.value.map(function(P){return Ft(P,r.value.rowKey)});w(F,{row:void 0,rowState:void 0,rowIndex:void 0,type:"expand",trigger:j}),y.value.type="expand-all"}function x(){n.value=fe(a.value.foldAll(n.value,r.value)),w([],{row:void 0,rowState:void 0,rowIndex:void 0,type:"fold",trigger:"fold-all"})}function R(j,A){var T,F=j.row,P=j.rowIndex;y.value=$a({type:"user-reaction-change"},j);var K=Ft(F,r.value.rowKey),D=a.value.treeDataMap.get(K),m=fe(p.value);if(D.expanded){for(var h=a.value.getExpandedChildrenKeys([F],r.value),g=0,c=m.length;g2&&arguments[2]!==void 0?arguments[2]:[],F=Zs(A,T),P=F.addedList,K=F.removedList;return a.value.expandTreeNode(P,j,r.value),a.value.foldTreeNode(K,j,r.value),fe(j)}de([p,l],function(j,A){var T=Pe(j,1),F=T[0],P=Pe(A,1),K=P[0];if(!(!a.value.treeDataMap.size||!l.value.length)){if(y.value.type==="user-reaction-change"){var D=y.value||{},m=D.row,h=D.rowIndex;n.value=fe(a.value.toggleExpandData({row:m,rowIndex:h},fe(n.value),r.value))}else y.value.type==="props-change"&&O(n.value,F,K);y.value.type="props-change"}});var _=function(A){var T,F;(T=u.value)!==null&&T!==void 0&&T.defaultExpandAll&&!s.value?(S("default-expand-all",fe(A)),s.value=!0):(F=p.value)!==null&&F!==void 0&&F.length&&Gt(function(){n.value=O(fe(A),p.value,[])})};return{tExpandedTreeNode:p,isDefaultExpandAllExecute:s,isDefaultExpandedTreeNodesExecute:v,expandAll:S,foldAll:x,onExpandFoldIconClick:R,updateExpandOnDataChange:_}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Do(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;e0&&arguments[0]!==void 0?arguments[0]:"",X=arguments.length>1?arguments[1]:void 0;if(!B){p.value=d.value.appendToRoot(X,p.value,x.value);return}p.value=fe(d.value.appendTo(B,X,p.value,x.value))}function Y(B,X){p.value=fe(d.value.insertAfter(B,X,p.value,x.value))}function ee(B,X){p.value=fe(d.value.insertBefore(B,X,p.value,x.value))}function ne(B){var X=d.value.swapData(p.value,B,x.value);if(X.result)p.value=fe(X.dataSource);else{var Q,q={code:X.code,reason:X.reason};(Q=t.onAbnormalDragSort)===null||Q===void 0||Q.call(t,q)}}function ae(){return d.value.getTreeNode(p.value,x.value)}function J(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data";return d.value.getTreeExpandedRow(p.value,x.value,B)}return{store:d,rowDataKeys:x,dataSource:p,swapData:ne,setData:E,getData:k,remove:I,removeChildren:M,appendTo:$,insertAfter:Y,insertBefore:ee,formatTreeColumn:C,toggleExpandData:c,expandAll:A,foldAll:T,getTreeNode:ae,resetData:h,getTreeExpandedRow:J,onExpandFoldIconClick:P}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function _o(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 ca(t){for(var e=1;e0&&K=0)return T.rowIndex;if(T.rowIndex<0)return A(T.parent)},j=function(T){var F=T.index;if(!F&&F!==0){if(!T.key){Be.error("Table","scrollToElement: one of `index` or `key` must exist.");return}var P=b.value.get(T.key);F=_(P,T.key),(F<0||F===void 0)&&Be.error("Table","".concat(T.key," does not exist in data, check `rowKey` or `data` please."))}n.value.scrollToElement(Dt(Dt({},T),{},{index:F}))};return a.expose(Dt(Dt({store:o.value,dataSource:l.value},v),{},{primaryTableRef:n,validateRowData:function(T){return n.value.validateRowData(T)},validateTableData:function(){return n.value.validateTableData()},clearValidateData:function(){n.value.clearValidateData()},refreshTable:function(){n.value.refreshTable()},scrollToElement:j})),function(){var A,T=Mo(),F=T.vnode,P=Dt(Dt({},F.props),{},{rowKey:e.rowKey||"id",data:l.value,columns:x.value,indeterminateSelectedRowKeys:w.value,disableDataPage:Boolean(e.tree&&Object.keys(e.tree).length),onSelectChange:y,onDragSort:R,rowClassName:function(D){var m=D.row,h=H(m,e.rowKey||"id"),g=b.value.get(h);return g?["".concat(d.value,"-table-tr--level-").concat(g.level),e.rowClassName]:[e.rowClassName]}});return(A=e.tree)!==null&&A!==void 0&&A.expandTreeNodeOnClick&&(P.onRowClick=O),L(hr,Ie(P,{ref:n}),a.slots)}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */qt(fl);qt(hr);qt(oc);var lc=rr(hr),fc=qt(lc,"TTable");export{vc as M,fc as T};