1)for(var y=p+1;y1)for(var m=c+1;m1&&(R.colspan=f.colspan),createVNode("th",mergeProps({key:f.colKey,"data-colkey":f.colKey,class:E,style:x},R,g,P),[createVNode("div",{class:n.tableBaseClass.thCellInner},[N?createVNode(TEllipsis,{placement:"bottom",attach:n.attach||(n.theadRef?function(){return n.getTableNode(n.theadRef)}:void 0),tooltipContent:j&&function(){return j},tooltipProps:_typeof$2(f.ellipsisTitle)==="object"?f.ellipsisTitle:void 0,overlayClassName:n.ellipsisOverlayClassName,classPrefix:n.classPrefix},_isSlot$6(T)?T:{default:function(){return[T]}}):T])])});return createVNode("tr",{key:c},[d])})};return createVNode("thead",{ref:"theadRef",class:this.theadClasses},[t(this.rowAndColFixedPosition,this.thWidthList)])}});/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$w(e){for(var n=1;n1&&(p.rowspan=g.rowspan),((y=g)===null||y===void 0?void 0:y.colspan)>1&&(p.colspan=g.colspan),g.skipped)return null}var _=getColumnFixedStyles(d,f,t.rowAndColFixedPosition,t.tableColFixedClasses),C=_objectSpread$w({},_.style);return(v=t.thWidthList)!==null&&v!==void 0&&v[d.colKey]&&(C.width="".concat(t.thWidthList[d.colKey],"px")),createVNode("td",mergeProps(_objectSpread$w({key:d.colKey},p),{class:_.classes,style:C}),[t.renderTFootCell({row:a,rowIndex:u,col:d,colIndex:f})])})])}),o=this.renderTNode("footerSummary");return!o&&(!this.footData||!this.footData.length)?null:createVNode("tfoot",{ref:"tFooterRef",class:l},[o&&createVNode("tr",{class:this.tableFullRowClasses.base},[createVNode("td",{colspan:this.columns.length},[createVNode("div",{class:this.tableFullRowClasses.innerFullElement},[o])])]),r])}});/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function useRowHighlight(e,n){var t=toRefs(e),l=t.data,r=t.activeRowType,o=t.activeRowKeys,a=t.defaultActiveRowKeys,u=t.disableSpaceInactiveRow,s=ref(-1),c=ref(!1),d=ref(!1),f=ref(-1),v=useDefaultValue(o,a.value,e.onActiveChange,"activeRowKeys"),p=_slicedToArray(v,2),g=p[0],m=p[1],y=function(N){var R=N.row,I=N.index,O=get_1(R,e.rowKey);if(r.value==="single"){var D=g.value.length>1?[O]:[];m(D,{type:"inactive",activeRowList:[{row:R,rowIndex:I}],currentRowData:R})}else if(r.value==="multiple"){var A=g.value.filter(function(L){return L!==O});m(A,{type:"inactive",activeRowList:[],currentRowData:R})}},b=function(N){var R=N.row,I=get_1(R,e.rowKey);if(r.value==="single")m([I],{activeRowList:[{row:R,rowIndex:N.index}],currentRowData:R,type:"active"});else{for(var O=g.value.concat(I),D=[],A=0,L=l.value.length;A0&&arguments[0]!==void 0?arguments[0]:!0;return createVNode("colgroup",null,[d.map(function(G){var Y={width:formatCSSUnit((H||f?l.thWidthList[G.colKey]:void 0)||G.width)||v};return G.minWidth&&(Y.minWidth=formatCSSUnit(G.minWidth)),!Y.width&&!G.minWidth&&l.tableLayout==="fixed"&&(Y.minWidth="80px"),createVNode("col",{key:G.colKey,style:Y},null)})])},g=function(){return l.showHeader===!1?null:!!(l.virtualConfig.isVirtualScroll.value||l.headerAffixedTop)&&(l.headerAffixedTop?createVNode(Affix,mergeProps({offsetTop:0},getAffixProps(l.headerAffixedTop),{onFixedChange:l.onFixedChange,ref:"headerTopAffixRef"}),_isSlot$5(T)?T:{default:function(){return[T]}}):l.isFixedHeader&&T)},m=function(){return createVNode(Affix,mergeProps({offsetBottom:0},getAffixProps(l.horizontalScrollAffixedBottom),{style:{marginTop:"-".concat(l.scrollbarWidth*2,"px")},horizontalScrollAffixedBottom:!0,ref:"horizontalScrollAffixRef"}),{default:function(){return[createVNode("div",{ref:"horizontalScrollbarRef",class:["scrollbar",l.tableBaseClass.obviousScrollbar],style:{width:"".concat(l.tableWidth,"px"),overflow:"auto",opacity:Number(l.showAffixFooter)}},[createVNode("div",{style:{width:"".concat(l.tableElmWidth,"px"),height:"5px"}},null)])]}})},y={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.size!=="medium"?this.sizeClassNames[this.size]:"",attach:this.attach,showColumnShadow:this.showColumnShadow,thDraggable:this.thDraggable},b=getIEVersion()<=11?4:0,_=this.isWidthOverflow?this.scrollbarWidth:0,C=ref((((r=this.affixHeaderRef)===null||r===void 0?void 0:r.getBoundingClientRect().height)||0)-b),$=setTimeout(function(){var W;C.value=(((W=l.affixHeaderRef)===null||W===void 0?void 0:W.getBoundingClientRect().height)||0)-b,clearTimeout($)},0),w=computed(function(){return C.value-_}),E=baseTableProps.headerAffixedTop?Number(this.showAffixHeader):1,S=computed(function(){return{width:"".concat(l.tableWidth,"px"),height:"".concat(w.value,"px"),opacity:E}}),k=this.bordered?1:0,x=Boolean((this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)&&this.tableWidth)&&createVNode("div",{ref:"affixHeaderRef",style:{width:"".concat(this.tableWidth-k,"px"),opacity:Number(this.showAffixHeader)},class:["scrollbar",_defineProperty$3({},this.tableBaseClass.affixedHeaderElm,this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)]},[createVNode("table",{class:this.tableElmClasses,style:_objectSpread$v(_objectSpread$v({},this.tableElementStyles),{},{width:"".concat(this.tableElmWidth,"px")})},[p(!0),createVNode(THead,y,this.$slots)])]),T=createVNode("div",{class:this.tableBaseClass.affixedHeaderWrap,style:S.value},[x]),P=this.isWidthOverflow?this.scrollbarWidth:0;this.bordered&&(P+=1);var j=Boolean(this.footerAffixedBottom&&((o=this.footData)===null||o===void 0?void 0:o.length)&&this.tableWidth)&&createVNode(Affix,mergeProps({class:this.tableBaseClass.affixedFooterWrap,onFixedChange:this.onFixedChange,offsetBottom:P||0},getAffixProps(this.footerAffixedBottom),{style:{marginTop:"".concat(-1*(this.tableFootHeight+P),"px")},ref:"footerBottomAffixRef"}),{default:function(){return[createVNode("div",{ref:"affixFooterRef",style:{width:"".concat(l.tableWidth-k,"px"),opacity:Number(l.showAffixFooter)},class:["scrollbar",_defineProperty$3({},l.tableBaseClass.affixedFooterElm,l.footerAffixedBottom||l.isVirtual)]},[createVNode("table",{class:l.tableElmClasses,style:_objectSpread$v(_objectSpread$v({},l.tableElementStyles),{},{width:"".concat(l.tableElmWidth,"px")})},[p(!0),createVNode(TFoot,{rowKey:l.rowKey,isFixedHeader:l.isFixedHeader,rowAndColFixedPosition:u,footData:l.footData,columns:d,rowAttributes:l.rowAttributes,rowClassName:l.rowClassName,thWidthList:l.thWidthList,footerSummary:l.footerSummary,rowspanAndColspanInFooter:l.rowspanAndColspanInFooter},l.$slots)])])]}}),N="translate(0, ".concat(this.virtualConfig.scrollHeight.value,"px)"),R={transform:N,"-ms-transform":N,"-moz-transform":N,"-webkit-transform":N},I=this.virtualConfig,O=_objectSpread$v(_objectSpread$v({classPrefix:this.classPrefix,ellipsisOverlayClassName:this.size!=="medium"?this.sizeClassNames[this.size]:"",rowAndColFixedPosition:u,showColumnShadow:this.showColumnShadow,data:I.isVirtualScroll.value?I.visibleData.value:c,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},pick_1(this.$props,extendTableProps)),{},{pagination:this.innerPagination,attach:this.attach,hoverRow:this.hoverRow,activeRow:this.tActiveRow,onRowClick:this.onInnerRowClick}),D=createVNode("div",{ref:"tableContentRef",class:this.tableBaseClass.content,style:this.tableContentStyles,onScroll:this.onInnerVirtualScroll},[this.virtualConfig.isVirtualScroll.value&&createVNode("div",{class:this.virtualScrollClasses.cursor,style:R},null),createVNode("table",{ref:"tableElmRef",class:this.tableElmClasses,style:_objectSpread$v(_objectSpread$v({},this.tableElementStyles),{},{width:this.resizable&&this.isWidthOverflow&&this.tableElmWidth?"".concat(this.tableElmWidth,"px"):this.tableElementStyles.width})},[p(!1),this.showHeader&&createVNode(THead,_objectSpread$v(_objectSpread$v({},y),{},{thWidthList:f?this.thWidthList:{}}),this.$slots),createVNode(TBody,O,this.$slots),createVNode(TFoot,{rowKey:this.rowKey,isFixedHeader:this.isFixedHeader,rowAndColFixedPosition:u,footData:this.footData,columns:d,rowAttributes:this.rowAttributes,rowClassName:this.rowClassName,footerSummary:this.footerSummary,rowspanAndColspanInFooter:this.rowspanAndColspanInFooter},this.$slots)])]),A=isFunction_1(this.loading)?this.loading:this.$slots.loading,L=this.loading!==void 0&&createVNode(Loading,mergeProps({loading:!!this.loading,text:A,attach:this.tableRef?function(){return l.tableRef}:void 0,showOverlay:!0,size:"small"},this.loadingProps),null),M=this.renderTNode("topContent"),z=this.renderTNode("bottomContent"),K=createVNode("div",{ref:"paginationRef",class:this.tableBaseClass.paginationWrap,style:{opacity:Number(this.showAffixPagination)}},[this.renderPagination()]),q=!!z&&createVNode("div",{ref:"bottomContentRef",class:this.tableBaseClass.bottomContent},[z]);return createVNode("div",{ref:"tableRef",tabindex:"0",class:this.dynamicBaseTableClasses,onFocus:this.onTableFocus,onBlur:this.onTableBlur},[!!M&&createVNode("div",{class:this.tableBaseClass.topContent},[M]),g(),D,j,L,q,this.showRightDivider&&createVNode("div",{class:this.tableBaseClass.scrollbarDivider,style:{right:"".concat(this.scrollbarWidth,"px"),bottom:this.dividerBottom?"".concat(this.dividerBottom,"px"):void 0,height:"".concat((a=this.tableContentRef)===null||a===void 0?void 0:a.getBoundingClientRect().height,"px")}},null),this.horizontalScrollAffixedBottom&&m(),this.paginationAffixedBottom?createVNode(Affix,mergeProps({offsetBottom:0},getAffixProps(this.paginationAffixedBottom),{ref:"paginationAffixRef"}),_isSlot$5(K)?K:{default:function(){return[K]}}):K,createVNode("div",{ref:"resizeLineRef",class:this.tableBaseClass.resizeLine,style:this.resizeLineStyle},null)])}});/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/var primaryTableProps={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(n){return n?["row","row-handler","col","row-handler-col","drag-col"].includes(n):!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(n){return n?["single","multiple"].includes(n):!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.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$u(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:new Set,t=0,l=e.length;t1&&arguments[1]!==void 0?arguments[1]:[];if((N=c.value)!==null&&N!==void 0&&(N=N.groupColumns)!==null&&N!==void 0&&N.length)return[];for(var I=0,O=j.length;I1&&arguments[1]!==void 0?arguments[1]:{},t=0,l=e.length;t0&&_.value.length0&&arguments[0]!==void 0?arguments[0]:{},O=_toConsumableArray(v.value),D=e.rowKey||"id",A=get_1(I,D),L=O.indexOf(A),M=L!==-1;if(y.value==="multiple")M?O.splice(L,1):O.push(A);else if(y.value==="single")O=M&&C.value?[]:[A];else{log.warn("Table","`column.type` must be one of `multiple` and `single`");return}p(O,{selectedRowData:O.map(function(z){return g.value.get(z)}),currentRowKey:A,currentRowData:I,type:M?"uncheck":"check"})}function x(I){var O,D=e.rowKey||"id",A=b.value.map(function(z){return get_1(z,D)}),L=((O=l.value)===null||O===void 0?void 0:O.filter(function(z){return!A.includes(z)}))||[],M=I?[].concat(_toConsumableArray(L),_toConsumableArray(A)):_toConsumableArray(L);p(M,{selectedRowData:I?M.map(function(z){return g.value.get(z)}):[],type:I?"check":"uncheck",currentRowKey:"CHECK_ALL_BOX"})}function T(I){var O=["multiple","single"].includes(I.type);return O?_objectSpread$s(_objectSpread$s({},I),{},{width:I.width||64,className:[n.checkCell,I.className],cell:function(A,L){return S(L)},title:I.type==="multiple"?w():I.title}):I}var P=function(O){var D=O.row,A=O.index,L=e.columns.findIndex(function(K){return K.colKey==="row-select"}),M=!1;if(L!==-1){var z;M=(z=E({row:D,rowIndex:A,col:e.columns[L],colIndex:L}))===null||z===void 0?void 0:z.disabled}M||k(D)};watch([a,o],function(){for(var I=0,O=a.value.length;I1)],r={asc:this.globalConfig.sortAscendingOperationText,desc:this.globalConfig.sortDescendingOperationText},o=this.allowSortTypes.map(function(a){var u,s,c=a===n.sortOrder?t.iconActive:t.iconDefault,d=n.globalConfig.sortCancelOperationText,f=a===n.sortOrder?d:r[a];return((s=n.hideSortTips)!==null&&s!==void 0?s:n.globalConfig.hideSortTips)?n.getSortIcon(a,c):createVNode(Tooltip,mergeProps({content:f,placement:"right",showArrow:!1,class:n.tableSortClasses.iconDirection[a]},n.tooltipProps),_isSlot$4(u=n.getSortIcon(a,c))?u:{default:function(){return[u]}})});return createVNode("div",{class:l},[o])}});/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$r(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{},N=0,R=P.length;N
* @author owenm
* @license MIT
*/function ownKeys$p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread2(e){for(var n=1;n=0)&&(t[r]=e[r]);return t}function _objectWithoutProperties(e,n){if(e==null)return{};var t=_objectWithoutPropertiesLoose(e,n),l,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&(!Object.prototype.propertyIsEnumerable.call(e,l)||(t[l]=e[l]))}return t}var version="1.15.2";function userAgent(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(e,n,t){e.addEventListener(n,t,!IE11OrLess&&captureMode)}function off(e,n,t){e.removeEventListener(n,t,!IE11OrLess&&captureMode)}function matches(e,n){if(!!n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function getParentOrHost(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function closest(e,n,t,l){if(e){t=t||document;do{if(n!=null&&(n[0]===">"?e.parentNode===t&&matches(e,n):matches(e,n))||l&&e===t)return e;if(e===t)break}while(e=getParentOrHost(e))}return null}var R_SPACE=/\s+/g;function toggleClass(e,n,t){if(e&&n)if(e.classList)e.classList[t?"add":"remove"](n);else{var l=(" "+e.className+" ").replace(R_SPACE," ").replace(" "+n+" "," ");e.className=(l+(t?" "+n:"")).replace(R_SPACE," ")}}function css(e,n,t){var l=e&&e.style;if(l){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),n===void 0?t:t[n];!(n in l)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),l[n]=t+(typeof t=="string"?"":"px")}}function matrix(e,n){var t="";if(typeof e=="string")t=e;else do{var l=css(e,"transform");l&&l!=="none"&&(t=l+" "+t)}while(!n&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function find(e,n,t){if(e){var l=e.getElementsByTagName(n),r=0,o=l.length;if(t)for(;r=o:a=r<=o,!a)return l;if(l===getWindowScrollingElement())break;l=getParentAutoScrollElement(l,!1)}return!1}function getChild(e,n,t,l){for(var r=0,o=0,a=e.children;o2&&arguments[2]!==void 0?arguments[2]:{},r=l.evt,o=_objectWithoutProperties(l,_excluded$1);PluginManager.pluginEvent.bind(Sortable)(n,t,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:r,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(u){_dispatchEvent({sortable:t,name:u,originalEvent:r})}},o))};function _dispatchEvent(e){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},e))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(!!documentExists){if(IE11OrLess)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),_detectDirection=function(n,t){var l=css(n),r=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),o=getChild(n,0,t),a=getChild(n,1,t),u=o&&css(o),s=a&&css(a),c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+getRect(o).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+getRect(a).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&u.float&&u.float!=="none"){var f=u.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return o&&(u.display==="block"||u.display==="flex"||u.display==="table"||u.display==="grid"||c>=r&&l[CSSFloatProperty]==="none"||a&&l[CSSFloatProperty]==="none"&&c+d>r)?"vertical":"horizontal"},_dragElInRowColumn=function(n,t,l){var r=l?n.left:n.top,o=l?n.right:n.bottom,a=l?n.width:n.height,u=l?t.left:t.top,s=l?t.right:t.bottom,c=l?t.width:t.height;return r===u||o===s||r+a/2===u+c/2},_detectNearestEmptySortable=function(n,t){var l;return sortables.some(function(r){var o=r[expando].options.emptyInsertThreshold;if(!(!o||lastChild(r))){var a=getRect(r),u=n>=a.left-o&&n<=a.right+o,s=t>=a.top-o&&t<=a.bottom+o;if(u&&s)return l=r}}),l},_prepareGroup=function(n){function t(o,a){return function(u,s,c,d){var f=u.options.group.name&&s.options.group.name&&u.options.group.name===s.options.group.name;if(o==null&&(a||f))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return t(o(u,s,c,d),a)(u,s,c,d);var v=(a?u:s).options.group.name;return o===!0||typeof o=="string"&&o===v||o.join&&o.indexOf(v)>-1}}var l={},r=n.group;(!r||_typeof(r)!="object")&&(r={name:r}),l.name=r.name,l.checkPull=t(r.pull,!0),l.checkPut=t(r.put),l.revertClone=r.revertClone,n.group=l},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(e){if(ignoreNextClick)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function(n){if(dragEl){n=n.touches?n.touches[0]:n;var t=_detectNearestEmptySortable(n.clientX,n.clientY);if(t){var l={};for(var r in n)n.hasOwnProperty(r)&&(l[r]=n[r]);l.target=l.rootEl=t,l.preventDefault=void 0,l.stopPropagation=void 0,t[expando]._onDragOver(l)}}},_checkOutsideTargetEl=function(n){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(n.target)};function Sortable(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=_extends({},n),e[expando]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,u){a.setData("Text",u.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:Sortable.supportPointer!==!1&&"PointerEvent"in window&&!Safari,emptyInsertThreshold:5};PluginManager.initializePlugins(this,e,t);for(var l in t)!(l in n)&&(n[l]=t[l]);_prepareGroup(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?on(e,"pointerdown",this._onTapStart):(on(e,"mousedown",this._onTapStart),on(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(e,"dragover",this),on(e,"dragenter",this)),sortables.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(lastTarget=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,dragEl):this.options.direction},_onTapStart:function(n){if(!!n.cancelable){var t=this,l=this.el,r=this.options,o=r.preventOnFilter,a=n.type,u=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,s=(u||n).target,c=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||s,d=r.filter;if(_saveInputCheckedState(l),!dragEl&&!(/mousedown|pointerdown/.test(a)&&n.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Safari&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=closest(s,r.draggable,l,!1),!(s&&s.animated)&&lastDownEl!==s)){if(oldIndex=index$n(s),oldDraggableIndex=index$n(s,r.draggable),typeof d=="function"){if(d.call(this,n,s,this)){_dispatchEvent({sortable:t,rootEl:c,name:"filter",targetEl:s,toEl:l,fromEl:l}),pluginEvent("filter",t,{evt:n}),o&&n.cancelable&&n.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=closest(c,f.trim(),l,!1),f)return _dispatchEvent({sortable:t,rootEl:f,name:"filter",targetEl:s,fromEl:l,toEl:l}),pluginEvent("filter",t,{evt:n}),!0}),d)){o&&n.cancelable&&n.preventDefault();return}r.handle&&!closest(c,r.handle,l,!1)||this._prepareDragStart(n,u,s)}}},_prepareDragStart:function(n,t,l){var r=this,o=r.el,a=r.options,u=o.ownerDocument,s;if(l&&!dragEl&&l.parentNode===o){var c=getRect(l);if(rootEl=o,dragEl=l,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=l,activeGroup=a.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(t||n).clientX,clientY:(t||n).clientY},tapDistanceLeft=tapEvt.clientX-c.left,tapDistanceTop=tapEvt.clientY-c.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,dragEl.style["will-change"]="all",s=function(){if(pluginEvent("delayEnded",r,{evt:n}),Sortable.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!FireFox&&r.nativeDraggable&&(dragEl.draggable=!0),r._triggerDragStart(n,t),_dispatchEvent({sortable:r,name:"choose",originalEvent:n}),toggleClass(dragEl,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){find(dragEl,d.trim(),_disableDraggable)}),on(u,"dragover",nearestEmptyInsertDetectEvent),on(u,"mousemove",nearestEmptyInsertDetectEvent),on(u,"touchmove",nearestEmptyInsertDetectEvent),on(u,"mouseup",r._onDrop),on(u,"touchend",r._onDrop),on(u,"touchcancel",r._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:n}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}on(u,"mouseup",r._disableDelayedDrag),on(u,"touchend",r._disableDelayedDrag),on(u,"touchcancel",r._disableDelayedDrag),on(u,"mousemove",r._delayedDragTouchMoveHandler),on(u,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&on(u,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(n){var t=n.touches?n.touches[0]:n;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;off(n,"mouseup",this._disableDelayedDrag),off(n,"touchend",this._disableDelayedDrag),off(n,"touchcancel",this._disableDelayedDrag),off(n,"mousemove",this._delayedDragTouchMoveHandler),off(n,"touchmove",this._delayedDragTouchMoveHandler),off(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):t?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:t}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var l=this.options;!n&&toggleClass(dragEl,l.dragClass,!1),toggleClass(dragEl,l.ghostClass,!0),Sortable.active=this,n&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var n=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),n!==t);)t=n;if(dragEl.parentNode[expando]._isOutsideThisEl(n),t)do{if(t[expando]){var l=void 0;if(l=t[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:n,rootEl:t}),l&&!this.options.dragoverBubble)break}n=t}while(t=t.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(n){if(tapEvt){var t=this.options,l=t.fallbackTolerance,r=t.fallbackOffset,o=n.touches?n.touches[0]:n,a=ghostEl&&matrix(ghostEl,!0),u=ghostEl&&a&&a.a,s=ghostEl&&a&&a.d,c=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),d=(o.clientX-tapEvt.clientX+r.x)/(u||1)+(c?c[0]-ghostRelativeParentInitialScroll[0]:0)/(u||1),f=(o.clientY-tapEvt.clientY+r.y)/(s||1)+(c?c[1]-ghostRelativeParentInitialScroll[1]:0)/(s||1);if(!Sortable.active&&!awaitingDragStarted){if(l&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:n}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:n}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:n}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:n})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:n}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:n})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(n){n.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(n),_globalDragOver(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],t,l=this.el.children,r=0,o=l.length,a=this.options;rr.right+o||e.clientY>l.bottom&&e.clientX>l.left:e.clientY>r.bottom+o||e.clientX>l.right&&e.clientY>l.top}function _getSwapDirection(e,n,t,l,r,o,a,u){var s=l?e.clientY:e.clientX,c=l?t.height:t.width,d=l?t.top:t.left,f=l?t.bottom:t.right,v=!1;if(!a){if(u&&targetMoveDistanced+c*o/2:sf-targetMoveDistance)return-lastDirection}else if(s>d+c*(1-r)/2&&sf-c*o/2)?s>d+c/2?1:-1:0}function _getInsertDirection(e){return index$n(dragEl)0?(l.splice(t+1,0,l[n]),l.splice(n,1)):(l.splice(t,0,l[n]),l.splice(n+1,1)),l}/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$o(e){for(var n=1;nA?A*(D-1)+N:N}var S=function(R){if(!(!_.value&&!b.value)){var I=R==null?void 0:R.querySelector("tbody");if(!I)return console.error("tbody does not exist."),null;var O=_objectSpread$o({animation:150,ghostClass:c.ghost,chosenClass:c.chosen,dragClass:c.dragging,filter:".".concat(f.base,",.").concat(v.row),onMove:function(A){return!hasClass(A.related,f.base)},onEnd:function(A){var L;if(A.newIndex!==A.oldIndex){removeNode(A.item),insertNodeAt(A.from,A.item,A.oldIndex);var M=A.oldIndex,z=A.newIndex;(isFunction_1(e.firstFullRow)&&e.firstFullRow(h)||n.slots.firstFullRow||n.slots["first-full-row"])&&(M-=1,z-=1),u.value&&(M=E(M,u.value),z=E(z,u.value));var K={data:a.value,currentIndex:M,current:a.value[M],targetIndex:z,target:a.value[z],newData:swapDragArrayElement(_toConsumableArray(e.data),M,z),e:A,sort:"row"};K.currentData=K.newData,(L=e.onDragSort)===null||L===void 0||L.call(e,K)}}},e.dragSortOptions);!I||(b.value?new Sortable(I,_objectSpread$o({},O)):new Sortable(I,_objectSpread$o(_objectSpread$o({},O),{},{handle:".".concat(c.handle)})))}},k=function(R,I){var O=_objectSpread$o({animation:150,dataIdAttr:"data-colkey",direction:"vertical",ghostClass:c.ghost,chosenClass:c.chosen,dragClass:c.dragging,handle:".".concat(d.thCellInner),onEnd:function(A){var L;if(A.newIndex!==A.oldIndex){if(I){var M;(M=w)===null||M===void 0||M.sort(_toConsumableArray($.value))}var z=A.oldIndex,K=A.newIndex,q=A.target,W=I?z:K,H=I?K:z,G=q.children[W],Y=q.children[H],Z=getColumnDataByKey(p.value,G.dataset.colkey),Q=getColumnDataByKey(p.value,Y.dataset.colkey);(!Z||!Z.colKey)&&log.error("Table","colKey is missing in ".concat(JSON.stringify(Z))),(!Q||!Q.colKey)&&log.error("Table","colKey is missing in ".concat(JSON.stringify(Q))),W=getColumnIndexByKey(e.columns,Z.colKey),H=getColumnIndexByKey(e.columns,Q.colKey);var ee={data:p.value,currentIndex:W,current:Z,targetIndex:H,target:Q,newData:swapDragArrayElement(_toConsumableArray(e.columns),W,H),e:A,sort:"col"};ee.currentData=ee.newData,(L=e.onDragSort)===null||L===void 0||L.call(e,ee)}}},e.dragSortOptions);if(!!R)return w=new Sortable(R,O),w},x=function(R){if(!(!C.value||!R)){var I=R.querySelectorAll("thead > tr");if(I.length<=1){var O=_slicedToArray(I,1),D=O[0],A=k(D,!0);$.value=A==null?void 0:A.toArray()}else I==null||I.forEach(function(L){k(L,!1)})}};function T(N){m.value=N}function P(N){p.value=N}watch([m,p,o,t],function(N){var R=_slicedToArray(N,4),I=R[0];R[1],R[2];var O=R[3];j(I,O)});function j(N,R){var I=N;if(!(!N||!I.$el||!R.showElement))var O=setTimeout(function(){S(I.$el),x(I.$el);var D=setTimeout(function(){I.$refs.affixHeaderRef&&x(I.$refs.affixHeaderRef),clearTimeout(D)});clearTimeout(O)},60)}return{innerPagination:u,isRowDraggable:b,isRowHandlerDraggable:_,isColDraggable:C,setDragSortPrimaryTableRef:T,setDragSortColumns:P}}/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function useAsyncLoading(e){var n=useTNodeJSX(),t=useConfig("table",e.locale),l=t.globalConfig,r=useClassName(),o=r.isLoadingClass,a=r.isLoadMoreClass,u=r.asyncLoadingClass,s=computed(function(){return[u,_defineProperty$3(_defineProperty$3({},o,e.asyncLoading==="loading"),a,e.asyncLoading==="load-more")]});function c(){var f;!isString_1(e.asyncLoading)||(f=e.onAsyncLoadingClick)===null||f===void 0||f.call(e,{status:e.asyncLoading})}function d(){var f=n("asyncLoading");if(isString_1(f)){var v=e.asyncLoading,p={"load-more":l.value.loadingMoreText,loading:l.value.loadingText}[String(v)];return createVNode("div",{class:s.value,onClick:c},[createVNode(Loading,{indicator:v==="loading",loading:!!v,size:"small",text:p},null)])}return[null,!1,void 0].includes(f)?null:createVNode("div",{class:s.value,onClick:c},[f])}return{renderAsyncLoading:d}}/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray$5(e)||_nonIterableRest()}/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$n(e){for(var n=1;n2?A-2:0),M=2;M1?H-1:0),Y=1;Y0&&arguments[0]!==void 0?arguments[0]:{errors:[],errorMap:{}},R=N.errorMap;R&&Object.assign(j,R)}),r.value=j,(P=e.onValidate)===null||P===void 0||P.call(e,{result:j}),k({result:j})},x)})},p=function(C,$,w){u.value[C]||(u.value[C]=cloneDeep_1($)),Object.entries(w).forEach(function(E){var S=_slicedToArray(E,2),k=S[0],x=S[1];set_1(u.value[C],k,x)})},g=function(C){if(e.editableRowKeys){var $=get_1(C.row,e.rowKey||"id"),w=l.get($);if(w){var E=w.findIndex(function(S){return S.col.colKey===C.col.colKey});E===-1?w.push(C):w[E]=C,l.set($,w)}else l.set($,[C])}},m=function(){r.value={}},y=function(C){var $=getCellKey(C.row,e.rowKey,C.col.colKey,C.colIndex);C.isEdit?a.value[$]=C:delete a.value[$]},b=function(C){var $,w=C.row,E=C.col,S=get_1(w,e.rowKey||"id"),k=u.value[S];if(k&&($=e.editableRowKeys)!==null&&$!==void 0&&$.includes(S)){var x=_objectSpread$m({},k);return set_1(x,E.colKey,get_1(k,E.colKey)),x}return w};return watch(function(){var _;return(_=t.value)===null||_===void 0?void 0:_.join(",")},function(_){var C=_.split(","),$=Object.keys(u.value);$.forEach(function(w){C.includes(w)||delete u.value[w]})}),{editedFormData:u,errorListMap:r,editableKeysMap:o,validateTableData:v,validateRowData:d,onRuleChange:g,clearValidateData:m,onUpdateEditedCell:p,getEditRowData:b,onPrimaryTableCellEditChange:y}}/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$l(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:!1,yn=[],bn=function(){var Vn,On,Wn,Kn,Cn,an=_objectSpread$l({},Je[mn]),Ln=((Vn=an.children)===null||Vn===void 0?void 0:Vn.length)||((On=_.value)===null||On===void 0?void 0:On.includes(an.colKey));if(!Ln&&(n.columnController||n.displayColumns||n.defaultDisplayColumns)&&!Ae)return 1;an=D(an);var Un=n.sort;if(an.sorter&&n.showSortColumnBgColor){var En=Un instanceof Array?Un:[Un],In=En.find(function(dn){return dn&&dn.sortBy===an.colKey&&dn.descending!==void 0});In&&(an.className=an.className instanceof Array?an.className.concat(g.sortColumn):[an.className,g.sortColumn])}if(an.sorter||an.filter){var $n=renderTitle(t.slots,an,mn),xn=an,et=xn.ellipsisTitle;an.title=function(dn,sn){var hn,Qe=an.sorter?P(sn):null,zn=an.filter?W(sn):null,Qn=(hn=u.value)===null||hn===void 0?void 0:hn.tableContentRef;return he([$n,Qe,zn],sn.col,sn.colIndex,et,Qn,{classPrefix:d,ellipsisOverlayClassName:n.size!=="medium"?y[n.size]:""})},an.ellipsisTitle=!1}if((Wn=an.edit)!==null&&Wn!==void 0&&Wn.component){var Yn=an.cell;an.cell=function(dn,sn){var hn=_objectSpread$l(_objectSpread$l({},sn),{},{row:ge(sn),oldCell:Yn,rowKey:n.rowKey||"id",tableBaseClass:v,cellEmptyContent:n.cellEmptyContent,onChange:rn,onValidate:n.onRowValidate,onRuleChange:le,onEditableChange:Oe});if(n.editableRowKeys){var Qe,zn=get_1(sn.row,n.rowKey||"id");hn.editable=Se.value[zn]||!1;var Qn=[zn,sn.col.colKey].join("__"),Tn=(Qe=Ne.value)===null||Qe===void 0?void 0:Qe[Qn];Tn&&(hn.errors=Tn)}return n.editableCellState&&(hn.readonly=!n.editableCellState(sn)),createVNode(EditableCell,mergeProps(hn,{onUpdateEditedCell:de}),t.slots)}}if((Kn=an.children)!==null&&Kn!==void 0&&Kn.length){var un;an.children=ln(an.children,Ae||((un=_.value)===null||un===void 0?void 0:un.includes(an.colKey)))}(!an.children||(Cn=an.children)!==null&&Cn!==void 0&&Cn.length)&&yn.push(an)},mn=0,Bn=Je.length;mn2&&arguments[2]!==void 0?arguments[2]:0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=get_1(e,n);return t||l?"".concat(r,"_").concat(t||0,"_").concat(l||0,"}"):r}var TableTreeStore=function(){function e(){_classCallCheck(this,e),_defineProperty$3(this,"treeDataMap",new Map),_defineProperty$3(this,"expandAllRowIndex",void 0),this.treeDataMap=new Map}return _createClass(e,[{key:"initialTreeStore",value:function(t,l,r){var o;(o=this.treeDataMap)===null||o===void 0||o.clear(),this.initialTreeDataMap(this.treeDataMap,t,l.find(function(a){return a.colKey==="row-select"}),r)}},{key:"getAllUniqueKeys",value:function(t,l){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],o=0,a=t.length;o2&&arguments[2]!==void 0?arguments[2]:[],o=0,a=t.length;o=0){var a=(o.expandChildrenLength||0)+1;if(l.splice(o.rowIndex,a),o.parent){var u=get_1(o.parent.row,r.childrenKey),s=u.findIndex(function(c){return get_1(c,r.rowKey)===t});u.splice(s,1),updateRowExpandLength(this.treeDataMap,o.parent.row,-1*a,"delete",r)}this.treeDataMap.delete(t),updateRowIndex(this.treeDataMap,l,{minRowIndex:o.rowIndex,rowKey:r.rowKey,type:"remove"})}else log.warn("EnhancedTable","Can not remove this node, which is not appeared.");return l}},{key:"removeChildren",value:function(t,l,r){var o=this.treeDataMap.get(t);if(o&&o.rowIndex>=0){var a=o.expandChildrenLength||0;a&&l.splice(o.rowIndex+1,a),o.parent&&updateRowExpandLength(this.treeDataMap,o.parent.row,-1*a,"delete",r),o.expandChildrenLength=0,o.expanded=!1,set_1(o.row,r.childrenKey,void 0),this.treeDataMap.set(t,o),a&&updateRowIndex(this.treeDataMap,l,{minRowIndex:o.rowIndex+1,rowKey:r.rowKey,type:"remove"})}else log.warn("EnhancedTable","Can not remove this node's children, which is not appeared.");return l}},{key:"appendTo",value:function(t,l,r,o){var a=this.treeDataMap.get(t);if(!this.validateDataExist(a,t))return r;for(var u=get_1(a.row,o.childrenKey),s=a.expanded||!(u!=null&&u.length),c=l instanceof Array?l:[l],d=[],f=-1,v=0,p=c.length;va){var m=t.slice(v,o),y=p.concat(g,m);t.splice(a,y.length),t.splice.apply(t,[a,0].concat(_toConsumableArray(y))),updateRowIndex(this.treeDataMap,t,{rowKey:r.rowKey,minRowIndex:a,maxRowIndex:f})}else{var b=t.slice(f,a),_=b.concat(g,p);t.splice(o,_.length),t.splice.apply(t,[o,0].concat(_toConsumableArray(_))),updateRowIndex(this.treeDataMap,t,{rowKey:r.rowKey,minRowIndex:o,maxRowIndex:v})}if(c.parent){for(var C=c.parent.row[r.childrenKey],$=0,w=-1,E=-1,S=0,k=C.length;S=2));S++);C[w]=l.target,C[E]=l.current}return{dataSource:t,result:!0}}},{key:"expandAll",value:function(t,l){var r=this;this.expandAllRowIndex=0;var o=[],a=function u(s,c){for(var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,f=0,v=s.length;f2&&arguments[2]!==void 0?arguments[2]:"data",a=[];return t.forEach(function(u){var s=get_1(u,l.rowKey),c=r.treeDataMap.get(s);!c.expanded||(o==="unique"?a.push(s):o==="data"?a.push(u):a.push(c))}),a}},{key:"initialTreeDataMap",value:function(t,l,r,o){for(var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,s=0,c=l.length;s0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=[],l=[],r=new Map,o=new Map,a=0,u=e.length;a0&&arguments[0]!==void 0?arguments[0]:"expand-all",E=arguments.length>1?arguments[1]:void 0,S=E||a.value;l.value=t.value.expandAll(S,r.value);var k=l.value.map(function(x){return getUniqueRowValue(x,r.value.rowKey)});g(k,{row:void 0,rowState:void 0,rowIndex:void 0,type:"expand",trigger:w}),m.value.type="expand-all"}function b(){l.value=_toConsumableArray(t.value.foldAll(l.value,r.value)),g([],{row:void 0,rowState:void 0,rowIndex:void 0,type:"fold",trigger:"fold-all"})}function _(w,E){var S,k=w.row,x=w.rowIndex;m.value=_objectSpread$j({type:"user-reaction-change"},w);var T=getUniqueRowValue(k,r.value.rowKey),P=t.value.treeDataMap.get(T),j=_toConsumableArray(p.value);if(P.expanded){for(var N=t.value.getExpandedChildrenKeys([k],r.value),R=0,I=j.length;R2&&arguments[2]!==void 0?arguments[2]:[],k=diffExpandedTreeNode(E,S),x=k.addedList,T=k.removedList;return t.value.expandTreeNode(x,w,r.value),t.value.foldTreeNode(T,w,r.value),_toConsumableArray(w)}watch([p],function(w,E){var S=_slicedToArray(w,1),k=S[0],x=_slicedToArray(E,1),T=x[0];if(!!t.value.treeDataMap.size){if(m.value.type==="user-reaction-change"){var P=m.value||{},j=P.row,N=P.rowIndex;l.value=_toConsumableArray(t.value.toggleExpandData({row:j,rowIndex:N},_toConsumableArray(l.value),r.value))}else m.value.type==="props-change"&&C(l.value,k,T);m.value.type="props-change"}});var $=function(E){var S,k;(S=s.value)!==null&&S!==void 0&&S.defaultExpandAll&&!c.value?(y("default-expand-all",_toConsumableArray(E)),c.value=!0):(k=p.value)!==null&&k!==void 0&&k.length&&nextTick$1(function(){l.value=C(_toConsumableArray(E),p.value,[])})};return{tExpandedTreeNode:p,isDefaultExpandAllExecute:c,isDefaultExpandedTreeNodesExecute:d,expandAll:y,foldAll:b,onExpandFoldIconClick:_,updateExpandOnDataChange:$}}/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$i(e){for(var n=1;n0&&arguments[0]!==void 0?arguments[0]:"",Q=arguments.length>1?arguments[1]:void 0;if(!Z){p.value=f.value.appendToRoot(Q,p.value,b.value);return}p.value=_toConsumableArray(f.value.appendTo(Z,Q,p.value,b.value))}function q(Z,Q){p.value=_toConsumableArray(f.value.insertAfter(Z,Q,p.value,b.value))}function W(Z,Q){p.value=_toConsumableArray(f.value.insertBefore(Z,Q,p.value,b.value))}function H(Z){var Q=f.value.swapData(p.value,Z,b.value);if(Q.result)p.value=_toConsumableArray(Q.dataSource);else{var ee,te={code:Q.code,reason:Q.reason};(ee=e.onAbnormalDragSort)===null||ee===void 0||ee.call(e,te)}}function G(){return f.value.getTreeNode(p.value,b.value)}function Y(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data";return f.value.getTreeExpandedRow(p.value,b.value,Z)}return{store:f,rowDataKeys:b,dataSource:p,swapData:H,setData:A,getData:L,remove:M,removeChildren:z,appendTo:K,insertAfter:q,insertBefore:W,formatTreeColumn:D,toggleExpandData:I,expandAll:E,foldAll:S,getTreeNode:G,resetData:N,getTreeExpandedRow:Y,onExpandFoldIconClick:x}}/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$h(e){for(var n=1;n0&&T=0)return S.rowIndex;if(S.rowIndex<0)return E(S.parent)},w=function(S){var k=S.index;if(!k&&k!==0){if(!S.key){log.error("Table","scrollToElement: one of `index` or `key` must exist.");return}var x=v.value.get(S.key);k=$(x,S.key),(k<0||k===void 0)&&log.error("Table","".concat(S.key," does not exist in data, check `rowKey` or `data` please."))}l.value.scrollToElement(_objectSpread$g(_objectSpread$g({},S),{},{index:k}))};return t.expose(_objectSpread$g(_objectSpread$g({store:o.value,dataSource:a.value},d),{},{primaryTableRef:l,validateRowData:function(S){return l.value.validateRowData(S)},validateTableData:function(){return l.value.validateTableData()},clearValidateData:function(){l.value.clearValidateData()},refreshTable:function(){l.value.refreshTable()},scrollToElement:w})),function(){var E,S=getCurrentInstance(),k=S.vnode,x=_objectSpread$g(_objectSpread$g({},k.props),{},{rowKey:n.rowKey||"id",data:a.value,columns:b.value,indeterminateSelectedRowKeys:g.value,disableDataPage:Boolean(n.tree&&Object.keys(n.tree).length),onSelectChange:m,onDragSort:_,rowClassName:function(P){var j=P.row,N=get_1(j,n.rowKey||"id"),R=v.value.get(N);return R?["".concat(f.value,"-table-tr--level-").concat(R.level),n.rowClassName]:[n.rowClassName]}});return(E=n.tree)!==null&&E!==void 0&&E.expandTreeNodeOnClick&&(x.onRowClick=C),createVNode(_PrimaryTable,mergeProps(x,{ref:l}),t.slots)}}});/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/var BaseTable=withInstall$1(_BaseTable),PrimaryTable=withInstall$1(_PrimaryTable),EnhancedTable=withInstall$1(_EnhancedTable),table=cloneDeep_1(_PrimaryTable),Table=withInstall$1(table,"TTable");/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/var TimeLineProps={labelAlign:{type:String,default:"left",validator:function(n){return n?["left","right","alternate","top","bottom"].includes(n):!0}},layout:{type:String,default:"vertical",validator:function(n){return n?["horizontal","vertical"].includes(n):!0}},mode:{type:String,default:"alternate",validator:function(n){return n?["alternate","same"].includes(n):!0}},reverse:Boolean,theme:{type:String,default:"default",validator:function(n){return n?["default","dot"].includes(n):!0}}};/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/var DefaultAlign={vertical:["left","right"],horizontal:["top","bottom"]},TimelineInjectKey=Symbol("timeLineProvide"),DEFAULT_PROVIDER=computed(function(){return{theme:"default",reverse:!1,itemsStatus:[],layout:"horizontal",renderAlign:"left",mode:"alternate"}});/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/var props$a={content:{type:[String,Function]},dot:{type:Function},dotColor:{type:String,default:"primary"},label:{type:[String,Function]},labelAlign:{type:String,validator:function(n){return n?["left","right","top","bottom"].includes(n):!0}},loading:Boolean,onClick:Function};const index$m="";/**
* tdesign v1.8.1
* (c) 2024 tdesign
* @license MIT
*/function ownKeys$f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,l)}return t}function _objectSpread$f(e){for(var n=1;n