import{u as un,r as sn,_ as cn,a as En}from"./useGlobalIcon.e6846aca.js";import{d as Ne,c as N,f as H,w as ve,o as ht,bN as zl,bO as Hl,b as Da,aI as L,n as It,t as Ie,i as wr,bC as Ke,bv as Wl,u as $l,x as Vl,y as Ul,bt as Io,p as Lo,r as Xn,h as Ge,aU as dn,b4 as Xl,bD as Gl,g as ko,s as ql}from"./arco.7f845a67.js";import{c as qt,J as Re,w as Yt,T as Yl,an as Jl,e as Lt,b as No,ap as Gn,ae as Zl,f as dt,aq as Ql,am as ei,ar as ti,ao as ni,d as gt,G as Ga,as as yr,at as ai,i as Fa,K as ri,H as ir}from"./index.e1698f3e.js";import{_ as Pe,i as Mo,c as qa}from"./helper.e7853506.js";import{u as kt,b as de,a as Bo,_ as z}from"./useConfig.3a51a7af.js";import{_ as zo,b as Ho,o as Wo,c as Cr,t as oi,d as ur,T as $o,p as Cn,P as li,e as Vo,u as ii,f as Nt,A as Uo,g as Xo,h as Ya,i as xr,E as Go,j as qo,k as Yo,l as ui,m as ba,C as Ja,a as Jo,n as si,q as ci,r as di}from"./dep-6deb4e3a.716901b3.js";import{f as xe,l as vi,o as Te,j as Zo,k as Qo,d as fi,m as Sr,n as el,g as W,i as hi,L as tl,p as gi}from"./index.c9d9f013.js";import{_ as pi,o as nl,g as bi,l as mi,c as wi,d as yi,e as Ci}from"./dialog.4a111457.js";import{i as xn,b as al,d as xi,_ as rl,c as Si,l as ze,I as Oi}from"./index.754948b2.js";import{i as Ri}from"./useDisabled.242d5b98.js";import{_ as Za,r as wn,i as Ei,s as Vn,v as ol}from"./form-model.cbf372df.js";import{B as ma}from"./index.95128039.js";function Or(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Rr(t){for(var e=1;et.size),{className:r,style:o}=un(a),l=N(()=>["t-icon","t-icon-add-rectangle",r.value]),i=N(()=>Rr(Rr({},o.value),n.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(Di,u.value)}});const Ti=_i;function Er(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Dr(t){for(var e=1;et.size),{className:r,style:o}=un(a),l=N(()=>["t-icon","t-icon-chevron-right-circle",r.value]),i=N(()=>Dr(Dr({},o.value),n.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(Pi,u.value)}});const ji=Ai;function _r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Tr(t){for(var e=1;et.size),{className:r,style:o}=un(a),l=N(()=>["t-icon","t-icon-edit-1",r.value]),i=N(()=>Tr(Tr({},o.value),n.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(Fi,u.value)}});const Ii=Ki;function Pr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ar(t){for(var e=1;et.size),{className:r,style:o}=un(a),l=N(()=>["t-icon","t-icon-filter",r.value]),i=N(()=>Ar(Ar({},o.value),n.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(Li,u.value)}});const Ni=ki;function jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Fr(t){for(var e=1;et.size),{className:r,style:o}=un(a),l=N(()=>["t-icon","t-icon-minus-rectangle",r.value]),i=N(()=>Fr(Fr({},o.value),n.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(Mi,u.value)}});const zi=Bi;function Kr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ir(t){for(var e=1;et.size),{className:r,style:o}=un(a),l=N(()=>["t-icon","t-icon-move",r.value]),i=N(()=>Ir(Ir({},o.value),n.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(Hi,u.value)}});const _c=Wi;function Lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function kr(t){for(var e=1;et.size),{className:r,style:o}=un(a),l=N(()=>["t-icon","t-icon-setting",r.value]),i=N(()=>kr(kr({},o.value),n.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($i,u.value)}});const Ui=Vi;/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Xi={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 Gi=Ne({name:"TAffix",props:Xi,emits:["fixedChange"],setup:function(e,n){var a,r=kt("affix"),o=qt(),l=H(null),i=H(null),u=H((a=document)===null||a===void 0?void 0:a.createElement("div")),s=H(!1),v=H(!1),d=H(),p=H(),b=0,m=function(){s.value||(b=window.requestAnimationFrame(function(){var O,R;b=0;var _=(O=(R=l.value)===null||R===void 0?void 0:R.getBoundingClientRect())!==null&&O!==void 0?O:{top:0,width:0,height:0},A=_.top,j=_.width,T=_.height,F=0;d.value instanceof HTMLElement&&(F=d.value.getBoundingClientRect().top);var P,I=A-F,D=d.value[d.value instanceof Window?"innerHeight":"clientHeight"]-T,w=F+D-e.offsetBottom;if(!xn(e.offsetTop)&&I<=e.offsetTop?P=F+e.offsetTop:!xn(e.offsetBottom)&&A>=w?P=w:P=!1,i.value){var h=P!==!1,g=l.value.contains(u.value);h?(i.value.className=r.value,p.value={top:"".concat(P,"px"),width:"".concat(j,"px"),height:"".concat(T,"px"),zIndex:e.zIndex},g||(u.value.style.width="".concat(j,"px"),u.value.style.height="".concat(T,"px"),l.value.appendChild(u.value))):(i.value.removeAttribute("class"),p.value=void 0,g&&u.value.remove()),n.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=Za(wn.mark(function O(){return wn.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,It();case 2:if(!v.value){_.next=4;break}return _.abrupt("return");case 4:d.value=vi(e.container),Te(d.value,"scroll",m),Te(window,"resize",m),v.value=!0;case 8:case"end":return _.stop()}},O)}));return function(){return x.apply(this,arguments)}}(),S=function(){!d.value||!v.value||(xe(d.value,"scroll",m),xe(window,"resize",m),b&&window.cancelAnimationFrame(b),v.value=!1)};return ve(function(){return e.offsetTop},function(){m()}),ve(function(){return e.offsetBottom},function(){m()}),ve(function(){return e.zIndex},function(){m()}),ht(y),zl(y),Hl(S),Da(S),{affixWrapRef:l,affixRef:i,bindScroll:y,unbindScroll:S,handleScroll:m,scrollContainer:d,renderTNodeJSX:o,affixStyle:p}},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 Qn=Yt(Gi);/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var qi=Zo,Yi=zo,Ji=Ho,Zi=Yl,Qi=Jl,eu=Qo,tu=200;function nu(t,e,n,a){var r=-1,o=Yi,l=!0,i=t.length,u=[],s=e.length;if(!i)return u;n&&(e=Zi(e,Qi(n))),a?(o=Ji,l=!1):e.length>=tu&&(o=eu,l=!1,e=new qi(e));e:for(;++r2&&arguments[2]!==void 0?arguments[2]:{},a=n.window,r=a===void 0?su:a,o=rl(n,uu),l,i=r&&"MutationObserver"in r,u=function(){l&&(l.disconnect(),l=void 0)},s=ve(function(){return cu(t)},function(d){u(),i&&r&&d&&(l=new MutationObserver(e),l.observe(d,o))},{immediate:!0}),v=function(){u(),s()};return du(v),{isSupported:i,stop:v}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Mr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ka(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:!1;if(e.variant!=="outline"){var h=s.value.querySelector(m.value),g=w?"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()}},O;ve(i,Za(wn.mark(function D(){return wn.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,It();case 2:x();case 3:case"end":return h.stop()}},D)}))),ht(function(){x(!0),Si(s,oi(Za(wn.mark(function w(){return wn.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,It();case 2:x();case 3:case"end":return g.stop()}},w)})),300));var D=s.value.querySelector("".concat(m.value," .").concat(v.value,"__label"));D&&(O=vu(D,function(w){w.forEach(function(h){h.type==="characterData"&&x()})},{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}),Io(function(){var D;(D=O)===null||D===void 0||D.stop()});var R=Ie(e),_=R.name,A=R.disabled;Lo(il,Xn({name:_,disabled:A,value:i,allowUncheck:e.allowUncheck,setValue:u}));var j=kt("radio-group"),T=Gn(),F=function(){if(e.variant.includes("filled")&&!Ei(i.value))return L("div",{style:y.value,class:"".concat(j.value,"__bg-block")},null)},P=function(){var w;return(w=e.options)===null||w===void 0?void 0:w.map(function(h){var g=h;return(Mo(h)||Lt(h))&&(g={value:h,label:h.toString()}),L(sr,{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(Ge):g.label]}})})},I=N(function(){return["".concat(j.value),b.value[e.size],z(z(z({},"".concat(j.value,"__outline"),e.variant==="outline"),"".concat(j.value,"--filled"),e.variant.includes("filled")),"".concat(j.value,"--primary-filled"),e.variant==="primary-filled")]});return function(){return L("div",{ref:s,class:I.value},[T("default")||P(),F()])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Br(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ia(t){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:1,a=n,r=0,o=t.length;ra&&(a=u)}}return a}function cl(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e,a=(t==null?void 0:t.children)||[],r=0,o=a.length;r1&&(y.rowspan=b),m>1&&(y.colspan=m),a.set(p,y),p!=null&&(d=p.children)!==null&&d!==void 0&&d.length?l(p.children,u):u.push(p)}},o=[];return r(t,o),{rowspanAndColspanMap:a,leafColumns:o}}function Cu(t){var e=function a(r,o){for(var l,i=[],u=[],s=0,v=r.length;s1}),i=function(s,v,d,p,b,m){var y=Pe(s,3),S=y[0],x=y[1],O=y[2],R=z(z({},n.sortable,x),a.filterable,O),_=Re(p)?p(Ge,{col:v,colIndex:d}):void 0,A=Boolean(p!==void 0?p:v.ellipsis);return L("div",{class:R},[L("div",{class:n.title},[A?L(dr,{placement:"bottom",attach:t.attach||(b?function(){return b}:void 0),tooltipContent:_&&function(){return _},tooltipProps:dt(p)==="object"?p:void 0,classPrefix:m==null?void 0:m.classPrefix,overlayClassName:m==null?void 0:m.ellipsisOverlayClassName},Ou(S)?S:{default:function(){return[S]}}):L("div",null,[S]),Boolean(x||O)&&L("div",{class:a.iconWrap},[x,O])])])};return{thList:o,isMultipleHeader:l,spansAndLeafNodes:r,renderTitleWidthIcon:i}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Vr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ru(t){for(var e=1;eK}return!(C||e.value||f===d.value.length-1)},I=function(h,g,c,f){return g?A(h,g,c,f):T(c,f)},D=function(h,g,c){var f,C,E;if(!!S.draggingCol){var k=S.draggingCol,K=k.getBoundingClientRect(),M=(f=n.value)===null||f===void 0?void 0:f.getBoundingClientRect(),$=(C=v.value[g.colKey])===null||C===void 0?void 0:C.next,q=(E=v.value[g.colKey])===null||E===void 0?void 0:E.prev,ee=O(g)?j(k,g,$,K,M):I(g,$,K,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-K.top,"px"),x.left="".concat(ne,"px");var B=n.value.parentElement.getBoundingClientRect();x.bottom="".concat(B.bottom-M.bottom,"px")}var X=function Y(){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 Ye=S.effectCol==="next"?Ve.nextSibling:Ve.prevSibling,Me=Ru({},Le),lt=g.resizable!==!1?g:Ye,pt=S.effectCol==="next"?Ve.nextSibling:g,it=P(Me,pt,he,c);S.effectCol==="next"?O(g)?k.dataset.colkey!==g.colKey?Me[$.colKey]+=he:Me[lt.colKey]+=he:(Me[lt.colKey]-=he,it&&(Me[$.colKey]+=he)):S.effectCol==="prev"&&(it&&(Me[lt.colKey]+=he),q&&(Me[q.colKey]-=he)),o(Me);var Pt=F(Me);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",Y),xe(document,"mousemove",Q),document.onselectstart=p,document.ondragstart=b,u==null||u({columnsWidth:Me})}}},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:R,onColumnMousedown:D,setEffectColMap:y}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Tu(){}var Pu=Tu,La=Ql,Au=Pu,ju=el,Fu=1/0,Ku=La&&1/ju(new La([,-0]))[1]==Fu?function(t){return new La(t)}:Au,Iu=Ku,Lu=Zo,ku=zo,Nu=Ho,Mu=Qo,Bu=Iu,zu=el,Hu=200;function Wu(t,e,n){var a=-1,r=ku,o=t.length,l=!0,i=[],u=i;if(n)l=!1,r=Nu;else if(o>=Hu){var s=e?null:Bu(t);if(s)return zu(s);l=!1,r=Mu,u=new Lu}else u=e?[]:i;e:for(;++an-1-a[1],u=n-a[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 as(t,e,n,a){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,m=r.bordered,y=r.resizable,S=r.allowResizeColumnWidth,x=H([]),O=H(),R=H(),_=H(!1),A=H(!1),j=H(),T=H(6),F=H(new Map),P=Xn({left:!1,right:!1}),I=H({left:0,top:0}),D=H(0),w=H(0),h=H({}),g=H(!1),c=H(!1),f=H(!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){j.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]:[],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=W(me[xt],Ae),fe=G.get(be)||{},Fe=W(me[xt+1],Ae),Je=G.get(Fe)||{},qe=0;xt===me.length-1&&(qe=(te==null?void 0:te.getBoundingClientRect().height)||0),fe.bottom=(Je.bottom||qe)+(Je.height||0),G.set(be,hn(hn({},fe),{},{height:(St==null?void 0:St.getBoundingClientRect().height)||0}))}},ne=function(V,G){if(F.value.clear(),!!V){var Z=V.querySelector("thead");Z&&q(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;GR.value.clientHeight,A.value=R.value.scrollWidth>R.value.clientWidth;var G=R.value.getBoundingClientRect();I.value={top:G.top,left:G.left},clearTimeout(V)}},0)},Y=function(V){w.value!==V&&(w.value=V)},se=function(){var V,G,Z=(V=R.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=j==null||(G=j.value)===null||G===void 0?void 0:G.getBoundingClientRect();le!=null&&le.width&&Y(le.width)}},he=function(){var V,G,Z,te,le,ge,pe,ue;(V=a.paginationAffixRef.value)===null||V===void 0||(G=V.handleScroll)===null||G===void 0||G.call(V),(Z=a.horizontalScrollAffixRef.value)===null||Z===void 0||(te=Z.handleScroll)===null||te===void 0||te.call(Z),(le=a.headerTopAffixRef.value)===null||le===void 0||(ge=le.handleScroll)===null||ge===void 0||ge.call(le),(pe=a.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,Ht=arguments.length>1?arguments[1]:void 0;return tt+Ht}),At=R.value.clientWidth,zt=He-Ee;Y(Math.max(At,zt))}});var it=function(){Ye(),Q(),he(),(g.value||_.value)&&(X(),J(R.value,{skipScrollLimit:!0}))},Pt=ur(function(){it()},30),je=null;function Dn(re){typeof window>"u"||qa()<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),O.value=re)}ht(function(){var re=bi();T.value=re,Ye();var V=g.value||_.value||!E.value||!x.value.length,G=typeof window<"u",Z=G&&typeof window.ResizeObserver<"u";(V&&qa()<11||!Z)&&Te(window,"resize",Pt)}),Da(function(){var re,V;typeof window<"u"&&xe(window,"resize",Pt),(re=je)===null||re===void 0||re.unobserve(O.value),(V=je)===null||V===void 0||V.disconnect()});var _n=function(V){x.value=V},Tn=function(){X(),Q()};return{tableWidth:D,tableElmWidth:w,thWidthList:h,isFixedHeader:_,isWidthOverflow:A,tableContentRef:R,isFixedColumn:g,showColumnShadow:P,rowAndColFixedPosition:F,virtualScrollHeaderPos:I,scrollbarWidth:T,setData:_n,refreshTable:it,setTableElmWidth:Y,emitScrollEvent:lt,updateThWidthListHandler:Ye,updateColumnFixedShadow:J,setUseFixedTableElmRef:k,getThWidthList:pt,updateThWidthList:Ve,addTableResizeObserver:Dn,updateTableAfterColumnResize:Tn}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function qr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function rs(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 O=(m-1)*y,R=m*y;s.value=S.slice(O,R)}else s.value=S};ve(function(){var b,m;return[(b=a.value)===null||b===void 0?void 0:b.current,(m=a.value)===null||m===void 0?void 0:m.pageSize,r.value.length,o]},function(){if(!(!a.value||!a.value.current)){var b=a.value,m=b.current,y=b.pageSize;u.value={current:m,pageSize:y},d(a.value.current,a.value.pageSize)}},{immediate:!0}),ve([r],function(){var b,m;if(!(!a.value||!a.value.defaultCurrent)){var y=Boolean(a.value.current);y||d((b=u.value.current)!==null&&b!==void 0?b:a.value.defaultCurrent,(m=u.value.pageSize)!==null&&m!==void 0?m:a.value.defaultPageSize)}},{immediate:!0});var p=function(){if(!t.pagination)return null;var m=rs({},t.pagination);return delete m.onChange,L("div",{class:"".concat(i.value,"-table__pagination")},[L(li,Ke(m,{onChange:function(S){var x,O,R;(x=t.pagination)===null||x===void 0||(O=x.onChange)===null||O===void 0||O.call(x,S),u.value=S,d(S.current,S.pageSize),(R=t.onPageChange)===null||R===void 0||R.call(t,S,s.value)}}),{totalContent:e.slots.totalContent})])};return{isPaginateData:v,dataSource:s,innerPagination:u,renderPagination:p}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function ls(t){var e=H(),n=H(),a=H(),r=H(),o=H(),l=H(!0),i=H(!0),u=H(!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 Ri(B)?0:B.offsetTop||0},x=function(){var B,X,Q;if(!(!p.value&&!d.value)){var Y=(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=a.value)===null||Q===void 0?void 0:Q.getBoundingClientRect();if((t.headerAffixedTop||d.value)&&n.value){var Ve=S(t.headerAffixProps||t.headerAffixedTop),Ye=(Le==null?void 0:Le.height)||0,Me=Math.abs(Y.top)-1*se.height),l.value=Me}if(t.footerAffixedBottom&&a!==null&&a!==void 0&&a.value)i.value=y(Le,Y,he);else if(t.horizontalScrollAffixedBottom&&r!==null&&r!==void 0&&r.value){var lt=r.value.getBoundingClientRect();i.value=y(lt,Y,he)}if(t.paginationAffixedBottom&&o.value){var pt=o.value.getBoundingClientRect();u.value=y(pt,Y,he)}}},O=function(){x()},R=function(){m(a.value)},_=function(){m(n.value)},A=function(){m(r.value)},j=function(){m(e.value)},T=function(){Te(a.value,"scroll",R)},F=function(){xe(a.value,"scroll",R)},P=function(){Te(n.value,"scroll",_),C()},I=function(){s||xe(n.value,"scroll",_),E()},D=function(){Te(r.value,"scroll",A)},w=function(){xe(r.value,"scroll",A)},h=function(){Te(e.value,"scroll",j),C()},g=function(){s||xe(e.value,"scroll",j),E()},c=function(){s=!0},f=function(){s=!1,v||(xe(n.value,"scroll",_),xe(e.value,"scroll",j))},C=function(){v=!0},E=function(){v=!1},k=[],K=function(B){var X=ur(function(he){xe(B,"scroll",he)},200);function Q(){m(B),X(Q)}function Y(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",Y);function se(){xe(B,"touchstart",Y)}return{removeElementTouchScrollListener:se}},M=[],$=function(){M.forEach(function(B){return B()}),M.length=0},q=function(){xe(window,"mousedown",c),xe(window,"mouseup",f),$(),n.value&&(xe(n.value,"mouseenter",P),xe(n.value,"mouseleave",I)),a.value&&(xe(a.value,"mouseenter",T),xe(a.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",w))},ee=function(){if(Te(window,"mousedown",c),Te(window,"mouseup",f),q(),n.value){Te(n.value,"mouseenter",P),Te(n.value,"mouseleave",I);var B=K(n.value),X=B.removeElementTouchScrollListener;M.push(X)}if(t.footerAffixedBottom&&a.value){Te(a.value,"mouseenter",T),Te(a.value,"mouseleave",F);var Q=K(a.value),Y=Q.removeElementTouchScrollListener;M.push(Y)}if(t.horizontalScrollAffixedBottom&&r.value){Te(r.value,"mouseenter",D),Te(r.value,"mouseleave",w);var se=K(r.value),he=se.removeElementTouchScrollListener;M.push(he)}if((p.value||d.value)&&e.value){Te(e.value,"mouseenter",h),Te(e.value,"mouseleave",g);var Le=K(e.value),Ve=Le.removeElementTouchScrollListener;M.push(Ve)}},ne=function(){if(!(!p.value&&!t.paginationAffixedBottom))var B=setTimeout(function(){p.value||t.paginationAffixedBottom?Te(document,"scroll",O):xe(document,"scroll",O),clearTimeout(B)})};ve([n,a,r,e],function(){ee(),m(),x()}),ve(p,ne),ve(function(){return[t.data,t.columns,t.headerAffixedTop,t.footerAffixedBottom,t.horizontalScrollAffixedBottom]},function(){m()}),Da(function(){xe(document,"scroll",O),q(),n.value=null,a.value=null,r.value=null,e.value=null});var ae=function(B){e.value=B,ne()};return{showAffixHeader:l,showAffixFooter:i,showAffixPagination:u,affixHeaderRef:n,affixFooterRef:a,horizontalScrollbarRef:r,paginationRef:o,onHorizontalScroll:m,setTableContentRef:ae,updateAffixHeaderOrFooter:x}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function fr(t,e){if(!!t){for(var n=t instanceof Array?t:[t],a={},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(k,{dataLength:h,rowAndColFixedPosition:g,columnLength:I.length,cellSpans:E,cellEmptyContent:e.cellEmptyContent})});return L("tr",Ke({ref:i},S.value,{style:(P=y.value)===null||P===void 0?void 0:P.style,class:x.value},A(w,e.rowIndex)),[R.value?[L("td",{style:{height:"".concat(_.value,"px"),border:"none"}},null)]:c])}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function ta(t){for(var e=1;e1)for(var S=b+1;S1)for(var y=s+1;y1&&(g.colspan=d.colspan),L("th",Ke({key:d.colKey,"data-colkey":d.colKey,class:j,style:P},g,m,D),[L("div",{class:e.tableBaseClass.thCellInner},[h?L(dr,{placement:"bottom",attach:e.attach||(e.theadRef?function(){return e.getTableNode(e.theadRef)}:void 0),tooltipContent:w&&function(){return w},tooltipProps:dt(d.ellipsisTitle)==="object"?d.ellipsisTitle:void 0,overlayClassName:e.ellipsisOverlayClassName,classPrefix:e.classPrefix},ds(I)?I:{default:function(){return[I]}}):I])])});return L("tr",{key:s},[v])})};return L("thead",{ref:"theadRef",class:this.theadClasses},[n(this.rowAndColFixedPosition,this.thWidthList)])}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function eo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function na(t){for(var e=1;e1&&(b.rowspan=m.rowspan),((S=m)===null||S===void 0?void 0:S.colspan)>1&&(b.colspan=m.colspan),m.skipped)return null}var O=vr(v,d,n.rowAndColFixedPosition,n.tableColFixedClasses),R=na({},O.style);return(p=n.thWidthList)!==null&&p!==void 0&&p[v.colKey]&&(R.width="".concat(n.thWidthList[v.colKey],"px")),L("td",Ke(na({key:v.colKey},b),{class:O.classes,style:R}),[n.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:a,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 vs(t,e){var n=Ie(t),a=n.data,r=n.activeRowType,o=n.activeRowKeys,l=n.defaultActiveRowKeys,i=n.disableSpaceInactiveRow,u=H(-1),s=H(!1),v=H(!1),d=H(-1),p=Nt(o,l.value,t.onActiveChange,"activeRowKeys"),b=Pe(p,2),m=b[0],y=b[1],S=function(h){var g=h.row,c=h.index,f=W(g,t.rowKey);if(r.value==="single"){var C=m.value.length>1?[f]:[];y(C,{type:"inactive",activeRowList:[{row:g,rowIndex:c}],currentRowData:g})}else if(r.value==="multiple"){for(var E=m.value.filter(function(q){return q!==f}),k=[],K=0,M=a.value.length;K0&&arguments[0]!==void 0?arguments[0]:!0;return L("colgroup",null,[b.map(function(Y){var se={width:Mn((Q||m?a.thWidthList[Y.colKey]:void 0)||Y.width)||y};return Y.minWidth&&(se.minWidth=Mn(Y.minWidth)),!se.width&&!Y.minWidth&&a.tableLayout==="fixed"&&(se.minWidth="80px"),L("col",{key:Y.colKey,style:se},null)})])},x=function(){return a.showHeader===!1?null:!!(a.virtualConfig.isVirtualScroll.value||a.headerAffixedTop)&&(a.headerAffixedTop?L(Qn,Ke({offsetTop:0},ea(a.headerAffixedTop),{onFixedChange:a.onFixedChange,ref:"headerTopAffixRef"}),ao(h)?h:{default:function(){return[h]}}):a.isFixedHeader&&h)},O=function(){return L(Qn,Ke({offsetBottom:0},ea(a.horizontalScrollAffixedBottom),{style:{marginTop:"-".concat(a.scrollbarWidth*2,"px")},horizontalScrollAffixedBottom:!0,ref:"horizontalScrollAffixRef"}),{default:function(){return[L("div",{ref:"horizontalScrollbarRef",class:["scrollbar",a.tableBaseClass.obviousScrollbar],style:{width:"".concat(a.tableWidth,"px"),overflow:"auto",opacity:Number(a.showAffixFooter)}},[L("div",{style:{width:"".concat(a.tableElmWidth,"px"),height:"5px"}},null)])]}})},R={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},_=qa()<=11?4:0,A=this.isWidthOverflow?this.scrollbarWidth:0,j=H((((r=this.affixHeaderRef)===null||r===void 0?void 0:r.getBoundingClientRect().height)||0)-_),T=setTimeout(function(){var X;j.value=(((X=a.affixHeaderRef)===null||X===void 0?void 0:X.getBoundingClientRect().height)||0)-_,clearTimeout(T)},0),F=N(function(){return j.value-A}),P=On.headerAffixedTop?Number(this.showAffixHeader):1,I=N(function(){return{width:"".concat(a.tableWidth,"px"),height:"".concat(F.value,"px"),opacity:P}}),D=this.bordered?1:0,w=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(Qr,R,this.$slots)])]),h=L("div",{class:this.tableBaseClass.affixedHeaderWrap,style:I.value},[w]),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(Qn,Ke({class:this.tableBaseClass.affixedFooterWrap,onFixedChange:this.onFixedChange,offsetBottom:g||0},ea(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(a.tableWidth-D,"px"),opacity:Number(a.showAffixFooter)},class:["scrollbar",z({},a.tableBaseClass.affixedFooterElm,a.footerAffixedBottom||a.virtualConfig.isVirtualScroll.value)]},[L("table",{class:a.tableElmClasses,style:nt(nt({},a.tableElementStyles),{},{width:"".concat(a.tableElmWidth,"px")})},[S(!0),L(to,{rowKey:a.rowKey,isFixedHeader:a.isFixedHeader,rowAndColFixedPosition:v,footData:a.footData,columns:b,rowAttributes:a.rowAttributes,rowClassName:a.rowClassName,thWidthList:a.thWidthList,footerSummary:a.footerSummary,rowspanAndColspanInFooter:a.rowspanAndColspanInFooter},a.$slots)])])]}}),E="translate(0, ".concat(this.virtualConfig.scrollHeight.value+((i=this.tableFootHeight)!==null&&i!==void 0?i:0)+((u=j.value)!==null&&u!==void 0?u:0),"px)"),k={transform:E,"-ms-transform":E,"-moz-transform":E,"-webkit-transform":E},K=this.virtualConfig,M=nt(nt({classPrefix:this.classPrefix,ellipsisOverlayClassName:this.tableSize!=="medium"?this.sizeClassNames[this.tableSize]:"",rowAndColFixedPosition:v,showColumnShadow:this.showColumnShadow,data:K.isVirtualScroll.value?K.visibleData.value: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},Cn(this.$props,bl)),{},{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(Qr,nt(nt({},R),{},{thWidthList:m?this.thWidthList:{}}),this.$slots),L(cs,M,this.$slots),L(to,{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)])]),q=Re(this.loading)?this.loading:this.$slots.loading,ee=this.loading!==void 0&&L(tl,Ke({loading:!!this.loading,text:q,attach:this.tableRef?function(){return a.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&&O(),this.paginationAffixedBottom?L(Qn,Ke({offsetBottom:0},ea(this.paginationAffixedBottom),{ref:"paginationAffixRef"}),ao(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 yl={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 ro(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function oo(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:new Set,n=0,a=t.length;n1&&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=w.length;c1&&arguments[1]!==void 0?arguments[1]:{},n=0,a=t.length;n0&&O.value.length0&&arguments[0]!==void 0?arguments[0]:{},f=de(p.value),C=t.rowKey||"id",E=W(c,C),k=f.indexOf(E),K=k!==-1;if(S.value==="multiple")K?f.splice(k,1):f.push(E);else if(S.value==="single")f=K&&R.value?[]:[E];else{ze.warn("Table","`column.type` must be one of `multiple` and `single`");return}b(f,{selectedRowData:f.map(function(M){return m.value.get(M)}),currentRowKey:E,currentRowData:c,type:K?"uncheck":"check"})}function P(c){var f,C=t.rowKey||"id",E=x.value.map(function(M){return W(M,C)}),k=((f=a.value)===null||f===void 0?void 0:f.filter(function(M){return!E.includes(M)}))||[],K=c?[].concat(de(k),de(E)):de(k);b(K,{selectedRowData:c?K.map(function(M){return m.value.get(M)}):[],type:c?"check":"uncheck",currentRowKey:"CHECK_ALL_BOX"})}function I(c){var f=["multiple","single"].includes(c.type);return f?aa(aa({},c),{},{width:c.width||64,className:[e.checkCell,c.className],cell:function(E,k){return T(k)},title:c.type==="multiple"?A():c.title}):c}var D=function(f){var C=f.row,E=f.index,k=t.columns.findIndex(function($){return $.colKey==="row-select"}),K=!1;if(k!==-1){var M;K=(M=j({row:C,rowIndex:E,col:t.columns[k],colIndex:k}))===null||M===void 0?void 0:M.disabled}K||F(C)};ve([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?n.iconActive:n.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($o,Ke({content:d,placement:"right",showArrow:!1,class:e.tableSortClasses.iconDirection[l]},e.tooltipProps),Cs(i=e.getSortIcon(l,s))?i:{default:function(){return[i]}})});return L("div",{class:a},[o])}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function so(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ss(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},h=0,g=D.length;h * @author owenm * @license MIT */function fo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Tt(t){for(var e=1;e=0)&&(n[r]=t[r]);return n}function Ps(t,e){if(t==null)return{};var n=Ts(t,e),a,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0)&&(!Object.prototype.propertyIsEnumerable.call(t,a)||(n[a]=t[a]))}return n}var As="1.15.2";function Kt(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Bt=Kt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),qn=Kt(/Edge/i),ho=Kt(/firefox/i),Bn=Kt(/safari/i)&&!Kt(/chrome/i)&&!Kt(/android/i),Sl=Kt(/iP(ad|od|hone)/i),Ol=Kt(/chrome/i)&&Kt(/android/i),Rl={capture:!1,passive:!1};function Oe(t,e,n){t.addEventListener(e,n,!Bt&&Rl)}function Ce(t,e,n){t.removeEventListener(e,n,!Bt&&Rl)}function xa(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 js(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function yt(t,e,n,a){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&xa(t,e):xa(t,e))||a&&t===n)return t;if(t===n)break}while(t=js(t))}return null}var go=/\s+/g;function ut(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var a=(" "+t.className+" ").replace(go," ").replace(" "+e+" "," ");t.className=(a+(n?" "+e:"")).replace(go," ")}}function ie(t,e,n){var a=t&&t.style;if(a){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in a)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),a[e]=n+(typeof n=="string"?"":"px")}}function Sn(t,e){var n="";if(typeof t=="string")n=t;else do{var a=ie(t,"transform");a&&a!=="none"&&(n=a+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function El(t,e,n){if(t){var a=t.getElementsByTagName(e),r=0,o=a.length;if(n)for(;r=o:l=r<=o,!l)return a;if(a===_t())break;a=Gt(a,!1)}return!1}function Rn(t,e,n,a){for(var r=0,o=0,l=t.children;o2&&arguments[2]!==void 0?arguments[2]:{},r=a.evt,o=Ps(a,Bs);Yn.pluginEvent.bind(oe)(e,n,Tt({dragEl:U,parentEl:$e,ghostEl:ce,rootEl:ke,nextEl:ln,lastDownEl:fa,cloneEl:Be,cloneHidden:Xt,dragStarted:In,putSortable:Ze,activeSortable:oe.active,originalEvent:r,oldIndex:yn,oldDraggableIndex:Hn,newIndex:st,newDraggableIndex:Ut,hideGhostForTarget:Kl,unhideGhostForTarget:Il,cloneNowHidden:function(){Xt=!0},cloneNowShown:function(){Xt=!1},dispatchSortableEvent:function(i){et({sortable:n,name:i,originalEvent:r})}},o))};function et(t){Ms(Tt({putSortable:Ze,cloneEl:Be,targetEl:U,rootEl:ke,oldIndex:yn,oldDraggableIndex:Hn,newIndex:st,newDraggableIndex:Ut},t))}var U,$e,ce,ke,ln,fa,Be,Xt,yn,st,Hn,Ut,la,Ze,mn=!1,Sa=!1,Oa=[],an,wt,Ba,za,mo,wo,In,pn,Wn,$n=!1,ia=!1,ha,Qe,Ha=[],tr=!1,Ra=[],Pa=typeof document<"u",ua=Sl,yo=qn||Bt?"cssFloat":"float",zs=Pa&&!Ol&&!Sl&&"draggable"in document.createElement("div"),Al=function(){if(!!Pa){if(Bt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),jl=function(e,n){var a=ie(e),r=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),o=Rn(e,0,n),l=Rn(e,1,n),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(a.display==="flex")return a.flexDirection==="column"||a.flexDirection==="column-reverse"?"vertical":"horizontal";if(a.display==="grid")return a.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&&a[yo]==="none"||l&&a[yo]==="none"&&s+v>r)?"vertical":"horizontal"},Hs=function(e,n,a){var r=a?e.left:e.top,o=a?e.right:e.bottom,l=a?e.width:e.height,i=a?n.left:n.top,u=a?n.right:n.bottom,s=a?n.width:n.height;return r===i||o===u||r+l/2===i+s/2},Ws=function(e,n){var a;return Oa.some(function(r){var o=r[ct].options.emptyInsertThreshold;if(!(!o||gr(r))){var l=Xe(r),i=e>=l.left-o&&e<=l.right+o,u=n>=l.top-o&&n<=l.bottom+o;if(i&&u)return a=r}}),a},Fl=function(e){function n(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 n(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 a={},r=e.group;(!r||va(r)!="object")&&(r={name:r}),a.name=r.name,a.checkPull=n(r.pull,!0),a.checkPut=n(r.put),a.revertClone=r.revertClone,e.group=a},Kl=function(){!Al&&ce&&ie(ce,"display","none")},Il=function(){!Al&&ce&&ie(ce,"display","")};Pa&&!Ol&&document.addEventListener("click",function(t){if(Sa)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Sa=!1,!1},!0);var rn=function(e){if(U){e=e.touches?e.touches[0]:e;var n=Ws(e.clientX,e.clientY);if(n){var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=e[r]);a.target=a.rootEl=n,a.preventDefault=void 0,a.stopPropagation=void 0,n[ct]._onDragOver(a)}}},$s=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=Mt({},e),t[ct]=this;var n={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 jl(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&&!Bn,emptyInsertThreshold:5};Yn.initializePlugins(this,t,n);for(var a in n)!(a in e)&&(e[a]=n[a]);Fl(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:zs,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)),Oa.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Mt(this,Ls())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(pn=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,U):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var n=this,a=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(Zs(a),!U&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||r.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Bn&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=yt(u,r.draggable,a,!1),!(u&&u.animated)&&fa!==u)){if(yn=ft(u),Hn=ft(u,r.draggable),typeof v=="function"){if(v.call(this,e,u,this)){et({sortable:n,rootEl:s,name:"filter",targetEl:u,toEl:a,fromEl:a}),at("filter",n,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(d){if(d=yt(s,d.trim(),a,!1),d)return et({sortable:n,rootEl:d,name:"filter",targetEl:u,fromEl:a,toEl:a}),at("filter",n,{evt:e}),!0}),v)){o&&e.cancelable&&e.preventDefault();return}r.handle&&!yt(s,r.handle,a,!1)||this._prepareDragStart(e,i,u)}}},_prepareDragStart:function(e,n,a){var r=this,o=r.el,l=r.options,i=o.ownerDocument,u;if(a&&!U&&a.parentNode===o){var s=Xe(a);if(ke=o,U=a,$e=U.parentNode,ln=U.nextSibling,fa=a,la=l.group,oe.dragged=U,an={target:U,clientX:(n||e).clientX,clientY:(n||e).clientY},mo=an.clientX-s.left,wo=an.clientY-s.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,U.style["will-change"]="all",u=function(){if(at("delayEnded",r,{evt:e}),oe.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ho&&r.nativeDraggable&&(U.draggable=!0),r._triggerDragStart(e,n),et({sortable:r,name:"choose",originalEvent:e}),ut(U,l.chosenClass,!0)},l.ignore.split(",").forEach(function(v){El(U,v.trim(),Wa)}),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),ho&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),at("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(qn||Bt))){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 n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&Wa(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,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?Oe(document,"pointermove",this._onTouchMove):n?Oe(document,"touchmove",this._onTouchMove):Oe(document,"mousemove",this._onTouchMove):(Oe(U,"dragend",this),Oe(ke,"dragstart",this._onDragStart));try{document.selection?ga(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(mn=!1,ke&&U){at("dragStarted",this,{evt:n}),this.nativeDraggable&&Oe(document,"dragover",$s);var a=this.options;!e&&ut(U,a.dragClass,!1),ut(U,a.ghostClass,!0),oe.active=this,e&&this._appendGhost(),et({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(wt){this._lastX=wt.clientX,this._lastY=wt.clientY,Kl();for(var e=document.elementFromPoint(wt.clientX,wt.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(wt.clientX,wt.clientY),e!==n);)n=e;if(U.parentNode[ct]._isOutsideThisEl(e),n)do{if(n[ct]){var a=void 0;if(a=n[ct]._onDragOver({clientX:wt.clientX,clientY:wt.clientY,target:e,rootEl:n}),a&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);Il()}},_onTouchMove:function(e){if(an){var n=this.options,a=n.fallbackTolerance,r=n.fallbackOffset,o=e.touches?e.touches[0]:e,l=ce&&Sn(ce,!0),i=ce&&l&&l.a,u=ce&&l&&l.d,s=ua&&Qe&&bo(Qe),v=(o.clientX-an.clientX+r.x)/(i||1)+(s?s[0]-Ha[0]:0)/(i||1),d=(o.clientY-an.clientY+r.y)/(u||1)+(s?s[1]-Ha[1]:0)/(u||1);if(!oe.active&&!mn){if(a&&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,Ut=Hn),et({sortable:this,name:"end",toEl:$e,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){at("nulling",this),ke=U=$e=ce=ln=Be=fa=Xt=an=wt=In=st=Ut=yn=Hn=pn=Wn=Ze=la=oe.dragged=oe.ghost=oe.clone=oe.active=null,Ra.forEach(function(e){e.checked=!0}),Ra.length=Ba=za=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":U&&(this._onDragOver(e),Vs(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,a=this.el.children,r=0,o=a.length,l=this.options;rr.right+o||t.clientY>a.bottom&&t.clientX>a.left:t.clientY>r.bottom+o||t.clientX>a.right&&t.clientY>a.top}function qs(t,e,n,a,r,o,l,i){var u=a?t.clientY:t.clientX,s=a?n.height:n.width,v=a?n.top:n.left,d=a?n.bottom:n.right,p=!1;if(!l){if(i&&hav+s*o/2:ud-ha)return-Wn}else if(u>v+s*(1-r)/2&&ud-s*o/2)?u>v+s/2?1:-1:0}function Ys(t){return ft(U)0?(a.splice(n+1,0,a[e]),a.splice(e,1)):(a.splice(n,0,a[e]),a.splice(e+1,1)),a}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function So(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function jn(t){for(var e=1;ec?c*(g-1)+I:I}var _=function(D){if(!(!x.value&&!S.value)){var w=D==null?void 0:D.querySelector("tbody");if(!w)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!gi(c.related,d.base)},onEnd:function(c){var f;if(c.newIndex!==c.oldIndex){Oo(c.item),Ro(c.from,c.item,c.oldIndex);var C=c.oldIndex,E=c.newIndex;(Re(t.firstFullRow)&&t.firstFullRow(Ge)||e.slots.firstFullRow||e.slots["first-full-row"])&&(C-=1,E-=1),i.value&&(C=R(C,i.value),E=R(E,i.value));var k={data:l.value,currentIndex:C,current:l.value[C],targetIndex:E,target:l.value[E],newData:xo(de(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);!w||(S.value?new oe(w,jn({},h)):new oe(w,jn(jn({},h),{},{handle:".".concat(s.handle)})))}},A=function(D,w){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){w&&(Oo(c.item),Ro(c.from,c.item,c.oldIndex));var C=c.oldIndex,E=c.newIndex,k=c.target,K=w?C:E,M=w?E:C,$=k.children[K],q=k.children[M],ee=Ca(b.value,$.dataset.colkey),ne=Ca(b.value,q.dataset.colkey);(!ee||!ee.colKey)&&ze.error("Table","colKey is missing in ".concat(JSON.stringify(ee))),(!ne||!ne.colKey)&&ze.error("Table","colKey is missing in ".concat(JSON.stringify(ne))),K=io(t.columns,ee.colKey),M=io(t.columns,ne.colKey);var ae={data:b.value,currentIndex:K,current:ee,targetIndex:M,target:ne,newData:xo(de(t.columns),K,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)},j=function(D){if(!(!O.value||!D)){var w=D.querySelectorAll("thead > tr");if(w.length<=1){var h=Pe(w,1),g=h[0];A(g,!0)}else w==null||w.forEach(function(c){A(c,!1)})}};function T(I){m.value=I}function F(I){b.value=I}ve([m,b,o,n],function(I){var D=Pe(I,4),w=D[0];D[1],D[2];var h=D[3];P(w,h)});function P(I,D){var w=I;if(!(!I||!w.$el||!D.showElement))var h=setTimeout(function(){_(w.$el),j(w.$el);var g=setTimeout(function(){w.$refs.affixHeaderRef&&j(w.$refs.affixHeaderRef),clearTimeout(g)});clearTimeout(h)},60)}return{innerPagination:i,isRowDraggable:S,isRowHandlerDraggable:x,isColDraggable:O,setDragSortPrimaryTableRef:T,setDragSortColumns:F}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function tc(t){var e=qt(),n=gt("table",t.locale),a=n.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 p=t.asyncLoading,b={"load-more":a.value.loadingMoreText,loading:a.value.loadingText}[String(p)];return L("div",{class:u.value,onClick:s},[L(tl,{indicator:p==="loading",loading:!!p,size:"small",text:b},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 Eo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function _e(t){for(var e=1;e2?E-2:0),K=2;K1?ne-1:0),J=1;J0&&arguments[0]!==void 0?arguments[0]:{errors:[],errorMap:{}},g=h.errorMap;g&&Object.assign(w,g)}),r.value=w,(D=t.onValidate)===null||D===void 0||D.call(t,{result:w}),F({result:w})},P)})},b=function(R,_,A){i.value[R]||(i.value[R]=ir(_)),Object.entries(A).forEach(function(j){var T=Pe(j,2),F=T[0],P=T[1];Vn(i.value[R],F,P)})},m=function(R){if(t.editableRowKeys){var _=W(R.row,t.rowKey||"id"),A=a.get(_);if(A){var j=A.findIndex(function(T){return T.col.colKey===R.col.colKey});j===-1?A.push(R):A[j]=R,a.set(_,A)}else a.set(_,[R])}},y=function(){r.value={}},S=function(R){var _=Un(R.row,t.rowKey,R.col.colKey,R.colIndex);R.isEdit?l.value[_]=R:delete l.value[_]},x=function(R){var _,A=R.row,j=R.col,T=W(A,t.rowKey||"id"),F=i.value[T];if(F&&(_=t.editableRowKeys)!==null&&_!==void 0&&_.includes(T)){var P=Fn({},F);return Vn(P,j.colKey,W(F,j.colKey)),P}return A};return ve(function(){var O;return(O=n.value)===null||O===void 0?void 0:O.join(",")},function(O){var R=O.split(","),_=Object.keys(i.value);_.forEach(function(A){R.includes(A)||delete i.value[A]})}),{editedFormData:i,errorListMap:r,editableKeysMap:o,validateTableData:p,validateRowData:v,onRuleChange:m,clearValidateData:y,onUpdateEditedCell:b,getEditRowData:x,onPrimaryTableCellEditChange:S}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function _o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function jt(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:!1,Je=[],qe=function(){var Zt,Qt,en,tn,mt,we=jt({},fe[bt]),fn=((Zt=we.children)===null||Zt===void 0?void 0:Zt.length)||((Qt=A.value)===null||Qt===void 0?void 0:Qt.includes(we.colKey));if(!fn&&(e.columnController||e.displayColumns||e.defaultDisplayColumns)&&!Fe)return 1;we=K(we);var Wt=e.sort;if(we.sorter&&e.showSortColumnBgColor){var Pn=Wt instanceof Array?Wt:[Wt],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(m.sortColumn):[we.className,m.sortColumn])}if(we.sorter||we.filter){var Ot=Ta(n.slots,we,bt),Rt=we,Aa=Rt.ellipsisTitle;we.title=function(De,Se){var We,Et=we.sorter?g(Se):null,$t=we.filter?J(Se):null,An=(We=i.value)===null||We===void 0?void 0:We.tableContentRef;return pt([Ot,Et,$t],Se.col,Se.colIndex,Aa,An,{classPrefix:v,ellipsisOverlayClassName:R.value!=="medium"?O[R.value]:""})},we.ellipsisTitle=!1}if((en=we.edit)!==null&&en!==void 0&&en.component){var ja=we.cell;we.cell=function(De,Se){var We=jt(jt({},Se),{},{row:te(Se),oldCell:ja,rowKey:e.rowKey||"id",tableBaseClass:p,cellEmptyContent:e.cellEmptyContent,onChange:Ae,onValidate:e.onRowValidate,onRuleChange:V,onEditableChange:le});if(e.editableRowKeys){var Et,$t=W(Se.row,e.rowKey||"id");We.editable=_n.value[$t]||!1;var An=[$t,Se.col.colKey].join("__"),Zn=(Et=Dn.value)===null||Et===void 0?void 0:Et[An];Zn&&(We.errors=Zn)}return e.editableCellState&&(We.readonly=!e.editableCellState(Se)),L(nc,Ke(We,{onUpdateEditedCell:Z}),n.slots)}}if((tn=we.children)!==null&&tn!==void 0&&tn.length){var ye;we.children=be(we.children,Fe||((ye=A.value)===null||ye===void 0?void 0:ye.includes(we.colKey)))}(!we.children||(mt=we.children)!==null&&mt!==void 0&&mt.length)&&Je.push(we)},bt=0,Jt=fe.length;bt2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=W(t,e);return n||a?"".concat(r,"_").concat(n||0,"_").concat(a||0,"}"):r}var lc=function(){function t(){Ci(this,t),z(this,"treeDataMap",new Map),z(this,"expandAllRowIndex",void 0),this.treeDataMap=new Map}return yi(t,[{key:"initialTreeStore",value:function(n,a,r){var o;(o=this.treeDataMap)===null||o===void 0||o.clear(),this.initialTreeDataMap(this.treeDataMap,n,a.find(function(l){return l.colKey==="row-select"}),r)}},{key:"getAllUniqueKeys",value:function(n,a){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],o=0,l=n.length;o2&&arguments[2]!==void 0?arguments[2]:[],o=0,l=n.length;o=0){var l=(o.expandChildrenLength||0)+1;if(a.splice(o.rowIndex,l),o.parent){var i=W(o.parent.row,r.childrenKey),u=i.findIndex(function(s){return W(s,r.rowKey)===n});i.splice(u,1),bn(this.treeDataMap,o.parent.row,-1*l,"delete",r)}this.treeDataMap.delete(n),on(this.treeDataMap,a,{minRowIndex:o.rowIndex,rowKey:r.rowKey,type:"remove"})}else ze.warn("EnhancedTable","Can not remove this node, which is not appeared.");return a}},{key:"removeChildren",value:function(n,a,r){var o=this.treeDataMap.get(n);if(o&&o.rowIndex>=0){var l=o.expandChildrenLength||0;l&&a.splice(o.rowIndex+1,l),o.parent&&bn(this.treeDataMap,o.parent.row,-1*l,"delete",r),o.expandChildrenLength=0,o.expanded=!1,Vn(o.row,r.childrenKey,void 0),this.treeDataMap.set(n,o),l&&on(this.treeDataMap,a,{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 a}},{key:"appendTo",value:function(n,a,r,o){var l=this.treeDataMap.get(n);if(!this.validateDataExist(l,n))return r;for(var i=W(l.row,o.childrenKey),u=l.expanded||!(i!=null&&i.length),s=a instanceof Array?a:[a],v=[],d=-1,p=0,b=s.length;pl){var y=n.slice(p,o),S=b.concat(m,y);n.splice(l,S.length),n.splice.apply(n,[l,0].concat(de(S))),on(this.treeDataMap,n,{rowKey:r.rowKey,minRowIndex:l,maxRowIndex:d})}else{var x=n.slice(d,l),O=x.concat(m,b);n.splice(o,O.length),n.splice.apply(n,[o,0].concat(de(O))),on(this.treeDataMap,n,{rowKey:r.rowKey,minRowIndex:o,maxRowIndex:p})}if(s.parent){for(var R=s.parent.row[r.childrenKey],_=0,A=-1,j=-1,T=0,F=R.length;T=2));T++);R[A]=a.target,R[j]=a.current}return{dataSource:n,result:!0}}},{key:"expandAll",value:function(n,a){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,p=u.length;d2&&arguments[2]!==void 0?arguments[2]:"data",l=[];return n.forEach(function(i){var u=W(i,a.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(n,a,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=a.length;u0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],a=[],r=new Map,o=new Map,l=0,i=t.length;l0&&arguments[0]!==void 0?arguments[0]:"expand-all",j=arguments.length>1?arguments[1]:void 0,T=j||l.value;a.value=n.value.expandAll(T,r.value);var F=a.value.map(function(P){return Ft(P,r.value.rowKey)});m(F,{row:void 0,rowState:void 0,rowIndex:void 0,type:"expand",trigger:A}),y.value.type="expand-all"}function x(){a.value=de(n.value.foldAll(a.value,r.value)),m([],{row:void 0,rowState:void 0,rowIndex:void 0,type:"fold",trigger:"fold-all"})}function O(A,j){var T,F=A.row,P=A.rowIndex;y.value=Xa({type:"user-reaction-change"},A);var I=Ft(F,r.value.rowKey),D=n.value.treeDataMap.get(I),w=de(b.value);if(D.expanded){for(var h=n.value.getExpandedChildrenKeys([F],r.value),g=0,c=w.length;g2&&arguments[2]!==void 0?arguments[2]:[],F=ic(j,T),P=F.addedList,I=F.removedList;return n.value.expandTreeNode(P,A,r.value),n.value.foldTreeNode(I,A,r.value),de(A)}ve([b,l],function(A,j){var T=Pe(A,1),F=T[0],P=Pe(j,1),I=P[0];if(!(!n.value.treeDataMap.size||!l.value.length)){if(y.value.type==="user-reaction-change"){var D=y.value||{},w=D.row,h=D.rowIndex;a.value=de(n.value.toggleExpandData({row:w,rowIndex:h},de(a.value),r.value))}else y.value.type==="props-change"&&R(a.value,F,I);y.value.type="props-change"}});var _=function(j){var T,F;(T=u.value)!==null&&T!==void 0&&T.defaultExpandAll&&!s.value?(S("default-expand-all",de(j)),s.value=!0):(F=b.value)!==null&&F!==void 0&&F.length&&It(function(){a.value=R(de(j),b.value,[])})};return{tExpandedTreeNode:b,isDefaultExpandAllExecute:s,isDefaultExpandedTreeNodesExecute:v,expandAll:S,foldAll:x,onExpandFoldIconClick:O,updateExpandOnDataChange:_}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function jo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function vt(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:"",X=arguments.length>1?arguments[1]:void 0;if(!B){b.value=d.value.appendToRoot(X,b.value,x.value);return}b.value=de(d.value.appendTo(B,X,b.value,x.value))}function q(B,X){b.value=de(d.value.insertAfter(B,X,b.value,x.value))}function ee(B,X){b.value=de(d.value.insertBefore(B,X,b.value,x.value))}function ne(B){var X=d.value.swapData(b.value,B,x.value);if(X.result)b.value=de(X.dataSource);else{var Q,Y={code:X.code,reason:X.reason};(Q=t.onAbnormalDragSort)===null||Q===void 0||Q.call(t,Y)}}function ae(){return d.value.getTreeNode(b.value,x.value)}function J(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data";return d.value.getTreeExpandedRow(b.value,x.value,B)}return{store:d,rowDataKeys:x,dataSource:b,swapData:ne,setData:E,getData:k,remove:K,removeChildren:M,appendTo:$,insertAfter:q,insertBefore:ee,formatTreeColumn:C,toggleExpandData:c,expandAll:j,foldAll:T,getTreeNode:ae,resetData:h,getTreeExpandedRow:J,onExpandFoldIconClick:P}}/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function Fo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function da(t){for(var e=1;e0&&I=0)return T.rowIndex;if(T.rowIndex<0)return j(T.parent)},A=function(T){var F=T.index;if(!F&&F!==0){if(!T.key){ze.error("Table","scrollToElement: one of `index` or `key` must exist.");return}var P=p.value.get(T.key);F=_(P,T.key),(F<0||F===void 0)&&ze.error("Table","".concat(T.key," does not exist in data, check `rowKey` or `data` please."))}a.value.scrollToElement(Dt(Dt({},T),{},{index:F}))};return n.expose(Dt(Dt({store:o.value,dataSource:l.value},v),{},{primaryTableRef:a,validateRowData:function(T){return a.value.validateRowData(T)},validateTableData:function(){return a.value.validateTableData()},clearValidateData:function(){a.value.clearValidateData()},refreshTable:function(){a.value.refreshTable()},scrollToElement:A})),function(){var j,T=ko(),F=T.vnode,P=Dt(Dt({},F.props),{},{rowKey:e.rowKey||"id",data:l.value,columns:x.value,indeterminateSelectedRowKeys:m.value,disableDataPage:Boolean(e.tree&&Object.keys(e.tree).length),onSelectChange:y,onDragSort:O,rowClassName:function(D){var w=D.row,h=W(w,e.rowKey||"id"),g=p.value.get(h);return g?["".concat(d.value,"-table-tr--level-").concat(g.level),e.rowClassName]:[e.rowClassName]}});return(j=e.tree)!==null&&j!==void 0&&j.expandTreeNodeOnClick&&(P.onRowClick=R),L(mr,Ke(P,{ref:a}),n.slots)}}});/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */Yt(wl);Yt(mr);Yt(hc);var gc=ir(mr),Tc=Yt(gc,"TTable");export{_c as M,Tc as T};