import{P as sn,Q as cn,S as dn,b as It,i as Yt,a3 as Re,ak as Se,aH as Nl,ai as Te,w as qt,at as Ao,as as Ml,au as Bl,av as jo,n as Pe,g as ve,e as zl,c as Fo,f as z,m as Lt,h as Ko,aA as Un,l as Io,aI as Pa,aJ as Hl,p as vt,aK as Wl,aB as Ua,aL as $l,aM as Lo,ar as Vl,a1 as H,aN as Ul,aO as Xl,aP as Gl,aw as Yl,d as gt,U as ql,Y as Xa,am as Jl,aQ as br,aR as Zl,ac as ko,Z as _n,aS as Ql,O as pa,k as Aa,a5 as ei,aT as ti,a2 as lr,an as ni,aU as ai,aV as ri}from"./index.abba0c49.js";import{d as He,c as N,j as W,w as ce,o as pt,bQ as oi,bR as li,b as Ra,aI as k,n as Gt,t as Ie,i as mr,aV as Ke,bA as ii,u as ui,x as si,y as ci,aY as No,p as Mo,r as Xn,h as Ye,aU as vn,aZ as di,g as Bo,s as vi}from"./arco.b087a425.js";import{_ as zo,b as Ho,o as Wo,c as wr,t as $o,d as ir,T as Vo,p as xn,P as fi,e as Uo,u as hi,f as kt,A as Xo,g as Go,h as Ga,i as yr,E as Yo,j as qo,k as Jo,l as gi,m as ba,C as Ya,a as Zo,n as pi,q as bi,r as mi}from"./dep-71c4f289.dccc98fb.js";import{i as Sn,b as Qo,_ as el,c as wi,l as ze,I as yi}from"./index.eda8ee4b.js";import{_ as qa,r as yn,i as Ci,s as $n,v as tl}from"./form-model.9a62c8df.js";function Cr(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;et.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-add-rectangle",r.value]),i=N(()=>xr(xr({},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()=>cn(xi,u.value)}});const Oi=Si;function Sr(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 Or(t){for(var e=1;et.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-chevron-right-circle",r.value]),i=N(()=>Or(Or({},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()=>cn(Ri,u.value)}});const _i=Ei;function Rr(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 Er(t){for(var e=1;et.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-edit-1",r.value]),i=N(()=>Er(Er({},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()=>cn(Di,u.value)}});const Pi=Ti;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 Dr(t){for(var e=1;et.size),{className:r,style:o}=sn(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()=>cn(Ai,u.value)}});const Fi=ji;function Tr(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 Pr(t){for(var e=1;et.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-minus-rectangle",r.value]),i=N(()=>Pr(Pr({},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()=>cn(Ki,u.value)}});const Li=Ii;function Ar(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 jr(t){for(var e=1;et.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-move",r.value]),i=N(()=>jr(jr({},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()=>cn(ki,u.value)}});const fc=Ni;function Fr(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 Kr(t){for(var e=1;et.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-setting",r.value]),i=N(()=>Kr(Kr({},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()=>cn(Mi,u.value)}});const zi=Bi;/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Hi={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.9 * (c) 2024 tdesign * @license MIT */var Wi=He({name:"TAffix",props:Hi,emits:["fixedChange"],setup:function(e,a){var n,r=It("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(),p=W(),b=0,w=function(){s.value||(b=window.requestAnimationFrame(function(){var O,S;b=0;var D=(O=(S=l.value)===null||S===void 0?void 0:S.getBoundingClientRect())!==null&&O!==void 0?O:{top:0,width:0,height:0},j=D.top,A=D.width,P=D.height,F=0;d.value instanceof HTMLElement&&(F=d.value.getBoundingClientRect().top);var T,I=j-F,_=d.value[d.value instanceof Window?"innerHeight":"clientHeight"]-P,m=F+_-e.offsetBottom;if(!Sn(e.offsetTop)&&I<=e.offsetTop?T=F+e.offsetTop:!Sn(e.offsetBottom)&&j>=m?T=m:T=!1,i.value){var h=T!==!1,g=l.value.contains(u.value);h?(i.value.className=r.value,p.value={top:"".concat(T,"px"),width:"".concat(A,"px"),height:"".concat(P,"px"),zIndex:e.zIndex},g||(u.value.style.width="".concat(A,"px"),u.value.style.height="".concat(P,"px"),l.value.appendChild(u.value))):(i.value.removeAttribute("class"),p.value=void 0,g&&u.value.remove()),a.emit("fixedChange",h,{top:Number(T)}),Re(e.onFixedChange)&&e.onFixedChange(h,{top:Number(T)})}s.value=!1}),s.value=!0)},y=function(){var C=qa(yn.mark(function O(){return yn.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,Gt();case 2:if(!v.value){D.next=4;break}return D.abrupt("return");case 4:d.value=Nl(e.container),Te(d.value,"scroll",w),Te(window,"resize",w),v.value=!0;case 8:case"end":return D.stop()}},O)}));return function(){return C.apply(this,arguments)}}(),R=function(){!d.value||!v.value||(Se(d.value,"scroll",w),Se(window,"resize",w),b&&window.cancelAnimationFrame(b),v.value=!1)};return ce(function(){return e.offsetTop},function(){w()}),ce(function(){return e.offsetBottom},function(){w()}),ce(function(){return e.zIndex},function(){w()}),pt(y),oi(y),li(R),Ra(R),{affixWrapRef:l,affixRef:i,bindScroll:y,unbindScroll:R,handleScroll:w,scrollContainer:d,renderTNodeJSX:o,affixStyle:p}},render:function(){return k("div",{ref:"affixWrapRef"},[k("div",{ref:"affixRef",style:this.affixStyle},[this.renderTNodeJSX("default")])])}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var Zn=qt(Wi);/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var $i=Ao,Vi=zo,Ui=Ho,Xi=Ml,Gi=Bl,Yi=jo,qi=200;function Ji(t,e,a,n){var r=-1,o=Vi,l=!0,i=t.length,u=[],s=e.length;if(!i)return u;a&&(e=Xi(e,Gi(a))),n?(o=Ui,l=!1):e.length>=qi&&(o=Yi,l=!1,e=new $i(e));e:for(;++r2&&arguments[2]!==void 0?arguments[2]:{},n=a.window,r=n===void 0?ru:n,o=el(a,au),l,i=r&&"MutationObserver"in r,u=function(){l&&(l.disconnect(),l=void 0)},s=ce(function(){return ou(t)},function(d){u(),i&&r&&d&&(l=new MutationObserver(e),l.observe(d,o))},{immediate:!0}),v=function(){u(),s()};return lu(v),{isSupported:i,stop:v}}/** * tdesign v1.9.9 * (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;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,x=h.offsetLeft,E=h.offsetTop;c?y.value={"transition-property":g,width:"".concat(c,"px"),height:"".concat(f,"px"),left:"".concat(x,"px"),top:"".concat(E,"px")}:R()}},O;ce(i,qa(yn.mark(function _(){return yn.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,Gt();case 2:C();case 3:case"end":return h.stop()}},_)}))),pt(function(){C(!0),wi(s,$o(qa(yn.mark(function m(){return yn.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,Gt();case 2:C();case 3:case"end":return g.stop()}},m)})),300));var _=s.value.querySelector("".concat(w.value," .").concat(v.value,"__label"));_&&(O=iu(_,function(m){m.forEach(function(h){h.type==="characterData"&&C()})},{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}),No(function(){var _;(_=O)===null||_===void 0||_.stop()});var S=Ie(e),D=S.name,j=S.disabled;Mo(al,Xn({name:D,disabled:j,value:i,allowUncheck:e.allowUncheck,setValue:u}));var A=It("radio-group"),P=Un(),F=function(){if(e.variant.includes("filled")&&!Ci(i.value))return k("div",{style:y.value,class:"".concat(A.value,"__bg-block")},null)},T=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()}),k(ur,{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]}})})},I=N(function(){return["".concat(A.value),b.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 k("div",{ref:s,class:I.value},[P("default")||T(),F()])}}});/** * tdesign v1.9.9 * (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 Fa(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 ll(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=b),w>1&&(y.colspan=w),n.set(p,y),p!=null&&(d=p.children)!==null&&d!==void 0&&d.length?r(p.children,u):u.push(p)}},o=[];return r(t,o),{rowspanAndColspanMap:n,leafColumns:o}}function hu(t){var e=function(r,o){for(var l,i=[],u=[],s=0,v=r.length;s1}),i=function(s,v,d,p,b,w){var y=Pe(s,3),R=y[0],C=y[1],O=y[2],S=z(z({},a.sortable,C),n.filterable,O),D=Re(p)?p(Ye,{col:v,colIndex:d}):void 0,j=Boolean(p!==void 0?p:v.ellipsis);return k("div",{class:S},[k("div",{class:a.title},[j?k(sr,{placement:"bottom",attach:t.attach||(b?function(){return b}:void 0),tooltipContent:D&&function(){return D},tooltipProps:vt(p)==="object"?p:void 0,classPrefix:w==null?void 0:w.classPrefix,overlayClassName:w==null?void 0:w.ellipsisOverlayClassName},bu(R)?R:{default:function(){return[R]}}):k("div",null,[R]),Boolean(C||O)&&k("div",{class:n.iconWrap},[C,O])])])};return{thList:o,isMultipleHeader:l,spansAndLeafNodes:r,renderTitleWidthIcon:i}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function zr(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 mu(t){for(var e=1;eK}return!(x||e.value||f===d.value.length-1)},I=function(h,g,c,f){return g?j(h,g,c,f):P(c,f)},_=function(h,g,c){var f,x,E;if(!!R.draggingCol){var L=R.draggingCol,K=L.getBoundingClientRect(),B=(f=a.value)===null||f===void 0?void 0:f.getBoundingClientRect(),$=(x=v.value[g.colKey])===null||x===void 0?void 0:x.next,Y=(E=v.value[g.colKey])===null||E===void 0?void 0:E.prev,ee=O(g)?A(L,g,$,K,B):I(g,$,K,B),ae=ee.resizeLinePos,ne=ee.minResizeLineLeft,Q=ee.maxResizeLineLeft;if(R.isDragging=!0,R.draggingStart=h.x,s!=null&&s.value){C.display="block",C.height="".concat(B.bottom-K.top,"px"),C.left="".concat(ae,"px");var M=a.value.parentElement.getBoundingClientRect();C.bottom="".concat(M.bottom-B.bottom,"px")}var X=function(){var fe;if(!!R.isDragging){var he=ae-parseFloat(C.left)||0,Le=r("calculate"),We=(fe=v.value[g.colKey])===null||fe===void 0?void 0:fe.current;if(!!We){var qe=R.effectCol==="next"?We.nextSibling:We.prevSibling,Ne=mu({},Le),nt=g.resizable!==!1?g:qe,ut=R.effectCol==="next"?We.nextSibling:g,st=T(Ne,ut,he,c);R.effectCol==="next"?O(g)?L.dataset.colkey!==g.colKey?Ne[$.colKey]+=he:Ne[nt.colKey]+=he:(Ne[nt.colKey]-=he,st&&(Ne[$.colKey]+=he)):R.effectCol==="prev"&&(st&&(Ne[nt.colKey]+=he),Y&&(Ne[Y.colKey]-=he)),o(Ne);var Tt=F(Ne);l(Math.round(Tt)),i(),R.isDragging=!1,R.draggingCol=null,R.effectCol=null,L.style.cursor="",C.display="none",C.left="0",Se(document,"mouseup",X),Se(document,"mousemove",q),document.onselectstart=p,document.ondragstart=b,u==null||u({columnsWidth:Ne})}}},q=function(fe){if(R.isDragging){var he=ae+fe.x-R.draggingStart;C.left="".concat(Math.min(Math.max(he,ne),Q),"px")}};Te(document,"mouseup",X),Te(document,"mousemove",q),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1}}};return{resizeLineRef:s,resizeLineStyle:C,onColumnMouseover:S,onColumnMousedown:_,setEffectColMap:y}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function xu(){}var Su=xu,Ka=$l,Ou=Su,Ru=Lo,Eu=1/0,_u=Ka&&1/Ru(new Ka([,-0]))[1]==Eu?function(t){return new Ka(t)}:Ou,Du=_u,Tu=Ao,Pu=zo,Au=Ho,ju=jo,Fu=Du,Ku=Lo,Iu=200;function Lu(t,e,a){var n=-1,r=Pu,o=t.length,l=!0,i=[],u=i;if(a)l=!1,r=Au;else if(o>=Iu){var s=e?null:Fu(t);if(s)return Ku(s);l=!1,r=ju,u=new Tu}else u=e?[]:i;e:for(;++n6&&arguments[6]!==void 0?arguments[6]:0;if(!n||!n.length)return{style:void 0,classes:void 0};var i=ea-1-n[1],s=a-n[1],v=(r==null?void 0:r.get(t))||{},d=z(z(z(z({},o.top,i),o.bottom,u),o.firstBottom,e===s),o.withoutBorderBottom,e===s-1),p={top:i?"".concat(v.top-l,"px"):void 0,bottom:u?"".concat(v.bottom+l,"px"):void 0};return{style:p,classes:d}}function qu(t,e,a,n){var r=Ie(t),o=r.columns,l=r.tableLayout,i=r.tableContentWidth,u=r.fixedRows,s=r.firstFullRow,v=r.lastFullRow,d=r.maxHeight,p=r.headerAffixedTop,b=r.footerAffixedBottom,w=r.bordered,y=r.resizable,R=r.allowResizeColumnWidth,C=W([]),O=W(),S=W(),D=W(!1),j=W(!1),A=W(),P=W(6),F=W(new Map),T=Xn({left:!1,right:!1}),I=W({left:0,top:0}),_=W(0),m=W(0),h=W({}),g=W(!1),c=W(!1),f=W(!1),x=N(function(){var re,V;return(re=(V=R.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 L(re){A.value=re}function K(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]:[],J=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[we].fixed!=="left";)we-=1;var Ee=V[we],Ae=te===0&&(J==null?void 0:J.left)||0,Me=G.get((Ee==null?void 0:Ee.colKey)||te-1);ue&&(ue.left=((Me==null?void 0:Me.left)||Ae)+((Me==null?void 0:Me.width)||0)),(ge=pe.children)!==null&&ge!==void 0&&ge.length&&B(pe.children,G,ue)}},$=function(V,G){for(var J=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=we.length-ue;Ct--){var xt=V[V.length-(we.length-Ct)],ye=H(we[Ct],Ae),de=G.get(ye)||{},Fe=H(we[Ct+1],Ae),Je=G.get(Fe)||{},Xe=0;Ct===we.length-1&&(Xe=(te==null?void 0:te.getBoundingClientRect().height)||0),de.bottom=(Je.bottom||Xe)+(Je.height||0),G.set(ye,gn(gn({},de),{},{height:(xt==null?void 0:xt.getBoundingClientRect().height)||0}))}},ae=function(V,G){if(F.value.clear(),!!V){var J=V.querySelector("thead");J&&Y(J.children,G);var te=V.querySelector("tbody"),le=V.querySelector("tfoot");te&&ee(te.children,G,J,le),F.value=G}},ne,Q=function(V,G){if(!(!g.value||!V)){var J=V.scrollLeft;if(!(ne===J&&(!G||!G.skipScrollLimit))){ne=J;var te=V.clientWidth+J0;T.left===le&&T.right===te||(T.left=le&&f.value,T.right=te&&c.value)}}},M=function(V){for(var G=0;GS.value.clientHeight,j.value=S.value.scrollWidth>S.value.clientWidth;var G=S.value.getBoundingClientRect();I.value={top:G.top,left:G.left},clearTimeout(V)}},0)},Z=function(V){m.value!==V&&(m.value=V)},fe=function(){var V,G,J=(V=S.value)===null||V===void 0?void 0:V.getBoundingClientRect();if(!!J){var te=D.value?P.value:0;_.value=J.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&&Z(le.width)}},he=function(){var V,G,J,te,le,ge,pe,ue;(V=n.paginationAffixRef.value)===null||V===void 0||(G=V.handleScroll)===null||G===void 0||G.call(V),(J=n.horizontalScrollAffixRef.value)===null||J===void 0||(te=J.handleScroll)===null||te===void 0||te.call(J),(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={},J=0,te=V.length;J0&&arguments[0]!==void 0?arguments[0]:0,zt=arguments.length>1?arguments[1]:void 0;return at+zt}),Pt=S.value.clientWidth,Bt=Me-Ee;Z(Math.max(Pt,Bt))}});var st=function(){qe(),q(),he(),(g.value||D.value)&&(X(),Q(S.value,{skipScrollLimit:!0})),l.value==="auto"&&We(ut("calculate"))},Tt=ir(function(){st()},30),je=null;function Dn(re){typeof window>"u"||Ua()<11||typeof window.ResizeObserver>"u"||(Se(window,"resize",Tt),je=new window.ResizeObserver(function(){var V=setTimeout(function(){st(),clearTimeout(V)},200)}),je.observe(re),O.value=re)}pt(function(){var re=Wl();P.value=re,qe();var V=g.value||D.value||!E.value||!C.value.length,G=typeof window<"u",J=G&&typeof window.ResizeObserver<"u";(V&&Ua()<11||!J)&&Te(window,"resize",Tt)}),Ra(function(){var re,V;typeof window<"u"&&Se(window,"resize",Tt),(re=je)===null||re===void 0||re.unobserve(O.value),(V=je)===null||V===void 0||V.disconnect()});var Tn=function(V){C.value=V},Pn=function(){X(),q()};return{tableWidth:_,tableElmWidth:m,thWidthList:h,isFixedHeader:D,isWidthOverflow:j,tableContentRef:S,isFixedColumn:g,showColumnShadow:T,rowAndColFixedPosition:F,virtualScrollHeaderPos:I,scrollbarWidth:P,setData:Tn,refreshTable:st,setTableElmWidth:Z,emitScrollEvent:nt,updateThWidthListHandler:qe,updateColumnFixedShadow:Q,setUseFixedTableElmRef:L,getThWidthList:ut,updateThWidthList:We,addTableResizeObserver:Dn,updateTableAfterColumnResize:Pn}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Vr(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 Ju(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:1,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:10,R=t.data,C=Boolean(!o.value&&R.length>y);if(v.value=C,C){var O=(w-1)*y,S=w*y;s.value=R.slice(O,S)}else s.value=R};ce(function(){var b,w;return[(b=n.value)===null||b===void 0?void 0:b.current,(w=n.value)===null||w===void 0?void 0:w.pageSize,r.value.length,o]},function(){if(!(!n.value||!n.value.current)){var b=n.value,w=b.current,y=b.pageSize;u.value={current:w,pageSize:y},d(n.value.current,n.value.pageSize)}},{immediate:!0}),ce([r],function(){var b,w;if(!(!n.value||!n.value.defaultCurrent)){var y=Boolean(n.value.current);y||d((b=u.value.current)!==null&&b!==void 0?b:n.value.defaultCurrent,(w=u.value.pageSize)!==null&&w!==void 0?w:n.value.defaultPageSize)}},{immediate:!0});var p=function(){if(!t.pagination)return null;var w=Ju({},t.pagination);return delete w.onChange,k("div",{class:"".concat(i.value,"-table__pagination")},[k(fi,Ke(w,{onChange:function(R){var C,O,S;(C=t.pagination)===null||C===void 0||(O=C.onChange)===null||O===void 0||O.call(C,R),u.value=R,d(R.current,R.pageSize),(S=t.onPageChange)===null||S===void 0||S.call(t,R,s.value)}}),{totalContent:e.slots.totalContent})])};return{isPaginateData:v,dataSource:s,innerPagination:u,renderPagination:p}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Qu(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)M.height},R=function(M){return ql(M)?0:M.offsetTop||0},C=function(){var M,X,q;if(!(!p.value&&!d.value)){var Z=(M=e.value)===null||M===void 0?void 0:M.getBoundingClientRect(),fe=(X=e.value)===null||X===void 0||(X=X.querySelector("thead"))===null||X===void 0?void 0:X.getBoundingClientRect(),he=(fe==null?void 0:fe.height)||0,Le=(q=n.value)===null||q===void 0?void 0:q.getBoundingClientRect();if((t.headerAffixedTop||d.value)&&a.value){var We=R(t.headerAffixProps||t.headerAffixedTop),qe=(Le==null?void 0:Le.height)||0,Ne=Math.abs(Z.top)-1*fe.height),l.value=Ne}if(t.footerAffixedBottom&&n!==null&&n!==void 0&&n.value)i.value=y(Le,Z,he);else if(t.horizontalScrollAffixedBottom&&r!==null&&r!==void 0&&r.value){var nt=r.value.getBoundingClientRect();i.value=y(nt,Z,he)}if(t.paginationAffixedBottom&&o.value){var ut=o.value.getBoundingClientRect();u.value=y(ut,Z,he)}}},O=function(){C()},S=function(){w(n.value)},D=function(){w(a.value)},j=function(){w(r.value)},A=function(){w(e.value)},P=function(){Te(n.value,"scroll",S)},F=function(){Se(n.value,"scroll",S)},T=function(){Te(a.value,"scroll",D),x()},I=function(){s||Se(a.value,"scroll",D),E()},_=function(){Te(r.value,"scroll",j)},m=function(){Se(r.value,"scroll",j)},h=function(){Te(e.value,"scroll",A),x()},g=function(){s||Se(e.value,"scroll",A),E()},c=function(){s=!0},f=function(){s=!1,v||(Se(a.value,"scroll",D),Se(e.value,"scroll",A))},x=function(){v=!0},E=function(){v=!1},L=[],K=function(M){var X=ir(function(he){Se(M,"scroll",he)},200);function q(){w(M),X(q)}function Z(he){he.composedPath().includes(M)&&(L.forEach(function(Le){return Le()}),L.length=0,Te(M,"scroll",q),X(q),L.push(function(){Se(M,"scroll",q)}))}Te(M,"touchstart",Z);function fe(){Se(M,"touchstart",Z)}return{removeElementTouchScrollListener:fe}},B=[],$=function(){B.forEach(function(M){return M()}),B.length=0},Y=function(){Se(window,"mousedown",c),Se(window,"mouseup",f),$(),a.value&&(Se(a.value,"mouseenter",T),Se(a.value,"mouseleave",I)),n.value&&(Se(n.value,"mouseenter",P),Se(n.value,"mouseleave",F)),e.value&&(Se(e.value,"mouseenter",h),Se(e.value,"mouseleave",g)),r.value&&(Se(r.value,"mouseenter",_),Se(r.value,"mouseleave",m))},ee=function(){if(Te(window,"mousedown",c),Te(window,"mouseup",f),Y(),a.value){Te(a.value,"mouseenter",T),Te(a.value,"mouseleave",I);var M=K(a.value),X=M.removeElementTouchScrollListener;B.push(X)}if(t.footerAffixedBottom&&n.value){Te(n.value,"mouseenter",P),Te(n.value,"mouseleave",F);var q=K(n.value),Z=q.removeElementTouchScrollListener;B.push(Z)}if(t.horizontalScrollAffixedBottom&&r.value){Te(r.value,"mouseenter",_),Te(r.value,"mouseleave",m);var fe=K(r.value),he=fe.removeElementTouchScrollListener;B.push(he)}if((p.value||d.value)&&e.value){Te(e.value,"mouseenter",h),Te(e.value,"mouseleave",g);var Le=K(e.value),We=Le.removeElementTouchScrollListener;B.push(We)}},ae=function(){if(!(!p.value&&!t.paginationAffixedBottom))var M=setTimeout(function(){p.value||t.paginationAffixedBottom?Te(document,"scroll",O):Se(document,"scroll",O),clearTimeout(M)})};ce([a,n,r,e],function(){ee(),w(),C()}),ce(p,ae),ce(function(){return[t.data,t.columns,t.headerAffixedTop,t.footerAffixedBottom,t.horizontalScrollAffixedBottom]},function(){w()}),Ra(function(){Se(document,"scroll",O),Y(),a.value=null,n.value=null,r.value=null,e.value=null});var ne=function(M){e.value=M,ae()};return{showAffixHeader:l,showAffixFooter:i,showAffixPagination:u,affixHeaderRef:a,affixFooterRef:n,horizontalScrollbarRef:r,paginationRef:o,onHorizontalScroll:w,setTableContentRef:ne,updateAffixHeaderOrFooter:C}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function dr(t,e){if(!!t){for(var a=t instanceof Array?t:[t],n={},r=0;r1&&(E.rowspan=K.rowspan),(($=K)===null||$===void 0?void 0:$.colspan)>1&&(E.colspan=K.colspan),K.skipped)return null}return F(L,{dataLength:h,rowAndColFixedPosition:g,columnLength:I.length,cellSpans:E,cellEmptyContent:e.cellEmptyContent})});return k("tr",Ke({ref:i},R.value,{style:(T=y.value)===null||T===void 0?void 0:T.style,class:C.value},j(m,e.rowIndex)),[S.value?[k("td",{style:{height:"".concat(D.value,"px"),border:"none"}},null)]:c])}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */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 ea(t){for(var e=1;e1)for(var R=b+1;R1)for(var y=s+1;y1&&(c.colspan=d.colspan),k("th",Ke({key:d.colKey,"data-colkey":d.colKey,class:P,style:I},c,w,m),[k("div",{class:e.tableBaseClass.thCellInner},[g?k(sr,{placement:"bottom",attach:e.attach||(e.theadRef?function(){return e.getTableNode(e.theadRef)}:void 0),tooltipContent:h&&function(){return h},tooltipProps:vt(d.ellipsisTitle)==="object"?d.ellipsisTitle:void 0,overlayClassName:e.ellipsisOverlayClassName,classPrefix:e.classPrefix},rs(_)?_:{default:function(){return[_]}}):_])])});return k("tr",{key:s},[v])})};return k("thead",{ref:"theadRef",class:this.theadClasses},[a(this.rowAndColFixedPosition,this.thWidthList)])}});/** * tdesign v1.9.9 * (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 ta(t){for(var e=1;e1&&(b.rowspan=w.rowspan),((R=w)===null||R===void 0?void 0:R.colspan)>1&&(b.colspan=w.colspan),w.skipped)return null}var O=cr(v,d,a.rowAndColFixedPosition,a.tableColFixedClasses),S=ta({},O.style);return(p=a.thWidthList)!==null&&p!==void 0&&p[v.colKey]&&(S.width="".concat(a.thWidthList[v.colKey],"px")),k("td",Ke(ta({key:v.colKey},b),{class:O.classes,style:S}),[a.renderTFootCell({row:l,rowIndex:i,col:v,colIndex:d})])})])}),o=this.renderTNode("footerSummary");return!o&&(!this.footData||!this.footData.length)?null:k("tfoot",{ref:"tFooterRef",class:n,style:{visibility:this.virtualScroll?"hidden":"visible"}},[o&&k("tr",{class:this.tableFullRowClasses.base},[k("td",{colspan:this.columns.length},[k("div",{class:this.tableFullRowClasses.innerFullElement},[o])])]),r])}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function os(t,e){var a=Ie(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),p=kt(o,l.value,t.onActiveChange,"activeRowKeys"),b=Pe(p,2),w=b[0],y=b[1],R=function(h){var g=h.row,c=h.index,f=H(g,t.rowKey);if(r.value==="single"){var x=w.value.length>1?[f]:[];y(x,{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}),L=[],K=0,B=n.value.length;K0&&arguments[0]!==void 0?arguments[0]:!0;return k("colgroup",null,[b.map(function(q){var Z={width:Nn((X||w?n.thWidthList[q.colKey]:void 0)||q.width)||y};return q.minWidth&&(Z.minWidth=Nn(q.minWidth)),!Z.width&&!q.minWidth&&n.tableLayout==="fixed"&&(Z.minWidth="80px"),k("col",{key:q.colKey,style:Z},null)})])},C=function(){return n.showHeader===!1?null:!!(n.virtualConfig.isVirtualScroll.value||n.headerAffixedTop)&&(n.headerAffixedTop?k(Zn,Ke({offsetTop:0},Qn(n.headerAffixedTop),{onFixedChange:n.onFixedChange,ref:"headerTopAffixRef"}),Qr(h)?h:{default:function(){return[h]}}):n.isFixedHeader&&h)},O=function(){return k(Zn,Ke({offsetBottom:0},Qn(n.horizontalScrollAffixedBottom),{style:{marginTop:"-".concat(n.scrollbarWidth*2,"px")},horizontalScrollAffixedBottom:!0,ref:"horizontalScrollAffixRef"}),{default:function(){return[k("div",{ref:"horizontalScrollbarRef",class:["scrollbar",n.tableBaseClass.obviousScrollbar],style:{width:"".concat(n.tableWidth,"px"),overflow:"auto",opacity:Number(n.showAffixFooter)}},[k("div",{style:{width:"".concat(n.tableElmWidth,"px"),height:"5px"}},null)])]}})},S={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},D=Ua()<=11?4:0,j=this.isWidthOverflow?this.scrollbarWidth:0,A=W((((r=this.affixHeaderRef)===null||r===void 0?void 0:r.getBoundingClientRect().height)||0)-D),P=setTimeout(function(){var M;A.value=(((M=n.affixHeaderRef)===null||M===void 0?void 0:M.getBoundingClientRect().height)||0)-D,clearTimeout(P)},0),F=N(function(){return A.value-j}),T=Rn.headerAffixedTop?Number(this.showAffixHeader):1,I=N(function(){return{width:"".concat(n.tableWidth,"px"),height:"".concat(F.value,"px"),opacity:T}}),_=this.bordered?1:0,m=Boolean((this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)&&this.tableWidth)&&k("div",{ref:"affixHeaderRef",style:{width:"".concat(this.tableWidth-_,"px"),opacity:Number(this.showAffixHeader)},class:["scrollbar",z({},this.tableBaseClass.affixedHeaderElm,this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)]},[k("table",{class:this.tableElmClasses,style:Qe(Qe({},this.tableElementStyles),{},{width:"".concat(this.tableElmWidth,"px")})},[R(!0),k(Yr,S,this.$slots)])]),h=k("div",{class:this.tableBaseClass.affixedHeaderWrap,style:I.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,x=Boolean(c&&f&&this.tableWidth)&&k(Zn,Ke({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[k("div",{ref:"affixFooterRef",style:{width:"".concat(n.tableWidth-_,"px"),opacity:Number(n.showAffixFooter)},class:["scrollbar",z({},n.tableBaseClass.affixedFooterElm,n.footerAffixedBottom||n.virtualConfig.isVirtualScroll.value)]},[k("table",{class:n.tableElmClasses,style:Qe(Qe({},n.tableElementStyles),{},{width:"".concat(n.tableElmWidth,"px")})},[R(!0),k(Jr,{rowKey:n.rowKey,isFixedHeader:n.isFixedHeader,rowAndColFixedPosition:v,footData:n.footData,columns:b,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)"),L={transform:E,"-ms-transform":E,"-moz-transform":E,"-webkit-transform":E},K=Qe(Qe({classPrefix:this.classPrefix,ellipsisOverlayClassName:this.tableSize!=="medium"?this.sizeClassNames[this.tableSize]:"",rowAndColFixedPosition:v,showColumnShadow:this.showColumnShadow,data:p,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},xn(this.$props,vl)),{},{pagination:this.innerPagination,attach:this.attach,hoverRow:this.hoverRow,activeRow:this.tActiveRow,onRowClick:this.onInnerRowClick}),B=k("div",{ref:"tableContentRef",class:this.tableBaseClass.content,style:this.tableContentStyles,onScroll:this.onInnerVirtualScroll},[this.virtualConfig.isVirtualScroll.value&&k("div",{class:this.virtualScrollClasses.cursor,style:L},null),k("table",{ref:"tableElmRef",class:this.tableElmClasses,style:Qe(Qe({},this.tableElementStyles),{},{width:this.resizable&&this.isWidthOverflow&&this.tableElmWidth?"".concat(this.tableElmWidth,"px"):this.tableElementStyles.width})},[R(!1),this.showHeader&&k(Yr,Qe(Qe({},S),{},{thWidthList:w?this.thWidthList:{}}),this.$slots),k(as,K,this.$slots),k(Jr,{rowKey:this.rowKey,isFixedHeader:this.isFixedHeader,rowAndColFixedPosition:v,footData:this.footData,columns:b,rowAttributes:this.rowAttributes,rowClassName:this.rowClassName,footerSummary:this.footerSummary,rowspanAndColspanInFooter:this.rowspanAndColspanInFooter,virtualScroll:this.virtualConfig.isVirtualScroll.value},this.$slots)])]),$=Re(this.loading)?this.loading:this.$slots.loading,Y=this.loading!==void 0&&k(ko,Ke({loading:!!this.loading,text:$,attach:this.tableRef?function(){return n.tableRef}:void 0,showOverlay:!0,size:"small"},this.loadingProps),null),ee=this.renderTNode("topContent"),ae=this.renderTNode("bottomContent"),ne=k("div",{ref:"paginationRef",class:this.tableBaseClass.paginationWrap,style:{opacity:Number(this.showAffixPagination)}},[this.renderPagination()]),Q=!!ae&&k("div",{ref:"bottomContentRef",class:this.tableBaseClass.bottomContent},[ae]);return k("div",{ref:"tableRef",tabindex:"0",class:this.dynamicBaseTableClasses,onFocus:this.onTableFocus,onBlur:this.onTableBlur},[!!ee&&k("div",{class:this.tableBaseClass.topContent},[ee]),C(),B,x,Y,Q,this.showRightDivider&&k("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&&O(),this.paginationAffixedBottom?k(Zn,Ke({offsetBottom:0},Qn(this.paginationAffixedBottom),{ref:"paginationAffixRef"}),Qr(ne)?ne:{default:function(){return[ne]}}):ne,k("div",{ref:"resizeLineRef",class:this.tableBaseClass.resizeLine,style:this.resizeLineStyle},null)])}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */var gl={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.9 * (c) 2024 tdesign * @license MIT */function eo(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 to(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&&O.value.length0&&arguments[0]!==void 0?arguments[0]:{},f=ve(p.value),x=t.rowKey||"id",E=H(c,x),L=f.indexOf(E),K=L!==-1;if(R.value==="multiple")K?f.splice(L,1):f.push(E);else if(R.value==="single")f=K&&S.value?[]:[E];else{ze.warn("Table","`column.type` must be one of `multiple` and `single`");return}b(f,{selectedRowData:f.map(function(B){return w.value.get(B)}),currentRowKey:E,currentRowData:c,type:K?"uncheck":"check"})}function T(c){var f,x=t.rowKey||"id",E=C.value.map(function(B){return H(B,x)}),L=((f=n.value)===null||f===void 0?void 0:f.filter(function(B){return!E.includes(B)}))||[],K=c?[].concat(ve(L),ve(E)):ve(L);b(K,{selectedRowData:c?K.map(function(B){return w.value.get(B)}):[],type:c?"check":"uncheck",currentRowKey:"CHECK_ALL_BOX"})}function I(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,L){return P(L)},title:c.type==="multiple"?j():c.title}):c}var _=function(f){var x=f.row,E=f.index,L=t.columns.findIndex(function($){return $.colKey==="row-select"}),K=!1;if(L!==-1){var B;K=(B=A({row:x,rowIndex:E,col:t.columns[L],colIndex:L}))===null||B===void 0?void 0:B.disabled}K||F(x)};ce([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):k(Vo,Ke({content:d,placement:"right",showArrow:!1,class:e.tableSortClasses.iconDirection[l]},e.tooltipProps),hs(i=e.getSortIcon(l,s))?i:{default:function(){return[i]}})});return k("div",{class:n},[o])}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function oo(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 ps(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},h=0,g=_.length;h * @author owenm * @license MIT */function uo(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 Dt(t){for(var e=1;e=0)&&(a[r]=t[r]);return a}function Ss(t,e){if(t==null)return{};var a=xs(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 Os="1.15.3";function Kt(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Mt=Kt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Gn=Kt(/Edge/i),so=Kt(/firefox/i),Mn=Kt(/safari/i)&&!Kt(/chrome/i)&&!Kt(/android/i),ml=Kt(/iP(ad|od|hone)/i),wl=Kt(/chrome/i)&&Kt(/android/i),yl={capture:!1,passive:!1};function Oe(t,e,a){t.addEventListener(e,a,!Mt&&yl)}function xe(t,e,a){t.removeEventListener(e,a,!Mt&&yl)}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 Cl(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=Cl(t))}return null}var co=/\s+/g;function ct(t,e,a){if(t&&e)if(t.classList)t.classList[a?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(co," ").replace(" "+e+" "," ");t.className=(n+(a?" "+e:"")).replace(co," ")}}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 On(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 xl(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 En(t,e,a,n){for(var r=0,o=0,l=t.children;o2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=Ss(n,js);Yn.pluginEvent.bind(oe)(e,a,Dt({dragEl:U,parentEl:$e,ghostEl:se,rootEl:ke,nextEl:un,lastDownEl:va,cloneEl:Be,cloneHidden:Ut,dragStarted:Kn,putSortable:Ze,activeSortable:oe.active,originalEvent:r,oldIndex:Cn,oldDraggableIndex:zn,newIndex:dt,newDraggableIndex:Vt,hideGhostForTarget:Pl,unhideGhostForTarget:Al,cloneNowHidden:function(){Ut=!0},cloneNowShown:function(){Ut=!1},dispatchSortableEvent:function(i){tt({sortable:a,name:i,originalEvent:r})}},o))};function tt(t){As(Dt({putSortable:Ze,cloneEl:Be,targetEl:U,rootEl:ke,oldIndex:Cn,oldDraggableIndex:zn,newIndex:dt,newDraggableIndex:Vt},t))}var U,$e,se,ke,un,va,Be,Ut,Cn,dt,zn,Vt,oa,Ze,wn=!1,Ca=!1,xa=[],rn,mt,Na,Ma,ho,go,Kn,bn,Hn,Wn=!1,la=!1,fa,et,Ba=[],er=!1,Sa=[],_a=typeof document<"u",ia=ml,po=Gn||Mt?"cssFloat":"float",Fs=_a&&!wl&&!ml&&"draggable"in document.createElement("div"),_l=function(){if(!!_a){if(Mt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Dl=function(e,a){var n=ie(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=En(e,0,a),l=En(e,1,a),i=o&&ie(o),u=l&&ie(l),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Ue(o).width,v=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+Ue(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[po]==="none"||l&&n[po]==="none"&&s+v>r)?"vertical":"horizontal"},Ks=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[lt].options.emptyInsertThreshold;if(!(!o||fr(r))){var l=Ue(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},Tl=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 p=(l?i:u).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-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},Pl=function(){!_l&&se&&ie(se,"display","none")},Al=function(){!_l&&se&&ie(se,"display","")};_a&&!wl&&document.addEventListener("click",function(t){if(Ca)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ca=!1,!1},!0);var on=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[lt]._onDragOver(n)}}},Ls=function(e){U&&U.parentNode[lt]._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[lt]=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 Dl(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]);Tl(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Fs,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&&(bn=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($s(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(Cn=ht(u),zn=ht(u,r.draggable),typeof v=="function"){if(v.call(this,e,u,this)){tt({sortable:a,rootEl:s,name:"filter",targetEl:u,toEl:n,fromEl:n}),rt("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 tt({sortable:a,rootEl:d,name:"filter",targetEl:u,fromEl:n,toEl:n}),rt("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=Ue(n);if(ke=o,U=n,$e=U.parentNode,un=U.nextSibling,va=n,oa=l.group,oe.dragged=U,rn={target:U,clientX:(a||e).clientX,clientY:(a||e).clientY},ho=rn.clientX-s.left,go=rn.clientY-s.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,U.style["will-change"]="all",u=function(){if(rt("delayEnded",r,{evt:e}),oe.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!so&&r.nativeDraggable&&(U.draggable=!0),r._triggerDragStart(e,a),tt({sortable:r,name:"choose",originalEvent:e}),ct(U,l.chosenClass,!0)},l.ignore.split(",").forEach(function(v){xl(U,v.trim(),za)}),Oe(i,"dragover",on),Oe(i,"mousemove",on),Oe(i,"touchmove",on),Oe(i,"mouseup",r._onDrop),Oe(i,"touchend",r._onDrop),Oe(i,"touchcancel",r._onDrop),so&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),rt("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&&za(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._disableDelayedDrag),xe(e,"touchend",this._disableDelayedDrag),xe(e,"touchcancel",this._disableDelayedDrag),xe(e,"mousemove",this._delayedDragTouchMoveHandler),xe(e,"touchmove",this._delayedDragTouchMoveHandler),xe(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(wn=!1,ke&&U){rt("dragStarted",this,{evt:a}),this.nativeDraggable&&Oe(document,"dragover",Ls);var n=this.options;!e&&ct(U,n.dragClass,!1),ct(U,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(mt){this._lastX=mt.clientX,this._lastY=mt.clientY,Pl();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[lt]._isOutsideThisEl(e),a)do{if(a[lt]){var n=void 0;if(n=a[lt]._onDragOver({clientX:mt.clientX,clientY:mt.clientY,target:e,rootEl:a}),n&&!this.options.dragoverBubble)break}e=a}while(a=Cl(a));Al()}},_onTouchMove:function(e){if(rn){var a=this.options,n=a.fallbackTolerance,r=a.fallbackOffset,o=e.touches?e.touches[0]:e,l=se&&On(se,!0),i=se&&l&&l.a,u=se&&l&&l.d,s=ia&&et&&fo(et),v=(o.clientX-rn.clientX+r.x)/(i||1)+(s?s[0]-Ba[0]:0)/(i||1),d=(o.clientY-rn.clientY+r.y)/(u||1)+(s?s[1]-Ba[1]:0)/(u||1);if(!oe.active&&!wn){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(tt({rootEl:$e,name:"add",toEl:$e,fromEl:ke,originalEvent:e}),tt({sortable:this,name:"remove",toEl:$e,originalEvent:e}),tt({rootEl:$e,name:"sort",toEl:$e,fromEl:ke,originalEvent:e}),tt({sortable:this,name:"sort",toEl:$e,originalEvent:e})),Ze&&Ze.save()):dt!==Cn&&dt>=0&&(tt({sortable:this,name:"update",toEl:$e,originalEvent:e}),tt({sortable:this,name:"sort",toEl:$e,originalEvent:e})),oe.active&&((dt==null||dt===-1)&&(dt=Cn,Vt=zn),tt({sortable:this,name:"end",toEl:$e,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){rt("nulling",this),ke=U=$e=se=un=Be=va=Ut=rn=mt=Kn=dt=Vt=Cn=zn=bn=Hn=Ze=oa=oe.dragged=oe.ghost=oe.clone=oe.active=null,Sa.forEach(function(e){e.checked=!0}),Sa.length=Na=Ma=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":U&&(this._onDragOver(e),ks(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 zs(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,p=!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 Hs(t){return ht(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.9 * (c) 2024 tdesign * @license MIT */function wo(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)+I:I}var D=function(_){if(!(!C.value&&!R.value)){var m=_==null?void 0:_.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(p.row),onMove:function(c){return!ti(c.related,d.base)},onEnd:function(c){var f;if(c.newIndex!==c.oldIndex){yo(c.item),Co(c.from,c.item,c.oldIndex);var x=c.oldIndex,E=c.newIndex;(Re(t.firstFullRow)&&t.firstFullRow(Ye)||e.slots.firstFullRow||e.slots["first-full-row"])&&(x-=1,E-=1),i.value&&(x=S(x,i.value),E=S(E,i.value));var L={data:l.value,currentIndex:x,current:l.value[x],targetIndex:E,target:l.value[E],newData:mo(ve(t.data),x,E),e:c,sort:"row"};L.currentData=L.newData,(f=t.onDragSort)===null||f===void 0||f.call(t,L)}}},t.dragSortOptions);!m||(R.value?new oe(m,jn({},h)):new oe(m,jn(jn({},h),{},{handle:".".concat(s.handle)})))}},j=function(_,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&&(yo(c.item),Co(c.from,c.item,c.oldIndex));var x=c.oldIndex,E=c.newIndex,L=c.target,K=m?x:E,B=m?E:x,$=L.children[K],Y=L.children[B],ee=wa(b.value,$.dataset.colkey),ae=wa(b.value,Y.dataset.colkey);(!ee||!ee.colKey)&&ze.error("Table","colKey is missing in ".concat(JSON.stringify(ee))),(!ae||!ae.colKey)&&ze.error("Table","colKey is missing in ".concat(JSON.stringify(ae))),K=ao(t.columns,ee.colKey),B=ao(t.columns,ae.colKey);var ne={data:b.value,currentIndex:K,current:ee,targetIndex:B,target:ae,newData:mo(ve(t.columns),K,B),e:c,sort:"col"};ne.currentData=ne.newData,(f=t.onDragSort)===null||f===void 0||f.call(t,ne)}}},t.dragSortOptions);!_||new oe(_,h)},A=function(_){if(!(!O.value||!_)){var m=_.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 P(I){w.value=I}function F(I){b.value=I}ce([w,b,o,a],function(I){var _=Pe(I,4),m=_[0];_[1],_[2];var h=_[3];T(m,h)});function T(I,_){var m=I;if(!(!I||!m.$el||!_.showElement))var h=setTimeout(function(){D(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:R,isRowHandlerDraggable:C,isColDraggable:O,setDragSortPrimaryTableRef:P,setDragSortColumns:F}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Xs(t){var e=Yt(),a=gt("table",t.locale),n=a.globalConfig,r=it(),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 p=t.asyncLoading,b={"load-more":n.value.loadingMoreText,loading:n.value.loadingText}[String(p)];return k("div",{class:u.value,onClick:s},[k(ko,{indicator:p==="loading",loading:!!p,size:"small",text:b},null)])}return[null,!1,void 0].includes(d)?null:k("div",{class:u.value,onClick:s},[d])}return{renderAsyncLoading:v}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function xo(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),K=2;K1?ae-1:0),Q=1;Q0&&arguments[0]!==void 0?arguments[0]:{errors:[],errorMap:{}},g=h.errorMap;g&&Object.assign(m,g)}),r.value=m,(_=t.onValidate)===null||_===void 0||_.call(t,{result:m}),F({result:m})},T)})},b=function(S,D,j){i.value[S]||(i.value[S]=lr(D)),Object.entries(j).forEach(function(A){var P=Pe(A,2),F=P[0],T=P[1];$n(i.value[S],F,T)})},w=function(S){if(t.editableRowKeys){var D=H(S.row,t.rowKey||"id"),j=n.get(D);if(j){var A=j.findIndex(function(P){return P.col.colKey===S.col.colKey});A===-1?j.push(S):j[A]=S,n.set(D,j)}else n.set(D,[S])}},y=function(){r.value={}},R=function(S){var D=Vn(S.row,t.rowKey,S.col.colKey,S.colIndex);S.isEdit?l.value[D]=S:delete l.value[D]},C=function(S){var D,j=S.row,A=S.col,P=H(j,t.rowKey||"id"),F=i.value[P];if(F&&(D=t.editableRowKeys)!==null&&D!==void 0&&D.includes(P)){var T=Fn({},F);return $n(T,A.colKey,H(F,A.colKey)),T}return j};return ce(function(){var O;return(O=a.value)===null||O===void 0?void 0:O.join(",")},function(O){var S=O.split(","),D=Object.keys(i.value);D.forEach(function(j){S.includes(j)||delete i.value[j]})}),{editedFormData:i,errorListMap:r,editableKeysMap:o,validateTableData:p,validateRowData:v,onRuleChange:w,clearValidateData:y,onUpdateEditedCell:b,getEditRowData:C,onPrimaryTableCellEditChange:R}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function Oo(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=[],Xe=function(){var Zt,Qt,en,Ht,Wt,Ce=jt({},de[bt]),$t=((Zt=Ce.children)===null||Zt===void 0?void 0:Zt.length)||((Qt=j.value)===null||Qt===void 0?void 0:Qt.includes(Ce.colKey));if(!$t&&(e.columnController||e.displayColumns||e.defaultDisplayColumns)&&!Fe)return 1;Ce=K(Ce);var tn=e.sort;if(Ce.sorter&&e.showSortColumnBgColor){var hn=tn instanceof Array?tn:[tn],nn=hn.find(function(be){return be&&be.sortBy===Ce.colKey&&be.descending!==void 0});nn&&(Ce.className=Ce.className instanceof Array?Ce.className.concat(w.sortColumn):[Ce.className,w.sortColumn])}if(Ce.sorter||Ce.filter){var St=Ea(a.slots,Ce,bt),Ot=Ce,Da=Ot.ellipsisTitle;Ce.title=function(be,me){var De,Ge=Ce.sorter?g(me):null,At=Ce.filter?Q(me):null,an=(De=i.value)===null||De===void 0?void 0:De.tableContentRef;return ut([St,Ge,At],me.col,me.colIndex,Da,an,{classPrefix:v,ellipsisOverlayClassName:S.value!=="medium"?O[S.value]:""})},Ce.ellipsisTitle=!1}if((en=Ce.edit)!==null&&en!==void 0&&en.component){var Ta=Ce.cell;Ce.cell=function(be,me){var De=jt(jt({},me),{},{row:te(me),oldCell:Ta,rowKey:e.rowKey||"id",tableBaseClass:p,cellEmptyContent:e.cellEmptyContent,onChange:Ae,onValidate:e.onRowValidate,onRuleChange:V,onEditableChange:le});if(e.editableRowKeys){var Ge,At=H(me.row,e.rowKey||"id");De.editable=Tn.value[At]||!1;var an=[At,me.col.colKey].join("__"),Jn=(Ge=Dn.value)===null||Ge===void 0?void 0:Ge[an];Jn&&(De.errors=Jn)}return e.editableCellState&&(De.readonly=!e.editableCellState(me)),k(Gs,Ke(De,{onUpdateEditedCell:J}),a.slots)}}if((Ht=Ce.children)!==null&&Ht!==void 0&&Ht.length){var An;Ce.children=Me(Ce.children,Fe||((An=j.value)===null||An===void 0?void 0:An.includes(Ce.colKey)))}(!Ce.children||(Wt=Ce.children)!==null&&Wt!==void 0&&Wt.length)&&Je.push(Ce)},bt=0,Jt=de.length;bt2&&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 Zs=function(){function t(){ri(this,t),z(this,"treeDataMap",new Map),z(this,"expandAllRowIndex",void 0),this.treeDataMap=new Map}return ai(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),mn(this.treeDataMap,o.parent.row,-1*l,"delete",r)}this.treeDataMap.delete(a),ln(this.treeDataMap,n,{minRowIndex:o.rowIndex,rowKey:r.rowKey,type:"remove"})}else ze.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&&mn(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&&ln(this.treeDataMap,n,{minRowIndex:o.rowIndex+1,rowKey:r.rowKey,type:"remove"})}else ze.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,p=0,b=s.length;pl){var y=a.slice(p,o),R=b.concat(w,y);a.splice(l,R.length),a.splice.apply(a,[l,0].concat(ve(R))),ln(this.treeDataMap,a,{rowKey:r.rowKey,minRowIndex:l,maxRowIndex:d})}else{var C=a.slice(d,l),O=C.concat(w,b);a.splice(o,O.length),a.splice.apply(a,[o,0].concat(ve(O))),ln(this.treeDataMap,a,{rowKey:r.rowKey,minRowIndex:o,maxRowIndex:p})}if(s.parent){for(var S=s.parent.row[r.childrenKey],D=0,j=-1,A=-1,P=0,F=S.length;P=2));P++);A2&&arguments[2]!==void 0?arguments[2]:null,d=0,p=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,P=A||l.value;n.value=a.value.expandAll(P,r.value);var F=n.value.map(function(T){return Ft(T,r.value.rowKey)});w(F,{row:void 0,rowState:void 0,rowIndex:void 0,type:"expand",trigger:j}),y.value.type="expand-all"}function C(){n.value=ve(a.value.foldAll(n.value,r.value)),w([],{row:void 0,rowState:void 0,rowIndex:void 0,type:"fold",trigger:"fold-all"})}function O(j,A){var P,F=j.row,T=j.rowIndex;y.value=Va({type:"user-reaction-change"},j);var I=Ft(F,r.value.rowKey),_=a.value.treeDataMap.get(I),m=ve(b.value);if(_.expanded){for(var h=a.value.getExpandedChildrenKeys([F],r.value),g=0,c=m.length;g2&&arguments[2]!==void 0?arguments[2]:[],F=Qs(A,P),T=F.addedList,I=F.removedList;return a.value.expandTreeNode(T,j,r.value),a.value.foldTreeNode(I,j,r.value),ve(j)}ce([b,l],function(j,A){var P=Pe(j,1),F=P[0],T=Pe(A,1),I=T[0];if(!(!a.value.treeDataMap.size||!l.value.length)){if(y.value.type==="user-reaction-change"){var _=y.value||{},m=_.row,h=_.rowIndex;n.value=ve(a.value.toggleExpandData({row:m,rowIndex:h},ve(n.value),r.value))}else y.value.type==="props-change"&&S(n.value,F,I);y.value.type="props-change"}});var D=function(A){var P,F;(P=u.value)!==null&&P!==void 0&&P.defaultExpandAll&&!s.value?(R("default-expand-all",ve(A)),s.value=!0):(F=b.value)!==null&&F!==void 0&&F.length&&Gt(function(){n.value=S(ve(A),b.value,[])})};return{tExpandedTreeNode:b,isDefaultExpandAllExecute:s,isDefaultExpandedTreeNodesExecute:v,expandAll:R,foldAll:C,onExpandFoldIconClick:O,updateExpandOnDataChange:D}}/** * tdesign v1.9.9 * (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 ft(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:"",X=arguments.length>1?arguments[1]:void 0;if(!M){b.value=d.value.appendToRoot(X,b.value,C.value);return}b.value=ve(d.value.appendTo(M,X,b.value,C.value))}function Y(M,X){b.value=ve(d.value.insertAfter(M,X,b.value,C.value))}function ee(M,X){b.value=ve(d.value.insertBefore(M,X,b.value,C.value))}function ae(M){var X=d.value.swapData(b.value,M,C.value);if(X.result)b.value=ve(X.dataSource);else{var q,Z={code:X.code,reason:X.reason};(q=t.onAbnormalDragSort)===null||q===void 0||q.call(t,Z)}}function ne(){return d.value.getTreeNode(b.value,C.value)}function Q(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data";return d.value.getTreeExpandedRow(b.value,C.value,M)}return{store:d,rowDataKeys:C,dataSource:b,swapData:ae,setData:E,getData:L,remove:K,removeChildren:B,appendTo:$,insertAfter:Y,insertBefore:ee,formatTreeColumn:x,toggleExpandData:c,expandAll:A,foldAll:P,getTreeNode:ne,resetData:h,getTreeExpandedRow:Q,onExpandFoldIconClick:T}}/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */function To(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&&I=0)return P.rowIndex;if(P.rowIndex<0)return D(P.parent)},j=function(P){var F=P.index;if(!F&&F!==0){if(!P.key){ze.error("Table","scrollToElement: one of `index` or `key` must exist.");return}var T=p.value.get(P.key);F=D(T,P.key),(F<0||F===void 0)&&ze.error("Table","".concat(P.key," does not exist in data, check `rowKey` or `data` please."))}n.value.scrollToElement(Et(Et({},P),{},{index:F}))};return a.expose(Et(Et({store:o.value,dataSource:l.value},v),{},{primaryTableRef:n,validateRowData:function(P){return n.value.validateRowData(P)},validateTableData:function(){return n.value.validateTableData()},clearValidateData:function(){n.value.clearValidateData()},refreshTable:function(){n.value.refreshTable()},scrollToElement:j})),function(){var A,P=Bo(),F=P.vnode,T=Et(Et({},F.props),{},{rowKey:e.rowKey||"id",data:l.value,columns:C.value,indeterminateSelectedRowKeys:w.value,disableDataPage:Boolean(e.tree&&Object.keys(e.tree).length),onSelectChange:y,onDragSort:O,rowClassName:function(_){var m=_.row,h=H(m,e.rowKey||"id"),g=p.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&&(T.onRowClick=S),k(pr,Ke(T,{ref:n}),a.slots)}}});/** * tdesign v1.9.9 * (c) 2024 tdesign * @license MIT */qt(hl);qt(pr);qt(lc);var ic=lr(pr),hc=qt(ic,"TTable");export{fc as M,hc as T};