@aimerthyr/virtual-table 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -16
- package/dist/index.js +156 -149
- package/dist/index.js.map +1 -1
- package/dist/virtual-table.css +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t?.key)}return r}}function R(e,o,t,n){return{debug:()=>{var r;return(r=e?.debugAll)!=null?r:e[o]},key:process.env.NODE_ENV==="development"&&t,onChange:n}}function Fn(e,o,t,n){const r=()=>{var s;return(s=l.getValue())!=null?s:e.options.renderFallbackValue},l={id:`${o.id}_${t.id}`,row:o,column:t,getValue:()=>o.getValue(n),renderValue:r,getContext:y(()=>[e,t,o,l],(s,a,u,c)=>({table:s,column:a,row:u,cell:c,getValue:c.getValue,renderValue:c.renderValue}),R(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(l,t,o,e)},{}),l}function $n(e,o,t,n){var r,l;const a={...e._getDefaultColumnDef(),...o},u=a.accessorKey;let c=(r=(l=a.id)!=null?l:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?r:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:u&&(u.includes(".")?d=g=>{let f=g;for(const m of u.split(".")){var v;f=(v=f)==null?void 0:v[m],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${m}" in deeply nested key "${u}" returned undefined.`)}return f}:d=g=>g[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let p={id:`${String(c)}`,accessorFn:d,parent:n,depth:t,columnDef:a,columns:[],getFlatColumns:y(()=>[!0],()=>{var g;return[p,...(g=p.columns)==null?void 0:g.flatMap(f=>f.getFlatColumns())]},R(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:y(()=>[e._getOrderColumnsFn()],g=>{var f;if((f=p.columns)!=null&&f.length){let v=p.columns.flatMap(m=>m.getLeafColumns());return g(v)}return[p]},R(e.options,"debugColumns","column.getLeafColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(p,e);return p}const A="debugHeaders";function wt(e,o,t){var n;let l={id:(n=t.id)!=null?n:o.id,column:o,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(a),s.push(u)};return a(l),s},getContext:()=>({table:e,header:l,column:o})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(l,e)}),l}const Mn={createTable:e=>{e.getHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>{var l,s;const a=(l=n?.map(p=>t.find(g=>g.id===p)).filter(Boolean))!=null?l:[],u=(s=r?.map(p=>t.find(g=>g.id===p)).filter(Boolean))!=null?s:[],c=t.filter(p=>!(n!=null&&n.includes(p.id))&&!(r!=null&&r.includes(p.id)));return Fe(o,[...a,...c,...u],e)},R(e.options,A,"getHeaderGroups")),e.getCenterHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>(t=t.filter(l=>!(n!=null&&n.includes(l.id))&&!(r!=null&&r.includes(l.id))),Fe(o,t,e,"center")),R(e.options,A,"getCenterHeaderGroups")),e.getLeftHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(o,t,n)=>{var r;const l=(r=n?.map(s=>t.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return Fe(o,l,e,"left")},R(e.options,A,"getLeftHeaderGroups")),e.getRightHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(o,t,n)=>{var r;const l=(r=n?.map(s=>t.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return Fe(o,l,e,"right")},R(e.options,A,"getRightHeaderGroups")),e.getFooterGroups=y(()=>[e.getHeaderGroups()],o=>[...o].reverse(),R(e.options,A,"getFooterGroups")),e.getLeftFooterGroups=y(()=>[e.getLeftHeaderGroups()],o=>[...o].reverse(),R(e.options,A,"getLeftFooterGroups")),e.getCenterFooterGroups=y(()=>[e.getCenterHeaderGroups()],o=>[...o].reverse(),R(e.options,A,"getCenterFooterGroups")),e.getRightFooterGroups=y(()=>[e.getRightHeaderGroups()],o=>[...o].reverse(),R(e.options,A,"getRightFooterGroups")),e.getFlatHeaders=y(()=>[e.getHeaderGroups()],o=>o.map(t=>t.headers).flat(),R(e.options,A,"getFlatHeaders")),e.getLeftFlatHeaders=y(()=>[e.getLeftHeaderGroups()],o=>o.map(t=>t.headers).flat(),R(e.options,A,"getLeftFlatHeaders")),e.getCenterFlatHeaders=y(()=>[e.getCenterHeaderGroups()],o=>o.map(t=>t.headers).flat(),R(e.options,A,"getCenterFlatHeaders")),e.getRightFlatHeaders=y(()=>[e.getRightHeaderGroups()],o=>o.map(t=>t.headers).flat(),R(e.options,A,"getRightFlatHeaders")),e.getCenterLeafHeaders=y(()=>[e.getCenterFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),R(e.options,A,"getCenterLeafHeaders")),e.getLeftLeafHeaders=y(()=>[e.getLeftFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),R(e.options,A,"getLeftLeafHeaders")),e.getRightLeafHeaders=y(()=>[e.getRightFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),R(e.options,A,"getRightLeafHeaders")),e.getLeafHeaders=y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(o,t,n)=>{var r,l,s,a,u,c;return[...(r=(l=o[0])==null?void 0:l.headers)!=null?r:[],...(s=(a=t[0])==null?void 0:a.headers)!=null?s:[],...(u=(c=n[0])==null?void 0:c.headers)!=null?u:[]].map(d=>d.getLeafHeaders()).flat()},R(e.options,A,"getLeafHeaders"))}};function Fe(e,o,t,n){var r,l;let s=0;const a=function(g,f){f===void 0&&(f=1),s=Math.max(s,f),g.filter(v=>v.getIsVisible()).forEach(v=>{var m;(m=v.columns)!=null&&m.length&&a(v.columns,f+1)},0)};a(e);let u=[];const c=(g,f)=>{const v={depth:f,id:[n,`${f}`].filter(Boolean).join("_"),headers:[]},m=[];g.forEach(w=>{const C=[...m].reverse()[0],S=w.column.depth===v.depth;let x,E=!1;if(S&&w.column.parent?x=w.column.parent:(x=w.column,E=!0),C&&C?.column===x)C.subHeaders.push(w);else{const M=wt(t,x,{id:[n,f,x.id,w?.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${m.filter(P=>P.column===x).length}`:void 0,depth:f,index:m.length});M.subHeaders.push(w),m.push(M)}v.headers.push(w),w.headerGroup=v}),u.push(v),f>0&&c(m,f-1)},d=o.map((g,f)=>wt(t,g,{depth:s,index:f}));c(d,s-1),u.reverse();const p=g=>g.filter(v=>v.column.getIsVisible()).map(v=>{let m=0,w=0,C=[0];v.subHeaders&&v.subHeaders.length?(C=[],p(v.subHeaders).forEach(x=>{let{colSpan:E,rowSpan:M}=x;m+=E,C.push(M)})):m=1;const S=Math.min(...C);return w=w+S,v.colSpan=m,v.rowSpan=w,{colSpan:m,rowSpan:w}});return p((r=(l=u[0])==null?void 0:l.headers)!=null?r:[]),u}const bn=(e,o,t,n,r,l,s)=>{let a={id:o,index:n,original:t,depth:r,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(a._valuesCache.hasOwnProperty(u))return a._valuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return a._valuesCache[u]=c.accessorFn(a.original,n),a._valuesCache[u]},getUniqueValues:u=>{if(a._uniqueValuesCache.hasOwnProperty(u))return a._uniqueValuesCache[u];const c=e.getColumn(u);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[u]=c.columnDef.getUniqueValues(a.original,n),a._uniqueValuesCache[u]):(a._uniqueValuesCache[u]=[a.getValue(u)],a._uniqueValuesCache[u])},renderValue:u=>{var c;return(c=a.getValue(u))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>En(a.subRows,u=>u.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let u=[],c=a;for(;;){const d=c.getParentRow();if(!d)break;u.push(d),c=d}return u.reverse()},getAllCells:y(()=>[e.getAllLeafColumns()],u=>u.map(c=>Fn(e,a,c,c.id)),R(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:y(()=>[a.getAllCells()],u=>u.reduce((c,d)=>(c[d.column.id]=d,c),{}),R(e.options,"debugRows","getAllCellsByColumnId"))};for(let u=0;u<e._features.length;u++){const c=e._features[u];c==null||c.createRow==null||c.createRow(a,e)}return a},In={createColumn:(e,o)=>{e._getFacetedRowModel=o.options.getFacetedRowModel&&o.options.getFacetedRowModel(o,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():o.getPreFilteredRowModel(),e._getFacetedUniqueValues=o.options.getFacetedUniqueValues&&o.options.getFacetedUniqueValues(o,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=o.options.getFacetedMinMaxValues&&o.options.getFacetedMinMaxValues(o,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Tt=(e,o,t)=>{var n,r;const l=t==null||(n=t.toString())==null?void 0:n.toLowerCase();return!!(!((r=e.getValue(o))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(l))};Tt.autoRemove=e=>j(e);const Gt=(e,o,t)=>{var n;return!!(!((n=e.getValue(o))==null||(n=n.toString())==null)&&n.includes(t))};Gt.autoRemove=e=>j(e);const jt=(e,o,t)=>{var n;return((n=e.getValue(o))==null||(n=n.toString())==null?void 0:n.toLowerCase())===t?.toLowerCase()};jt.autoRemove=e=>j(e);const Wt=(e,o,t)=>{var n;return(n=e.getValue(o))==null?void 0:n.includes(t)};Wt.autoRemove=e=>j(e);const qt=(e,o,t)=>!t.some(n=>{var r;return!((r=e.getValue(o))!=null&&r.includes(n))});qt.autoRemove=e=>j(e)||!(e!=null&&e.length);const Ut=(e,o,t)=>t.some(n=>{var r;return(r=e.getValue(o))==null?void 0:r.includes(n)});Ut.autoRemove=e=>j(e)||!(e!=null&&e.length);const Kt=(e,o,t)=>e.getValue(o)===t;Kt.autoRemove=e=>j(e);const Xt=(e,o,t)=>e.getValue(o)==t;Xt.autoRemove=e=>j(e);const st=(e,o,t)=>{let[n,r]=t;const l=e.getValue(o);return l>=n&&l<=r};st.resolveFilterValue=e=>{let[o,t]=e,n=typeof o!="number"?parseFloat(o):o,r=typeof t!="number"?parseFloat(t):t,l=o===null||Number.isNaN(n)?-1/0:n,s=t===null||Number.isNaN(r)?1/0:r;if(l>s){const a=l;l=s,s=a}return[l,s]};st.autoRemove=e=>j(e)||j(e[0])&&j(e[1]);const Q={includesString:Tt,includesStringSensitive:Gt,equalsString:jt,arrIncludes:Wt,arrIncludesAll:qt,arrIncludesSome:Ut,equals:Kt,weakEquals:Xt,inNumberRange:st};function j(e){return e==null||e===""}const Pn={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:N("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,o)=>{e.getAutoFilterFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t?.getValue(e.id);return typeof n=="string"?Q.includesString:typeof n=="number"?Q.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?Q.equals:Array.isArray(n)?Q.arrIncludes:Q.weakEquals},e.getFilterFn=()=>{var t,n;return ke(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(n=o.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?t:Q[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,n,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((n=o.options.enableColumnFilters)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=o.getState().columnFilters)==null||(t=t.find(n=>n.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,n;return(t=(n=o.getState().columnFilters)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{o.setColumnFilters(n=>{const r=e.getFilterFn(),l=n?.find(d=>d.id===e.id),s=ee(t,l?l.value:void 0);if(St(r,s,e)){var a;return(a=n?.filter(d=>d.id!==e.id))!=null?a:[]}const u={id:e.id,value:s};if(l){var c;return(c=n?.map(d=>d.id===e.id?u:d))!=null?c:[]}return n!=null&&n.length?[...n,u]:[u]})}},createRow:(e,o)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=o=>{const t=e.getAllLeafColumns(),n=r=>{var l;return(l=ee(o,r))==null?void 0:l.filter(s=>{const a=t.find(u=>u.id===s.id);if(a){const u=a.getFilterFn();if(St(u,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=o=>{var t,n;e.setColumnFilters(o?[]:(t=(n=e.initialState)==null?void 0:n.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function St(e,o,t){return(e&&e.autoRemove?e.autoRemove(o,t):!1)||typeof o>"u"||typeof o=="string"&&!o}const Vn=(e,o,t)=>t.reduce((n,r)=>{const l=r.getValue(e);return n+(typeof l=="number"?l:0)},0),kn=(e,o,t)=>{let n;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(n>l||n===void 0&&l>=l)&&(n=l)}),n},zn=(e,o,t)=>{let n;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(n<l||n===void 0&&l>=l)&&(n=l)}),n},An=(e,o,t)=>{let n,r;return t.forEach(l=>{const s=l.getValue(e);s!=null&&(n===void 0?s>=s&&(n=r=s):(n>s&&(n=s),r<s&&(r=s)))}),[n,r]},Bn=(e,o)=>{let t=0,n=0;if(o.forEach(r=>{let l=r.getValue(e);l!=null&&(l=+l)>=l&&(++t,n+=l)}),t)return n/t},Dn=(e,o)=>{if(!o.length)return;const t=o.map(l=>l.getValue(e));if(!_n(t))return;if(t.length===1)return t[0];const n=Math.floor(t.length/2),r=t.sort((l,s)=>l-s);return t.length%2!==0?r[n]:(r[n-1]+r[n])/2},On=(e,o)=>Array.from(new Set(o.map(t=>t.getValue(e))).values()),Ln=(e,o)=>new Set(o.map(t=>t.getValue(e))).size,Hn=(e,o)=>o.length,Ge={sum:Vn,min:kn,max:zn,extent:An,mean:Bn,median:Dn,unique:On,uniqueCount:Ln,count:Hn},Nn={getDefaultColumnDef:()=>({aggregatedCell:e=>{var o,t;return(o=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?o:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:N("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,o)=>{e.toggleGrouping=()=>{o.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(n=>n!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,n;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((n=o.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t?.getValue(e.id);if(typeof n=="number")return Ge.sum;if(Object.prototype.toString.call(n)==="[object Date]")return Ge.extent},e.getAggregationFn=()=>{var t,n;if(!e)throw new Error;return ke(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(n=o.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?t:Ge[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=o=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(o),e.resetGrouping=o=>{var t,n;e.setGrouping(o?[]:(t=(n=e.initialState)==null?void 0:n.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,o)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const n=o.getColumn(t);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[t]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,o,t,n)=>{e.getIsGrouped=()=>o.getIsGrouped()&&o.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&o.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function Tn(e,o,t){if(!(o!=null&&o.length)||!t)return e;const n=e.filter(l=>!o.includes(l.id));return t==="remove"?n:[...o.map(l=>e.find(s=>s.id===l)).filter(Boolean),...n]}const Gn={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:N("columnOrder",e)}),createColumn:(e,o)=>{e.getIndex=y(t=>[Se(o,t)],t=>t.findIndex(n=>n.id===e.id),R(o.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var n;return((n=Se(o,t)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=t=>{var n;const r=Se(o,t);return((n=r[r.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=o=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(o),e.resetColumnOrder=o=>{var t;e.setColumnOrder(o?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(o,t,n)=>r=>{let l=[];if(!(o!=null&&o.length))l=r;else{const s=[...o],a=[...r];for(;a.length&&s.length;){const u=s.shift(),c=a.findIndex(d=>d.id===u);c>-1&&l.push(a.splice(c,1)[0])}l=[...l,...a]}return Tn(l,t,n)},R(e.options,"debugTable","_getOrderColumnsFn"))}},je=()=>({left:[],right:[]}),jn={getInitialState:e=>({columnPinning:je(),...e}),getDefaultOptions:e=>({onColumnPinningChange:N("columnPinning",e)}),createColumn:(e,o)=>{e.pin=t=>{const n=e.getLeafColumns().map(r=>r.id).filter(Boolean);o.setColumnPinning(r=>{var l,s;if(t==="right"){var a,u;return{left:((a=r?.left)!=null?a:[]).filter(p=>!(n!=null&&n.includes(p))),right:[...((u=r?.right)!=null?u:[]).filter(p=>!(n!=null&&n.includes(p))),...n]}}if(t==="left"){var c,d;return{left:[...((c=r?.left)!=null?c:[]).filter(p=>!(n!=null&&n.includes(p))),...n],right:((d=r?.right)!=null?d:[]).filter(p=>!(n!=null&&n.includes(p)))}}return{left:((l=r?.left)!=null?l:[]).filter(p=>!(n!=null&&n.includes(p))),right:((s=r?.right)!=null?s:[]).filter(p=>!(n!=null&&n.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var r,l,s;return((r=n.columnDef.enablePinning)!=null?r:!0)&&((l=(s=o.options.enableColumnPinning)!=null?s:o.options.enablePinning)!=null?l:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(a=>a.id),{left:n,right:r}=o.getState().columnPinning,l=t.some(a=>n?.includes(a)),s=t.some(a=>r?.includes(a));return l?"left":s?"right":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();return r?(t=(n=o.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))!=null?t:-1:0}},createRow:(e,o)=>{e.getCenterVisibleCells=y(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left,o.getState().columnPinning.right],(t,n,r)=>{const l=[...n??[],...r??[]];return t.filter(s=>!l.includes(s.column.id))},R(o.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=y(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left],(t,n)=>(n??[]).map(l=>t.find(s=>s.column.id===l)).filter(Boolean).map(l=>({...l,position:"left"})),R(o.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=y(()=>[e._getAllVisibleCells(),o.getState().columnPinning.right],(t,n)=>(n??[]).map(l=>t.find(s=>s.column.id===l)).filter(Boolean).map(l=>({...l,position:"right"})),R(o.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=o=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(o),e.resetColumnPinning=o=>{var t,n;return e.setColumnPinning(o?je():(t=(n=e.initialState)==null?void 0:n.columnPinning)!=null?t:je())},e.getIsSomeColumnsPinned=o=>{var t;const n=e.getState().columnPinning;if(!o){var r,l;return!!((r=n.left)!=null&&r.length||(l=n.right)!=null&&l.length)}return!!((t=n[o])!=null&&t.length)},e.getLeftLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),R(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),R(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n)=>{const r=[...t??[],...n??[]];return o.filter(l=>!r.includes(l.id))},R(e.options,"debugColumns","getCenterLeafColumns"))}};function Wn(e){return e||(typeof document<"u"?document:null)}const $e={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},We=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),qn={getDefaultColumnDef:()=>$e,getInitialState:e=>({columnSizing:{},columnSizingInfo:We(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:N("columnSizing",e),onColumnSizingInfoChange:N("columnSizingInfo",e)}),createColumn:(e,o)=>{e.getSize=()=>{var t,n,r;const l=o.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:$e.minSize,(n=l??e.columnDef.size)!=null?n:$e.size),(r=e.columnDef.maxSize)!=null?r:$e.maxSize)},e.getStart=y(t=>[t,Se(o,t),o.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((r,l)=>r+l.getSize(),0),R(o.options,"debugColumns","getStart")),e.getAfter=y(t=>[t,Se(o,t),o.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((r,l)=>r+l.getSize(),0),R(o.options,"debugColumns","getAfter")),e.resetSize=()=>{o.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var t,n;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((n=o.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>o.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,o)=>{e.getSize=()=>{let t=0;const n=r=>{if(r.subHeaders.length)r.subHeaders.forEach(n);else{var l;t+=(l=r.column.getSize())!=null?l:0}};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const n=o.getColumn(e.column.id),r=n?.getCanResize();return l=>{if(!n||!r||(l.persist==null||l.persist(),qe(l)&&l.touches&&l.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(C=>[C.column.id,C.column.getSize()]):[[n.id,n.getSize()]],u=qe(l)?Math.round(l.touches[0].clientX):l.clientX,c={},d=(C,S)=>{typeof S=="number"&&(o.setColumnSizingInfo(x=>{var E,M;const P=o.options.columnResizeDirection==="rtl"?-1:1,b=(S-((E=x?.startOffset)!=null?E:0))*P,k=Math.max(b/((M=x?.startSize)!=null?M:0),-.999999);return x.columnSizingStart.forEach(G=>{let[T,z]=G;c[T]=Math.round(Math.max(z+z*k,0)*100)/100}),{...x,deltaOffset:b,deltaPercentage:k}}),(o.options.columnResizeMode==="onChange"||C==="end")&&o.setColumnSizing(x=>({...x,...c})))},p=C=>d("move",C),g=C=>{d("end",C),o.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=Wn(t),v={moveHandler:C=>p(C.clientX),upHandler:C=>{f?.removeEventListener("mousemove",v.moveHandler),f?.removeEventListener("mouseup",v.upHandler),g(C.clientX)}},m={moveHandler:C=>(C.cancelable&&(C.preventDefault(),C.stopPropagation()),p(C.touches[0].clientX),!1),upHandler:C=>{var S;f?.removeEventListener("touchmove",m.moveHandler),f?.removeEventListener("touchend",m.upHandler),C.cancelable&&(C.preventDefault(),C.stopPropagation()),g((S=C.touches[0])==null?void 0:S.clientX)}},w=Un()?{passive:!1}:!1;qe(l)?(f?.addEventListener("touchmove",m.moveHandler,w),f?.addEventListener("touchend",m.upHandler,w)):(f?.addEventListener("mousemove",v.moveHandler,w),f?.addEventListener("mouseup",v.upHandler,w)),o.setColumnSizingInfo(C=>({...C,startOffset:u,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=o=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(o),e.setColumnSizingInfo=o=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(o),e.resetColumnSizing=o=>{var t;e.setColumnSizing(o?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=o=>{var t;e.setColumnSizingInfo(o?We():(t=e.initialState.columnSizingInfo)!=null?t:We())},e.getTotalSize=()=>{var o,t;return(o=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getLeftTotalSize=()=>{var o,t;return(o=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getCenterTotalSize=()=>{var o,t;return(o=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getRightTotalSize=()=>{var o,t;return(o=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0}}};let Me=null;function Un(){if(typeof Me=="boolean")return Me;let e=!1;try{const o={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,o),window.removeEventListener("test",t)}catch{e=!1}return Me=e,Me}function qe(e){return e.type==="touchstart"}const Kn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:N("columnVisibility",e)}),createColumn:(e,o)=>{e.toggleVisibility=t=>{e.getCanHide()&&o.setColumnVisibility(n=>({...n,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,n;const r=e.columns;return(t=r.length?r.some(l=>l.getIsVisible()):(n=o.getState().columnVisibility)==null?void 0:n[e.id])!=null?t:!0},e.getCanHide=()=>{var t,n;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((n=o.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,o)=>{e._getAllVisibleCells=y(()=>[e.getAllCells(),o.getState().columnVisibility],t=>t.filter(n=>n.column.getIsVisible()),R(o.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,n,r)=>[...t,...n,...r],R(o.options,"debugRows","getVisibleCells"))},createTable:e=>{const o=(t,n)=>y(()=>[n(),n().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(l=>l.getIsVisible==null?void 0:l.getIsVisible()),R(e.options,"debugColumns",t));e.getVisibleFlatColumns=o("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=o("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=o("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=o("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=o("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=(n=t)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,l)=>({...r,[l.id]:t||!(l.getCanHide!=null&&l.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible((n=t.target)==null?void 0:n.checked)}}};function Se(e,o){return o?o==="center"?e.getCenterVisibleLeafColumns():o==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Xn={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Yn={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:N("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:o=>{var t;const n=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[o.id])==null?void 0:t.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,o)=>{e.getCanGlobalFilter=()=>{var t,n,r,l;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((n=o.options.enableGlobalFilter)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&((l=o.options.getColumnCanGlobalFilter==null?void 0:o.options.getColumnCanGlobalFilter(e))!=null?l:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Q.includesString,e.getGlobalFilterFn=()=>{var o,t;const{globalFilterFn:n}=e.options;return ke(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(o=(t=e.options.filterFns)==null?void 0:t[n])!=null?o:Q[n]},e.setGlobalFilter=o=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(o)},e.resetGlobalFilter=o=>{e.setGlobalFilter(o?void 0:e.initialState.globalFilter)}}},Jn={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:N("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let o=!1,t=!1;e._autoResetExpanded=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var r,l;e.setExpanded(n?{}:(r=(l=e.initialState)==null?void 0:l.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(l=>{const s=l.split(".");n=Math.max(n,s.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,o)=>{e.toggleExpanded=t=>{o.setExpanded(n=>{var r;const l=n===!0?!0:!!(n!=null&&n[e.id]);let s={};if(n===!0?Object.keys(o.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=n,t=(r=t)!=null?r:!l,!l&&t)return{...s,[e.id]:!0};if(l&&!t){const{[e.id]:a,...u}=s;return u}return n})},e.getIsExpanded=()=>{var t;const n=o.getState().expanded;return!!((t=o.options.getIsRowExpanded==null?void 0:o.options.getIsRowExpanded(e))!=null?t:n===!0||n?.[e.id])},e.getCanExpand=()=>{var t,n,r;return(t=o.options.getRowCanExpand==null?void 0:o.options.getRowCanExpand(e))!=null?t:((n=o.options.enableExpanding)!=null?n:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,n=e;for(;t&&n.parentId;)n=o.getRow(n.parentId,!0),t=n.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Qe=0,Ze=10,Ue=()=>({pageIndex:Qe,pageSize:Ze}),Qn={getInitialState:e=>({...e,pagination:{...Ue(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:N("pagination",e)}),createTable:e=>{let o=!1,t=!1;e._autoResetPageIndex=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=n=>{const r=l=>ee(n,l);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=n=>{var r;e.setPagination(n?Ue():(r=e.initialState.pagination)!=null?r:Ue())},e.setPageIndex=n=>{e.setPagination(r=>{let l=ee(n,r.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return l=Math.max(0,Math.min(l,s)),{...r,pageIndex:l}})},e.resetPageIndex=n=>{var r,l;e.setPageIndex(n?Qe:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageIndex)!=null?r:Qe)},e.resetPageSize=n=>{var r,l;e.setPageSize(n?Ze:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageSize)!=null?r:Ze)},e.setPageSize=n=>{e.setPagination(r=>{const l=Math.max(1,ee(n,r.pageSize)),s=r.pageSize*r.pageIndex,a=Math.floor(s/l);return{...r,pageIndex:a,pageSize:l}})},e.setPageCount=n=>e.setPagination(r=>{var l;let s=ee(n,(l=e.options.pageCount)!=null?l:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...r,pageCount:s}}),e.getPageOptions=y(()=>[e.getPageCount()],n=>{let r=[];return n&&n>0&&(r=[...new Array(n)].fill(null).map((l,s)=>s)),r},R(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:n<r-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},Ke=()=>({top:[],bottom:[]}),Zn={getInitialState:e=>({rowPinning:Ke(),...e}),getDefaultOptions:e=>({onRowPinningChange:N("rowPinning",e)}),createRow:(e,o)=>{e.pin=(t,n,r)=>{const l=n?e.getLeafRows().map(u=>{let{id:c}=u;return c}):[],s=r?e.getParentRows().map(u=>{let{id:c}=u;return c}):[],a=new Set([...s,e.id,...l]);o.setRowPinning(u=>{var c,d;if(t==="bottom"){var p,g;return{top:((p=u?.top)!=null?p:[]).filter(m=>!(a!=null&&a.has(m))),bottom:[...((g=u?.bottom)!=null?g:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)]}}if(t==="top"){var f,v;return{top:[...((f=u?.top)!=null?f:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)],bottom:((v=u?.bottom)!=null?v:[]).filter(m=>!(a!=null&&a.has(m)))}}return{top:((c=u?.top)!=null?c:[]).filter(m=>!(a!=null&&a.has(m))),bottom:((d=u?.bottom)!=null?d:[]).filter(m=>!(a!=null&&a.has(m)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:n,enablePinning:r}=o.options;return typeof n=="function"?n(e):(t=n??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:n,bottom:r}=o.getState().rowPinning,l=t.some(a=>n?.includes(a)),s=t.some(a=>r?.includes(a));return l?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();if(!r)return-1;const l=(t=r==="top"?o.getTopRows():o.getBottomRows())==null?void 0:t.map(s=>{let{id:a}=s;return a});return(n=l?.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=o=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(o),e.resetRowPinning=o=>{var t,n;return e.setRowPinning(o?Ke():(t=(n=e.initialState)==null?void 0:n.rowPinning)!=null?t:Ke())},e.getIsSomeRowsPinned=o=>{var t;const n=e.getState().rowPinning;if(!o){var r,l;return!!((r=n.top)!=null&&r.length||(l=n.bottom)!=null&&l.length)}return!!((t=n[o])!=null&&t.length)},e._getPinnedRows=(o,t,n)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(t??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(t??[]).map(s=>o.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:n}))},e.getTopRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(o,t)=>e._getPinnedRows(o,t,"top"),R(e.options,"debugRows","getTopRows")),e.getBottomRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(o,t)=>e._getPinnedRows(o,t,"bottom"),R(e.options,"debugRows","getBottomRows")),e.getCenterRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(o,t,n)=>{const r=new Set([...t??[],...n??[]]);return o.filter(l=>!r.has(l.id))},R(e.options,"debugRows","getCenterRows"))}},eo={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:N("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=o=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(o),e.resetRowSelection=o=>{var t;return e.setRowSelection(o?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=o=>{e.setRowSelection(t=>{o=typeof o<"u"?o:!e.getIsAllRowsSelected();const n={...t},r=e.getPreGroupedRowModel().flatRows;return o?r.forEach(l=>{l.getCanSelect()&&(n[l.id]=!0)}):r.forEach(l=>{delete n[l.id]}),n})},e.toggleAllPageRowsSelected=o=>e.setRowSelection(t=>{const n=typeof o<"u"?o:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(l=>{et(r,l.id,n,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(o,t)=>Object.keys(o).length?Xe(e,t):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(o,t)=>Object.keys(o).length?Xe(e,t):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(o,t)=>Object.keys(o).length?Xe(e,t):{rows:[],flatRows:[],rowsById:{}},R(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const o=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let n=!!(o.length&&Object.keys(t).length);return n&&o.some(r=>r.getCanSelect()&&!t[r.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let n=!!o.length;return n&&o.some(r=>!t[r.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var o;const t=Object.keys((o=e.getState().rowSelection)!=null?o:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:o.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>o=>{e.toggleAllRowsSelected(o.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>o=>{e.toggleAllPageRowsSelected(o.target.checked)}},createRow:(e,o)=>{e.toggleSelected=(t,n)=>{const r=e.getIsSelected();o.setRowSelection(l=>{var s;if(t=typeof t<"u"?t:!r,e.getCanSelect()&&r===t)return l;const a={...l};return et(a,e.id,t,(s=n?.selectChildren)!=null?s:!0,o),a})},e.getIsSelected=()=>{const{rowSelection:t}=o.getState();return at(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=o.getState();return tt(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=o.getState();return tt(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof o.options.enableRowSelection=="function"?o.options.enableRowSelection(e):(t=o.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof o.options.enableSubRowSelection=="function"?o.options.enableSubRowSelection(e):(t=o.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof o.options.enableMultiRowSelection=="function"?o.options.enableMultiRowSelection(e):(t=o.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected((r=n.target)==null?void 0:r.checked)}}}},et=(e,o,t,n,r)=>{var l;const s=r.getRow(o,!0);t?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[o]=!0)):delete e[o],n&&(l=s.subRows)!=null&&l.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>et(e,a.id,t,n,r))};function Xe(e,o){const t=e.getState().rowSelection,n=[],r={},l=function(s,a){return s.map(u=>{var c;const d=at(u,t);if(d&&(n.push(u),r[u.id]=u),(c=u.subRows)!=null&&c.length&&(u={...u,subRows:l(u.subRows)}),d)return u}).filter(Boolean)};return{rows:l(o.rows),flatRows:n,rowsById:r}}function at(e,o){var t;return(t=o[e.id])!=null?t:!1}function tt(e,o,t){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let r=!0,l=!1;return e.subRows.forEach(s=>{if(!(l&&!r)&&(s.getCanSelect()&&(at(s,o)?l=!0:r=!1),s.subRows&&s.subRows.length)){const a=tt(s,o);a==="all"?l=!0:(a==="some"&&(l=!0),r=!1)}}),r?"all":l?"some":!1}const nt=/([0-9]+)/gm,to=(e,o,t)=>Yt(ne(e.getValue(t)).toLowerCase(),ne(o.getValue(t)).toLowerCase()),no=(e,o,t)=>Yt(ne(e.getValue(t)),ne(o.getValue(t))),oo=(e,o,t)=>ut(ne(e.getValue(t)).toLowerCase(),ne(o.getValue(t)).toLowerCase()),ro=(e,o,t)=>ut(ne(e.getValue(t)),ne(o.getValue(t))),io=(e,o,t)=>{const n=e.getValue(t),r=o.getValue(t);return n>r?1:n<r?-1:0},lo=(e,o,t)=>ut(e.getValue(t),o.getValue(t));function ut(e,o){return e===o?0:e>o?1:-1}function ne(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Yt(e,o){const t=e.split(nt).filter(Boolean),n=o.split(nt).filter(Boolean);for(;t.length&&n.length;){const r=t.shift(),l=n.shift(),s=parseInt(r,10),a=parseInt(l,10),u=[s,a].sort();if(isNaN(u[0])){if(r>l)return 1;if(l>r)return-1;continue}if(isNaN(u[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return t.length-n.length}const he={alphanumeric:to,alphanumericCaseSensitive:no,text:oo,textCaseSensitive:ro,datetime:io,basic:lo},so={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:N("sorting",e),isMultiSortEvent:o=>o.shiftKey}),createColumn:(e,o)=>{e.getAutoSortingFn=()=>{const t=o.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const r of t){const l=r?.getValue(e.id);if(Object.prototype.toString.call(l)==="[object Date]")return he.datetime;if(typeof l=="string"&&(n=!0,l.split(nt).length>1))return he.alphanumeric}return n?he.text:he.basic},e.getAutoSortDir=()=>{const t=o.getFilteredRowModel().flatRows[0];return typeof t?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,n;if(!e)throw new Error;return ke(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(n=o.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?t:he[e.columnDef.sortingFn]},e.toggleSorting=(t,n)=>{const r=e.getNextSortingOrder(),l=typeof t<"u"&&t!==null;o.setSorting(s=>{const a=s?.find(f=>f.id===e.id),u=s?.findIndex(f=>f.id===e.id);let c=[],d,p=l?t:r==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&n?a?d="toggle":d="add":s!=null&&s.length&&u!==s.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(l||r||(d="remove")),d==="add"){var g;c=[...s,{id:e.id,desc:p}],c.splice(0,c.length-((g=o.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=s.map(f=>f.id===e.id?{...f,desc:p}:f):d==="remove"?c=s.filter(f=>f.id!==e.id):c=[{id:e.id,desc:p}];return c})},e.getFirstSortDir=()=>{var t,n;return((t=(n=e.columnDef.sortDescFirst)!=null?n:o.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var n,r;const l=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==l&&((n=o.options.enableSortingRemoval)==null||n)&&(!(t&&(r=o.options.enableMultiRemove)!=null)||r)?!1:s==="desc"?"asc":"desc":l},e.getCanSort=()=>{var t,n;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((n=o.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,n;return(t=(n=e.columnDef.enableMultiSort)!=null?n:o.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const n=(t=o.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,n;return(t=(n=o.getState().sorting)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{o.setSorting(t=>t!=null&&t.length?t.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return n=>{t&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?o.options.isMultiSortEvent==null?void 0:o.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=o=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(o),e.resetSorting=o=>{var t,n;e.setSorting(o?[]:(t=(n=e.initialState)==null?void 0:n.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ao=[Mn,Kn,Gn,jn,In,Pn,Xn,Yn,so,Nn,Jn,Qn,Zn,eo,qn];function uo(e){var o,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const n=[...ao,...(o=e._features)!=null?o:[]];let r={_features:n};const l=r._features.reduce((g,f)=>Object.assign(g,f.getDefaultOptions==null?void 0:f.getDefaultOptions(r)),{}),s=g=>r.options.mergeOptions?r.options.mergeOptions(l,g):{...l,...g};let u={...{},...(t=e.initialState)!=null?t:{}};r._features.forEach(g=>{var f;u=(f=g.getInitialState==null?void 0:g.getInitialState(u))!=null?f:u});const c=[];let d=!1;const p={_features:n,options:{...l,...e},initialState:u,_queue:g=>{c.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{r.setState(r.initialState)},setOptions:g=>{const f=ee(g,r.options);r.options=s(f)},getState:()=>r.options.state,setState:g=>{r.options.onStateChange==null||r.options.onStateChange(g)},_getRowId:(g,f,v)=>{var m;return(m=r.options.getRowId==null?void 0:r.options.getRowId(g,f,v))!=null?m:`${v?[v.id,f].join("."):f}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(g,f)=>{let v=(f?r.getPrePaginationRowModel():r.getRowModel()).rowsById[g];if(!v&&(v=r.getCoreRowModel().rowsById[g],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${g}`):new Error;return v},_getDefaultColumnDef:y(()=>[r.options.defaultColumn],g=>{var f;return g=(f=g)!=null?f:{},{header:v=>{const m=v.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:v=>{var m,w;return(m=(w=v.renderValue())==null||w.toString==null?void 0:w.toString())!=null?m:null},...r._features.reduce((v,m)=>Object.assign(v,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...g}},R(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:y(()=>[r._getColumnDefs()],g=>{const f=function(v,m,w){return w===void 0&&(w=0),v.map(C=>{const S=$n(r,C,w,m),x=C;return S.columns=x.columns?f(x.columns,S,w+1):[],S})};return f(g)},R(e,"debugColumns","getAllColumns")),getAllFlatColumns:y(()=>[r.getAllColumns()],g=>g.flatMap(f=>f.getFlatColumns()),R(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:y(()=>[r.getAllFlatColumns()],g=>g.reduce((f,v)=>(f[v.id]=v,f),{}),R(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:y(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(g,f)=>{let v=g.flatMap(m=>m.getLeafColumns());return f(v)},R(e,"debugColumns","getAllLeafColumns")),getColumn:g=>{const f=r._getAllFlatColumnsById()[g];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${g}' does not exist.`),f}};Object.assign(r,p);for(let g=0;g<r._features.length;g++){const f=r._features[g];f==null||f.createTable==null||f.createTable(r)}return r}function co(){return e=>y(()=>[e.options.data],o=>{const t={rows:[],flatRows:[],rowsById:{}},n=function(r,l,s){l===void 0&&(l=0);const a=[];for(let c=0;c<r.length;c++){const d=bn(e,e._getRowId(r[c],c,s),r[c],c,l,void 0,s?.id);if(t.flatRows.push(d),t.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var u;d.originalSubRows=e.options.getSubRows(r[c],c),(u=d.originalSubRows)!=null&&u.length&&(d.subRows=n(d.originalSubRows,l+1,d))}}return a};return t.rows=n(o),t},R(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function go(){return e=>y(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(o,t,n)=>!t.rows.length||o!==!0&&!Object.keys(o??{}).length||!n?t:Jt(t),R(e.options,"debugTable","getExpandedRowModel"))}function Jt(e){const o=[],t=n=>{var r;o.push(n),(r=n.subRows)!=null&&r.length&&n.getIsExpanded()&&n.subRows.forEach(t)};return e.rows.forEach(t),{rows:o,flatRows:e.flatRows,rowsById:e.rowsById}}function fo(e){return o=>y(()=>[o.getState().pagination,o.getPrePaginationRowModel(),o.options.paginateExpandedRows?void 0:o.getState().expanded],(t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:l}=t;let{rows:s,flatRows:a,rowsById:u}=n;const c=r*l,d=c+r;s=s.slice(c,d);let p;o.options.paginateExpandedRows?p={rows:s,flatRows:a,rowsById:u}:p=Jt({rows:s,flatRows:a,rowsById:u}),p.flatRows=[];const g=f=>{p.flatRows.push(f),f.subRows.length&&f.subRows.forEach(g)};return p.rows.forEach(g),p},R(o.options,"debugTable","getPaginationRowModel"))}function be(){return!0}const po=Symbol("merge-proxy"),mo={get(e,o,t){return o===po?t:e.get(o)},has(e,o){return e.has(o)},set:be,deleteProperty:be,getOwnPropertyDescriptor(e,o){return{configurable:!0,enumerable:!0,get(){return e.get(o)},set:be,deleteProperty:be}},ownKeys(e){return e.keys()}};function Ye(e){return"value"in e?e.value:e}function Ce(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return new Proxy({get(n){for(let r=o.length-1;r>=0;r--){const l=Ye(o[r])[n];if(l!==void 0)return l}},has(n){for(let r=o.length-1;r>=0;r--)if(n in Ye(o[r]))return!0;return!1},keys(){const n=[];for(let r=0;r<o.length;r++)n.push(...Object.keys(Ye(o[r])));return[...Array.from(new Set(n))]}},mo)}const xt=i.defineComponent({props:["render","props"],setup:e=>()=>typeof e.render=="function"||typeof e.render=="object"?i.h(e.render,e.props):e.render});function yt(e){return Ce(e,{data:i.unref(e.data)})}function ho(e){const o=i.isRef(e.data),t=Ce({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(l,s){return o?{...l,...s}:Ce(l,s)}},o?yt(e):e),n=uo(t);if(o){const l=i.shallowRef(e.data);i.watch(l,()=>{n.setState(s=>({...s,data:l.value}))},{immediate:!0})}const r=i.ref(n.initialState);return i.watchEffect(()=>{n.setOptions(l=>{var s;const a=new Proxy({},{get:(u,c)=>r.value[c]});return Ce(l,o?yt(e):e,{state:Ce(a,(s=e.state)!=null?s:{}),onStateChange:u=>{u instanceof Function?r.value=u(r.value):r.value=u,e.onStateChange==null||e.onStateChange(u)}})})}),n}function ce(e,o,t){let n=t.initialDeps??[],r,l=!0;function s(){var a,u,c;let d;t.key&&((a=t.debug)!=null&&a.call(t))&&(d=Date.now());const p=e();if(!(p.length!==n.length||p.some((v,m)=>n[m]!==v)))return r;n=p;let f;if(t.key&&((u=t.debug)!=null&&u.call(t))&&(f=Date.now()),r=o(...p),t.key&&((c=t.debug)!=null&&c.call(t))){const v=Math.round((Date.now()-d)*100)/100,m=Math.round((Date.now()-f)*100)/100,w=m/16,C=(S,x)=>{for(S=String(S);S.length<x;)S=" "+S;return S};console.info(`%c⏱ ${C(m,5)} /${C(v,5)} ms`,`
|
|
5
5
|
font-size: .6rem;
|
|
6
6
|
font-weight: bold;
|
|
7
|
-
color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,t?.key)}return t?.onChange&&!(l&&t.skipInitialOnChange)&&t.onChange(r),l=!1,r}return s.updateDeps=a=>{n=a},s}function Rt(e,o){if(e===void 0)throw new Error("Unexpected undefined");return e}const vo=(e,o)=>Math.abs(e-o)<1.01,Co=(e,o,t)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>o.apply(this,r),t)}},_t=e=>{const{offsetWidth:o,offsetHeight:t}=e;return{width:o,height:t}},wo=e=>e,So=e=>{const o=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=o;r<=t;r++)n.push(r);return n},xo=(e,o)=>{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;const r=s=>{const{width:a,height:u}=s;o({width:Math.round(a),height:Math.round(u)})};if(r(_t(t)),!n.ResizeObserver)return()=>{};const l=new n.ResizeObserver(s=>{const a=()=>{const u=s[0];if(u?.borderBoxSize){const c=u.borderBoxSize[0];if(c){r({width:c.inlineSize,height:c.blockSize});return}}r(_t(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return l.observe(t,{box:"border-box"}),()=>{l.unobserve(t)}},Et={passive:!0},Ft=typeof window>"u"?!0:"onscrollend"in window,yo=(e,o)=>{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;let r=0;const l=e.options.useScrollendEvent&&Ft?()=>{}:Co(n,()=>{o(r,!1)},e.options.isScrollingResetDelay),s=d=>()=>{const{horizontal:p,isRtl:g}=e.options;r=p?t.scrollLeft*(g&&-1||1):t.scrollTop,l(),o(r,d)},a=s(!0),u=s(!1);t.addEventListener("scroll",a,Et);const c=e.options.useScrollendEvent&&Ft;return c&&t.addEventListener("scrollend",u,Et),()=>{t.removeEventListener("scroll",a),c&&t.removeEventListener("scrollend",u)}},Ro=(e,o,t)=>{if(o?.borderBoxSize){const n=o.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},_o=(e,{adjustments:o=0,behavior:t},n)=>{var r,l;const s=e+o;(l=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||l.call(r,{[n.options.horizontal?"left":"top"]:s,behavior:t})};class Eo{constructor(o){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(r=>{r.forEach(l=>{const s=()=>{this._measureElement(l.target,l)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),t=null},observe:r=>{var l;return(l=n())==null?void 0:l.observe(r,{box:"border-box"})},unobserve:r=>{var l;return(l=n())==null?void 0:l.unobserve(r)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([n,r])=>{typeof r>"u"&&delete t[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wo,rangeExtractor:So,onChange:()=>{},measureElement:Ro,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...t}},this.notify=t=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,t)},this.maybeNotify=ce(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,l)=>{this.scrollAdjustments=0,this.scrollDirection=l?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=l,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,n)=>{const r=new Map,l=new Map;for(let s=n-1;s>=0;s--){const a=t[s];if(r.has(a.lane))continue;const u=l.get(a.lane);if(u==null||a.end>u.end?l.set(a.lane,a):a.end<u.end&&r.set(a.lane,!0),r.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=ce(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(t,n,r,l,s,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:n,scrollMargin:r,getItemKey:l,enabled:s,lanes:a}),{key:!1}),this.getMeasurements=ce(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:n,scrollMargin:r,getItemKey:l,enabled:s,lanes:a},u)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const g of this.laneAssignments.keys())g>=t&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,c),p=new Array(a).fill(void 0);for(let g=0;g<c;g++){const f=d[g];f&&(p[f.lane]=g)}for(let g=c;g<t;g++){const f=l(g),v=this.laneAssignments.get(g);let m,w;if(v!==void 0&&this.options.lanes>1){m=v;const E=p[m],M=E!==void 0?d[E]:void 0;w=M?M.end+this.options.gap:n+r}else{const E=this.options.lanes===1?d[g-1]:this.getFurthestMeasurement(d,g);w=E?E.end+this.options.gap:n+r,m=E?E.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,m)}const C=u.get(f),S=typeof C=="number"?C:this.options.estimateSize(g),x=w+S;d[g]={index:g,start:w,size:S,end:x,key:f,lane:m},p[m]=g}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ce(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,n,r,l)=>this.range=t.length>0&&n>0?Fo({measurements:t,outerSize:n,scrollOffset:r,lanes:l}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=ce(()=>{let t=null,n=null;const r=this.calculateRange();return r&&(t=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,n]},(t,n,r,l,s)=>l===null||s===null?[]:t({startIndex:l,endIndex:s,overscan:n,count:r}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,r=t.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(t,n)=>{const r=this.indexFromElement(t),l=this.measurementsCache[r];if(!l)return;const s=l.key,a=this.elementsCache.get(s);a!==t&&(a&&this.observer.unobserve(a),this.observer.observe(t),this.elementsCache.set(s,t)),t.isConnected&&this.resizeItem(r,this.options.measureElement(t,n,this))},this.resizeItem=(t,n)=>{const r=this.measurementsCache[t];if(!r)return;const l=this.itemSizeCache.get(r.key)??r.size,s=n-l;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,s,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(t,void 0)},this.getVirtualItems=ce(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,n)=>{const r=[];for(let l=0,s=t.length;l<s;l++){const a=t[l],u=n[a];r.push(u)}return r},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length!==0)return Rt(n[Qt(0,n.length-1,r=>Rt(n[r]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(t,n,r=0)=>{if(!this.scrollElement)return 0;const l=this.getSize(),s=this.getScrollOffset();n==="auto"&&(n=t>=s+l?"end":"start"),n==="center"?t+=(r-l)/2:n==="end"&&(t-=l);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const r=this.measurementsCache[t];if(!r)return;const l=this.getSize(),s=this.getScrollOffset();if(n==="auto")if(r.end>=s+l-this.options.scrollPaddingEnd)n="end";else if(r.start<=s+this.options.scrollPaddingStart)n="start";else return[s,n];if(n==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),n];const a=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(t,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(t,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t=Math.max(0,Math.min(t,this.options.count-1)),this.currentScrollToIndex=t;let l=0;const s=10,a=c=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(t,c);if(!d){console.warn("Failed to get offset for index:",t);return}const[p,g]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{if(!this.targetWindow)return;const f=()=>{if(this.currentScrollToIndex!==t)return;const v=this.getScrollOffset(),m=this.getOffsetForIndex(t,g);if(!m){console.warn("Failed to get offset for index:",t);return}vo(m[0],v)||u(g)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(f):f()})},u=c=>{this.targetWindow&&this.currentScrollToIndex===t&&(l++,l<s?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",l,s),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${t} after ${s} attempts.`))};a(n)},this.scrollBy=(t,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((t=n[n.length-1])==null?void 0:t.end)??0;else{const l=Array(this.options.lanes).fill(null);let s=n.length-1;for(;s>=0&&l.some(a=>a===null);){const a=n[s];l[a.lane]===null&&(l[a.lane]=a.end),s--}r=Math.max(...l.filter(a=>a!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:n,behavior:r})=>{this.options.scrollToFn(t,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(o)}}const Qt=(e,o,t,n)=>{for(;e<=o;){const r=(e+o)/2|0,l=t(r);if(l<n)e=r+1;else if(l>n)o=r-1;else return r}return e>0?e-1:0};function Fo({measurements:e,outerSize:o,scrollOffset:t,lanes:n}){const r=e.length-1,l=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let s=Qt(0,r,l,t),a=s;if(n===1)for(;a<r&&e[a].end<t+o;)a++;else if(n>1){const u=Array(n).fill(0);for(;a<r&&u.some(d=>d<t+o);){const d=e[a];u[d.lane]=d.end,a++}const c=Array(n).fill(t+o);for(;s>=0&&c.some(d=>d>=t);){const d=e[s];c[d.lane]=d.start,s--}s=Math.max(0,s-s%n),a=Math.min(r,a+(n-1-a%n))}return{startIndex:s,endIndex:a}}function $o(e){const o=new Eo(i.unref(e)),t=i.shallowRef(o),n=o._didMount();return i.watch(()=>i.unref(e).getScrollElement(),r=>{r&&o._willUpdate()},{immediate:!0}),i.watch(()=>i.unref(e),r=>{o.setOptions({...r,onChange:(l,s)=>{var a;i.triggerRef(t),(a=r.onChange)==null||a.call(r,l,s)}}),o._willUpdate(),i.triggerRef(t)},{immediate:!0}),i.onScopeDispose(n),t}function Mo(e){return $o(i.computed(()=>({observeElementRect:xo,observeElementOffset:yo,scrollToFn:_o,...i.unref(e)})))}function bo(e){return typeof e=="string"?`'${e}'`:new Io().serialize(e)}const Io=(function(){class e{#e=new Map;compare(t,n){const r=typeof t,l=typeof n;return r==="string"&&l==="string"?t.localeCompare(n):r==="number"&&l==="number"?t-n:String.prototype.localeCompare.call(this.serialize(t,!0),this.serialize(n,!0))}serialize(t,n){if(t===null)return"null";switch(typeof t){case"string":return n?t:`'${t}'`;case"bigint":return`${t}n`;case"object":return this.$object(t);case"function":return this.$function(t)}return String(t)}serializeObject(t){const n=Object.prototype.toString.call(t);if(n!=="[object Object]")return this.serializeBuiltInType(n.length<10?`unknown:${n}`:n.slice(8,-1),t);const r=t.constructor,l=r===Object||r===void 0?"":r.name;if(l!==""&&globalThis[l]===r)return this.serializeBuiltInType(l,t);if(typeof t.toJSON=="function"){const s=t.toJSON();return l+(s!==null&&typeof s=="object"?this.$object(s):`(${this.serialize(s)})`)}return this.serializeObjectEntries(l,Object.entries(t))}serializeBuiltInType(t,n){const r=this["$"+t];if(r)return r.call(this,n);if(typeof n?.entries=="function")return this.serializeObjectEntries(t,n.entries());throw new Error(`Cannot serialize ${t}`)}serializeObjectEntries(t,n){const r=Array.from(n).sort((s,a)=>this.compare(s[0],a[0]));let l=`${t}{`;for(let s=0;s<r.length;s++){const[a,u]=r[s];l+=`${this.serialize(a,!0)}:${this.serialize(u)}`,s<r.length-1&&(l+=",")}return l+"}"}$object(t){let n=this.#e.get(t);return n===void 0&&(this.#e.set(t,`#${this.#e.size}`),n=this.serializeObject(t),this.#e.set(t,n)),n}$function(t){const n=Function.prototype.toString.call(t);return n.slice(-15)==="[native code] }"?`${t.name||""}()[native]`:`${t.name}(${t.length})${n.replace(/\s*\n\s*/g,"")}`}$Array(t){let n="[";for(let r=0;r<t.length;r++)n+=this.serialize(t[r]),r<t.length-1&&(n+=",");return n+"]"}$Date(t){try{return`Date(${t.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(t){return`ArrayBuffer[${new Uint8Array(t).join(",")}]`}$Set(t){return`Set${this.$Array(Array.from(t).sort((n,r)=>this.compare(n,r)))}`}$Map(t){return this.serializeObjectEntries("Map",t.entries())}}for(const o of["Error","RegExp","URL"])e.prototype["$"+o]=function(t){return`${o}(${t})`};for(const o of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+o]=function(t){return`${o}[${t.join(",")}]`};for(const o of["BigInt64Array","BigUint64Array"])e.prototype["$"+o]=function(t){return`${o}[${t.join("n,")}${t.length>0?"n":""}]`};return e})(),Po=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Vo=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],ko="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",re=[];class zo{_data=new de;_hash=new de([...Po]);_nDataBytes=0;_minBufferSize=0;finalize(o){o&&this._append(o);const t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(o,t){const n=this._hash.words;let r=n[0],l=n[1],s=n[2],a=n[3],u=n[4],c=n[5],d=n[6],p=n[7];for(let g=0;g<64;g++){if(g<16)re[g]=o[t+g]|0;else{const x=re[g-15],E=(x<<25|x>>>7)^(x<<14|x>>>18)^x>>>3,M=re[g-2],P=(M<<15|M>>>17)^(M<<13|M>>>19)^M>>>10;re[g]=E+re[g-7]+P+re[g-16]}const f=u&c^~u&d,v=r&l^r&s^l&s,m=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),C=p+w+f+Vo[g]+re[g],S=m+v;p=d,d=c,c=u,u=a+C|0,a=s,s=l,l=r,r=C+S|0}n[0]=n[0]+r|0,n[1]=n[1]+l|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+d|0,n[7]=n[7]+p|0}_append(o){typeof o=="string"&&(o=de.fromUtf8(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes}_process(o){let t,n=this._data.sigBytes/64;o?n=Math.ceil(n):n=Math.max((n|0)-this._minBufferSize,0);const r=n*16,l=Math.min(r*4,this._data.sigBytes);if(r){for(let s=0;s<r;s+=16)this._doProcessBlock(this._data.words,s);t=this._data.words.splice(0,r),this._data.sigBytes-=l}return new de(t,l)}}class de{words;sigBytes;constructor(o,t){o=this.words=o||[],this.sigBytes=t===void 0?o.length*4:t}static fromUtf8(o){const t=unescape(encodeURIComponent(o)),n=t.length,r=[];for(let l=0;l<n;l++)r[l>>>2]|=(t.charCodeAt(l)&255)<<24-l%4*8;return new de(r,n)}toBase64(){const o=[];for(let t=0;t<this.sigBytes;t+=3){const n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,l=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,s=n<<16|r<<8|l;for(let a=0;a<4&&t*8+a*6<this.sigBytes*8;a++)o.push(ko.charAt(s>>>6*(3-a)&63))}return o.join("")}concat(o){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<o.sigBytes;t++){const n=o.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<o.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=o.words[t>>>2];this.sigBytes+=o.sigBytes}}function Ao(e){return new zo().finalize(e).toBase64()}function Bo(e){return Ao(bo(e))}const Do=i.defineComponent({name:"ExpandIcon",__name:"ExpandIcon",props:{expand:{type:Boolean},onExpandChange:{type:Function}},setup(e){const o=e,t=i.computed(()=>({"row-expand-icon":!0,"row-expand-icon-expanded":o.expand,"row-expand-icon-collapsed":!o.expand})),n=r=>{r.stopPropagation(),o.onExpandChange&&o.onExpandChange?.()};return(r,l)=>(i.openBlock(),i.createElementBlock("button",{type:"button",class:i.normalizeClass(i.unref(t)),onClick:n},null,2))}}),Y=(e,o)=>{const t=e.__vccOpts||e;for(const[n,r]of o)t[n]=r;return t},Zt=Y(Do,[["__scopeId","data-v-892b1db0"]]),Oo=i.defineComponent({name:"BodyCell",__name:"BodyCell",props:{cell:{},treeConfig:{},columns:{},row:{}},setup(e){const o=e,t=i.computed(()=>{const r=o.cell.column.columnDef.cell;if(typeof r=="function"){const l=r(o.cell.getContext());return typeof l=="string"?i.h("span",l):l}return i.h("span",o.cell.getValue()??"")}),n=i.computed(()=>({row:o.cell.row.original,column:o.cell.column.columnDef.meta,columnKey:o.cell.column.id,rowIndex:o.cell.row.index}));return(r,l)=>o.treeConfig?.enabled&&o.cell.column.id===o.columns[0]?.columnKey?(i.openBlock(),i.createElementBlock("div",{key:0,class:"flex h-full items-center gap-[8px]",style:i.normalizeStyle({paddingLeft:`${o.row.depth*(o.treeConfig?.indentSize??16)}px`})},[i.createElementVNode("div",{class:i.normalizeClass(["flex-shrink-0",[o.row.getCanExpand()?"visible":"invisible"]])},[i.renderSlot(r.$slots,"customExpandIcon",{expand:o.row.getIsExpanded(),onExpandChange:o.row.toggleExpanded},()=>[i.createVNode(Zt,{expand:o.row.getIsExpanded(),onExpandChange:o.row.toggleExpanded},null,8,["expand","onExpandChange"])])],2),i.renderSlot(r.$slots,"bodyCell",i.normalizeProps(i.guardReactiveProps(n.value)),()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.value)))])],4)):i.renderSlot(r.$slots,"bodyCell",i.normalizeProps(i.mergeProps({key:1},n.value)),()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.value)))])}}),Lo={class:"sorter-icon inline-flex flex-col items-center"},Ho=i.defineComponent({name:"SorterIcon",__name:"SorterIcon",props:{sort:{}},setup(e){return(o,t)=>(i.openBlock(),i.createElementBlock("div",Lo,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["sorter-up h-[10px] w-[10px]",{active:e.sort==="asc"}]),viewBox:"0 0 1024 1024",version:"1.1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[...t[0]||(t[0]=[i.createElementVNode("path",{d:"M76.3 632.8l405.1-489.1c16.9-18.9 46.5-18.9 63.4 0l403.1 489.1c24.4 27.4 5 70.8-31.7 70.8H107.9c-36.6 0-56.1-43.4-31.6-70.8z"},null,-1)])],2)),(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["sorter-down h-[10px] w-[10px]",{active:e.sort==="desc"}]),viewBox:"0 0 1024 1024",version:"1.1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[...t[1]||(t[1]=[i.createElementVNode("path",{d:"M76.3 392.3l403.1 489.1c16.9 18.9 46.5 18.9 63.4 0l405.1-489.1c24.4-27.4 5-70.8-31.7-70.8H108.1c-36.8 0-56.3 43.4-31.8 70.8z"},null,-1)])],2))]))}}),No=Y(Ho,[["__scopeId","data-v-5f94f1f7"]]),To={class:"filter-icon h-[12px] w-[12px]",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},Go=i.defineComponent({name:"FilterIcon",__name:"FilterIcon",setup(e){return(o,t)=>(i.openBlock(),i.createElementBlock("svg",To,[...t[0]||(t[0]=[i.createElementVNode("path",{d:"M325.714286 884.571429c0 20.228571 16.228571 36.571429 36.342857 36.571428h299.885714c20.114286 0 36.342857-16.342857 36.342857-36.571428V660.571429H325.714286v224z m606.971428-781.714286H91.314286c-28 0-45.485714 30.514286-31.428572 54.857143l252.914286 429.714285h398.628571l252.914286-429.714285c13.828571-24.342857-3.657143-54.857143-31.657143-54.857143z"},null,-1)])]))}}),jo=Y(Go,[["__scopeId","data-v-2e964860"]]),ot=Math.min,ge=Math.max,Ie=Math.round,K=e=>({x:e,y:e}),Wo={left:"right",right:"left",bottom:"top",top:"bottom"},qo={start:"end",end:"start"};function $t(e,o,t){return ge(e,ot(o,t))}function ze(e,o){return typeof e=="function"?e(o):e}function se(e){return e.split("-")[0]}function Ae(e){return e.split("-")[1]}function en(e){return e==="x"?"y":"x"}function tn(e){return e==="y"?"height":"width"}const Uo=new Set(["top","bottom"]);function te(e){return Uo.has(se(e))?"y":"x"}function nn(e){return en(te(e))}function Ko(e,o,t){t===void 0&&(t=!1);const n=Ae(e),r=nn(e),l=tn(r);let s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return o.reference[l]>o.floating[l]&&(s=Pe(s)),[s,Pe(s)]}function Xo(e){const o=Pe(e);return[rt(e),o,rt(o)]}function rt(e){return e.replace(/start|end/g,o=>qo[o])}const Mt=["left","right"],bt=["right","left"],Yo=["top","bottom"],Jo=["bottom","top"];function Qo(e,o,t){switch(e){case"top":case"bottom":return t?o?bt:Mt:o?Mt:bt;case"left":case"right":return o?Yo:Jo;default:return[]}}function Zo(e,o,t,n){const r=Ae(e);let l=Qo(se(e),t==="start",n);return r&&(l=l.map(s=>s+"-"+r),o&&(l=l.concat(l.map(rt)))),l}function Pe(e){return e.replace(/left|right|bottom|top/g,o=>Wo[o])}function er(e){return{top:0,right:0,bottom:0,left:0,...e}}function tr(e){return typeof e!="number"?er(e):{top:e,right:e,bottom:e,left:e}}function Ve(e){const{x:o,y:t,width:n,height:r}=e;return{width:n,height:r,top:t,left:o,right:o+n,bottom:t+r,x:o,y:t}}function It(e,o,t){let{reference:n,floating:r}=e;const l=te(o),s=nn(o),a=tn(s),u=se(o),c=l==="y",d=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2,g=n[a]/2-r[a]/2;let f;switch(u){case"top":f={x:d,y:n.y-r.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:p};break;case"left":f={x:n.x-r.width,y:p};break;default:f={x:n.x,y:n.y}}switch(Ae(o)){case"start":f[s]-=g*(t&&c?-1:1);break;case"end":f[s]+=g*(t&&c?-1:1);break}return f}async function nr(e,o){var t;o===void 0&&(o={});const{x:n,y:r,platform:l,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:g=!1,padding:f=0}=ze(o,e),v=tr(f),w=a[g?p==="floating"?"reference":"floating":p],C=Ve(await l.getClippingRect({element:(t=await(l.isElement==null?void 0:l.isElement(w)))==null||t?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),S=p==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),E=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},M=Ve(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:x,strategy:u}):S);return{top:(C.top-M.top+v.top)/E.y,bottom:(M.bottom-C.bottom+v.bottom)/E.y,left:(C.left-M.left+v.left)/E.x,right:(M.right-C.right+v.right)/E.x}}const or=async(e,o,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:l=[],platform:s}=t,a=l.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(o));let c=await s.getElementRects({reference:e,floating:o,strategy:r}),{x:d,y:p}=It(c,n,u),g=n,f={},v=0;for(let w=0;w<a.length;w++){var m;const{name:C,fn:S}=a[w],{x,y:E,data:M,reset:P}=await S({x:d,y:p,initialPlacement:n,placement:g,strategy:r,middlewareData:f,rects:c,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:nr},elements:{reference:e,floating:o}});d=x??d,p=E??p,f={...f,[C]:{...f[C],...M}},P&&v<=50&&(v++,typeof P=="object"&&(P.placement&&(g=P.placement),P.rects&&(c=P.rects===!0?await s.getElementRects({reference:e,floating:o,strategy:r}):P.rects),{x:d,y:p}=It(c,g,u)),w=-1)}return{x:d,y:p,placement:g,strategy:r,middlewareData:f}},rr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var t,n;const{placement:r,middlewareData:l,rects:s,initialPlacement:a,platform:u,elements:c}=o,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...w}=ze(e,o);if((t=l.arrow)!=null&&t.alignmentOffset)return{};const C=se(r),S=te(a),x=se(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),M=g||(x||!m?[Pe(a)]:Xo(a)),P=v!=="none";!g&&P&&M.push(...Zo(a,m,v,E));const b=[a,...M],k=await u.detectOverflow(o,w),G=[];let T=((n=l.flip)==null?void 0:n.overflows)||[];if(d&&G.push(k[C]),p){const V=Ko(r,s,E);G.push(k[V[0]],k[V[1]])}if(T=[...T,{placement:r,overflows:G}],!G.every(V=>V<=0)){var z,_e;const V=(((z=l.flip)==null?void 0:z.index)||0)+1,D=b[V];if(D&&(!(p==="alignment"?S!==te(D):!1)||T.every(L=>te(L.placement)===S?L.overflows[0]>0:!0)))return{data:{index:V,overflows:T},reset:{placement:D}};let O=(_e=T.filter(U=>U.overflows[0]<=0).sort((U,L)=>U.overflows[1]-L.overflows[1])[0])==null?void 0:_e.placement;if(!O)switch(f){case"bestFit":{var Ee;const U=(Ee=T.filter(L=>{if(P){const B=te(L.placement);return B===S||B==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(B=>B>0).reduce((B,He)=>B+He,0)]).sort((L,B)=>L[1]-B[1])[0])==null?void 0:Ee[0];U&&(O=U);break}case"initialPlacement":O=a;break}if(r!==O)return{reset:{placement:O}}}return{}}}},ir=new Set(["left","top"]);async function lr(e,o){const{placement:t,platform:n,elements:r}=e,l=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=se(t),a=Ae(t),u=te(t)==="y",c=ir.has(s)?-1:1,d=l&&u?-1:1,p=ze(o,e);let{mainAxis:g,crossAxis:f,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof v=="number"&&(f=a==="end"?v*-1:v),u?{x:f*d,y:g*c}:{x:g*c,y:f*d}}const sr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var t,n;const{x:r,y:l,placement:s,middlewareData:a}=o,u=await lr(o,e);return s===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+u.x,y:l+u.y,data:{...u,placement:s}}}}},ar=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:t,y:n,placement:r,platform:l}=o,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:C=>{let{x:S,y:x}=C;return{x:S,y:x}}},...c}=ze(e,o),d={x:t,y:n},p=await l.detectOverflow(o,c),g=te(se(r)),f=en(g);let v=d[f],m=d[g];if(s){const C=f==="y"?"top":"left",S=f==="y"?"bottom":"right",x=v+p[C],E=v-p[S];v=$t(x,v,E)}if(a){const C=g==="y"?"top":"left",S=g==="y"?"bottom":"right",x=m+p[C],E=m-p[S];m=$t(x,m,E)}const w=u.fn({...o,[f]:v,[g]:m});return{...w,data:{x:w.x-t,y:w.y-n,enabled:{[f]:s,[g]:a}}}}}};function Be(){return typeof window<"u"}function ae(e){return ct(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function Z(e){var o;return(o=(ct(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function ct(e){return Be()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return Be()?e instanceof Element||e instanceof H(e).Element:!1}function X(e){return Be()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function Pt(e){return!Be()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}const ur=new Set(["inline","contents"]);function Re(e){const{overflow:o,overflowX:t,overflowY:n,display:r}=q(e);return/auto|scroll|overlay|hidden|clip/.test(o+n+t)&&!ur.has(r)}const cr=new Set(["table","td","th"]);function dr(e){return cr.has(ae(e))}const gr=[":popover-open",":modal"];function De(e){return gr.some(o=>{try{return e.matches(o)}catch{return!1}})}const fr=["transform","translate","scale","rotate","perspective"],pr=["transform","translate","scale","rotate","perspective","filter"],mr=["paint","layout","strict","content"];function dt(e){const o=gt(),t=W(e)?q(e):e;return fr.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!o&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!o&&(t.filter?t.filter!=="none":!1)||pr.some(n=>(t.willChange||"").includes(n))||mr.some(n=>(t.contain||"").includes(n))}function hr(e){let o=oe(e);for(;X(o)&&!pe(o);){if(dt(o))return o;if(De(o))return null;o=oe(o)}return null}function gt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vr=new Set(["html","body","#document"]);function pe(e){return vr.has(ae(e))}function q(e){return H(e).getComputedStyle(e)}function Oe(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oe(e){if(ae(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Pt(e)&&e.host||Z(e);return Pt(o)?o.host:o}function on(e){const o=oe(e);return pe(o)?e.ownerDocument?e.ownerDocument.body:e.body:X(o)&&Re(o)?o:on(o)}function rn(e,o,t){var n;o===void 0&&(o=[]);const r=on(e),l=r===((n=e.ownerDocument)==null?void 0:n.body),s=H(r);return l?(it(s),o.concat(s,s.visualViewport||[],Re(r)?r:[],[])):o.concat(r,rn(r,[]))}function it(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ln(e){const o=q(e);let t=parseFloat(o.width)||0,n=parseFloat(o.height)||0;const r=X(e),l=r?e.offsetWidth:t,s=r?e.offsetHeight:n,a=Ie(t)!==l||Ie(n)!==s;return a&&(t=l,n=s),{width:t,height:n,$:a}}function sn(e){return W(e)?e:e.contextElement}function fe(e){const o=sn(e);if(!X(o))return K(1);const t=o.getBoundingClientRect(),{width:n,height:r,$:l}=ln(o);let s=(l?Ie(t.width):t.width)/n,a=(l?Ie(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Cr=K(0);function an(e){const o=H(e);return!gt()||!o.visualViewport?Cr:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function wr(e,o,t){return o===void 0&&(o=!1),!t||o&&t!==H(e)?!1:o}function ye(e,o,t,n){o===void 0&&(o=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),l=sn(e);let s=K(1);o&&(n?W(n)&&(s=fe(n)):s=fe(e));const a=wr(l,t,n)?an(l):K(0);let u=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,d=r.width/s.x,p=r.height/s.y;if(l){const g=H(l),f=n&&W(n)?H(n):n;let v=g,m=it(v);for(;m&&n&&f!==v;){const w=fe(m),C=m.getBoundingClientRect(),S=q(m),x=C.left+(m.clientLeft+parseFloat(S.paddingLeft))*w.x,E=C.top+(m.clientTop+parseFloat(S.paddingTop))*w.y;u*=w.x,c*=w.y,d*=w.x,p*=w.y,u+=x,c+=E,v=H(m),m=it(v)}}return Ve({width:d,height:p,x:u,y:c})}function Le(e,o){const t=Oe(e).scrollLeft;return o?o.left+t:ye(Z(e)).left+t}function un(e,o){const t=e.getBoundingClientRect(),n=t.left+o.scrollLeft-Le(e,t),r=t.top+o.scrollTop;return{x:n,y:r}}function Sr(e){let{elements:o,rect:t,offsetParent:n,strategy:r}=e;const l=r==="fixed",s=Z(n),a=o?De(o.floating):!1;if(n===s||a&&l)return t;let u={scrollLeft:0,scrollTop:0},c=K(1);const d=K(0),p=X(n);if((p||!p&&!l)&&((ae(n)!=="body"||Re(s))&&(u=Oe(n)),X(n))){const f=ye(n);c=fe(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const g=s&&!p&&!l?un(s,u):K(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-u.scrollLeft*c.x+d.x+g.x,y:t.y*c.y-u.scrollTop*c.y+d.y+g.y}}function xr(e){return Array.from(e.getClientRects())}function yr(e){const o=Z(e),t=Oe(e),n=e.ownerDocument.body,r=ge(o.scrollWidth,o.clientWidth,n.scrollWidth,n.clientWidth),l=ge(o.scrollHeight,o.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Le(e);const a=-t.scrollTop;return q(n).direction==="rtl"&&(s+=ge(o.clientWidth,n.clientWidth)-r),{width:r,height:l,x:s,y:a}}const Vt=25;function Rr(e,o){const t=H(e),n=Z(e),r=t.visualViewport;let l=n.clientWidth,s=n.clientHeight,a=0,u=0;if(r){l=r.width,s=r.height;const d=gt();(!d||d&&o==="fixed")&&(a=r.offsetLeft,u=r.offsetTop)}const c=Le(n);if(c<=0){const d=n.ownerDocument,p=d.body,g=getComputedStyle(p),f=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(n.clientWidth-p.clientWidth-f);v<=Vt&&(l-=v)}else c<=Vt&&(l+=c);return{width:l,height:s,x:a,y:u}}const _r=new Set(["absolute","fixed"]);function Er(e,o){const t=ye(e,!0,o==="fixed"),n=t.top+e.clientTop,r=t.left+e.clientLeft,l=X(e)?fe(e):K(1),s=e.clientWidth*l.x,a=e.clientHeight*l.y,u=r*l.x,c=n*l.y;return{width:s,height:a,x:u,y:c}}function kt(e,o,t){let n;if(o==="viewport")n=Rr(e,t);else if(o==="document")n=yr(Z(e));else if(W(o))n=Er(o,t);else{const r=an(e);n={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return Ve(n)}function cn(e,o){const t=oe(e);return t===o||!W(t)||pe(t)?!1:q(t).position==="fixed"||cn(t,o)}function Fr(e,o){const t=o.get(e);if(t)return t;let n=rn(e,[]).filter(a=>W(a)&&ae(a)!=="body"),r=null;const l=q(e).position==="fixed";let s=l?oe(e):e;for(;W(s)&&!pe(s);){const a=q(s),u=dt(s);!u&&a.position==="fixed"&&(r=null),(l?!u&&!r:!u&&a.position==="static"&&!!r&&_r.has(r.position)||Re(s)&&!u&&cn(e,s))?n=n.filter(d=>d!==s):r=a,s=oe(s)}return o.set(e,n),n}function $r(e){let{element:o,boundary:t,rootBoundary:n,strategy:r}=e;const s=[...t==="clippingAncestors"?De(o)?[]:Fr(o,this._c):[].concat(t),n],a=s[0],u=s.reduce((c,d)=>{const p=kt(o,d,r);return c.top=ge(p.top,c.top),c.right=ot(p.right,c.right),c.bottom=ot(p.bottom,c.bottom),c.left=ge(p.left,c.left),c},kt(o,a,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Mr(e){const{width:o,height:t}=ln(e);return{width:o,height:t}}function br(e,o,t){const n=X(o),r=Z(o),l=t==="fixed",s=ye(e,!0,l,o);let a={scrollLeft:0,scrollTop:0};const u=K(0);function c(){u.x=Le(r)}if(n||!n&&!l)if((ae(o)!=="body"||Re(r))&&(a=Oe(o)),n){const f=ye(o,!0,l,o);u.x=f.x+o.clientLeft,u.y=f.y+o.clientTop}else r&&c();l&&!n&&r&&c();const d=r&&!n&&!l?un(r,a):K(0),p=s.left+a.scrollLeft-u.x-d.x,g=s.top+a.scrollTop-u.y-d.y;return{x:p,y:g,width:s.width,height:s.height}}function Je(e){return q(e).position==="static"}function zt(e,o){if(!X(e)||q(e).position==="fixed")return null;if(o)return o(e);let t=e.offsetParent;return Z(e)===t&&(t=t.ownerDocument.body),t}function dn(e,o){const t=H(e);if(De(e))return t;if(!X(e)){let r=oe(e);for(;r&&!pe(r);){if(W(r)&&!Je(r))return r;r=oe(r)}return t}let n=zt(e,o);for(;n&&dr(n)&&Je(n);)n=zt(n,o);return n&&pe(n)&&Je(n)&&!dt(n)?t:n||hr(e)||t}const Ir=async function(e){const o=this.getOffsetParent||dn,t=this.getDimensions,n=await t(e.floating);return{reference:br(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Pr(e){return q(e).direction==="rtl"}const Vr={convertOffsetParentRelativeRectToViewportRelativeRect:Sr,getDocumentElement:Z,getClippingRect:$r,getOffsetParent:dn,getElementRects:Ir,getClientRects:xr,getDimensions:Mr,getScale:fe,isElement:W,isRTL:Pr},kr=sr,zr=ar,Ar=rr,Br=(e,o,t)=>{const n=new Map,r={platform:Vr,...t},l={...r.platform,_c:n};return or(e,o,{...r,platform:l})};function Dr(e){return e!=null&&typeof e=="object"&&"$el"in e}function At(e){if(Dr(e)){const o=e.$el;return ct(o)&&ae(o)==="#comment"?null:o}return e}function ve(e){return typeof e=="function"?e():i.unref(e)}function gn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bt(e,o){const t=gn(e);return Math.round(o*t)/t}function Or(e,o,t){t===void 0&&(t={});const n=t.whileElementsMounted,r=i.computed(()=>{var b;return(b=ve(t.open))!=null?b:!0}),l=i.computed(()=>ve(t.middleware)),s=i.computed(()=>{var b;return(b=ve(t.placement))!=null?b:"bottom"}),a=i.computed(()=>{var b;return(b=ve(t.strategy))!=null?b:"absolute"}),u=i.computed(()=>{var b;return(b=ve(t.transform))!=null?b:!0}),c=i.computed(()=>At(e.value)),d=i.computed(()=>At(o.value)),p=i.ref(0),g=i.ref(0),f=i.ref(a.value),v=i.ref(s.value),m=i.shallowRef({}),w=i.ref(!1),C=i.computed(()=>{const b={position:f.value,left:"0",top:"0"};if(!d.value)return b;const k=Bt(d.value,p.value),G=Bt(d.value,g.value);return u.value?{...b,transform:"translate("+k+"px, "+G+"px)",...gn(d.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:k+"px",top:G+"px"}});let S;function x(){if(c.value==null||d.value==null)return;const b=r.value;Br(c.value,d.value,{middleware:l.value,placement:s.value,strategy:a.value}).then(k=>{p.value=k.x,g.value=k.y,f.value=k.strategy,v.value=k.placement,m.value=k.middlewareData,w.value=b!==!1})}function E(){typeof S=="function"&&(S(),S=void 0)}function M(){if(E(),n===void 0){x();return}if(c.value!=null&&d.value!=null){S=n(c.value,d.value,x);return}}function P(){r.value||(w.value=!1)}return i.watch([l,s,a,r],x,{flush:"sync"}),i.watch([c,d],M,{flush:"sync"}),i.watch(r,P,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(E),{x:i.shallowReadonly(p),y:i.shallowReadonly(g),strategy:i.shallowReadonly(f),placement:i.shallowReadonly(v),middlewareData:i.shallowReadonly(m),isPositioned:i.shallowReadonly(w),floatingStyles:C,update:x}}const Lr=i.defineComponent({name:"VPopover",__name:"VPopover",props:{open:{type:Boolean,default:!1},onOpenChange:{type:Function,default:()=>{}},placement:{default:"bottom-end"}},setup(e){const o=e,t=i.ref(null),n=i.ref(null),{floatingStyles:r}=Or(t,n,{placement:i.computed(()=>o.placement),middleware:[kr(({placement:s})=>({mainAxis:12,crossAxis:s.includes("-start")?-12:s.includes("-end")?16:0})),Ar(),zr({padding:8})]}),l=s=>{if(!o.open)return;const a=s.target;t.value&&n.value&&!t.value.contains(a)&&!n.value.contains(a)&&o.onOpenChange(!1)};return i.onMounted(()=>{document.addEventListener("click",l)}),i.onUnmounted(()=>{document.removeEventListener("click",l)}),(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{ref_key:"referenceRef",ref:t,class:"popover-trigger",onClick:a[0]||(a[0]=u=>o.onOpenChange(!o.open))},[i.renderSlot(s.$slots,"default",{},void 0,!0)],512),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"popover-fade"},{default:i.withCtx(()=>[e.open?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"floatingRef",ref:n,style:i.normalizeStyle(i.unref(r)),class:"popover-content"},[i.renderSlot(s.$slots,"content",{},void 0,!0)],4)):i.createCommentVNode("",!0)]),_:3})]))],64))}}),fn=Y(Lr,[["__scopeId","data-v-559ed075"]]),Hr=i.defineComponent({name:"HeaderFilter",props:{header:{type:Object,required:!0}},setup(e){const o=i.useSlots(),t=i.computed(()=>e.header.column),n=i.computed(()=>t.value.columnDef.meta),r=i.ref(!1),l=i.ref(),s=i.computed({get(){return t.value.getFilterValue()},set(p){l.value=p}}),a=()=>{t.value.setFilterValue(l.value),r.value=!1},u=()=>{l.value=null,t.value.setFilterValue(l.value),r.value=!1},c=()=>i.createVNode("div",{class:"relative h-[22px] cursor-pointer"},[i.createVNode("div",{class:"absolute left-1/2 top-1/2 flex h-[30px] w-[20px] translate-x-[-50%] translate-y-[-50%] items-center justify-center hover:bg-[#0000000f] hover:text-[#00000073]"},[o.customFilterIcon?.({columnKey:t.value.id,filtered:t.value.getIsFiltered(),column:n.value})||i.createVNode(jo,{class:t.value.getIsFiltered()?"active":""},null)])]),d=()=>o.customFilterDropdown?.({confirm:a,reset:u,setFilterValue:p=>s.value=p,column:n.value,filterModelValue:s.value})||i.h("div","我是默认下拉");return()=>o?.customPopover?.({open:r.value,onOpenChange:g=>r.value=g,trigger:c,content:d})||i.h(fn,{open:r.value,onOpenChange:g=>r.value=g},{default:c,content:d})}}),Nr={class:"flex h-full w-full items-center"},Tr={class:"flex items-center gap-[16px]"},Gr={key:0},jr=i.defineComponent({name:"HeaderCell",__name:"HeaderCell",props:{header:{},table:{}},setup(e){const o=e,t=i.computed(()=>o.header.column),n=i.computed(()=>t.value.columnDef),r=i.computed(()=>n.value.meta),l=i.computed(()=>t.value.id),s=i.computed(()=>{const m=n.value.header;if(typeof m=="function"){const w=m(o.header.getContext());return typeof w=="string"?i.h("span",w):w}return i.h("span",String(m??l.value))}),a=i.computed(()=>n.value.enableSorting),u=i.computed(()=>t.value.getIsSorted()||null),c=m=>{a.value&&t.value.getToggleSortingHandler()?.(m)},d=i.computed(()=>n.value.enableColumnFilter),p=i.computed(()=>t.value.getCanResize()),g=m=>{o.header.getResizeHandler()?.(m)},f=m=>{o.header.getResizeHandler()?.(m)},v=()=>{t.value.resetSize()};return(m,w)=>(i.openBlock(),i.createElementBlock("div",Nr,[i.createElementVNode("div",{class:i.normalizeClass([[a.value?"cursor-pointer":""],"flex min-w-0 flex-1 items-center gap-[4px]"]),onClick:c},[i.createElementVNode("div",{class:i.normalizeClass(["flex min-w-0 flex-1 items-center",r.value?.columnAlign==="center"?"justify-center":r.value?.columnAlign==="right"?"justify-end":"justify-start"])},[i.renderSlot(m.$slots,"headerCell",{column:r.value,columnKey:l.value},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s.value)))],!0)],2),i.createElementVNode("div",Tr,[a.value?(i.openBlock(),i.createElementBlock("div",Gr,[i.renderSlot(m.$slots,"customSorterIcon",{sort:u.value},()=>[i.createVNode(No,{sort:u.value},null,8,["sort"])],!0)])):i.createCommentVNode("",!0),d.value?(i.openBlock(),i.createBlock(i.unref(Hr),{key:1,header:o.header},i.createSlots({_:2},[m.$slots.customFilterDropdown?{name:"customFilterDropdown",fn:i.withCtx(C=>[i.renderSlot(m.$slots,"customFilterDropdown",i.normalizeProps(i.guardReactiveProps(C)),void 0,!0)]),key:"0"}:void 0,m.$slots.customFilterIcon?{name:"customFilterIcon",fn:i.withCtx(C=>[i.renderSlot(m.$slots,"customFilterIcon",i.normalizeProps(i.guardReactiveProps(C)),void 0,!0)]),key:"1"}:void 0,m.$slots.customPopover?{name:"customPopover",fn:i.withCtx(C=>[i.renderSlot(m.$slots,"customPopover",i.normalizeProps(i.guardReactiveProps(C)),void 0,!0)]),key:"2"}:void 0]),1032,["header"])):i.createCommentVNode("",!0)])],2),p.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["resize-handle",[t.value.getIsResizing()?"isResizing":""]]),onMousedown:g,onTouchstart:f,onDblclick:i.withModifiers(v,["stop"])},[i.createElementVNode("div",{class:"resize-handle-line",style:i.normalizeStyle({transform:e.table.options.columnResizeMode==="onEnd"&&e.header.column.getIsResizing()?`translateX(${e.table.getState().columnSizingInfo.deltaOffset??0}px)`:""})},null,4)],34)):i.createCommentVNode("",!0)]))}}),Wr=Y(jr,[["__scopeId","data-v-97f68374"]]);const ie="CHECKBOX_COLUMN_KEY",we="EXPAND_COLUMN_KEY",xe="_isExpandRow",ft="_expandChildren",pn={columns:()=>[],data:()=>[],rowHeight:void 0,rowKey:void 0,loading:!1,fixedHeader:!0,enableSortingRemoval:!0,bordered:!1,rowSelectionConfig:()=>({enabled:!1,getRowCheckDisabled:()=>!1,onChange:()=>{}}),loadMoreConfig:()=>({showNoMore:!1,noMoreText:"没有更多了"}),paginationConfig:()=>({enabled:!1,placement:"right",total:0,mode:"server"}),treeConfig:()=>({enabled:!1,childrenKey:"children",indentSize:16}),enableExpandRow:!1,enableRowHover:!0,adaptiveColumnWidth:120,defaultExpandAllRows:!1,columnResizeMode:"onChange",fixedFooter:!1,themeConfig:()=>({}),defaultCheckboxColumnWidth:40,defaultExpandColumnWidth:42,customRowAttributes:()=>({}),customHeaderCellAttributes:()=>({}),customCellAttributes:()=>({}),onTableChange:()=>{},onScrollToBottom:()=>{},onExpandedRowsChange:()=>{},onColumnSizingChange:()=>{}},le={primaryColor:"#1677ff",header:{color:"rgba(0, 0, 0, 0.88)",backgroundColor:"#fafafa",borderRadius:8,splitColor:"#f0f0f0",padding:12,headerIconColor:"rgba(0, 0, 0, 0.30)"},body:{color:"rgba(0, 0, 0, 0.88)",backgroundColor:"#ffffff",padding:12},rowHoverColor:"#fafafa",border:{borderStyle:"solid",borderColor:"#f0f0f0"},zIndex:{pinnedColumn:10,fixedHeader:12,fixedFooter:12}};function qr(e){const o=i.computed(()=>({primaryColor:e?.primaryColor||le.primaryColor,header:{...le.header,...e?.header},body:{...le.body,...e?.body},rowHoverColor:e?.rowHoverColor||le.rowHoverColor,border:{...le.border,...e?.border},zIndex:{...le.zIndex,...e?.zIndex}}));return{cssVariables:i.computed(()=>{const n=o.value;return{"--v-table-primary-color":n.primaryColor,"--v-table-header-color":n.header?.color,"--v-table-header-bg":n.header?.backgroundColor,"--v-table-header-border-radius":`${n.header?.borderRadius}px`,"--v-table-header-split-color":n.header?.splitColor,"--v-table-header-padding":`${n.header?.padding}px`,"--v-table-header-icon-color":n.header?.headerIconColor,"--v-table-body-color":n.body?.color,"--v-table-body-bg":n.body?.backgroundColor,"--v-table-body-padding":`${n.body?.padding}px`,"--v-table-row-hover-color":n.rowHoverColor,"--v-table-border-style":n.border?.borderStyle,"--v-table-border-color":n.border?.borderColor,"--v-table-pinned-column":n.zIndex?.pinnedColumn,"--v-table-fixed-header":n.zIndex?.fixedHeader,"--v-table-fixed-footer":n.zIndex?.fixedFooter}}),themeConfig:o}}const Ur=["checked","disabled","indeterminate"],Kr={key:0,class:"checkbox-label"},Xr=i.defineComponent({name:"VCheckbox",__name:"VCheckbox",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},onCheckedChange:{type:Function,default:()=>{}}},setup(e){const o=e,t=i.computed(()=>({"checkbox-wrapper":!0,"checkbox-wrapper-checked":o.checked,"checkbox-wrapper-disabled":o.disabled})),n=i.computed(()=>({checkbox:!0,"checkbox-checked":o.checked&&!o.indeterminate,"checkbox-disabled":o.disabled,"checkbox-indeterminate":o.indeterminate})),r=l=>{o.disabled||o.onCheckedChange?.(l)};return(l,s)=>(i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(i.unref(t))},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(n))},[i.createElementVNode("input",{type:"checkbox",checked:e.checked,disabled:e.disabled,indeterminate:e.indeterminate,class:"checkbox-input",onChange:r},null,40,Ur),s[0]||(s[0]=i.createElementVNode("span",{class:"checkbox-inner"},null,-1))],2),l.$slots.default?(i.openBlock(),i.createElementBlock("span",Kr,[i.renderSlot(l.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)],2))}}),Dt=Y(Xr,[["__scopeId","data-v-abaaf4da"]]),Yr={class:"flex h-full items-center justify-center bg-[rgba(255,255,255,0.5)]"},Jr={class:"animate-custom-spin dot-container relative"},Qr=i.defineComponent({name:"VLoading",__name:"index",props:{size:{default:"default"}},setup(e){i.useCssVars(n=>({af8cfe6a:i.unref(t).containerSize,v42da0853:i.unref(t).dotSize}));const o=e,t=i.computed(()=>({default:{containerSize:"20px",dotSize:"9px"},small:{containerSize:"14px",dotSize:"6px"},large:{containerSize:"32px",dotSize:"14px"}})[o.size]);return(n,r)=>(i.openBlock(),i.createElementBlock("div",Yr,[i.renderSlot(n.$slots,"default",{},()=>[i.createElementVNode("div",Jr,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(4,l=>i.createElementVNode("div",{key:l,class:"dot-item animate-fade absolute origin-center scale-[0.75] rounded-full opacity-[0.3]"})),64))])],!0)]))}}),Ot=Y(Qr,[["__scopeId","data-v-d39a195f"]]),Lt=(e,o=!0)=>{if(e._loadingNode&&JSON.stringify(e._loadingOptions)===JSON.stringify(o))return;lt(e);const t=document.createElement("div");t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom=typeof o=="boolean"?"0":`${o.bottom||0}px`,t.style.zIndex="1000";const n=typeof o=="boolean"?{}:{size:o.size},r=typeof o!="boolean"?o.indicator:void 0,l=r?i.h(Ot,n,()=>r):i.h(Ot,n);i.render(l,t);const s=getComputedStyle(e).position;["relative","absolute","fixed"].includes(s)||(e.style.position="relative"),e.appendChild(t),e._loadingNode={vNode:l,element:t},e._loadingOptions=o},lt=e=>{const o=e._loadingNode;o&&(i.render(null,o.element),e.contains(o.element)&&e.removeChild(o.element),delete e._loadingNode,delete e._loadingOptions)},Ht=e=>typeof e=="boolean"?e:e.spinning,Zr={mounted(e,o){Ht(o.value)&&Lt(e,o.value)},updated(e,o){Ht(o.value)?Lt(e,o.value):lt(e)},unmounted(e){lt(e)}},ei={viewBox:"0 0 1024 1024",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ti={key:0,d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"},ni={key:1,d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"},Nt=i.defineComponent({name:"ArrowIcon",__name:"ArrowIcon",props:{direction:{}},setup(e){return(o,t)=>(i.openBlock(),i.createElementBlock("svg",ei,[e.direction==="left"?(i.openBlock(),i.createElementBlock("path",ti)):(i.openBlock(),i.createElementBlock("path",ni))]))}}),oi={class:"select-selector"},ri={class:"select-selection-item"},ii={class:"select-dropdown-inner"},li=["onClick"],si=i.defineComponent({name:"VSelect",inheritAttrs:!1,__name:"VSelect",props:{value:{default:void 0},options:{default:()=>[]},onSelectChange:{type:Function,default:()=>{}}},setup(e){const o=e,t=i.ref(!1),n=i.ref(null),r=i.ref("auto"),l=i.computed(()=>({select:!0,"select-open":t.value})),s=i.computed(()=>o.options.find(d=>d.value===o.value)?.label||""),a=c=>{t.value=c,c&&n.value&&(r.value=`${n.value.offsetWidth}px`)},u=c=>{o.onSelectChange?.(c.value),t.value=!1};return(c,d)=>(i.openBlock(),i.createBlock(fn,{open:i.unref(t),placement:"bottom",onOpenChange:a},{content:i.withCtx(()=>[i.createElementVNode("div",{class:"select-dropdown",style:i.normalizeStyle({width:i.unref(r)})},[i.createElementVNode("div",ii,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.options,p=>(i.openBlock(),i.createElementBlock("div",{key:p.value,class:i.normalizeClass(["select-item",{"select-item-selected":p.value===o.value}]),onClick:g=>u(p)},i.toDisplayString(p.label),11,li))),128))])],4)]),default:i.withCtx(()=>[i.createElementVNode("div",{ref_key:"selectRef",ref:n,class:i.normalizeClass(i.unref(l))},[i.createElementVNode("div",oi,[i.createElementVNode("span",ri,i.toDisplayString(i.unref(s)),1),d[0]||(d[0]=i.createElementVNode("span",{class:"select-arrow"},"▼",-1))])],2)]),_:1},8,["open"]))}}),ai=Y(si,[["__scopeId","data-v-615b5716"]]),ui={class:"pagination"},ci={class:"pagination-total"},di={class:"pagination-list"},gi=["onClick"],fi={class:"pagination-size-changer"},pi=i.defineComponent({name:"VPagination",__name:"VPagination",props:{pageSize:{default:10},pageIndex:{default:1},total:{default:0},onPageChange:{type:Function,default:()=>{}}},setup(e){const o=e,t=i.computed(()=>Math.ceil(o.total/o.pageSize)),n=i.computed(()=>{const a=[],u=t.value,c=o.pageIndex;if(u<=7)for(let d=1;d<=u;d++)a.push(d);else if(c<=4){for(let d=1;d<=5;d++)a.push(d);a.push("..."),a.push(u)}else if(c>=u-3){a.push(1),a.push("...");for(let d=u-4;d<=u;d++)a.push(d)}else{a.push(1),a.push("...");for(let d=c-1;d<=c+1;d++)a.push(d);a.push("..."),a.push(u)}return a}),r=()=>{o.pageIndex>1&&s(o.pageIndex-1)},l=()=>{o.pageIndex<t.value&&s(o.pageIndex+1)},s=a=>{a!==o.pageIndex&&o.onPageChange?.(a,o.pageSize)};return(a,u)=>(i.openBlock(),i.createElementBlock("div",ui,[i.createElementVNode("span",ci,"共 "+i.toDisplayString(o.total)+" 条",1),i.createElementVNode("ul",di,[i.createElementVNode("li",{class:i.normalizeClass(["pagination-item","pagination-prev",{"pagination-disabled":o.pageIndex===1}]),onClick:r},[i.createVNode(Nt,{direction:"left"})],2),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n),(c,d)=>(i.openBlock(),i.createElementBlock("li",{key:d,class:i.normalizeClass(["pagination-item",{"pagination-item-active":c===o.pageIndex,"pagination-ellipsis":c==="..."}]),onClick:p=>c!=="..."&&s(c)},i.toDisplayString(c),11,gi))),128)),i.createElementVNode("li",{class:i.normalizeClass(["pagination-item","pagination-next",{"pagination-disabled":o.pageIndex===i.unref(t)}]),onClick:l},[i.createVNode(Nt,{direction:"right"})],2)]),i.createElementVNode("div",fi,[i.createVNode(ai,{value:o.pageSize,options:[{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100}],onSelectChange:u[0]||(u[0]=c=>o.onPageChange?.(1,c))},null,8,["value"]),u[1]||(u[1]=i.createElementVNode("span",{class:"pagination-size-text"},"条/页",-1))])]))}}),mi=Y(pi,[["__scopeId","data-v-364ce69c"]]);function mn(e,o=0){return e.map(t=>({id:t.columnKey,accessorKey:t.columnKey,size:t.columnWidth?Ci(t.columnWidth,o):void 0,header:t.columnHeader,cell:t.columnCell,enableSorting:t.columnEnableSort,enableColumnFilter:t.columnEnableFilter,sortDescFirst:!0,enableResizing:t.columnEnableResize??!1,minSize:t.columnMinWidth??50,maxSize:t.columnMaxWidth,columns:mn(t.columnChildren||[],o),meta:t}))}function hi(e,o=!1){return o?e.map(t=>({...t,[ft]:[{...t,[xe]:!0}]})):e}function vi(e,o,t="children"){const n=[];function r(l){l.forEach(s=>{const a=o?typeof o=="function"?o(s):s[o]:s.id;n.push(String(a));const u=s[t];u?.length&&r(u)})}return r(e),n}function Ci(e,o){if(!e)return 0;if(typeof e=="number")return e;if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);return Math.round(o*t/100)}return typeof e=="string"&&e.endsWith("px")?Math.round(parseFloat(e)):0}const wi=["colspan"],Si={class:"v-table-body"},xi=["data-index"],yi=["colspan"],Ri={key:2,style:{borderBottom:"none"}},_i=["colspan"],Ei=["colspan"],Fi={class:"overflow-hidden"},$i=i.defineComponent({name:"VTable",__name:"index",props:i.mergeModels(i.mergeDefaults({data:{},columns:{},rowHeight:{},rowKey:{type:[String,Number,Function]},loading:{type:Boolean},fixedHeader:{type:Boolean},enableSortingRemoval:{type:Boolean},bordered:{type:Boolean},rowSelectionConfig:{},loadMoreConfig:{},paginationConfig:{},treeConfig:{},enableExpandRow:{type:Boolean},enableRowHover:{type:Boolean},adaptiveColumnWidth:{},defaultExpandAllRows:{type:Boolean},columnResizeMode:{},fixedFooter:{type:Boolean},themeConfig:{},defaultCheckboxColumnWidth:{},defaultExpandColumnWidth:{},customRowAttributes:{type:Function},customHeaderCellAttributes:{type:Function},customCellAttributes:{type:Function},onTableChange:{type:Function},onScrollToBottom:{type:Function},onExpandedRowsChange:{type:Function},onColumnSizingChange:{type:Function}},pn),{defaultFilter:{default:()=>[]},defaultFilterModifiers:{},defaultSort:{default:()=>[]},defaultSortModifiers:{},defaultPagination:{default:()=>({pageIndex:1,pageSize:20})},defaultPaginationModifiers:{},defaultExpanded:{type:[Boolean,Object],default:()=>({})},defaultExpandedModifiers:{},defaultSelection:{default:()=>({})},defaultSelectionModifiers:{},defaultColumnPinning:{default:()=>({})},defaultColumnPinningModifiers:{},defaultColumnSizing:{default:()=>({})},defaultColumnSizingModifiers:{}}),emits:["update:defaultFilter","update:defaultSort","update:defaultPagination","update:defaultExpanded","update:defaultSelection","update:defaultColumnPinning","update:defaultColumnSizing"],setup(e,{expose:o}){const t=e,n=i.useSlots(),r=i.ref(),l=i.ref(),s=i.ref(null),a=i.ref(0);let u=null;const c=()=>{s.value&&(u=new ResizeObserver(h=>{for(const F of h)a.value=F.contentRect.width}),u.observe(s.value))},d=i.computed(()=>{const h=z.getAllLeafColumns(),F=a.value||0;if(F===0)return{};const $=h.filter(J=>!J.columnDef.size),_=$.length;if(_===0)return{};const I=h.reduce((J,ue)=>ue.columnDef.size?J+Math.round(ue.getSize()):J,0),me=_*t.adaptiveColumnWidth,xn=20,Te=F-I;if(Te>=me-xn){const J=Math.floor(Te/_),ue=Te%_;return $.reduce((Ct,yn,Rn)=>(Ct[yn.id]=J+(Rn<ue?1:0),Ct),{})}return $.reduce((J,ue)=>(J[ue.id]=t.adaptiveColumnWidth,J),{})}),p=h=>{if(h.columnDef.size)return`${h.getSize()}px`;{const $=d.value[h.id];return $?`${$}px`:`${t.adaptiveColumnWidth}px`}},g=i.computed(()=>({id:ie,accessorKey:ie,size:t.defaultCheckboxColumnWidth,header:({table:h})=>{const F=h.getRowModel().rows.filter(I=>I.getCanSelect()),$=F.filter(I=>I.getIsSelected()),_={indeterminate:$.length>0&&$.length<F.length,checked:h.getIsAllRowsSelected(),onCheckedChange:I=>{h.getToggleAllRowsSelectedHandler()?.(I)},disabled:!1};return n?.customCheckbox?.(_)||i.h(Dt,_)},cell:({row:h})=>{const F={checked:h.getIsSelected(),indeterminate:!1,disabled:!h.getCanSelect(),onCheckedChange:$=>{h.getToggleSelectedHandler()?.($)}};return n?.customCheckbox?.(F)||i.h(Dt,F)}})),f={id:we,accessorKey:we,size:t.defaultExpandColumnWidth,header:()=>"",cell:({row:h})=>{const F={expand:h.getIsExpanded(),onExpandChange:h.toggleExpanded};return i.h("div",{class:"flex items-center justify-center w-full h-full"},n?.customExpandIcon?.(F)||i.h(Zt,F))}},v=i.computed(()=>V.value.map(h=>`${h.id}_${Bo(h.original)}`)),m=i.useModel(e,"defaultFilter"),w=i.useModel(e,"defaultSort"),C=i.useModel(e,"defaultPagination"),S=i.useModel(e,"defaultExpanded"),x=i.useModel(e,"defaultSelection"),E=i.useModel(e,"defaultColumnPinning"),M=i.useModel(e,"defaultColumnSizing"),P=(h,F)=>{C.value={pageIndex:h,pageSize:F},b()},b=()=>{i.nextTick(()=>{t.onTableChange?.({pagination:C.value,sortList:w.value,filterList:m.value})})},k=i.computed(()=>E.value.left?.length||E.value.right?.length),G=i.computed(()=>{const h=mn(t.columns,a.value);return t.enableExpandRow&&h.unshift(f),t.rowSelectionConfig?.enabled&&h.unshift(g.value),h}),T=i.computed(()=>hi(t.data,t.enableExpandRow)),z=ho({state:{get columnFilters(){return m.value},get sorting(){return w.value},get pagination(){return C.value},get rowSelection(){return x.value},get expanded(){return S.value},get columnPinning(){return t.treeConfig.enabled?{}:E.value},get columnSizing(){return M.value}},get data(){return T.value},get columns(){return G.value},getRowId:t.rowKey?h=>{if(h[xe])return;const F=typeof t.rowKey=="function"?t.rowKey(h):h[t.rowKey];return String(F)}:void 0,getCoreRowModel:co(),getExpandedRowModel:go(),getPaginationRowModel:t.paginationConfig?.mode==="client"?fo():void 0,enableRowSelection:h=>!t.rowSelectionConfig?.getRowCheckDisabled?.(h.original),manualSorting:!0,manualFiltering:!0,manualPagination:!(t.paginationConfig?.enabled&&t.paginationConfig?.mode==="client"),enableColumnPinning:!0,enableColumnResizing:!0,columnResizeMode:t.columnResizeMode,enableSortingRemoval:t.enableSortingRemoval,onSortingChange:h=>{w.value=typeof h=="function"?h(w.value):h,b()},onColumnFiltersChange:h=>{m.value=typeof h=="function"?h(m.value):h,b()},onPaginationChange:h=>{C.value=typeof h=="function"?h(C.value):h,b()},onExpandedChange:h=>{S.value=typeof h=="function"?h(S.value):h,i.nextTick(()=>{t.onExpandedRowsChange?.(S.value)})},onRowSelectionChange:h=>{x.value=typeof h=="function"?h(x.value):h,i.nextTick(()=>{t.rowSelectionConfig?.onChange?.(z.getSelectedRowModel().rows.map(F=>F.original))})},onColumnSizingChange:h=>{M.value=typeof h=="function"?h(M.value):h,i.nextTick(()=>{t.onColumnSizingChange?.(M.value)})},getSubRows:h=>t.enableExpandRow?h[ft]:h[t.treeConfig.childrenKey]}),_e=()=>{S.value=vi(t.data,t.rowKey,t.treeConfig?.childrenKey).reduce((h,F)=>(h[F]=!0,h),{})},Ee=i.computed(()=>{const h={pageIndex:C.value.pageIndex||1,pageSize:C.value.pageSize,total:t.paginationConfig?.mode==="client"?t.data.length:t.paginationConfig.total,onPageChange:P};return()=>n?.customPagination?.(h)||i.h(mi,h)}),V=i.computed(()=>z.getRowModel().rows),D=i.ref([]),O=i.ref(null),U=i.ref(0),L=i.computed(()=>({count:V.value.length,estimateSize:()=>t.rowHeight||48,getScrollElement:()=>s.value,overscan:10,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!0,onChange:h=>{if(h.scrollOffset&&h.scrollOffset<0)return;if(!h.isScrolling){D.value=h.getVirtualItems();return}const F=performance.now(),$=1e3/60;F-U.value>$&&(U.value=F,O.value&&cancelAnimationFrame(O.value),O.value=requestAnimationFrame(()=>{D.value=h.getVirtualItems(),O.value=null}))}})),B=Mo(L);i.watch(()=>V.value.length,()=>{B.value.measure()},{immediate:!0});function He(h,F){if(h)if(F)B.value.measureElement(h);else{if(t.rowHeight)return;B.value.measureElement(h)}}i.watchEffect(()=>{const[h]=[...D.value].reverse();!h||!B.value.isScrolling||h.index>=T.value?.length-1&&!t.loading&&t.onScrollToBottom?.()});const pt=i.computed(()=>D.value.length>0?D.value[0].start:0),mt=i.computed(()=>{if(D.value.length===0)return 0;const h=D.value[D.value.length-1];return B.value.getTotalSize()-(h.start+h.size)}),vn=i.computed(()=>T.value.length>0&&!t.loading&&t.loadMoreConfig?.showNoMore),Cn=i.computed(()=>t.loadMoreConfig?.noMoreText||"没有更多了"),{cssVariables:wn,themeConfig:Ne}=qr(t.themeConfig),Sn=(h,F,$,_)=>{if(!F)return!0;const I=t.customCellAttributes(h,F,$,_)||{};return!(I.colspan===0||I.rowspan===0)},ht=h=>{const F=h.columnDef.meta,$=h.getIsPinned(),_={textAlign:F?.columnAlign||"left"};return $&&(_.position="sticky",$==="left"?_.left=`${h.getStart("left")}px`:_.right=`${h.getAfter("right")}px`,_.zIndex=Ne.value.zIndex?.pinnedColumn),_},vt=h=>{const F=h.getIsPinned();return F?F==="left"&&h.getIsLastColumn("left")?"pinned-left-shadow":F==="right"&&h.getIsFirstColumn("right")?"pinned-right-shadow":"":""};return i.onMounted(()=>{c(),t.defaultExpandAllRows&&_e()}),i.onBeforeUnmount(()=>{O.value&&(cancelAnimationFrame(O.value),O.value=null),u&&(u.disconnect(),u=null)}),o({tanstackTable:z,scrollToIndex:async(h,F="smooth")=>{i.nextTick(()=>{B.value.scrollToIndex(h,{align:"start",behavior:F})})}}),(h,F)=>i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:"v-table-wrapper",style:i.normalizeStyle(i.unref(wn))},[i.createElementVNode("div",{ref_key:"tableContainerRef",ref:s,class:i.normalizeClass(["min-h-0 flex-1",{"overflow-y-auto":t.fixedHeader}])},[i.createElementVNode("table",{class:i.normalizeClass(["v-table",{"v-table-bordered":t.bordered}])},[i.createElementVNode("colgroup",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(z).getAllLeafColumns(),$=>(i.openBlock(),i.createElementBlock("col",{key:$.id,style:i.normalizeStyle({width:p($)})},null,4))),128))]),i.createElementVNode("thead",{ref_key:"tableHeaderRef",ref:r,class:i.normalizeClass(["v-table-header",{sticky:t.fixedHeader}]),style:i.normalizeStyle({top:0,zIndex:i.unref(Ne).zIndex?.fixedHeader})},[i.renderSlot(h.$slots,"customHeader",{columns:e.columns,table:i.unref(z)},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(z).getHeaderGroups(),$=>(i.openBlock(),i.createElementBlock("tr",{key:$.id},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList($.headers,_=>(i.openBlock(),i.createElementBlock("th",i.mergeProps({key:_.id,colspan:_.colSpan,class:["relative",[_.column.id===i.unref(ie)?"checkbox-col":"",_.column.id===i.unref(we)?"expand-col":"",vt(_.column)]],style:ht(_.column)},{ref_for:!0},t?.customHeaderCellAttributes?.(_.column.columnDef?.meta,_.column.getIndex())),[_.isPlaceholder?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[_.id===i.unref(ie)?(i.openBlock(),i.createBlock(i.unref(xt),{key:0,render:_.column.columnDef.header,props:_.getContext()},null,8,["render","props"])):(i.openBlock(),i.createBlock(Wr,{key:1,header:_,table:i.unref(z)},i.createSlots({_:2},[n.headerCell?{name:"headerCell",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"headerCell",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"0"}:void 0,n.customFilterDropdown?{name:"customFilterDropdown",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customFilterDropdown",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"1"}:void 0,n.customFilterIcon?{name:"customFilterIcon",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customFilterIcon",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"2"}:void 0,n.customPopover?{name:"customPopover",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customPopover",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"3"}:void 0,n.customSorterIcon?{name:"customSorterIcon",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customSorterIcon",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"4"}:void 0]),1032,["header","table"]))],64))],16,wi))),128))]))),128))],!0)],6),i.createElementVNode("tbody",Si,[i.unref(pt)>0?(i.openBlock(),i.createElementBlock("tr",{key:0,style:i.normalizeStyle({height:`${i.unref(pt)}px`})},null,4)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(D),$=>(i.openBlock(),i.createElementBlock("tr",i.mergeProps({key:i.unref(v)[$.index],ref_for:!0,ref:_=>He(_,i.unref(V)[$.index]?.original?.[i.unref(xe)]),"data-index":$.index,style:{minHeight:`${$.size}px`},class:{"v-table-row-hover":t.enableRowHover}},{ref_for:!0},t?.customRowAttributes?.(i.unref(V)[$.index].original,$.index)),[i.unref(V)[$.index].original?.[i.unref(xe)]?(i.openBlock(),i.createElementBlock("td",{key:1,class:"!p-0",colspan:i.unref(z).getAllLeafColumns().length},[i.createElementVNode("div",{class:"overflow-hidden",style:i.normalizeStyle({position:i.unref(k)?"sticky":"static",left:0,width:i.unref(k)?`${i.unref(a)}px`:"auto"})},[i.renderSlot(h.$slots,"expandedRowRender",{row:i.unref(V)[$.index].original},void 0,!0)],4)],8,yi)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(i.unref(V)[$.index].getVisibleCells(),(_,I)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:_.id},[Sn(i.unref(V)[$.index].original,_.column.columnDef?.meta,$.index,I)?(i.openBlock(),i.createElementBlock("td",i.mergeProps({key:0,style:ht(_.column),class:[_.column.id===i.unref(ie)?"checkbox-col":"",_.column.id===i.unref(we)?"expand-col":"",vt(_.column)]},{ref_for:!0},t.customCellAttributes?.(i.unref(V)[$.index].original,_.column.columnDef?.meta,$.index,I)??{}),[_.column.id===i.unref(ie)?(i.openBlock(),i.createBlock(i.unref(xt),{key:0,render:_.column.columnDef.cell,props:_.getContext()},null,8,["render","props"])):(i.openBlock(),i.createBlock(Oo,{key:1,cell:_,"tree-config":t.treeConfig,columns:t.columns,row:i.unref(V)[$.index]},{bodyCell:i.withCtx(me=>[i.renderSlot(h.$slots,"bodyCell",i.mergeProps({ref_for:!0},me),void 0,!0)]),customExpandIcon:i.withCtx(me=>[i.renderSlot(h.$slots,"customExpandIcon",i.mergeProps({ref_for:!0},me),void 0,!0)]),_:3},8,["cell","tree-config","columns","row"]))],16)):i.createCommentVNode("",!0)],64))),128))],16,xi))),128)),i.unref(mt)>0?(i.openBlock(),i.createElementBlock("tr",{key:1,style:i.normalizeStyle({height:`${i.unref(mt)}px`,border:"none"})},null,4)):i.createCommentVNode("",!0),i.unref(vn)?(i.openBlock(),i.createElementBlock("tr",Ri,[i.createElementVNode("td",{colspan:i.unref(z).getAllLeafColumns().length,class:"!border-b-0 p-[12px] text-center text-[14px] text-[rgba(0,0,0,0.32)]"},[i.renderSlot(h.$slots,"customLoadNoMore",{},()=>[i.createTextVNode(i.toDisplayString(i.unref(Cn)),1)],!0)],8,_i)])):i.createCommentVNode("",!0)]),i.createElementVNode("tfoot",{class:i.normalizeClass({sticky:t.fixedFooter}),style:i.normalizeStyle({bottom:0,zIndex:i.unref(Ne).zIndex?.fixedFooter})},[i.createElementVNode("tr",null,[i.createElementVNode("td",{class:"!p-0",colspan:i.unref(z).getAllLeafColumns().length},[i.createElementVNode("div",Fi,[i.renderSlot(h.$slots,"customFooter",{},void 0,!0)])],8,Ei)])],6)],2),!i.unref(D).length&&!t.loading?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle({height:`calc(100% - ${i.unref(r)?.offsetHeight??0}px)`}),class:"flex items-center justify-center"},[i.renderSlot(h.$slots,"customEmpty",{},()=>[F[0]||(F[0]=i.createTextVNode(" 当前内容为空 ",-1))],!0)],4)):i.createCommentVNode("",!0)],2),t.paginationConfig.enabled?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"paginationRef",ref:l,class:i.normalizeClass([[t.paginationConfig.placement==="left"?"justify-start":t.paginationConfig.placement==="center"?"justify-center":"justify-end"],"flex items-center py-[16px]"])},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(Ee))))],2)):i.createCommentVNode("",!0)],4)),[[i.unref(Zr),{spinning:t.loading,indicator:n?.customLoadingIcon?.(),bottom:i.unref(l)?.offsetHeight}]])}}),hn=Y($i,[["__scopeId","data-v-3a9bb56a"]]);exports.CHECKBOX_COLUMN_KEY=ie;exports.EXPAND_COLUMN_KEY=we;exports.EXPAND_ROW_DATA_INDEX=ft;exports.EXPAND_ROW_KEY=xe;exports.VTable=hn;exports.default=hn;exports.defaultThemeConfig=le;exports.vTableDefaultProps=pn;
|
|
7
|
+
color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,t?.key)}return t?.onChange&&!(l&&t.skipInitialOnChange)&&t.onChange(r),l=!1,r}return s.updateDeps=a=>{n=a},s}function Rt(e,o){if(e===void 0)throw new Error("Unexpected undefined");return e}const vo=(e,o)=>Math.abs(e-o)<1.01,Co=(e,o,t)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>o.apply(this,r),t)}},_t=e=>{const{offsetWidth:o,offsetHeight:t}=e;return{width:o,height:t}},wo=e=>e,So=e=>{const o=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=o;r<=t;r++)n.push(r);return n},xo=(e,o)=>{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;const r=s=>{const{width:a,height:u}=s;o({width:Math.round(a),height:Math.round(u)})};if(r(_t(t)),!n.ResizeObserver)return()=>{};const l=new n.ResizeObserver(s=>{const a=()=>{const u=s[0];if(u?.borderBoxSize){const c=u.borderBoxSize[0];if(c){r({width:c.inlineSize,height:c.blockSize});return}}r(_t(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return l.observe(t,{box:"border-box"}),()=>{l.unobserve(t)}},Et={passive:!0},Ft=typeof window>"u"?!0:"onscrollend"in window,yo=(e,o)=>{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;let r=0;const l=e.options.useScrollendEvent&&Ft?()=>{}:Co(n,()=>{o(r,!1)},e.options.isScrollingResetDelay),s=d=>()=>{const{horizontal:p,isRtl:g}=e.options;r=p?t.scrollLeft*(g&&-1||1):t.scrollTop,l(),o(r,d)},a=s(!0),u=s(!1);t.addEventListener("scroll",a,Et);const c=e.options.useScrollendEvent&&Ft;return c&&t.addEventListener("scrollend",u,Et),()=>{t.removeEventListener("scroll",a),c&&t.removeEventListener("scrollend",u)}},Ro=(e,o,t)=>{if(o?.borderBoxSize){const n=o.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},_o=(e,{adjustments:o=0,behavior:t},n)=>{var r,l;const s=e+o;(l=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||l.call(r,{[n.options.horizontal?"left":"top"]:s,behavior:t})};class Eo{constructor(o){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(r=>{r.forEach(l=>{const s=()=>{this._measureElement(l.target,l)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),t=null},observe:r=>{var l;return(l=n())==null?void 0:l.observe(r,{box:"border-box"})},unobserve:r=>{var l;return(l=n())==null?void 0:l.unobserve(r)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([n,r])=>{typeof r>"u"&&delete t[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wo,rangeExtractor:So,onChange:()=>{},measureElement:Ro,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...t}},this.notify=t=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,t)},this.maybeNotify=ce(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,l)=>{this.scrollAdjustments=0,this.scrollDirection=l?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=l,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,n)=>{const r=new Map,l=new Map;for(let s=n-1;s>=0;s--){const a=t[s];if(r.has(a.lane))continue;const u=l.get(a.lane);if(u==null||a.end>u.end?l.set(a.lane,a):a.end<u.end&&r.set(a.lane,!0),r.size===this.options.lanes)break}return l.size===this.options.lanes?Array.from(l.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=ce(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(t,n,r,l,s,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:n,scrollMargin:r,getItemKey:l,enabled:s,lanes:a}),{key:!1}),this.getMeasurements=ce(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:n,scrollMargin:r,getItemKey:l,enabled:s,lanes:a},u)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const g of this.laneAssignments.keys())g>=t&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,c),p=new Array(a).fill(void 0);for(let g=0;g<c;g++){const f=d[g];f&&(p[f.lane]=g)}for(let g=c;g<t;g++){const f=l(g),v=this.laneAssignments.get(g);let m,w;if(v!==void 0&&this.options.lanes>1){m=v;const E=p[m],M=E!==void 0?d[E]:void 0;w=M?M.end+this.options.gap:n+r}else{const E=this.options.lanes===1?d[g-1]:this.getFurthestMeasurement(d,g);w=E?E.end+this.options.gap:n+r,m=E?E.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,m)}const C=u.get(f),S=typeof C=="number"?C:this.options.estimateSize(g),x=w+S;d[g]={index:g,start:w,size:S,end:x,key:f,lane:m},p[m]=g}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ce(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,n,r,l)=>this.range=t.length>0&&n>0?Fo({measurements:t,outerSize:n,scrollOffset:r,lanes:l}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=ce(()=>{let t=null,n=null;const r=this.calculateRange();return r&&(t=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,n]},(t,n,r,l,s)=>l===null||s===null?[]:t({startIndex:l,endIndex:s,overscan:n,count:r}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,r=t.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(t,n)=>{const r=this.indexFromElement(t),l=this.measurementsCache[r];if(!l)return;const s=l.key,a=this.elementsCache.get(s);a!==t&&(a&&this.observer.unobserve(a),this.observer.observe(t),this.elementsCache.set(s,t)),t.isConnected&&this.resizeItem(r,this.options.measureElement(t,n,this))},this.resizeItem=(t,n)=>{const r=this.measurementsCache[t];if(!r)return;const l=this.itemSizeCache.get(r.key)??r.size,s=n-l;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,s,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(t,void 0)},this.getVirtualItems=ce(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,n)=>{const r=[];for(let l=0,s=t.length;l<s;l++){const a=t[l],u=n[a];r.push(u)}return r},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length!==0)return Rt(n[Qt(0,n.length-1,r=>Rt(n[r]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(t,n,r=0)=>{if(!this.scrollElement)return 0;const l=this.getSize(),s=this.getScrollOffset();n==="auto"&&(n=t>=s+l?"end":"start"),n==="center"?t+=(r-l)/2:n==="end"&&(t-=l);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const r=this.measurementsCache[t];if(!r)return;const l=this.getSize(),s=this.getScrollOffset();if(n==="auto")if(r.end>=s+l-this.options.scrollPaddingEnd)n="end";else if(r.start<=s+this.options.scrollPaddingStart)n="start";else return[s,n];if(n==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),n];const a=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(t,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(t,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t=Math.max(0,Math.min(t,this.options.count-1)),this.currentScrollToIndex=t;let l=0;const s=10,a=c=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(t,c);if(!d){console.warn("Failed to get offset for index:",t);return}const[p,g]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{if(!this.targetWindow)return;const f=()=>{if(this.currentScrollToIndex!==t)return;const v=this.getScrollOffset(),m=this.getOffsetForIndex(t,g);if(!m){console.warn("Failed to get offset for index:",t);return}vo(m[0],v)||u(g)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(f):f()})},u=c=>{this.targetWindow&&this.currentScrollToIndex===t&&(l++,l<s?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",l,s),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${t} after ${s} attempts.`))};a(n)},this.scrollBy=(t,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((t=n[n.length-1])==null?void 0:t.end)??0;else{const l=Array(this.options.lanes).fill(null);let s=n.length-1;for(;s>=0&&l.some(a=>a===null);){const a=n[s];l[a.lane]===null&&(l[a.lane]=a.end),s--}r=Math.max(...l.filter(a=>a!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:n,behavior:r})=>{this.options.scrollToFn(t,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(o)}}const Qt=(e,o,t,n)=>{for(;e<=o;){const r=(e+o)/2|0,l=t(r);if(l<n)e=r+1;else if(l>n)o=r-1;else return r}return e>0?e-1:0};function Fo({measurements:e,outerSize:o,scrollOffset:t,lanes:n}){const r=e.length-1,l=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let s=Qt(0,r,l,t),a=s;if(n===1)for(;a<r&&e[a].end<t+o;)a++;else if(n>1){const u=Array(n).fill(0);for(;a<r&&u.some(d=>d<t+o);){const d=e[a];u[d.lane]=d.end,a++}const c=Array(n).fill(t+o);for(;s>=0&&c.some(d=>d>=t);){const d=e[s];c[d.lane]=d.start,s--}s=Math.max(0,s-s%n),a=Math.min(r,a+(n-1-a%n))}return{startIndex:s,endIndex:a}}function $o(e){const o=new Eo(i.unref(e)),t=i.shallowRef(o),n=o._didMount();return i.watch(()=>i.unref(e).getScrollElement(),r=>{r&&o._willUpdate()},{immediate:!0}),i.watch(()=>i.unref(e),r=>{o.setOptions({...r,onChange:(l,s)=>{var a;i.triggerRef(t),(a=r.onChange)==null||a.call(r,l,s)}}),o._willUpdate(),i.triggerRef(t)},{immediate:!0}),i.onScopeDispose(n),t}function Mo(e){return $o(i.computed(()=>({observeElementRect:xo,observeElementOffset:yo,scrollToFn:_o,...i.unref(e)})))}function bo(e){return typeof e=="string"?`'${e}'`:new Io().serialize(e)}const Io=(function(){class e{#e=new Map;compare(t,n){const r=typeof t,l=typeof n;return r==="string"&&l==="string"?t.localeCompare(n):r==="number"&&l==="number"?t-n:String.prototype.localeCompare.call(this.serialize(t,!0),this.serialize(n,!0))}serialize(t,n){if(t===null)return"null";switch(typeof t){case"string":return n?t:`'${t}'`;case"bigint":return`${t}n`;case"object":return this.$object(t);case"function":return this.$function(t)}return String(t)}serializeObject(t){const n=Object.prototype.toString.call(t);if(n!=="[object Object]")return this.serializeBuiltInType(n.length<10?`unknown:${n}`:n.slice(8,-1),t);const r=t.constructor,l=r===Object||r===void 0?"":r.name;if(l!==""&&globalThis[l]===r)return this.serializeBuiltInType(l,t);if(typeof t.toJSON=="function"){const s=t.toJSON();return l+(s!==null&&typeof s=="object"?this.$object(s):`(${this.serialize(s)})`)}return this.serializeObjectEntries(l,Object.entries(t))}serializeBuiltInType(t,n){const r=this["$"+t];if(r)return r.call(this,n);if(typeof n?.entries=="function")return this.serializeObjectEntries(t,n.entries());throw new Error(`Cannot serialize ${t}`)}serializeObjectEntries(t,n){const r=Array.from(n).sort((s,a)=>this.compare(s[0],a[0]));let l=`${t}{`;for(let s=0;s<r.length;s++){const[a,u]=r[s];l+=`${this.serialize(a,!0)}:${this.serialize(u)}`,s<r.length-1&&(l+=",")}return l+"}"}$object(t){let n=this.#e.get(t);return n===void 0&&(this.#e.set(t,`#${this.#e.size}`),n=this.serializeObject(t),this.#e.set(t,n)),n}$function(t){const n=Function.prototype.toString.call(t);return n.slice(-15)==="[native code] }"?`${t.name||""}()[native]`:`${t.name}(${t.length})${n.replace(/\s*\n\s*/g,"")}`}$Array(t){let n="[";for(let r=0;r<t.length;r++)n+=this.serialize(t[r]),r<t.length-1&&(n+=",");return n+"]"}$Date(t){try{return`Date(${t.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(t){return`ArrayBuffer[${new Uint8Array(t).join(",")}]`}$Set(t){return`Set${this.$Array(Array.from(t).sort((n,r)=>this.compare(n,r)))}`}$Map(t){return this.serializeObjectEntries("Map",t.entries())}}for(const o of["Error","RegExp","URL"])e.prototype["$"+o]=function(t){return`${o}(${t})`};for(const o of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+o]=function(t){return`${o}[${t.join(",")}]`};for(const o of["BigInt64Array","BigUint64Array"])e.prototype["$"+o]=function(t){return`${o}[${t.join("n,")}${t.length>0?"n":""}]`};return e})(),Po=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Vo=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],ko="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",re=[];class zo{_data=new de;_hash=new de([...Po]);_nDataBytes=0;_minBufferSize=0;finalize(o){o&&this._append(o);const t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(o,t){const n=this._hash.words;let r=n[0],l=n[1],s=n[2],a=n[3],u=n[4],c=n[5],d=n[6],p=n[7];for(let g=0;g<64;g++){if(g<16)re[g]=o[t+g]|0;else{const x=re[g-15],E=(x<<25|x>>>7)^(x<<14|x>>>18)^x>>>3,M=re[g-2],P=(M<<15|M>>>17)^(M<<13|M>>>19)^M>>>10;re[g]=E+re[g-7]+P+re[g-16]}const f=u&c^~u&d,v=r&l^r&s^l&s,m=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),C=p+w+f+Vo[g]+re[g],S=m+v;p=d,d=c,c=u,u=a+C|0,a=s,s=l,l=r,r=C+S|0}n[0]=n[0]+r|0,n[1]=n[1]+l|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+d|0,n[7]=n[7]+p|0}_append(o){typeof o=="string"&&(o=de.fromUtf8(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes}_process(o){let t,n=this._data.sigBytes/64;o?n=Math.ceil(n):n=Math.max((n|0)-this._minBufferSize,0);const r=n*16,l=Math.min(r*4,this._data.sigBytes);if(r){for(let s=0;s<r;s+=16)this._doProcessBlock(this._data.words,s);t=this._data.words.splice(0,r),this._data.sigBytes-=l}return new de(t,l)}}class de{words;sigBytes;constructor(o,t){o=this.words=o||[],this.sigBytes=t===void 0?o.length*4:t}static fromUtf8(o){const t=unescape(encodeURIComponent(o)),n=t.length,r=[];for(let l=0;l<n;l++)r[l>>>2]|=(t.charCodeAt(l)&255)<<24-l%4*8;return new de(r,n)}toBase64(){const o=[];for(let t=0;t<this.sigBytes;t+=3){const n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,l=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,s=n<<16|r<<8|l;for(let a=0;a<4&&t*8+a*6<this.sigBytes*8;a++)o.push(ko.charAt(s>>>6*(3-a)&63))}return o.join("")}concat(o){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<o.sigBytes;t++){const n=o.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<o.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=o.words[t>>>2];this.sigBytes+=o.sigBytes}}function Ao(e){return new zo().finalize(e).toBase64()}function Bo(e){return Ao(bo(e))}const Do=i.defineComponent({name:"ExpandIcon",__name:"ExpandIcon",props:{expand:{type:Boolean},onExpandChange:{type:Function}},setup(e){const o=e,t=i.computed(()=>({"row-expand-icon":!0,"row-expand-icon-expanded":o.expand,"row-expand-icon-collapsed":!o.expand})),n=r=>{r.stopPropagation(),o.onExpandChange&&o.onExpandChange?.()};return(r,l)=>(i.openBlock(),i.createElementBlock("button",{type:"button",class:i.normalizeClass(i.unref(t)),onClick:n},null,2))}}),Y=(e,o)=>{const t=e.__vccOpts||e;for(const[n,r]of o)t[n]=r;return t},Zt=Y(Do,[["__scopeId","data-v-892b1db0"]]),Oo=i.defineComponent({name:"BodyCell",__name:"BodyCell",props:{cell:{},treeConfig:{},columns:{},row:{}},setup(e){const o=e,t=i.computed(()=>{const r=o.cell.column.columnDef.cell;if(typeof r=="function"){const l=r(o.cell.getContext());return typeof l=="string"?i.h("span",l):l}return i.h("span",o.cell.getValue()??"")}),n=i.computed(()=>({row:o.cell.row.original,column:o.cell.column.columnDef.meta,columnKey:o.cell.column.id,rowIndex:o.cell.row.index}));return(r,l)=>o.treeConfig?.enabled&&o.cell.column.id===o.columns[0]?.columnKey?(i.openBlock(),i.createElementBlock("div",{key:0,class:"flex h-full items-center gap-[8px]",style:i.normalizeStyle({paddingLeft:`${o.row.depth*(o.treeConfig?.indentSize??16)}px`})},[i.createElementVNode("div",{class:i.normalizeClass(["flex-shrink-0",[o.row.getCanExpand()?"visible":"invisible"]])},[i.renderSlot(r.$slots,"customExpandIcon",{expand:o.row.getIsExpanded(),onExpandChange:o.row.toggleExpanded},()=>[i.createVNode(Zt,{expand:o.row.getIsExpanded(),onExpandChange:o.row.toggleExpanded},null,8,["expand","onExpandChange"])])],2),i.renderSlot(r.$slots,"bodyCell",i.normalizeProps(i.guardReactiveProps(n.value)),()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.value)))])],4)):i.renderSlot(r.$slots,"bodyCell",i.normalizeProps(i.mergeProps({key:1},n.value)),()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.value)))])}}),Lo={class:"sorter-icon inline-flex flex-col items-center"},Ho=i.defineComponent({name:"SorterIcon",__name:"SorterIcon",props:{sort:{}},setup(e){return(o,t)=>(i.openBlock(),i.createElementBlock("div",Lo,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["sorter-up h-[10px] w-[10px]",{active:e.sort==="asc"}]),viewBox:"0 0 1024 1024",version:"1.1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[...t[0]||(t[0]=[i.createElementVNode("path",{d:"M76.3 632.8l405.1-489.1c16.9-18.9 46.5-18.9 63.4 0l403.1 489.1c24.4 27.4 5 70.8-31.7 70.8H107.9c-36.6 0-56.1-43.4-31.6-70.8z"},null,-1)])],2)),(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["sorter-down h-[10px] w-[10px]",{active:e.sort==="desc"}]),viewBox:"0 0 1024 1024",version:"1.1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[...t[1]||(t[1]=[i.createElementVNode("path",{d:"M76.3 392.3l403.1 489.1c16.9 18.9 46.5 18.9 63.4 0l405.1-489.1c24.4-27.4 5-70.8-31.7-70.8H108.1c-36.8 0-56.3 43.4-31.8 70.8z"},null,-1)])],2))]))}}),No=Y(Ho,[["__scopeId","data-v-5f94f1f7"]]),To={class:"filter-icon h-[12px] w-[12px]",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},Go=i.defineComponent({name:"FilterIcon",__name:"FilterIcon",setup(e){return(o,t)=>(i.openBlock(),i.createElementBlock("svg",To,[...t[0]||(t[0]=[i.createElementVNode("path",{d:"M325.714286 884.571429c0 20.228571 16.228571 36.571429 36.342857 36.571428h299.885714c20.114286 0 36.342857-16.342857 36.342857-36.571428V660.571429H325.714286v224z m606.971428-781.714286H91.314286c-28 0-45.485714 30.514286-31.428572 54.857143l252.914286 429.714285h398.628571l252.914286-429.714285c13.828571-24.342857-3.657143-54.857143-31.657143-54.857143z"},null,-1)])]))}}),jo=Y(Go,[["__scopeId","data-v-2e964860"]]),ot=Math.min,ge=Math.max,Ie=Math.round,K=e=>({x:e,y:e}),Wo={left:"right",right:"left",bottom:"top",top:"bottom"},qo={start:"end",end:"start"};function $t(e,o,t){return ge(e,ot(o,t))}function ze(e,o){return typeof e=="function"?e(o):e}function se(e){return e.split("-")[0]}function Ae(e){return e.split("-")[1]}function en(e){return e==="x"?"y":"x"}function tn(e){return e==="y"?"height":"width"}const Uo=new Set(["top","bottom"]);function te(e){return Uo.has(se(e))?"y":"x"}function nn(e){return en(te(e))}function Ko(e,o,t){t===void 0&&(t=!1);const n=Ae(e),r=nn(e),l=tn(r);let s=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return o.reference[l]>o.floating[l]&&(s=Pe(s)),[s,Pe(s)]}function Xo(e){const o=Pe(e);return[rt(e),o,rt(o)]}function rt(e){return e.replace(/start|end/g,o=>qo[o])}const Mt=["left","right"],bt=["right","left"],Yo=["top","bottom"],Jo=["bottom","top"];function Qo(e,o,t){switch(e){case"top":case"bottom":return t?o?bt:Mt:o?Mt:bt;case"left":case"right":return o?Yo:Jo;default:return[]}}function Zo(e,o,t,n){const r=Ae(e);let l=Qo(se(e),t==="start",n);return r&&(l=l.map(s=>s+"-"+r),o&&(l=l.concat(l.map(rt)))),l}function Pe(e){return e.replace(/left|right|bottom|top/g,o=>Wo[o])}function er(e){return{top:0,right:0,bottom:0,left:0,...e}}function tr(e){return typeof e!="number"?er(e):{top:e,right:e,bottom:e,left:e}}function Ve(e){const{x:o,y:t,width:n,height:r}=e;return{width:n,height:r,top:t,left:o,right:o+n,bottom:t+r,x:o,y:t}}function It(e,o,t){let{reference:n,floating:r}=e;const l=te(o),s=nn(o),a=tn(s),u=se(o),c=l==="y",d=n.x+n.width/2-r.width/2,p=n.y+n.height/2-r.height/2,g=n[a]/2-r[a]/2;let f;switch(u){case"top":f={x:d,y:n.y-r.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:p};break;case"left":f={x:n.x-r.width,y:p};break;default:f={x:n.x,y:n.y}}switch(Ae(o)){case"start":f[s]-=g*(t&&c?-1:1);break;case"end":f[s]+=g*(t&&c?-1:1);break}return f}async function nr(e,o){var t;o===void 0&&(o={});const{x:n,y:r,platform:l,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:g=!1,padding:f=0}=ze(o,e),v=tr(f),w=a[g?p==="floating"?"reference":"floating":p],C=Ve(await l.getClippingRect({element:(t=await(l.isElement==null?void 0:l.isElement(w)))==null||t?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),S=p==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),E=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},M=Ve(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:x,strategy:u}):S);return{top:(C.top-M.top+v.top)/E.y,bottom:(M.bottom-C.bottom+v.bottom)/E.y,left:(C.left-M.left+v.left)/E.x,right:(M.right-C.right+v.right)/E.x}}const or=async(e,o,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:l=[],platform:s}=t,a=l.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(o));let c=await s.getElementRects({reference:e,floating:o,strategy:r}),{x:d,y:p}=It(c,n,u),g=n,f={},v=0;for(let w=0;w<a.length;w++){var m;const{name:C,fn:S}=a[w],{x,y:E,data:M,reset:P}=await S({x:d,y:p,initialPlacement:n,placement:g,strategy:r,middlewareData:f,rects:c,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:nr},elements:{reference:e,floating:o}});d=x??d,p=E??p,f={...f,[C]:{...f[C],...M}},P&&v<=50&&(v++,typeof P=="object"&&(P.placement&&(g=P.placement),P.rects&&(c=P.rects===!0?await s.getElementRects({reference:e,floating:o,strategy:r}):P.rects),{x:d,y:p}=It(c,g,u)),w=-1)}return{x:d,y:p,placement:g,strategy:r,middlewareData:f}},rr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var t,n;const{placement:r,middlewareData:l,rects:s,initialPlacement:a,platform:u,elements:c}=o,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...w}=ze(e,o);if((t=l.arrow)!=null&&t.alignmentOffset)return{};const C=se(r),S=te(a),x=se(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(c.floating)),M=g||(x||!m?[Pe(a)]:Xo(a)),P=v!=="none";!g&&P&&M.push(...Zo(a,m,v,E));const b=[a,...M],k=await u.detectOverflow(o,w),G=[];let T=((n=l.flip)==null?void 0:n.overflows)||[];if(d&&G.push(k[C]),p){const V=Ko(r,s,E);G.push(k[V[0]],k[V[1]])}if(T=[...T,{placement:r,overflows:G}],!G.every(V=>V<=0)){var z,_e;const V=(((z=l.flip)==null?void 0:z.index)||0)+1,D=b[V];if(D&&(!(p==="alignment"?S!==te(D):!1)||T.every(L=>te(L.placement)===S?L.overflows[0]>0:!0)))return{data:{index:V,overflows:T},reset:{placement:D}};let O=(_e=T.filter(U=>U.overflows[0]<=0).sort((U,L)=>U.overflows[1]-L.overflows[1])[0])==null?void 0:_e.placement;if(!O)switch(f){case"bestFit":{var Ee;const U=(Ee=T.filter(L=>{if(P){const B=te(L.placement);return B===S||B==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(B=>B>0).reduce((B,He)=>B+He,0)]).sort((L,B)=>L[1]-B[1])[0])==null?void 0:Ee[0];U&&(O=U);break}case"initialPlacement":O=a;break}if(r!==O)return{reset:{placement:O}}}return{}}}},ir=new Set(["left","top"]);async function lr(e,o){const{placement:t,platform:n,elements:r}=e,l=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=se(t),a=Ae(t),u=te(t)==="y",c=ir.has(s)?-1:1,d=l&&u?-1:1,p=ze(o,e);let{mainAxis:g,crossAxis:f,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof v=="number"&&(f=a==="end"?v*-1:v),u?{x:f*d,y:g*c}:{x:g*c,y:f*d}}const sr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var t,n;const{x:r,y:l,placement:s,middlewareData:a}=o,u=await lr(o,e);return s===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+u.x,y:l+u.y,data:{...u,placement:s}}}}},ar=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:t,y:n,placement:r,platform:l}=o,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:C=>{let{x:S,y:x}=C;return{x:S,y:x}}},...c}=ze(e,o),d={x:t,y:n},p=await l.detectOverflow(o,c),g=te(se(r)),f=en(g);let v=d[f],m=d[g];if(s){const C=f==="y"?"top":"left",S=f==="y"?"bottom":"right",x=v+p[C],E=v-p[S];v=$t(x,v,E)}if(a){const C=g==="y"?"top":"left",S=g==="y"?"bottom":"right",x=m+p[C],E=m-p[S];m=$t(x,m,E)}const w=u.fn({...o,[f]:v,[g]:m});return{...w,data:{x:w.x-t,y:w.y-n,enabled:{[f]:s,[g]:a}}}}}};function Be(){return typeof window<"u"}function ae(e){return ct(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function Z(e){var o;return(o=(ct(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function ct(e){return Be()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return Be()?e instanceof Element||e instanceof H(e).Element:!1}function X(e){return Be()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function Pt(e){return!Be()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}const ur=new Set(["inline","contents"]);function Re(e){const{overflow:o,overflowX:t,overflowY:n,display:r}=q(e);return/auto|scroll|overlay|hidden|clip/.test(o+n+t)&&!ur.has(r)}const cr=new Set(["table","td","th"]);function dr(e){return cr.has(ae(e))}const gr=[":popover-open",":modal"];function De(e){return gr.some(o=>{try{return e.matches(o)}catch{return!1}})}const fr=["transform","translate","scale","rotate","perspective"],pr=["transform","translate","scale","rotate","perspective","filter"],mr=["paint","layout","strict","content"];function dt(e){const o=gt(),t=W(e)?q(e):e;return fr.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!o&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!o&&(t.filter?t.filter!=="none":!1)||pr.some(n=>(t.willChange||"").includes(n))||mr.some(n=>(t.contain||"").includes(n))}function hr(e){let o=oe(e);for(;X(o)&&!pe(o);){if(dt(o))return o;if(De(o))return null;o=oe(o)}return null}function gt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vr=new Set(["html","body","#document"]);function pe(e){return vr.has(ae(e))}function q(e){return H(e).getComputedStyle(e)}function Oe(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oe(e){if(ae(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Pt(e)&&e.host||Z(e);return Pt(o)?o.host:o}function on(e){const o=oe(e);return pe(o)?e.ownerDocument?e.ownerDocument.body:e.body:X(o)&&Re(o)?o:on(o)}function rn(e,o,t){var n;o===void 0&&(o=[]);const r=on(e),l=r===((n=e.ownerDocument)==null?void 0:n.body),s=H(r);return l?(it(s),o.concat(s,s.visualViewport||[],Re(r)?r:[],[])):o.concat(r,rn(r,[]))}function it(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ln(e){const o=q(e);let t=parseFloat(o.width)||0,n=parseFloat(o.height)||0;const r=X(e),l=r?e.offsetWidth:t,s=r?e.offsetHeight:n,a=Ie(t)!==l||Ie(n)!==s;return a&&(t=l,n=s),{width:t,height:n,$:a}}function sn(e){return W(e)?e:e.contextElement}function fe(e){const o=sn(e);if(!X(o))return K(1);const t=o.getBoundingClientRect(),{width:n,height:r,$:l}=ln(o);let s=(l?Ie(t.width):t.width)/n,a=(l?Ie(t.height):t.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Cr=K(0);function an(e){const o=H(e);return!gt()||!o.visualViewport?Cr:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function wr(e,o,t){return o===void 0&&(o=!1),!t||o&&t!==H(e)?!1:o}function ye(e,o,t,n){o===void 0&&(o=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),l=sn(e);let s=K(1);o&&(n?W(n)&&(s=fe(n)):s=fe(e));const a=wr(l,t,n)?an(l):K(0);let u=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,d=r.width/s.x,p=r.height/s.y;if(l){const g=H(l),f=n&&W(n)?H(n):n;let v=g,m=it(v);for(;m&&n&&f!==v;){const w=fe(m),C=m.getBoundingClientRect(),S=q(m),x=C.left+(m.clientLeft+parseFloat(S.paddingLeft))*w.x,E=C.top+(m.clientTop+parseFloat(S.paddingTop))*w.y;u*=w.x,c*=w.y,d*=w.x,p*=w.y,u+=x,c+=E,v=H(m),m=it(v)}}return Ve({width:d,height:p,x:u,y:c})}function Le(e,o){const t=Oe(e).scrollLeft;return o?o.left+t:ye(Z(e)).left+t}function un(e,o){const t=e.getBoundingClientRect(),n=t.left+o.scrollLeft-Le(e,t),r=t.top+o.scrollTop;return{x:n,y:r}}function Sr(e){let{elements:o,rect:t,offsetParent:n,strategy:r}=e;const l=r==="fixed",s=Z(n),a=o?De(o.floating):!1;if(n===s||a&&l)return t;let u={scrollLeft:0,scrollTop:0},c=K(1);const d=K(0),p=X(n);if((p||!p&&!l)&&((ae(n)!=="body"||Re(s))&&(u=Oe(n)),X(n))){const f=ye(n);c=fe(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const g=s&&!p&&!l?un(s,u):K(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-u.scrollLeft*c.x+d.x+g.x,y:t.y*c.y-u.scrollTop*c.y+d.y+g.y}}function xr(e){return Array.from(e.getClientRects())}function yr(e){const o=Z(e),t=Oe(e),n=e.ownerDocument.body,r=ge(o.scrollWidth,o.clientWidth,n.scrollWidth,n.clientWidth),l=ge(o.scrollHeight,o.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Le(e);const a=-t.scrollTop;return q(n).direction==="rtl"&&(s+=ge(o.clientWidth,n.clientWidth)-r),{width:r,height:l,x:s,y:a}}const Vt=25;function Rr(e,o){const t=H(e),n=Z(e),r=t.visualViewport;let l=n.clientWidth,s=n.clientHeight,a=0,u=0;if(r){l=r.width,s=r.height;const d=gt();(!d||d&&o==="fixed")&&(a=r.offsetLeft,u=r.offsetTop)}const c=Le(n);if(c<=0){const d=n.ownerDocument,p=d.body,g=getComputedStyle(p),f=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(n.clientWidth-p.clientWidth-f);v<=Vt&&(l-=v)}else c<=Vt&&(l+=c);return{width:l,height:s,x:a,y:u}}const _r=new Set(["absolute","fixed"]);function Er(e,o){const t=ye(e,!0,o==="fixed"),n=t.top+e.clientTop,r=t.left+e.clientLeft,l=X(e)?fe(e):K(1),s=e.clientWidth*l.x,a=e.clientHeight*l.y,u=r*l.x,c=n*l.y;return{width:s,height:a,x:u,y:c}}function kt(e,o,t){let n;if(o==="viewport")n=Rr(e,t);else if(o==="document")n=yr(Z(e));else if(W(o))n=Er(o,t);else{const r=an(e);n={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return Ve(n)}function cn(e,o){const t=oe(e);return t===o||!W(t)||pe(t)?!1:q(t).position==="fixed"||cn(t,o)}function Fr(e,o){const t=o.get(e);if(t)return t;let n=rn(e,[]).filter(a=>W(a)&&ae(a)!=="body"),r=null;const l=q(e).position==="fixed";let s=l?oe(e):e;for(;W(s)&&!pe(s);){const a=q(s),u=dt(s);!u&&a.position==="fixed"&&(r=null),(l?!u&&!r:!u&&a.position==="static"&&!!r&&_r.has(r.position)||Re(s)&&!u&&cn(e,s))?n=n.filter(d=>d!==s):r=a,s=oe(s)}return o.set(e,n),n}function $r(e){let{element:o,boundary:t,rootBoundary:n,strategy:r}=e;const s=[...t==="clippingAncestors"?De(o)?[]:Fr(o,this._c):[].concat(t),n],a=s[0],u=s.reduce((c,d)=>{const p=kt(o,d,r);return c.top=ge(p.top,c.top),c.right=ot(p.right,c.right),c.bottom=ot(p.bottom,c.bottom),c.left=ge(p.left,c.left),c},kt(o,a,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Mr(e){const{width:o,height:t}=ln(e);return{width:o,height:t}}function br(e,o,t){const n=X(o),r=Z(o),l=t==="fixed",s=ye(e,!0,l,o);let a={scrollLeft:0,scrollTop:0};const u=K(0);function c(){u.x=Le(r)}if(n||!n&&!l)if((ae(o)!=="body"||Re(r))&&(a=Oe(o)),n){const f=ye(o,!0,l,o);u.x=f.x+o.clientLeft,u.y=f.y+o.clientTop}else r&&c();l&&!n&&r&&c();const d=r&&!n&&!l?un(r,a):K(0),p=s.left+a.scrollLeft-u.x-d.x,g=s.top+a.scrollTop-u.y-d.y;return{x:p,y:g,width:s.width,height:s.height}}function Je(e){return q(e).position==="static"}function zt(e,o){if(!X(e)||q(e).position==="fixed")return null;if(o)return o(e);let t=e.offsetParent;return Z(e)===t&&(t=t.ownerDocument.body),t}function dn(e,o){const t=H(e);if(De(e))return t;if(!X(e)){let r=oe(e);for(;r&&!pe(r);){if(W(r)&&!Je(r))return r;r=oe(r)}return t}let n=zt(e,o);for(;n&&dr(n)&&Je(n);)n=zt(n,o);return n&&pe(n)&&Je(n)&&!dt(n)?t:n||hr(e)||t}const Ir=async function(e){const o=this.getOffsetParent||dn,t=this.getDimensions,n=await t(e.floating);return{reference:br(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Pr(e){return q(e).direction==="rtl"}const Vr={convertOffsetParentRelativeRectToViewportRelativeRect:Sr,getDocumentElement:Z,getClippingRect:$r,getOffsetParent:dn,getElementRects:Ir,getClientRects:xr,getDimensions:Mr,getScale:fe,isElement:W,isRTL:Pr},kr=sr,zr=ar,Ar=rr,Br=(e,o,t)=>{const n=new Map,r={platform:Vr,...t},l={...r.platform,_c:n};return or(e,o,{...r,platform:l})};function Dr(e){return e!=null&&typeof e=="object"&&"$el"in e}function At(e){if(Dr(e)){const o=e.$el;return ct(o)&&ae(o)==="#comment"?null:o}return e}function ve(e){return typeof e=="function"?e():i.unref(e)}function gn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bt(e,o){const t=gn(e);return Math.round(o*t)/t}function Or(e,o,t){t===void 0&&(t={});const n=t.whileElementsMounted,r=i.computed(()=>{var b;return(b=ve(t.open))!=null?b:!0}),l=i.computed(()=>ve(t.middleware)),s=i.computed(()=>{var b;return(b=ve(t.placement))!=null?b:"bottom"}),a=i.computed(()=>{var b;return(b=ve(t.strategy))!=null?b:"absolute"}),u=i.computed(()=>{var b;return(b=ve(t.transform))!=null?b:!0}),c=i.computed(()=>At(e.value)),d=i.computed(()=>At(o.value)),p=i.ref(0),g=i.ref(0),f=i.ref(a.value),v=i.ref(s.value),m=i.shallowRef({}),w=i.ref(!1),C=i.computed(()=>{const b={position:f.value,left:"0",top:"0"};if(!d.value)return b;const k=Bt(d.value,p.value),G=Bt(d.value,g.value);return u.value?{...b,transform:"translate("+k+"px, "+G+"px)",...gn(d.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:k+"px",top:G+"px"}});let S;function x(){if(c.value==null||d.value==null)return;const b=r.value;Br(c.value,d.value,{middleware:l.value,placement:s.value,strategy:a.value}).then(k=>{p.value=k.x,g.value=k.y,f.value=k.strategy,v.value=k.placement,m.value=k.middlewareData,w.value=b!==!1})}function E(){typeof S=="function"&&(S(),S=void 0)}function M(){if(E(),n===void 0){x();return}if(c.value!=null&&d.value!=null){S=n(c.value,d.value,x);return}}function P(){r.value||(w.value=!1)}return i.watch([l,s,a,r],x,{flush:"sync"}),i.watch([c,d],M,{flush:"sync"}),i.watch(r,P,{flush:"sync"}),i.getCurrentScope()&&i.onScopeDispose(E),{x:i.shallowReadonly(p),y:i.shallowReadonly(g),strategy:i.shallowReadonly(f),placement:i.shallowReadonly(v),middlewareData:i.shallowReadonly(m),isPositioned:i.shallowReadonly(w),floatingStyles:C,update:x}}const Lr=i.defineComponent({name:"VPopover",__name:"VPopover",props:{open:{type:Boolean,default:!1},onOpenChange:{type:Function,default:()=>{}},placement:{default:"bottom-end"}},setup(e){const o=e,t=i.ref(null),n=i.ref(null),{floatingStyles:r}=Or(t,n,{placement:i.computed(()=>o.placement),middleware:[kr(({placement:s})=>({mainAxis:12,crossAxis:s.includes("-start")?-12:s.includes("-end")?16:0})),Ar(),zr({padding:8})]}),l=s=>{if(!o.open)return;const a=s.target;t.value&&n.value&&!t.value.contains(a)&&!n.value.contains(a)&&o.onOpenChange(!1)};return i.onMounted(()=>{document.addEventListener("click",l)}),i.onUnmounted(()=>{document.removeEventListener("click",l)}),(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{ref_key:"referenceRef",ref:t,class:"popover-trigger",onClick:a[0]||(a[0]=u=>o.onOpenChange(!o.open))},[i.renderSlot(s.$slots,"default",{},void 0,!0)],512),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"popover-fade"},{default:i.withCtx(()=>[e.open?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"floatingRef",ref:n,style:i.normalizeStyle(i.unref(r)),class:"popover-content"},[i.renderSlot(s.$slots,"content",{},void 0,!0)],4)):i.createCommentVNode("",!0)]),_:3})]))],64))}}),fn=Y(Lr,[["__scopeId","data-v-559ed075"]]),Hr=i.defineComponent({name:"HeaderFilter",props:{header:{type:Object,required:!0}},setup(e){const o=i.useSlots(),t=i.computed(()=>e.header.column),n=i.computed(()=>t.value.columnDef.meta),r=i.ref(!1),l=i.ref(),s=i.computed({get(){return t.value.getFilterValue()},set(p){l.value=p}}),a=()=>{t.value.setFilterValue(l.value),r.value=!1},u=()=>{l.value=null,t.value.setFilterValue(l.value),r.value=!1},c=()=>i.createVNode("div",{class:"relative h-[22px] cursor-pointer"},[i.createVNode("div",{class:"absolute left-1/2 top-1/2 flex h-[30px] w-[20px] translate-x-[-50%] translate-y-[-50%] items-center justify-center hover:bg-[#0000000f] hover:text-[#00000073]"},[o.customFilterIcon?.({columnKey:t.value.id,filtered:t.value.getIsFiltered(),column:n.value})||i.createVNode(jo,{class:t.value.getIsFiltered()?"active":""},null)])]),d=()=>o.customFilterDropdown?.({confirm:a,reset:u,setFilterValue:p=>s.value=p,column:n.value,filterModelValue:s.value})||i.h("div","我是默认下拉");return()=>o?.customPopover?.({open:r.value,onOpenChange:g=>r.value=g,trigger:c,content:d})||i.h(fn,{open:r.value,onOpenChange:g=>r.value=g},{default:c,content:d})}}),Nr={class:"flex h-full w-full items-center"},Tr={class:"flex items-center gap-[16px]"},Gr={key:0},jr=i.defineComponent({name:"HeaderCell",__name:"HeaderCell",props:{header:{},table:{}},setup(e){const o=e,t=i.computed(()=>o.header.column),n=i.computed(()=>t.value.columnDef),r=i.computed(()=>n.value.meta),l=i.computed(()=>t.value.id),s=i.computed(()=>{const m=n.value.header;if(typeof m=="function"){const w=m(o.header.getContext());return typeof w=="string"?i.h("span",w):w}return i.h("span",String(m??l.value))}),a=i.computed(()=>n.value.enableSorting),u=i.computed(()=>t.value.getIsSorted()||null),c=m=>{a.value&&t.value.getToggleSortingHandler()?.(m)},d=i.computed(()=>n.value.enableColumnFilter),p=i.computed(()=>t.value.getCanResize()),g=m=>{o.header.getResizeHandler()?.(m)},f=m=>{o.header.getResizeHandler()?.(m)},v=()=>{t.value.resetSize()};return(m,w)=>(i.openBlock(),i.createElementBlock("div",Nr,[i.createElementVNode("div",{class:i.normalizeClass([[a.value?"cursor-pointer":""],"flex min-w-0 flex-1 items-center gap-[4px]"]),onClick:c},[i.createElementVNode("div",{class:i.normalizeClass(["flex min-w-0 flex-1 items-center",r.value?.columnAlign==="center"?"justify-center":r.value?.columnAlign==="right"?"justify-end":"justify-start"])},[i.renderSlot(m.$slots,"headerCell",{column:r.value,columnKey:l.value},()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s.value)))],!0)],2),i.createElementVNode("div",Tr,[a.value?(i.openBlock(),i.createElementBlock("div",Gr,[i.renderSlot(m.$slots,"customSorterIcon",{sort:u.value},()=>[i.createVNode(No,{sort:u.value},null,8,["sort"])],!0)])):i.createCommentVNode("",!0),d.value?(i.openBlock(),i.createBlock(i.unref(Hr),{key:1,header:o.header},i.createSlots({_:2},[m.$slots.customFilterDropdown?{name:"customFilterDropdown",fn:i.withCtx(C=>[i.renderSlot(m.$slots,"customFilterDropdown",i.normalizeProps(i.guardReactiveProps(C)),void 0,!0)]),key:"0"}:void 0,m.$slots.customFilterIcon?{name:"customFilterIcon",fn:i.withCtx(C=>[i.renderSlot(m.$slots,"customFilterIcon",i.normalizeProps(i.guardReactiveProps(C)),void 0,!0)]),key:"1"}:void 0,m.$slots.customPopover?{name:"customPopover",fn:i.withCtx(C=>[i.renderSlot(m.$slots,"customPopover",i.normalizeProps(i.guardReactiveProps(C)),void 0,!0)]),key:"2"}:void 0]),1032,["header"])):i.createCommentVNode("",!0)])],2),p.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["resize-handle",[t.value.getIsResizing()?"isResizing":""]]),onMousedown:g,onTouchstart:f,onDblclick:i.withModifiers(v,["stop"])},[i.createElementVNode("div",{class:"resize-handle-line",style:i.normalizeStyle({transform:e.table.options.columnResizeMode==="onEnd"&&e.header.column.getIsResizing()?`translateX(${e.table.getState().columnSizingInfo.deltaOffset??0}px)`:""})},null,4)],34)):i.createCommentVNode("",!0)]))}}),Wr=Y(jr,[["__scopeId","data-v-97f68374"]]);const ie="CHECKBOX_COLUMN_KEY",we="EXPAND_COLUMN_KEY",xe="_isExpandRow",ft="_expandChildren",pn={columns:()=>[],data:()=>[],rowHeight:void 0,rowKey:void 0,loading:!1,fixedHeader:!0,enableSortingRemoval:!0,bordered:!1,rowSelectionConfig:()=>({enabled:!1,getRowCheckDisabled:()=>!1,onChange:()=>{}}),loadMoreConfig:()=>({showNoMore:!1,noMoreText:"没有更多了"}),paginationConfig:()=>({enabled:!1,placement:"right",total:0,mode:"server"}),treeConfig:()=>({enabled:!1,childrenKey:"children",indentSize:16}),enableExpandRow:!1,enableRowHover:!0,adaptiveColumnWidth:120,defaultExpandAllRows:!1,columnResizeMode:"onChange",fixedFooter:!1,themeConfig:()=>({}),defaultCheckboxColumnWidth:40,defaultExpandColumnWidth:42,customRowAttributes:()=>({}),customHeaderCellAttributes:()=>({}),customCellAttributes:()=>({}),onTableChange:()=>{},onScrollToBottom:()=>{},onExpandedRowsChange:()=>{},onColumnSizingChange:()=>{}},le={primaryColor:"#1677ff",header:{color:"rgba(0, 0, 0, 0.88)",backgroundColor:"#fafafa",borderRadius:8,splitColor:"#f0f0f0",padding:12,headerIconColor:"rgba(0, 0, 0, 0.30)"},body:{color:"rgba(0, 0, 0, 0.88)",backgroundColor:"#ffffff",padding:12},rowHoverColor:"#fafafa",border:{borderStyle:"solid",borderColor:"#f0f0f0"},zIndex:{pinnedColumn:10,fixedHeader:12,fixedFooter:12}};function qr(e){const o=i.computed(()=>({primaryColor:e?.primaryColor||le.primaryColor,header:{...le.header,...e?.header},body:{...le.body,...e?.body},rowHoverColor:e?.rowHoverColor||le.rowHoverColor,border:{...le.border,...e?.border},zIndex:{...le.zIndex,...e?.zIndex}}));return{cssVariables:i.computed(()=>{const n=o.value;return{"--v-table-primary-color":n.primaryColor,"--v-table-header-color":n.header?.color,"--v-table-header-bg":n.header?.backgroundColor,"--v-table-header-border-radius":`${n.header?.borderRadius}px`,"--v-table-header-split-color":n.header?.splitColor,"--v-table-header-padding":`${n.header?.padding}px`,"--v-table-header-icon-color":n.header?.headerIconColor,"--v-table-body-color":n.body?.color,"--v-table-body-bg":n.body?.backgroundColor,"--v-table-body-padding":`${n.body?.padding}px`,"--v-table-row-hover-color":n.rowHoverColor,"--v-table-border-style":n.border?.borderStyle,"--v-table-border-color":n.border?.borderColor,"--v-table-pinned-column":n.zIndex?.pinnedColumn,"--v-table-fixed-header":n.zIndex?.fixedHeader,"--v-table-fixed-footer":n.zIndex?.fixedFooter}}),themeConfig:o}}const Ur=["checked","disabled","indeterminate"],Kr={key:0,class:"checkbox-label"},Xr=i.defineComponent({name:"VCheckbox",__name:"VCheckbox",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},onCheckedChange:{type:Function,default:()=>{}}},setup(e){const o=e,t=i.computed(()=>({"checkbox-wrapper":!0,"checkbox-wrapper-checked":o.checked,"checkbox-wrapper-disabled":o.disabled})),n=i.computed(()=>({checkbox:!0,"checkbox-checked":o.checked&&!o.indeterminate,"checkbox-disabled":o.disabled,"checkbox-indeterminate":o.indeterminate})),r=l=>{o.disabled||o.onCheckedChange?.(l)};return(l,s)=>(i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(i.unref(t))},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(n))},[i.createElementVNode("input",{type:"checkbox",checked:e.checked,disabled:e.disabled,indeterminate:e.indeterminate,class:"checkbox-input",onChange:r},null,40,Ur),s[0]||(s[0]=i.createElementVNode("span",{class:"checkbox-inner"},null,-1))],2),l.$slots.default?(i.openBlock(),i.createElementBlock("span",Kr,[i.renderSlot(l.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)],2))}}),Dt=Y(Xr,[["__scopeId","data-v-abaaf4da"]]),Yr={class:"flex h-full items-center justify-center bg-[rgba(255,255,255,0.5)]"},Jr={class:"animate-custom-spin dot-container relative"},Qr=i.defineComponent({name:"VLoading",__name:"index",props:{size:{default:"default"}},setup(e){i.useCssVars(n=>({af8cfe6a:i.unref(t).containerSize,v42da0853:i.unref(t).dotSize}));const o=e,t=i.computed(()=>({default:{containerSize:"20px",dotSize:"9px"},small:{containerSize:"14px",dotSize:"6px"},large:{containerSize:"32px",dotSize:"14px"}})[o.size]);return(n,r)=>(i.openBlock(),i.createElementBlock("div",Yr,[i.renderSlot(n.$slots,"default",{},()=>[i.createElementVNode("div",Jr,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(4,l=>i.createElementVNode("div",{key:l,class:"dot-item animate-fade absolute origin-center scale-[0.75] rounded-full opacity-[0.3]"})),64))])],!0)]))}}),Ot=Y(Qr,[["__scopeId","data-v-d39a195f"]]),Lt=(e,o=!0)=>{if(e._loadingNode&&JSON.stringify(e._loadingOptions)===JSON.stringify(o))return;lt(e);const t=document.createElement("div");t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom=typeof o=="boolean"?"0":`${o.bottom||0}px`,t.style.zIndex="1000";const n=typeof o=="boolean"?{}:{size:o.size},r=typeof o!="boolean"?o.indicator:void 0,l=r?i.h(Ot,n,()=>r):i.h(Ot,n);i.render(l,t);const s=getComputedStyle(e).position;["relative","absolute","fixed"].includes(s)||(e.style.position="relative"),e.appendChild(t),e._loadingNode={vNode:l,element:t},e._loadingOptions=o},lt=e=>{const o=e._loadingNode;o&&(i.render(null,o.element),e.contains(o.element)&&e.removeChild(o.element),delete e._loadingNode,delete e._loadingOptions)},Ht=e=>typeof e=="boolean"?e:e.spinning,Zr={mounted(e,o){Ht(o.value)&&Lt(e,o.value)},updated(e,o){Ht(o.value)?Lt(e,o.value):lt(e)},unmounted(e){lt(e)}},ei={viewBox:"0 0 1024 1024",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ti={key:0,d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"},ni={key:1,d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"},Nt=i.defineComponent({name:"ArrowIcon",__name:"ArrowIcon",props:{direction:{}},setup(e){return(o,t)=>(i.openBlock(),i.createElementBlock("svg",ei,[e.direction==="left"?(i.openBlock(),i.createElementBlock("path",ti)):(i.openBlock(),i.createElementBlock("path",ni))]))}}),oi={class:"select-selector"},ri={class:"select-selection-item"},ii={class:"select-dropdown-inner"},li=["onClick"],si=i.defineComponent({name:"VSelect",inheritAttrs:!1,__name:"VSelect",props:{value:{default:void 0},options:{default:()=>[]},onSelectChange:{type:Function,default:()=>{}}},setup(e){const o=e,t=i.ref(!1),n=i.ref(null),r=i.ref("auto"),l=i.computed(()=>({select:!0,"select-open":t.value})),s=i.computed(()=>o.options.find(d=>d.value===o.value)?.label||""),a=c=>{t.value=c,c&&n.value&&(r.value=`${n.value.offsetWidth}px`)},u=c=>{o.onSelectChange?.(c.value),t.value=!1};return(c,d)=>(i.openBlock(),i.createBlock(fn,{open:i.unref(t),placement:"bottom",onOpenChange:a},{content:i.withCtx(()=>[i.createElementVNode("div",{class:"select-dropdown",style:i.normalizeStyle({width:i.unref(r)})},[i.createElementVNode("div",ii,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.options,p=>(i.openBlock(),i.createElementBlock("div",{key:p.value,class:i.normalizeClass(["select-item",{"select-item-selected":p.value===o.value}]),onClick:g=>u(p)},i.toDisplayString(p.label),11,li))),128))])],4)]),default:i.withCtx(()=>[i.createElementVNode("div",{ref_key:"selectRef",ref:n,class:i.normalizeClass(i.unref(l))},[i.createElementVNode("div",oi,[i.createElementVNode("span",ri,i.toDisplayString(i.unref(s)),1),d[0]||(d[0]=i.createElementVNode("span",{class:"select-arrow"},"▼",-1))])],2)]),_:1},8,["open"]))}}),ai=Y(si,[["__scopeId","data-v-615b5716"]]),ui={class:"pagination"},ci={class:"pagination-total"},di={class:"pagination-list"},gi=["onClick"],fi={class:"pagination-size-changer"},pi=i.defineComponent({name:"VPagination",__name:"VPagination",props:{pageSize:{default:10},pageIndex:{default:1},total:{default:0},onPageChange:{type:Function,default:()=>{}}},setup(e){const o=e,t=i.computed(()=>Math.ceil(o.total/o.pageSize)),n=i.computed(()=>{const a=[],u=t.value,c=o.pageIndex;if(u<=7)for(let d=1;d<=u;d++)a.push(d);else if(c<=4){for(let d=1;d<=5;d++)a.push(d);a.push("..."),a.push(u)}else if(c>=u-3){a.push(1),a.push("...");for(let d=u-4;d<=u;d++)a.push(d)}else{a.push(1),a.push("...");for(let d=c-1;d<=c+1;d++)a.push(d);a.push("..."),a.push(u)}return a}),r=()=>{o.pageIndex>1&&s(o.pageIndex-1)},l=()=>{o.pageIndex<t.value&&s(o.pageIndex+1)},s=a=>{a!==o.pageIndex&&o.onPageChange?.(a,o.pageSize)};return(a,u)=>(i.openBlock(),i.createElementBlock("div",ui,[i.createElementVNode("span",ci,"共 "+i.toDisplayString(o.total)+" 条",1),i.createElementVNode("ul",di,[i.createElementVNode("li",{class:i.normalizeClass(["pagination-item","pagination-prev",{"pagination-disabled":o.pageIndex===1}]),onClick:r},[i.createVNode(Nt,{direction:"left"})],2),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n),(c,d)=>(i.openBlock(),i.createElementBlock("li",{key:d,class:i.normalizeClass(["pagination-item",{"pagination-item-active":c===o.pageIndex,"pagination-ellipsis":c==="..."}]),onClick:p=>c!=="..."&&s(c)},i.toDisplayString(c),11,gi))),128)),i.createElementVNode("li",{class:i.normalizeClass(["pagination-item","pagination-next",{"pagination-disabled":o.pageIndex===i.unref(t)}]),onClick:l},[i.createVNode(Nt,{direction:"right"})],2)]),i.createElementVNode("div",fi,[i.createVNode(ai,{value:o.pageSize,options:[{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100}],onSelectChange:u[0]||(u[0]=c=>o.onPageChange?.(1,c))},null,8,["value"]),u[1]||(u[1]=i.createElementVNode("span",{class:"pagination-size-text"},"条/页",-1))])]))}}),mi=Y(pi,[["__scopeId","data-v-364ce69c"]]);function mn(e,o=0){return e.map(t=>({id:t.columnKey,accessorKey:t.columnKey,size:t.columnWidth?Ci(t.columnWidth,o):void 0,header:t.columnHeader,cell:t.columnCell,enableSorting:t.columnEnableSort,enableColumnFilter:t.columnEnableFilter,sortDescFirst:!0,enableResizing:t.columnEnableResize??!1,minSize:t.columnMinWidth??50,maxSize:t.columnMaxWidth,columns:mn(t.columnChildren||[],o),meta:t}))}function hi(e,o=!1){return o?e.map(t=>({...t,[ft]:[{...t,[xe]:!0}]})):e}function vi(e,o,t="children"){const n=[];function r(l){l.forEach(s=>{const a=o?typeof o=="function"?o(s):s[o]:s.id;n.push(String(a));const u=s[t];u?.length&&r(u)})}return r(e),n}function Ci(e,o){if(!e)return 0;if(typeof e=="number")return e;if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);return Math.round(o*t/100)}return typeof e=="string"&&e.endsWith("px")?Math.round(parseFloat(e)):0}const wi=["colspan"],Si={class:"v-table-body"},xi=["data-index"],yi=["colspan"],Ri={key:2,style:{borderBottom:"none"}},_i=["colspan"],Ei=["colspan"],Fi={class:"overflow-hidden"},$i=i.defineComponent({name:"VTable",__name:"index",props:i.mergeModels(i.mergeDefaults({data:{},columns:{},rowHeight:{},rowKey:{type:[String,Number,Function]},loading:{type:Boolean},fixedHeader:{type:Boolean},enableSortingRemoval:{type:Boolean},bordered:{type:Boolean},rowSelectionConfig:{},loadMoreConfig:{},paginationConfig:{},treeConfig:{},enableExpandRow:{type:Boolean},enableRowHover:{type:Boolean},adaptiveColumnWidth:{},defaultExpandAllRows:{type:Boolean},columnResizeMode:{},fixedFooter:{type:Boolean},themeConfig:{},defaultCheckboxColumnWidth:{},defaultExpandColumnWidth:{},customRowAttributes:{type:Function},customHeaderCellAttributes:{type:Function},customCellAttributes:{type:Function},onTableChange:{type:Function},onScrollToBottom:{type:Function},onExpandedRowsChange:{type:Function},onColumnSizingChange:{type:Function}},pn),{defaultFilter:{default:()=>[]},defaultFilterModifiers:{},defaultSort:{default:()=>[]},defaultSortModifiers:{},defaultPagination:{default:()=>({pageIndex:1,pageSize:20})},defaultPaginationModifiers:{},defaultExpanded:{type:[Boolean,Object],default:()=>({})},defaultExpandedModifiers:{},defaultSelection:{default:()=>({})},defaultSelectionModifiers:{},defaultColumnPinning:{default:()=>({})},defaultColumnPinningModifiers:{},defaultColumnSizing:{default:()=>({})},defaultColumnSizingModifiers:{}}),emits:["update:defaultFilter","update:defaultSort","update:defaultPagination","update:defaultExpanded","update:defaultSelection","update:defaultColumnPinning","update:defaultColumnSizing"],setup(e,{expose:o}){const t=e,n=i.useSlots(),r=i.ref(),l=i.ref(),s=i.ref(null),a=i.ref(0);let u=null;const c=()=>{s.value&&(u=new ResizeObserver(h=>{for(const F of h)a.value=F.contentRect.width}),u.observe(s.value))},d=i.computed(()=>{const h=z.getAllLeafColumns(),F=a.value||0;if(F===0)return{};const $=h.filter(J=>!J.columnDef.size),_=$.length;if(_===0)return{};const I=h.reduce((J,ue)=>ue.columnDef.size?J+Math.round(ue.getSize()):J,0),me=_*t.adaptiveColumnWidth,xn=20,Te=F-I;if(Te>=me-xn){const J=Math.floor(Te/_),ue=Te%_;return $.reduce((Ct,yn,Rn)=>(Ct[yn.id]=J+(Rn<ue?1:0),Ct),{})}return $.reduce((J,ue)=>(J[ue.id]=t.adaptiveColumnWidth,J),{})}),p=h=>{if(h.columnDef.size)return`${h.getSize()}px`;{const $=d.value[h.id];return $?`${$}px`:`${t.adaptiveColumnWidth}px`}},g=i.computed(()=>({id:ie,accessorKey:ie,size:t.defaultCheckboxColumnWidth,header:({table:h})=>{const F=h.getRowModel().rows.filter(I=>I.getCanSelect()),$=F.filter(I=>I.getIsSelected()),_={indeterminate:$.length>0&&$.length<F.length,checked:h.getIsAllRowsSelected(),onCheckedChange:I=>{h.getToggleAllRowsSelectedHandler()?.(I)},disabled:!1};return n?.customCheckbox?.(_)||i.h(Dt,_)},cell:({row:h})=>{const F={checked:h.getIsSelected(),indeterminate:!1,disabled:!h.getCanSelect(),onCheckedChange:$=>{h.getToggleSelectedHandler()?.($)}};return n?.customCheckbox?.(F)||i.h(Dt,F)}})),f={id:we,accessorKey:we,size:t.defaultExpandColumnWidth,header:()=>"",cell:({row:h})=>{const F={expand:h.getIsExpanded(),onExpandChange:h.toggleExpanded};return i.h("div",{class:"flex items-center justify-center w-full h-full"},n?.customExpandIcon?.(F)||i.h(Zt,F))}},v=i.computed(()=>V.value.map(h=>`${h.id}_${Bo(h.original)}`)),m=i.useModel(e,"defaultFilter"),w=i.useModel(e,"defaultSort"),C=i.useModel(e,"defaultPagination"),S=i.useModel(e,"defaultExpanded"),x=i.useModel(e,"defaultSelection"),E=i.useModel(e,"defaultColumnPinning"),M=i.useModel(e,"defaultColumnSizing"),P=(h,F)=>{C.value={pageIndex:h,pageSize:F},b()},b=()=>{i.nextTick(()=>{t.onTableChange?.({pagination:C.value,sortList:w.value,filterList:m.value})})},k=i.computed(()=>E.value.left?.length||E.value.right?.length),G=i.computed(()=>{const h=mn(t.columns,a.value);return t.enableExpandRow&&h.unshift(f),t.rowSelectionConfig?.enabled&&h.unshift(g.value),h}),T=i.computed(()=>hi(t.data,t.enableExpandRow)),z=ho({state:{get columnFilters(){return m.value},get sorting(){return w.value},get pagination(){return C.value},get rowSelection(){return x.value},get expanded(){return S.value},get columnPinning(){return t.treeConfig.enabled?{}:E.value},get columnSizing(){return M.value}},get data(){return T.value},get columns(){return G.value},getRowId:t.rowKey?h=>{if(h[xe])return;const F=typeof t.rowKey=="function"?t.rowKey(h):h[t.rowKey];return String(F)}:void 0,getCoreRowModel:co(),getExpandedRowModel:go(),getPaginationRowModel:t.paginationConfig?.mode==="client"?fo():void 0,enableRowSelection:h=>!t.rowSelectionConfig?.getRowCheckDisabled?.(h.original),manualSorting:!0,manualFiltering:!0,manualPagination:!(t.paginationConfig?.enabled&&t.paginationConfig?.mode==="client"),enableColumnPinning:!0,enableColumnResizing:!0,columnResizeMode:t.columnResizeMode,enableSortingRemoval:t.enableSortingRemoval,onSortingChange:h=>{w.value=typeof h=="function"?h(w.value):h,b()},onColumnFiltersChange:h=>{m.value=typeof h=="function"?h(m.value):h,b()},onPaginationChange:h=>{C.value=typeof h=="function"?h(C.value):h,b()},onExpandedChange:h=>{S.value=typeof h=="function"?h(S.value):h,i.nextTick(()=>{t.onExpandedRowsChange?.(S.value)})},onRowSelectionChange:h=>{x.value=typeof h=="function"?h(x.value):h,i.nextTick(()=>{t.rowSelectionConfig?.onChange?.(z.getSelectedRowModel().rows.map(F=>F.original))})},onColumnSizingChange:h=>{M.value=typeof h=="function"?h(M.value):h,i.nextTick(()=>{t.onColumnSizingChange?.(M.value)})},getSubRows:h=>t.enableExpandRow?h[ft]:h[t.treeConfig.childrenKey]}),_e=()=>{S.value=vi(t.data,t.rowKey,t.treeConfig?.childrenKey).reduce((h,F)=>(h[F]=!0,h),{})},Ee=i.computed(()=>{const h={pageIndex:C.value.pageIndex||1,pageSize:C.value.pageSize,total:t.paginationConfig?.mode==="client"?t.data.length:t.paginationConfig.total,onPageChange:P};return()=>n?.customPagination?.(h)||i.h(mi,h)}),V=i.computed(()=>z.getRowModel().rows),D=i.ref([]),O=i.ref(null),U=i.ref(0),L=i.computed(()=>({count:V.value.length,estimateSize:()=>t.rowHeight||48,getScrollElement:()=>s.value,overscan:10,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!0,onChange:h=>{if(h.scrollOffset&&h.scrollOffset<0)return;if(!h.isScrolling){D.value=h.getVirtualItems();return}const F=performance.now(),$=1e3/60;F-U.value>$&&(U.value=F,O.value&&cancelAnimationFrame(O.value),O.value=requestAnimationFrame(()=>{D.value=h.getVirtualItems(),O.value=null}))}})),B=Mo(L);i.watch(()=>V.value.length,()=>{B.value.measure()},{immediate:!0});function He(h,F){if(h)if(F)B.value.measureElement(h);else{if(t.rowHeight)return;B.value.measureElement(h)}}i.watchEffect(()=>{const[h]=[...D.value].reverse();!h||!B.value.isScrolling||h.index>=T.value?.length-1&&!t.loading&&t.onScrollToBottom?.()});const pt=i.computed(()=>D.value.length>0?D.value[0].start:0),mt=i.computed(()=>{if(D.value.length===0)return 0;const h=D.value[D.value.length-1];return B.value.getTotalSize()-(h.start+h.size)}),vn=i.computed(()=>T.value.length>0&&!t.loading&&t.loadMoreConfig?.showNoMore),Cn=i.computed(()=>t.loadMoreConfig?.noMoreText||"没有更多了"),{cssVariables:wn,themeConfig:Ne}=qr(t.themeConfig),Sn=(h,F,$,_)=>{if(!F)return!0;const I=t.customCellAttributes(h,F,$,_)||{};return!(I.colspan===0||I.rowspan===0)},ht=h=>{const F=h.columnDef.meta,$=h.getIsPinned(),_={textAlign:F?.columnAlign||"left"};return $&&(_.position="sticky",$==="left"?_.left=`${h.getStart("left")}px`:_.right=`${h.getAfter("right")}px`,_.zIndex=Ne.value.zIndex?.pinnedColumn),_},vt=h=>{const F=h.getIsPinned();return F?F==="left"&&h.getIsLastColumn("left")?"pinned-left-shadow":F==="right"&&h.getIsFirstColumn("right")?"pinned-right-shadow":"":""};return i.onMounted(()=>{c(),t.defaultExpandAllRows&&_e()}),i.onBeforeUnmount(()=>{O.value&&(cancelAnimationFrame(O.value),O.value=null),u&&(u.disconnect(),u=null)}),o({tanstackTable:z,scrollToIndex:async(h,F="smooth")=>{i.nextTick(()=>{B.value.scrollToIndex(h,{align:"start",behavior:F})})}}),(h,F)=>i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:"v-table-wrapper",style:i.normalizeStyle(i.unref(wn))},[i.createElementVNode("div",{ref_key:"tableContainerRef",ref:s,class:i.normalizeClass(["min-h-0 flex-1",{"overflow-y-auto":t.fixedHeader}])},[i.createElementVNode("table",{class:i.normalizeClass(["v-table",{"v-table-bordered":t.bordered}])},[i.createElementVNode("colgroup",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(z).getAllLeafColumns(),$=>(i.openBlock(),i.createElementBlock("col",{key:$.id,style:i.normalizeStyle({width:p($)})},null,4))),128))]),i.createElementVNode("thead",{ref_key:"tableHeaderRef",ref:r,class:i.normalizeClass(["v-table-header",{sticky:t.fixedHeader}]),style:i.normalizeStyle({top:0,zIndex:i.unref(Ne).zIndex?.fixedHeader})},[i.renderSlot(h.$slots,"customHeader",{columns:e.columns,table:i.unref(z)},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(z).getHeaderGroups(),$=>(i.openBlock(),i.createElementBlock("tr",{key:$.id},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList($.headers,_=>(i.openBlock(),i.createElementBlock("th",i.mergeProps({key:_.id,colspan:_.colSpan,class:["relative",[_.column.id===i.unref(ie)?"checkbox-col":"",_.column.id===i.unref(we)?"expand-col":"",vt(_.column)]],style:ht(_.column)},{ref_for:!0},t?.customHeaderCellAttributes?.(_.column.columnDef?.meta,_.column.getIndex())),[_.isPlaceholder?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[_.id===i.unref(ie)?(i.openBlock(),i.createBlock(i.unref(xt),{key:0,render:_.column.columnDef.header,props:_.getContext()},null,8,["render","props"])):(i.openBlock(),i.createBlock(Wr,{key:1,header:_,table:i.unref(z)},i.createSlots({_:2},[n.headerCell?{name:"headerCell",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"headerCell",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"0"}:void 0,n.customFilterDropdown?{name:"customFilterDropdown",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customFilterDropdown",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"1"}:void 0,n.customFilterIcon?{name:"customFilterIcon",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customFilterIcon",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"2"}:void 0,n.customPopover?{name:"customPopover",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customPopover",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"3"}:void 0,n.customSorterIcon?{name:"customSorterIcon",fn:i.withCtx(I=>[i.renderSlot(h.$slots,"customSorterIcon",i.mergeProps({ref_for:!0},I),void 0,!0)]),key:"4"}:void 0]),1032,["header","table"]))],64))],16,wi))),128))]))),128))],!0)],6),i.createElementVNode("tbody",Si,[i.unref(pt)>0?(i.openBlock(),i.createElementBlock("tr",{key:0,style:i.normalizeStyle({height:`${i.unref(pt)}px`})},null,4)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(D),$=>(i.openBlock(),i.createElementBlock("tr",i.mergeProps({key:i.unref(v)[$.index],ref_for:!0,ref:_=>He(_,i.unref(V)[$.index]?.original?.[i.unref(xe)]),"data-index":$.index,style:{minHeight:`${$.size}px`},class:{"v-table-row-hover":t.enableRowHover}},{ref_for:!0},t?.customRowAttributes?.(i.unref(V)[$.index].original,$.index)),[i.unref(V)[$.index].original?.[i.unref(xe)]?(i.openBlock(),i.createElementBlock("td",{key:1,class:"!p-0",colspan:i.unref(z).getAllLeafColumns().length},[i.createElementVNode("div",{class:"overflow-hidden",style:i.normalizeStyle({position:i.unref(k)?"sticky":"static",left:0,width:i.unref(k)?`${i.unref(a)}px`:"auto"})},[i.renderSlot(h.$slots,"expandedRowRender",{row:i.unref(V)[$.index].original},void 0,!0)],4)],8,yi)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(i.unref(V)[$.index].getVisibleCells(),(_,I)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:_.id},[Sn(i.unref(V)[$.index].original,_.column.columnDef?.meta,$.index,I)?(i.openBlock(),i.createElementBlock("td",i.mergeProps({key:0,style:ht(_.column),class:[_.column.id===i.unref(ie)?"checkbox-col":"",_.column.id===i.unref(we)?"expand-col":"",vt(_.column)]},{ref_for:!0},t.customCellAttributes?.(i.unref(V)[$.index].original,_.column.columnDef?.meta,$.index,I)??{}),[_.column.id===i.unref(ie)?(i.openBlock(),i.createBlock(i.unref(xt),{key:0,render:_.column.columnDef.cell,props:_.getContext()},null,8,["render","props"])):(i.openBlock(),i.createBlock(Oo,{key:1,cell:_,"tree-config":t.treeConfig,columns:t.columns,row:i.unref(V)[$.index]},i.createSlots({_:2},[n.bodyCell?{name:"bodyCell",fn:i.withCtx(me=>[i.renderSlot(h.$slots,"bodyCell",i.mergeProps({ref_for:!0},me),void 0,!0)]),key:"0"}:void 0,n.customExpandIcon?{name:"customExpandIcon",fn:i.withCtx(me=>[i.renderSlot(h.$slots,"customExpandIcon",i.mergeProps({ref_for:!0},me),void 0,!0)]),key:"1"}:void 0]),1032,["cell","tree-config","columns","row"]))],16)):i.createCommentVNode("",!0)],64))),128))],16,xi))),128)),i.unref(mt)>0?(i.openBlock(),i.createElementBlock("tr",{key:1,style:i.normalizeStyle({height:`${i.unref(mt)}px`,border:"none"})},null,4)):i.createCommentVNode("",!0),i.unref(vn)?(i.openBlock(),i.createElementBlock("tr",Ri,[i.createElementVNode("td",{colspan:i.unref(z).getAllLeafColumns().length,class:"!border-b-0 p-[12px] text-center text-[14px] text-[rgba(0,0,0,0.32)]"},[i.renderSlot(h.$slots,"customLoadNoMore",{},()=>[i.createTextVNode(i.toDisplayString(i.unref(Cn)),1)],!0)],8,_i)])):i.createCommentVNode("",!0)]),i.createElementVNode("tfoot",{class:i.normalizeClass({sticky:t.fixedFooter}),style:i.normalizeStyle({bottom:0,zIndex:i.unref(Ne).zIndex?.fixedFooter})},[i.createElementVNode("tr",null,[i.createElementVNode("td",{class:"!p-0",colspan:i.unref(z).getAllLeafColumns().length},[i.createElementVNode("div",Fi,[i.renderSlot(h.$slots,"customFooter",{},void 0,!0)])],8,Ei)])],6)],2),!i.unref(D).length&&!t.loading?(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle({height:`calc(100% - ${i.unref(r)?.offsetHeight??0}px)`}),class:"flex items-center justify-center"},[i.renderSlot(h.$slots,"customEmpty",{},()=>[F[0]||(F[0]=i.createTextVNode(" 当前内容为空 ",-1))],!0)],4)):i.createCommentVNode("",!0)],2),t.paginationConfig.enabled?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"paginationRef",ref:l,class:i.normalizeClass([[t.paginationConfig.placement==="left"?"justify-start":t.paginationConfig.placement==="center"?"justify-center":"justify-end"],"flex items-center py-[16px]"])},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(Ee))))],2)):i.createCommentVNode("",!0)],4)),[[i.unref(Zr),{spinning:t.loading,indicator:n?.customLoadingIcon?.(),bottom:i.unref(l)?.offsetHeight}]])}}),hn=Y($i,[["__scopeId","data-v-bc0e0fed"]]);exports.CHECKBOX_COLUMN_KEY=ie;exports.EXPAND_COLUMN_KEY=we;exports.EXPAND_ROW_DATA_INDEX=ft;exports.EXPAND_ROW_KEY=xe;exports.VTable=hn;exports.default=hn;exports.defaultThemeConfig=le;exports.vTableDefaultProps=pn;
|
|
8
8
|
//# sourceMappingURL=index.cjs.map
|