simple-table-core 2.6.7 → 2.6.8
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/dist/{Animate-6dc785ab.js → Animate-65c1a0d7.js} +2 -2
- package/dist/Animate-65c1a0d7.js.map +1 -0
- package/dist/{DatePicker-f0d8a106.js → DatePicker-12235c3b.js} +2 -2
- package/dist/DatePicker-12235c3b.js.map +1 -0
- package/dist/cjs/{Animate-a380c5a3.js → Animate-64b55230.js} +2 -2
- package/dist/cjs/Animate-64b55230.js.map +1 -0
- package/dist/cjs/{DatePicker-8df3046a.js → DatePicker-608690b6.js} +2 -2
- package/dist/cjs/DatePicker-608690b6.js.map +1 -0
- package/dist/cjs/{index-3314cbd8.js → index-3a7273fd.js} +2 -2
- package/dist/cjs/index-3a7273fd.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/utils/columnViewportWidth.d.ts +28 -0
- package/dist/{index-0c9bc958.js → index-2e99c911.js} +2 -2
- package/dist/index-2e99c911.js.map +1 -0
- package/dist/index.es.js +1 -1
- package/dist/utils/columnViewportWidth.d.ts +28 -0
- package/package.json +1 -1
- package/dist/Animate-6dc785ab.js.map +0 -1
- package/dist/DatePicker-f0d8a106.js.map +0 -1
- package/dist/cjs/Animate-a380c5a3.js.map +0 -1
- package/dist/cjs/DatePicker-8df3046a.js.map +0 -1
- package/dist/cjs/index-3314cbd8.js.map +0 -1
- package/dist/index-0c9bc958.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as n,Fragment as e,jsxs as t}from"react/jsx-runtime";import r,{useEffect as o,useState as i,useRef as a,useMemo as u,useCallback as l,createContext as c,useContext as s,lazy as d,Suspense as f,Fragment as v,cloneElement as h,forwardRef as p,useImperativeHandle as w,useLayoutEffect as m,isValidElement as g,useReducer as b}from"react";var x=function(){return x=Object.assign||function(n){for(var e,t=1,r=arguments.length;r>t;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},x.apply(this,arguments)};function y(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&0>e.indexOf(r)&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(n);r.length>o;o++)0>e.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]])}return t}function C(n,e,t,r){return new(t||(t=Promise))(function(o,i){function a(n){try{l(r.next(n))}catch(n){i(n)}}function u(n){try{l(r.throw(n))}catch(n){i(n)}}function l(n){var e;n.done?o(n.value):(e=n.value,e instanceof t?e:new t(function(n){n(e)})).then(a,u)}l((r=r.apply(n,e||[])).next())})}function I(n,e){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&o[3]>u[1])){i.label=u[1];break}if(6===u[0]&&o[1]>i.label){i.label=o[1],o=u;break}if(o&&o[2]>i.label){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(n,i)}catch(n){u=[6,n],r=0}finally{t=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function R(n,e,t){if(t||2===arguments.length)for(var r,o=0,i=e.length;i>o;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return n.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var S=1,M=function(n){return Math.ceil(800/(n+1))},N=29.5,H=["lineAreaChart","barChart"],E=40,T=function(n,e,t){return e&&t?480>n?.25:768>n?.3:.4:function(n){return 480>n?.4:768>n?.5:.6}(n)},k="parentExpanded",P=function(n,e){if(!n.children||0===n.children.length)return[e];var t=[],r=function(n,e){if(!n.children||0===n.children.length)return t.push(e),e+1;for(var o=e,i=0,a=n.children;a.length>i;i++)o=r(a[i],o);return o};return r(n,e),t},A=function(n){return n.flatMap(function(n){var e=[n];return n.children&&n.children.length>0&&e.push.apply(e,A(n.children)),e})},F=function(n){return void 0===n&&(n=0),n?n+1:0},D=function(n,e){for(var t=0,r=A(n);r.length>t;t++){var o=r[t];if(o.children&&o.children.length>0&&o.children.some(function(n){return n.accessor===e}))return o}return null},L=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},W=function(n){var e=n.header,t=n.headers,r=n.collapsedHeaders;return e.hide||e.excludeFromRender||n.rootPinned!==n.pinned?null:!(t&&r&&function(n,e,t){var r=D(e,n.accessor);if(r){var o=t.has(r.accessor),i=n.showWhen||k;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(e,t,r))||null},O=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},B=function(n){var e=n.customTheme;return Math.min(n.headerHeight+e.rowSeparatorWidth+n.childRowCount*(n.rowHeight+e.rowSeparatorWidth)+e.nestedGridPaddingTop+e.nestedGridPaddingBottom+e.nestedGridBorderWidth,e.nestedGridMaxHeight+e.nestedGridPaddingTop+e.nestedGridPaddingBottom+e.nestedGridBorderWidth)},z=function(n){var e=n.calculatedHeight,t=n.customHeight,r=n.customTheme;return t?("string"==typeof t?parseFloat(t):t)+r.nestedGridPaddingTop+r.nestedGridPaddingBottom:e},q=function(n){var e=n.match(/^(.+?)\[(\d+)\]$/);return e?{key:e[1],index:parseInt(e[2],10)}:{key:n,index:null}},G=function(n,e){var t=e+"";return t.includes(".")||t.includes("[")?t.split(".").reduce(function(n,e){if(null!=n){var t=q(e),r=t.index,o=n[t.key];return null!==r&&Array.isArray(o)&&(o=o[r]),o}},n):n[e]},V=function(n,e,t){var r=e+"";if(r.includes(".")||r.includes("[")){for(var o=r.split("."),i=n,a=0;o.length-1>a;a++){var u=q(o[a]),l=u.key,c=u.index;if(null==i[l]){var s=q(o[a+1]);i[l]=null!==s.index?[]:{}}if(i=i[l],null!==c){if(!Array.isArray(i))throw Error("Expected array at ".concat(o.slice(0,a+1).join("."),", but found ").concat(typeof i));for(;c>=i.length;)i.push(null);null==i[c]&&(i[c]={}),i=i[c]}}var d=q(o[o.length-1]),f=d.key,v=d.index;if(null!==v){for(Array.isArray(i[f])||(i[f]=[]);v>=i[f].length;)i[f].push(null);i[f][v]=t}else i[f]=t}else n[e]=t},j=function(n){return Array.isArray(n)&&n.length>0&&"object"==typeof n[0]&&null!==n[0]},K=function(n){var e=n.getRowId,t=R([],n.rowPath,!0);if(e){var r=e({row:n.row,depth:n.depth,index:n.index,rowPath:n.rowPath,rowIndexPath:n.rowIndexPath,groupingKey:n.groupingKey});t.push(r)}return t},U=function(n){return n.join("-")},_=function(n,e){var t=n[e];return j(t)?t:[]},J=function(n,e,t,r,o){var i=n+"",a=r.has(i)&&r.get(i)===e,u=o.has(i)&&o.get(i)===e;return t.has(e)?!u:a},Y=function(n){var e=n.depth,t=n.expandedDepths,r=n.expandedRows,o=n.collapsedRows,i=n.rowGrouping,a=void 0===i?[]:i,u=n.getRowId,l=n.displayPositionOffset,c=void 0===l?0:l,s=n.rowStateMap,d=n.hasLoadingRenderer,f=void 0!==d&&d,v=n.hasErrorRenderer,h=void 0!==v&&v,p=n.hasEmptyRenderer,w=void 0!==p&&p,m=n.headers,g=void 0===m?[]:m,b=n.rowHeight,x=n.headerHeight,y=n.customTheme,C=[],I=function(n,e,i,l,d,v,p){void 0===i&&(i=0),void 0===l&&(l=c),void 0===d&&(d=[]),void 0===v&&(v=[]),void 0===p&&(p=[]);var m=i,S=l;return n.forEach(function(i,l){var c,M,N=a[e],H=R(R([],d,!0),[l],!1),E=R(R([],v,!0),[l],!1),T=K({row:i,getRowId:u,depth:e,index:l,rowPath:H,rowIndexPath:E,groupingKey:N}),k=C.length,P={row:i,depth:e,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:0===e&&l===n.length-1,rowId:T,rowPath:H,rowIndexPath:E,absoluteRowIndex:m,parentIndices:p.length>0?R([],p,!0):void 0};C.push(P),m++,S++;var A=U(T);if(J(A,e,t,r,o)&&a.length>e){var F=null==s?void 0:s.get(A),D=_(i,N),L=g.find(function(n){return n.expandable&&n.nestedTable});if((null==L?void 0:L.nestedTable)&&D.length>0){var W=(null===(c=L.nestedTable.customTheme)||void 0===c?void 0:c.rowHeight)||b,O=(null===(M=L.nestedTable.customTheme)||void 0===M?void 0:M.headerHeight)||x,q=B({childRowCount:D.length,rowHeight:W,headerHeight:O,customTheme:y}),G=z({calculatedHeight:q,customHeight:L.nestedTable.height,customTheme:y}),V=R(R([],H,!0),[N],!1);C.push({row:{},depth:e+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:V,rowPath:V,rowIndexPath:E,nestedTable:{parentRow:i,expandableHeader:L,childAccessor:N,calculatedHeight:G},absoluteRowIndex:m}),m++,S++}else if(F&&(F.loading||F.error||F.isEmpty)){if(F.loading&&f||F.error&&h||F.isEmpty&&w){var j=R(R([],H,!0),[N],!1);C.push({row:{},depth:e+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:j,rowPath:j,rowIndexPath:E,stateIndicator:{parentRowId:A,parentRow:i,state:F},absoluteRowIndex:m,parentIndices:R(R([],p,!0),[k],!1)}),m++,S++}else if(F.loading&&!f){var Y=R(R([],H,!0),[N,"loading-skeleton"],!1);C.push({row:{},depth:e+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:Y,rowPath:Y,rowIndexPath:E,isLoadingSkeleton:!0,absoluteRowIndex:m,parentIndices:R(R([],p,!0),[k],!1)}),m++,S++}}else if(D.length>0){var X=R(R([],H,!0),[N],!1),$=R([],E,!0);m=I(D,e+1,m,S,X,$,R(R([],p,!0),[k],!1))}}}),m};return I(n.rows,void 0===e?0:e,0,c,[],[],[]),C},X=function(n,e){if(n.hide)return[];if(!n.children||0===n.children.length)return[n];if(e&&e.has(n.accessor)){var t=n.children.filter(function(n){var e=n.showWhen||k;return"parentCollapsed"===e||"always"===e}).flatMap(function(n){return X(n,e)});return n.singleRowChildren?R([n],t,!0):t}var r=n.children.filter(function(n){var e=n.showWhen||k;return"parentExpanded"===e||"always"===e}).flatMap(function(n){return X(n,e)});return n.singleRowChildren?R([n],r,!0):r},$=function(n){if(n.hide)return 0;if("number"==typeof n.width)return n.width;if("string"==typeof n.width&&n.width.endsWith("px"))return parseFloat(n.width);var e=document.getElementById(L({accessor:n.accessor,rowId:"header"}));return(null==e?void 0:e.offsetWidth)||150},Q=function(n){var e,t=n.width;"string"==typeof t&&t.includes("fr")&&(n.width=(null===(e=document.getElementById(L({accessor:n.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth)||150),n.children&&n.children.length>0&&n.children.forEach(function(n){Q(n)})},Z=function(n){return"number"==typeof n.minWidth?n.minWidth:E},nn=function(n,e){var t=[];return n.forEach(function(n){n.hide||t.push.apply(t,X(n,e))}),t},en=function(n,e){var t=e.rowTopPositions;if(0===t.length)return 0;if(0>=n)return 0;if(n>=e.totalHeight)return t.length-1;for(var r=0,o=t.length-1;o>r;){var i=Math.floor((r+o+1)/2);t[i]>n?o=i-1:r=i}return r},tn=function(n,e){if(!e||0===e.length)return 0;for(var t=0,r=0,o=e.length;o>r;){var i=Math.floor((r+o)/2);n>e[i][0]?r=i+1:o=i}for(var a=0;r>a;a++)t+=e[a][1];return t},rn=function(n){var e=n.bufferRowCount,t=n.contentHeight,r=n.scrollTop,o=n.tableRows,i=n.scrollDirection,a=void 0===i?"none":i,u=n.heightMap,l=n.rowHeight+1;if(!u){var c=e*l,s=c,d=c;"down"===a?(s=Math.max(l,.1*c),d=.9*c):"up"===a&&(s=.9*c,d=Math.max(l,.1*c));var f=r+t+d,v=Math.max(0,Math.floor(Math.max(0,r-s)/l)),h=Math.min(o.length,Math.ceil(f/l)),p=r+t,w=Math.max(0,Math.ceil(r/l)),m=Math.min(o.length,Math.floor(p/l)),g=r+t,b=Math.max(0,Math.floor(r/l)),x=Math.min(o.length,Math.ceil(g/l));return{rendered:{startIndex:v,endIndex:h,rows:o.slice(v,h)},fullyVisible:{startIndex:w,endIndex:m,rows:o.slice(w,m)},partiallyVisible:{startIndex:b,endIndex:x,rows:o.slice(b,x)}}}var y=u.rowTopPositions,C=e*l,I=C,R=C;"down"===a?(I=Math.max(l,.1*C),R=.9*C):"up"===a&&(I=.9*C,R=Math.max(l,.1*C));var S=r+t+R,M=en(Math.max(0,r-I),u),N=en(S,u)+1;N=Math.min(o.length,N);var H=r,E=r+t,T=en(H,u);H>y[T]&&(T=Math.min(T+1,o.length));var k=en(E,u);k=Math.min(o.length,k);var P=r+t,A=en(r,u),F=en(P,u)+1;return F=Math.min(o.length,F),{rendered:{startIndex:M,endIndex:N,rows:o.slice(M,N)},fullyVisible:{startIndex:T,endIndex:k,rows:o.slice(T,k)},partiallyVisible:{startIndex:A,endIndex:F,rows:o.slice(A,F)}}},on=function(n){var e=n.position;return e*(n.rowHeight+n.customTheme.rowSeparatorWidth)+tn(e,n.heightOffsets)},an=function(n,e){var t,r,o=n.position,i=e[o+1];return null!==(r=null===(t=null==i?void 0:i.parentIndices)||void 0===t?void 0:t.includes(o))&&void 0!==r&&r},un=function(n){var e=n.allTableRows,t=n.renderedRows,r=n.fullyVisibleRows,o=n.partiallyVisibleRows,i=n.partiallyVisibleRowIndex,a=n.recursionDepth,u=n.stickyParents,l=n.rowGrouping,c=o[i];if(!c||a>10)return{stickyParents:u,regularRows:t};var s=0;if(c.parentIndices&&c.parentIndices.length>0){for(var d=function(n){var t=e[n];if(t){var o=r.some(function(n){return n.position===t.position});if(c.rowIndexPath&&c.rowIndexPath.length>0){var i=e[c.parentIndices[c.parentIndices.length-1]],a=i.row[l[i.depth]];if(u.length>=(Array.isArray(a)?a:[]).length-c.rowIndexPath[c.rowIndexPath.length-1])return"break"}o||u.some(function(n){return U(n.rowId)===U(t.rowId)})||(u.push(t),s++)}},f=0,v=c.parentIndices;v.length>f&&"break"!==d(v[f]);f++);if(u.length>0){an(c,e)&&(u.push(c),s++);var h=o[i+=s];h&&(c=h)}}else if(an(c,e))return u.push(c),i++,un({allTableRows:e,renderedRows:t,fullyVisibleRows:r,partiallyVisibleRows:o,partiallyVisibleRowIndex:i,recursionDepth:a+1,stickyParents:u,rowGrouping:l});return an(c,e)?un({allTableRows:e,renderedRows:t,fullyVisibleRows:r,partiallyVisibleRows:o,partiallyVisibleRowIndex:i,recursionDepth:a+1,stickyParents:u,rowGrouping:l}):{stickyParents:u,regularRows:t}},ln=function(n,e,t){var r=n.getBoundingClientRect(),o=e.getBoundingClientRect(),i=10;if(o.top+i>r.top?e.scrollTop-=o.top-r.top+i:r.bottom>o.bottom-i&&(e.scrollTop+=r.bottom-o.bottom+i),t){var a=t.getBoundingClientRect();a.left+i>r.left?t.scrollLeft-=a.left-r.left+i:r.right>a.right-i&&(t.scrollLeft+=r.right-a.right+i)}},cn=function(n,e,t,r){var o=document.querySelector(".st-body-container"),i=document.querySelector(".st-body-main");if(o){!function(n,e){if(e){var t=document.querySelector('.st-header-main [data-col-index="'.concat(n,'"]'));if(t){var r=t.getBoundingClientRect(),o=e.getBoundingClientRect();o.left+10>r.left?e.scrollLeft-=o.left-r.left+10:r.right>o.right-10&&(e.scrollLeft+=r.right-o.right+10)}}}(n.colIndex,i);var a=e+t.rowSeparatorWidth,u=document.querySelector('.st-cell[data-row-index="'.concat(n.rowIndex,'"][data-col-index="').concat(n.colIndex,'"][data-row-id="').concat(n.rowId,'"]'));if(u&&r){var l=function(n,e,t,r){var o=rn({bufferRowCount:0,contentHeight:e.clientHeight,rowHeight:t,scrollTop:e.scrollTop,tableRows:r,scrollDirection:"none"}).fullyVisible;return n>=o.startIndex&&o.endIndex>n}(n.rowIndex,o,e,r);if(l)return void ln(u,o,i)}if(!u)return o.scrollTop=Math.max(0,n.rowIndex*a-o.clientHeight/3),void setTimeout(function(){var e=document.querySelector('.st-cell[data-row-index="'.concat(n.rowIndex,'"][data-col-index="').concat(n.colIndex,'"][data-row-id="').concat(n.rowId,'"]'));e&&ln(e,o,i)},100);ln(u,o,i)}},sn=function(n){var e=n.colIndex,t=n.rowId;return"".concat(n.rowIndex,"-").concat(e,"-").concat(t)},dn=c(void 0),fn=function(e){return n(dn.Provider,x({value:e.value},{children:e.children}))},vn=function(){var n=s(dn);if(void 0===n)throw Error("useTableContext must be used within a TableProvider");return n},hn=c(void 0),pn=function(e){var t=e.children,r=i(!1),o=r[0],a=r[1],l=u(function(){return{isScrolling:o,setIsScrolling:a}},[o]);return n(hn.Provider,x({value:l},{children:t}))},wn=function(){var n=s(hn);if(void 0===n)throw Error("useScrollState must be used within a ScrollStateProvider");return n},mn=function(r){var o=r.currentPage,a=r.footerRenderer,u=r.hideFooter,l=r.onPageChange,c=r.onNextPage,s=r.onUserPageChange,d=r.rowsPerPage,f=r.shouldPaginate,v=r.totalPages,h=r.totalRows,p=vn().icons,w=i(!0),m=w[0],g=w[1],b=o>1,y=v>o,R=o===v,S=Math.min((o-1)*d+1,h),M=Math.min(o*d,h),N=!b,H=!y&&!c||!m&&R,E=function(){return C(void 0,void 0,void 0,function(){var n;return I(this,function(e){switch(e.label){case 0:return 1>(n=o-1)?[3,2]:(l(n),s?[4,s(n)]:[3,2]);case 1:e.sent(),e.label=2;case 2:return[2]}})})},T=function(){return C(void 0,void 0,void 0,function(){var n,e;return I(this,function(t){switch(t.label){case 0:return n=o===v,e=o+1,c&&n?[4,c(o)]:[3,2];case 1:if(!t.sent())return g(!1),[2];t.label=2;case 2:return e>v&&!c?[3,4]:(l(e),s?[4,s(e)]:[3,4]);case 3:t.sent(),t.label=4;case 4:return[2]}})})},k=function(n){return C(void 0,void 0,void 0,function(){return I(this,function(e){switch(e.label){case 0:return 1>n||n>v?[3,2]:(l(n),s?[4,s(n)]:[3,2]);case 1:e.sent(),e.label=2;case 2:return[2]}})})};if(u||!f)return null;if(a)return n(e,{children:a({currentPage:o,totalPages:v,rowsPerPage:d,totalRows:h,startRow:S,endRow:M,onPageChange:k,onNextPage:T,onPrevPage:E,hasNextPage:!H,hasPrevPage:!N,nextIcon:p.next,prevIcon:p.prev})});var P=function(){if(15>=v)return Array.from({length:v},function(n,e){return e+1});var n,e,t=[];o>8?v-7>o?(n=o-7,e=o+7):(n=Math.max(1,v-15+1),e=v):(n=1,e=14),n>2?(t.push(1),t.push(-1)):2===n&&t.push(1);for(var r=n;e>=r;r++)t.push(r);return v-1>e?(t.push(-2),t.push(v)):e===v-1&&t.push(v),t}();return t("div",x({className:"st-footer"},{children:[n("div",x({className:"st-footer-info"},{children:t("span",x({className:"st-footer-results-text"},{children:["Showing ",S," to ",M," of ",h.toLocaleString()," results"]}))})),t("div",x({className:"st-footer-pagination"},{children:[P.map(function(e,t){return 0>e?n("span",x({className:"st-page-ellipsis"},{children:"..."}),t):n("button",x({onClick:function(){return k(e)},className:"st-page-btn ".concat(o===e?"active":""),"aria-label":"Go to page ".concat(e),"aria-current":o===e?"page":void 0},{children:e}),t)}),n("button",x({className:"st-next-prev-btn ".concat(N?"disabled":""),onClick:E,disabled:N,"aria-label":"Go to previous page"},{children:p.prev})),n("button",x({className:"st-next-prev-btn ".concat(H?"disabled":""),onClick:T,disabled:H,"aria-label":"Go to next page"},{children:p.next}))]}))]}))},gn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},bn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},xn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},yn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},Cn=function(e){return n("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:e.className,style:{height:"1em"}},{children:n("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},In=function(e){return n("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:e.className,style:x({height:"10px"},e.style)},{children:n("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},Rn=function(e){return n("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:e.className,style:{height:"1em"}},{children:n("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},Sn=function(e){return t("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 10",className:e.className,style:x({height:"10px",width:"16px"},e.style)},{children:[n("circle",{cx:"3",cy:"3",r:"1.5",fill:"currentColor"}),n("circle",{cx:"8",cy:"3",r:"1.5",fill:"currentColor"}),n("circle",{cx:"13",cy:"3",r:"1.5",fill:"currentColor"}),n("circle",{cx:"3",cy:"7",r:"1.5",fill:"currentColor"}),n("circle",{cx:"8",cy:"7",r:"1.5",fill:"currentColor"}),n("circle",{cx:"13",cy:"7",r:"1.5",fill:"currentColor"})]}))},Mn=function(e){return n("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:e.className,style:x({height:"1em"},e.style)},{children:n("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},Nn=function(){return n("svg",x({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},Hn=function(n){var e=n.headerContainerRef,t=n.mainSectionRef,r=n.scrollbarWidth,a=i(!1),u=a[0],l=a[1];return o(function(){var n=null==e?void 0:e.current;if(u&&n)return n.classList.add("st-header-scroll-padding"),n.style.setProperty("--st-after-width","".concat(r,"px")),function(){n.classList.remove("st-header-scroll-padding")}},[e,u,r]),o(function(){var n=null==t?void 0:t.current;if(n&&(null==e?void 0:e.current)){var r=function(){n&&l(n.scrollHeight>n.clientHeight)};r();var o=null,i=new ResizeObserver(function(){null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(function(){o=null,r()})});return i.observe(n),function(){null!==o&&(cancelAnimationFrame(o),o=null),n&&i.unobserve(n)}}},[e,t]),{isMainSectionScrollable:u}},En=function(e){var t=e.children,r=e.onClose,u=e.open,l=e.overflow,c=void 0===l?"auto":l,s=e.setOpen,d=e.width,f=e.containerRef,v=e.positioning,h=void 0===v?"fixed":v,p=vn().mainBodyRef,w=a(null),m=a(null),g=i("bottom-left"),b=g[0],y=g[1],C=i({}),I=C[0],R=C[1],S=i(!1),M=S[0],N=S[1];return o(function(){u&&w.current?(N(!1),!m.current&&w.current.parentElement&&(m.current=w.current.parentElement),requestAnimationFrame(function(){if(w.current&&m.current){var n,e=w.current,t=m.current.getBoundingClientRect(),r=e.offsetHeight,o=d||e.offsetWidth,i=(n=(null==f?void 0:f.current)?f.current.getBoundingClientRect():(null==p?void 0:p.current)?p.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-n.top,u="bottom",l={};(r>i&&a>=r||r>i&&a>i)&&(u="top");var c="left";o>n.right-t.right+t.width&&(c="right"),"fixed"===h?("bottom"===u?l.top=t.bottom+4:l.bottom=window.innerHeight-t.top+4,"left"===c?l.left=t.left:l.right=window.innerWidth-t.right):("bottom"===u?l.top=t.height+4:l.bottom=t.height+4,"left"===c?l.left=0:l.right=0),y("".concat(u,"-").concat(c)),R(l),N(!0)}})):u||N(!1)},[u,d,f,p,h]),o(function(){var n=function(n){u&&w.current&&w.current&&!w.current.contains(n.target)&&(s(!1),null==r||r())};return u&&window.addEventListener("scroll",n,!0),function(){window.removeEventListener("scroll",n,!0)}},[u,r,s]),o(function(){var n=function(n){if(w.current&&!w.current.contains(n.target)){var e=w.current.parentElement;e&&!e.contains(n.target)&&(s(!1),null==r||r())}},e=function(e){"Enter"===e.key&&n(e)};return u&&(document.addEventListener("mousedown",n,!0),document.addEventListener("keydown",e,!0)),function(){document.removeEventListener("mousedown",n,!0),document.removeEventListener("keydown",e,!0)}},[r,u,s]),o(function(){var n=function(n){"Escape"===n.key&&u&&(s(!1),null==r||r())};return u&&document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}},[r,u,s]),u?n("div",x({ref:w,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(n){return n.stopPropagation()},onMouseDown:function(n){return n.stopPropagation()},onTouchStart:function(n){return n.stopPropagation()},style:x(x({position:h,width:d?"".concat(d,"px"):"auto",visibility:M?"visible":"hidden"},I),{overflow:c})},{children:t})):null},Tn=function(e){var t=e.children,r=e.onClick,o=e.isSelected,i=void 0!==o&&o,a=e.disabled,u=void 0!==a&&a,l=e.className,c=void 0===l?"":l;return n("div",x({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(u?"disabled":""," ").concat(c),onClick:function(){!u&&r&&r()},role:"option","aria-selected":i,"aria-disabled":u},{children:t}))},kn=function(e){var r=e.onBlur,o=e.onChange,a=e.open,u=e.setOpen,l=i(e.value),c=l[0],s=l[1],d=function(n){s(n),o(n),u(!1),r()};return t(En,x({open:a,onClose:function(){r()},setOpen:u,width:120},{children:[n(Tn,x({isSelected:!0===c,onClick:function(){return d(!0)}},{children:"True"})),n(Tn,x({isSelected:!1===c,onClick:function(){return d(!1)}},{children:"False"}))]}))},Pn=function(e){var t=e.defaultValue,r=e.onBlur,o=e.onChange,i=a(null);return n("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(n){o(n.target.value)},onKeyDown:function(n){n.stopPropagation(),"Enter"!==n.key&&"Escape"!==n.key||r()},onMouseDown:function(n){n.stopPropagation()}})},An=function(e){var t=e.defaultValue,r=e.onBlur,o=e.onChange,i=a(null);return n("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:""+t,onBlur:r,onChange:function(n){var e=n.target.value;/^\d*\.?\d*$/.test(e)&&o(e)},onKeyDown:function(n){n.stopPropagation(),"Enter"!==n.key&&"Escape"!==n.key||r()},onMouseDown:function(n){n.stopPropagation()}})},Fn=d(function(){return import("./Animate-6dc785ab.js")}),Dn=d(function(){return import("./DatePicker-f0d8a106.js")}),Ln=d(function(){return Promise.resolve().then(function(){return Zt})}),Wn=d(function(){return Promise.resolve().then(function(){return er})}),On=function(e){var t=y(e,["parentRef","tableRow"]);return n(f,x({fallback:n("div",x({},t))},{children:n(Fn,x({},e))}))},Bn=function(e){return n(f,x({fallback:n("div",x({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:n(Dn,x({},e))}))},zn=function(e){var t=e.width,r=e.height;return n(f,x({fallback:n("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:n(Ln,x({},e))}))},qn=function(e){var t=e.width,r=e.height;return n(f,x({fallback:n("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:n(Wn,x({},e))}))},Gn=function(n){if(!n)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(n)){var e=n.split("-").map(Number);return new Date(e[0],e[1]-1,e[2],12,0,0)}var t=new Date(n);return isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate(),12,0,0)},Vn=function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0)},jn=function(n){if(!n)return new Date;if("string"==typeof n)return Gn(n);if("number"==typeof n){var e=new Date(n);return isNaN(e.getTime())?new Date:Vn(e)}return n instanceof Date?Vn(n):new Date},Kn=function(n){return n?Gn(""+n):new Date},Un=function(e){var t=e.onBlur,r=e.onChange,i=e.open,a=e.setOpen,u=e.value;o(function(){var n=setTimeout(function(){var n=document.querySelector(".st-dropdown-container");n instanceof HTMLElement&&n.focus()},0);return function(){return clearTimeout(n)}},[]);var l=function(){t()};return n(En,x({open:i,onClose:l,setOpen:a,overflow:"hidden",width:240},{children:n(Bn,{value:Kn(u),onChange:function(n){var e=n.toISOString().split("T")[0];r(e),a(!1),t()},onClose:l})}))},_n=function(e){var t=e.onBlur,r=e.onChange,o=e.open,a=e.options,u=e.setOpen,l=i(e.value||""),c=l[0],s=l[1];return n(En,x({open:o,onClose:function(){t()},setOpen:u,width:150},{children:n("div",x({className:"st-enum-dropdown-content"},{children:a.map(function(e){return n(Tn,x({isSelected:c===e.value,onClick:function(){return s(n=e.value),r(n),u(!1),void t();var n}},{children:e.label}),e.value)})}))}))},Jn=function(e){var t=e.enumOptions,r=void 0===t?[]:t,o=e.onChange,i=e.setIsEditing,a=e.type,u=void 0===a?"string":a,l=e.value,c=function(){i(!1)};return"boolean"===u&&"boolean"==typeof l?n(kn,{onBlur:c,onChange:function(n){return o(n)},open:!0,setOpen:i,value:l}):"date"===u?n(Un,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?n(_n,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?n(An,{defaultValue:l,onBlur:c,onChange:function(n){var e=""===n?0:parseFloat(n);o(isNaN(e)?0:e)}}):n(Pn,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},Yn=0,Xn=function(){return function(n){var e=n.callback,t=n.callbackProps,r=n.limit,o=Date.now();0!==Yn&&r>o-Yn||(Yn=o,e(t))}},$n=function(n){var e=a(n);return o(function(){JSON.stringify(e.current)!==JSON.stringify(n)&&(e.current=n)},[n]),e.current},Qn=function(n){if(null===n||"object"!=typeof n)return n;if(Array.isArray(n))return n.map(Qn);var e={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=Qn(n[t]));return e},Zn=function(n,e){return n.filter(function(n){return n.pinned===e}).some(function(n){return!n.hide&&!n.excludeFromRender})};function ne(n){return{pinnedLeft:n.filter(function(n){return"left"===n.pinned}),unpinned:n.filter(function(n){return!n.pinned}),pinnedRight:n.filter(function(n){return"right"===n.pinned})}}function ee(n,e){return!0===n.isEssential||e.has(n.accessor+"")}function te(n,e){for(var t=!1,r=0,o=n;o.length>r;r++){var i=o[r];if(!i.isSelectionColumn&&!i.excludeFromRender){var a=ee(i,e);if(a&&t)return!1;a||(t=!0)}}return!0}function re(n,e){var t,r=ne(n),o=r.unpinned,i=r.pinnedRight;if(!te(r.pinnedLeft,e))return!1;if(!te(o,e))return!1;if(!te(i,e))return!1;for(var a=0,u=n;u.length>a;a++){var l=u[a];if((null===(t=l.children)||void 0===t?void 0:t.length)&&!oe(l.children,e))return!1}return!0}function oe(n,e){var t;if(!te(n,e))return!1;for(var r=0,o=n;o.length>r;r++){var i=o[r];if((null===(t=i.children)||void 0===t?void 0:t.length)&&!oe(i.children,e))return!1}return!0}function ie(n){var e=ne(n),t=e.unpinned,r=e.pinnedRight;return{left:e.pinnedLeft.map(function(n){return n.accessor}),main:t.map(function(n){return n.accessor}),right:r.map(function(n){return n.accessor})}}function ae(n,e,t){var r=n.filter(function(n){return ee(e.get(n+""),t)}),o=n.filter(function(n){return!ee(e.get(n+""),t)});return R(R([],r,!0),o,!0)}function ue(n,e,t){var r=new Set(n.map(function(n){return n.accessor+""})),o=R(R(R([],e.left,!0),e.main,!0),e.right,!0);if(o.length!==r.size)return null;for(var i=0,a=o;a.length>i;i++)if(!r.has(a[i]+""))return null;var u=new Map(n.map(function(n){return[n.accessor+"",n]})),l=ae(e.left,u,t),c=ae(e.main,u,t),s=ae(e.right,u,t),d=function(n,e){var t=x({},n);return"left"===e?t.pinned="left":"right"===e?t.pinned="right":delete t.pinned,t};return R(R(R([],l.map(function(n){return d(u.get(n+""),"left")}),!0),c.map(function(n){return d(u.get(n+""),void 0)}),!0),s.map(function(n){return d(u.get(n+""),"right")}),!0)}function le(n,e,t,r){var o=e+"",i=ie(n),a=i.left.filter(function(n){return n+""!==o}),u=i.main.filter(function(n){return n+""!==o}),l=i.right.filter(function(n){return n+""!==o}),c=n.find(function(n){return n.accessor+""===o});return c&&(!ee(c,r)||"main"!==t||"left"!==c.pinned&&"right"!==c.pinned)?("left"===t?a.push(e):"right"===t?l.push(e):u.push(e),ue(n,{left:a,main:u,right:l},r)):null}var ce=Date.now(),se={screenX:0,screenY:0},de=function(n,e,t){void 0===t&&(t=[]);for(var r=0;n.length>r;r++){var o=n[r];if(o.accessor===e)return R(R([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=de(o.children,e,R(R([],t,!0),[r],!1));if(i)return i}}return null},fe=function(n,e){for(var t=n,r=0;e.length-1>r;r++)t=t[e[r]].children;return t},ve=function(n,e,t){if(1===e.length)return t;for(var r=n,o=0;e.length-2>o;o++)r=r[e[o]].children;return r[e[e.length-2]].children=t,n},he=function(n){return"left"===n.pinned?"left":"right"===n.pinned?"right":"main"};function pe(n,e,t){var r=Qn(n),o=!1;function i(n,e){for(var t=n,r=0;e.length-1>r;r++)t=t[e[r]].children;return t[e[e.length-1]]}function a(n,e,t){for(var r=n,i=0;e.length-1>i;i++){if(!r[e[i]].children){o=!0;break}r=r[e[i]].children}r[e[e.length-1]]=t}var u=i(r,e);return a(r,e,i(r,t)),a(r,t,u),{newHeaders:r,emergencyBreak:o}}var we=function(n){var e=n.draggedHeaderRef,t=n.essentialAccessors,r=n.headers,o=n.hoveredHeaderRef,i=n.onColumnOrderChange,a=n.onTableHeaderDragEnd,u=vn().setHeaders,l=$n(r);return{handleDragStart:function(n){e.current=n,ce=Date.now()},handleDragOver:function(n){var i=n.event,u=n.hoveredHeader;if(i.preventDefault(),r&&e.current){var c=i.currentTarget.getAnimations().some(function(n){return"running"===n.playState}),s=i.screenX,d=i.screenY,f=Math.sqrt(Math.pow(s-se.screenX,2)+Math.pow(d-se.screenY,2));o.current=u;var v,h=e.current,p=!1;if(he(h)===he(u)){var w=r,m=de(w,h.accessor),g=de(w,u.accessor);if(m&&g){var b=m.length,x=g.length,y=g;if(b!==x){var C=x-b;C>0&&(y=g.slice(0,-C))}if((I=m).length===(R=y).length&&(1===I.length||I.slice(0,-1).every(function(n,e){return n===R[e]}))){var I,R,S=pe(w,m,y);v=S.newHeaders,p=S.emergencyBreak;var M=null!=t?t:new Set;if((0>=M.size||p||re(v,M))&&!(c||u.accessor===h.accessor||10>f||JSON.stringify(v)===JSON.stringify(r)||p)){var N=Date.now();JSON.stringify(v)===JSON.stringify(l)&&(1500>N-ce||40>f)||(ce=N,se={screenX:s,screenY:d},a(v))}}}}}},handleDragEnd:function(){e.current=null,o.current=null,setTimeout(function(){u(function(n){return R([],n,!0)}),null==i||i(r)},10)}}},me=function(e){var r=e.checked,o=void 0!==r&&r,i=e.children,a=e.disabled,u=void 0!==a&&a,l=e.onChange,c=e.ariaLabel;return t("label",x({className:"st-checkbox-label".concat(u?" st-checkbox-disabled":"")},{children:[n("input",{checked:o,className:"st-checkbox-input",disabled:u,onChange:function(){!u&&l&&l(!o)},onKeyDown:function(n){" "===n.key&&n.stopPropagation()},type:"checkbox","aria-label":c,"aria-checked":o}),n("span",x({className:"st-checkbox-custom ".concat(o?"st-checked":""),"aria-hidden":"true"},{children:o&&n(In,{className:"st-checkbox-checkmark"})})),i]}))},ge=function(e){var t,r=e.content,o=e.header;return o.valueFormatter?o.valueFormatter({accessor:o.accessor,colIndex:e.colIndex,row:e.row,rowIndex:e.rowIndex,value:r}):"lineAreaChart"===o.type&&Array.isArray(r)?(t=r.filter(function(n){return"number"==typeof n})).length>0?n(zn,x({data:t},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(r)?(t=r.filter(function(n){return"number"==typeof n})).length>0?n(qn,x({data:t},o.chartOptions)):null:"boolean"==typeof r?r?"True":"False":Array.isArray(r)?0===r.length?"[]":r.map(function(n){return"object"==typeof n&&null!==n?JSON.stringify(n):n+""}).join(", "):"date"===o.type&&null!==r&&("string"==typeof r||"number"==typeof r||"object"==typeof r&&r instanceof Date)?jn(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):r},be=r.memo(function(r){var c=r.borderClass,s=r.colIndex,d=r.displayRowNumber,f=r.gridColumnStart,v=r.header,h=r.isHighlighted,p=r.isInitialFocused,w=r.nestedIndex,m=r.parentHeader,g=r.rowIndex,b=r.tableRow,y=vn(),C=y.canExpandRowGroup,I=y.cellRegistry,R=y.cellUpdateFlash,S=y.collapsedRows,M=y.columnBorders,N=y.draggedHeaderRef,H=y.enableRowSelection,E=y.essentialAccessors,T=y.expandedDepths,k=y.expandedRows,P=y.handleMouseDown,A=y.handleMouseOver,F=y.handleRowSelect,D=y.headers,W=y.hoveredHeaderRef,B=y.icons,z=y.isCopyFlashing,q=y.isLoading,K=y.isRowSelected,_=y.isWarningFlashing,Y=y.onCellEdit,X=y.onCellClick,$=y.onRowGroupExpand,Q=y.onTableHeaderDragEnd,Z=y.rowButtons,nn=y.rowGrouping,en=y.setCollapsedRows,tn=y.setExpandedRows,rn=y.setRowStateMap,on=y.rowsWithSelectedCells,an=y.selectedColumns,un=y.tableBodyContainerRef,ln=y.theme,cn=y.useOddColumnBackground,sn=b.depth,dn=b.row,fn=b.rowPath,hn=b.rowIndexPath,pn=b.absoluteRowIndex,wn=b.rowId,mn=i(G(dn,v.accessor)),gn=mn[0],bn=mn[1],xn=i(!1),yn=xn[0],Cn=xn[1],In=i(!1),Rn=In[0],Sn=In[1],Mn=i(!1),Nn=Mn[0],Hn=Mn[1],En=a(null),Tn=U(wn),kn=nn&&nn[sn],Pn=!!kn&&function(n,e){return!!e&&j(n[e])}(dn,kn),An=nn&&nn.length>sn,Fn=!C||C(dn),Dn=!!v.nestedTable,Ln=J(Tn,sn,T,k,S),Wn=z({rowIndex:g,colIndex:s,rowId:Tn}),Bn=_({rowIndex:g,colIndex:s,rowId:Tn}),zn=u(function(){var n,e,t;if(!M)return!1;var r=D.filter(function(n){return"left"===n.pinned}),o=D.filter(function(n){return!n.pinned}),i=D.filter(function(n){return"right"===n.pinned});return"left"===v.pinned?(null===(n=r[r.length-1])||void 0===n?void 0:n.accessor)===v.accessor:"right"===v.pinned?(null===(e=i[i.length-1])||void 0===e?void 0:e.accessor)===v.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===v.accessor},[M,D,v.accessor,v.pinned]),qn=we({draggedHeaderRef:N,essentialAccessors:E,headers:D,hoveredHeaderRef:W,onTableHeaderDragEnd:Q}).handleDragOver,Gn=Xn(),Vn=L({accessor:v.accessor,rowId:Tn}),jn=O({rowId:Tn,accessor:v.accessor}),Kn=v.isSelectionColumn&&H;o(function(){if(I){var n="".concat(Tn,"-").concat(v.accessor);return I.set(n,{updateContent:function(n){gn!==n?(bn(n),R&&(Sn(!0),En.current&&clearTimeout(En.current),En.current=setTimeout(function(){Sn(!1)},800))):bn(n)}}),function(){I.delete(n),En.current&&clearTimeout(En.current)}}},[I,R,Tn,v.accessor,gn]),o(function(){if(Rn){var n=setTimeout(function(){Sn(!1)},850);return function(){return clearTimeout(n)}}},[Rn]),o(function(){bn(G(dn,v.accessor))},[dn,v.accessor]);var Un="boolean"===v.type||"date"===v.type||"enum"===v.type,_n=!!(null==v?void 0:v.isEditable)||!(!X||Kn),Yn=an.has(s),$n=h&&!Yn,Qn=u(function(){return!!Kn&&on.has(Tn+"")},[Kn,on,Tn]),Zn=null==m?void 0:m.singleRowChildren,ne="st-cell ".concat(sn>0&&v.expandable?"st-cell-depth-".concat(sn):""," ").concat($n?p?"st-cell-selected-first ".concat(c):"st-cell-selected ".concat(c):""," ").concat(Yn?p?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(_n?"clickable":""," ").concat(Rn?p?"st-cell-updating-first":"st-cell-updating":""," ").concat(Wn?p?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Bn?p?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(cn?w%2==0?"even-column":"odd-column":""," ").concat(Kn?"st-selection-cell":""," ").concat(Qn?"st-selection-has-highlighted-cell":""," ").concat(zn?"st-last-column":""," ").concat(Zn?"st-sub-cell":""," ").concat(Nn?"hovered":""),ee=null!=f?{gridColumn:f}:void 0,te=l(function(n){null==n&&(n="number"===v.type?0:"boolean"!==v.type&&""),bn(n),V(dn,v.accessor,n),null==Y||Y({accessor:v.accessor,newValue:n,row:dn,rowIndex:g})},[v.accessor,v.type,Y,dn,g]),re=l(function(n){n.stopPropagation();var e=J(Tn,sn,T,k,S),t=Tn+"";if(e?(en(function(n){var e=new Map(n);return e.set(t,sn),e}),tn(function(n){var e=new Map(n);return e.delete(t),e})):(tn(function(n){var e=new Map(n);return e.set(t,sn),e}),en(function(n){var e=new Map(n);return e.delete(t),e})),e&&rn(function(n){var e=new Map(n);return e.delete(Tn),e}),$){var r=v.pinned;$({depth:sn,event:n,groupingKey:kn,groupingKeys:nn||[],isExpanded:!e,row:dn,rowIndexPath:hn||[],rowIdPath:fn,setEmpty:function(n,e){rn(function(t){var o=new Map(t),i=o.get(Tn)||{};return o.set(Tn,x(x({},i),{isEmpty:n,emptyMessage:e,loading:!1,error:null,triggerSection:r})),o})},setError:function(n){rn(function(e){var t=new Map(e),o=t.get(Tn)||{};return t.set(Tn,x(x({},o),{error:n,loading:!1,isEmpty:!1,triggerSection:r})),t})},setLoading:function(n){n?rn(function(n){var e=new Map(n),t=e.get(Tn)||{};return e.set(Tn,x(x({},t),{loading:!0,error:null,isEmpty:!1,triggerSection:r})),e}):setTimeout(function(){rn(function(n){var e=new Map(n),t=e.get(Tn)||{};return e.set(Tn,x(x({},t),{loading:!1,error:null,isEmpty:!1,triggerSection:r})),e})},0)}})}},[S,kn,sn,T,k,v.pinned,$,dn,nn,Tn,hn,fn,en,tn,rn]);return q||b.isLoadingSkeleton?n("div",x({className:ne,style:ee},{children:n("span",x({className:"st-cell-content ".concat("right"===v.align?"right-aligned":"center"===v.align?"center-aligned":"left-aligned")},{children:n("div",{className:"st-loading-skeleton"})}))})):!yn||Un||Kn?t(On,x({className:ne,"data-accessor":v.accessor,"data-col-index":s,"data-row-id":Tn,"data-row-index":g,role:"gridcell","aria-colindex":s+1,id:Vn,onClick:function(){X&&!Kn&&X({accessor:v.accessor,colIndex:s,row:dn,rowIndex:g,value:gn})},onDoubleClick:function(){return v.isEditable&&!Kn&&Cn(!0)},onDragOver:function(n){Kn||Gn({callback:qn,callbackProps:{event:n,hoveredHeader:v},limit:50})},onKeyDown:function(n){yn||Kn||"F2"!==n.key&&"Enter"!==n.key||!v.isEditable||yn||(n.preventDefault(),Cn(!0))},onMouseDown:function(n){yn||Kn||(n.preventDefault(),P({rowIndex:g,colIndex:s,rowId:Tn}))},onMouseEnter:function(){Hn(!0)},onMouseLeave:function(){Hn(!1)},onMouseOver:function(){yn||Kn||A({rowIndex:g,colIndex:s,rowId:Tn})},parentRef:un,style:ee,tableRow:b},{children:[v.expandable&&An?n("div",x({className:"st-icon-container st-expand-icon-container ".concat(Fn&&(Pn||$||Dn)?Ln?"expanded":"collapsed":"placeholder"),onClick:Fn&&(Pn||$||Dn)?function(n){return re(n)}:void 0,role:Fn&&(Pn||$||Dn)?"button":"presentation",tabIndex:Fn&&(Pn||$||Dn)?0:-1,"aria-label":Fn&&(Pn||$||Dn)?"".concat(Ln?"Collapse":"Expand"," row group"):void 0,"aria-expanded":Fn&&(Pn||$||Dn)?Ln:void 0,"aria-hidden":!(Fn&&(Pn||$||Dn)),onKeyDown:Fn&&(Pn||$||Dn)?function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),re(n))}:void 0},{children:B.expand})):null,n("span",x({className:"st-cell-content ".concat("right"===v.align?"right-aligned":"center"===v.align?"center-aligned":"left-aligned")},{children:q||b.isLoadingSkeleton?n("div",{className:"st-loading-skeleton"}):n(e,{children:Kn?t("div",x({className:"st-selection-cell-content"},{children:[n("div",x({className:"st-selection-control"},{children:Nn||K&&K(Tn+"")?n(me,{checked:!!K&&K(Tn+""),onChange:function(n){F&&F(Tn+"",n)},ariaLabel:"Select row ".concat(d+1)}):n("span",x({className:"st-row-number"},{children:d+1}))})),function(){if(!Z||!Kn||0===Z.length)return null;if(!(Nn||K&&K(Tn+"")))return null;var e={row:dn,rowIndex:d};return n("div",x({className:"st-row-buttons",role:"group","aria-label":"Actions for row ".concat(d+1)},{children:Z.map(function(t,r){return n("span",x({className:"st-row-button"},{children:t(e)}),r)})}))}()]})):v.cellRenderer?function(){var n;return v.cellRenderer({accessor:v.accessor,colIndex:s,row:dn,rowIndex:pn,rowPath:fn,theme:ln,value:gn,formattedValue:null===(n=null==v?void 0:v.valueFormatter)||void 0===n?void 0:n.call(v,{accessor:v.accessor,colIndex:s,row:dn,rowIndex:g,value:gn})})}():ge({content:gn,header:v,colIndex:s,row:dn,rowIndex:g})})})),!q&&!b.isLoadingSkeleton&&yn&&Un&&!Kn&&n(Jn,{enumOptions:v.enumOptions,onChange:te,setIsEditing:Cn,type:v.type,value:gn})]}),jn):n("div",x({className:"st-cell-editing",id:L({accessor:v.accessor,rowId:Tn}),style:ee,onMouseDown:function(n){return n.stopPropagation()},onKeyDown:function(n){return n.stopPropagation()}},{children:n(Jn,{enumOptions:v.enumOptions,onChange:te,setIsEditing:Cn,type:v.type,value:gn})}))},function(n,e){if(n.rowIndex!==e.rowIndex||n.colIndex!==e.colIndex||n.isHighlighted!==e.isHighlighted||n.isInitialFocused!==e.isInitialFocused||n.borderClass!==e.borderClass)return!1;if(n.tableRow!==e.tableRow){if(n.tableRow.row!==e.tableRow.row)return!1;if(n.tableRow.position!==e.tableRow.position||n.tableRow.displayPosition!==e.tableRow.displayPosition)return!1}return(n.header===e.header||n.header.accessor===e.header.accessor&&n.header.isEditable===e.header.isEditable&&n.header.type===e.header.type&&n.header.cellRenderer===e.header.cellRenderer&&n.header.valueFormatter===e.header.valueFormatter)&&n.parentHeader===e.parentHeader&&n.displayRowNumber===e.displayRowNumber&&n.nestedIndex===e.nestedIndex&&n.gridColumnStart===e.gridColumnStart}),xe=function(n,e){return!n||n.visibleAccessors.has(e)},ye=function(n,e){if(n){var t=n.trackIndexByAccessor.get(e);return void 0===t?void 0:t+1}},Ce=function(e){var r=e.columnIndices,o=e.columnWindow,i=e.displayRowNumber,a=e.header,u=e.headers,l=e.nestedIndex,c=e.parentHeader,s=e.pinned,d=e.rootPinned,f=e.rowIndex,h=e.rowIndices,p=e.tableRow,w=r[a.accessor],m=vn(),g=m.getBorderClass,b=m.isSelected,x=m.isInitialFocusedCell,y=m.collapsedHeaders,C=U(p.rowId);if(a.children&&a.children.length>0){var I=a.children.filter(function(n){return W({header:n,pinned:s,headers:u,collapsedHeaders:y,rootPinned:d})});if(a.singleRowChildren){var R=xe(o,a.accessor),S={rowIndex:f,colIndex:w,rowId:C},M=g(S),N=b(S),H=x(S),E=L({accessor:a.accessor,rowId:C});return t(v,{children:[R&&n(be,{borderClass:M,colIndex:w,displayRowNumber:i,gridColumnStart:ye(o,a.accessor),header:a,isHighlighted:N,isInitialFocused:H,nestedIndex:l,parentHeader:c,rowIndex:f,tableRow:p},E),I.map(function(e){var t=L({accessor:e.accessor,rowId:C});return n(Ce,{columnIndices:r,columnWindow:o,displayRowNumber:i,rootPinned:d,header:e,headers:u,nestedIndex:l,parentHeader:a,pinned:s,rowIndex:f,rowIndices:h,tableRow:p},t)})]})}return n(v,{children:I.map(function(e){var t=L({accessor:e.accessor,rowId:C});return n(Ce,{columnIndices:r,columnWindow:o,displayRowNumber:i,rootPinned:d,header:e,headers:u,nestedIndex:l,parentHeader:a,pinned:s,rowIndex:f,rowIndices:h,tableRow:p},t)})})}if(!xe(o,a.accessor))return null;var T={rowIndex:f,colIndex:w,rowId:C},k=g(T),P=b(T),A=x(T),F=L({accessor:a.accessor,rowId:C});return n(be,{borderClass:k,colIndex:w,displayRowNumber:i,gridColumnStart:ye(o,a.accessor),header:a,isHighlighted:P,isInitialFocused:A,nestedIndex:l,parentHeader:c,rowIndex:f,tableRow:p},F)},Ie=r.memo(function(t){var r=t.columnIndexStart,o=t.columnIndices,i=t.columnWindow,a=t.headers,u=t.pinned,l=t.rowIndex,c=t.displayRowNumber,s=t.rowIndices,d=t.tableRow,f=vn().collapsedHeaders,v=a.filter(function(n){return W({header:n,pinned:u,headers:a,collapsedHeaders:f,rootPinned:n.pinned})});return n(e,{children:v.map(function(e,t){var f=t+(null!=r?r:0);if(i&&!function(n){return!(!n.children||0>=n.children.length)}(e)&&!xe(i,e.accessor))return null;var v=U(d.rowId),h=L({accessor:e.accessor,rowId:v});return n(Ce,{columnIndices:o,columnWindow:i,displayRowNumber:c,rootPinned:e.pinned,header:e,headers:a,nestedIndex:f,pinned:u,rowIndex:l,rowIndices:s,tableRow:d},h)})})},function(n,e){return n.rowIndex===e.rowIndex&&n.displayRowNumber===e.displayRowNumber&&n.columnIndexStart===e.columnIndexStart&&(n.tableRow===e.tableRow||n.tableRow.row===e.tableRow.row)&&n.pinned===e.pinned&&n.headers===e.headers&&n.columnIndices===e.columnIndices&&n.columnWindow===e.columnWindow}),Re=function(e){var t=e.rowState,r=e.loadingStateRenderer,o=e.errorStateRenderer,i=e.emptyStateRenderer,a=null;return t.loading&&r?a=r:t.error&&o?a=o:t.isEmpty&&i&&(a=i),a?n("div",x({className:"st-cell st-state-row-cell",style:{gridColumn:"1 / -1",padding:0}},{children:a})):null},Se=function(e){var t=e.calculatedHeight,r=e.childAccessor,o=e.depth,i=e.expandableHeader,a=e.index,u=e.parentRow,l=e.position,c=vn(),s=c.theme,d=c.rowGrouping,f=c.rowHeight,v=c.heightOffsets,h=c.customTheme,p=c.loadingStateRenderer,w=c.errorStateRenderer,m=c.emptyStateRenderer,g=c.icons,b=i.nestedTable;if(!b)return null;var y=G(u,r),C=Array.isArray(y)?y:[],I=d&&d[o+1]?null==d?void 0:d.slice(o+1):void 0,R=b.customTheme?x(x({},h),b.customTheme):h,S=function(n){var e=n.calculatedHeight,t=n.customHeight,r=n.customTheme;return t?"string"==typeof t?t:"".concat(t,"px"):"".concat(e-r.nestedGridPaddingTop-r.nestedGridPaddingBottom,"px")}({calculatedHeight:t,customHeight:b.height,customTheme:h}),M=z({calculatedHeight:t,customHeight:b.height,customTheme:h});return n("div",x({className:"st-row st-nested-grid-row","data-index":a,style:{transform:"translate3d(0, ".concat(on({position:l,rowHeight:f,heightOffsets:v,customTheme:h}),"px, 0)"),height:"".concat(M,"px"),paddingTop:"".concat(h.nestedGridPaddingTop,"px"),paddingBottom:"".concat(h.nestedGridPaddingBottom,"px")}},{children:n(Xt,x({},b,{rows:C,theme:s,customTheme:R,height:S,rowGrouping:I,loadingStateRenderer:p,errorStateRenderer:w,emptyStateRenderer:m,icons:g}))}))},Me=r.memo(function(e){var t=e.columnIndices,r=e.columnIndexStart,o=e.columnWindow,i=e.gridTemplateColumns,a=e.headers,u=e.index,l=e.pinned,c=e.rowHeight,s=e.rowIndices,d=e.setHoveredIndex,f=e.tableRow,v=e.isSticky,h=void 0!==v&&v,p=e.stickyIndex,w=void 0===p?0:p,m=e.stickyOffset,g=void 0===m?0:m,b=e.stickyZIndex,y=vn(),C=y.customTheme,I=y.emptyStateRenderer,R=y.errorStateRenderer,S=y.heightOffsets,M=y.isAnimating,N=y.isRowSelected,H=y.loadingStateRenderer,E=y.maxHeaderDepth,T=y.useHoverRowBackground,k=y.useOddEvenRowBackground,P=f.position,A=f.displayPosition,F=f.stateIndicator,D=f.nestedTable;if(D)return l?n("div",{className:"st-row st-nested-grid-spacer","data-index":u,style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),"px, 0)"),height:"".concat(D.calculatedHeight,"px")}}):n(Se,{calculatedHeight:D.calculatedHeight,childAccessor:D.childAccessor,depth:f.depth-1,expandableHeader:D.expandableHeader,index:u,parentRow:D.parentRow,position:P});if(F)return n("div",F.state.triggerSection===l&&(F.state.loading&&H||F.state.error&&R||F.state.isEmpty&&I)?x({className:"st-row st-state-row","data-index":u,style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),"px, 0)"),height:"".concat(c,"px")}},{children:n(Re,{parentRow:F.parentRow,rowState:F.state,gridTemplateColumns:i,loadingStateRenderer:H,errorStateRenderer:R,emptyStateRenderer:I})}):{className:"st-row st-state-row-spacer","data-index":u,style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),"px, 0)"),height:"".concat(c,"px")}});var L=P%2==0,W=U(f.rowId),O=!!N&&N(W),B=h?{gridTemplateColumns:i,transform:"translateY(".concat(w*(c+1)+g,"px)"),height:"".concat(c,"px"),position:"absolute",top:0,left:0,zIndex:b}:{gridTemplateColumns:i,top:on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),height:"".concat(c,"px")};return n("div",x({className:"st-row ".concat(h?"st-sticky-parent":""," ").concat(k?L?"even":"odd":""," ").concat(O?"selected":""),"data-index":P,role:"row","aria-rowindex":P+E+1,onMouseEnter:function(){!M&&T&&d(P)},style:B},{children:n(Ie,{columnIndexStart:r,columnIndices:t,columnWindow:o,displayRowNumber:A,headers:a,pinned:l,rowIndex:P,rowIndices:s,tableRow:f},W)}))},function(n,e){return!((e.tableRow.nestedTable||e.tableRow.stateIndicator)&&n.index!==e.index)&&n.tableRow.position===e.tableRow.position&&n.tableRow.displayPosition===e.tableRow.displayPosition&&n.tableRow.row===e.tableRow.row&&n.tableRow.stateIndicator===e.tableRow.stateIndicator&&n.rowHeight===e.rowHeight&&n.gridTemplateColumns===e.gridTemplateColumns&&n.pinned===e.pinned&&n.headers===e.headers&&n.columnIndices===e.columnIndices&&n.columnWindow===e.columnWindow&&n.columnIndexStart===e.columnIndexStart}),Ne=function(e){var t=e.displayStrongBorder,r=e.position,o=e.rowHeight,i=e.templateColumns,u=e.isSticky,l=void 0!==u&&u,c=vn(),s=c.heightOffsets,d=c.customTheme,f=a(null),v=l?r:function(n){var e=n.position,t=n.customTheme;return e*(n.rowHeight+t.rowSeparatorWidth)-t.rowSeparatorWidth+tn(e,n.heightOffsets)}({position:r,rowHeight:o,heightOffsets:s,customTheme:d}),h=l?{position:"absolute",top:0,left:0,transform:"translateY(".concat(v,"px)")}:{transform:"translate3d(0, ".concat(v,"px, 0)")};return n("div",x({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(n){n.preventDefault();var e=n.currentTarget,t=e.style.pointerEvents;e.style.pointerEvents="none";var r=document.elementFromPoint(n.clientX,n.clientY);if(e.style.pointerEvents=t,r){var o=r.closest(".st-cell");if(o instanceof HTMLElement){f.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:n.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(n){if(f.current){var e=f.current.getBoundingClientRect(),t=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:n.clientX,clientY:e.top+e.height/2});f.current.dispatchEvent(t),f.current=null}},style:x({gridTemplateColumns:i},h)},{children:n("div",{style:{gridColumn:"1 / -1"}})}))},He=c(void 0),Ee=function(n){var e=n.childRef,t=n.children,r=n.group,i=void 0===r?"default":r,a=function(){var n=s(He);if(!n)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return n}(),u=a.registerPane,l=a.unregisterPane;return o(function(){var n=[i];return e.current&&u(e.current,n),function(){e.current&&l(e.current,n)}},[e,u,l,i]),h(t,{ref:function(n){e.current=n}})},Te=p(function(e,r){var o=e.columnIndexStart,i=e.columnIndices,l=e.columnWindow,c=e.headers,s=e.pinned,d=e.rowHeight,f=e.rowIndices,h=e.setHoveredIndex,p=e.templateColumns,m=e.totalHeight,g=e.width,b=e.regularRows,y=s?"st-body-pinned-".concat(s):"st-body-main",C=a(null);return w(r,function(){return C.current},[]),u(function(){return Zn(c,s)},[c,s])?n(Ee,x({childRef:C,group:s?"pinned-".concat(s):"default"},{children:n("div",x({className:y,ref:C,style:x({position:"relative",height:"".concat(m,"px"),width:g},!s&&{flexGrow:1})},{children:b.map(function(e,r){var a=e.stateIndicator?"state-".concat(e.stateIndicator.parentRowId,"-").concat(e.position):U(e.rowId);return t(v,{children:[0!==r&&n(Ne,{displayStrongBorder:e.isLastGroupRow,position:e.position,rowHeight:d,templateColumns:p}),n(Me,{columnIndexStart:o,columnIndices:i,columnWindow:l,gridTemplateColumns:p,headers:c,index:r,pinned:s,rowHeight:d,rowIndices:f,setHoveredIndex:h,tableRow:e})]},a)})}))})):null});function ke(n){var e=n.headers,t=n.pinnedLeftColumns,r=n.pinnedRightColumns,o=n.collapsedHeaders,i={},a=0,u=R(R(R([],t,!0),e,!0),r,!0),l=function(n,e,t){void 0===e&&(e=!1),e||a++,i[n.accessor]=a,n.children&&n.children.length>0&&n.children.filter(function(n){return W({header:n,pinned:t,headers:u,collapsedHeaders:o,rootPinned:t})}).forEach(function(e,r){l(e,!n.singleRowChildren&&0===r,t)})};return t.forEach(function(n,e){l(n,0===e,n.pinned)}),e.filter(function(n){return!n.pinned&&W({header:n,pinned:void 0,headers:u,collapsedHeaders:o,rootPinned:n.pinned})}).forEach(function(n,e){l(n,0===e&&0===t.length,n.pinned)}),r.forEach(function(n){l(n,!1,n.pinned)}),i}Te.displayName="TableSection";var Pe=function(e){var r=e.calculatedHeaderHeight,o=e.stickyParents,i=e.mainTemplateColumns,l=e.pinnedLeftColumns,c=e.pinnedLeftTemplateColumns,s=e.pinnedLeftWidth,d=e.pinnedRightColumns,f=e.pinnedRightTemplateColumns,h=e.pinnedRightWidth,p=e.setHoveredIndex,w=e.rowIndices,m=e.scrollbarWidth,g=e.scrollTop,b=e.heightMap,y=e.partiallyVisibleRows,C=vn(),I=C.collapsedHeaders,R=C.customTheme,S=C.editColumns,M=C.headers,H=C.rowHeight,E=a(null),T=a(null),k=a(null),P=u(function(){var n,e;if(0===o.length)return{treeTransitionOffset:0,offsetStartIndex:-1};var t,r=y[0];if((null==r?void 0:r.parentIndices)&&r.parentIndices.length>0)for(var i=function(n){var e=r.parentIndices[n];if(o.some(function(n){return n.position===e}))return t=e,"break"},a=r.parentIndices.length-1;a>=0&&"break"!==i(a);a--);var u=void 0!==t?o.findIndex(function(n){return n.position===t}):-1,l=-1,c=function(n){var e=o[n],t=o[n+1];return t?t.depth===e.depth?(l=n,"break"):e.depth>t.depth?(l=o.findIndex(function(n){return n.depth===e.depth}),"break"):void 0:"break"};for(a=0;o.length>a&&"break"!==c(a);a++);if(-1===l)return{treeTransitionOffset:0,offsetStartIndex:u};var s=null===(n=o[l])||void 0===n?void 0:n.position;if(void 0===s)return{treeTransitionOffset:0,offsetStartIndex:u};for(var d=0,f=0,v=y;v.length>f&&(null===(e=v[f].parentIndices)||void 0===e?void 0:e.includes(s));f++)d++;if(0===d)return{treeTransitionOffset:0,offsetStartIndex:u};var h=y[0];return{treeTransitionOffset:-((l+1-d)*H+Math.max(0,g-(b?b.rowTopPositions[h.position]:h.position*(H+R.rowSeparatorWidth)))),offsetStartIndex:u}},[R,b,y,H,g,o]),A=P.treeTransitionOffset,F=P.offsetStartIndex,D=u(function(){return ke({headers:M,pinnedLeftColumns:l,pinnedRightColumns:d,collapsedHeaders:I})},[M,l,d,I]),L=o.length>0?o.length*(H+1)+A:0;if(0===o.length)return null;var W=function(e,r,i,a,u,l){return void 0===u&&(u=0),n("div",x({className:i?"st-sticky-section-".concat(i):"st-sticky-section-main",ref:l,style:{position:"relative",height:"".concat(L,"px"),width:i?"".concat(a,"px"):void 0,flexGrow:i?0:1,flexShrink:i?0:void 0}},{children:o.map(function(a,l){var c=a.stateIndicator?"sticky-state-".concat(a.stateIndicator.parentRowId,"-").concat(a.position):"sticky-".concat(U(a.rowId)),s=-1!==F&&l>=F,d=s?A:0,f=(l+1)*(H+1)-1+d;return t(v,{children:[n(Me,{columnIndexStart:u,columnIndices:D,gridTemplateColumns:e,headers:r,index:a.position,pinned:i,rowHeight:H,rowIndices:w,setHoveredIndex:p,tableRow:a,isSticky:!0,stickyIndex:l,stickyOffset:d,stickyZIndex:s?l:o.length-l}),n(Ne,{displayStrongBorder:!1,position:f,rowHeight:H,templateColumns:e,isSticky:!0})]},c)})}))},O=M.filter(function(n){return!n.pinned}),B="calc(100% - ".concat(m,"px - ").concat(S?"".concat(N,"px"):"0px",")");return t("div",x({className:"st-sticky-top",style:{height:"".concat(L,"px"),width:B,top:"".concat(r,"px")}},{children:[l.length>0&&n(Ee,x({childRef:E,group:"pinned-left"},{children:W(c,l,"left",s,0,E)})),n(Ee,x({childRef:T,group:"default"},{children:W(i,O,void 0,void 0,l.length,T)})),d.length>0&&n(Ee,x({childRef:k,group:"pinned-right"},{children:W(f,d,"right",h,l.length+O.length,k)}))]}))},Ae=function(n){var e=n.collapsedHeaders,t=function(n){var r=n.flattenedHeaders;return n.headers.forEach(function(n){if(!n.hide&&!n.excludeFromRender)if(n.children&&n.children.length>0)if(e&&e.has(n.accessor)){var o=n.children.filter(function(n){var e=n.showWhen||k;return"parentCollapsed"===e||"always"===e});n.singleRowChildren&&r.push(n),o.length>0?t({headers:o,flattenedHeaders:r}):n.singleRowChildren||r.push(n)}else{var i=n.children.filter(function(n){var e=n.showWhen||k;return"parentExpanded"===e||"always"===e});n.singleRowChildren&&r.push(n),t({headers:i,flattenedHeaders:r})}else r.push(n)}),r};return t({headers:n.headers,flattenedHeaders:[]})},Fe=function(n){var e=n.autoExpandColumns,t=Ae({headers:n.headers,collapsedHeaders:n.collapsedHeaders});return"".concat(t.map(function(n){return function(n,e){var t=n.minWidth,r=n.width;return"number"==typeof r&&(r="".concat(r,"px")),t&&"number"==typeof t&&(t="".concat(t,"px")),void 0===t||e?r:"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(t,", ").concat(r,")"):"max(".concat(t,", ").concat(r,")")}(n,e)}).join(" "))},De=function(n){var e=n.width,t=n.minWidth;if("number"==typeof e)return e;if("string"==typeof e){var r,o=e.trim();if(o.endsWith("px")&&!Number.isNaN(r=parseFloat(o)))return r}return"number"==typeof t?t:"string"==typeof t&&t.trim().endsWith("px")&&!Number.isNaN(r=parseFloat(t))?r:150},Le=function(n,e){var t=e.columnLeftPositions;if(0===t.length)return 0;if(0>=n)return 0;if(n>=e.totalWidth)return t.length-1;for(var r=0,o=t.length-1;o>r;){var i=Math.floor((r+o+1)/2);t[i]>n?o=i-1:r=i}return r},We=function(r){var c=r.calculatedHeaderHeight,s=r.mainTemplateColumns,d=r.pinnedLeftColumns,f=r.pinnedLeftTemplateColumns,v=r.pinnedLeftWidth,h=r.pinnedRightColumns,p=r.pinnedRightTemplateColumns,w=r.pinnedRightWidth,g=r.rowsToRender,b=r.setScrollTop,y=r.setScrollDirection,C=r.shouldShowEmptyState,I=r.tableRows,R=r.stickyParents,S=r.regularRows,M=r.partiallyVisibleRows,N=r.heightMap,H=vn(),E=H.collapsedHeaders,T=H.headerContainerRef,k=H.headers,P=H.heightOffsets,A=H.isAnimating,F=H.mainBodyRef,D=H.onLoadMore,L=H.rowHeight,W=H.scrollbarWidth,O=H.shouldPaginate,B=H.tableBodyContainerRef,z=H.tableEmptyStateRenderer,q=H.customTheme,G=wn().setIsScrolling,V=i(!1),j=V[0],K=V[1],_=i(0),J=_[0],Y=_[1],X=a(new Set),$=l(function(n){if(document.querySelectorAll(".st-row.hovered").forEach(function(n){n.classList.remove("hovered")}),X.current.clear(),null!==n&&B.current){var e=B.current,t='.st-row[data-index="'.concat(n,'"]:not(.st-nested-grid-row)');e.querySelectorAll(t).forEach(function(n){var t=n;t.closest(".st-body-container")===e&&(t.classList.add("hovered"),X.current.add(t))});var r=e.previousElementSibling;r&&r.classList.contains("st-sticky-top")&&r.querySelectorAll(t).forEach(function(n){var e=n;e.classList.add("hovered"),X.current.add(e)})}},[B]);o(function(){A&&$(null)},[A,$]),Hn({headerContainerRef:T,mainSectionRef:B,scrollbarWidth:W}),o(function(){return function(){Z.current&&clearTimeout(Z.current)}},[]);var Q=a(null),Z=a(null),nn=a(0),en=function(n){return n.length}(I),tn=u(function(){return function(n,e,t,r){return n*(e+r.rowSeparatorWidth)-r.rowSeparatorWidth+((null==t?void 0:t.reduce(function(n,e){return n+e[1]},0))||0)}(en,L,P,q)},[en,L,P,q]),rn=u(function(){return ke({headers:k,pinnedLeftColumns:d,pinnedRightColumns:h,collapsedHeaders:E})},[k,d,h,E]),on=u(function(){return Zn(k,"left")||Zn(k,void 0)||Zn(k,"right")},[k]),an=u(function(){return on?void 0:{minHeight:tn}},[on,tn]),un=u(function(){var n={};return g.forEach(function(e,t){var r=U(e.rowId);n[r]=t}),n},[g]),ln=u(function(){return k.filter(function(n){return!n.pinned})},[k]),cn=i({scrollLeft:0,width:0,direction:"none"}),sn=cn[0],dn=cn[1],fn=a(null),hn=a(null),pn=a(0);m(function(){var n=F.current;if(n){var e=function(e){var t=n.scrollLeft,r=n.clientWidth,o=pn.current,i=t>o?"right":o>t?"left":"none";pn.current=t,dn(function(n){var o=e?r:n.width;return n.scrollLeft===t&&n.width===o&&n.direction===i?n:{scrollLeft:t,width:o,direction:i}})};e(!0);var t=function(){null===fn.current&&(fn.current=requestAnimationFrame(function(){fn.current=null,e(!0)}))};n.addEventListener("scroll",t,{passive:!0});var r="undefined"!=typeof ResizeObserver?new ResizeObserver(function(){null===fn.current&&(fn.current=requestAnimationFrame(function(){fn.current=null,e(!1),null!==hn.current&&clearTimeout(hn.current),hn.current=setTimeout(function(){hn.current=null,e(!0)},150)}))}):null;return null==r||r.observe(n),function(){n.removeEventListener("scroll",t),null==r||r.disconnect(),null!==fn.current&&(cancelAnimationFrame(fn.current),fn.current=null),null!==hn.current&&(clearTimeout(hn.current),hn.current=null)}}},[F,C]);var mn=u(function(){return function(n){var e=n.scrollLeft,t=n.viewportWidth,r=n.bufferColumnCount,o=n.scrollDirection;if(n.pinned)return null;var i=function(n){for(var e=Ae({headers:n.headers,collapsedHeaders:n.collapsedHeaders}),t=Array(e.length),r=0,o=0;e.length>o;o++)t[o]=r,r+=De(e[o]);return{columnLeftPositions:t,totalWidth:r,leafHeaders:e}}({headers:n.headers,collapsedHeaders:n.collapsedHeaders}),a=new Map;if(i.leafHeaders.forEach(function(n,e){a.set(n.accessor,e)}),0>=t)return{visibleAccessors:new Set(i.leafHeaders.map(function(n){return n.accessor})),trackIndexByAccessor:a};var u=function(n){var e=n.scrollLeft,t=n.viewportWidth,r=n.scrollDirection,o=void 0===r?"none":r,i=n.widthMap,a=i.leafHeaders;if(0===a.length)return{startIndex:0,endIndex:0,columns:[]};var u=a.length>0?i.totalWidth/a.length:150,l=n.bufferColumnCount*u,c=l,s=l;"right"===o?(c=Math.max(u,.1*l),s=.9*l):"left"===o&&(c=.9*l,s=Math.max(u,.1*l));var d=e+t+s,f=Le(Math.max(0,e-c),i),v=Le(d,i)+1;return{startIndex:f,endIndex:v=Math.min(a.length,v),columns:a.slice(f,v)}}({scrollLeft:e,viewportWidth:t,bufferColumnCount:r,scrollDirection:o,widthMap:i}).columns;return{visibleAccessors:new Set(u.map(function(n){return n.accessor})),trackIndexByAccessor:a}}({headers:ln,collapsedHeaders:E,scrollLeft:sn.scrollLeft,viewportWidth:sn.width,bufferColumnCount:3,scrollDirection:sn.direction,pinned:void 0})},[ln,E,sn]),gn=l(function(n,e){!D||O||j||200>=n.scrollHeight-(e+n.clientHeight)&&e>nn.current&&(K(!0),D(),setTimeout(function(){K(!1)},1e3))},[D,O,j]),bn={columnIndices:rn,headerContainerRef:T,headers:k,rowHeight:L,rowIndices:un,rowsToRender:g,setHoveredIndex:$,regularRows:S};return t(e,{children:[!C&&n(Pe,{calculatedHeaderHeight:c,heightMap:N,mainTemplateColumns:s,partiallyVisibleRows:M,pinnedLeftColumns:d,pinnedLeftTemplateColumns:f,pinnedLeftWidth:v,pinnedRightColumns:h,pinnedRightTemplateColumns:p,pinnedRightWidth:w,rowIndices:un,scrollTop:J,scrollbarWidth:W,setHoveredIndex:$,stickyParents:R}),n("div",x({className:"st-body-container",onMouseLeave:function(){return $(null)},onScroll:function(n){var e=n.currentTarget,t=e.scrollTop;G(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(function(){G(!1)},150),Q.current&&cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(function(){var n=nn.current,r=t>n?"down":n>t?"up":"none";b(t),y(r),Y(t),gn(e,t),nn.current=t})},ref:B,style:an},{children:C?n("div",x({className:"st-empty-state-wrapper"},{children:z})):t(e,{children:[n(Te,x({},bn,{pinned:"left",templateColumns:f,totalHeight:tn,width:v})),n(Te,x({},bn,{columnIndexStart:d.length,columnWindow:mn,ref:F,templateColumns:s,totalHeight:tn})),n(Te,x({},bn,{columnIndexStart:d.length+s.length,pinned:"right",templateColumns:p,totalHeight:tn,width:w}))]})}))]})},Oe=function(n,e){if(n.pinned)return n.pinned;var t=D(e,n.accessor);return t?Oe(t,e):void 0},Be=function(n){var e=n.autoExpandColumns,t=n.collapsedHeaders,r=n.containerWidth,o=n.event,i=n.header,a=n.headers,u=n.onColumnWidthChange,l=n.reverse,c=void 0!==l&&l,s=n.setHeaders,d=n.setIsResizing,f=n.startWidth;o.preventDefault();var v="clientX"in o?o.clientX:o.touches[0].clientX,h="touches"in o;if(i&&!i.hide){d(!0);var p,w=Oe(i,a),m=Z(i);if(i.children&&i.children.length>0){var g=X(i,t);p=g.length>0?g:[i]}else p=[i];var b=new Map,x=0;if(e){var y=a.filter(function(n){return n.pinned===w});if(nn(y,t).forEach(function(n){var e=$(n);b.set(n.accessor,e)}),r>0){var C=qe({headers:a,containerWidth:r,collapsedHeaders:t}),I=C.leftWidth,S=C.rightWidth;x="left"===w?I:"right"===w?S:Math.max(0,r-I-S)}}var M=function(n){var o="right"===w?v-n:n-v;if(e){var u=a.filter(function(n){return n.pinned===w});Ve({delta:o,startWidth:f,resizedHeader:p.length>0?p[p.length-1]:i,sectionHeaders:u,rootPinned:w,reverse:c,collapsedHeaders:t,initialWidthsMap:b,sectionWidth:x,isParentResize:p.length>1,childrenToResize:p,headers:a,containerWidth:r})}else{var l=function(n){var e=n.header,t=n.headers,r=n.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth;if(!e.pinned)return 1/0;var a=t.some(function(n){return"left"===n.pinned&&!n.hide}),u=t.some(function(n){return"right"===n.pinned&&!n.hide}),l=i*T(i,a,u)-t.filter(function(n){return n.pinned===e.pinned&&n.accessor!==e.accessor}).reduce(function(n,e){return e.hide?n:n+X(e,r).reduce(function(n,e){return n+$(e)},0)},0),c=Z(e);return c>l?(console.warn("Header ".concat(e.accessor," exceeds pinned section width limit")),c):l}({header:i,headers:a,collapsedHeaders:t});p.length>1?ze({delta:o,leafHeaders:p,minWidth:m,startWidth:f,maxWidth:l}):p[0].width=Math.max(Math.min(f+o,l),m),a.forEach(function(n){Q(n)})}var d=R([],a,!0);s(d)};if(h){var N=function(n){M(n.touches[0].clientX)},H=function(){document.removeEventListener("touchmove",N),document.removeEventListener("touchend",H),d(!1),u&&u(R([],a,!0))};document.addEventListener("touchmove",N),document.addEventListener("touchend",H)}else{var E=function(n){M(n.clientX)},k=function(){document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",k),d(!1),u&&u(R([],a,!0))};document.addEventListener("mousemove",E),document.addEventListener("mouseup",k)}}},ze=function(n){var e=n.delta,t=n.leafHeaders,r=n.minWidth,o=n.startWidth,i=n.maxWidth,a=t.reduce(function(n,e){return Math.min(n,Z(e))},40),u=t.reduce(function(n,e){return n+("number"==typeof e.width?e.width:150)},0),l=Math.max(Math.min(o+e,i),a)-u;t.forEach(function(n){var e="number"==typeof n.width?n.width:150;n.width=Math.max(e+l*(e/u),r)})},qe=function(n){var e=n.containerWidth,t=n.collapsedHeaders,r=0,o=0,i=0;n.headers.forEach(function(n){if(!n.hide){var e=X(n,t).reduce(function(n,e){return n+$(e)},0);"left"===n.pinned?r+=e:"right"===n.pinned?o+=e:i+=e}});var a=r,u=o;if(e&&e>0){var l=e*T(e,r>0,o>0);r>l&&(r=l),o>l&&(o=l)}return{leftWidth:F(r),rightWidth:F(o),mainWidth:i,leftContentWidth:a,rightContentWidth:u}},Ge=function(n){var e=n.columnsToShrink,t=n.totalCompensation,r=n.initialWidthsMap;if(0>t){var o=Math.abs(t),i=e.reduce(function(n,e){return n+(r.get(e.accessor)||100)},0);if(0===i)return;e.forEach(function(n,t){var a=r.get(n.accessor)||100,u=o*(a/i);if(t===e.length-1){var l=e.slice(0,t).reduce(function(n,e){var t=r.get(e.accessor)||100;return n+(("number"==typeof e.width?e.width:100)-t)},0);u=o-l}n.width=a+u})}else for(var a=t,u=function(){var n=e.map(function(n){var e=r.get(n.accessor)||100;return{column:n,headroom:Math.max(0,e-40),initialWidth:e,minWidth:40}}),t=n.filter(function(n){return n.headroom>0});if(t.length>0){var o=t.reduce(function(n,e){return n+e.headroom},0),i=0,u=a;t.forEach(function(n,e){var r=u*(n.headroom/o);r=Math.min(r,n.headroom),e===t.length-1&&(r=Math.min(u-i,n.headroom)),n.column.width=n.initialWidth-r,i+=r}),a-=i}else{var l=n.filter(function(n){return n.minWidth>E});if(0>=l.length)return"break";var c=a,s=c/l.length,d=0;l.forEach(function(n,e){var t=n.minWidth-E,r=Math.min(s,t);e===l.length-1&&(r=Math.min(c-d,t));var o=n.initialWidth-r;n.column.width=o,n.column.minWidth=Math.max(o,E),d+=r}),a-=d}};a>.5&&"break"!==u(););},Ve=function(n){var e=n.childrenToResize,t=void 0===e?[]:e,r=n.collapsedHeaders,o=n.delta,i=n.initialWidthsMap,a=n.isParentResize,u=void 0!==a&&a,l=n.resizedHeader,c=n.reverse,s=n.rootPinned,d=n.sectionHeaders,f=n.sectionWidth,v=n.startWidth,h=n.headers,p=n.containerWidth,w=o;if(s&&p>0){var m=function(n,e,t){return n*T(n,e,t)}(p,h.some(function(n){return"left"===n.pinned&&!n.hide}),h.some(function(n){return"right"===n.pinned&&!n.hide})),g=Array.from(i.values()).reduce(function(n,e){return n+e},0);o>0&&g+o>m&&(w=Math.max(0,m-g))}if(o=w,u&&t.length>1){var b=nn(d,r),x=b.findIndex(function(n){return n.accessor===t[0].accessor}),y=b.findIndex(function(n){return n.accessor===t[t.length-1].accessor});if(-1===x||-1===y)return;var C,I=0===x,R=y===b.length-1;C="left"===s&&R||"right"===s&&I?[]:I?b.slice(y+1):R||c?b.slice(0,x):b.slice(y+1);var S=Array.from(i.values()).reduce(function(n,e){return n+e},0);if(o>0){var M=o,N=!1;if(C.length>0&&S+o>f){N=!0;var H=C.reduce(function(n,e){var t=i.get(e.accessor)||100;return n+Math.max(0,t-E)},0);M=Math.min(o,H)}var k=(P=v+M)/(A=t.reduce(function(n,e){return n+(i.get(e.accessor)||100)},0));t.forEach(function(n){var e=i.get(n.accessor)||100;n.width=Math.max(e*k,40)}),N&&M>0&&C.length>0&&Ge({columnsToShrink:C,totalCompensation:M,initialWidthsMap:i})}else{var P,A=t.reduce(function(n,e){return n+(i.get(e.accessor)||100)},0),F=(P=Math.max(v+o,E*t.length))/A;t.forEach(function(n){var e=i.get(n.accessor)||100;n.width=Math.max(e*F,40)}),(V=v-P)>0&&C.length>0&&Ge({columnsToShrink:C,totalCompensation:-V,initialWidthsMap:i})}}else{var D=nn(d,r),L=D.findIndex(function(n){return n.accessor===l.accessor});if(-1!==L){var W,O=0===L,B=L===D.length-1;if(0!==(W="left"===s&&B||"right"===s&&O?[]:O?D.slice(L+1):B||c?D.slice(0,L):D.slice(L+1)).length){var z=Array.from(i.values()).reduce(function(n,e){return n+e},0);if(o>0){if(f>=z+o)return void(l.width=v+o);H=W.reduce(function(n,e){var t=i.get(e.accessor)||100;return n+Math.max(0,t-E)},0);var q=Math.min(o,H);l.width=v+q,q>0&&Ge({columnsToShrink:W,totalCompensation:q,initialWidthsMap:i})}else{var G=Math.max(v+o,40),V=v-G;l.width=G,V>0&&Ge({columnsToShrink:W,totalCompensation:-V,initialWidthsMap:i})}}else l.width=Math.max(v+o,40)}}},je={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},Ke=function(n){switch(n){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},Ue=function(n){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(n)},_e=function(n){return["between","notBetween","in","notIn"].includes(n)},Je=function(n){return["isEmpty","isNotEmpty"].includes(n)},Ye=function(e){return n("div",x({className:"st-filter-container"},{children:e.children}))},Xe=function(e){var r=e.value,u=e.onChange,l=e.options,c=e.placeholder,s=void 0===c?"Select...":c,d=e.className,f=void 0===d?"":d,v=e.disabled,h=void 0!==v&&v,p=i(!1),w=p[0],m=p[1],g=i(-1),b=g[0],y=g[1],C=a(null),I=l.find(function(n){return n.value===r});o(function(){var n=function(n){if(w)switch(n.key){case"ArrowDown":n.preventDefault(),y(function(n){return l.length-1>n?n+1:0});break;case"ArrowUp":n.preventDefault(),y(function(n){return n>0?n-1:l.length-1});break;case"Enter":n.preventDefault(),0>b||(u(l[b].value),m(!1),y(-1));break;case"Escape":n.preventDefault(),m(!1),y(-1)}};if(w)return document.addEventListener("keydown",n),function(){return document.removeEventListener("keydown",n)}},[w,b,l,u]);var R=function(n){u(n),m(!1),y(-1)};return t("div",x({ref:C,className:"st-custom-select ".concat(f," ").concat(h?"st-custom-select-disabled":""," ").concat(w?"st-custom-select-open":"").trim()},{children:[t("button",x({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(m(!w),w)y(-1);else{var n=l.findIndex(function(n){return n.value===r});y(0>n?0:n)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":w,"aria-labelledby":"select-label"},{children:[n("span",x({className:"st-custom-select-value"},{children:I?I.label:s})),n(Nn,{})]})),n(En,x({open:w,setOpen:m,onClose:function(){m(!1),y(-1)},positioning:"absolute",overflow:"auto"},{children:n("div",x({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(e,t){return n("div",x({className:"st-custom-select-option ".concat(e.value===r?"st-custom-select-option-selected":""," ").concat(t===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":e.value===r,onClick:function(){return R(e.value)},tabIndex:0,onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),R(e.value))}},{children:e.label}),t)})}))}))]}))},$e=function(e){var t=e.value,r=e.onChange,o=e.operators.map(function(n){return{value:n,label:je[n]}});return n("div",x({className:"st-filter-section"},{children:n(Xe,{value:t,onChange:function(n){r(n)},options:o})}))},Qe=function(e){var t=e.type,r=e.onChange,o=e.autoFocus,i=e.className,a=e.onEnterPress;return n("input",{type:void 0===t?"text":t,value:e.value,onChange:function(n){return r(n.target.value)},onKeyDown:function(n){"Enter"===n.key&&a&&a()},placeholder:e.placeholder,autoFocus:void 0!==o&&o,className:"st-filter-input ".concat(void 0===i?"":i).trim()})},Ze=function(e){var t=e.children,r=e.className;return n("div",x({className:"st-filter-section ".concat(void 0===r?"":r).trim()},{children:t}))},nt=function(e){var r=e.onClear,o=e.canApply,i=e.showClear;return t("div",x({className:"st-filter-actions"},{children:[n("button",x({onClick:e.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled"),tabIndex:0},{children:"Apply"})),i&&r&&n("button",x({onClick:r,className:"st-filter-button st-filter-button-clear",tabIndex:0},{children:"Clear"}))]}))},et=function(e){var r=e.header,a=e.currentFilter,u=e.onApplyFilter,l=e.onClearFilter,c=i((null==a?void 0:a.operator)||"contains"),s=c[0],d=c[1],f=i(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],p=Ke("string");o(function(){a?(d(a.operator),h((a.value||"")+"")):(d("contains"),h(""))},[a]);var w=function(){var n=x({accessor:r.accessor,operator:s},Ue(s)&&{value:v});u(n)},m=Je(s)||v.trim();return t(Ye,{children:[n($e,{value:s,onChange:d,operators:p}),Ue(s)&&n(Ze,{children:n(Qe,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:w})}),n(nt,{onApply:w,onClear:l,canApply:!!m,showClear:!!a})]})},tt=function(e){var r,a,u=e.header,l=e.currentFilter,c=e.onApplyFilter,s=e.onClearFilter,d=i((null==l?void 0:l.operator)||"equals"),f=d[0],v=d[1],h=i(((null==l?void 0:l.value)||"")+""),p=h[0],w=h[1],m=i(((null===(r=null==l?void 0:l.values)||void 0===r?void 0:r[0])||"")+""),g=m[0],b=m[1],x=i(((null===(a=null==l?void 0:l.values)||void 0===a?void 0:a[1])||"")+""),y=x[0],C=x[1],I=Ke("number");o(function(){var n,e;l?(v(l.operator),w((l.value||"")+""),b(((null===(n=l.values)||void 0===n?void 0:n[0])||"")+""),C(((null===(e=l.values)||void 0===e?void 0:e[1])||"")+"")):(v("equals"),w(""),b(""),C(""))},[l]);var R=function(){var n={accessor:u.accessor,operator:f};Ue(f)?n.value=parseFloat(p):_e(f)&&(n.values=[parseFloat(""+g),parseFloat(""+y)]),c(n)};return t(Ye,{children:[n($e,{value:f,onChange:v,operators:I}),Ue(f)&&n(Ze,{children:n(Qe,{type:"number",value:p,onChange:w,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),_e(f)&&t(Ze,{children:[n(Qe,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),n(Qe,{type:"number",value:y,onChange:C,placeholder:"To...",onEnterPress:R})]}),n(nt,{onApply:R,onClear:s,canApply:!!Je(f)||(Ue(f)?""!==p.trim():!!_e(f)&&""!==(g+"").trim()&&""!==(y+"").trim()),showClear:!!l})]})},rt=function(e){var t=e.className;return n(Xe,{value:e.value,onChange:e.onChange,options:e.options,className:void 0===t?"":t,placeholder:e.placeholder})},ot=function(e){var r=e.header,a=e.currentFilter,u=e.onApplyFilter,l=e.onClearFilter,c=i((null==a?void 0:a.operator)||"equals"),s=c[0],d=c[1],f=i(void 0!==(null==a?void 0:a.value)?a.value+"":"true"),v=f[0],h=f[1],p=Ke("boolean");o(function(){a?(d(a.operator),h(void 0!==a.value?a.value+"":"true")):(d("equals"),h("true"))},[a]);var w=Je(s)||""!==v;return t(Ye,{children:[n($e,{value:s,onChange:d,operators:p}),Ue(s)&&n(Ze,{children:n(rt,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),n(nt,{onApply:function(){var n={accessor:r.accessor,operator:s};Ue(s)&&(n.value="true"===v),u(n)},onClear:l,canApply:w,showClear:!!a})]})},it=function(e){var r,u,l=e.header,c=e.currentFilter,s=e.onApplyFilter,d=e.onClearFilter,f=i((null==c?void 0:c.operator)||"equals"),v=f[0],h=f[1],p=i((null==c?void 0:c.value)?c.value+"":""),w=p[0],m=p[1],g=i((null===(r=null==c?void 0:c.values)||void 0===r?void 0:r[0])?c.values[0]+"":""),b=g[0],y=g[1],C=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),I=C[0],R=C[1],S=Ke("date");o(function(){var n,e;c?(h(c.operator),m((c.value||"")+""),y(((null===(n=c.values)||void 0===n?void 0:n[0])||"")+""),R(((null===(e=c.values)||void 0===e?void 0:e[1])||"")+"")):(h("equals"),m(""),y(""),R(""))},[c]);var M=function(e){var r=e.value,u=e.onChange,l=e.placeholder,c=e.autoFocus,s=e.className,d=i(!1),f=d[0],v=d[1],h=i(""),p=h[0],w=h[1],m=a(null);o(function(){if(r){var n=jn(r);isNaN(n.getTime())||w(n.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else w("")},[r]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=r?jn(r):new Date;return t("div",x({className:"st-date-input-container",style:{position:"relative"}},{children:[n("input",{ref:m,type:"text",value:p,placeholder:l,onClick:function(){v(!f)},onKeyDown:function(n){"Enter"===n.key||" "===n.key?(n.preventDefault(),v(!f)):"Escape"===n.key&&v(!1)},readOnly:!0,className:"st-filter-input ".concat(s||""),style:{cursor:"pointer"}}),n(En,x({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"hidden",width:240},{children:n(Bn,{value:g,onChange:function(n){var e=n.toISOString().split("T")[0];u(e),v(!1)},onClose:function(){return v(!1)}})}))]}))};return t(Ye,{children:[n($e,{value:v,onChange:h,operators:S}),Ue(v)&&n(Ze,{children:n(M,{value:w,onChange:m,placeholder:"Select date...",autoFocus:!0})}),_e(v)&&t(Ze,{children:[n(M,{value:b,onChange:y,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),n(M,{value:I,onChange:R,placeholder:"To date..."})]}),n(nt,{onApply:function(){var n={accessor:l.accessor,operator:v};Ue(v)?n.value=w:_e(v)&&(n.values=[b,I]),s(n)},onClear:d,canApply:!!Je(v)||(Ue(v)?""!==w.trim():!!_e(v)&&""!==b.trim()&&""!==I.trim()),showClear:!!c})]})},at=function(e){var r=e.header,a=e.currentFilter,l=e.onApplyFilter,c=e.onClearFilter,s=u(function(){return r.enumOptions||[]},[r.enumOptions]),d=u(function(){return s.map(function(n){return n.value})},[s]),f=i((null==a?void 0:a.values)?a.values.map(String):d),v=f[0],h=f[1],p=i(""),w=p[0],m=p[1],g=u(function(){if(!w)return s;var n=w.toLowerCase();return s.filter(function(e){return e.label.toLowerCase().includes(n)})},[s,w]);o(function(){h(a?a.values?a.values.map(String):[]:d)},[a,d]);var b=s.length>10;return t(Ye,{children:[n(Ze,{children:t("div",x({className:"st-enum-filter-options"},{children:[n("div",x({className:"st-enum-select-all"},{children:n(me,x({checked:v.length===d.length,onChange:function(n){h(n?d:[])}},{children:n("span",x({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&n("div",x({className:"st-enum-search"},{children:n(Qe,{type:"text",value:w,onChange:m,placeholder:"Search..."})})),g.map(function(e,t){return n(me,x({checked:v.includes(e.value),onChange:function(){return n=e.value,void h(function(e){return e.includes(n)?e.filter(function(e){return e!==n}):R(R([],e,!0),[n],!1)});var n}},{children:n("span",x({className:"st-enum-option-label"},{children:e.label}))}),t)}),w&&0===g.length&&n("div",x({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),n(nt,{onApply:function(){v.length!==d.length?l({accessor:r.accessor,operator:"in",values:v}):c()},onClear:c,canApply:0!==v.length&&v.length!==d.length,showClear:!!a})]})},ut=function(t){var r=t.header,o=t.currentFilter,i=t.onApplyFilter,a=t.onClearFilter;return n(e,{children:function(){switch(r.type){case"number":return n(tt,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return n(ot,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return n(it,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return n(at,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return n(et,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},lt=function(r){var u=r.content,l=r.children,c=r.delay,s=void 0===c?500:c,d=i(!1),f=d[0],v=d[1],p=i({top:0,left:0}),w=p[0],m=p[1],b=a(null),y=a(null);if(o(function(){return function(){b.current&&clearTimeout(b.current)}},[]),!u||!g(l))return n(e,{children:l});var C=h(l,{ref:y,onMouseEnter:function(){b.current=setTimeout(function(){if(y.current&&u.trim()){var n=y.current.getBoundingClientRect();if(n.width>0&&n.height>0){var e=n.left+n.width/2-100,t=n.bottom+8;8>e?e=8:e+200>window.innerWidth-8&&(e=window.innerWidth-200-8),t+40>window.innerHeight-8&&(t=n.top-40-8),m({top:t,left:e}),v(!0)}}},s)},onMouseLeave:function(){b.current&&(clearTimeout(b.current),b.current=null),v(!1)}});return t(e,{children:[C,f&&n("div",x({className:"st-tooltip",style:{position:"fixed",top:"".concat(w.top,"px"),left:"".concat(w.left,"px"),zIndex:1e4}},{children:u}))]})},ct=function(e){var r,c,s=e.colIndex,d=e.gridColumnEnd,f=e.gridColumnStart,v=e.gridRowEnd,p=e.gridRowStart,w=e.header,m=e.parentHeader,g=e.reverse,b=e.sort,y=e.isLastHeader,C=void 0!==y&&y,I=i(!1),S=I[0],M=I[1],N=i(!1),E=N[0],T=N[1],A=i(w.label||""),F=A[0],D=A[1],W=vn(),O=W.activeHeaderDropdown,B=W.areAllRowsSelected,z=W.autoExpandColumns,q=W.collapsedHeaders,V=W.columnBorders,j=W.columnReordering,K=W.columnResizing,U=W.containerWidth,_=W.columnsWithSelectedCells,J=W.draggedHeaderRef,Y=W.enableHeaderEditing,X=W.essentialAccessors,$=W.handleApplyFilter,Q=W.handleClearFilter,Z=W.handleSelectAll,nn=W.headerDropdown,en=W.headerRegistry,tn=W.icons,rn=W.headers,on=W.hoveredHeaderRef,an=W.onColumnOrderChange,un=W.onColumnSelect,ln=W.onColumnWidthChange,cn=W.onHeaderEdit,sn=W.onSort,dn=W.onTableHeaderDragEnd,fn=W.headerHeight,hn=W.rows,pn=W.selectColumns,wn=W.selectableColumns,mn=W.selectedColumns,gn=W.setActiveHeaderDropdown,bn=W.setCollapsedHeaders,xn=W.setHeaders,yn=W.setInitialFocusedCell,Cn=W.setIsResizing,In=W.setSelectedCells,Rn=W.setSelectedColumns,Sn=!!(null==w?void 0:w.isSortable),Mn=!!(null==w?void 0:w.filterable),Nn=W.filters[w.accessor],Hn=(null==O?void 0:O.accessor)===w.accessor,Tn=w.isSelectionColumn&&W.enableRowSelection,kn=function(n){var e;return!(!(null===(e=n.children)||void 0===e?void 0:e.length)||!n.collapsible)}(w),An=q.has(w.accessor),Fn=function(n){var e=n.isOpen,t=n.estimatedHeight,r=void 0===t?200:t,u=n.estimatedWidth,l=void 0===u?250:u,c=n.margin,s=void 0===c?4:c,d=a(null),f=i({}),v=f[0],h=f[1];return o(function(){if(e&&d.current){var n=function(){if(d.current){var n=d.current.getBoundingClientRect(),e=window.innerHeight-n.bottom,t=window.innerWidth-n.right,o="bottom",i={};r>e&&n.top>=r&&(o="top");var a="left";l>t+n.width&&(a="right"),"bottom"===o?i.top=n.bottom+s:i.bottom=window.innerHeight-n.top+s,"left"===a?i.left=n.left:i.right=window.innerWidth-n.right,h(i)}};requestAnimationFrame(n);var t=function(){return requestAnimationFrame(n)},o=function(){return requestAnimationFrame(n)};return window.addEventListener("resize",t),window.addEventListener("scroll",o,!0),function(){window.removeEventListener("resize",t),window.removeEventListener("scroll",o,!0)}}h({})},[e,r,l,s]),{triggerRef:d,position:v}}({isOpen:Hn,estimatedHeight:200,estimatedWidth:250,margin:4}),Dn=Fn.triggerRef,Ln=Fn.position,Wn=u(function(){var n,e,t;if(!V)return!1;var r=rn.filter(function(n){return"left"===n.pinned}),o=rn.filter(function(n){return!n.pinned}),i=rn.filter(function(n){return"right"===n.pinned});return"left"===w.pinned?(null===(n=r[r.length-1])||void 0===n?void 0:n.accessor)===w.accessor:"right"===w.pinned?(null===(e=i[i.length-1])||void 0===e?void 0:e.accessor)===w.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===w.accessor},[V,rn,w.accessor,w.pinned]),Bn=u(function(){return!(!wn||Tn)&&P(w,s).some(function(n){return mn.has(n)})},[wn,Tn,w,s,mn]),zn=u(function(){return!Tn&&P(w,s).some(function(n){return _.has(n)})},[Tn,w,s,_]),qn=u(function(){return!(!w.children||0===w.children.length)&&(!An||w.children.some(function(n){var e=n.showWhen||k;return"parentCollapsed"===e||"always"===e}))},[w.children,An]),Gn=null==m?void 0:m.singleRowChildren,Vn=qn&&!w.singleRowChildren,jn="st-header-cell ".concat(w.accessor===(null===(r=on.current)||void 0===r?void 0:r.accessor)?"st-hovered":""," ").concat((null===(c=J.current)||void 0===c?void 0:c.accessor)===w.accessor?"st-dragging":""," ").concat(Sn?"clickable":""," ").concat(j&&!Sn?"columnReordering":""," ").concat(Vn?"parent":""," ").concat(Gn?"st-sub-header":""," ").concat(Wn?"st-last-column":""," ").concat(Y&&!Tn?"st-header-editable":""," ").concat(Bn?"st-header-selected":""," ").concat(zn&&!Bn?"st-header-has-highlighted-cell":""," ").concat(C?"st-no-resize":""),Kn=we({draggedHeaderRef:J,essentialAccessors:X,headers:rn,hoveredHeaderRef:on,onColumnOrderChange:an,onTableHeaderDragEnd:dn}),Un=Kn.handleDragStart,_n=Kn.handleDragEnd,Jn=Kn.handleDragOver,Yn=Xn();o(function(){if(en&&!w.isSelectionColumn){var n=w.accessor+"";return en.set(n,{setEditing:function(n){T(n)}}),function(){en.delete(n)}}},[en,w.accessor,w.isSelectionColumn]),o(function(){D(w.label||"")},[w.label]);var $n=function(n){M(!S)},Qn=l(function(n){D(n);var e=rn.map(function(e){return e.accessor===w.accessor?x(x({},e),{label:n}):e});xn(e),cn&&cn(w,n)},[rn,xn,cn,w]),Zn=l(function(){gn&&gn(null)},[gn]),ne=l(function(n){n.stopPropagation(),bn(function(n){var e=new Set(n);return An?e.delete(w.accessor):e.add(w.accessor),e})},[bn,An,w.accessor]),te=function(n){var e=n.event,t=n.header;if(!t.isSelectionColumn){if(wn){var r=P(t,s),o=r.some(function(n){return mn.has(n)});if(Y&&o&&!e.shiftKey)return nn&&Hn&&Zn(),void T(!0);e.shiftKey&&pn?Rn(function(n){if(0===n.size)return new Set(r);var e=r[0],t=Array.from(n).sort(function(n,e){return n-e}),o=t[0],i=Math.abs(e-o);t.forEach(function(n){var t=Math.abs(e-n);i>t&&(i=t,o=n)});var a,u,l,c=R(R([],(l=Math.min(a=o,u=e),Array.from({length:Math.max(a,u)-l+1},function(n,e){return l+e})),!0),r,!0);return new Set(R(R([],Array.from(n),!0),c,!0))}):pn&&pn(r),In(new Set),yn(null)}un&&un(t),!wn&&t.isSortable&&sn(t.accessor)}};o(function(){var n=function(n){n.preventDefault(),n.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",n),function(){document.removeEventListener("dragover",n)}},[]);var re=l(function(){var n=function(n,e){var t=e||{},r=t.rows,o=t.header,i=t.maxWidth,a=void 0===i?500:i,u=t.sampleSize,l=void 0===u?50:u,c=document.getElementById(L({accessor:n,rowId:"header"}));if(!c)return 150;var s=window.getComputedStyle(c),d=parseFloat(s.paddingLeft)||0,f=parseFloat(s.paddingRight)||0,v=parseFloat(s.gap)||0,h=d+f,p=c.querySelector(".st-header-label");if(p){var w=p.querySelector(".st-header-label-text");if(w){var m=document.createElement("span");m.style.visibility="hidden",m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.width="auto";var g=window.getComputedStyle(w);m.style.font=g.font,m.style.fontSize=g.fontSize,m.style.fontWeight=g.fontWeight,m.style.fontFamily=g.fontFamily,m.style.letterSpacing=g.letterSpacing,m.style.padding=g.padding,m.textContent=w.textContent,document.body.appendChild(m);var b=m.offsetWidth;document.body.removeChild(m),h+=b}}for(var x=Array.from(c.children),y=1,C=0;x.length>C;C++){var I=x[C];if(!I.classList.contains("st-header-label")&&!I.classList.contains("st-sr-only")){var R=window.getComputedStyle(I);"none"!==R.display&&(h+=(I.offsetWidth||0)+(parseFloat(R.marginLeft)||0)+(parseFloat(R.marginRight)||0),y++)}}v>0&&y>1&&(h+=v*(y-1));var S=0,M=o&&o.type&&H.includes(o.type);if(r&&r.length>0&&!M){var N=Math.min(r.length,l),E=document.createElement("div");E.style.visibility="hidden",E.style.position="absolute",E.style.whiteSpace="nowrap",E.style.width="auto";var T=0,k=0,P=document.querySelector(".st-cell-content");if(P){var A=window.getComputedStyle(P);E.style.font=A.font,E.style.fontSize=A.fontSize,E.style.fontFamily=A.fontFamily,T=parseFloat(A.paddingLeft)||0,k=parseFloat(A.paddingRight)||0}for(document.body.appendChild(E),C=0;N>C;C++){var F,D=r[C],W=F=(null==o?void 0:o.valueGetter)?o.valueGetter({accessor:n,row:D,rowIndex:C}):G(D,n);(null==o?void 0:o.valueFormatter)&&null!=F&&(W=o.valueFormatter({accessor:n,colIndex:0,row:D,rowIndex:C,value:F})),E.textContent=null!=W?W+"":"";var O=E.offsetWidth+T+k;O>S&&(S=O)}document.body.removeChild(E)}var B=Math.max(h,S);return M&&(B=Math.max(B,150)),B>a&&(B=a),B+2}(w.accessor,{rows:hn,header:w,maxWidth:500,sampleSize:50}),e=de(rn,w.accessor);if(e){var t=fe(rn,e),r=e[e.length-1],o=t.map(function(e,t){return t===r?x(x({},e),{width:n}):e}),i=ve(rn,e,o);xn(i),ln&&ln(i)}},[w,rn,hn,xn,ln]);if(!w)return null;var oe=K&&!Tn&&!C&&n("div",x({className:"st-header-resize-handle-container",role:"separator","aria-label":"Resize ".concat(w.label," column"),"aria-orientation":"vertical",onMouseDown:function(n){var e,t=null===(e=document.getElementById(L({accessor:w.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Yn({callback:Be,callbackProps:{autoExpandColumns:z,collapsedHeaders:q,containerWidth:U,event:n.nativeEvent,header:w,headers:rn,onColumnWidthChange:ln,reverse:g,setHeaders:xn,setIsResizing:Cn,startWidth:t},limit:10})},onTouchStart:function(n){var e,t=null===(e=document.getElementById(L({accessor:w.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Yn({callback:Be,callbackProps:{autoExpandColumns:z,collapsedHeaders:q,containerWidth:U,event:n,header:w,headers:rn,onColumnWidthChange:ln,reverse:g,setHeaders:xn,setIsResizing:Cn,startWidth:t},limit:10})},onDoubleClick:re},{children:n("div",{className:"st-header-resize-handle"})})),ie=b&&b.key.accessor===w.accessor&&t("div",x({className:"st-icon-container",onClick:function(n){return te({event:n,header:w})},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||sn(w.accessor)},tabIndex:0,role:"button","aria-label":"Sort ".concat(w.label," ").concat("asc"===b.direction?"descending":"ascending")},{children:["asc"===b.direction&&tn.sortUp&&tn.sortUp,"desc"===b.direction&&tn.sortDown&&tn.sortDown]})),ae=Mn&&tn.filter&&t("div",x({className:"st-icon-container",onClick:$n,onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.target===n.currentTarget||n.currentTarget.contains(n.target))&&(n.target.closest(".st-dropdown-content")||(n.preventDefault(),$n()))},tabIndex:0,role:"button","aria-label":"Filter ".concat(w.label),"aria-expanded":S,"aria-haspopup":"dialog"},{children:[h(tn.filter,{style:{fill:Nn?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),n(En,x({open:S,overflow:"visible",setOpen:M,onClose:function(){return M(!1)}},{children:n(ut,{header:w,currentFilter:Nn,onApplyFilter:function(n){$(n),M(!1)},onClearFilter:function(){Q(w.accessor),M(!1)}})}))]})),ue=kn&&!Tn&&n("div",x({className:"st-icon-container st-collapse-icon-container",onClick:function(n){return ne(n)},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),ne(n))},tabIndex:0,role:"button","aria-label":"".concat(An?"Expand":"Collapse"," ").concat(w.label," column"),"aria-expanded":!An},{children:An?tn.headerCollapse:tn.headerExpand})),le=n(lt,x({content:w.tooltip||""},{children:n("span",x({className:"st-header-label-text ".concat("right"===w.align?"right-aligned":"center"===w.align?"center-aligned":"left-aligned")},{children:Tn?n(me,{checked:!!B&&B(),onChange:function(n){Z&&Z(n)},ariaLabel:"Select all rows"}):E?n(Pn,{defaultValue:F,onBlur:function(){return T(!1)},onChange:Qn}):F||(null==w?void 0:w.label)}))})),ce="header-desc-".concat(w.accessor),se=function(n,e){var t=[];return n.type&&"other"!==n.type&&t.push("".concat(n.type," column")),n.isSortable&&t.push("sortable"),e&&t.push("filterable"),n.tooltip&&t.push(n.tooltip),t.join(", ")}(w,Mn);return t(On,x({className:jn,id:L({accessor:w.accessor,rowId:"header"}),role:"columnheader","aria-sort":function(){if(w.isSortable)return(null==b?void 0:b.key.accessor)===w.accessor?"asc"===b.direction?"ascending":"descending":"none"}(),"aria-colindex":s+1,"data-col-index":s,"aria-describedby":se?ce:void 0,onDragOver:function(n){Tn||Yn({callback:Jn,callbackProps:{event:n,hoveredHeader:w},limit:50})},style:x({gridRowStart:p,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:d},v-p>1?{}:{height:fn})},{children:[g&&oe,!w.headerRenderer&&"right"===w.align&&ue,!w.headerRenderer&&"right"===w.align&&ae,!w.headerRenderer&&"right"===w.align&&ie,n("div",x({ref:Dn,className:"st-header-label",draggable:j&&!w.disableReorder&&!Tn&&!ee(w,X),onClick:function(n){Tn||te({event:n,header:w})},onDoubleClick:function(n){Tn||function(n){var e=n.header;e.isSelectionColumn||wn&&e.isSortable&&sn(e.accessor)}({event:n,header:w})},onDragEnd:Tn?void 0:function(n){n.preventDefault(),_n()},onDragStart:Tn?void 0:function(n){j&&w&&function(n){Un(n)}(w)}},{children:w.headerRenderer?w.headerRenderer({accessor:w.accessor,colIndex:s,header:w,components:{sortIcon:ie||void 0,filterIcon:ae||void 0,collapseIcon:ue||void 0,labelContent:le}}):le})),!w.headerRenderer&&"right"!==w.align&&ie,!w.headerRenderer&&"right"!==w.align&&ae,!w.headerRenderer&&"right"!==w.align&&ue,!g&&oe,nn&&!Tn&&n("div",x({className:"st-header-dropdown-container"},{children:nn({accessor:w.accessor,colIndex:s,header:w,isOpen:Hn,onClose:Zn,position:Ln})})),se&&n("span",x({id:ce,className:"st-sr-only"},{children:se}))]}))},st=function(t){var r=t.columnIndices,o=t.gridTemplateColumns,i=t.handleScroll,a=t.headers,l=t.maxDepth,c=t.pinned,s=t.sectionRef,d=t.sort,f=t.width,v=vn(),h=v.collapsedHeaders,p=v.autoExpandColumns,w=u(function(){var n=function(e,t){return W({header:e,pinned:c,headers:a,collapsedHeaders:h,rootPinned:t})?e.children&&0!==e.children.length?e.children.flatMap(function(e){return n(e,t)}):[e]:[]},e=a.flatMap(function(e){return n(e,e.pinned)});return 0===e.length?-1:r[e[e.length-1].accessor]},[a,c,h,r]),m=u(function(){var n=[],e=1,t=function(o,i,u,s,d){var f,v;if(void 0===u&&(u=!1),!W({header:o,pinned:c,headers:a,collapsedHeaders:h,rootPinned:d}))return 0;u||e++;var p,w,m=null!==(v=null===(f=o.children)||void 0===f?void 0:f.filter(function(n){return W({header:n,pinned:c,headers:a,collapsedHeaders:h,rootPinned:d})}).length)&&void 0!==v?v:0,g=e;if(o.singleRowChildren&&m>0?(p=g+1,w=l+1):m>0?(p=g+m,w=i+1):(p=g+1,w=l+1),n.push({header:o,gridColumnStart:g,gridColumnEnd:p,gridRowStart:i,gridRowEnd:w,colIndex:r[o.accessor],parentHeader:s}),o.children&&o.children.length>0){var b=o.singleRowChildren?i:i+1,x=!o.singleRowChildren;o.children.forEach(function(n){W({header:n,pinned:c,headers:a,collapsedHeaders:h,rootPinned:d})&&(t(n,b,x,o,d),x=!1)})}return p-g},o=a.filter(function(n){return W({header:n,pinned:c,headers:a,collapsedHeaders:h,rootPinned:n.pinned})}),i=!0;return o.forEach(function(n){t(n,1,i,void 0,n.pinned),i=!1}),n},[a,l,c,r,h]);return n(Ee,x({childRef:s,group:c?"pinned-".concat(c):"default"},{children:n("div",x({className:"st-header-".concat(c?"pinned-".concat(c):"main")},i&&{onScroll:i},{ref:s,style:{gridTemplateColumns:o,width:f,position:"relative"}},{children:n(e,{children:m.map(function(e){return n(ct,{colIndex:e.colIndex,gridColumnEnd:e.gridColumnEnd,gridColumnStart:e.gridColumnStart,gridRowEnd:e.gridRowEnd,gridRowStart:e.gridRowStart,header:e.header,parentHeader:e.parentHeader,reverse:"right"===c,sort:d,isLastHeader:p&&!c&&e.colIndex===w},e.header.accessor)})})}))}))},dt=function(e){var r=e.calculatedHeaderHeight,o=e.centerHeaderRef,i=e.headers,a=e.mainTemplateColumns,l=e.pinnedLeftColumns,c=e.pinnedLeftTemplateColumns,s=e.pinnedRightColumns,d=e.pinnedRightTemplateColumns,f=e.sort,v=e.pinnedLeftWidth,h=e.pinnedRightWidth,p=vn(),w=p.headerContainerRef,m=p.pinnedLeftRef,g=p.pinnedRightRef,b=p.collapsedHeaders,y=p.tableRows,C=p.maxHeaderDepth,I=u(function(){return Zn(i,"left")||Zn(i,void 0)||Zn(i,"right")},[i]),R=u(function(){return I?void 0:{minHeight:r}},[I,r]),S=u(function(){return ke({headers:i,pinnedLeftColumns:l,pinnedRightColumns:s,collapsedHeaders:b})},[i,l,s,b]),M=u(function(){return Object.keys(S).length},[S]);return t("div",x({className:"st-header-container",ref:w,style:R,"aria-rowcount":y.length+C,"aria-colcount":M},{children:[Zn(i,"left")&&n(st,{columnIndices:S,gridTemplateColumns:c,handleScroll:void 0,headers:i,maxDepth:C,pinned:"left",sectionRef:m,sort:f,width:v}),n(st,{columnIndices:S,gridTemplateColumns:a,handleScroll:void 0,headers:i,maxDepth:C,sectionRef:o,sort:f}),Zn(i,"right")&&n(st,{columnIndices:S,gridTemplateColumns:d,handleScroll:void 0,headers:i,maxDepth:C,pinned:"right",sectionRef:g,sort:f,width:h})]}))},ft=function(e){var r=e.calculatedHeaderHeight,o=e.hideHeader,i=e.pinnedLeftWidth,l=e.pinnedRightWidth,c=e.setScrollTop,s=e.setScrollDirection,d=e.shouldShowEmptyState,f=e.sort,v=e.tableRows,h=e.rowsToRender,p=e.stickyParents,w=e.regularRows,m=e.partiallyVisibleRows,g=e.heightMap,b=vn(),y=b.columnResizing,C=b.editColumns,I=b.headers,R=b.collapsedHeaders,S=b.autoExpandColumns,M=a(null),N=u(function(){return I.filter(function(n){return!n.pinned})},[I]),H=u(function(){return I.filter(function(n){return"left"===n.pinned})},[I]),E=u(function(){return I.filter(function(n){return"right"===n.pinned})},[I]),T=u(function(){return Fe({headers:H,collapsedHeaders:R,autoExpandColumns:S})},[H,R,S]),k=u(function(){return Fe({headers:N,collapsedHeaders:R,autoExpandColumns:S})},[N,R,S]),P=u(function(){return Fe({headers:E,collapsedHeaders:R,autoExpandColumns:S})},[E,R,S]),A={calculatedHeaderHeight:r,centerHeaderRef:M,headers:I,mainTemplateColumns:k,pinnedLeftColumns:H,pinnedLeftTemplateColumns:T,pinnedRightColumns:E,pinnedRightTemplateColumns:P,sort:f,pinnedLeftWidth:i,pinnedRightWidth:l},F={calculatedHeaderHeight:r,heightMap:g,mainTemplateColumns:k,partiallyVisibleRows:m,pinnedLeftColumns:H,pinnedLeftTemplateColumns:T,pinnedLeftWidth:i,pinnedRightColumns:E,pinnedRightTemplateColumns:P,pinnedRightWidth:l,regularRows:w,rowsToRender:h,setScrollDirection:s,setScrollTop:c,shouldShowEmptyState:d,stickyParents:p,tableRows:v};return t("div",x({className:"st-content ".concat(y?"st-resizeable":"st-not-resizeable"),style:{width:C?"calc(100% - 29.5px)":"100%"}},{children:[!o&&n(dt,x({},A)),n(We,x({},F))]}))},vt=function(e){var r=e.mainBodyWidth,u=e.mainBodyRef,l=e.pinnedLeftWidth,c=e.pinnedRightWidth,s=e.pinnedLeftContentWidth,d=e.pinnedRightContentWidth,f=e.tableBodyContainerRef,v=vn().editColumns,h=i(!1),p=h[0],w=h[1],m=a(null),g=a(null),b=a(null),y=v?N:0,C=(v?c+1:c)+(f.current&&f.current&&f.current.scrollHeight>f.current.clientHeight?f.current.offsetWidth-f.current.clientWidth:0);return o(function(){setTimeout(function(){u.current&&w(u.current.scrollWidth-u.current.clientWidth>1)},1)},[u,r]),p?t("div",x({className:"st-horizontal-scrollbar-container"},{children:[l>0&&n(Ee,x({childRef:g,group:"pinned-left"},{children:n("div",x({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:n("div",{style:{width:s}})}))})),r>0&&n(Ee,x({childRef:m},{children:n("div",x({className:"st-horizontal-scrollbar-middle",ref:m},{children:n("div",{style:{width:r}})}))})),c>0&&n(Ee,x({childRef:b,group:"pinned-right"},{children:n("div",x({className:"st-horizontal-scrollbar-right",ref:b,style:{width:C}},{children:n("div",{style:{width:d}})}))})),y>0&&n("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},ht={string:function(n,e,t){if(n===e)return 0;var r=n.localeCompare(e);return"asc"===t?r:-r},number:function(n,e,t){if(n===e)return 0;var r=n-e;return"asc"===t?r:-r},boolean:function(n,e,t){if(n===e)return 0;var r=n===e?0:n?-1:1;return"asc"===t?r:-r},date:function(n,e,t){var r=new Date(n),o=new Date(e);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"asc"===t?i:-i},enum:function(n,e,t){return ht.string(n,e,t)},default:function(n,e,t){return n===e?0:null==n?"asc"===t?-1:1:null==e?"asc"===t?1:-1:"string"==typeof n&&"string"==typeof e?ht.string(n,e,t):"number"==typeof n&&"number"==typeof e?ht.number(n,e,t):"boolean"==typeof n&&"boolean"==typeof e?ht.boolean(n,e,t):ht.string(n+"",e+"",t)}},pt=function(n){return function(n){var e=n.rows,t=n.sortColumn,r=function(n,e){for(var t=0,o=n;o.length>t;t++){var i=o[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=r(i.children,e);if(a)return a}}},o=r(n.headers,t.key.accessor),i=(null==o?void 0:o.type)||"string",a=t.direction,u=t.key.accessor;return R([],e,!0).sort(function(n,t){var r,l;if(null==o?void 0:o.valueGetter){var c=e.indexOf(n),s=e.indexOf(t);r=o.valueGetter({accessor:u,row:n,rowIndex:c}),l=o.valueGetter({accessor:u,row:t,rowIndex:s})}else r=G(n,u),l=G(t,u);return(null==o?void 0:o.comparator)?o.comparator({rowA:n,rowB:t,valueA:r,valueB:l,direction:a}):function(n,e,t,r){if(void 0===t&&(t="string"),null==n||""===n)return"asc"===r?-1:1;if(null==e||""===e)return"asc"===r?1:-1;if("number"===t){var o=function(n){var e;if("number"==typeof n)return n;var t=n+"";if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(e=r[2])||void 0===e?void 0:e.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(n),a=o(e);return ht.number(i,a,r)}return"date"===t?ht.date(n+"",e+"",r):"boolean"===t?ht.boolean(!!n,!!e,r):"enum"===t?ht.enum(n+"",e+"",r):ht.string(n+"",e+"",r)}(r,l,i,a)})}({rows:n.rows,sortColumn:n.sortColumn,headers:n.headers})},wt=function(n){return u(function(){var e=A(n),t=new Map;return e.forEach(function(n){t.set(n.accessor,n)}),t},[n])},mt=function(n){var e=n.tableRows,t=n.sortColumn,r=n.rowGrouping,o=n.headers;return n.externalSortHandling?e:t?r&&r.length>0?(0,n.sortNestedRows)({groupingKeys:r,headers:o,rows:e,sortColumn:t}):pt({headers:o,rows:e,sortColumn:t}):e},gt=function(n,e,t){void 0===t&&(t=new Set);for(var r=0,o=n;o.length>r;r++){var i=o[r];if(!t.has(i.accessor)&&(t.add(i.accessor),i.children&&i.children.length>0)){var a=i.children.some(function(n){return n.accessor===e}),u=!1;if(!a)for(var l=0,c=i.children;c.length>l;l++){var s=c[l];if(gt([s],e,t),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},bt=function(n){return n.every(function(n){return n.hide})},xt=function(n){n.forEach(function(n){n.children&&n.children.length>0&&(xt(n.children),bt(n.children)&&(n.hide=!0))})};function yt(n){var e=n.fullRootHeaders,t=n.panelSection,r=n.expandedHeaders,o=n.forceExpanded,i=[],a=function(n,e,u,l){if(!n.isSelectionColumn&&!n.excludeFromRender){i.push({header:n,visualIndex:i.length,depth:e,parent:u,indexPath:l,panelSection:t});var c=n.children&&n.children.length>0,s=o||r.has(n.accessor);c&&s&&n.children&&n.children.forEach(function(t,r){a(t,e+1,n,R(R([],l,!0),[r],!1))})}};return n.sectionRoots.forEach(function(n){var t=e.findIndex(function(e){return e.accessor===n.accessor});-1!==t&&a(n,0,null,[t])}),i}var Ct=function(r){var o=r.allHeaders,i=r.clearHoverSeparator,a=r.depth,u=void 0===a?0:a,c=r.doesAnyHeaderHaveChildren,s=r.draggingRow,d=r.expandedHeaders,f=r.flattenedHeaders,v=r.forceExpanded,h=void 0!==v&&v,p=r.header,w=r.hoveredSeparatorIndex,m=r.isCheckedOverride,g=r.panelSection,b=r.rowIndex,y=r.setDraggingRow,C=r.setExpandedHeaders,I=r.setHoveredSeparatorIndex,S=vn(),M=S.columnEditorConfig,N=S.essentialAccessors,H=S.headers,E=S.icons,T=S.setHeaders,k=S.onColumnVisibilityChange,P=S.onColumnOrderChange,A=!1!==M.allowColumnPinning,F="".concat(16*u,"px"),D=p.children&&p.children.length>0,L=ee(p,N),W=!L,O=null!=m?m:!(p.hide||D&&p.children&&bt(p.children)),B=d.has(p.accessor),z=h||B,q=function(){if(!h){var n=new Set(d);B?n.delete(p.accessor):n.add(p.accessor),C(n)}},G=l(function(n){return!(N.size>0&&!re(n,N)||(null==P||P(n),T(n),0))},[N,P,T]),V=l(function(){var n=le(H,p.accessor,"left",N);n&&G(n)},[G,N,p.accessor,H]),j=l(function(){var n=le(H,p.accessor,"right",N);n&&G(n)},[G,N,p.accessor,H]),K=l(function(){var n=le(H,p.accessor,"main",N);n&&G(n)},[G,N,p.accessor,H]),U="left"===p.pinned||"right"===p.pinned?p.pinned:null,_=!!U&&!L,J=!U&&"main"===g,Y=!U&&"main"===g,X=function(n){if(W){p.hide=!n,n?(gt(o,p.accessor),D&&p.children&&p.children.length>0&&p.children.every(function(n){return!0===n.hide})&&p.children[0]&&(p.children[0].hide=!1,gt(o,p.children[0].accessor))):xt(o);var e=R([],H,!0);if(T(e),k){var t=function(n){var e={},t=function(n){e[n.accessor]=!n.hide,n.children&&n.children.length>0&&n.children.forEach(t)};return n.forEach(t),e}(e);k(t)}}},$=c&&D&&n("div",x({className:"st-header-icon-container"},{children:n("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(z?"expanded":"collapsed"),onClick:function(n){n.stopPropagation(),q()}},{children:E.expand}))})),Q=n(me,{checked:O,disabled:!W,onChange:X}),Z=n("div",x({className:"st-drag-icon-container"},{children:E.drag})),nn={pinnedSide:U,canPinLeft:J,canPinRight:Y,canUnpin:_,pinLeft:V,pinRight:j,unpin:K},en="left"===U?E.pinnedLeftIcon:"right"===U?E.pinnedRightIcon:null,tn=A&&0===u?null!==U&&null!==en?_?n("button",x({type:"button",className:"st-column-pin-btn st-column-pin-side st-column-pin-pinned-mark st-column-pin-pinned-active","aria-label":"Unpin column",title:"Unpin",onClick:function(n){n.stopPropagation(),K()}},{children:en})):n("span",x({className:"st-column-pin-pinned-mark st-column-pin-side st-column-pin-pinned-essential st-column-pin-pinned-active","aria-hidden":!0,title:"Pinned (essential)"},{children:en})):"main"===g&&(J||Y)?t("div",x({className:"st-column-pin-side-group"},{children:[J?n("button",x({type:"button",className:"st-column-pin-btn st-column-pin-side st-column-pin-side-option","aria-label":"Pin column to left",title:"Pin to left",onClick:function(n){n.stopPropagation(),V()}},{children:E.pinnedLeftIcon})):null,Y?n("button",x({type:"button",className:"st-column-pin-btn st-column-pin-side st-column-pin-side-option","aria-label":"Pin column to right",title:"Pin to right",onClick:function(n){n.stopPropagation(),j()}},{children:E.pinnedRightIcon})):null]})):null:null,rn=n("div",x({className:"st-column-label-container"},{children:p.label})),on=void 0!==b&&!p.disableReorder&&!ee(p,N);return t(e,{children:[0===b&&n("div",{className:"st-column-editor-drag-separator",style:{opacity:-1===w?1:0}}),n("div",x({className:"st-header-checkbox-item",style:{paddingLeft:F},draggable:on,onDragStart:function(n){n.dataTransfer.effectAllowed="move",void 0!==b&&(null==i||i(),y(f[b]))},onDragEnter:function(n){n.preventDefault()},onDragOver:function(n){if(n.preventDefault(),void 0!==b&&s&&s.panelSection===g){var e=n.currentTarget.getBoundingClientRect(),t=function(n){var e,t,r=n.flattenedHeaders,o=n.draggingRow,i=n.hoveredRowIndex,a=n.isTopHalfOfRow,u=r[i];if(u.panelSection!==o.panelSection)return null;if(u.depth===o.depth)return(null===(e=u.parent)||void 0===e?void 0:e.accessor)!==(null===(t=o.parent)||void 0===t?void 0:t.accessor)?null:a||u.header.children?i-1:i;if(u.depth>o.depth){for(var l=u,c=i,s=function(){var n=l.parent.accessor,e=r.findIndex(function(e){return e.header.accessor===n});if(-1===e)return"break";l=r[e],c=e};l.parent&&l.depth>o.depth&&"break"!==s(););for(var d=c,f=c,v=c+1;r.length>v&&r[v].depth>l.depth;v++)f=v;var h=f-d+1,p=i-d,w=h/2>p;return h%2==1&&p===Math.floor(h/2)&&(w=a),w?c-1:f}return null}({flattenedHeaders:f,draggingRow:s,hoveredRowIndex:b,isTopHalfOfRow:e.top+e.height/2>n.clientY});I(t)}},onDragEnd:function(){var n=function(){y(null),I(null)};if(s&&null!==w&&s.panelSection===g){var e=f[w>s.visualIndex?w:w+1];if(e){if(e.depth>s.depth&&e.parent){var t=f.findIndex(function(n){return n.header.accessor===e.parent.accessor});-1!==t&&(e=f[t])}if(s.header.accessor!==e.header.accessor)if(s.indexPath.length!==e.indexPath.length||1!==s.indexPath.length&&!s.indexPath.slice(0,-1).every(function(n,t){return n===e.indexPath[t]}))n();else{var r;if(1===s.indexPath.length){var o=pe(H,s.indexPath,e.indexPath),i=o.newHeaders;if(o.emergencyBreak)return void n();r=i}else{var a=pe(fe(H,s.indexPath),[s.indexPath[s.indexPath.length-1]],[e.indexPath[e.indexPath.length-1]]);if(i=a.newHeaders,a.emergencyBreak)return void n();r=ve(Qn(H),s.indexPath,i)}G(r),n()}else n()}else n()}else n()}},{children:M.rowRenderer?M.rowRenderer({accessor:p.accessor,header:p,panelSection:g,isEssential:L,canToggleVisibility:W,allowColumnPinning:A,pinControl:nn,components:{expandIcon:$||void 0,checkbox:Q,dragIcon:Z,labelContent:rn,pinIcon:A&&null!=tn?tn:void 0}}):t(e,{children:[c&&n("div",x({className:"st-header-icon-container"},{children:D?n("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(z?"expanded":"collapsed"),onClick:function(n){n.stopPropagation(),q()}},{children:E.expand})):null})),n(me,{checked:O,disabled:!W,onChange:X}),tn,n("div",x({className:"st-drag-icon-container"},{children:E.drag})),n("div",x({className:"st-column-label-container"},{children:p.label}))]})})),n("div",{className:"st-column-editor-drag-separator",style:{opacity:w===b?1:0}})]})},It=function(n,e){var t=e.toLowerCase();return!!n.label.toLowerCase().includes(t)||!(!n.children||0>=n.children.length)&&n.children.some(function(n){return It(n,e)})};function Rt(e){var r=e.panelSection,o=e.doesAnyHeaderHaveChildren,i=e.allHeaders,a=e.expandedHeaders,u=e.setExpandedHeaders,l=e.forceExpanded,c=e.draggingRow,s=e.setDraggingRow,d=e.hoverSep,f=e.setHoverSep,v=e.flattenedForSection,h=(null==d?void 0:d.section)===r?d.index:null,p=function(n){f(null===n?null:{section:r,index:n})};return t("div",x({className:"st-column-editor-section","data-panel-section":r},{children:[n("div",x({className:"st-column-editor-section-label"},{children:e.title})),n("div",x({className:"st-column-editor-list st-column-editor-list-section"},{children:v.map(function(e){return n(Ct,{allHeaders:i,clearHoverSeparator:function(){return f(null)},doesAnyHeaderHaveChildren:o,depth:e.depth,draggingRow:c,expandedHeaders:a,flattenedHeaders:v,forceExpanded:l,header:e.header,hoveredSeparatorIndex:h,panelSection:r,rowIndex:e.visualIndex,setDraggingRow:s,setExpandedHeaders:u,setHoveredSeparatorIndex:p},"".concat(r,"-").concat(e.header.accessor,"-").concat(e.visualIndex))})}))]}))}var St=function(r){var o=r.headers,a=r.open,l=r.searchEnabled,c=r.searchPlaceholder,s=r.searchFunction,d=r.customRenderer,f=vn().resetColumns,v=i(""),h=v[0],p=v[1],w=i(null),m=w[0],g=w[1],b=i(null),y=b[0],C=b[1],I=i(function(){var n=new Set,e=function(t){t.forEach(function(t){t.children&&t.children.length>0&&(n.add(t.accessor),e(t.children))})};return e(o),n}),S=I[0],M=I[1],N=u(function(){return o.some(function(n){return n.children&&n.children.length>0})},[o]),H=u(function(){return l?function(n,e,t){if(!e.trim())return n;var r=t||It;return n.filter(function(n){return!n.isSelectionColumn&&!n.excludeFromRender&&r(n,e)})}(o,h,s):o},[o,h,l,s]),E=u(function(){return ne(H)},[H]),T=E.pinnedLeft,k=E.unpinned,P=E.pinnedRight,A=l&&h.trim().length>0,F=u(function(){return yt({sectionRoots:T,fullRootHeaders:o,panelSection:"left",expandedHeaders:S,forceExpanded:A})},[T,o,S,A]),D=u(function(){return yt({sectionRoots:k,fullRootHeaders:o,panelSection:"main",expandedHeaders:S,forceExpanded:A})},[k,o,S,A]),L=u(function(){return yt({sectionRoots:P,fullRootHeaders:o,panelSection:"right",expandedHeaders:S,forceExpanded:A})},[P,o,S,A]),W=u(function(){return R(R(R([],F,!0),D,!0),L,!0)},[F,D,L]),O=l?n("div",x({className:"st-column-editor-search-wrapper"},{children:n("div",x({className:"st-column-editor-search"},{children:n("input",{type:"text",value:h,onChange:function(n){return p(n.target.value)},placeholder:c,className:"st-filter-input",onClick:function(n){return n.stopPropagation()}})}))})):null,B=T.length>0?Rt({title:"Pinned left",panelSection:"left",doesAnyHeaderHaveChildren:N,allHeaders:o,expandedHeaders:S,setExpandedHeaders:M,forceExpanded:A,draggingRow:m,setDraggingRow:g,hoverSep:y,setHoverSep:C,flattenedForSection:F}):null,z=Rt({title:"Columns",panelSection:"main",doesAnyHeaderHaveChildren:N,allHeaders:o,expandedHeaders:S,setExpandedHeaders:M,forceExpanded:A,draggingRow:m,setDraggingRow:g,hoverSep:y,setHoverSep:C,flattenedForSection:D}),q=P.length>0?Rt({title:"Pinned right",panelSection:"right",doesAnyHeaderHaveChildren:N,allHeaders:o,expandedHeaders:S,setExpandedHeaders:M,forceExpanded:A,draggingRow:m,setDraggingRow:g,hoverSep:y,setHoverSep:C,flattenedForSection:L}):null,G=t("div",x({className:"st-column-editor-lists"},{children:[B,z,q]})),V=d?d({searchSection:O,listSection:G,pinnedLeftList:B,unpinnedList:z,pinnedRightList:q,flattenedHeaders:W,searchTerm:h,setSearchTerm:p,searchEnabled:l,searchPlaceholder:c,headers:o,resetColumns:f}):t(e,{children:[O,G]});return n("div",x({className:"st-column-editor-popout ".concat(a?"open":""),onClick:function(n){return n.stopPropagation()}},{children:n("div",x({className:"st-column-editor-popout-content"},{children:V}))}))},Mt=function(e){var r=e.columnEditorConfig,o=e.headers,i=e.open,a=e.setOpen,u=r.text,l=r.searchEnabled,c=r.searchPlaceholder,s=r.searchFunction,d=r.customRenderer;return e.editColumns?t("div",x({className:"st-column-editor ".concat(i?"open":""),onClick:function(){a(!i)},style:{width:N}},{children:[n("div",x({className:"st-column-editor-text"},{children:u})),n(St,{headers:o,open:i,searchEnabled:l,searchPlaceholder:c,searchFunction:s,customRenderer:d})]})):null},Nt=function(e){var t=e.children,o=a({}),i=l(function(n,e){return!!o.current[e]&&o.current[e].find(function(e){return e===n})},[]),u=l(function(n,e){n.scrollWidth-n.clientWidth>0&&(e.scrollLeft=n.scrollLeft)},[]),c=l(function(n){n.onscroll=null},[]),s=l(function(n,e){n.onscroll=function(){window.requestAnimationFrame(function(){e.forEach(function(e){var t;null===(t=o.current[e])||void 0===t||t.forEach(function(e){n!==e&&(c(e),u(n,e),window.requestAnimationFrame(function(){var n=Object.keys(o.current).filter(function(n){return o.current[n].includes(e)});s(e,n)}))})})})}},[c,u]),d=l(function(n,e){e.forEach(function(e){o.current[e]||(o.current[e]=[]),i(n,e)||(o.current[e].length>0&&u(o.current[e][0],n),o.current[e].push(n))}),s(n,e)},[i,u,s]),f=l(function(n,e){e.forEach(function(e){if(i(n,e)){c(n);var t=o.current[e].indexOf(n);-1!==t&&o.current[e].splice(t,1)}})},[i,c]);return n(He.Provider,x({value:{registerPane:d,unregisterPane:f}},{children:r.Children.only(t)}))},Ht=function(n){var e=n.tableRows,t=n.filterState;return n.externalFilterHandling?e:t&&0!==Object.keys(t).length?e.filter(function(n){return Object.values(t).every(function(e){try{return function(n,e){var t=e.operator,r=e.value,o=e.values;if(null==n)return"isEmpty"===t;if("isEmpty"===t)return!n||""===(n+"").trim();if("isNotEmpty"===t)return n&&""!==(n+"").trim();if("string"==typeof n||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=(n+"").toLowerCase(),a=r?(r+"").toLowerCase():"";switch(t){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof n||!isNaN(+n)){var u=+n,l=+r;switch(t){case"equals":return u===l;case"notEquals":return u!==l;case"greaterThan":return u>l;case"lessThan":return l>u;case"greaterThanOrEqual":return u>=l;case"lessThanOrEqual":return l>=u;case"between":if(o&&2===o.length){var c=o.map(Number),s=c[1];return u>=c[0]&&s>=u}return!1;case"notBetween":if(o&&2===o.length){var d=o.map(Number);return s=d[1],d[0]>u||u>s}return!0}}if(n instanceof Date||!isNaN(Date.parse(n))){var f=jn(n),v=jn((r||"")+""),h=Vn(f),p=Vn(v);switch(t){case"equals":return h.getTime()===p.getTime();case"notEquals":return h.getTime()!==p.getTime();case"before":return p>h;case"after":return h>p;case"between":if(o&&2===o.length){var w=o.map(function(n){return Vn(jn((n||"")+""))}),m=w[1];return h>=w[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(n){return Vn(jn((n||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof n&&"equals"===t)return n===!!r;if(Array.isArray(n)){var b=n.map(function(n){return"object"==typeof n&&null!==n?JSON.stringify(n):n+""}).join(", ");n=b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var x=o.includes(n+"");return"in"===t?x:!x}return!1}var y=(n+"").toLowerCase(),C=r?(r+"").toLowerCase():"";switch(t){case"equals":return y===C;case"notEquals":return y!==C;default:return!0}}(G(n,e.accessor),e)}catch(n){return console.warn("Filter error for accessor ".concat(e.accessor,":"),n),!0}})}):e},Et=function(n){var e,t=document.querySelector(".simple-table-root");if("string"==typeof n){if(n.endsWith("px"))return parseInt(n,10);if(n.endsWith("vh"))return window.innerHeight*parseInt(n,10)/100;if(n.endsWith("%")){var r=null===(e=null==t?void 0:t.parentElement)||void 0===e?void 0:e.clientHeight;return!r||50>r?0:r*parseInt(n,10)/100}return window.innerHeight}return n},Tt=function(n,e,t,r){var o=[],i=function(n){n.forEach(function(n){var t=r?n[r]:void 0;if(r&&t&&j(t))i(t);else{var a=G(n,e);null!=a&&o.push(a)}})};if(i(n),0!==o.length){if("custom"===t.type&&t.customFn)return t.customFn(o);var a,u=t.parseValue?o.map(t.parseValue).filter(function(n){return!isNaN(n)}):o.map(function(n){return"number"==typeof n?n:"string"==typeof n?parseFloat(n):NaN}).filter(function(n){return!isNaN(n)});if(0===u.length)return"count"===t.type?o.length:void 0;switch(t.type){case"sum":a=u.reduce(function(n,e){return n+e},0);break;case"average":a=u.reduce(function(n,e){return n+e},0)/u.length;break;case"count":a=o.length;break;case"min":a=Math.min.apply(Math,u);break;case"max":a=Math.max.apply(Math,u);break;default:return}return t.formatResult?t.formatResult(a):a}},kt=function(n){var e=n.effectiveHeaders,t=n.headerHeight,r=n.rowHeight,o=n.tableBodyContainerRef,a=i(0),c=a[0],s=a[1],d=l(function(n){var e,t;return n.singleRowChildren&&(null===(e=n.children)||void 0===e?void 0:e.length)?1:(null===(t=n.children)||void 0===t?void 0:t.length)?1+Math.max.apply(Math,n.children.map(d)):1},[]),f=u(function(){var n=0;return e.forEach(function(e){var t=d(e);n=Math.max(n,t)}),n},[e,d]),v=u(function(){var n=1;if("undefined"!=typeof window){var e=document.documentElement,o=getComputedStyle(e).getPropertyValue("--st-border-width").trim();if(o){var i=parseFloat(o);isNaN(i)||(n=i)}}return f*(null!=t?t:r)+n},[f,t,r]);return m(function(){var n=function(n,e){void 0===e&&(e=150);var t=null,r=null,o=null,i=function(){null!==r&&clearTimeout(r),r=setTimeout(function(){r=null,function(){if(null!==t){var e=t;t=null,n(e)}}()},e)};return{notify:function(n){t=n,i()},notifyFromObserver:function(n){null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(function(){o=null,t=n(),i()})},publishImmediately:function(e){null!==r&&(clearTimeout(r),r=null),t=null,n(e)},destroy:function(){null!==r&&(clearTimeout(r),r=null),null!==o&&(cancelAnimationFrame(o),o=null),t=null}}}(function(n){s(function(e){return e===n?e:(function(){var n,e=window.__containerResizePerf;e&&(e.containerWidthStateUpdates=(null!==(n=e.containerWidthStateUpdates)&&void 0!==n?n:0)+1,window.dispatchEvent(new CustomEvent("st-container-width-update")))}(),n)})}),e=function(){var n,e;return null!==(e=null===(n=o.current)||void 0===n?void 0:n.clientWidth)&&void 0!==e?e:0},t=e();t>0&&n.publishImmediately(t);var r=null,i=o.current;return i&&"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(function(){n.notifyFromObserver(e)})).observe(i),function(){null==r||r.disconnect(),n.destroy()}},[o]),{containerWidth:c,calculatedHeaderHeight:v,maxHeaderDepth:f}},Pt=function(n){if(null==n)return"";var e=n+"";if(e.includes(",")||e.includes('"')||e.includes("\n")||e.includes("\r")){var t=e.replace(/"/g,'""');return'"'.concat(t,'"')}return e},At=function(n){return function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return new Promise(function(t){n.apply(void 0,e),setTimeout(function(){return t()},0)})}},Ft=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},Dt={COLUMN_REORDER:{duration:180,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},ROW_REORDER:{duration:200,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},REDUCED_MOTION:{duration:150,easing:"ease-out",delay:0}},Lt=function(n){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.top="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating")},Wt=function(n,e,t,r){return void 0===t&&(t={}),new Promise(function(r){n.style.transition="transform ".concat(e.duration,"ms ").concat(e.easing),e.delay&&(n.style.transitionDelay="".concat(e.delay,"ms")),n.style.transform="translate3d(0, 0, 0)";var o=function(){Lt(n),n.removeEventListener("transitionend",o),t.onComplete&&t.onComplete(),r()};n.addEventListener("transitionend",o),setTimeout(o,e.duration+(e.delay||0)+50)})},Ot=function(n){var e=n.element,t=n.finalConfig,r=n.fromBounds,o=n.toBounds;return C(void 0,void 0,void 0,function(){var n,i;return I(this,function(a){switch(a.label){case 0:return n=function(n,e){return{x:("x"in n?n.x:n.left)-e.x,y:("y"in n?n.y:n.top)-e.y}}(r,o),0===n.x&&0===n.y||Ft()&&!1!==t.respectReducedMotion?[2]:(u=t,l=Math.abs(n.x)>Math.abs(n.y)?"column":"row",void 0===u&&(u={}),i=Ft()?x(x({},Dt.REDUCED_MOTION),u):x(x({},"column"===l?Dt.COLUMN_REORDER:Dt.ROW_REORDER),u),Lt(e),function(n,e){n.style.transform="translate3d(".concat(e.x,"px, ").concat(e.y,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating")}(e,n),[4,Wt(e,i,t)]);case 1:return a.sent(),[2]}var u,l})})},Bt=function(n){var e=n.element,t=n.options;return C(void 0,void 0,void 0,function(){var n,r,o,i,a,u,l,c,s,d,f,v,h,p,w,m;return I(this,function(g){return n=t.startY,r=t.endY,o=t.finalY,a=void 0===(i=t.duration)?300:i,l=void 0===(u=t.easing)?"cubic-bezier(0.2, 0.0, 0.2, 1)":u,s=void 0===(c=t.delay)?0:c,d=t.onComplete,v=void 0===(f=t.respectReducedMotion)||f,Ft()&&v?(void 0!==o&&(e.style.transform="",e.style.top="".concat(o,"px")),d&&d(),[2]):(h=e.getBoundingClientRect(),w=n-(p=h.top),m=r-p,[2,new Promise(function(n){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating"),e.style.transform="translate3d(0, ".concat(w,"px, 0)"),e.style.transition="none",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.classList.add("st-animating"),e.style.transition="transform ".concat(a,"ms ").concat(l),s&&(e.style.transitionDelay="".concat(s,"ms")),e.style.transform="translate3d(0, ".concat(m,"px, 0)");var t=function(){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating"),void 0!==o&&(e.style.top="".concat(o,"px")),e.removeEventListener("transitionend",t),d&&d(),n()};e.addEventListener("transitionend",t),setTimeout(t,a+(s||0)+50)})])})})},zt=[],qt=function(n){var e=n.rows,t=n.rowGrouping,r=void 0===t?zt:t,o=n.getRowId,i=n.expandedRows,a=n.collapsedRows,l=n.expandedDepths,c=n.rowStateMap,s=n.hasLoadingRenderer,d=n.hasErrorRenderer,f=n.hasEmptyRenderer,v=n.headers,h=n.rowHeight,p=n.headerHeight,w=n.customTheme;return u(function(){if(!r||0===r.length){var n=e.map(function(n,e){var t=[e],r=[e];return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,rowId:K({row:n,getRowId:o,depth:0,index:e,rowPath:t,rowIndexPath:r,groupingKey:void 0}),rowPath:t,rowIndexPath:r,absoluteRowIndex:e,isLastGroupRow:!1}});return{flattenedRows:n,heightOffsets:[],paginatableRows:n,parentEndPositions:e.map(function(n,e){return e+1})}}var t=[],u=[],m=[],g=[],b=0,x=function(n,e,y,C,I){void 0===y&&(y=[]),void 0===C&&(C=[]),void 0===I&&(I=[]),n.forEach(function(n,S){var M,N,H=r[e],E=t.length,T=R(R([],y,!0),[S],!1),k=R(R([],C,!0),[S],!1),P=K({row:n,getRowId:o,depth:e,index:S,rowPath:T,rowIndexPath:k,groupingKey:H}),A=t.length,F={row:n,depth:e,displayPosition:b,groupingKey:H,position:E,isLastGroupRow:0===e,rowId:P,rowPath:T,rowIndexPath:k,absoluteRowIndex:E,parentIndices:I.length>0?R([],I,!0):void 0};t.push(F),u.push(F),b++;var D=U(P);if(J(D,e,l,i,a)&&r.length>e){var L=null==c?void 0:c.get(D),W=_(n,H),O=v.find(function(n){return n.expandable&&n.nestedTable});if((null==O?void 0:O.nestedTable)&&W.length>0){var q=t.length,G=(null===(M=O.nestedTable.customTheme)||void 0===M?void 0:M.rowHeight)||h,V=(null===(N=O.nestedTable.customTheme)||void 0===N?void 0:N.headerHeight)||p,j=B({childRowCount:W.length,rowHeight:G,headerHeight:V,customTheme:w}),Y=z({calculatedHeight:j,customHeight:O.nestedTable.height,customTheme:w});m.push([q,Y-h]);var X=R(R([],T,!0),[H],!1);t.push({row:{},depth:e+1,displayPosition:b-1,groupingKey:H,position:q,isLastGroupRow:!1,rowId:X,rowPath:X,rowIndexPath:k,nestedTable:{parentRow:n,expandableHeader:O,childAccessor:H,calculatedHeight:Y},absoluteRowIndex:q})}else if(L&&(L.loading||L.error||L.isEmpty)){if(L.loading&&s||L.error&&d||L.isEmpty&&f){var $=t.length,Q=R(R([],T,!0),[H],!1);t.push({row:{},depth:e+1,displayPosition:b-1,groupingKey:H,position:$,isLastGroupRow:!1,rowId:Q,rowPath:Q,rowIndexPath:k,stateIndicator:{parentRowId:D,parentRow:n,state:L},absoluteRowIndex:$,parentIndices:R(R([],I,!0),[A],!1)})}else if(L.loading&&!s){var Z=t.length,nn=R(R([],T,!0),[H,"loading-skeleton"],!1);t.push({row:{},depth:e+1,displayPosition:b-1,groupingKey:H,position:Z,isLastGroupRow:!1,rowId:nn,rowPath:nn,rowIndexPath:k,isLoadingSkeleton:!0,absoluteRowIndex:Z,parentIndices:R(R([],I,!0),[A],!1)})}}else if(W.length>0){var en=R(R([],T,!0),[H],!1),tn=R([],k,!0);x(W,e+1,en,tn,R(R([],I,!0),[A],!1))}}0===e&&g.push(t.length)})};return x(e,0,[],[],[]),{flattenedRows:t,heightOffsets:m,paginatableRows:u,parentEndPositions:g}},[e,r,o,i,a,l,c,s,d,f,v,h,p,w])},Gt={rowHeight:32,headerHeight:32,footerHeight:49,rowSeparatorWidth:1,borderWidth:1,pinnedBorderWidth:1,nestedGridBorderWidth:2,nestedGridPaddingTop:8,nestedGridPaddingBottom:8,nestedGridPaddingLeft:8,nestedGridPaddingRight:8,nestedGridMaxHeight:400,selectionColumnWidth:42},Vt={text:"Columns",searchEnabled:!0,searchPlaceholder:"Search columns...",allowColumnPinning:!0},jt=[{propName:"columnEditorText",replacement:"columnEditorConfig.text",message:"Use the columnEditorConfig object instead for better organization of column editor settings."},{propName:"expandIcon",replacement:"icons.expand",message:"Use the icons object instead for better organization of icon settings."},{propName:"filterIcon",replacement:"icons.filter",message:"Use the icons object instead for better organization of icon settings."},{propName:"headerCollapseIcon",replacement:"icons.headerCollapse",message:"Use the icons object instead for better organization of icon settings."},{propName:"headerExpandIcon",replacement:"icons.headerExpand",message:"Use the icons object instead for better organization of icon settings."},{propName:"nextIcon",replacement:"icons.next",message:"Use the icons object instead for better organization of icon settings."},{propName:"prevIcon",replacement:"icons.prev",message:"Use the icons object instead for better organization of icon settings."},{propName:"sortDownIcon",replacement:"icons.sortDown",message:"Use the icons object instead for better organization of icon settings."},{propName:"sortUpIcon",replacement:"icons.sortUp",message:"Use the icons object instead for better organization of icon settings."}],Kt=function(n,e){var t=[];return n.forEach(function(n){n.hide||(n.children&&n.children.length>0?t.push.apply(t,Kt(n.children,null!=e?e:n.pinned)):t.push(n))}),t},Ut=function(n,e){return e>=n.reduce(function(n,e){return n+Z(e)},0)},_t=function(n,e){var t=new Map,r=n.reduce(function(n,e){return n+("number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):150)},0);if(0===r)return t;var o=e/r;if(.01>Math.abs(o-1))return t;var i=0;return n.forEach(function(r,a){var u,l="number"==typeof r.width?r.width:"string"==typeof r.width&&r.width.endsWith("px")?parseFloat(r.width):150;a===n.length-1?u=e-i:i+=u=Math.round(l*o),t.set(r.accessor,u)}),t},Jt=function(n,e){var t,r=e.containerWidth,o=e.pinnedLeftWidth,i=e.pinnedRightWidth,a=e.mainBodyRef;if(!e.autoExpandColumns||0===r||e.isResizing)return n;t=a.current?a.current.clientWidth:Math.max(0,r-o-i);var u=n.filter(function(n){return"left"===n.pinned}),l=n.filter(function(n){return"right"===n.pinned}),c=n.filter(function(n){return!n.pinned}),s=Kt(u,"left"),d=Kt(l,"right"),f=Kt(c,void 0),v=s.length>0&&Ut(s,o),h=d.length>0&&Ut(d,i),p=f.length>0&&t>0&&Ut(f,t),w=new Map;if(v&&_t(s,o).forEach(function(n,e){return w.set(e,n)}),h&&_t(d,i).forEach(function(n,e){return w.set(e,n)}),p&&_t(f,t).forEach(function(n,e){return w.set(e,n)}),0===w.size)return n;var m=function(n,e){var t;if(n.hide)return n;var r=null!=e?e:n.pinned,o=null===(t=n.children)||void 0===t?void 0:t.map(function(n){return m(n,r)});if(!n.children||0===n.children.length){var i=w.get(n.accessor);return x(x({},n),void 0!==i?{width:i,children:o}:{children:o})}return x(x({},n),{children:o})};return n.map(function(n){return m(n,n.pinned)})},Yt=n(function(){return n("div",x({className:"st-empty-state"},{children:"No rows to display"}))},{}),Xt=function(e){var t=i(!1),r=t[0],a=t[1];return o(function(){!function(n){"production"!==process.env.NODE_ENV&&jt.forEach(function(e){var t=e.propName,r=e.replacement,o=e.message;if(void 0!==n[t]){var i='SimpleTable: The "'.concat(t,'" prop is deprecated and will be removed in a future version.'),a='Please use "'.concat(r,'" instead.'),u=o?"\n".concat(o):"",l=r.split("."),c=l[0],s=l[1],d="string"==typeof n[t]?JSON.stringify(n[t]):"<YourIcon />";console.error("".concat(i,"\n").concat(a).concat(u,"\n\nExample:\n<SimpleTable\n ").concat(c,"={{\n ").concat(s,": ").concat(d,"\n }}\n/>"))}})}(e)},[]),o(function(){a(!0)},[]),r?n($t,x({},e)):null},$t=function(e){var r=e.allowAnimations,c=void 0!==r&&r,s=e.autoExpandColumns,d=void 0!==s&&s,f=e.canExpandRowGroup,v=e.cellUpdateFlash,h=void 0!==v&&v,p=e.className,w=e.columnBorders,g=void 0!==w&&w,y=e.columnEditorConfig,S=void 0===y?Vt:y,N=e.columnEditorText,H=e.columnReordering,E=void 0!==H&&H,T=e.columnResizing,k=void 0!==T&&T,P=e.copyHeadersToClipboard,F=void 0!==P&&P,D=e.customTheme,L=e.defaultHeaders,W=e.editColumns,B=void 0!==W&&W,z=e.editColumnsInitOpen,q=void 0!==z&&z,_=e.emptyStateRenderer,J=e.enableHeaderEditing,$=void 0!==J&&J,Q=e.enableRowSelection,Z=void 0!==Q&&Q,nn=e.enableStickyParents,en=void 0!==nn&&nn,tn=e.errorStateRenderer,on=e.expandAll,an=void 0===on||on,ln=e.expandIcon,dn=e.externalFilterHandling,vn=void 0!==dn&&dn,hn=e.externalSortHandling,wn=void 0!==hn&&hn,gn=e.filterIcon,yn=e.footerRenderer,In=e.headerCollapseIcon,Nn=e.headerDropdown,En=e.headerExpandIcon,Tn=e.height,kn=e.hideFooter,Pn=void 0!==kn&&kn,An=e.hideHeader,Fn=void 0!==An&&An,Dn=e.icons,Ln=e.includeHeadersInCSVExport,Wn=void 0===Ln||Ln,On=e.initialSortColumn,Bn=e.initialSortDirection,zn=void 0===Bn?"asc":Bn,qn=e.isLoading,Gn=void 0!==qn&&qn,Vn=e.loadingStateRenderer,jn=e.maxHeight,Kn=e.nextIcon,Un=e.onCellClick,_n=e.onCellEdit,Jn=e.onColumnOrderChange,Yn=e.onColumnSelect,Xn=e.onColumnVisibilityChange,Zn=e.onColumnWidthChange,ne=e.onFilterChange,te=e.onGridReady,re=e.onHeaderEdit,oe=e.onLoadMore,ae=e.onNextPage,le=e.onPageChange,ce=e.onRowGroupExpand,se=e.onRowSelectionChange,de=e.onSortChange,fe=e.prevIcon,ve=e.quickFilter,he=e.rowButtons,pe=e.rowGrouping,we=e.getRowId,me=e.rows,ge=e.rowsPerPage,be=void 0===ge?10:ge,xe=e.selectableCells,ye=void 0!==xe&&xe,Ce=e.selectableColumns,Ie=void 0!==Ce&&Ce,Re=e.serverSidePagination,Se=void 0!==Re&&Re,Me=e.shouldPaginate,Ne=void 0!==Me&&Me,He=e.sortDownIcon,Ee=e.sortUpIcon,Te=e.tableEmptyStateRenderer,ke=void 0===Te?Yt:Te,Pe=e.tableRef,Ae=e.theme,Fe=void 0===Ae?"modern-light":Ae,De=e.totalRowCount,Le=e.useHoverRowBackground,We=void 0===Le||Le,Oe=e.useOddColumnBackground,Be=void 0!==Oe&&Oe,ze=e.useOddEvenRowBackground,Ge=void 0!==ze&&ze,Ve=u(function(){var e,t,r,o,i,a,u,l,c,s,d,f,v,h,p,w,m,g,b,x={drag:n(Sn,{className:"st-drag-icon"}),expand:n(xn,{className:"st-expand-icon"}),filter:n(Mn,{className:"st-header-icon"}),headerCollapse:n(xn,{className:"st-header-icon"}),headerExpand:n(bn,{className:"st-header-icon"}),next:n(xn,{className:"st-next-prev-icon"}),prev:n(bn,{className:"st-next-prev-icon"}),sortDown:n(Rn,{className:"st-header-icon"}),sortUp:n(Cn,{className:"st-header-icon"}),pinnedLeftIcon:n("div",{children:"L"}),pinnedRightIcon:n("div",{children:"R"})};return{drag:null!==(e=null==Dn?void 0:Dn.drag)&&void 0!==e?e:x.drag,expand:null!==(r=null!==(t=null==Dn?void 0:Dn.expand)&&void 0!==t?t:ln)&&void 0!==r?r:x.expand,filter:null!==(i=null!==(o=null==Dn?void 0:Dn.filter)&&void 0!==o?o:gn)&&void 0!==i?i:x.filter,headerCollapse:null!==(u=null!==(a=null==Dn?void 0:Dn.headerCollapse)&&void 0!==a?a:In)&&void 0!==u?u:x.headerCollapse,headerExpand:null!==(c=null!==(l=null==Dn?void 0:Dn.headerExpand)&&void 0!==l?l:En)&&void 0!==c?c:x.headerExpand,next:null!==(d=null!==(s=null==Dn?void 0:Dn.next)&&void 0!==s?s:Kn)&&void 0!==d?d:x.next,prev:null!==(v=null!==(f=null==Dn?void 0:Dn.prev)&&void 0!==f?f:fe)&&void 0!==v?v:x.prev,sortDown:null!==(p=null!==(h=null==Dn?void 0:Dn.sortDown)&&void 0!==h?h:He)&&void 0!==p?p:x.sortDown,sortUp:null!==(m=null!==(w=null==Dn?void 0:Dn.sortUp)&&void 0!==w?w:Ee)&&void 0!==m?m:x.sortUp,pinnedLeftIcon:null!==(g=null==Dn?void 0:Dn.pinnedLeftIcon)&&void 0!==g?g:x.pinnedLeftIcon,pinnedRightIcon:null!==(b=null==Dn?void 0:Dn.pinnedRightIcon)&&void 0!==b?b:x.pinnedRightIcon}},[Dn,ln,gn,In,En,Kn,fe,He,Ee]),je=u(function(){return x(x({},Gt),D)},[D]),Ke=u(function(){var n,e,t,r,o;return{text:null!==(e=null!==(n=null==S?void 0:S.text)&&void 0!==n?n:N)&&void 0!==e?e:Vt.text,searchEnabled:null!==(t=null==S?void 0:S.searchEnabled)&&void 0!==t?t:Vt.searchEnabled,searchPlaceholder:null!==(r=null==S?void 0:S.searchPlaceholder)&&void 0!==r?r:Vt.searchPlaceholder,allowColumnPinning:null!==(o=null==S?void 0:S.allowColumnPinning)&&void 0!==o?o:Vt.allowColumnPinning,searchFunction:null==S?void 0:S.searchFunction,rowRenderer:null==S?void 0:S.rowRenderer,customRenderer:null==S?void 0:S.customRenderer}},[S,N]),Ue=je.rowHeight,_e=je.headerHeight,Je=je.footerHeight,Ye=je.selectionColumnWidth;Be&&(Ge=!1),g&&(We=!1);var Xe=a(null),$e=a(null),Qe=a(null),Ze=a(null),nt=a(null),et=a(null),tt=a(null),rt=b(function(n){return n+1},0)[1],ot=i(new Map),it=ot[0],at=ot[1],ut=i(me),lt=ut[0],ct=ut[1],st=i(Gn),dt=st[0],ht=st[1],gt=a(Gn),bt=a(new Map);o(function(){ct(me);var n=new Map;me.forEach(function(e,t){var r=K({row:e,getRowId:we,depth:0,index:t,rowPath:[t],rowIndexPath:[t]}),o=U(r);n.set(o,t)}),bt.current=n},[me,we]),o(function(){var n=gt.current,e=Gn;e&&!n?ht(!0):!e&&n&&setTimeout(function(){ht(!1)},0),gt.current=Gn},[Gn]);var xt,yt,Ct,It,Rt,St,Ft,Lt,Wt,Ot,Bt=function(n){var e=n.tableBodyContainerRef,t=i(0),r=t[0],o=t[1];return m(function(){e.current&&o(e.current.offsetWidth-e.current.clientWidth)},[e]),{setScrollbarWidth:o,scrollbarWidth:r,tableBodyContainerRef:e}}({tableBodyContainerRef:et}),zt=Bt.scrollbarWidth,jt=Bt.setScrollbarWidth,Kt=Hn({headerContainerRef:tt,mainSectionRef:et,scrollbarWidth:zt}).isMainSectionScrollable,Ut=u(function(){if(dt&&0===lt.length){var n=Ne?be:10;return Kt&&(n+=1),Array.from({length:n},function(n,e){return{}})}return lt},[dt,lt,be,Kt,Ne]),_t=u(function(){return Qn(L)},[L]),Xt=i(1),$t=Xt[0],Qt=Xt[1],Zt=i(_t),nr=Zt[0],er=Zt[1],tr=i(!1),rr=tr[0],or=tr[1],ir=i(null),ar=ir[0],ur=ir[1],lr=i(q),cr=lr[0],sr=lr[1],dr=l(function(){var n=new Set,e=function(t){t.forEach(function(t){t.collapseDefault&&t.collapsible&&n.add(t.accessor),t.children&&e(t.children)})};return e(_t),n},[_t]),fr=i(dr),vr=fr[0],hr=fr[1];o(function(){er(_t)},[_t]);var pr=u(function(){var n,e=R([],nr,!0);return Z&&!(null===(n=null==nr?void 0:nr[0])||void 0===n?void 0:n.isSelectionColumn)&&(e=R([{accessor:"__row_selection__",label:"",width:Ye,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],e,!0)),e},[Z,nr,Ye]),wr=u(function(){return function(n){var e=new Set,t=function(n){for(var r,o=0,i=n;i.length>o;o++){var a=i[o];a.isEssential&&e.add(a.accessor+""),(null===(r=a.children)||void 0===r?void 0:r.length)&&t(a.children)}};return t(n),e}(pr)},[pr]),mr=i(0),gr=mr[0],br=mr[1],xr=i("none"),yr=xr[0],Cr=xr[1],Ir=function(n,e){var t=i(function(){return function(n,e){if(!e||0===e.length)return new Set;if(n){var t=Array.from({length:e.length},function(n,e){return e});return new Set(t)}return new Set}(n,e)}),r=t[0],a=t[1];return o(function(){a(e&&0!==e.length?function(n){var t=e.length,r=Array.from(n).filter(function(n){return t>n});return new Set(r)}:new Set)},[e]),{expandedDepths:r,setExpandedDepths:a}}(an,pe),Rr=Ir.expandedDepths,Sr=Ir.setExpandedDepths,Mr=i(new Map),Nr=Mr[0],Hr=Mr[1],Er=i(new Map),Tr=Er[0],kr=Er[1],Pr=function(){var n=i(""),e=n[0],t=n[1],r=a(null);o(function(){return e&&(r.current&&clearTimeout(r.current),r.current=setTimeout(function(){t("")},1e3)),function(){r.current&&clearTimeout(r.current)}},[e]);var u=l(function(n){t(n)},[]);return{announcement:e,announce:u}}(),Ar=Pr.announcement,Fr=Pr.announce,Dr=kt({effectiveHeaders:pr,headerHeight:_e,rowHeight:Ue,tableBodyContainerRef:et}),Lr=Dr.containerWidth,Wr=Dr.calculatedHeaderHeight,Or=Dr.maxHeaderDepth,Br=u(function(){var n=qe({headers:pr,containerWidth:Lr,collapsedHeaders:vr});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[pr,Lr,vr]),zr=Br.mainBodyWidth,qr=Br.pinnedLeftWidth,Gr=Br.pinnedRightWidth,Vr=Br.pinnedLeftContentWidth,jr=Br.pinnedRightContentWidth,Kr=function(n){var e=n.autoExpandColumns,t=n.containerWidth,r=n.pinnedLeftWidth,i=n.pinnedRightWidth,u=n.mainBodyRef,c=n.isResizing,s=n.setHeaders,d=a({autoExpandColumns:e,containerWidth:t,pinnedLeftWidth:r,pinnedRightWidth:i,mainBodyRef:u,isResizing:c});d.current={autoExpandColumns:e,containerWidth:t,pinnedLeftWidth:r,pinnedRightWidth:i,mainBodyRef:u,isResizing:c};var f=l(function(n){s(function(e){var t="function"==typeof n?n(e):n;return Jt(t,d.current)})},[s]),v=a(c);o(function(){v.current&&!c&&e&&s(function(n){return Jt(n,d.current)}),v.current=c},[c,e,s]);var h=a(t);return o(function(){t>0&&t!==h.current&&!c&&e&&s(function(n){return Jt(n,d.current)}),h.current=t},[t,c,e,s]),f}({autoExpandColumns:d,containerWidth:Lr,pinnedLeftWidth:qr,pinnedRightWidth:Gr,mainBodyRef:Qe,isResizing:rr,setHeaders:er}),Ur=function(n){var e=n.rows,t=n.headers,r=n.rowGrouping;return u(function(){if(!r||0===r.length)return e;var n=function(n){return A(n).filter(function(n){return n.aggregation})}(t);if(0===n.length)return e;var o=JSON.parse(JSON.stringify(e)),i=function(e,t){return void 0===t&&(t=0),e.map(function(e){var o=r[t],a=r[t+1],u=e[o];if(u&&j(u)){var l=i(u,t+1),c=x({},e);return c[o]=l,n.forEach(function(n){var e=Tt(l,n.accessor,n.aggregation,a);void 0!==e&&V(c,n.accessor,e)}),c}return e})};return i(o)},[e,t,r])}({rows:Ut,headers:nr,rowGrouping:pe}),_r=function(n){var e=n.rows,t=n.headers,r=n.quickFilter;return u(function(){if(!r||!r.text||""===r.text.trim())return e;var n=r.text,o=r.columns,i=r.caseSensitive,a=void 0!==i&&i,u=r.mode,l=void 0===u?"simple":u,c=r.useFormattedValue,s=void 0===c||c,d=t.filter(function(n){return!n.hide&&!n.excludeFromRender&&(o&&o.length>0?o.includes(n.accessor):!1!==n.quickFilterable)}),f="smart"===l?function(n){for(var e=[],t=0;n.length>t;){for(;n.length>t&&/\s/.test(n[t]);)t++;if(t>=n.length)break;if("-"!==n[t])if('"'!==n[t]){for(var r=t;n.length>t&&!/[\s:]/.test(n[t]);)t++;var o=n.substring(r,t);if(n.length>t&&":"===n[t]){for(var i=++t;n.length>t&&!/\s/.test(n[t]);)t++;(l=n.substring(i,t))&&e.push({type:"columnSpecific",value:l,column:o})}else o&&e.push({type:"word",value:o})}else{for(var a=++t;n.length>t&&'"'!==n[t];)t++;(l=n.substring(a,t))&&e.push({type:"phrase",value:l}),n.length>t&&'"'===n[t]&&t++}else{for(var u=++t;n.length>t&&!/\s/.test(n[t]);)t++;var l;(l=n.substring(u,t))&&e.push({type:"negation",value:l})}}return e}(n):null;return e.filter(function(e){if("smart"===l&&f){var t=new Set,r=new Map;f.forEach(function(n,e){"columnSpecific"===n.type&&n.column&&(r.has(n.column)||r.set(n.column,[]),r.get(n.column).push(e))});var o=[];d.forEach(function(n){try{var i;if(n.quickFilterGetter)i=n.quickFilterGetter({row:e,accessor:n.accessor});else{var u=G(e,n.accessor);if(s&&n.valueFormatter){var l=n.valueFormatter({accessor:n.accessor,colIndex:0,row:e,rowIndex:0,value:u});i=Array.isArray(l)?l.join(" "):l+""}else i=null==u?"":Array.isArray(u)?u.join(" "):u+""}o.push(i);var c=r.get(n.accessor);c&&c.forEach(function(n){var e=f[n],r=a?i:i.toLowerCase(),o=a?e.value:e.value.toLowerCase();r.includes(o)&&t.add(n)})}catch(e){console.warn("Quick filter error for column ".concat(n.accessor,":"),e)}});var i=a?o.join(" "):o.join(" ").toLowerCase();return f.forEach(function(n,e){if("columnSpecific"!==n.type){var r=a?n.value:n.value.toLowerCase();switch(n.type){case"word":case"phrase":i.includes(r)&&t.add(e);break;case"negation":i.includes(r)||t.add(e)}}}),t.size===f.length}return d.some(function(t){try{var r=void 0;if(t.quickFilterGetter)r=t.quickFilterGetter({row:e,accessor:t.accessor});else{var o=G(e,t.accessor);if(s&&t.valueFormatter){var i=t.valueFormatter({accessor:t.accessor,colIndex:0,row:e,rowIndex:0,value:o});r=Array.isArray(i)?i.join(" "):i+""}else r=null==o?"":Array.isArray(o)?o.join(" "):o+""}return function(n,e,t){if(!e)return!0;var r=t?n:n.toLowerCase(),o=t?e:e.toLowerCase();return r.includes(o)}(r,n,a)}catch(n){return console.warn("Quick filter error for column ".concat(t.accessor,":"),n),!1}})})},[e,t,r])}({rows:Ur,headers:pr,quickFilter:ve}),Jr=function(n){var e=n.rows,t=n.headers,r=n.externalFilterHandling,o=n.onFilterChange,a=n.announce,c=i({}),s=c[0],d=c[1],f=wt(t),v=u(function(){return Ht({externalFilterHandling:r,tableRows:e,filterState:s})},[e,s,r]),h=l(function(n){var e,t=x(x({},s),((e={})[n.accessor]=n,e));if(d(t),null==o||o(t),a){var r=f.get(n.accessor);r&&a("Filter applied to ".concat(r.label))}},[s,o,a,f]),p=l(function(n){var e=x({},s);if(delete e[n],d(e),null==o||o(e),a){var t=f.get(n);t&&a("Filter removed from ".concat(t.label))}},[s,o,a,f]),w=l(function(){d({}),null==o||o({}),a&&a("All filters cleared")},[o,a]),m=l(function(n){var t,o=x(x({},s),((t={})[n.accessor]=n,t));return Ht({externalFilterHandling:r,tableRows:e,filterState:o})},[s,e,r]);return{filteredRows:v,updateFilter:h,clearFilter:p,clearAllFilters:w,filters:s,computeFilteredRowsPreview:m}}({rows:_r,headers:pr,externalFilterHandling:vn,onFilterChange:ne,announce:Fr}),Yr=Jr.filters,Xr=Jr.updateFilter,$r=Jr.clearFilter,Qr=Jr.clearAllFilters,Zr=Jr.computeFilteredRowsPreview,no=function(n){var e=n.headers,t=n.tableRows,r=n.externalSortHandling,o=n.onSortChange,a=n.rowGrouping,c=n.initialSortColumn,s=n.initialSortDirection,d=n.announce,f=wt(e),v=l(function(){if(!c)return null;var n=f.get(c);return n?{key:n,direction:s||"asc"}:null},[f,c,s]),h=i(v),p=h[0],w=h[1],m=l(function(n){var e=n.groupingKeys,t=n.headers,r=n.sortColumn,o=pt({headers:t,rows:n.rows,sortColumn:r});return e&&0!==e.length?o.map(function(n){var o,i=e[0],a=n[i];if(j(a)){var u=m({rows:a,sortColumn:r,headers:t,groupingKeys:e.slice(1)});return x(x({},n),((o={})[i]=u,o))}return n}):o},[]),g=u(function(){return mt({externalSortHandling:r,tableRows:t,sortColumn:p,rowGrouping:a,headers:e,sortNestedRows:m})},[t,p,e,r,a,m]),b=l(function(n){if(!n)return w(null),void(null==o||o(null));var e=n.accessor,t=n.direction,r=f.get(e);if(r){var i=null;if(t)i={key:r,direction:t};else{var a=r.sortingOrder||["asc","desc",null],u=-1;p&&p.key.accessor===e&&(u=a.indexOf(p.direction));var l=a[(u+1)%a.length];i=null===l?null:{key:r,direction:l}}if(w(i),null==o||o(i),d)if(i){var c="asc"===i.direction?"ascending":"descending";d("Sorted by ".concat(r.label,", ").concat(c))}else d("Sort removed from ".concat(r.label))}},[p,f,o,d]),y=l(function(n){var o=function(e){for(var t=0,r=e;r.length>t;t++){var i=r[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=o(i.children);if(a)return a}}},i=o(e);if(!i)return t;var u=i.sortingOrder||["asc","desc",null],l=-1;p&&p.key.accessor===n&&(l=u.indexOf(p.direction));var c=u[(l+1)%u.length];return mt({externalSortHandling:r,tableRows:t,sortColumn:null===c?null:{key:i,direction:c},rowGrouping:a,headers:e,sortNestedRows:m})},[p,e,t,r,a,m]);return{sort:p,sortedRows:g,updateSort:b,computeSortedRowsPreview:y}}({headers:nr,tableRows:Jr.filteredRows,externalSortHandling:wn,onSortChange:de,rowGrouping:pe,initialSortColumn:On,initialSortDirection:zn,announce:Fr}),eo=no.sort,to=no.updateSort,ro=no.computeSortedRowsPreview,oo=qt({rows:no.sortedRows,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}),io=oo.flattenedRows,ao=oo.heightOffsets,uo=oo.paginatableRows,lo=oo.parentEndPositions,co=function(n){var e=n.tableRows,t=n.onRowSelectionChange,r=n.enableRowSelection,o=void 0!==r&&r,a=i(new Set),c=a[0],s=a[1],d=l(function(n){return!!o&&function(n,e){return e.has(n)}(n,c)},[c,o]),f=l(function(){return!!o&&function(n,e){return 0!==n.length&&n.filter(function(n){return n&&n.rowId}).every(function(n){return e.has(U(n.rowId))})}(e,c)},[e,c,o]),v=u(function(){return o?function(n){return n.size}(c):0},[c,o]),h=u(function(){return o?function(n,e){return n.filter(function(n){return!(!n||!n.rowId)&&e.has(U(n.rowId))}).map(function(n){return n.row})}(e,c):[]},[e,c,o]),p=l(function(n,r){if(o){var i=function(n,e){var t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t}(n,c);if(s(i),t){var a=e.find(function(e){return U(e.rowId)===n});a&&t({row:a.row,isSelected:r,selectedRows:i})}}},[c,e,t,o]),w=l(function(n){var r;o&&(n?(r=function(n){return new Set(n.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)}))}(e),t&&e.forEach(function(n){return t({row:n.row,isSelected:!0,selectedRows:r})})):(r=new Set,t&&c.forEach(function(n){var o=e.find(function(e){return U(e.rowId)===n});o&&t({row:o.row,isSelected:!1,selectedRows:r})})),s(r))},[e,t,c,o]),m=l(function(n){if(o){var e=d(n);p(n,!e)}},[d,p,o]),g=l(function(){if(o){if(t){var n=new Set;c.forEach(function(r){var o=e.find(function(n){return U(n.rowId)===r});o&&t({row:o.row,isSelected:!1,selectedRows:n})})}s(new Set)}},[c,e,t,o]);return{selectedRows:c,setSelectedRows:s,isRowSelected:d,areAllRowsSelected:f,selectedRowCount:v,selectedRowsData:h,handleRowSelect:p,handleSelectAll:w,handleToggleRow:m,clearSelection:g}}({tableRows:io,onRowSelectionChange:se,enableRowSelection:Z});xt=co.selectedRows,yt=co.setSelectedRows,Ct=co.isRowSelected,It=co.areAllRowsSelected,Rt=co.selectedRowCount,St=co.selectedRowsData,Ft=co.handleRowSelect,Lt=co.handleSelectAll,Wt=co.handleToggleRow,Ot=co.clearSelection;var so=qt({rows:Ur,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}).flattenedRows,fo=l(function(n){var e=Zr(n);return pe&&0!==pe.length?Y({rows:e,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}):e.map(function(n,e){return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,isLastGroupRow:!1,rowId:[e],rowPath:[e],absoluteRowIndex:e}})},[Zr,pe,we,Nr,Tr,Rr,it,Vn,tn,_,pr,Ue,_e,je]),vo=l(function(n){var e=ro(n);return pe&&0!==pe.length?Y({rows:e,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}):e.map(function(n,e){return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,isLastGroupRow:!1,rowId:[e],rowPath:[e],absoluteRowIndex:e}})},[ro,pe,we,Nr,Tr,Rr,it,Vn,tn,_,pr,Ue,_e,je]),ho=function(n){var e=n.height,t=n.maxHeight,r=n.rowHeight,o=n.totalRowCount,i=n.headerHeight,a=n.footerHeight;return u(function(){if(t){var n=Et(t);if(0===n)return;var u=i||r;if(n>=u+o*r+(a||0))return;return Math.max(0,n-u)}if(e){var l=Et(e);if(0!==l)return Math.max(0,l-r)}},[e,t,r,o,i,a])}({height:Tn,maxHeight:jn,rowHeight:Ue,shouldPaginate:Ne,rowsPerPage:be,totalRowCount:null!=De?De:uo.length,headerHeight:Wr,footerHeight:Ne&&!Pn?Je:void 0}),po=function(n){var e=n.allowAnimations,t=n.computeFilteredRowsPreview,r=n.computeSortedRowsPreview,o=n.contentHeight,c=n.currentPage,s=n.customTheme,d=n.enableStickyParents,f=n.flattenedRows,v=n.heightOffsets,h=n.originalFlattenedRows,p=n.parentEndPositions,w=n.rowHeight,g=n.rowsPerPage,b=n.scrollDirection,y=void 0===b?"none":b,C=n.scrollTop,I=n.serverSidePagination,S=n.shouldPaginate,N=n.rowGrouping,H=i(!1),E=H[0],T=H[1],k=i([]),P=k[0],A=k[1],F=a([]),D=a([]),L=u(function(){return M(w)},[w]),W=a(new Map),O=a(null),B=l(function(n,e){if(!S||I)return n.map(function(n,e){return x(x({},n),{position:e,absoluteRowIndex:e})});var t=(c-1)*g,r=c*g,o=0===t?0:e[t-1];return n.slice(o,r>e.length?n.length:e[r-1]).map(function(n,e){var t=n.nestedTable?n.absoluteRowIndex:S&&!I?o+e:e;return x(x({},n),{position:e,absoluteRowIndex:t})})},[c,g,I,S]);u(function(){if(0===W.current.size&&h.length>0){var n=new Map;h.forEach(function(e,t){var r=U(e.rowId);n.set(r,t)}),W.current=n}},[h]);var z=u(function(){return B(f,p)},[f,p,B]),q=u(function(){if(!v||0===v.length||!S||I)return v;var n=new Map;return z.forEach(function(e){e.nestedTable&&n.set(e.absoluteRowIndex,e.position)}),v.filter(function(e){return n.has(e[0])}).map(function(e){var t=e[1];return[n.get(e[0]),t]})},[v,z,S,I]),G=u(function(){if(q&&0!==q.length)return function(n,e,t,r){var o=e+r.rowSeparatorWidth,i=Array(n),a=new Map;t&&t.forEach(function(n){a.set(n[0],n[1])});for(var u=0,l=0;n>l;l++){i[l]=u,u+=o;var c=a.get(l);void 0!==c&&(u+=c)}return{rowTopPositions:i,totalHeight:u-r.rowSeparatorWidth}}(z.length,w,q,s)},[z.length,w,q,s]),V=u(function(){return void 0===o?z:rn({bufferRowCount:L,contentHeight:o,tableRows:z,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}).rendered.rows},[z,o,w,C,y,L,G]),j=u(function(){if(!d||void 0===o)return{stickyParents:[],regularRows:V,partiallyVisibleRows:[]};var n=rn({bufferRowCount:L,contentHeight:o,tableRows:z,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}),e=N?function(n,e,t,r,o){return un({allTableRows:n,renderedRows:e,fullyVisibleRows:t,partiallyVisibleRows:r,partiallyVisibleRowIndex:0,recursionDepth:0,stickyParents:[],rowGrouping:o})}(z,n.rendered.rows,n.fullyVisible.rows,n.partiallyVisible.rows,N):{stickyParents:[],regularRows:n.rendered.rows,partiallyVisibleRows:[]};return x(x({},e),{partiallyVisibleRows:n.partiallyVisible.rows})},[L,o,z,d,G,N,w,y,C,V]),K=j.stickyParents,_=j.regularRows,J=j.partiallyVisibleRows,Y=l(function(n,e){var t=new Set(n.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)})),r=new Set(e.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)}));return{staying:e.filter(function(n){var e=U(n.rowId);return t.has(e)}),entering:e.filter(function(n){var e=U(n.rowId);return!t.has(e)}),leaving:n.filter(function(n){var e=U(n.rowId);return!r.has(e)})}},[]),X=u(function(){if(0===F.current.length)return!1;var n=z.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)}),e=F.current.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)});return n.length!==e.length||!n.every(function(n,t){return n===e[t]})},[z]);m(function(){if(!E){var n=function(){P.length>0&&A([])};if(!e||S)return n(),F.current=z,void(D.current=V);if(0===F.current.length)return n(),F.current=z,void(D.current=V);if(!X)return n(),F.current=z,void(D.current=V);O.current={tableRows:z,visibleRows:V},T(!0)}},[e,z,P.length,X,E,S,V]),m(function(){if(E&&O.current&&P.length>0){var n=setTimeout(function(){var n=O.current;T(!1),A([]),F.current=n.tableRows,D.current=n.visibleRows,O.current=null},Dt.ROW_REORDER.duration+100);return function(){return clearTimeout(n)}}},[E,P.length]);var $=u(function(){if(!e||S)return V;if(P.length>0){var n=new Map,t=new Map;return z.forEach(function(e){var r=U(e.rowId);n.set(r,e.position),t.set(r,e.displayPosition)}),P.map(function(e){var r=U(e.rowId),o=n.get(r),i=t.get(r);return void 0!==o&&void 0!==i?x(x({},e),{position:o,displayPosition:i}):e})}return V},[V,P,z,e,S]),Q=l(function(n){if(e&&!S&&void 0!==o){var r=t(n),i=B(r,[]),a=rn({bufferRowCount:L,contentHeight:o,tableRows:i,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}),u=Y(V,a.rendered.rows).entering.map(function(n){var e=U(n.rowId)+"";return z.find(function(n){return U(n.rowId)+""===e})||n}).filter(Boolean);u.length>0&&A(R(R([],V,!0),u,!0))}},[e,S,t,B,o,w,C,y,Y,z,V,L,G]),Z=l(function(n){if(e&&!S&&void 0!==o){var t=r(n),i=B(t,[]),a=rn({bufferRowCount:L,contentHeight:o,tableRows:i,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}),u=Y(V,a.rendered.rows).entering.map(function(n){var e=U(n.rowId)+"";return z.find(function(n){return U(n.rowId)+""===e})||n}).filter(Boolean);u.length>0&&A(R(R([],V,!0),u,!0))}},[e,S,r,B,o,w,C,y,Y,z,V,L,G]);return{currentTableRows:z,currentVisibleRows:V,isAnimating:E,prepareForFilterChange:Q,prepareForSortChange:Z,rowsToRender:$,stickyParents:K,regularRows:_,partiallyVisibleRows:J,paginatedHeightOffsets:q,heightMap:G}}({allowAnimations:c,computeFilteredRowsPreview:fo,computeSortedRowsPreview:vo,contentHeight:ho,currentPage:$t,customTheme:je,enableStickyParents:en,flattenedRows:io,heightOffsets:ao,originalFlattenedRows:so,paginatableRows:uo,parentEndPositions:lo,rowGrouping:pe,rowHeight:Ue,rowsPerPage:be,scrollDirection:yr,scrollTop:gr,serverSidePagination:Se,shouldPaginate:Ne}),wo=po.currentTableRows,mo=po.rowsToRender,go=po.prepareForFilterChange,bo=po.prepareForSortChange,xo=po.isAnimating,yo=po.stickyParents,Co=po.regularRows,Io=po.partiallyVisibleRows,Ro=po.paginatedHeightOffsets,So=po.heightMap,Mo=a(new Map),No=a(new Map),Ho=function(n){var e=n.selectableCells,t=n.headers,r=n.tableRows,c=n.onCellEdit,s=n.cellRegistry,d=n.collapsedHeaders,f=n.rowHeight,v=n.enableRowSelection,h=void 0!==v&&v,p=n.copyHeadersToClipboard,w=void 0!==p&&p,m=n.customTheme,g=i(new Set),b=g[0],x=g[1],y=i(new Set),R=y[0],S=y[1],M=i(null),N=M[0],H=M[1],E=i(null),T=E[0],k=E[1],P=i(new Set),A=P[0],F=P[1],D=i(new Set),L=D[0],W=D[1],O=i(!1),B=O[0],z=O[1],q=a(!1),j=a(null),K=a(null),_=a(new Set);K.current=T,_.current=b;var J=u(function(){var n=new Set;return b.forEach(function(e){var t=e.split("-");if(t.length>=2){var r=parseInt(t[1],10);isNaN(r)||n.add(r)}}),R.forEach(function(e){n.add(e)}),n},[b,R]),Y=u(function(){var n=new Set;return b.forEach(function(e){var t=e.split("-");if(t.length>=3){var r=t.slice(2).join("-");n.add(r)}}),R.size>0&&r.forEach(function(e){var t=U(e.rowId);n.add(t)}),n},[b,R,r]),$=u(function(){return t.flatMap(function(n){return X(n,d)})},[t,d]),Q=l(function(){var n=_.current;if(0!==n.size){var e=function(n,e,t,r){void 0===r&&(r=!1);var o=e.filter(function(n){return!n.hide&&!n.excludeFromRender}),i=new Map,a=new Map;o.forEach(function(n,e){i.set(e,n.accessor),a.set(e,n)});var u=Array.from(n).reduce(function(n,e){var r,o=e.split("-").map(Number),u=o[0],l=o[1];n[u]||(n[u]=[]);var c=i.get(l),s=a.get(l);if(c&&(null===(r=t[u])||void 0===r?void 0:r.row)){var d=t[u].row,f=G(d,c);if(!1!==(null==s?void 0:s.useFormattedValueForClipboard)&&(null==s?void 0:s.valueFormatter)){var v=s.valueFormatter({accessor:c,colIndex:l,row:d,rowIndex:u,value:f});n[u][l]=v}else n[u][l]=!s||"lineAreaChart"!==s.type&&"barChart"!==s.type?f:Array.isArray(f)?f.join(", "):""}else n[u][l]="";return n},{}),l=new Set;r&&Array.from(n).forEach(function(n){var e=n.split("-").map(Number);l.add(e[1])});var c="";r&&l.size>0&&(c=Array.from(l).sort(function(n,e){return n-e}).map(function(n){var e,t=a.get(n);return null!==(e=null==t?void 0:t.label)&&void 0!==e?e:""}).join("\t"));var s=Object.values(u).map(function(n){return Object.values(n).join("\t")}).join("\n");return r&&c?"".concat(c,"\n").concat(s):s}(n,$,r,w);navigator.clipboard.writeText(e),F(new Set(n)),setTimeout(function(){return F(new Set)},800)}},[$,r,w]),Z=l(function(){return C(void 0,void 0,void 0,function(){var n,e,t,o,i,a;return I(this,function(u){switch(u.label){case 0:if(!(n=K.current))return[2];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=u.sent())?(t=function(n,e,t,r,o,i){var a=new Set,u=new Set,l=n.split("\n").filter(function(n){return n.length>0});if(0===l.length)return{updatedCells:a,warningCells:u};var c=t.filter(function(n){return!n.hide&&!n.excludeFromRender}),s=e.rowIndex,d=e.colIndex;return l.forEach(function(n,e){n.split("\t").forEach(function(n,t){var l=s+e,f=d+t;if(r.length>l&&c.length>f){var v=r[l],h=c[f],p=U(v.rowId);if(null==h?void 0:h.isEditable){var w=n;if("number"===h.type){var m=+n;isNaN(m)||(w=m)}else if("boolean"===h.type)w="true"===n.toLowerCase()||"1"===n;else if("date"===h.type){var g=new Date(n);isNaN(g.getTime())||(w=g)}else"lineAreaChart"!==h.type&&"barChart"!==h.type||(w=n.split(",").map(function(n){var e=+n.trim();return isNaN(e)?0:e}));if(V(v.row,h.accessor,w),i){var b="".concat(p,"-").concat(h.accessor),x=i.get(b);x&&x.updateContent(w)}null==o||o({accessor:h.accessor,newValue:w,row:v.row,rowIndex:l});var y="".concat(l,"-").concat(f,"-").concat(p);a.add(y)}else{var C="".concat(l,"-").concat(f,"-").concat(p);u.add(C)}}})}),{updatedCells:a,warningCells:u}}(e,n,$,r,c,s),i=t.warningCells,(o=t.updatedCells).size>0&&(F(o),setTimeout(function(){return F(new Set)},800)),i.size>0&&(W(i),setTimeout(function(){return W(new Set)},800)),[3,4]):[2];case 3:return a=u.sent(),console.warn("Failed to paste from clipboard:",a),[3,4];case 4:return[2]}})})},[$,r,c,s]),nn=l(function(){var n=_.current;if(0!==n.size){var e=function(n,e,t,r,o){var i=new Set,a=new Set,u=e.filter(function(n){return!n.hide&&!n.excludeFromRender}),l=new Map;return u.forEach(function(n,e){l.set(e,n.accessor)}),Array.from(n).forEach(function(n){var e=n.split("-").map(Number),l=e[0],c=e[1];if(t.length>l&&u.length>c){var s=t[l],d=u[c],f=U(s.rowId);if(null==d?void 0:d.isEditable){var v;if(v="string"===d.type?"":"number"===d.type?null:"boolean"!==d.type&&("date"===d.type?null:"lineAreaChart"===d.type||"barChart"===d.type||Array.isArray(G(s.row,d.accessor))?[]:""),V(s.row,d.accessor,v),o){var h="".concat(f,"-").concat(d.accessor),p=o.get(h);p&&p.updateContent(v)}null==r||r({accessor:d.accessor,newValue:v,row:s.row,rowIndex:l}),i.add(n)}else a.add(n)}}),{deletedCells:i,warningCells:a}}(n,$,r,c,s),t=e.deletedCells,o=e.warningCells;t.size>0&&(F(t),setTimeout(function(){return F(new Set)},800)),o.size>0&&(W(o),setTimeout(function(){return W(new Set)},800))}},[$,r,c,s]),en=l(function(n,e){for(var t=new Set,o=Math.min(n.rowIndex,e.rowIndex),i=Math.max(n.rowIndex,e.rowIndex),a=Math.min(n.colIndex,e.colIndex),u=Math.max(n.colIndex,e.colIndex),l=o;i>=l;l++)for(var c=a;u>=c;c++)if(l>=0&&r.length>l){if(h&&0===c)continue;var s=U(r[l].rowId);t.add(sn({colIndex:c,rowIndex:l,rowId:s}))}S(new Set),H(null),_.current=t,K.current=e,x(t),k(e),setTimeout(function(){return cn(e,f,m)},0)},[r,f,h,m]),tn=l(function(n){if(n.rowIndex>=0&&r.length>n.rowIndex&&n.colIndex>=0&&(h?$.length:$.length-1)>=n.colIndex){var e=sn(n);S(new Set),H(null);var t=new Set([e]);_.current=t,K.current=n,x(t),k(n),setTimeout(function(){return cn(n,f,m)},0)}},[$.length,r.length,f,h,m]),rn=l(function(n,e){void 0===e&&(e=!1),_.current=new Set,K.current=null,x(new Set),k(null),S(function(t){var r=new Set(e?t:[]);return n.forEach(function(n){return r.add(n)}),r}),n.length>0&&H(n[n.length-1])},[]);!function(n){var e=n.copyToClipboard,t=n.deleteSelectedCells,r=n.enableRowSelection,i=void 0!==r&&r,a=n.initialFocusedCellRef,u=n.leafHeaders,l=n.pasteFromClipboard,c=n.selectCellRange,s=n.selectSingleCell,d=n.selectableCells,f=n.selectedCellsRef,v=n.setLastSelectedColumnIndex,h=n.setSelectedCells,p=n.setSelectedColumns,w=n.startCell,m=n.tableRows;o(function(){var n=function(n){if(d){var c=a.current;if(c&&0!==f.current.size){var s=document.activeElement;if(!(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement||"true"===(null==s?void 0:s.getAttribute("contenteditable")))){var R=c.rowIndex,S=c.colIndex,M=c.rowId;if(!n.ctrlKey&&!n.metaKey||"c"!==n.key){if((n.ctrlKey||n.metaKey)&&"v"===n.key)return n.preventDefault(),void l();if((n.ctrlKey||n.metaKey)&&"a"===n.key){n.preventDefault();for(var N=new Set,H=0;m.length>H;H++)for(var E=0;u.length>E;E++){var T=i?E+1:E,k=U(m[H].rowId);N.add("".concat(H,"-").concat(T,"-").concat(k))}return f.current=N,h(N),p(new Set),void v(null)}if("Delete"===n.key||"Backspace"===n.key)return n.preventDefault(),void t();var P=m[R];if((P?U(P.rowId):null)!==M){var A=m.findIndex(function(n){return U(n.rowId)===M});if(-1===A)return;R=A}var F=function(n,e,t){var r=n,o=e;return"up"===t?r=0:"down"===t?r=m.length-1:"left"===t?o=i?1:0:"right"===t&&(o=i?u.length:u.length-1),{rowIndex:r,colIndex:o}};if("ArrowUp"===n.key)n.preventDefault(),r(n,R,S,F);else if("ArrowDown"===n.key)n.preventDefault(),o(n,R,S,F);else if("ArrowLeft"===n.key||"Tab"===n.key&&n.shiftKey)n.preventDefault(),g(n,R,S,F);else if("ArrowRight"===n.key||"Tab"===n.key)n.preventDefault(),b(n,R,S,F);else if("Home"===n.key)n.preventDefault(),x(n,R);else if("End"===n.key)n.preventDefault(),y(n,R);else if("PageUp"===n.key)n.preventDefault(),C(n,R,S);else if("PageDown"===n.key)n.preventDefault(),I(n,R,S);else if("Escape"===n.key){var D=new Set;f.current=D,h(D),p(new Set),v(null),w.current=null}}else e()}}}},r=function(n,e,t,r){if(n.shiftKey){w.current||(w.current=a.current);var o=e-1;if((n.ctrlKey||n.metaKey)&&(o=r(e,t,"up").rowIndex),o>=0){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else e>0&&(o=e-1,(n.ctrlKey||n.metaKey)&&(o=r(e,t,"up").rowIndex),i=U(m[o].rowId),s({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},o=function(n,e,t,r){if(n.shiftKey){w.current||(w.current=a.current);var o=e+1;if((n.ctrlKey||n.metaKey)&&(o=r(e,t,"down").rowIndex),m.length>o){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else m.length-1>e&&(o=e+1,(n.ctrlKey||n.metaKey)&&(o=r(e,t,"down").rowIndex),i=U(m[o].rowId),s({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},g=function(n,e,t,r){if(n.shiftKey&&"ArrowLeft"===n.key){w.current||(w.current=a.current);var o=t-1;if(n.ctrlKey||n.metaKey)o=r(e,t,"left").colIndex;else if(i&&0===o)return;if(o>=0){var u=U(m[e].rowId);c(w.current,{rowIndex:e,colIndex:o,rowId:u})}}else if(t>0){if(o=t-1,(n.ctrlKey||n.metaKey)&&"ArrowLeft"===n.key)o=r(e,t,"left").colIndex;else if(i&&0===o)return;0>o||(u=U(m[e].rowId),s({rowIndex:e,colIndex:o,rowId:u}),w.current=null)}},b=function(n,e,t,r){var o=i?u.length:u.length-1;if(n.shiftKey&&"ArrowRight"===n.key){w.current||(w.current=a.current);var l=t+1;if((n.ctrlKey||n.metaKey)&&(l=r(e,t,"right").colIndex),o>=l){var d=U(m[e].rowId);c(w.current,{rowIndex:e,colIndex:l,rowId:d})}}else o>t&&(l=t+1,(n.ctrlKey||n.metaKey)&&"ArrowRight"===n.key&&(l=r(e,t,"right").colIndex),l>o||(d=U(m[e].rowId),s({rowIndex:e,colIndex:l,rowId:d}),w.current=null))},x=function(n,e,t){if(n.shiftKey){w.current||(w.current=a.current);var r=e,o=i?1:0;(n.ctrlKey||n.metaKey)&&(r=0);var u=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:u})}else r=e,o=i?1:0,(n.ctrlKey||n.metaKey)&&(r=0),u=U(m[r].rowId),s({rowIndex:r,colIndex:o,rowId:u}),w.current=null},y=function(n,e,t){if(n.shiftKey){w.current||(w.current=a.current);var r=e,o=i?u.length:u.length-1;(n.ctrlKey||n.metaKey)&&(r=m.length-1);var l=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:l})}else r=e,o=i?u.length:u.length-1,(n.ctrlKey||n.metaKey)&&(r=m.length-1),l=U(m[r].rowId),s({rowIndex:r,colIndex:o,rowId:l}),w.current=null},C=function(n,e,t){var r=Math.max(0,e-10);if(n.shiftKey){w.current||(w.current=a.current);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),s({rowIndex:r,colIndex:t,rowId:o}),w.current=null},I=function(n,e,t){var r=Math.min(m.length-1,e+10);if(n.shiftKey){w.current||(w.current=a.current);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),s({rowIndex:r,colIndex:t,rowId:o}),w.current=null};return document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}},[d,a,f,m,u,s,c,h,p,v,e,l,t,w,i])}({selectableCells:e,initialFocusedCellRef:K,selectedCellsRef:_,tableRows:r,leafHeaders:$,selectSingleCell:tn,selectCellRange:en,setSelectedCells:x,setSelectedColumns:S,setLastSelectedColumnIndex:H,copyToClipboard:Q,pasteFromClipboard:Z,deleteSelectedCells:nn,startCell:j,enableRowSelection:h});var on=l(function(n,e){var t=new Set,o=new Map;r.forEach(function(n,e){var t=U(n.rowId);o.set(t,e)});for(var i=o.get(n.rowId+""),a=o.get(e.rowId+""),u=void 0!==i?i:n.rowIndex,l=void 0!==a?a:e.rowIndex,c=Math.min(u,l),s=Math.max(u,l),d=Math.min(n.colIndex,e.colIndex),f=Math.max(n.colIndex,e.colIndex),v=c;s>=v;v++)for(var p=d;f>=p;p++)if(v>=0&&r.length>v){if(h&&0===p)continue;var w=U(r[v].rowId);t.add(sn({colIndex:p,rowIndex:v,rowId:w}))}_.current=t,x(t)},[r,h]),an=l(function(n,e){var t=document.querySelector(".st-body-container");if(!t)return null;var r=t.getBoundingClientRect(),o=Array.from(document.querySelectorAll(".st-cell[data-row-index][data-col-index]:not(.st-selection-cell)"));if(0===o.length)return null;var i=Math.max(r.left,Math.min(r.right,n)),a=Math.max(r.top,Math.min(r.bottom,e)),u=null,l=1/0;if(o.forEach(function(n){if(n instanceof HTMLElement){var e=n,t=e.getBoundingClientRect(),r=t.top+t.height/2,o=Math.sqrt(Math.pow(t.left+t.width/2-i,2)+Math.pow(r-a,2));l>o&&(l=o,u=e)}}),null!==u){var c=u,s=parseInt(c.getAttribute("data-row-index")||"-1",10),d=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(s>=0&&d>=0&&null!==f)return{rowIndex:s,colIndex:d,rowId:f}}return null},[]),un=l(function(n,e){var t=document.elementFromPoint(n,e);if(!t)return null;var r=t.closest(".st-cell");if(r instanceof HTMLElement){var o=parseInt(r.getAttribute("data-row-index")||"-1",10),i=parseInt(r.getAttribute("data-col-index")||"-1",10),a=r.getAttribute("data-row-id");if(o>=0&&i>=0&&null!==a)return{rowIndex:o,colIndex:i,rowId:a}}return an(n,e)},[an]),ln=l(function(n,e){var t=document.querySelector(".st-body-container");if(t){var r=t.getBoundingClientRect();r.top+50>e?t.scrollTop-=10*Math.min(3,1+Math.max(0,r.top-e)/100):e>r.bottom-50&&(t.scrollTop+=10*Math.min(3,1+Math.max(0,e-r.bottom)/100));var o=document.querySelector(".st-body-main");o&&(r.left+50>n?o.scrollLeft-=10*Math.min(3,1+Math.max(0,r.left-n)/100):n>r.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,n-r.right)/100)))}},[]),dn=l(function(n){var t=n.colIndex,r=n.rowIndex,o=n.rowId;if(e){q.current=!0,z(!0),j.current={rowIndex:r,colIndex:t,rowId:o};var i=sn({colIndex:t,rowIndex:r,rowId:o}),a=new Set([i]),u={rowIndex:r,colIndex:t,rowId:o};_.current=a,K.current=u,setTimeout(function(){S(new Set),H(null),x(a),k(u)},0);var l=null,c=null,s=null,d=0,f=function(){if(q.current&&j.current){if(null!==l&&null!==c){ln(l,c);var n=Date.now();if(n-d>=16){var e=un(l,c);e&&on(j.current,e),d=n}}s=requestAnimationFrame(f)}else null!==s&&(cancelAnimationFrame(s),s=null)},v=function(n){q.current&&j.current&&(l=n.clientX,c=n.clientY)},h=function(){q.current=!1,z(!1),null!==s&&(cancelAnimationFrame(s),s=null),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",h),s=requestAnimationFrame(f)}},[e,ln,un,on]),fn=l(function(n){e&&q.current&&j.current&&on(j.current,{colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId})},[e,on]),vn=l(function(n){var e=n.colIndex,t=sn({colIndex:e,rowIndex:n.rowIndex,rowId:n.rowId}),r=b.has(t),o=R.has(e);return r||o},[b,R]),hn=l(function(n){var e=n.colIndex,t=n.rowIndex,o=n.rowId;if(B)return"";var i=[],a=r[t-1],u=a?U(a.rowId):null,l=r[t+1],c=l?U(l.rowId):null,s=null!==u?{colIndex:e,rowIndex:t-1,rowId:u}:null,d=null!==c?{colIndex:e,rowIndex:t+1,rowId:c}:null,f={colIndex:e-1,rowIndex:t,rowId:o},v={colIndex:e+1,rowIndex:t,rowId:o};return(!s||!vn(s)||R.has(e)&&0===t)&&i.push("st-selected-top-border"),(!d||!vn(d)||R.has(e)&&t===r.length-1)&&i.push("st-selected-bottom-border"),vn(f)||i.push("st-selected-left-border"),vn(v)||i.push("st-selected-right-border"),i.join(" ")},[B,vn,r,R]),pn=u(function(){return T?function(n){return n.rowIndex===T.rowIndex&&n.colIndex===T.colIndex&&n.rowId===T.rowId}:function(){return!1}},[T]),wn=l(function(n){var e=sn({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return A.has(e)},[A]),mn=l(function(n){var e=sn({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return L.has(e)},[L]);return{getBorderClass:hn,handleMouseDown:dn,handleMouseOver:fn,isCopyFlashing:wn,isWarningFlashing:mn,isInitialFocusedCell:pn,isSelected:vn,lastSelectedColumnIndex:N,pasteFromClipboard:Z,selectColumns:rn,selectedCells:b,selectedColumns:R,setInitialFocusedCell:k,setSelectedCells:x,setSelectedColumns:S,deleteSelectedCells:nn,columnsWithSelectedCells:J,rowsWithSelectedCells:Y,startCell:j}}({selectableCells:ye,headers:pr,tableRows:wo,onCellEdit:_n,cellRegistry:Mo.current,collapsedHeaders:vr,rowHeight:Ue,enableRowSelection:Z,copyHeadersToClipboard:F,customTheme:je}),Eo=Ho.getBorderClass,To=Ho.handleMouseDown,ko=Ho.handleMouseOver,Po=Ho.isCopyFlashing,Ao=Ho.isInitialFocusedCell,Fo=Ho.isSelected,Do=Ho.isWarningFlashing,Lo=Ho.selectColumns,Wo=Ho.selectedCells,Oo=Ho.selectedColumns,Bo=Ho.setInitialFocusedCell,zo=Ho.setSelectedCells,qo=Ho.setSelectedColumns,Go=Ho.columnsWithSelectedCells,Vo=Ho.rowsWithSelectedCells,jo=Ho.startCell,Ko=a(bo);Ko.current=bo;var Uo=a(go);Uo.current=go;var _o=l(function(n){Ko.current(n),setTimeout(function(){to({accessor:n})},0)},[to]),Jo=l(function(n){Kr(n)},[Kr]),Yo=l(function(){Kr(L)},[L,Kr]);!function(n){var e=n.selectableColumns,t=n.selectedCells,r=n.selectedColumns,i=n.setSelectedCells,a=n.setSelectedColumns,u=n.activeHeaderDropdown,l=n.setActiveHeaderDropdown,c=n.startCell;o(function(){var n=function(n){var o=n.target;o.closest(".editable-cell-input")&&o.closest(".st-header-cell")||(u&&l&&(o.closest(".st-header-cell")||o.closest(".dropdown-content")||l(null)),o.closest(".st-cell")||e&&(o.classList.contains("st-header-cell")||o.classList.contains("st-header-label")||o.classList.contains("st-header-label-text"))||(t.size>0&&i(new Set),r.size>0&&a(new Set),c&&(c.current=null)))};return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[e,t,r,i,a,u,l,c])}({selectableColumns:Ie,selectedCells:Wo,selectedColumns:Oo,setSelectedCells:zo,setSelectedColumns:qo,activeHeaderDropdown:ar,setActiveHeaderDropdown:ur,startCell:jo}),function(n){var e=n.forceUpdate,t=n.tableBodyContainerRef,r=n.setScrollbarWidth,o=a(null);m(function(){var n=function(){null!==o.current&&clearTimeout(o.current),o.current=setTimeout(function(){o.current=null,e(),t.current&&r(t.current.offsetWidth-t.current.clientWidth)},150)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n),null!==o.current&&(clearTimeout(o.current),o.current=null)}},[e,t,r])}({forceUpdate:rt,tableBodyContainerRef:et,setScrollbarWidth:jt}),function(n){var e=n.onGridReady;o(function(){null==e||e()},[e])}({onGridReady:te}),function(n){var e=n.cellRegistryRef,t=n.clearAllFilters,r=n.clearFilter,i=n.currentPage,a=n.resetColumns,u=n.editColumns,l=n.essentialAccessors,c=n.expandedDepths,s=n.filters,d=n.flattenedRows,f=n.headerRegistryRef,v=n.headers,h=n.includeHeadersInCSVExport,p=n.onColumnOrderChange,w=n.onColumnVisibilityChange,m=n.onPageChange,g=n.paginatableRows,b=n.quickFilter,y=n.rowGrouping,S=n.rows,M=n.rowsPerPage,N=n.setCollapsedRows,H=n.setColumnEditorOpen,E=n.setCurrentPage,T=n.setExpandedDepths,k=n.setExpandedRows,P=n.setHeaders,A=n.sort,F=n.tableRef,D=n.totalRowCount,L=n.updateFilter,W=n.updateSort,B=n.visibleRows;o(function(){F&&(F.current={updateData:function(n){var t=n.accessor,r=n.rowIndex,o=n.newValue,i=null==S?void 0:S[r];if(i){var a=d.find(function(n){return n.absoluteRowIndex===r});if(a){var u=U(a.rowId),l=O({rowId:u,accessor:t}),c=e.current.get(l);c&&c.updateContent(o)}void 0!==G(i,t)&&V(i,t,o)}},setHeaderRename:function(n){var e=f.current.get(n.accessor+"");e&&e.setEditing(!0)},getVisibleRows:function(){return B},getAllRows:function(){return d},getHeaders:function(){return v},exportToCSV:function(n){!function(n,e,t,r){void 0===r&&(r=!0);var o=function(n,e,t){void 0===t&&(t=!0);var r=function(n){var e=[],t=function(n){for(var r=0,o=n;o.length>r;r++){var i=o[r];i.hide||i.isSelectionColumn||i.excludeFromCsv||(i.children&&i.children.length>0?(i.singleRowChildren&&e.push(i),t(i.children)):e.push(i))}};return t(n),e}(e),o=r.map(function(n){return Pt(n.label)}).join(","),i=n.map(function(n,e){var t=n.row;return r.map(function(n,r){var o=G(t,n.accessor);if(n.exportValueGetter){var i=n.valueFormatter?n.valueFormatter({accessor:n.accessor,colIndex:r,row:t,rowIndex:e,value:o}):void 0,a=n.exportValueGetter({accessor:n.accessor,colIndex:r,row:t,rowIndex:e,value:o,formattedValue:i});return Pt(a)}return!1!==n.useFormattedValueForCSV&&n.valueFormatter?(i=n.valueFormatter({accessor:n.accessor,colIndex:r,row:t,rowIndex:e,value:o}),Pt(i)):Pt(o)}).join(",")});return(t?R([o],i,!0):i).join("\n")}(n,e,r);!function(n,e){void 0===e&&(e="table-export.csv");var t=new Blob([n],{type:"text/csv;charset=utf-8;"}),r=document.createElement("a"),o=URL.createObjectURL(t);r.setAttribute("href",o),r.setAttribute("download",e),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(o)}(o,t)}(d,v,(void 0===n?{}:n).filename,h)},getSortState:function(){return A},applySortState:At(W),getPinnedState:function(){return ie(v)},applyPinnedState:At(function(n){P(function(e){var t=ue(e,n,l);return t?(null==p||p(t),t):(console.warn("applyPinnedState: left, main, and right accessor lists must include each root column exactly once."),e)})}),getFilterState:function(){return s},applyFilter:At(L),clearFilter:At(r),clearAllFilters:At(t),getCurrentPage:function(){return i},getTotalPages:function(){return Math.ceil((null!=D?D:g.length)/M)},setPage:function(n){return C(void 0,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return e=Math.ceil((null!=D?D:g.length)/M),1>n||n>e?[3,2]:(E(n),m?[4,m(n)]:[3,2]);case 1:t.sent(),t.label=2;case 2:return[2]}})})},expandAll:function(){var n=Array.from({length:(null==y?void 0:y.length)||0},function(n,e){return e});T(new Set(n)),k(new Map),N(new Map)},collapseAll:function(){T(new Set),k(new Map),N(new Map)},expandDepth:function(n){T(function(e){for(var t=new Set(e),r=0;n>=r;r++)t.add(r);return t}),k(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),N(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t})},collapseDepth:function(n){T(function(e){var t=new Set(e);return t.delete(n),t}),k(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),N(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t})},toggleDepth:function(n){T(function(e){var t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t}),k(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),N(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t})},setExpandedDepths:function(n){T(n)},getExpandedDepths:function(){return c},getGroupingProperty:function(n){return null==y?void 0:y[n]},getGroupingDepth:function(n){var e;return null!==(e=null==y?void 0:y.indexOf(n))&&void 0!==e?e:-1},toggleColumnEditor:function(n){u&&H(void 0!==n?n:function(n){return!n})},applyColumnVisibility:At(function(n){var e=function(t){return t.map(function(t){var r=t.accessor+"",o=r in n?!n[r]:t.hide;return ee(t,l)&&(o=!1),x(x({},t),{hide:o,children:t.children?e(t.children):t.children})})};P(function(n){return e(n)}),w&&w(n)}),resetColumns:a,setQuickFilter:function(n){(null==b?void 0:b.onChange)&&b.onChange(n)}})},[e,t,r,i,a,u,l,c,s,d,f,v,h,p,w,m,g,b,y,n.rowIndexMap,S,M,n.serverSidePagination,N,H,E,T,k,P,n.setRows,n.shouldPaginate,A,F,D,L,W,B])}({cellRegistryRef:Mo,clearAllFilters:Qr,clearFilter:$r,currentPage:$t,resetColumns:Yo,editColumns:B,essentialAccessors:wr,expandedDepths:Rr,filters:Yr,flattenedRows:io,headerRegistryRef:No,headers:pr,includeHeadersInCSVExport:Wn,onColumnOrderChange:Jn,onColumnVisibilityChange:Xn,onPageChange:le,paginatableRows:uo,quickFilter:ve,rowGrouping:pe,rowIndexMap:bt,rows:Ut,rowsPerPage:be,serverSidePagination:Se,setCollapsedRows:kr,setColumnEditorOpen:sr,setCurrentPage:Qt,setExpandedDepths:Sr,setExpandedRows:Hr,setHeaders:Kr,setRows:ct,shouldPaginate:Ne,sort:eo,tableRef:Pe,totalRowCount:De,updateFilter:Xr,updateSort:to,visibleRows:mo}),function(n){var e=n.filters,t=n.onFilterChange;o(function(){null==t||t(e)},[e,t])}({filters:Yr,onFilterChange:ne}),function(n){var e=n.sort,t=n.onSortChange,r=$n(e);o(function(){!e||(null==r?void 0:r.key.accessor)===e.key.accessor&&(null==r?void 0:r.direction)===e.direction?!e&&r&&(null==t||t(null)):null==t||t(e)},[e,r,t])}({sort:eo,onSortChange:de});var Xo=l(function(n){Uo.current(n),setTimeout(function(){Xr(n)},0)},[Xr]),$o=!dt&&0===wo.length,Qo=u(function(){return{activeHeaderDropdown:ar,allowAnimations:c,areAllRowsSelected:It,autoExpandColumns:d,canExpandRowGroup:f,cellRegistry:Mo.current,cellUpdateFlash:h,clearSelection:Ot,collapsedHeaders:vr,columnBorders:g,columnEditorConfig:Ke,columnReordering:E,columnResizing:k,containerWidth:Lr,columnsWithSelectedCells:Go,copyHeadersToClipboard:F,draggedHeaderRef:Xe,editColumns:B,emptyStateRenderer:_,essentialAccessors:wr,enableHeaderEditing:$,enableRowSelection:Z,errorStateRenderer:tn,expandedDepths:Rr,filters:Yr,icons:Ve,forceUpdate:rt,getBorderClass:Eo,handleApplyFilter:Xo,handleClearAllFilters:Qr,handleClearFilter:$r,handleMouseDown:To,handleMouseOver:ko,handleRowSelect:Ft,handleSelectAll:Lt,handleToggleRow:Wt,headerContainerRef:tt,headerDropdown:Nn,headerHeight:_e,headerRegistry:No.current,headers:pr,heightOffsets:Ro,hoveredHeaderRef:$e,includeHeadersInCSVExport:Wn,isAnimating:xo,isCopyFlashing:Po,isInitialFocusedCell:Ao,isLoading:dt,isResizing:rr,isRowSelected:Ct,isSelected:Fo,isWarningFlashing:Do,loadingStateRenderer:Vn,mainBodyRef:Qe,maxHeaderDepth:Or,onCellClick:Un,onCellEdit:_n,onColumnOrderChange:Jn,onColumnSelect:Yn,onColumnVisibilityChange:Xn,onColumnWidthChange:Zn,onHeaderEdit:re,onLoadMore:oe,onRowGroupExpand:ce,onSort:_o,onTableHeaderDragEnd:Jo,resetColumns:Yo,pinnedLeftRef:Ze,pinnedRightRef:nt,rowButtons:he,rowGrouping:pe,rowHeight:Ue,rowStateMap:it,rows:lt,rowsWithSelectedCells:Vo,scrollbarWidth:zt,selectColumns:Lo,selectableColumns:Ie,selectedColumns:Oo,selectedRowCount:Rt,selectedRows:xt,selectedRowsData:St,setActiveHeaderDropdown:ur,setCollapsedHeaders:hr,setHeaders:Kr,setInitialFocusedCell:Bo,setIsResizing:or,setRowStateMap:at,setSelectedCells:zo,setSelectedColumns:qo,setSelectedRows:yt,setExpandedDepths:Sr,setExpandedRows:Hr,setCollapsedRows:kr,shouldPaginate:Ne,tableBodyContainerRef:et,tableEmptyStateRenderer:ke,tableRows:wo,theme:Fe,customTheme:je,expandedRows:Nr,collapsedRows:Tr,useHoverRowBackground:We,useOddColumnBackground:Be,useOddEvenRowBackground:Ge}},[ar,c,It,d,f,h,Ot,vr,g,Ke,E,k,Lr,Go,F,Xe,B,_,wr,$,Z,tn,Rr,Yr,Ve,rt,Eo,Xo,Qr,$r,To,ko,Ft,Lt,Wt,tt,Nn,_e,pr,Ro,$e,Wn,xo,Po,Ao,dt,rr,Ct,Fo,Do,Vn,Qe,Or,Un,_n,Jn,Yn,Xn,Zn,re,oe,ce,_o,Jo,Yo,Ze,nt,he,pe,Ue,it,lt,Vo,zt,Lo,Ie,Oo,Rt,xt,St,ur,hr,Kr,Bo,or,at,zo,qo,yt,Sr,Hr,kr,Ne,et,ke,wo,Fe,je,Nr,Tr,We,Be,Ge]);return n(fn,x({value:Qo},{children:n(pn,{children:t("div",x({className:"simple-table-root st-wrapper theme-".concat(Fe," ").concat(null!=p?p:""," ").concat(g?"st-column-borders":""),role:"grid",style:jn?{maxHeight:jn,height:void 0===ho?"auto":jn}:Tn?{height:Tn}:{}},{children:[n(Nt,{children:t("div",x({className:"st-wrapper-container"},{children:[t("div",x({className:"st-content-wrapper"},{children:[n(ft,{calculatedHeaderHeight:Wr,hideHeader:Fn,pinnedLeftWidth:qr,pinnedRightWidth:Gr,setScrollTop:br,setScrollDirection:Cr,shouldShowEmptyState:$o,sort:eo,tableRows:wo,rowsToRender:mo,stickyParents:yo,regularRows:Co,partiallyVisibleRows:Io,heightMap:So}),n(Mt,{columnEditorConfig:Ke,editColumns:B,headers:nr,open:cr,setOpen:sr})]})),!$o&&n(vt,{mainBodyRef:Qe,mainBodyWidth:zr,pinnedLeftWidth:qr,pinnedRightWidth:Gr,pinnedLeftContentWidth:Vr,pinnedRightContentWidth:jr,tableBodyContainerRef:et}),!$o&&n(mn,{currentPage:$t,footerRenderer:yn,hideFooter:Pn,onPageChange:Qt,onNextPage:ae,onUserPageChange:le,rowsPerPage:be,shouldPaginate:Ne,totalPages:Math.ceil((null!=De?De:uo.length)/be),totalRows:null!=De?De:uo.length})]}))}),n("div",x({"aria-live":"polite","aria-atomic":"true",className:"st-sr-only"},{children:Ar}))]}))})}))},Qt=function(e){var r=e.data,o=e.width,i=void 0===o?"100%":o,a=e.height,u=void 0===a?30:a,l=e.color,c=e.fillColor,s=e.fillOpacity,d=void 0===s?.25:s,f=e.strokeWidth,v=void 0===f?1.5:f,h=e.className,p=void 0===h?"":h,w=e.min,m=e.max;if(!r||0===r.length)return null;var g=void 0!==w?w:Math.min.apply(Math,r),b=(void 0!==m?m:Math.max.apply(Math,r))-g||1,y=u,C=r.map(function(n,e){return{x:e/(r.length-1)*100,y:y-(n-g)/b*y}}).map(function(n,e){return"".concat(0===e?"M":"L"," ").concat(n.x,",").concat(n.y)}).join(" "),I="\n ".concat(C,"\n L ").concat(100,",").concat(y,"\n L 0,").concat(y,"\n Z\n ");return t("svg",x({width:i,height:u,viewBox:"0 0 100 ".concat(y),preserveAspectRatio:"none",className:"st-line-area-chart ".concat(p),style:{display:"block"},shapeRendering:"geometricPrecision"},{children:[n("path",{d:I,fill:c||"var(--st-chart-fill-color)",fillOpacity:d,stroke:"none"}),n("path",{d:C,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round"})]}))},Zt=Object.freeze({__proto__:null,default:Qt}),nr=function(e){var t=e.data,r=e.width,o=void 0===r?"100%":r,i=e.height,a=void 0===i?30:i,u=e.color,l=e.gap,c=void 0===l?2:l,s=e.className,d=void 0===s?"":s,f=e.min,v=e.max;if(!t||0===t.length)return null;var h=void 0!==f?f:Math.min.apply(Math,t),p=void 0!==v?v:Math.max.apply(Math,t),w=p-h||1,m=a,g=(100-c*(t.length-1))/t.length,b=0>h,y=b?m*(p/w):m;return n("svg",x({width:o,height:a,viewBox:"0 0 100 ".concat(m),preserveAspectRatio:"none",className:"st-bar-chart ".concat(d),style:{display:"block"},shapeRendering:"crispEdges"},{children:t.map(function(e,t){var r=t*(g+c),o=(e-h)/w*m,i=m-o,a=o;return b&&(0>e?(a=Math.abs(e)/w*m,i=y):i=y-(a=e/w*m)),n("rect",{x:r,y:i,width:g,height:a,fill:u||"var(--st-chart-color)",rx:.5},t)})}))},er=Object.freeze({__proto__:null,default:nr});export{Dt as A,nr as B,In as C,Rn as D,Mn as F,Qt as L,S as R,Xt as S,y as _,wn as a,$n as b,M as c,x as d,Bt as e,Ot as f,gn as g,bn as h,xn as i,yn as j,Cn as k,Sn as l,Nn as m,vn as u};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{jsx as n,Fragment as e,jsxs as t}from"react/jsx-runtime";import r,{useEffect as o,useState as i,useRef as a,useMemo as u,useCallback as l,createContext as c,useContext as s,lazy as d,Suspense as f,Fragment as v,cloneElement as h,forwardRef as p,useImperativeHandle as w,useLayoutEffect as m,isValidElement as g,useReducer as b}from"react";var x=function(){return x=Object.assign||function(n){for(var e,t=1,r=arguments.length;r>t;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},x.apply(this,arguments)};function y(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&0>e.indexOf(r)&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(n);r.length>o;o++)0>e.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]])}return t}function C(n,e,t,r){return new(t||(t=Promise))(function(o,i){function a(n){try{l(r.next(n))}catch(n){i(n)}}function u(n){try{l(r.throw(n))}catch(n){i(n)}}function l(n){var e;n.done?o(n.value):(e=n.value,e instanceof t?e:new t(function(n){n(e)})).then(a,u)}l((r=r.apply(n,e||[])).next())})}function I(n,e){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&o[3]>u[1])){i.label=u[1];break}if(6===u[0]&&o[1]>i.label){i.label=o[1],o=u;break}if(o&&o[2]>i.label){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(n,i)}catch(n){u=[6,n],r=0}finally{t=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function R(n,e,t){if(t||2===arguments.length)for(var r,o=0,i=e.length;i>o;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return n.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var S=1,M=function(n){return Math.ceil(800/(n+1))},N=29.5,H=["lineAreaChart","barChart"],E=40,T=function(n,e,t){return e&&t?480>n?.25:768>n?.3:.4:function(n){return 480>n?.4:768>n?.5:.6}(n)},k="parentExpanded",P=function(n,e){if(!n.children||0===n.children.length)return[e];var t=[],r=function(n,e){if(!n.children||0===n.children.length)return t.push(e),e+1;for(var o=e,i=0,a=n.children;a.length>i;i++)o=r(a[i],o);return o};return r(n,e),t},A=function(n){return n.flatMap(function(n){var e=[n];return n.children&&n.children.length>0&&e.push.apply(e,A(n.children)),e})},F=function(n){return void 0===n&&(n=0),n?n+1:0},D=function(n,e){for(var t=0,r=A(n);r.length>t;t++){var o=r[t];if(o.children&&o.children.length>0&&o.children.some(function(n){return n.accessor===e}))return o}return null},L=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},W=function(n){var e=n.header,t=n.headers,r=n.collapsedHeaders;return e.hide||e.excludeFromRender||n.rootPinned!==n.pinned?null:!(t&&r&&function(n,e,t){var r=D(e,n.accessor);if(r){var o=t.has(r.accessor),i=n.showWhen||k;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(e,t,r))||null},O=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},B=function(n){var e=n.customTheme;return Math.min(n.headerHeight+e.rowSeparatorWidth+n.childRowCount*(n.rowHeight+e.rowSeparatorWidth)+e.nestedGridPaddingTop+e.nestedGridPaddingBottom+e.nestedGridBorderWidth,e.nestedGridMaxHeight+e.nestedGridPaddingTop+e.nestedGridPaddingBottom+e.nestedGridBorderWidth)},z=function(n){var e=n.calculatedHeight,t=n.customHeight,r=n.customTheme;return t?("string"==typeof t?parseFloat(t):t)+r.nestedGridPaddingTop+r.nestedGridPaddingBottom:e},q=function(n){var e=n.match(/^(.+?)\[(\d+)\]$/);return e?{key:e[1],index:parseInt(e[2],10)}:{key:n,index:null}},G=function(n,e){var t=e+"";return t.includes(".")||t.includes("[")?t.split(".").reduce(function(n,e){if(null!=n){var t=q(e),r=t.index,o=n[t.key];return null!==r&&Array.isArray(o)&&(o=o[r]),o}},n):n[e]},V=function(n,e,t){var r=e+"";if(r.includes(".")||r.includes("[")){for(var o=r.split("."),i=n,a=0;o.length-1>a;a++){var u=q(o[a]),l=u.key,c=u.index;if(null==i[l]){var s=q(o[a+1]);i[l]=null!==s.index?[]:{}}if(i=i[l],null!==c){if(!Array.isArray(i))throw Error("Expected array at ".concat(o.slice(0,a+1).join("."),", but found ").concat(typeof i));for(;c>=i.length;)i.push(null);null==i[c]&&(i[c]={}),i=i[c]}}var d=q(o[o.length-1]),f=d.key,v=d.index;if(null!==v){for(Array.isArray(i[f])||(i[f]=[]);v>=i[f].length;)i[f].push(null);i[f][v]=t}else i[f]=t}else n[e]=t},j=function(n){return Array.isArray(n)&&n.length>0&&"object"==typeof n[0]&&null!==n[0]},K=function(n){var e=n.getRowId,t=R([],n.rowPath,!0);if(e){var r=e({row:n.row,depth:n.depth,index:n.index,rowPath:n.rowPath,rowIndexPath:n.rowIndexPath,groupingKey:n.groupingKey});t.push(r)}return t},U=function(n){return n.join("-")},_=function(n,e){var t=n[e];return j(t)?t:[]},J=function(n,e,t,r,o){var i=n+"",a=r.has(i)&&r.get(i)===e,u=o.has(i)&&o.get(i)===e;return t.has(e)?!u:a},Y=function(n){var e=n.depth,t=n.expandedDepths,r=n.expandedRows,o=n.collapsedRows,i=n.rowGrouping,a=void 0===i?[]:i,u=n.getRowId,l=n.displayPositionOffset,c=void 0===l?0:l,s=n.rowStateMap,d=n.hasLoadingRenderer,f=void 0!==d&&d,v=n.hasErrorRenderer,h=void 0!==v&&v,p=n.hasEmptyRenderer,w=void 0!==p&&p,m=n.headers,g=void 0===m?[]:m,b=n.rowHeight,x=n.headerHeight,y=n.customTheme,C=[],I=function(n,e,i,l,d,v,p){void 0===i&&(i=0),void 0===l&&(l=c),void 0===d&&(d=[]),void 0===v&&(v=[]),void 0===p&&(p=[]);var m=i,S=l;return n.forEach(function(i,l){var c,M,N=a[e],H=R(R([],d,!0),[l],!1),E=R(R([],v,!0),[l],!1),T=K({row:i,getRowId:u,depth:e,index:l,rowPath:H,rowIndexPath:E,groupingKey:N}),k=C.length,P={row:i,depth:e,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:0===e&&l===n.length-1,rowId:T,rowPath:H,rowIndexPath:E,absoluteRowIndex:m,parentIndices:p.length>0?R([],p,!0):void 0};C.push(P),m++,S++;var A=U(T);if(J(A,e,t,r,o)&&a.length>e){var F=null==s?void 0:s.get(A),D=_(i,N),L=g.find(function(n){return n.expandable&&n.nestedTable});if((null==L?void 0:L.nestedTable)&&D.length>0){var W=(null===(c=L.nestedTable.customTheme)||void 0===c?void 0:c.rowHeight)||b,O=(null===(M=L.nestedTable.customTheme)||void 0===M?void 0:M.headerHeight)||x,q=B({childRowCount:D.length,rowHeight:W,headerHeight:O,customTheme:y}),G=z({calculatedHeight:q,customHeight:L.nestedTable.height,customTheme:y}),V=R(R([],H,!0),[N],!1);C.push({row:{},depth:e+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:V,rowPath:V,rowIndexPath:E,nestedTable:{parentRow:i,expandableHeader:L,childAccessor:N,calculatedHeight:G},absoluteRowIndex:m}),m++,S++}else if(F&&(F.loading||F.error||F.isEmpty)){if(F.loading&&f||F.error&&h||F.isEmpty&&w){var j=R(R([],H,!0),[N],!1);C.push({row:{},depth:e+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:j,rowPath:j,rowIndexPath:E,stateIndicator:{parentRowId:A,parentRow:i,state:F},absoluteRowIndex:m,parentIndices:R(R([],p,!0),[k],!1)}),m++,S++}else if(F.loading&&!f){var Y=R(R([],H,!0),[N,"loading-skeleton"],!1);C.push({row:{},depth:e+1,displayPosition:S,groupingKey:N,position:m,isLastGroupRow:!1,rowId:Y,rowPath:Y,rowIndexPath:E,isLoadingSkeleton:!0,absoluteRowIndex:m,parentIndices:R(R([],p,!0),[k],!1)}),m++,S++}}else if(D.length>0){var X=R(R([],H,!0),[N],!1),$=R([],E,!0);m=I(D,e+1,m,S,X,$,R(R([],p,!0),[k],!1))}}}),m};return I(n.rows,void 0===e?0:e,0,c,[],[],[]),C},X=function(n,e){if(n.hide)return[];if(!n.children||0===n.children.length)return[n];if(e&&e.has(n.accessor)){var t=n.children.filter(function(n){var e=n.showWhen||k;return"parentCollapsed"===e||"always"===e}).flatMap(function(n){return X(n,e)});return n.singleRowChildren?R([n],t,!0):t}var r=n.children.filter(function(n){var e=n.showWhen||k;return"parentExpanded"===e||"always"===e}).flatMap(function(n){return X(n,e)});return n.singleRowChildren?R([n],r,!0):r},$=function(n){if(n.hide)return 0;if("number"==typeof n.width)return n.width;if("string"==typeof n.width&&n.width.endsWith("px"))return parseFloat(n.width);var e=document.getElementById(L({accessor:n.accessor,rowId:"header"}));return(null==e?void 0:e.offsetWidth)||150},Q=function(n){var e,t=n.width;"string"==typeof t&&t.includes("fr")&&(n.width=(null===(e=document.getElementById(L({accessor:n.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth)||150),n.children&&n.children.length>0&&n.children.forEach(function(n){Q(n)})},Z=function(n){return"number"==typeof n.minWidth?n.minWidth:E},nn=function(n,e){var t=[];return n.forEach(function(n){n.hide||t.push.apply(t,X(n,e))}),t},en=function(n,e){var t=e.rowTopPositions;if(0===t.length)return 0;if(0>=n)return 0;if(n>=e.totalHeight)return t.length-1;for(var r=0,o=t.length-1;o>r;){var i=Math.floor((r+o+1)/2);t[i]>n?o=i-1:r=i}return r},tn=function(n,e){if(!e||0===e.length)return 0;for(var t=0,r=0,o=e.length;o>r;){var i=Math.floor((r+o)/2);n>e[i][0]?r=i+1:o=i}for(var a=0;r>a;a++)t+=e[a][1];return t},rn=function(n){var e=n.bufferRowCount,t=n.contentHeight,r=n.scrollTop,o=n.tableRows,i=n.scrollDirection,a=void 0===i?"none":i,u=n.heightMap,l=n.rowHeight+1;if(!u){var c=e*l,s=c,d=c;"down"===a?(s=Math.max(l,.1*c),d=.9*c):"up"===a&&(s=.9*c,d=Math.max(l,.1*c));var f=r+t+d,v=Math.max(0,Math.floor(Math.max(0,r-s)/l)),h=Math.min(o.length,Math.ceil(f/l)),p=r+t,w=Math.max(0,Math.ceil(r/l)),m=Math.min(o.length,Math.floor(p/l)),g=r+t,b=Math.max(0,Math.floor(r/l)),x=Math.min(o.length,Math.ceil(g/l));return{rendered:{startIndex:v,endIndex:h,rows:o.slice(v,h)},fullyVisible:{startIndex:w,endIndex:m,rows:o.slice(w,m)},partiallyVisible:{startIndex:b,endIndex:x,rows:o.slice(b,x)}}}var y=u.rowTopPositions,C=e*l,I=C,R=C;"down"===a?(I=Math.max(l,.1*C),R=.9*C):"up"===a&&(I=.9*C,R=Math.max(l,.1*C));var S=r+t+R,M=en(Math.max(0,r-I),u),N=en(S,u)+1;N=Math.min(o.length,N);var H=r,E=r+t,T=en(H,u);H>y[T]&&(T=Math.min(T+1,o.length));var k=en(E,u);k=Math.min(o.length,k);var P=r+t,A=en(r,u),F=en(P,u)+1;return F=Math.min(o.length,F),{rendered:{startIndex:M,endIndex:N,rows:o.slice(M,N)},fullyVisible:{startIndex:T,endIndex:k,rows:o.slice(T,k)},partiallyVisible:{startIndex:A,endIndex:F,rows:o.slice(A,F)}}},on=function(n){var e=n.position;return e*(n.rowHeight+n.customTheme.rowSeparatorWidth)+tn(e,n.heightOffsets)},an=function(n,e){var t,r,o=n.position,i=e[o+1];return null!==(r=null===(t=null==i?void 0:i.parentIndices)||void 0===t?void 0:t.includes(o))&&void 0!==r&&r},un=function(n){var e=n.allTableRows,t=n.renderedRows,r=n.fullyVisibleRows,o=n.partiallyVisibleRows,i=n.partiallyVisibleRowIndex,a=n.recursionDepth,u=n.stickyParents,l=n.rowGrouping,c=o[i];if(!c||a>10)return{stickyParents:u,regularRows:t};var s=0;if(c.parentIndices&&c.parentIndices.length>0){for(var d=function(n){var t=e[n];if(t){var o=r.some(function(n){return n.position===t.position});if(c.rowIndexPath&&c.rowIndexPath.length>0){var i=e[c.parentIndices[c.parentIndices.length-1]],a=i.row[l[i.depth]];if(u.length>=(Array.isArray(a)?a:[]).length-c.rowIndexPath[c.rowIndexPath.length-1])return"break"}o||u.some(function(n){return U(n.rowId)===U(t.rowId)})||(u.push(t),s++)}},f=0,v=c.parentIndices;v.length>f&&"break"!==d(v[f]);f++);if(u.length>0){an(c,e)&&(u.push(c),s++);var h=o[i+=s];h&&(c=h)}}else if(an(c,e))return u.push(c),i++,un({allTableRows:e,renderedRows:t,fullyVisibleRows:r,partiallyVisibleRows:o,partiallyVisibleRowIndex:i,recursionDepth:a+1,stickyParents:u,rowGrouping:l});return an(c,e)?un({allTableRows:e,renderedRows:t,fullyVisibleRows:r,partiallyVisibleRows:o,partiallyVisibleRowIndex:i,recursionDepth:a+1,stickyParents:u,rowGrouping:l}):{stickyParents:u,regularRows:t}},ln=function(n,e,t){var r=n.getBoundingClientRect(),o=e.getBoundingClientRect(),i=10;if(o.top+i>r.top?e.scrollTop-=o.top-r.top+i:r.bottom>o.bottom-i&&(e.scrollTop+=r.bottom-o.bottom+i),t){var a=t.getBoundingClientRect();a.left+i>r.left?t.scrollLeft-=a.left-r.left+i:r.right>a.right-i&&(t.scrollLeft+=r.right-a.right+i)}},cn=function(n,e,t,r){var o=document.querySelector(".st-body-container"),i=document.querySelector(".st-body-main");if(o){!function(n,e){if(e){var t=document.querySelector('.st-header-main [data-col-index="'.concat(n,'"]'));if(t){var r=t.getBoundingClientRect(),o=e.getBoundingClientRect();o.left+10>r.left?e.scrollLeft-=o.left-r.left+10:r.right>o.right-10&&(e.scrollLeft+=r.right-o.right+10)}}}(n.colIndex,i);var a=e+t.rowSeparatorWidth,u=document.querySelector('.st-cell[data-row-index="'.concat(n.rowIndex,'"][data-col-index="').concat(n.colIndex,'"][data-row-id="').concat(n.rowId,'"]'));if(u&&r){var l=function(n,e,t,r){var o=rn({bufferRowCount:0,contentHeight:e.clientHeight,rowHeight:t,scrollTop:e.scrollTop,tableRows:r,scrollDirection:"none"}).fullyVisible;return n>=o.startIndex&&o.endIndex>n}(n.rowIndex,o,e,r);if(l)return void ln(u,o,i)}if(!u)return o.scrollTop=Math.max(0,n.rowIndex*a-o.clientHeight/3),void setTimeout(function(){var e=document.querySelector('.st-cell[data-row-index="'.concat(n.rowIndex,'"][data-col-index="').concat(n.colIndex,'"][data-row-id="').concat(n.rowId,'"]'));e&&ln(e,o,i)},100);ln(u,o,i)}},sn=function(n){var e=n.colIndex,t=n.rowId;return"".concat(n.rowIndex,"-").concat(e,"-").concat(t)},dn=c(void 0),fn=function(e){return n(dn.Provider,x({value:e.value},{children:e.children}))},vn=function(){var n=s(dn);if(void 0===n)throw Error("useTableContext must be used within a TableProvider");return n},hn=c(void 0),pn=function(e){var t=e.children,r=i(!1),o=r[0],a=r[1],l=u(function(){return{isScrolling:o,setIsScrolling:a}},[o]);return n(hn.Provider,x({value:l},{children:t}))},wn=function(){var n=s(hn);if(void 0===n)throw Error("useScrollState must be used within a ScrollStateProvider");return n},mn=function(r){var o=r.currentPage,a=r.footerRenderer,u=r.hideFooter,l=r.onPageChange,c=r.onNextPage,s=r.onUserPageChange,d=r.rowsPerPage,f=r.shouldPaginate,v=r.totalPages,h=r.totalRows,p=vn().icons,w=i(!0),m=w[0],g=w[1],b=o>1,y=v>o,R=o===v,S=Math.min((o-1)*d+1,h),M=Math.min(o*d,h),N=!b,H=!y&&!c||!m&&R,E=function(){return C(void 0,void 0,void 0,function(){var n;return I(this,function(e){switch(e.label){case 0:return 1>(n=o-1)?[3,2]:(l(n),s?[4,s(n)]:[3,2]);case 1:e.sent(),e.label=2;case 2:return[2]}})})},T=function(){return C(void 0,void 0,void 0,function(){var n,e;return I(this,function(t){switch(t.label){case 0:return n=o===v,e=o+1,c&&n?[4,c(o)]:[3,2];case 1:if(!t.sent())return g(!1),[2];t.label=2;case 2:return e>v&&!c?[3,4]:(l(e),s?[4,s(e)]:[3,4]);case 3:t.sent(),t.label=4;case 4:return[2]}})})},k=function(n){return C(void 0,void 0,void 0,function(){return I(this,function(e){switch(e.label){case 0:return 1>n||n>v?[3,2]:(l(n),s?[4,s(n)]:[3,2]);case 1:e.sent(),e.label=2;case 2:return[2]}})})};if(u||!f)return null;if(a)return n(e,{children:a({currentPage:o,totalPages:v,rowsPerPage:d,totalRows:h,startRow:S,endRow:M,onPageChange:k,onNextPage:T,onPrevPage:E,hasNextPage:!H,hasPrevPage:!N,nextIcon:p.next,prevIcon:p.prev})});var P=function(){if(15>=v)return Array.from({length:v},function(n,e){return e+1});var n,e,t=[];o>8?v-7>o?(n=o-7,e=o+7):(n=Math.max(1,v-15+1),e=v):(n=1,e=14),n>2?(t.push(1),t.push(-1)):2===n&&t.push(1);for(var r=n;e>=r;r++)t.push(r);return v-1>e?(t.push(-2),t.push(v)):e===v-1&&t.push(v),t}();return t("div",x({className:"st-footer"},{children:[n("div",x({className:"st-footer-info"},{children:t("span",x({className:"st-footer-results-text"},{children:["Showing ",S," to ",M," of ",h.toLocaleString()," results"]}))})),t("div",x({className:"st-footer-pagination"},{children:[P.map(function(e,t){return 0>e?n("span",x({className:"st-page-ellipsis"},{children:"..."}),t):n("button",x({onClick:function(){return k(e)},className:"st-page-btn ".concat(o===e?"active":""),"aria-label":"Go to page ".concat(e),"aria-current":o===e?"page":void 0},{children:e}),t)}),n("button",x({className:"st-next-prev-btn ".concat(N?"disabled":""),onClick:E,disabled:N,"aria-label":"Go to previous page"},{children:p.prev})),n("button",x({className:"st-next-prev-btn ".concat(H?"disabled":""),onClick:T,disabled:H,"aria-label":"Go to next page"},{children:p.next}))]}))]}))},gn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},bn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},xn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},yn=function(e){return n("svg",x({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},Cn=function(e){return n("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:e.className,style:{height:"1em"}},{children:n("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},In=function(e){return n("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:e.className,style:x({height:"10px"},e.style)},{children:n("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},Rn=function(e){return n("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:e.className,style:{height:"1em"}},{children:n("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},Sn=function(e){return t("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 10",className:e.className,style:x({height:"10px",width:"16px"},e.style)},{children:[n("circle",{cx:"3",cy:"3",r:"1.5",fill:"currentColor"}),n("circle",{cx:"8",cy:"3",r:"1.5",fill:"currentColor"}),n("circle",{cx:"13",cy:"3",r:"1.5",fill:"currentColor"}),n("circle",{cx:"3",cy:"7",r:"1.5",fill:"currentColor"}),n("circle",{cx:"8",cy:"7",r:"1.5",fill:"currentColor"}),n("circle",{cx:"13",cy:"7",r:"1.5",fill:"currentColor"})]}))},Mn=function(e){return n("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:e.className,style:x({height:"1em"},e.style)},{children:n("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},Nn=function(){return n("svg",x({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},Hn=function(n){var e=n.headerContainerRef,t=n.mainSectionRef,r=n.scrollbarWidth,a=i(!1),u=a[0],l=a[1];return o(function(){var n=null==e?void 0:e.current;if(u&&n)return n.classList.add("st-header-scroll-padding"),n.style.setProperty("--st-after-width","".concat(r,"px")),function(){n.classList.remove("st-header-scroll-padding")}},[e,u,r]),o(function(){var n=null==t?void 0:t.current;if(n&&(null==e?void 0:e.current)){var r=function(){n&&l(n.scrollHeight>n.clientHeight)};r();var o=null,i=new ResizeObserver(function(){null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(function(){o=null,r()})});return i.observe(n),function(){null!==o&&(cancelAnimationFrame(o),o=null),n&&i.unobserve(n)}}},[e,t]),{isMainSectionScrollable:u}},En=function(e){var t=e.children,r=e.onClose,u=e.open,l=e.overflow,c=void 0===l?"auto":l,s=e.setOpen,d=e.width,f=e.containerRef,v=e.positioning,h=void 0===v?"fixed":v,p=vn().mainBodyRef,w=a(null),m=a(null),g=i("bottom-left"),b=g[0],y=g[1],C=i({}),I=C[0],R=C[1],S=i(!1),M=S[0],N=S[1];return o(function(){u&&w.current?(N(!1),!m.current&&w.current.parentElement&&(m.current=w.current.parentElement),requestAnimationFrame(function(){if(w.current&&m.current){var n,e=w.current,t=m.current.getBoundingClientRect(),r=e.offsetHeight,o=d||e.offsetWidth,i=(n=(null==f?void 0:f.current)?f.current.getBoundingClientRect():(null==p?void 0:p.current)?p.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-n.top,u="bottom",l={};(r>i&&a>=r||r>i&&a>i)&&(u="top");var c="left";o>n.right-t.right+t.width&&(c="right"),"fixed"===h?("bottom"===u?l.top=t.bottom+4:l.bottom=window.innerHeight-t.top+4,"left"===c?l.left=t.left:l.right=window.innerWidth-t.right):("bottom"===u?l.top=t.height+4:l.bottom=t.height+4,"left"===c?l.left=0:l.right=0),y("".concat(u,"-").concat(c)),R(l),N(!0)}})):u||N(!1)},[u,d,f,p,h]),o(function(){var n=function(n){u&&w.current&&w.current&&!w.current.contains(n.target)&&(s(!1),null==r||r())};return u&&window.addEventListener("scroll",n,!0),function(){window.removeEventListener("scroll",n,!0)}},[u,r,s]),o(function(){var n=function(n){if(w.current&&!w.current.contains(n.target)){var e=w.current.parentElement;e&&!e.contains(n.target)&&(s(!1),null==r||r())}},e=function(e){"Enter"===e.key&&n(e)};return u&&(document.addEventListener("mousedown",n,!0),document.addEventListener("keydown",e,!0)),function(){document.removeEventListener("mousedown",n,!0),document.removeEventListener("keydown",e,!0)}},[r,u,s]),o(function(){var n=function(n){"Escape"===n.key&&u&&(s(!1),null==r||r())};return u&&document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}},[r,u,s]),u?n("div",x({ref:w,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(n){return n.stopPropagation()},onMouseDown:function(n){return n.stopPropagation()},onTouchStart:function(n){return n.stopPropagation()},style:x(x({position:h,width:d?"".concat(d,"px"):"auto",visibility:M?"visible":"hidden"},I),{overflow:c})},{children:t})):null},Tn=function(e){var t=e.children,r=e.onClick,o=e.isSelected,i=void 0!==o&&o,a=e.disabled,u=void 0!==a&&a,l=e.className,c=void 0===l?"":l;return n("div",x({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(u?"disabled":""," ").concat(c),onClick:function(){!u&&r&&r()},role:"option","aria-selected":i,"aria-disabled":u},{children:t}))},kn=function(e){var r=e.onBlur,o=e.onChange,a=e.open,u=e.setOpen,l=i(e.value),c=l[0],s=l[1],d=function(n){s(n),o(n),u(!1),r()};return t(En,x({open:a,onClose:function(){r()},setOpen:u,width:120},{children:[n(Tn,x({isSelected:!0===c,onClick:function(){return d(!0)}},{children:"True"})),n(Tn,x({isSelected:!1===c,onClick:function(){return d(!1)}},{children:"False"}))]}))},Pn=function(e){var t=e.defaultValue,r=e.onBlur,o=e.onChange,i=a(null);return n("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(n){o(n.target.value)},onKeyDown:function(n){n.stopPropagation(),"Enter"!==n.key&&"Escape"!==n.key||r()},onMouseDown:function(n){n.stopPropagation()}})},An=function(e){var t=e.defaultValue,r=e.onBlur,o=e.onChange,i=a(null);return n("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:""+t,onBlur:r,onChange:function(n){var e=n.target.value;/^\d*\.?\d*$/.test(e)&&o(e)},onKeyDown:function(n){n.stopPropagation(),"Enter"!==n.key&&"Escape"!==n.key||r()},onMouseDown:function(n){n.stopPropagation()}})},Fn=d(function(){return import("./Animate-65c1a0d7.js")}),Dn=d(function(){return import("./DatePicker-12235c3b.js")}),Ln=d(function(){return Promise.resolve().then(function(){return Zt})}),Wn=d(function(){return Promise.resolve().then(function(){return er})}),On=function(e){var t=y(e,["parentRef","tableRow"]);return n(f,x({fallback:n("div",x({},t))},{children:n(Fn,x({},e))}))},Bn=function(e){return n(f,x({fallback:n("div",x({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:n(Dn,x({},e))}))},zn=function(e){var t=e.width,r=e.height;return n(f,x({fallback:n("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:n(Ln,x({},e))}))},qn=function(e){var t=e.width,r=e.height;return n(f,x({fallback:n("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:n(Wn,x({},e))}))},Gn=function(n){if(!n)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(n)){var e=n.split("-").map(Number);return new Date(e[0],e[1]-1,e[2],12,0,0)}var t=new Date(n);return isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate(),12,0,0)},Vn=function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0)},jn=function(n){if(!n)return new Date;if("string"==typeof n)return Gn(n);if("number"==typeof n){var e=new Date(n);return isNaN(e.getTime())?new Date:Vn(e)}return n instanceof Date?Vn(n):new Date},Kn=function(n){return n?Gn(""+n):new Date},Un=function(e){var t=e.onBlur,r=e.onChange,i=e.open,a=e.setOpen,u=e.value;o(function(){var n=setTimeout(function(){var n=document.querySelector(".st-dropdown-container");n instanceof HTMLElement&&n.focus()},0);return function(){return clearTimeout(n)}},[]);var l=function(){t()};return n(En,x({open:i,onClose:l,setOpen:a,overflow:"hidden",width:240},{children:n(Bn,{value:Kn(u),onChange:function(n){var e=n.toISOString().split("T")[0];r(e),a(!1),t()},onClose:l})}))},_n=function(e){var t=e.onBlur,r=e.onChange,o=e.open,a=e.options,u=e.setOpen,l=i(e.value||""),c=l[0],s=l[1];return n(En,x({open:o,onClose:function(){t()},setOpen:u,width:150},{children:n("div",x({className:"st-enum-dropdown-content"},{children:a.map(function(e){return n(Tn,x({isSelected:c===e.value,onClick:function(){return s(n=e.value),r(n),u(!1),void t();var n}},{children:e.label}),e.value)})}))}))},Jn=function(e){var t=e.enumOptions,r=void 0===t?[]:t,o=e.onChange,i=e.setIsEditing,a=e.type,u=void 0===a?"string":a,l=e.value,c=function(){i(!1)};return"boolean"===u&&"boolean"==typeof l?n(kn,{onBlur:c,onChange:function(n){return o(n)},open:!0,setOpen:i,value:l}):"date"===u?n(Un,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?n(_n,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?n(An,{defaultValue:l,onBlur:c,onChange:function(n){var e=""===n?0:parseFloat(n);o(isNaN(e)?0:e)}}):n(Pn,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},Yn=0,Xn=function(){return function(n){var e=n.callback,t=n.callbackProps,r=n.limit,o=Date.now();0!==Yn&&r>o-Yn||(Yn=o,e(t))}},$n=function(n){var e=a(n);return o(function(){JSON.stringify(e.current)!==JSON.stringify(n)&&(e.current=n)},[n]),e.current},Qn=function(n){if(null===n||"object"!=typeof n)return n;if(Array.isArray(n))return n.map(Qn);var e={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=Qn(n[t]));return e},Zn=function(n,e){return n.filter(function(n){return n.pinned===e}).some(function(n){return!n.hide&&!n.excludeFromRender})};function ne(n){return{pinnedLeft:n.filter(function(n){return"left"===n.pinned}),unpinned:n.filter(function(n){return!n.pinned}),pinnedRight:n.filter(function(n){return"right"===n.pinned})}}function ee(n,e){return!0===n.isEssential||e.has(n.accessor+"")}function te(n,e){for(var t=!1,r=0,o=n;o.length>r;r++){var i=o[r];if(!i.isSelectionColumn&&!i.excludeFromRender){var a=ee(i,e);if(a&&t)return!1;a||(t=!0)}}return!0}function re(n,e){var t,r=ne(n),o=r.unpinned,i=r.pinnedRight;if(!te(r.pinnedLeft,e))return!1;if(!te(o,e))return!1;if(!te(i,e))return!1;for(var a=0,u=n;u.length>a;a++){var l=u[a];if((null===(t=l.children)||void 0===t?void 0:t.length)&&!oe(l.children,e))return!1}return!0}function oe(n,e){var t;if(!te(n,e))return!1;for(var r=0,o=n;o.length>r;r++){var i=o[r];if((null===(t=i.children)||void 0===t?void 0:t.length)&&!oe(i.children,e))return!1}return!0}function ie(n){var e=ne(n),t=e.unpinned,r=e.pinnedRight;return{left:e.pinnedLeft.map(function(n){return n.accessor}),main:t.map(function(n){return n.accessor}),right:r.map(function(n){return n.accessor})}}function ae(n,e,t){var r=n.filter(function(n){return ee(e.get(n+""),t)}),o=n.filter(function(n){return!ee(e.get(n+""),t)});return R(R([],r,!0),o,!0)}function ue(n,e,t){var r=new Set(n.map(function(n){return n.accessor+""})),o=R(R(R([],e.left,!0),e.main,!0),e.right,!0);if(o.length!==r.size)return null;for(var i=0,a=o;a.length>i;i++)if(!r.has(a[i]+""))return null;var u=new Map(n.map(function(n){return[n.accessor+"",n]})),l=ae(e.left,u,t),c=ae(e.main,u,t),s=ae(e.right,u,t),d=function(n,e){var t=x({},n);return"left"===e?t.pinned="left":"right"===e?t.pinned="right":delete t.pinned,t};return R(R(R([],l.map(function(n){return d(u.get(n+""),"left")}),!0),c.map(function(n){return d(u.get(n+""),void 0)}),!0),s.map(function(n){return d(u.get(n+""),"right")}),!0)}function le(n,e,t,r){var o=e+"",i=ie(n),a=i.left.filter(function(n){return n+""!==o}),u=i.main.filter(function(n){return n+""!==o}),l=i.right.filter(function(n){return n+""!==o}),c=n.find(function(n){return n.accessor+""===o});return c&&(!ee(c,r)||"main"!==t||"left"!==c.pinned&&"right"!==c.pinned)?("left"===t?a.push(e):"right"===t?l.push(e):u.push(e),ue(n,{left:a,main:u,right:l},r)):null}var ce=Date.now(),se={screenX:0,screenY:0},de=function(n,e,t){void 0===t&&(t=[]);for(var r=0;n.length>r;r++){var o=n[r];if(o.accessor===e)return R(R([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=de(o.children,e,R(R([],t,!0),[r],!1));if(i)return i}}return null},fe=function(n,e){for(var t=n,r=0;e.length-1>r;r++)t=t[e[r]].children;return t},ve=function(n,e,t){if(1===e.length)return t;for(var r=n,o=0;e.length-2>o;o++)r=r[e[o]].children;return r[e[e.length-2]].children=t,n},he=function(n){return"left"===n.pinned?"left":"right"===n.pinned?"right":"main"};function pe(n,e,t){var r=Qn(n),o=!1;function i(n,e){for(var t=n,r=0;e.length-1>r;r++)t=t[e[r]].children;return t[e[e.length-1]]}function a(n,e,t){for(var r=n,i=0;e.length-1>i;i++){if(!r[e[i]].children){o=!0;break}r=r[e[i]].children}r[e[e.length-1]]=t}var u=i(r,e);return a(r,e,i(r,t)),a(r,t,u),{newHeaders:r,emergencyBreak:o}}var we=function(n){var e=n.draggedHeaderRef,t=n.essentialAccessors,r=n.headers,o=n.hoveredHeaderRef,i=n.onColumnOrderChange,a=n.onTableHeaderDragEnd,u=vn().setHeaders,l=$n(r);return{handleDragStart:function(n){e.current=n,ce=Date.now()},handleDragOver:function(n){var i=n.event,u=n.hoveredHeader;if(i.preventDefault(),r&&e.current){var c=i.currentTarget.getAnimations().some(function(n){return"running"===n.playState}),s=i.screenX,d=i.screenY,f=Math.sqrt(Math.pow(s-se.screenX,2)+Math.pow(d-se.screenY,2));o.current=u;var v,h=e.current,p=!1;if(he(h)===he(u)){var w=r,m=de(w,h.accessor),g=de(w,u.accessor);if(m&&g){var b=m.length,x=g.length,y=g;if(b!==x){var C=x-b;C>0&&(y=g.slice(0,-C))}if((I=m).length===(R=y).length&&(1===I.length||I.slice(0,-1).every(function(n,e){return n===R[e]}))){var I,R,S=pe(w,m,y);v=S.newHeaders,p=S.emergencyBreak;var M=null!=t?t:new Set;if((0>=M.size||p||re(v,M))&&!(c||u.accessor===h.accessor||10>f||JSON.stringify(v)===JSON.stringify(r)||p)){var N=Date.now();JSON.stringify(v)===JSON.stringify(l)&&(1500>N-ce||40>f)||(ce=N,se={screenX:s,screenY:d},a(v))}}}}}},handleDragEnd:function(){e.current=null,o.current=null,setTimeout(function(){u(function(n){return R([],n,!0)}),null==i||i(r)},10)}}},me=function(e){var r=e.checked,o=void 0!==r&&r,i=e.children,a=e.disabled,u=void 0!==a&&a,l=e.onChange,c=e.ariaLabel;return t("label",x({className:"st-checkbox-label".concat(u?" st-checkbox-disabled":"")},{children:[n("input",{checked:o,className:"st-checkbox-input",disabled:u,onChange:function(){!u&&l&&l(!o)},onKeyDown:function(n){" "===n.key&&n.stopPropagation()},type:"checkbox","aria-label":c,"aria-checked":o}),n("span",x({className:"st-checkbox-custom ".concat(o?"st-checked":""),"aria-hidden":"true"},{children:o&&n(In,{className:"st-checkbox-checkmark"})})),i]}))},ge=function(e){var t,r=e.content,o=e.header;return o.valueFormatter?o.valueFormatter({accessor:o.accessor,colIndex:e.colIndex,row:e.row,rowIndex:e.rowIndex,value:r}):"lineAreaChart"===o.type&&Array.isArray(r)?(t=r.filter(function(n){return"number"==typeof n})).length>0?n(zn,x({data:t},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(r)?(t=r.filter(function(n){return"number"==typeof n})).length>0?n(qn,x({data:t},o.chartOptions)):null:"boolean"==typeof r?r?"True":"False":Array.isArray(r)?0===r.length?"[]":r.map(function(n){return"object"==typeof n&&null!==n?JSON.stringify(n):n+""}).join(", "):"date"===o.type&&null!==r&&("string"==typeof r||"number"==typeof r||"object"==typeof r&&r instanceof Date)?jn(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):r},be=r.memo(function(r){var c=r.borderClass,s=r.colIndex,d=r.displayRowNumber,f=r.gridColumnStart,v=r.header,h=r.isHighlighted,p=r.isInitialFocused,w=r.nestedIndex,m=r.parentHeader,g=r.rowIndex,b=r.tableRow,y=vn(),C=y.canExpandRowGroup,I=y.cellRegistry,R=y.cellUpdateFlash,S=y.collapsedRows,M=y.columnBorders,N=y.draggedHeaderRef,H=y.enableRowSelection,E=y.essentialAccessors,T=y.expandedDepths,k=y.expandedRows,P=y.handleMouseDown,A=y.handleMouseOver,F=y.handleRowSelect,D=y.headers,W=y.hoveredHeaderRef,B=y.icons,z=y.isCopyFlashing,q=y.isLoading,K=y.isRowSelected,_=y.isWarningFlashing,Y=y.onCellEdit,X=y.onCellClick,$=y.onRowGroupExpand,Q=y.onTableHeaderDragEnd,Z=y.rowButtons,nn=y.rowGrouping,en=y.setCollapsedRows,tn=y.setExpandedRows,rn=y.setRowStateMap,on=y.rowsWithSelectedCells,an=y.selectedColumns,un=y.tableBodyContainerRef,ln=y.theme,cn=y.useOddColumnBackground,sn=b.depth,dn=b.row,fn=b.rowPath,hn=b.rowIndexPath,pn=b.absoluteRowIndex,wn=b.rowId,mn=i(G(dn,v.accessor)),gn=mn[0],bn=mn[1],xn=i(!1),yn=xn[0],Cn=xn[1],In=i(!1),Rn=In[0],Sn=In[1],Mn=i(!1),Nn=Mn[0],Hn=Mn[1],En=a(null),Tn=U(wn),kn=nn&&nn[sn],Pn=!!kn&&function(n,e){return!!e&&j(n[e])}(dn,kn),An=nn&&nn.length>sn,Fn=!C||C(dn),Dn=!!v.nestedTable,Ln=J(Tn,sn,T,k,S),Wn=z({rowIndex:g,colIndex:s,rowId:Tn}),Bn=_({rowIndex:g,colIndex:s,rowId:Tn}),zn=u(function(){var n,e,t;if(!M)return!1;var r=D.filter(function(n){return"left"===n.pinned}),o=D.filter(function(n){return!n.pinned}),i=D.filter(function(n){return"right"===n.pinned});return"left"===v.pinned?(null===(n=r[r.length-1])||void 0===n?void 0:n.accessor)===v.accessor:"right"===v.pinned?(null===(e=i[i.length-1])||void 0===e?void 0:e.accessor)===v.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===v.accessor},[M,D,v.accessor,v.pinned]),qn=we({draggedHeaderRef:N,essentialAccessors:E,headers:D,hoveredHeaderRef:W,onTableHeaderDragEnd:Q}).handleDragOver,Gn=Xn(),Vn=L({accessor:v.accessor,rowId:Tn}),jn=O({rowId:Tn,accessor:v.accessor}),Kn=v.isSelectionColumn&&H;o(function(){if(I){var n="".concat(Tn,"-").concat(v.accessor);return I.set(n,{updateContent:function(n){gn!==n?(bn(n),R&&(Sn(!0),En.current&&clearTimeout(En.current),En.current=setTimeout(function(){Sn(!1)},800))):bn(n)}}),function(){I.delete(n),En.current&&clearTimeout(En.current)}}},[I,R,Tn,v.accessor,gn]),o(function(){if(Rn){var n=setTimeout(function(){Sn(!1)},850);return function(){return clearTimeout(n)}}},[Rn]),o(function(){bn(G(dn,v.accessor))},[dn,v.accessor]);var Un="boolean"===v.type||"date"===v.type||"enum"===v.type,_n=!!(null==v?void 0:v.isEditable)||!(!X||Kn),Yn=an.has(s),$n=h&&!Yn,Qn=u(function(){return!!Kn&&on.has(Tn+"")},[Kn,on,Tn]),Zn=null==m?void 0:m.singleRowChildren,ne="st-cell ".concat(sn>0&&v.expandable?"st-cell-depth-".concat(sn):""," ").concat($n?p?"st-cell-selected-first ".concat(c):"st-cell-selected ".concat(c):""," ").concat(Yn?p?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(_n?"clickable":""," ").concat(Rn?p?"st-cell-updating-first":"st-cell-updating":""," ").concat(Wn?p?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Bn?p?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(cn?w%2==0?"even-column":"odd-column":""," ").concat(Kn?"st-selection-cell":""," ").concat(Qn?"st-selection-has-highlighted-cell":""," ").concat(zn?"st-last-column":""," ").concat(Zn?"st-sub-cell":""," ").concat(Nn?"hovered":""),ee=null!=f?{gridColumn:f}:void 0,te=l(function(n){null==n&&(n="number"===v.type?0:"boolean"!==v.type&&""),bn(n),V(dn,v.accessor,n),null==Y||Y({accessor:v.accessor,newValue:n,row:dn,rowIndex:g})},[v.accessor,v.type,Y,dn,g]),re=l(function(n){n.stopPropagation();var e=J(Tn,sn,T,k,S),t=Tn+"";if(e?(en(function(n){var e=new Map(n);return e.set(t,sn),e}),tn(function(n){var e=new Map(n);return e.delete(t),e})):(tn(function(n){var e=new Map(n);return e.set(t,sn),e}),en(function(n){var e=new Map(n);return e.delete(t),e})),e&&rn(function(n){var e=new Map(n);return e.delete(Tn),e}),$){var r=v.pinned;$({depth:sn,event:n,groupingKey:kn,groupingKeys:nn||[],isExpanded:!e,row:dn,rowIndexPath:hn||[],rowIdPath:fn,setEmpty:function(n,e){rn(function(t){var o=new Map(t),i=o.get(Tn)||{};return o.set(Tn,x(x({},i),{isEmpty:n,emptyMessage:e,loading:!1,error:null,triggerSection:r})),o})},setError:function(n){rn(function(e){var t=new Map(e),o=t.get(Tn)||{};return t.set(Tn,x(x({},o),{error:n,loading:!1,isEmpty:!1,triggerSection:r})),t})},setLoading:function(n){n?rn(function(n){var e=new Map(n),t=e.get(Tn)||{};return e.set(Tn,x(x({},t),{loading:!0,error:null,isEmpty:!1,triggerSection:r})),e}):setTimeout(function(){rn(function(n){var e=new Map(n),t=e.get(Tn)||{};return e.set(Tn,x(x({},t),{loading:!1,error:null,isEmpty:!1,triggerSection:r})),e})},0)}})}},[S,kn,sn,T,k,v.pinned,$,dn,nn,Tn,hn,fn,en,tn,rn]);return q||b.isLoadingSkeleton?n("div",x({className:ne,style:ee},{children:n("span",x({className:"st-cell-content ".concat("right"===v.align?"right-aligned":"center"===v.align?"center-aligned":"left-aligned")},{children:n("div",{className:"st-loading-skeleton"})}))})):!yn||Un||Kn?t(On,x({className:ne,"data-accessor":v.accessor,"data-col-index":s,"data-row-id":Tn,"data-row-index":g,role:"gridcell","aria-colindex":s+1,id:Vn,onClick:function(){X&&!Kn&&X({accessor:v.accessor,colIndex:s,row:dn,rowIndex:g,value:gn})},onDoubleClick:function(){return v.isEditable&&!Kn&&Cn(!0)},onDragOver:function(n){Kn||Gn({callback:qn,callbackProps:{event:n,hoveredHeader:v},limit:50})},onKeyDown:function(n){yn||Kn||"F2"!==n.key&&"Enter"!==n.key||!v.isEditable||yn||(n.preventDefault(),Cn(!0))},onMouseDown:function(n){yn||Kn||(n.preventDefault(),P({rowIndex:g,colIndex:s,rowId:Tn}))},onMouseEnter:function(){Hn(!0)},onMouseLeave:function(){Hn(!1)},onMouseOver:function(){yn||Kn||A({rowIndex:g,colIndex:s,rowId:Tn})},parentRef:un,style:ee,tableRow:b},{children:[v.expandable&&An?n("div",x({className:"st-icon-container st-expand-icon-container ".concat(Fn&&(Pn||$||Dn)?Ln?"expanded":"collapsed":"placeholder"),onClick:Fn&&(Pn||$||Dn)?function(n){return re(n)}:void 0,role:Fn&&(Pn||$||Dn)?"button":"presentation",tabIndex:Fn&&(Pn||$||Dn)?0:-1,"aria-label":Fn&&(Pn||$||Dn)?"".concat(Ln?"Collapse":"Expand"," row group"):void 0,"aria-expanded":Fn&&(Pn||$||Dn)?Ln:void 0,"aria-hidden":!(Fn&&(Pn||$||Dn)),onKeyDown:Fn&&(Pn||$||Dn)?function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),re(n))}:void 0},{children:B.expand})):null,n("span",x({className:"st-cell-content ".concat("right"===v.align?"right-aligned":"center"===v.align?"center-aligned":"left-aligned")},{children:q||b.isLoadingSkeleton?n("div",{className:"st-loading-skeleton"}):n(e,{children:Kn?t("div",x({className:"st-selection-cell-content"},{children:[n("div",x({className:"st-selection-control"},{children:Nn||K&&K(Tn+"")?n(me,{checked:!!K&&K(Tn+""),onChange:function(n){F&&F(Tn+"",n)},ariaLabel:"Select row ".concat(d+1)}):n("span",x({className:"st-row-number"},{children:d+1}))})),function(){if(!Z||!Kn||0===Z.length)return null;if(!(Nn||K&&K(Tn+"")))return null;var e={row:dn,rowIndex:d};return n("div",x({className:"st-row-buttons",role:"group","aria-label":"Actions for row ".concat(d+1)},{children:Z.map(function(t,r){return n("span",x({className:"st-row-button"},{children:t(e)}),r)})}))}()]})):v.cellRenderer?function(){var n;return v.cellRenderer({accessor:v.accessor,colIndex:s,row:dn,rowIndex:pn,rowPath:fn,theme:ln,value:gn,formattedValue:null===(n=null==v?void 0:v.valueFormatter)||void 0===n?void 0:n.call(v,{accessor:v.accessor,colIndex:s,row:dn,rowIndex:g,value:gn})})}():ge({content:gn,header:v,colIndex:s,row:dn,rowIndex:g})})})),!q&&!b.isLoadingSkeleton&&yn&&Un&&!Kn&&n(Jn,{enumOptions:v.enumOptions,onChange:te,setIsEditing:Cn,type:v.type,value:gn})]}),jn):n("div",x({className:"st-cell-editing",id:L({accessor:v.accessor,rowId:Tn}),style:ee,onMouseDown:function(n){return n.stopPropagation()},onKeyDown:function(n){return n.stopPropagation()}},{children:n(Jn,{enumOptions:v.enumOptions,onChange:te,setIsEditing:Cn,type:v.type,value:gn})}))},function(n,e){if(n.rowIndex!==e.rowIndex||n.colIndex!==e.colIndex||n.isHighlighted!==e.isHighlighted||n.isInitialFocused!==e.isInitialFocused||n.borderClass!==e.borderClass)return!1;if(n.tableRow!==e.tableRow){if(n.tableRow.row!==e.tableRow.row)return!1;if(n.tableRow.position!==e.tableRow.position||n.tableRow.displayPosition!==e.tableRow.displayPosition)return!1}return(n.header===e.header||n.header.accessor===e.header.accessor&&n.header.isEditable===e.header.isEditable&&n.header.type===e.header.type&&n.header.cellRenderer===e.header.cellRenderer&&n.header.valueFormatter===e.header.valueFormatter)&&n.parentHeader===e.parentHeader&&n.displayRowNumber===e.displayRowNumber&&n.nestedIndex===e.nestedIndex&&n.gridColumnStart===e.gridColumnStart}),xe=function(n,e){return!n||n.visibleAccessors.has(e)},ye=function(n,e){if(n){var t=n.trackIndexByAccessor.get(e);return void 0===t?void 0:t+1}},Ce=function(e){var r=e.columnIndices,o=e.columnWindow,i=e.displayRowNumber,a=e.header,u=e.headers,l=e.nestedIndex,c=e.parentHeader,s=e.pinned,d=e.rootPinned,f=e.rowIndex,h=e.rowIndices,p=e.tableRow,w=r[a.accessor],m=vn(),g=m.getBorderClass,b=m.isSelected,x=m.isInitialFocusedCell,y=m.collapsedHeaders,C=U(p.rowId);if(a.children&&a.children.length>0){var I=a.children.filter(function(n){return W({header:n,pinned:s,headers:u,collapsedHeaders:y,rootPinned:d})});if(a.singleRowChildren){var R=xe(o,a.accessor),S={rowIndex:f,colIndex:w,rowId:C},M=g(S),N=b(S),H=x(S),E=L({accessor:a.accessor,rowId:C});return t(v,{children:[R&&n(be,{borderClass:M,colIndex:w,displayRowNumber:i,gridColumnStart:ye(o,a.accessor),header:a,isHighlighted:N,isInitialFocused:H,nestedIndex:l,parentHeader:c,rowIndex:f,tableRow:p},E),I.map(function(e){var t=L({accessor:e.accessor,rowId:C});return n(Ce,{columnIndices:r,columnWindow:o,displayRowNumber:i,rootPinned:d,header:e,headers:u,nestedIndex:l,parentHeader:a,pinned:s,rowIndex:f,rowIndices:h,tableRow:p},t)})]})}return n(v,{children:I.map(function(e){var t=L({accessor:e.accessor,rowId:C});return n(Ce,{columnIndices:r,columnWindow:o,displayRowNumber:i,rootPinned:d,header:e,headers:u,nestedIndex:l,parentHeader:a,pinned:s,rowIndex:f,rowIndices:h,tableRow:p},t)})})}if(!xe(o,a.accessor))return null;var T={rowIndex:f,colIndex:w,rowId:C},k=g(T),P=b(T),A=x(T),F=L({accessor:a.accessor,rowId:C});return n(be,{borderClass:k,colIndex:w,displayRowNumber:i,gridColumnStart:ye(o,a.accessor),header:a,isHighlighted:P,isInitialFocused:A,nestedIndex:l,parentHeader:c,rowIndex:f,tableRow:p},F)},Ie=r.memo(function(t){var r=t.columnIndexStart,o=t.columnIndices,i=t.columnWindow,a=t.headers,u=t.pinned,l=t.rowIndex,c=t.displayRowNumber,s=t.rowIndices,d=t.tableRow,f=vn().collapsedHeaders,v=a.filter(function(n){return W({header:n,pinned:u,headers:a,collapsedHeaders:f,rootPinned:n.pinned})});return n(e,{children:v.map(function(e,t){var f=t+(null!=r?r:0);if(i&&!function(n){return!(!n.children||0>=n.children.length)}(e)&&!xe(i,e.accessor))return null;var v=U(d.rowId),h=L({accessor:e.accessor,rowId:v});return n(Ce,{columnIndices:o,columnWindow:i,displayRowNumber:c,rootPinned:e.pinned,header:e,headers:a,nestedIndex:f,pinned:u,rowIndex:l,rowIndices:s,tableRow:d},h)})})},function(n,e){return n.rowIndex===e.rowIndex&&n.displayRowNumber===e.displayRowNumber&&n.columnIndexStart===e.columnIndexStart&&(n.tableRow===e.tableRow||n.tableRow.row===e.tableRow.row)&&n.pinned===e.pinned&&n.headers===e.headers&&n.columnIndices===e.columnIndices&&n.columnWindow===e.columnWindow}),Re=function(e){var t=e.rowState,r=e.loadingStateRenderer,o=e.errorStateRenderer,i=e.emptyStateRenderer,a=null;return t.loading&&r?a=r:t.error&&o?a=o:t.isEmpty&&i&&(a=i),a?n("div",x({className:"st-cell st-state-row-cell",style:{gridColumn:"1 / -1",padding:0}},{children:a})):null},Se=function(e){var t=e.calculatedHeight,r=e.childAccessor,o=e.depth,i=e.expandableHeader,a=e.index,u=e.parentRow,l=e.position,c=vn(),s=c.theme,d=c.rowGrouping,f=c.rowHeight,v=c.heightOffsets,h=c.customTheme,p=c.loadingStateRenderer,w=c.errorStateRenderer,m=c.emptyStateRenderer,g=c.icons,b=i.nestedTable;if(!b)return null;var y=G(u,r),C=Array.isArray(y)?y:[],I=d&&d[o+1]?null==d?void 0:d.slice(o+1):void 0,R=b.customTheme?x(x({},h),b.customTheme):h,S=function(n){var e=n.calculatedHeight,t=n.customHeight,r=n.customTheme;return t?"string"==typeof t?t:"".concat(t,"px"):"".concat(e-r.nestedGridPaddingTop-r.nestedGridPaddingBottom,"px")}({calculatedHeight:t,customHeight:b.height,customTheme:h}),M=z({calculatedHeight:t,customHeight:b.height,customTheme:h});return n("div",x({className:"st-row st-nested-grid-row","data-index":a,style:{transform:"translate3d(0, ".concat(on({position:l,rowHeight:f,heightOffsets:v,customTheme:h}),"px, 0)"),height:"".concat(M,"px"),paddingTop:"".concat(h.nestedGridPaddingTop,"px"),paddingBottom:"".concat(h.nestedGridPaddingBottom,"px")}},{children:n(Xt,x({},b,{rows:C,theme:s,customTheme:R,height:S,rowGrouping:I,loadingStateRenderer:p,errorStateRenderer:w,emptyStateRenderer:m,icons:g}))}))},Me=r.memo(function(e){var t=e.columnIndices,r=e.columnIndexStart,o=e.columnWindow,i=e.gridTemplateColumns,a=e.headers,u=e.index,l=e.pinned,c=e.rowHeight,s=e.rowIndices,d=e.setHoveredIndex,f=e.tableRow,v=e.isSticky,h=void 0!==v&&v,p=e.stickyIndex,w=void 0===p?0:p,m=e.stickyOffset,g=void 0===m?0:m,b=e.stickyZIndex,y=vn(),C=y.customTheme,I=y.emptyStateRenderer,R=y.errorStateRenderer,S=y.heightOffsets,M=y.isAnimating,N=y.isRowSelected,H=y.loadingStateRenderer,E=y.maxHeaderDepth,T=y.useHoverRowBackground,k=y.useOddEvenRowBackground,P=f.position,A=f.displayPosition,F=f.stateIndicator,D=f.nestedTable;if(D)return l?n("div",{className:"st-row st-nested-grid-spacer","data-index":u,style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),"px, 0)"),height:"".concat(D.calculatedHeight,"px")}}):n(Se,{calculatedHeight:D.calculatedHeight,childAccessor:D.childAccessor,depth:f.depth-1,expandableHeader:D.expandableHeader,index:u,parentRow:D.parentRow,position:P});if(F)return n("div",F.state.triggerSection===l&&(F.state.loading&&H||F.state.error&&R||F.state.isEmpty&&I)?x({className:"st-row st-state-row","data-index":u,style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),"px, 0)"),height:"".concat(c,"px")}},{children:n(Re,{parentRow:F.parentRow,rowState:F.state,gridTemplateColumns:i,loadingStateRenderer:H,errorStateRenderer:R,emptyStateRenderer:I})}):{className:"st-row st-state-row-spacer","data-index":u,style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),"px, 0)"),height:"".concat(c,"px")}});var L=P%2==0,W=U(f.rowId),O=!!N&&N(W),B=h?{gridTemplateColumns:i,transform:"translateY(".concat(w*(c+1)+g,"px)"),height:"".concat(c,"px"),position:"absolute",top:0,left:0,zIndex:b}:{gridTemplateColumns:i,top:on({position:P,rowHeight:c,heightOffsets:S,customTheme:C}),height:"".concat(c,"px")};return n("div",x({className:"st-row ".concat(h?"st-sticky-parent":""," ").concat(k?L?"even":"odd":""," ").concat(O?"selected":""),"data-index":P,role:"row","aria-rowindex":P+E+1,onMouseEnter:function(){!M&&T&&d(P)},style:B},{children:n(Ie,{columnIndexStart:r,columnIndices:t,columnWindow:o,displayRowNumber:A,headers:a,pinned:l,rowIndex:P,rowIndices:s,tableRow:f},W)}))},function(n,e){return!((e.tableRow.nestedTable||e.tableRow.stateIndicator)&&n.index!==e.index)&&n.tableRow.position===e.tableRow.position&&n.tableRow.displayPosition===e.tableRow.displayPosition&&n.tableRow.row===e.tableRow.row&&n.tableRow.stateIndicator===e.tableRow.stateIndicator&&n.rowHeight===e.rowHeight&&n.gridTemplateColumns===e.gridTemplateColumns&&n.pinned===e.pinned&&n.headers===e.headers&&n.columnIndices===e.columnIndices&&n.columnWindow===e.columnWindow&&n.columnIndexStart===e.columnIndexStart}),Ne=function(e){var t=e.displayStrongBorder,r=e.position,o=e.rowHeight,i=e.templateColumns,u=e.isSticky,l=void 0!==u&&u,c=vn(),s=c.heightOffsets,d=c.customTheme,f=a(null),v=l?r:function(n){var e=n.position,t=n.customTheme;return e*(n.rowHeight+t.rowSeparatorWidth)-t.rowSeparatorWidth+tn(e,n.heightOffsets)}({position:r,rowHeight:o,heightOffsets:s,customTheme:d}),h=l?{position:"absolute",top:0,left:0,transform:"translateY(".concat(v,"px)")}:{transform:"translate3d(0, ".concat(v,"px, 0)")};return n("div",x({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(n){n.preventDefault();var e=n.currentTarget,t=e.style.pointerEvents;e.style.pointerEvents="none";var r=document.elementFromPoint(n.clientX,n.clientY);if(e.style.pointerEvents=t,r){var o=r.closest(".st-cell");if(o instanceof HTMLElement){f.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:n.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(n){if(f.current){var e=f.current.getBoundingClientRect(),t=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:n.clientX,clientY:e.top+e.height/2});f.current.dispatchEvent(t),f.current=null}},style:x({gridTemplateColumns:i},h)},{children:n("div",{style:{gridColumn:"1 / -1"}})}))},He=c(void 0),Ee=function(n){var e=n.childRef,t=n.children,r=n.group,i=void 0===r?"default":r,a=function(){var n=s(He);if(!n)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return n}(),u=a.registerPane,l=a.unregisterPane;return o(function(){var n=[i];return e.current&&u(e.current,n),function(){e.current&&l(e.current,n)}},[e,u,l,i]),h(t,{ref:function(n){e.current=n}})},Te=p(function(e,r){var o=e.columnIndexStart,i=e.columnIndices,l=e.columnWindow,c=e.headers,s=e.pinned,d=e.rowHeight,f=e.rowIndices,h=e.setHoveredIndex,p=e.templateColumns,m=e.totalHeight,g=e.width,b=e.regularRows,y=s?"st-body-pinned-".concat(s):"st-body-main",C=a(null);return w(r,function(){return C.current},[]),u(function(){return Zn(c,s)},[c,s])?n(Ee,x({childRef:C,group:s?"pinned-".concat(s):"default"},{children:n("div",x({className:y,ref:C,style:x({position:"relative",height:"".concat(m,"px"),width:g},!s&&{flexGrow:1})},{children:b.map(function(e,r){var a=e.stateIndicator?"state-".concat(e.stateIndicator.parentRowId,"-").concat(e.position):U(e.rowId);return t(v,{children:[0!==r&&n(Ne,{displayStrongBorder:e.isLastGroupRow,position:e.position,rowHeight:d,templateColumns:p}),n(Me,{columnIndexStart:o,columnIndices:i,columnWindow:l,gridTemplateColumns:p,headers:c,index:r,pinned:s,rowHeight:d,rowIndices:f,setHoveredIndex:h,tableRow:e})]},a)})}))})):null});function ke(n){var e=n.headers,t=n.pinnedLeftColumns,r=n.pinnedRightColumns,o=n.collapsedHeaders,i={},a=0,u=R(R(R([],t,!0),e,!0),r,!0),l=function(n,e,t){void 0===e&&(e=!1),e||a++,i[n.accessor]=a,n.children&&n.children.length>0&&n.children.filter(function(n){return W({header:n,pinned:t,headers:u,collapsedHeaders:o,rootPinned:t})}).forEach(function(e,r){l(e,!n.singleRowChildren&&0===r,t)})};return t.forEach(function(n,e){l(n,0===e,n.pinned)}),e.filter(function(n){return!n.pinned&&W({header:n,pinned:void 0,headers:u,collapsedHeaders:o,rootPinned:n.pinned})}).forEach(function(n,e){l(n,0===e&&0===t.length,n.pinned)}),r.forEach(function(n){l(n,!1,n.pinned)}),i}Te.displayName="TableSection";var Pe=function(e){var r=e.calculatedHeaderHeight,o=e.stickyParents,i=e.mainTemplateColumns,l=e.pinnedLeftColumns,c=e.pinnedLeftTemplateColumns,s=e.pinnedLeftWidth,d=e.pinnedRightColumns,f=e.pinnedRightTemplateColumns,h=e.pinnedRightWidth,p=e.setHoveredIndex,w=e.rowIndices,m=e.scrollbarWidth,g=e.scrollTop,b=e.heightMap,y=e.partiallyVisibleRows,C=vn(),I=C.collapsedHeaders,R=C.customTheme,S=C.editColumns,M=C.headers,H=C.rowHeight,E=a(null),T=a(null),k=a(null),P=u(function(){var n,e;if(0===o.length)return{treeTransitionOffset:0,offsetStartIndex:-1};var t,r=y[0];if((null==r?void 0:r.parentIndices)&&r.parentIndices.length>0)for(var i=function(n){var e=r.parentIndices[n];if(o.some(function(n){return n.position===e}))return t=e,"break"},a=r.parentIndices.length-1;a>=0&&"break"!==i(a);a--);var u=void 0!==t?o.findIndex(function(n){return n.position===t}):-1,l=-1,c=function(n){var e=o[n],t=o[n+1];return t?t.depth===e.depth?(l=n,"break"):e.depth>t.depth?(l=o.findIndex(function(n){return n.depth===e.depth}),"break"):void 0:"break"};for(a=0;o.length>a&&"break"!==c(a);a++);if(-1===l)return{treeTransitionOffset:0,offsetStartIndex:u};var s=null===(n=o[l])||void 0===n?void 0:n.position;if(void 0===s)return{treeTransitionOffset:0,offsetStartIndex:u};for(var d=0,f=0,v=y;v.length>f&&(null===(e=v[f].parentIndices)||void 0===e?void 0:e.includes(s));f++)d++;if(0===d)return{treeTransitionOffset:0,offsetStartIndex:u};var h=y[0];return{treeTransitionOffset:-((l+1-d)*H+Math.max(0,g-(b?b.rowTopPositions[h.position]:h.position*(H+R.rowSeparatorWidth)))),offsetStartIndex:u}},[R,b,y,H,g,o]),A=P.treeTransitionOffset,F=P.offsetStartIndex,D=u(function(){return ke({headers:M,pinnedLeftColumns:l,pinnedRightColumns:d,collapsedHeaders:I})},[M,l,d,I]),L=o.length>0?o.length*(H+1)+A:0;if(0===o.length)return null;var W=function(e,r,i,a,u,l){return void 0===u&&(u=0),n("div",x({className:i?"st-sticky-section-".concat(i):"st-sticky-section-main",ref:l,style:{position:"relative",height:"".concat(L,"px"),width:i?"".concat(a,"px"):void 0,flexGrow:i?0:1,flexShrink:i?0:void 0}},{children:o.map(function(a,l){var c=a.stateIndicator?"sticky-state-".concat(a.stateIndicator.parentRowId,"-").concat(a.position):"sticky-".concat(U(a.rowId)),s=-1!==F&&l>=F,d=s?A:0,f=(l+1)*(H+1)-1+d;return t(v,{children:[n(Me,{columnIndexStart:u,columnIndices:D,gridTemplateColumns:e,headers:r,index:a.position,pinned:i,rowHeight:H,rowIndices:w,setHoveredIndex:p,tableRow:a,isSticky:!0,stickyIndex:l,stickyOffset:d,stickyZIndex:s?l:o.length-l}),n(Ne,{displayStrongBorder:!1,position:f,rowHeight:H,templateColumns:e,isSticky:!0})]},c)})}))},O=M.filter(function(n){return!n.pinned}),B="calc(100% - ".concat(m,"px - ").concat(S?"".concat(N,"px"):"0px",")");return t("div",x({className:"st-sticky-top",style:{height:"".concat(L,"px"),width:B,top:"".concat(r,"px")}},{children:[l.length>0&&n(Ee,x({childRef:E,group:"pinned-left"},{children:W(c,l,"left",s,0,E)})),n(Ee,x({childRef:T,group:"default"},{children:W(i,O,void 0,void 0,l.length,T)})),d.length>0&&n(Ee,x({childRef:k,group:"pinned-right"},{children:W(f,d,"right",h,l.length+O.length,k)}))]}))},Ae=function(n){var e=n.collapsedHeaders,t=function(n){var r=n.flattenedHeaders;return n.headers.forEach(function(n){if(!n.hide&&!n.excludeFromRender)if(n.children&&n.children.length>0)if(e&&e.has(n.accessor)){var o=n.children.filter(function(n){var e=n.showWhen||k;return"parentCollapsed"===e||"always"===e});n.singleRowChildren&&r.push(n),o.length>0?t({headers:o,flattenedHeaders:r}):n.singleRowChildren||r.push(n)}else{var i=n.children.filter(function(n){var e=n.showWhen||k;return"parentExpanded"===e||"always"===e});n.singleRowChildren&&r.push(n),t({headers:i,flattenedHeaders:r})}else r.push(n)}),r};return t({headers:n.headers,flattenedHeaders:[]})},Fe=function(n){var e=n.autoExpandColumns,t=Ae({headers:n.headers,collapsedHeaders:n.collapsedHeaders});return"".concat(t.map(function(n){return function(n,e){var t=n.minWidth,r=n.width;return"number"==typeof r&&(r="".concat(r,"px")),t&&"number"==typeof t&&(t="".concat(t,"px")),void 0===t||e?r:"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(t,", ").concat(r,")"):"max(".concat(t,", ").concat(r,")")}(n,e)}).join(" "))},De=function(n){var e=n.width,t=n.minWidth;if("number"==typeof e)return e;if("string"==typeof e){var r,o=e.trim();if(o.endsWith("px")&&!Number.isNaN(r=parseFloat(o)))return r}return"number"==typeof t?t:"string"==typeof t&&t.trim().endsWith("px")&&!Number.isNaN(r=parseFloat(t))?r:150},Le=function(n,e){var t=e.columnLeftPositions;if(0===t.length)return 0;if(0>=n)return 0;if(n>=e.totalWidth)return t.length-1;for(var r=0,o=t.length-1;o>r;){var i=Math.floor((r+o+1)/2);t[i]>n?o=i-1:r=i}return r},We=function(r){var c=r.calculatedHeaderHeight,s=r.mainTemplateColumns,d=r.pinnedLeftColumns,f=r.pinnedLeftTemplateColumns,v=r.pinnedLeftWidth,h=r.pinnedRightColumns,p=r.pinnedRightTemplateColumns,w=r.pinnedRightWidth,g=r.rowsToRender,b=r.setScrollTop,y=r.setScrollDirection,C=r.shouldShowEmptyState,I=r.tableRows,R=r.stickyParents,S=r.regularRows,M=r.partiallyVisibleRows,N=r.heightMap,H=vn(),E=H.collapsedHeaders,T=H.headerContainerRef,k=H.headers,P=H.heightOffsets,A=H.isAnimating,F=H.mainBodyRef,D=H.onLoadMore,L=H.rowHeight,W=H.scrollbarWidth,O=H.shouldPaginate,B=H.tableBodyContainerRef,z=H.tableEmptyStateRenderer,q=H.customTheme,G=wn().setIsScrolling,V=i(!1),j=V[0],K=V[1],_=i(0),J=_[0],Y=_[1],X=a(new Set),$=l(function(n){if(document.querySelectorAll(".st-row.hovered").forEach(function(n){n.classList.remove("hovered")}),X.current.clear(),null!==n&&B.current){var e=B.current,t='.st-row[data-index="'.concat(n,'"]:not(.st-nested-grid-row)');e.querySelectorAll(t).forEach(function(n){var t=n;t.closest(".st-body-container")===e&&(t.classList.add("hovered"),X.current.add(t))});var r=e.previousElementSibling;r&&r.classList.contains("st-sticky-top")&&r.querySelectorAll(t).forEach(function(n){var e=n;e.classList.add("hovered"),X.current.add(e)})}},[B]);o(function(){A&&$(null)},[A,$]),Hn({headerContainerRef:T,mainSectionRef:B,scrollbarWidth:W}),o(function(){return function(){Z.current&&clearTimeout(Z.current)}},[]);var Q=a(null),Z=a(null),nn=a(0),en=function(n){return n.length}(I),tn=u(function(){return function(n,e,t,r){return n*(e+r.rowSeparatorWidth)-r.rowSeparatorWidth+((null==t?void 0:t.reduce(function(n,e){return n+e[1]},0))||0)}(en,L,P,q)},[en,L,P,q]),rn=u(function(){return ke({headers:k,pinnedLeftColumns:d,pinnedRightColumns:h,collapsedHeaders:E})},[k,d,h,E]),on=u(function(){return Zn(k,"left")||Zn(k,void 0)||Zn(k,"right")},[k]),an=u(function(){return on?void 0:{minHeight:tn}},[on,tn]),un=u(function(){var n={};return g.forEach(function(e,t){var r=U(e.rowId);n[r]=t}),n},[g]),ln=u(function(){return k.filter(function(n){return!n.pinned})},[k]),cn=i({scrollLeft:0,width:0,direction:"none"}),sn=cn[0],dn=cn[1],fn=a(null),hn=a(null),pn=a(0);m(function(){var n=F.current;if(n){var e=function(e){var t=n.scrollLeft,r=n.clientWidth,o=pn.current,i=t>o?"right":o>t?"left":"none";pn.current=t,dn(function(n){var o=e?r:n.width;return n.scrollLeft===t&&n.width===o&&n.direction===i?n:{scrollLeft:t,width:o,direction:i}})};e(!0);var t=function(){null===fn.current&&(fn.current=requestAnimationFrame(function(){fn.current=null,e(!0)}))};n.addEventListener("scroll",t,{passive:!0});var r="undefined"!=typeof ResizeObserver?new ResizeObserver(function(){null!==hn.current&&clearTimeout(hn.current),hn.current=setTimeout(function(){hn.current=null,e(!0)},150),null===fn.current&&(fn.current=requestAnimationFrame(function(){fn.current=null,e(!1)}))}):null;return null==r||r.observe(n),function(){n.removeEventListener("scroll",t),null==r||r.disconnect(),null!==fn.current&&(cancelAnimationFrame(fn.current),fn.current=null),null!==hn.current&&(clearTimeout(hn.current),hn.current=null)}}},[F,C]);var mn=u(function(){return function(n){var e=n.scrollLeft,t=n.viewportWidth,r=n.bufferColumnCount,o=n.scrollDirection;if(n.pinned)return null;var i=function(n){for(var e=Ae({headers:n.headers,collapsedHeaders:n.collapsedHeaders}),t=Array(e.length),r=0,o=0;e.length>o;o++)t[o]=r,r+=De(e[o]);return{columnLeftPositions:t,totalWidth:r,leafHeaders:e}}({headers:n.headers,collapsedHeaders:n.collapsedHeaders}),a=new Map;if(i.leafHeaders.forEach(function(n,e){a.set(n.accessor,e)}),0>=t)return{visibleAccessors:new Set(i.leafHeaders.map(function(n){return n.accessor})),trackIndexByAccessor:a};var u=function(n){var e=n.scrollLeft,t=n.viewportWidth,r=n.scrollDirection,o=void 0===r?"none":r,i=n.widthMap,a=i.leafHeaders;if(0===a.length)return{startIndex:0,endIndex:0,columns:[]};var u=a.length>0?i.totalWidth/a.length:150,l=n.bufferColumnCount*u,c=l,s=l;"right"===o?(c=Math.max(u,.1*l),s=.9*l):"left"===o&&(c=.9*l,s=Math.max(u,.1*l));var d=e+t+s,f=Le(Math.max(0,e-c),i),v=Le(d,i)+1;return{startIndex:f,endIndex:v=Math.min(a.length,v),columns:a.slice(f,v)}}({scrollLeft:e,viewportWidth:t,bufferColumnCount:r,scrollDirection:o,widthMap:i}).columns;return{visibleAccessors:new Set(u.map(function(n){return n.accessor})),trackIndexByAccessor:a}}({headers:ln,collapsedHeaders:E,scrollLeft:sn.scrollLeft,viewportWidth:sn.width,bufferColumnCount:3,scrollDirection:sn.direction,pinned:void 0})},[ln,E,sn]),gn=l(function(n,e){!D||O||j||200>=n.scrollHeight-(e+n.clientHeight)&&e>nn.current&&(K(!0),D(),setTimeout(function(){K(!1)},1e3))},[D,O,j]),bn={columnIndices:rn,headerContainerRef:T,headers:k,rowHeight:L,rowIndices:un,rowsToRender:g,setHoveredIndex:$,regularRows:S};return t(e,{children:[!C&&n(Pe,{calculatedHeaderHeight:c,heightMap:N,mainTemplateColumns:s,partiallyVisibleRows:M,pinnedLeftColumns:d,pinnedLeftTemplateColumns:f,pinnedLeftWidth:v,pinnedRightColumns:h,pinnedRightTemplateColumns:p,pinnedRightWidth:w,rowIndices:un,scrollTop:J,scrollbarWidth:W,setHoveredIndex:$,stickyParents:R}),n("div",x({className:"st-body-container",onMouseLeave:function(){return $(null)},onScroll:function(n){var e=n.currentTarget,t=e.scrollTop;G(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(function(){G(!1)},150),Q.current&&cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(function(){var n=nn.current,r=t>n?"down":n>t?"up":"none";b(t),y(r),Y(t),gn(e,t),nn.current=t})},ref:B,style:an},{children:C?n("div",x({className:"st-empty-state-wrapper"},{children:z})):t(e,{children:[n(Te,x({},bn,{pinned:"left",templateColumns:f,totalHeight:tn,width:v})),n(Te,x({},bn,{columnIndexStart:d.length,columnWindow:mn,ref:F,templateColumns:s,totalHeight:tn})),n(Te,x({},bn,{columnIndexStart:d.length+s.length,pinned:"right",templateColumns:p,totalHeight:tn,width:w}))]})}))]})},Oe=function(n,e){if(n.pinned)return n.pinned;var t=D(e,n.accessor);return t?Oe(t,e):void 0},Be=function(n){var e=n.autoExpandColumns,t=n.collapsedHeaders,r=n.containerWidth,o=n.event,i=n.header,a=n.headers,u=n.onColumnWidthChange,l=n.reverse,c=void 0!==l&&l,s=n.setHeaders,d=n.setIsResizing,f=n.startWidth;o.preventDefault();var v="clientX"in o?o.clientX:o.touches[0].clientX,h="touches"in o;if(i&&!i.hide){d(!0);var p,w=Oe(i,a),m=Z(i);if(i.children&&i.children.length>0){var g=X(i,t);p=g.length>0?g:[i]}else p=[i];var b=new Map,x=0;if(e){var y=a.filter(function(n){return n.pinned===w});if(nn(y,t).forEach(function(n){var e=$(n);b.set(n.accessor,e)}),r>0){var C=qe({headers:a,containerWidth:r,collapsedHeaders:t}),I=C.leftWidth,S=C.rightWidth;x="left"===w?I:"right"===w?S:Math.max(0,r-I-S)}}var M=function(n){var o="right"===w?v-n:n-v;if(e){var u=a.filter(function(n){return n.pinned===w});Ve({delta:o,startWidth:f,resizedHeader:p.length>0?p[p.length-1]:i,sectionHeaders:u,rootPinned:w,reverse:c,collapsedHeaders:t,initialWidthsMap:b,sectionWidth:x,isParentResize:p.length>1,childrenToResize:p,headers:a,containerWidth:r})}else{var l=function(n){var e=n.header,t=n.headers,r=n.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth;if(!e.pinned)return 1/0;var a=t.some(function(n){return"left"===n.pinned&&!n.hide}),u=t.some(function(n){return"right"===n.pinned&&!n.hide}),l=i*T(i,a,u)-t.filter(function(n){return n.pinned===e.pinned&&n.accessor!==e.accessor}).reduce(function(n,e){return e.hide?n:n+X(e,r).reduce(function(n,e){return n+$(e)},0)},0),c=Z(e);return c>l?(console.warn("Header ".concat(e.accessor," exceeds pinned section width limit")),c):l}({header:i,headers:a,collapsedHeaders:t});p.length>1?ze({delta:o,leafHeaders:p,minWidth:m,startWidth:f,maxWidth:l}):p[0].width=Math.max(Math.min(f+o,l),m),a.forEach(function(n){Q(n)})}var d=R([],a,!0);s(d)};if(h){var N=function(n){M(n.touches[0].clientX)},H=function(){document.removeEventListener("touchmove",N),document.removeEventListener("touchend",H),d(!1),u&&u(R([],a,!0))};document.addEventListener("touchmove",N),document.addEventListener("touchend",H)}else{var E=function(n){M(n.clientX)},k=function(){document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",k),d(!1),u&&u(R([],a,!0))};document.addEventListener("mousemove",E),document.addEventListener("mouseup",k)}}},ze=function(n){var e=n.delta,t=n.leafHeaders,r=n.minWidth,o=n.startWidth,i=n.maxWidth,a=t.reduce(function(n,e){return Math.min(n,Z(e))},40),u=t.reduce(function(n,e){return n+("number"==typeof e.width?e.width:150)},0),l=Math.max(Math.min(o+e,i),a)-u;t.forEach(function(n){var e="number"==typeof n.width?n.width:150;n.width=Math.max(e+l*(e/u),r)})},qe=function(n){var e=n.containerWidth,t=n.collapsedHeaders,r=0,o=0,i=0;n.headers.forEach(function(n){if(!n.hide){var e=X(n,t).reduce(function(n,e){return n+$(e)},0);"left"===n.pinned?r+=e:"right"===n.pinned?o+=e:i+=e}});var a=r,u=o;if(e&&e>0){var l=e*T(e,r>0,o>0);r>l&&(r=l),o>l&&(o=l)}return{leftWidth:F(r),rightWidth:F(o),mainWidth:i,leftContentWidth:a,rightContentWidth:u}},Ge=function(n){var e=n.columnsToShrink,t=n.totalCompensation,r=n.initialWidthsMap;if(0>t){var o=Math.abs(t),i=e.reduce(function(n,e){return n+(r.get(e.accessor)||100)},0);if(0===i)return;e.forEach(function(n,t){var a=r.get(n.accessor)||100,u=o*(a/i);if(t===e.length-1){var l=e.slice(0,t).reduce(function(n,e){var t=r.get(e.accessor)||100;return n+(("number"==typeof e.width?e.width:100)-t)},0);u=o-l}n.width=a+u})}else for(var a=t,u=function(){var n=e.map(function(n){var e=r.get(n.accessor)||100;return{column:n,headroom:Math.max(0,e-40),initialWidth:e,minWidth:40}}),t=n.filter(function(n){return n.headroom>0});if(t.length>0){var o=t.reduce(function(n,e){return n+e.headroom},0),i=0,u=a;t.forEach(function(n,e){var r=u*(n.headroom/o);r=Math.min(r,n.headroom),e===t.length-1&&(r=Math.min(u-i,n.headroom)),n.column.width=n.initialWidth-r,i+=r}),a-=i}else{var l=n.filter(function(n){return n.minWidth>E});if(0>=l.length)return"break";var c=a,s=c/l.length,d=0;l.forEach(function(n,e){var t=n.minWidth-E,r=Math.min(s,t);e===l.length-1&&(r=Math.min(c-d,t));var o=n.initialWidth-r;n.column.width=o,n.column.minWidth=Math.max(o,E),d+=r}),a-=d}};a>.5&&"break"!==u(););},Ve=function(n){var e=n.childrenToResize,t=void 0===e?[]:e,r=n.collapsedHeaders,o=n.delta,i=n.initialWidthsMap,a=n.isParentResize,u=void 0!==a&&a,l=n.resizedHeader,c=n.reverse,s=n.rootPinned,d=n.sectionHeaders,f=n.sectionWidth,v=n.startWidth,h=n.headers,p=n.containerWidth,w=o;if(s&&p>0){var m=function(n,e,t){return n*T(n,e,t)}(p,h.some(function(n){return"left"===n.pinned&&!n.hide}),h.some(function(n){return"right"===n.pinned&&!n.hide})),g=Array.from(i.values()).reduce(function(n,e){return n+e},0);o>0&&g+o>m&&(w=Math.max(0,m-g))}if(o=w,u&&t.length>1){var b=nn(d,r),x=b.findIndex(function(n){return n.accessor===t[0].accessor}),y=b.findIndex(function(n){return n.accessor===t[t.length-1].accessor});if(-1===x||-1===y)return;var C,I=0===x,R=y===b.length-1;C="left"===s&&R||"right"===s&&I?[]:I?b.slice(y+1):R||c?b.slice(0,x):b.slice(y+1);var S=Array.from(i.values()).reduce(function(n,e){return n+e},0);if(o>0){var M=o,N=!1;if(C.length>0&&S+o>f){N=!0;var H=C.reduce(function(n,e){var t=i.get(e.accessor)||100;return n+Math.max(0,t-E)},0);M=Math.min(o,H)}var k=(P=v+M)/(A=t.reduce(function(n,e){return n+(i.get(e.accessor)||100)},0));t.forEach(function(n){var e=i.get(n.accessor)||100;n.width=Math.max(e*k,40)}),N&&M>0&&C.length>0&&Ge({columnsToShrink:C,totalCompensation:M,initialWidthsMap:i})}else{var P,A=t.reduce(function(n,e){return n+(i.get(e.accessor)||100)},0),F=(P=Math.max(v+o,E*t.length))/A;t.forEach(function(n){var e=i.get(n.accessor)||100;n.width=Math.max(e*F,40)}),(V=v-P)>0&&C.length>0&&Ge({columnsToShrink:C,totalCompensation:-V,initialWidthsMap:i})}}else{var D=nn(d,r),L=D.findIndex(function(n){return n.accessor===l.accessor});if(-1!==L){var W,O=0===L,B=L===D.length-1;if(0!==(W="left"===s&&B||"right"===s&&O?[]:O?D.slice(L+1):B||c?D.slice(0,L):D.slice(L+1)).length){var z=Array.from(i.values()).reduce(function(n,e){return n+e},0);if(o>0){if(f>=z+o)return void(l.width=v+o);H=W.reduce(function(n,e){var t=i.get(e.accessor)||100;return n+Math.max(0,t-E)},0);var q=Math.min(o,H);l.width=v+q,q>0&&Ge({columnsToShrink:W,totalCompensation:q,initialWidthsMap:i})}else{var G=Math.max(v+o,40),V=v-G;l.width=G,V>0&&Ge({columnsToShrink:W,totalCompensation:-V,initialWidthsMap:i})}}else l.width=Math.max(v+o,40)}}},je={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},Ke=function(n){switch(n){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},Ue=function(n){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(n)},_e=function(n){return["between","notBetween","in","notIn"].includes(n)},Je=function(n){return["isEmpty","isNotEmpty"].includes(n)},Ye=function(e){return n("div",x({className:"st-filter-container"},{children:e.children}))},Xe=function(e){var r=e.value,u=e.onChange,l=e.options,c=e.placeholder,s=void 0===c?"Select...":c,d=e.className,f=void 0===d?"":d,v=e.disabled,h=void 0!==v&&v,p=i(!1),w=p[0],m=p[1],g=i(-1),b=g[0],y=g[1],C=a(null),I=l.find(function(n){return n.value===r});o(function(){var n=function(n){if(w)switch(n.key){case"ArrowDown":n.preventDefault(),y(function(n){return l.length-1>n?n+1:0});break;case"ArrowUp":n.preventDefault(),y(function(n){return n>0?n-1:l.length-1});break;case"Enter":n.preventDefault(),0>b||(u(l[b].value),m(!1),y(-1));break;case"Escape":n.preventDefault(),m(!1),y(-1)}};if(w)return document.addEventListener("keydown",n),function(){return document.removeEventListener("keydown",n)}},[w,b,l,u]);var R=function(n){u(n),m(!1),y(-1)};return t("div",x({ref:C,className:"st-custom-select ".concat(f," ").concat(h?"st-custom-select-disabled":""," ").concat(w?"st-custom-select-open":"").trim()},{children:[t("button",x({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(m(!w),w)y(-1);else{var n=l.findIndex(function(n){return n.value===r});y(0>n?0:n)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":w,"aria-labelledby":"select-label"},{children:[n("span",x({className:"st-custom-select-value"},{children:I?I.label:s})),n(Nn,{})]})),n(En,x({open:w,setOpen:m,onClose:function(){m(!1),y(-1)},positioning:"absolute",overflow:"auto"},{children:n("div",x({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(e,t){return n("div",x({className:"st-custom-select-option ".concat(e.value===r?"st-custom-select-option-selected":""," ").concat(t===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":e.value===r,onClick:function(){return R(e.value)},tabIndex:0,onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),R(e.value))}},{children:e.label}),t)})}))}))]}))},$e=function(e){var t=e.value,r=e.onChange,o=e.operators.map(function(n){return{value:n,label:je[n]}});return n("div",x({className:"st-filter-section"},{children:n(Xe,{value:t,onChange:function(n){r(n)},options:o})}))},Qe=function(e){var t=e.type,r=e.onChange,o=e.autoFocus,i=e.className,a=e.onEnterPress;return n("input",{type:void 0===t?"text":t,value:e.value,onChange:function(n){return r(n.target.value)},onKeyDown:function(n){"Enter"===n.key&&a&&a()},placeholder:e.placeholder,autoFocus:void 0!==o&&o,className:"st-filter-input ".concat(void 0===i?"":i).trim()})},Ze=function(e){var t=e.children,r=e.className;return n("div",x({className:"st-filter-section ".concat(void 0===r?"":r).trim()},{children:t}))},nt=function(e){var r=e.onClear,o=e.canApply,i=e.showClear;return t("div",x({className:"st-filter-actions"},{children:[n("button",x({onClick:e.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled"),tabIndex:0},{children:"Apply"})),i&&r&&n("button",x({onClick:r,className:"st-filter-button st-filter-button-clear",tabIndex:0},{children:"Clear"}))]}))},et=function(e){var r=e.header,a=e.currentFilter,u=e.onApplyFilter,l=e.onClearFilter,c=i((null==a?void 0:a.operator)||"contains"),s=c[0],d=c[1],f=i(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],p=Ke("string");o(function(){a?(d(a.operator),h((a.value||"")+"")):(d("contains"),h(""))},[a]);var w=function(){var n=x({accessor:r.accessor,operator:s},Ue(s)&&{value:v});u(n)},m=Je(s)||v.trim();return t(Ye,{children:[n($e,{value:s,onChange:d,operators:p}),Ue(s)&&n(Ze,{children:n(Qe,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:w})}),n(nt,{onApply:w,onClear:l,canApply:!!m,showClear:!!a})]})},tt=function(e){var r,a,u=e.header,l=e.currentFilter,c=e.onApplyFilter,s=e.onClearFilter,d=i((null==l?void 0:l.operator)||"equals"),f=d[0],v=d[1],h=i(((null==l?void 0:l.value)||"")+""),p=h[0],w=h[1],m=i(((null===(r=null==l?void 0:l.values)||void 0===r?void 0:r[0])||"")+""),g=m[0],b=m[1],x=i(((null===(a=null==l?void 0:l.values)||void 0===a?void 0:a[1])||"")+""),y=x[0],C=x[1],I=Ke("number");o(function(){var n,e;l?(v(l.operator),w((l.value||"")+""),b(((null===(n=l.values)||void 0===n?void 0:n[0])||"")+""),C(((null===(e=l.values)||void 0===e?void 0:e[1])||"")+"")):(v("equals"),w(""),b(""),C(""))},[l]);var R=function(){var n={accessor:u.accessor,operator:f};Ue(f)?n.value=parseFloat(p):_e(f)&&(n.values=[parseFloat(""+g),parseFloat(""+y)]),c(n)};return t(Ye,{children:[n($e,{value:f,onChange:v,operators:I}),Ue(f)&&n(Ze,{children:n(Qe,{type:"number",value:p,onChange:w,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),_e(f)&&t(Ze,{children:[n(Qe,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),n(Qe,{type:"number",value:y,onChange:C,placeholder:"To...",onEnterPress:R})]}),n(nt,{onApply:R,onClear:s,canApply:!!Je(f)||(Ue(f)?""!==p.trim():!!_e(f)&&""!==(g+"").trim()&&""!==(y+"").trim()),showClear:!!l})]})},rt=function(e){var t=e.className;return n(Xe,{value:e.value,onChange:e.onChange,options:e.options,className:void 0===t?"":t,placeholder:e.placeholder})},ot=function(e){var r=e.header,a=e.currentFilter,u=e.onApplyFilter,l=e.onClearFilter,c=i((null==a?void 0:a.operator)||"equals"),s=c[0],d=c[1],f=i(void 0!==(null==a?void 0:a.value)?a.value+"":"true"),v=f[0],h=f[1],p=Ke("boolean");o(function(){a?(d(a.operator),h(void 0!==a.value?a.value+"":"true")):(d("equals"),h("true"))},[a]);var w=Je(s)||""!==v;return t(Ye,{children:[n($e,{value:s,onChange:d,operators:p}),Ue(s)&&n(Ze,{children:n(rt,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),n(nt,{onApply:function(){var n={accessor:r.accessor,operator:s};Ue(s)&&(n.value="true"===v),u(n)},onClear:l,canApply:w,showClear:!!a})]})},it=function(e){var r,u,l=e.header,c=e.currentFilter,s=e.onApplyFilter,d=e.onClearFilter,f=i((null==c?void 0:c.operator)||"equals"),v=f[0],h=f[1],p=i((null==c?void 0:c.value)?c.value+"":""),w=p[0],m=p[1],g=i((null===(r=null==c?void 0:c.values)||void 0===r?void 0:r[0])?c.values[0]+"":""),b=g[0],y=g[1],C=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),I=C[0],R=C[1],S=Ke("date");o(function(){var n,e;c?(h(c.operator),m((c.value||"")+""),y(((null===(n=c.values)||void 0===n?void 0:n[0])||"")+""),R(((null===(e=c.values)||void 0===e?void 0:e[1])||"")+"")):(h("equals"),m(""),y(""),R(""))},[c]);var M=function(e){var r=e.value,u=e.onChange,l=e.placeholder,c=e.autoFocus,s=e.className,d=i(!1),f=d[0],v=d[1],h=i(""),p=h[0],w=h[1],m=a(null);o(function(){if(r){var n=jn(r);isNaN(n.getTime())||w(n.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else w("")},[r]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=r?jn(r):new Date;return t("div",x({className:"st-date-input-container",style:{position:"relative"}},{children:[n("input",{ref:m,type:"text",value:p,placeholder:l,onClick:function(){v(!f)},onKeyDown:function(n){"Enter"===n.key||" "===n.key?(n.preventDefault(),v(!f)):"Escape"===n.key&&v(!1)},readOnly:!0,className:"st-filter-input ".concat(s||""),style:{cursor:"pointer"}}),n(En,x({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"hidden",width:240},{children:n(Bn,{value:g,onChange:function(n){var e=n.toISOString().split("T")[0];u(e),v(!1)},onClose:function(){return v(!1)}})}))]}))};return t(Ye,{children:[n($e,{value:v,onChange:h,operators:S}),Ue(v)&&n(Ze,{children:n(M,{value:w,onChange:m,placeholder:"Select date...",autoFocus:!0})}),_e(v)&&t(Ze,{children:[n(M,{value:b,onChange:y,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),n(M,{value:I,onChange:R,placeholder:"To date..."})]}),n(nt,{onApply:function(){var n={accessor:l.accessor,operator:v};Ue(v)?n.value=w:_e(v)&&(n.values=[b,I]),s(n)},onClear:d,canApply:!!Je(v)||(Ue(v)?""!==w.trim():!!_e(v)&&""!==b.trim()&&""!==I.trim()),showClear:!!c})]})},at=function(e){var r=e.header,a=e.currentFilter,l=e.onApplyFilter,c=e.onClearFilter,s=u(function(){return r.enumOptions||[]},[r.enumOptions]),d=u(function(){return s.map(function(n){return n.value})},[s]),f=i((null==a?void 0:a.values)?a.values.map(String):d),v=f[0],h=f[1],p=i(""),w=p[0],m=p[1],g=u(function(){if(!w)return s;var n=w.toLowerCase();return s.filter(function(e){return e.label.toLowerCase().includes(n)})},[s,w]);o(function(){h(a?a.values?a.values.map(String):[]:d)},[a,d]);var b=s.length>10;return t(Ye,{children:[n(Ze,{children:t("div",x({className:"st-enum-filter-options"},{children:[n("div",x({className:"st-enum-select-all"},{children:n(me,x({checked:v.length===d.length,onChange:function(n){h(n?d:[])}},{children:n("span",x({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&n("div",x({className:"st-enum-search"},{children:n(Qe,{type:"text",value:w,onChange:m,placeholder:"Search..."})})),g.map(function(e,t){return n(me,x({checked:v.includes(e.value),onChange:function(){return n=e.value,void h(function(e){return e.includes(n)?e.filter(function(e){return e!==n}):R(R([],e,!0),[n],!1)});var n}},{children:n("span",x({className:"st-enum-option-label"},{children:e.label}))}),t)}),w&&0===g.length&&n("div",x({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),n(nt,{onApply:function(){v.length!==d.length?l({accessor:r.accessor,operator:"in",values:v}):c()},onClear:c,canApply:0!==v.length&&v.length!==d.length,showClear:!!a})]})},ut=function(t){var r=t.header,o=t.currentFilter,i=t.onApplyFilter,a=t.onClearFilter;return n(e,{children:function(){switch(r.type){case"number":return n(tt,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return n(ot,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return n(it,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return n(at,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return n(et,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},lt=function(r){var u=r.content,l=r.children,c=r.delay,s=void 0===c?500:c,d=i(!1),f=d[0],v=d[1],p=i({top:0,left:0}),w=p[0],m=p[1],b=a(null),y=a(null);if(o(function(){return function(){b.current&&clearTimeout(b.current)}},[]),!u||!g(l))return n(e,{children:l});var C=h(l,{ref:y,onMouseEnter:function(){b.current=setTimeout(function(){if(y.current&&u.trim()){var n=y.current.getBoundingClientRect();if(n.width>0&&n.height>0){var e=n.left+n.width/2-100,t=n.bottom+8;8>e?e=8:e+200>window.innerWidth-8&&(e=window.innerWidth-200-8),t+40>window.innerHeight-8&&(t=n.top-40-8),m({top:t,left:e}),v(!0)}}},s)},onMouseLeave:function(){b.current&&(clearTimeout(b.current),b.current=null),v(!1)}});return t(e,{children:[C,f&&n("div",x({className:"st-tooltip",style:{position:"fixed",top:"".concat(w.top,"px"),left:"".concat(w.left,"px"),zIndex:1e4}},{children:u}))]})},ct=function(e){var r,c,s=e.colIndex,d=e.gridColumnEnd,f=e.gridColumnStart,v=e.gridRowEnd,p=e.gridRowStart,w=e.header,m=e.parentHeader,g=e.reverse,b=e.sort,y=e.isLastHeader,C=void 0!==y&&y,I=i(!1),S=I[0],M=I[1],N=i(!1),E=N[0],T=N[1],A=i(w.label||""),F=A[0],D=A[1],W=vn(),O=W.activeHeaderDropdown,B=W.areAllRowsSelected,z=W.autoExpandColumns,q=W.collapsedHeaders,V=W.columnBorders,j=W.columnReordering,K=W.columnResizing,U=W.containerWidth,_=W.columnsWithSelectedCells,J=W.draggedHeaderRef,Y=W.enableHeaderEditing,X=W.essentialAccessors,$=W.handleApplyFilter,Q=W.handleClearFilter,Z=W.handleSelectAll,nn=W.headerDropdown,en=W.headerRegistry,tn=W.icons,rn=W.headers,on=W.hoveredHeaderRef,an=W.onColumnOrderChange,un=W.onColumnSelect,ln=W.onColumnWidthChange,cn=W.onHeaderEdit,sn=W.onSort,dn=W.onTableHeaderDragEnd,fn=W.headerHeight,hn=W.rows,pn=W.selectColumns,wn=W.selectableColumns,mn=W.selectedColumns,gn=W.setActiveHeaderDropdown,bn=W.setCollapsedHeaders,xn=W.setHeaders,yn=W.setInitialFocusedCell,Cn=W.setIsResizing,In=W.setSelectedCells,Rn=W.setSelectedColumns,Sn=!!(null==w?void 0:w.isSortable),Mn=!!(null==w?void 0:w.filterable),Nn=W.filters[w.accessor],Hn=(null==O?void 0:O.accessor)===w.accessor,Tn=w.isSelectionColumn&&W.enableRowSelection,kn=function(n){var e;return!(!(null===(e=n.children)||void 0===e?void 0:e.length)||!n.collapsible)}(w),An=q.has(w.accessor),Fn=function(n){var e=n.isOpen,t=n.estimatedHeight,r=void 0===t?200:t,u=n.estimatedWidth,l=void 0===u?250:u,c=n.margin,s=void 0===c?4:c,d=a(null),f=i({}),v=f[0],h=f[1];return o(function(){if(e&&d.current){var n=function(){if(d.current){var n=d.current.getBoundingClientRect(),e=window.innerHeight-n.bottom,t=window.innerWidth-n.right,o="bottom",i={};r>e&&n.top>=r&&(o="top");var a="left";l>t+n.width&&(a="right"),"bottom"===o?i.top=n.bottom+s:i.bottom=window.innerHeight-n.top+s,"left"===a?i.left=n.left:i.right=window.innerWidth-n.right,h(i)}};requestAnimationFrame(n);var t=function(){return requestAnimationFrame(n)},o=function(){return requestAnimationFrame(n)};return window.addEventListener("resize",t),window.addEventListener("scroll",o,!0),function(){window.removeEventListener("resize",t),window.removeEventListener("scroll",o,!0)}}h({})},[e,r,l,s]),{triggerRef:d,position:v}}({isOpen:Hn,estimatedHeight:200,estimatedWidth:250,margin:4}),Dn=Fn.triggerRef,Ln=Fn.position,Wn=u(function(){var n,e,t;if(!V)return!1;var r=rn.filter(function(n){return"left"===n.pinned}),o=rn.filter(function(n){return!n.pinned}),i=rn.filter(function(n){return"right"===n.pinned});return"left"===w.pinned?(null===(n=r[r.length-1])||void 0===n?void 0:n.accessor)===w.accessor:"right"===w.pinned?(null===(e=i[i.length-1])||void 0===e?void 0:e.accessor)===w.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===w.accessor},[V,rn,w.accessor,w.pinned]),Bn=u(function(){return!(!wn||Tn)&&P(w,s).some(function(n){return mn.has(n)})},[wn,Tn,w,s,mn]),zn=u(function(){return!Tn&&P(w,s).some(function(n){return _.has(n)})},[Tn,w,s,_]),qn=u(function(){return!(!w.children||0===w.children.length)&&(!An||w.children.some(function(n){var e=n.showWhen||k;return"parentCollapsed"===e||"always"===e}))},[w.children,An]),Gn=null==m?void 0:m.singleRowChildren,Vn=qn&&!w.singleRowChildren,jn="st-header-cell ".concat(w.accessor===(null===(r=on.current)||void 0===r?void 0:r.accessor)?"st-hovered":""," ").concat((null===(c=J.current)||void 0===c?void 0:c.accessor)===w.accessor?"st-dragging":""," ").concat(Sn?"clickable":""," ").concat(j&&!Sn?"columnReordering":""," ").concat(Vn?"parent":""," ").concat(Gn?"st-sub-header":""," ").concat(Wn?"st-last-column":""," ").concat(Y&&!Tn?"st-header-editable":""," ").concat(Bn?"st-header-selected":""," ").concat(zn&&!Bn?"st-header-has-highlighted-cell":""," ").concat(C?"st-no-resize":""),Kn=we({draggedHeaderRef:J,essentialAccessors:X,headers:rn,hoveredHeaderRef:on,onColumnOrderChange:an,onTableHeaderDragEnd:dn}),Un=Kn.handleDragStart,_n=Kn.handleDragEnd,Jn=Kn.handleDragOver,Yn=Xn();o(function(){if(en&&!w.isSelectionColumn){var n=w.accessor+"";return en.set(n,{setEditing:function(n){T(n)}}),function(){en.delete(n)}}},[en,w.accessor,w.isSelectionColumn]),o(function(){D(w.label||"")},[w.label]);var $n=function(n){M(!S)},Qn=l(function(n){D(n);var e=rn.map(function(e){return e.accessor===w.accessor?x(x({},e),{label:n}):e});xn(e),cn&&cn(w,n)},[rn,xn,cn,w]),Zn=l(function(){gn&&gn(null)},[gn]),ne=l(function(n){n.stopPropagation(),bn(function(n){var e=new Set(n);return An?e.delete(w.accessor):e.add(w.accessor),e})},[bn,An,w.accessor]),te=function(n){var e=n.event,t=n.header;if(!t.isSelectionColumn){if(wn){var r=P(t,s),o=r.some(function(n){return mn.has(n)});if(Y&&o&&!e.shiftKey)return nn&&Hn&&Zn(),void T(!0);e.shiftKey&&pn?Rn(function(n){if(0===n.size)return new Set(r);var e=r[0],t=Array.from(n).sort(function(n,e){return n-e}),o=t[0],i=Math.abs(e-o);t.forEach(function(n){var t=Math.abs(e-n);i>t&&(i=t,o=n)});var a,u,l,c=R(R([],(l=Math.min(a=o,u=e),Array.from({length:Math.max(a,u)-l+1},function(n,e){return l+e})),!0),r,!0);return new Set(R(R([],Array.from(n),!0),c,!0))}):pn&&pn(r),In(new Set),yn(null)}un&&un(t),!wn&&t.isSortable&&sn(t.accessor)}};o(function(){var n=function(n){n.preventDefault(),n.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",n),function(){document.removeEventListener("dragover",n)}},[]);var re=l(function(){var n=function(n,e){var t=e||{},r=t.rows,o=t.header,i=t.maxWidth,a=void 0===i?500:i,u=t.sampleSize,l=void 0===u?50:u,c=document.getElementById(L({accessor:n,rowId:"header"}));if(!c)return 150;var s=window.getComputedStyle(c),d=parseFloat(s.paddingLeft)||0,f=parseFloat(s.paddingRight)||0,v=parseFloat(s.gap)||0,h=d+f,p=c.querySelector(".st-header-label");if(p){var w=p.querySelector(".st-header-label-text");if(w){var m=document.createElement("span");m.style.visibility="hidden",m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.width="auto";var g=window.getComputedStyle(w);m.style.font=g.font,m.style.fontSize=g.fontSize,m.style.fontWeight=g.fontWeight,m.style.fontFamily=g.fontFamily,m.style.letterSpacing=g.letterSpacing,m.style.padding=g.padding,m.textContent=w.textContent,document.body.appendChild(m);var b=m.offsetWidth;document.body.removeChild(m),h+=b}}for(var x=Array.from(c.children),y=1,C=0;x.length>C;C++){var I=x[C];if(!I.classList.contains("st-header-label")&&!I.classList.contains("st-sr-only")){var R=window.getComputedStyle(I);"none"!==R.display&&(h+=(I.offsetWidth||0)+(parseFloat(R.marginLeft)||0)+(parseFloat(R.marginRight)||0),y++)}}v>0&&y>1&&(h+=v*(y-1));var S=0,M=o&&o.type&&H.includes(o.type);if(r&&r.length>0&&!M){var N=Math.min(r.length,l),E=document.createElement("div");E.style.visibility="hidden",E.style.position="absolute",E.style.whiteSpace="nowrap",E.style.width="auto";var T=0,k=0,P=document.querySelector(".st-cell-content");if(P){var A=window.getComputedStyle(P);E.style.font=A.font,E.style.fontSize=A.fontSize,E.style.fontFamily=A.fontFamily,T=parseFloat(A.paddingLeft)||0,k=parseFloat(A.paddingRight)||0}for(document.body.appendChild(E),C=0;N>C;C++){var F,D=r[C],W=F=(null==o?void 0:o.valueGetter)?o.valueGetter({accessor:n,row:D,rowIndex:C}):G(D,n);(null==o?void 0:o.valueFormatter)&&null!=F&&(W=o.valueFormatter({accessor:n,colIndex:0,row:D,rowIndex:C,value:F})),E.textContent=null!=W?W+"":"";var O=E.offsetWidth+T+k;O>S&&(S=O)}document.body.removeChild(E)}var B=Math.max(h,S);return M&&(B=Math.max(B,150)),B>a&&(B=a),B+2}(w.accessor,{rows:hn,header:w,maxWidth:500,sampleSize:50}),e=de(rn,w.accessor);if(e){var t=fe(rn,e),r=e[e.length-1],o=t.map(function(e,t){return t===r?x(x({},e),{width:n}):e}),i=ve(rn,e,o);xn(i),ln&&ln(i)}},[w,rn,hn,xn,ln]);if(!w)return null;var oe=K&&!Tn&&!C&&n("div",x({className:"st-header-resize-handle-container",role:"separator","aria-label":"Resize ".concat(w.label," column"),"aria-orientation":"vertical",onMouseDown:function(n){var e,t=null===(e=document.getElementById(L({accessor:w.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Yn({callback:Be,callbackProps:{autoExpandColumns:z,collapsedHeaders:q,containerWidth:U,event:n.nativeEvent,header:w,headers:rn,onColumnWidthChange:ln,reverse:g,setHeaders:xn,setIsResizing:Cn,startWidth:t},limit:10})},onTouchStart:function(n){var e,t=null===(e=document.getElementById(L({accessor:w.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Yn({callback:Be,callbackProps:{autoExpandColumns:z,collapsedHeaders:q,containerWidth:U,event:n,header:w,headers:rn,onColumnWidthChange:ln,reverse:g,setHeaders:xn,setIsResizing:Cn,startWidth:t},limit:10})},onDoubleClick:re},{children:n("div",{className:"st-header-resize-handle"})})),ie=b&&b.key.accessor===w.accessor&&t("div",x({className:"st-icon-container",onClick:function(n){return te({event:n,header:w})},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||sn(w.accessor)},tabIndex:0,role:"button","aria-label":"Sort ".concat(w.label," ").concat("asc"===b.direction?"descending":"ascending")},{children:["asc"===b.direction&&tn.sortUp&&tn.sortUp,"desc"===b.direction&&tn.sortDown&&tn.sortDown]})),ae=Mn&&tn.filter&&t("div",x({className:"st-icon-container",onClick:$n,onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.target===n.currentTarget||n.currentTarget.contains(n.target))&&(n.target.closest(".st-dropdown-content")||(n.preventDefault(),$n()))},tabIndex:0,role:"button","aria-label":"Filter ".concat(w.label),"aria-expanded":S,"aria-haspopup":"dialog"},{children:[h(tn.filter,{style:{fill:Nn?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),n(En,x({open:S,overflow:"visible",setOpen:M,onClose:function(){return M(!1)}},{children:n(ut,{header:w,currentFilter:Nn,onApplyFilter:function(n){$(n),M(!1)},onClearFilter:function(){Q(w.accessor),M(!1)}})}))]})),ue=kn&&!Tn&&n("div",x({className:"st-icon-container st-collapse-icon-container",onClick:function(n){return ne(n)},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),ne(n))},tabIndex:0,role:"button","aria-label":"".concat(An?"Expand":"Collapse"," ").concat(w.label," column"),"aria-expanded":!An},{children:An?tn.headerCollapse:tn.headerExpand})),le=n(lt,x({content:w.tooltip||""},{children:n("span",x({className:"st-header-label-text ".concat("right"===w.align?"right-aligned":"center"===w.align?"center-aligned":"left-aligned")},{children:Tn?n(me,{checked:!!B&&B(),onChange:function(n){Z&&Z(n)},ariaLabel:"Select all rows"}):E?n(Pn,{defaultValue:F,onBlur:function(){return T(!1)},onChange:Qn}):F||(null==w?void 0:w.label)}))})),ce="header-desc-".concat(w.accessor),se=function(n,e){var t=[];return n.type&&"other"!==n.type&&t.push("".concat(n.type," column")),n.isSortable&&t.push("sortable"),e&&t.push("filterable"),n.tooltip&&t.push(n.tooltip),t.join(", ")}(w,Mn);return t(On,x({className:jn,id:L({accessor:w.accessor,rowId:"header"}),role:"columnheader","aria-sort":function(){if(w.isSortable)return(null==b?void 0:b.key.accessor)===w.accessor?"asc"===b.direction?"ascending":"descending":"none"}(),"aria-colindex":s+1,"data-col-index":s,"aria-describedby":se?ce:void 0,onDragOver:function(n){Tn||Yn({callback:Jn,callbackProps:{event:n,hoveredHeader:w},limit:50})},style:x({gridRowStart:p,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:d},v-p>1?{}:{height:fn})},{children:[g&&oe,!w.headerRenderer&&"right"===w.align&&ue,!w.headerRenderer&&"right"===w.align&&ae,!w.headerRenderer&&"right"===w.align&&ie,n("div",x({ref:Dn,className:"st-header-label",draggable:j&&!w.disableReorder&&!Tn&&!ee(w,X),onClick:function(n){Tn||te({event:n,header:w})},onDoubleClick:function(n){Tn||function(n){var e=n.header;e.isSelectionColumn||wn&&e.isSortable&&sn(e.accessor)}({event:n,header:w})},onDragEnd:Tn?void 0:function(n){n.preventDefault(),_n()},onDragStart:Tn?void 0:function(n){j&&w&&function(n){Un(n)}(w)}},{children:w.headerRenderer?w.headerRenderer({accessor:w.accessor,colIndex:s,header:w,components:{sortIcon:ie||void 0,filterIcon:ae||void 0,collapseIcon:ue||void 0,labelContent:le}}):le})),!w.headerRenderer&&"right"!==w.align&&ie,!w.headerRenderer&&"right"!==w.align&&ae,!w.headerRenderer&&"right"!==w.align&&ue,!g&&oe,nn&&!Tn&&n("div",x({className:"st-header-dropdown-container"},{children:nn({accessor:w.accessor,colIndex:s,header:w,isOpen:Hn,onClose:Zn,position:Ln})})),se&&n("span",x({id:ce,className:"st-sr-only"},{children:se}))]}))},st=function(t){var r=t.columnIndices,o=t.gridTemplateColumns,i=t.handleScroll,a=t.headers,l=t.maxDepth,c=t.pinned,s=t.sectionRef,d=t.sort,f=t.width,v=vn(),h=v.collapsedHeaders,p=v.autoExpandColumns,w=u(function(){var n=function(e,t){return W({header:e,pinned:c,headers:a,collapsedHeaders:h,rootPinned:t})?e.children&&0!==e.children.length?e.children.flatMap(function(e){return n(e,t)}):[e]:[]},e=a.flatMap(function(e){return n(e,e.pinned)});return 0===e.length?-1:r[e[e.length-1].accessor]},[a,c,h,r]),m=u(function(){var n=[],e=1,t=function(o,i,u,s,d){var f,v;if(void 0===u&&(u=!1),!W({header:o,pinned:c,headers:a,collapsedHeaders:h,rootPinned:d}))return 0;u||e++;var p,w,m=null!==(v=null===(f=o.children)||void 0===f?void 0:f.filter(function(n){return W({header:n,pinned:c,headers:a,collapsedHeaders:h,rootPinned:d})}).length)&&void 0!==v?v:0,g=e;if(o.singleRowChildren&&m>0?(p=g+1,w=l+1):m>0?(p=g+m,w=i+1):(p=g+1,w=l+1),n.push({header:o,gridColumnStart:g,gridColumnEnd:p,gridRowStart:i,gridRowEnd:w,colIndex:r[o.accessor],parentHeader:s}),o.children&&o.children.length>0){var b=o.singleRowChildren?i:i+1,x=!o.singleRowChildren;o.children.forEach(function(n){W({header:n,pinned:c,headers:a,collapsedHeaders:h,rootPinned:d})&&(t(n,b,x,o,d),x=!1)})}return p-g},o=a.filter(function(n){return W({header:n,pinned:c,headers:a,collapsedHeaders:h,rootPinned:n.pinned})}),i=!0;return o.forEach(function(n){t(n,1,i,void 0,n.pinned),i=!1}),n},[a,l,c,r,h]);return n(Ee,x({childRef:s,group:c?"pinned-".concat(c):"default"},{children:n("div",x({className:"st-header-".concat(c?"pinned-".concat(c):"main")},i&&{onScroll:i},{ref:s,style:{gridTemplateColumns:o,width:f,position:"relative"}},{children:n(e,{children:m.map(function(e){return n(ct,{colIndex:e.colIndex,gridColumnEnd:e.gridColumnEnd,gridColumnStart:e.gridColumnStart,gridRowEnd:e.gridRowEnd,gridRowStart:e.gridRowStart,header:e.header,parentHeader:e.parentHeader,reverse:"right"===c,sort:d,isLastHeader:p&&!c&&e.colIndex===w},e.header.accessor)})})}))}))},dt=function(e){var r=e.calculatedHeaderHeight,o=e.centerHeaderRef,i=e.headers,a=e.mainTemplateColumns,l=e.pinnedLeftColumns,c=e.pinnedLeftTemplateColumns,s=e.pinnedRightColumns,d=e.pinnedRightTemplateColumns,f=e.sort,v=e.pinnedLeftWidth,h=e.pinnedRightWidth,p=vn(),w=p.headerContainerRef,m=p.pinnedLeftRef,g=p.pinnedRightRef,b=p.collapsedHeaders,y=p.tableRows,C=p.maxHeaderDepth,I=u(function(){return Zn(i,"left")||Zn(i,void 0)||Zn(i,"right")},[i]),R=u(function(){return I?void 0:{minHeight:r}},[I,r]),S=u(function(){return ke({headers:i,pinnedLeftColumns:l,pinnedRightColumns:s,collapsedHeaders:b})},[i,l,s,b]),M=u(function(){return Object.keys(S).length},[S]);return t("div",x({className:"st-header-container",ref:w,style:R,"aria-rowcount":y.length+C,"aria-colcount":M},{children:[Zn(i,"left")&&n(st,{columnIndices:S,gridTemplateColumns:c,handleScroll:void 0,headers:i,maxDepth:C,pinned:"left",sectionRef:m,sort:f,width:v}),n(st,{columnIndices:S,gridTemplateColumns:a,handleScroll:void 0,headers:i,maxDepth:C,sectionRef:o,sort:f}),Zn(i,"right")&&n(st,{columnIndices:S,gridTemplateColumns:d,handleScroll:void 0,headers:i,maxDepth:C,pinned:"right",sectionRef:g,sort:f,width:h})]}))},ft=function(e){var r=e.calculatedHeaderHeight,o=e.hideHeader,i=e.pinnedLeftWidth,l=e.pinnedRightWidth,c=e.setScrollTop,s=e.setScrollDirection,d=e.shouldShowEmptyState,f=e.sort,v=e.tableRows,h=e.rowsToRender,p=e.stickyParents,w=e.regularRows,m=e.partiallyVisibleRows,g=e.heightMap,b=vn(),y=b.columnResizing,C=b.editColumns,I=b.headers,R=b.collapsedHeaders,S=b.autoExpandColumns,M=a(null),N=u(function(){return I.filter(function(n){return!n.pinned})},[I]),H=u(function(){return I.filter(function(n){return"left"===n.pinned})},[I]),E=u(function(){return I.filter(function(n){return"right"===n.pinned})},[I]),T=u(function(){return Fe({headers:H,collapsedHeaders:R,autoExpandColumns:S})},[H,R,S]),k=u(function(){return Fe({headers:N,collapsedHeaders:R,autoExpandColumns:S})},[N,R,S]),P=u(function(){return Fe({headers:E,collapsedHeaders:R,autoExpandColumns:S})},[E,R,S]),A={calculatedHeaderHeight:r,centerHeaderRef:M,headers:I,mainTemplateColumns:k,pinnedLeftColumns:H,pinnedLeftTemplateColumns:T,pinnedRightColumns:E,pinnedRightTemplateColumns:P,sort:f,pinnedLeftWidth:i,pinnedRightWidth:l},F={calculatedHeaderHeight:r,heightMap:g,mainTemplateColumns:k,partiallyVisibleRows:m,pinnedLeftColumns:H,pinnedLeftTemplateColumns:T,pinnedLeftWidth:i,pinnedRightColumns:E,pinnedRightTemplateColumns:P,pinnedRightWidth:l,regularRows:w,rowsToRender:h,setScrollDirection:s,setScrollTop:c,shouldShowEmptyState:d,stickyParents:p,tableRows:v};return t("div",x({className:"st-content ".concat(y?"st-resizeable":"st-not-resizeable"),style:{width:C?"calc(100% - 29.5px)":"100%"}},{children:[!o&&n(dt,x({},A)),n(We,x({},F))]}))},vt=function(e){var r=e.mainBodyWidth,u=e.mainBodyRef,l=e.pinnedLeftWidth,c=e.pinnedRightWidth,s=e.pinnedLeftContentWidth,d=e.pinnedRightContentWidth,f=e.tableBodyContainerRef,v=vn().editColumns,h=i(!1),p=h[0],w=h[1],m=a(null),g=a(null),b=a(null),y=v?N:0,C=(v?c+1:c)+(f.current&&f.current&&f.current.scrollHeight>f.current.clientHeight?f.current.offsetWidth-f.current.clientWidth:0);return o(function(){setTimeout(function(){u.current&&w(u.current.scrollWidth-u.current.clientWidth>1)},1)},[u,r]),p?t("div",x({className:"st-horizontal-scrollbar-container"},{children:[l>0&&n(Ee,x({childRef:g,group:"pinned-left"},{children:n("div",x({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:n("div",{style:{width:s}})}))})),r>0&&n(Ee,x({childRef:m},{children:n("div",x({className:"st-horizontal-scrollbar-middle",ref:m},{children:n("div",{style:{width:r}})}))})),c>0&&n(Ee,x({childRef:b,group:"pinned-right"},{children:n("div",x({className:"st-horizontal-scrollbar-right",ref:b,style:{width:C}},{children:n("div",{style:{width:d}})}))})),y>0&&n("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},ht={string:function(n,e,t){if(n===e)return 0;var r=n.localeCompare(e);return"asc"===t?r:-r},number:function(n,e,t){if(n===e)return 0;var r=n-e;return"asc"===t?r:-r},boolean:function(n,e,t){if(n===e)return 0;var r=n===e?0:n?-1:1;return"asc"===t?r:-r},date:function(n,e,t){var r=new Date(n),o=new Date(e);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"asc"===t?i:-i},enum:function(n,e,t){return ht.string(n,e,t)},default:function(n,e,t){return n===e?0:null==n?"asc"===t?-1:1:null==e?"asc"===t?1:-1:"string"==typeof n&&"string"==typeof e?ht.string(n,e,t):"number"==typeof n&&"number"==typeof e?ht.number(n,e,t):"boolean"==typeof n&&"boolean"==typeof e?ht.boolean(n,e,t):ht.string(n+"",e+"",t)}},pt=function(n){return function(n){var e=n.rows,t=n.sortColumn,r=function(n,e){for(var t=0,o=n;o.length>t;t++){var i=o[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=r(i.children,e);if(a)return a}}},o=r(n.headers,t.key.accessor),i=(null==o?void 0:o.type)||"string",a=t.direction,u=t.key.accessor;return R([],e,!0).sort(function(n,t){var r,l;if(null==o?void 0:o.valueGetter){var c=e.indexOf(n),s=e.indexOf(t);r=o.valueGetter({accessor:u,row:n,rowIndex:c}),l=o.valueGetter({accessor:u,row:t,rowIndex:s})}else r=G(n,u),l=G(t,u);return(null==o?void 0:o.comparator)?o.comparator({rowA:n,rowB:t,valueA:r,valueB:l,direction:a}):function(n,e,t,r){if(void 0===t&&(t="string"),null==n||""===n)return"asc"===r?-1:1;if(null==e||""===e)return"asc"===r?1:-1;if("number"===t){var o=function(n){var e;if("number"==typeof n)return n;var t=n+"";if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(e=r[2])||void 0===e?void 0:e.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(n),a=o(e);return ht.number(i,a,r)}return"date"===t?ht.date(n+"",e+"",r):"boolean"===t?ht.boolean(!!n,!!e,r):"enum"===t?ht.enum(n+"",e+"",r):ht.string(n+"",e+"",r)}(r,l,i,a)})}({rows:n.rows,sortColumn:n.sortColumn,headers:n.headers})},wt=function(n){return u(function(){var e=A(n),t=new Map;return e.forEach(function(n){t.set(n.accessor,n)}),t},[n])},mt=function(n){var e=n.tableRows,t=n.sortColumn,r=n.rowGrouping,o=n.headers;return n.externalSortHandling?e:t?r&&r.length>0?(0,n.sortNestedRows)({groupingKeys:r,headers:o,rows:e,sortColumn:t}):pt({headers:o,rows:e,sortColumn:t}):e},gt=function(n,e,t){void 0===t&&(t=new Set);for(var r=0,o=n;o.length>r;r++){var i=o[r];if(!t.has(i.accessor)&&(t.add(i.accessor),i.children&&i.children.length>0)){var a=i.children.some(function(n){return n.accessor===e}),u=!1;if(!a)for(var l=0,c=i.children;c.length>l;l++){var s=c[l];if(gt([s],e,t),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},bt=function(n){return n.every(function(n){return n.hide})},xt=function(n){n.forEach(function(n){n.children&&n.children.length>0&&(xt(n.children),bt(n.children)&&(n.hide=!0))})};function yt(n){var e=n.fullRootHeaders,t=n.panelSection,r=n.expandedHeaders,o=n.forceExpanded,i=[],a=function(n,e,u,l){if(!n.isSelectionColumn&&!n.excludeFromRender){i.push({header:n,visualIndex:i.length,depth:e,parent:u,indexPath:l,panelSection:t});var c=n.children&&n.children.length>0,s=o||r.has(n.accessor);c&&s&&n.children&&n.children.forEach(function(t,r){a(t,e+1,n,R(R([],l,!0),[r],!1))})}};return n.sectionRoots.forEach(function(n){var t=e.findIndex(function(e){return e.accessor===n.accessor});-1!==t&&a(n,0,null,[t])}),i}var Ct=function(r){var o=r.allHeaders,i=r.clearHoverSeparator,a=r.depth,u=void 0===a?0:a,c=r.doesAnyHeaderHaveChildren,s=r.draggingRow,d=r.expandedHeaders,f=r.flattenedHeaders,v=r.forceExpanded,h=void 0!==v&&v,p=r.header,w=r.hoveredSeparatorIndex,m=r.isCheckedOverride,g=r.panelSection,b=r.rowIndex,y=r.setDraggingRow,C=r.setExpandedHeaders,I=r.setHoveredSeparatorIndex,S=vn(),M=S.columnEditorConfig,N=S.essentialAccessors,H=S.headers,E=S.icons,T=S.setHeaders,k=S.onColumnVisibilityChange,P=S.onColumnOrderChange,A=!1!==M.allowColumnPinning,F="".concat(16*u,"px"),D=p.children&&p.children.length>0,L=ee(p,N),W=!L,O=null!=m?m:!(p.hide||D&&p.children&&bt(p.children)),B=d.has(p.accessor),z=h||B,q=function(){if(!h){var n=new Set(d);B?n.delete(p.accessor):n.add(p.accessor),C(n)}},G=l(function(n){return!(N.size>0&&!re(n,N)||(null==P||P(n),T(n),0))},[N,P,T]),V=l(function(){var n=le(H,p.accessor,"left",N);n&&G(n)},[G,N,p.accessor,H]),j=l(function(){var n=le(H,p.accessor,"right",N);n&&G(n)},[G,N,p.accessor,H]),K=l(function(){var n=le(H,p.accessor,"main",N);n&&G(n)},[G,N,p.accessor,H]),U="left"===p.pinned||"right"===p.pinned?p.pinned:null,_=!!U&&!L,J=!U&&"main"===g,Y=!U&&"main"===g,X=function(n){if(W){p.hide=!n,n?(gt(o,p.accessor),D&&p.children&&p.children.length>0&&p.children.every(function(n){return!0===n.hide})&&p.children[0]&&(p.children[0].hide=!1,gt(o,p.children[0].accessor))):xt(o);var e=R([],H,!0);if(T(e),k){var t=function(n){var e={},t=function(n){e[n.accessor]=!n.hide,n.children&&n.children.length>0&&n.children.forEach(t)};return n.forEach(t),e}(e);k(t)}}},$=c&&D&&n("div",x({className:"st-header-icon-container"},{children:n("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(z?"expanded":"collapsed"),onClick:function(n){n.stopPropagation(),q()}},{children:E.expand}))})),Q=n(me,{checked:O,disabled:!W,onChange:X}),Z=n("div",x({className:"st-drag-icon-container"},{children:E.drag})),nn={pinnedSide:U,canPinLeft:J,canPinRight:Y,canUnpin:_,pinLeft:V,pinRight:j,unpin:K},en="left"===U?E.pinnedLeftIcon:"right"===U?E.pinnedRightIcon:null,tn=A&&0===u?null!==U&&null!==en?_?n("button",x({type:"button",className:"st-column-pin-btn st-column-pin-side st-column-pin-pinned-mark st-column-pin-pinned-active","aria-label":"Unpin column",title:"Unpin",onClick:function(n){n.stopPropagation(),K()}},{children:en})):n("span",x({className:"st-column-pin-pinned-mark st-column-pin-side st-column-pin-pinned-essential st-column-pin-pinned-active","aria-hidden":!0,title:"Pinned (essential)"},{children:en})):"main"===g&&(J||Y)?t("div",x({className:"st-column-pin-side-group"},{children:[J?n("button",x({type:"button",className:"st-column-pin-btn st-column-pin-side st-column-pin-side-option","aria-label":"Pin column to left",title:"Pin to left",onClick:function(n){n.stopPropagation(),V()}},{children:E.pinnedLeftIcon})):null,Y?n("button",x({type:"button",className:"st-column-pin-btn st-column-pin-side st-column-pin-side-option","aria-label":"Pin column to right",title:"Pin to right",onClick:function(n){n.stopPropagation(),j()}},{children:E.pinnedRightIcon})):null]})):null:null,rn=n("div",x({className:"st-column-label-container"},{children:p.label})),on=void 0!==b&&!p.disableReorder&&!ee(p,N);return t(e,{children:[0===b&&n("div",{className:"st-column-editor-drag-separator",style:{opacity:-1===w?1:0}}),n("div",x({className:"st-header-checkbox-item",style:{paddingLeft:F},draggable:on,onDragStart:function(n){n.dataTransfer.effectAllowed="move",void 0!==b&&(null==i||i(),y(f[b]))},onDragEnter:function(n){n.preventDefault()},onDragOver:function(n){if(n.preventDefault(),void 0!==b&&s&&s.panelSection===g){var e=n.currentTarget.getBoundingClientRect(),t=function(n){var e,t,r=n.flattenedHeaders,o=n.draggingRow,i=n.hoveredRowIndex,a=n.isTopHalfOfRow,u=r[i];if(u.panelSection!==o.panelSection)return null;if(u.depth===o.depth)return(null===(e=u.parent)||void 0===e?void 0:e.accessor)!==(null===(t=o.parent)||void 0===t?void 0:t.accessor)?null:a||u.header.children?i-1:i;if(u.depth>o.depth){for(var l=u,c=i,s=function(){var n=l.parent.accessor,e=r.findIndex(function(e){return e.header.accessor===n});if(-1===e)return"break";l=r[e],c=e};l.parent&&l.depth>o.depth&&"break"!==s(););for(var d=c,f=c,v=c+1;r.length>v&&r[v].depth>l.depth;v++)f=v;var h=f-d+1,p=i-d,w=h/2>p;return h%2==1&&p===Math.floor(h/2)&&(w=a),w?c-1:f}return null}({flattenedHeaders:f,draggingRow:s,hoveredRowIndex:b,isTopHalfOfRow:e.top+e.height/2>n.clientY});I(t)}},onDragEnd:function(){var n=function(){y(null),I(null)};if(s&&null!==w&&s.panelSection===g){var e=f[w>s.visualIndex?w:w+1];if(e){if(e.depth>s.depth&&e.parent){var t=f.findIndex(function(n){return n.header.accessor===e.parent.accessor});-1!==t&&(e=f[t])}if(s.header.accessor!==e.header.accessor)if(s.indexPath.length!==e.indexPath.length||1!==s.indexPath.length&&!s.indexPath.slice(0,-1).every(function(n,t){return n===e.indexPath[t]}))n();else{var r;if(1===s.indexPath.length){var o=pe(H,s.indexPath,e.indexPath),i=o.newHeaders;if(o.emergencyBreak)return void n();r=i}else{var a=pe(fe(H,s.indexPath),[s.indexPath[s.indexPath.length-1]],[e.indexPath[e.indexPath.length-1]]);if(i=a.newHeaders,a.emergencyBreak)return void n();r=ve(Qn(H),s.indexPath,i)}G(r),n()}else n()}else n()}else n()}},{children:M.rowRenderer?M.rowRenderer({accessor:p.accessor,header:p,panelSection:g,isEssential:L,canToggleVisibility:W,allowColumnPinning:A,pinControl:nn,components:{expandIcon:$||void 0,checkbox:Q,dragIcon:Z,labelContent:rn,pinIcon:A&&null!=tn?tn:void 0}}):t(e,{children:[c&&n("div",x({className:"st-header-icon-container"},{children:D?n("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(z?"expanded":"collapsed"),onClick:function(n){n.stopPropagation(),q()}},{children:E.expand})):null})),n(me,{checked:O,disabled:!W,onChange:X}),tn,n("div",x({className:"st-drag-icon-container"},{children:E.drag})),n("div",x({className:"st-column-label-container"},{children:p.label}))]})})),n("div",{className:"st-column-editor-drag-separator",style:{opacity:w===b?1:0}})]})},It=function(n,e){var t=e.toLowerCase();return!!n.label.toLowerCase().includes(t)||!(!n.children||0>=n.children.length)&&n.children.some(function(n){return It(n,e)})};function Rt(e){var r=e.panelSection,o=e.doesAnyHeaderHaveChildren,i=e.allHeaders,a=e.expandedHeaders,u=e.setExpandedHeaders,l=e.forceExpanded,c=e.draggingRow,s=e.setDraggingRow,d=e.hoverSep,f=e.setHoverSep,v=e.flattenedForSection,h=(null==d?void 0:d.section)===r?d.index:null,p=function(n){f(null===n?null:{section:r,index:n})};return t("div",x({className:"st-column-editor-section","data-panel-section":r},{children:[n("div",x({className:"st-column-editor-section-label"},{children:e.title})),n("div",x({className:"st-column-editor-list st-column-editor-list-section"},{children:v.map(function(e){return n(Ct,{allHeaders:i,clearHoverSeparator:function(){return f(null)},doesAnyHeaderHaveChildren:o,depth:e.depth,draggingRow:c,expandedHeaders:a,flattenedHeaders:v,forceExpanded:l,header:e.header,hoveredSeparatorIndex:h,panelSection:r,rowIndex:e.visualIndex,setDraggingRow:s,setExpandedHeaders:u,setHoveredSeparatorIndex:p},"".concat(r,"-").concat(e.header.accessor,"-").concat(e.visualIndex))})}))]}))}var St=function(r){var o=r.headers,a=r.open,l=r.searchEnabled,c=r.searchPlaceholder,s=r.searchFunction,d=r.customRenderer,f=vn().resetColumns,v=i(""),h=v[0],p=v[1],w=i(null),m=w[0],g=w[1],b=i(null),y=b[0],C=b[1],I=i(function(){var n=new Set,e=function(t){t.forEach(function(t){t.children&&t.children.length>0&&(n.add(t.accessor),e(t.children))})};return e(o),n}),S=I[0],M=I[1],N=u(function(){return o.some(function(n){return n.children&&n.children.length>0})},[o]),H=u(function(){return l?function(n,e,t){if(!e.trim())return n;var r=t||It;return n.filter(function(n){return!n.isSelectionColumn&&!n.excludeFromRender&&r(n,e)})}(o,h,s):o},[o,h,l,s]),E=u(function(){return ne(H)},[H]),T=E.pinnedLeft,k=E.unpinned,P=E.pinnedRight,A=l&&h.trim().length>0,F=u(function(){return yt({sectionRoots:T,fullRootHeaders:o,panelSection:"left",expandedHeaders:S,forceExpanded:A})},[T,o,S,A]),D=u(function(){return yt({sectionRoots:k,fullRootHeaders:o,panelSection:"main",expandedHeaders:S,forceExpanded:A})},[k,o,S,A]),L=u(function(){return yt({sectionRoots:P,fullRootHeaders:o,panelSection:"right",expandedHeaders:S,forceExpanded:A})},[P,o,S,A]),W=u(function(){return R(R(R([],F,!0),D,!0),L,!0)},[F,D,L]),O=l?n("div",x({className:"st-column-editor-search-wrapper"},{children:n("div",x({className:"st-column-editor-search"},{children:n("input",{type:"text",value:h,onChange:function(n){return p(n.target.value)},placeholder:c,className:"st-filter-input",onClick:function(n){return n.stopPropagation()}})}))})):null,B=T.length>0?Rt({title:"Pinned left",panelSection:"left",doesAnyHeaderHaveChildren:N,allHeaders:o,expandedHeaders:S,setExpandedHeaders:M,forceExpanded:A,draggingRow:m,setDraggingRow:g,hoverSep:y,setHoverSep:C,flattenedForSection:F}):null,z=Rt({title:"Columns",panelSection:"main",doesAnyHeaderHaveChildren:N,allHeaders:o,expandedHeaders:S,setExpandedHeaders:M,forceExpanded:A,draggingRow:m,setDraggingRow:g,hoverSep:y,setHoverSep:C,flattenedForSection:D}),q=P.length>0?Rt({title:"Pinned right",panelSection:"right",doesAnyHeaderHaveChildren:N,allHeaders:o,expandedHeaders:S,setExpandedHeaders:M,forceExpanded:A,draggingRow:m,setDraggingRow:g,hoverSep:y,setHoverSep:C,flattenedForSection:L}):null,G=t("div",x({className:"st-column-editor-lists"},{children:[B,z,q]})),V=d?d({searchSection:O,listSection:G,pinnedLeftList:B,unpinnedList:z,pinnedRightList:q,flattenedHeaders:W,searchTerm:h,setSearchTerm:p,searchEnabled:l,searchPlaceholder:c,headers:o,resetColumns:f}):t(e,{children:[O,G]});return n("div",x({className:"st-column-editor-popout ".concat(a?"open":""),onClick:function(n){return n.stopPropagation()}},{children:n("div",x({className:"st-column-editor-popout-content"},{children:V}))}))},Mt=function(e){var r=e.columnEditorConfig,o=e.headers,i=e.open,a=e.setOpen,u=r.text,l=r.searchEnabled,c=r.searchPlaceholder,s=r.searchFunction,d=r.customRenderer;return e.editColumns?t("div",x({className:"st-column-editor ".concat(i?"open":""),onClick:function(){a(!i)},style:{width:N}},{children:[n("div",x({className:"st-column-editor-text"},{children:u})),n(St,{headers:o,open:i,searchEnabled:l,searchPlaceholder:c,searchFunction:s,customRenderer:d})]})):null},Nt=function(e){var t=e.children,o=a({}),i=l(function(n,e){return!!o.current[e]&&o.current[e].find(function(e){return e===n})},[]),u=l(function(n,e){n.scrollWidth-n.clientWidth>0&&(e.scrollLeft=n.scrollLeft)},[]),c=l(function(n){n.onscroll=null},[]),s=l(function(n,e){n.onscroll=function(){window.requestAnimationFrame(function(){e.forEach(function(e){var t;null===(t=o.current[e])||void 0===t||t.forEach(function(e){n!==e&&(c(e),u(n,e),window.requestAnimationFrame(function(){var n=Object.keys(o.current).filter(function(n){return o.current[n].includes(e)});s(e,n)}))})})})}},[c,u]),d=l(function(n,e){e.forEach(function(e){o.current[e]||(o.current[e]=[]),i(n,e)||(o.current[e].length>0&&u(o.current[e][0],n),o.current[e].push(n))}),s(n,e)},[i,u,s]),f=l(function(n,e){e.forEach(function(e){if(i(n,e)){c(n);var t=o.current[e].indexOf(n);-1!==t&&o.current[e].splice(t,1)}})},[i,c]);return n(He.Provider,x({value:{registerPane:d,unregisterPane:f}},{children:r.Children.only(t)}))},Ht=function(n){var e=n.tableRows,t=n.filterState;return n.externalFilterHandling?e:t&&0!==Object.keys(t).length?e.filter(function(n){return Object.values(t).every(function(e){try{return function(n,e){var t=e.operator,r=e.value,o=e.values;if(null==n)return"isEmpty"===t;if("isEmpty"===t)return!n||""===(n+"").trim();if("isNotEmpty"===t)return n&&""!==(n+"").trim();if("string"==typeof n||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=(n+"").toLowerCase(),a=r?(r+"").toLowerCase():"";switch(t){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof n||!isNaN(+n)){var u=+n,l=+r;switch(t){case"equals":return u===l;case"notEquals":return u!==l;case"greaterThan":return u>l;case"lessThan":return l>u;case"greaterThanOrEqual":return u>=l;case"lessThanOrEqual":return l>=u;case"between":if(o&&2===o.length){var c=o.map(Number),s=c[1];return u>=c[0]&&s>=u}return!1;case"notBetween":if(o&&2===o.length){var d=o.map(Number);return s=d[1],d[0]>u||u>s}return!0}}if(n instanceof Date||!isNaN(Date.parse(n))){var f=jn(n),v=jn((r||"")+""),h=Vn(f),p=Vn(v);switch(t){case"equals":return h.getTime()===p.getTime();case"notEquals":return h.getTime()!==p.getTime();case"before":return p>h;case"after":return h>p;case"between":if(o&&2===o.length){var w=o.map(function(n){return Vn(jn((n||"")+""))}),m=w[1];return h>=w[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(n){return Vn(jn((n||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof n&&"equals"===t)return n===!!r;if(Array.isArray(n)){var b=n.map(function(n){return"object"==typeof n&&null!==n?JSON.stringify(n):n+""}).join(", ");n=b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var x=o.includes(n+"");return"in"===t?x:!x}return!1}var y=(n+"").toLowerCase(),C=r?(r+"").toLowerCase():"";switch(t){case"equals":return y===C;case"notEquals":return y!==C;default:return!0}}(G(n,e.accessor),e)}catch(n){return console.warn("Filter error for accessor ".concat(e.accessor,":"),n),!0}})}):e},Et=function(n){var e,t=document.querySelector(".simple-table-root");if("string"==typeof n){if(n.endsWith("px"))return parseInt(n,10);if(n.endsWith("vh"))return window.innerHeight*parseInt(n,10)/100;if(n.endsWith("%")){var r=null===(e=null==t?void 0:t.parentElement)||void 0===e?void 0:e.clientHeight;return!r||50>r?0:r*parseInt(n,10)/100}return window.innerHeight}return n},Tt=function(n,e,t,r){var o=[],i=function(n){n.forEach(function(n){var t=r?n[r]:void 0;if(r&&t&&j(t))i(t);else{var a=G(n,e);null!=a&&o.push(a)}})};if(i(n),0!==o.length){if("custom"===t.type&&t.customFn)return t.customFn(o);var a,u=t.parseValue?o.map(t.parseValue).filter(function(n){return!isNaN(n)}):o.map(function(n){return"number"==typeof n?n:"string"==typeof n?parseFloat(n):NaN}).filter(function(n){return!isNaN(n)});if(0===u.length)return"count"===t.type?o.length:void 0;switch(t.type){case"sum":a=u.reduce(function(n,e){return n+e},0);break;case"average":a=u.reduce(function(n,e){return n+e},0)/u.length;break;case"count":a=o.length;break;case"min":a=Math.min.apply(Math,u);break;case"max":a=Math.max.apply(Math,u);break;default:return}return t.formatResult?t.formatResult(a):a}},kt=function(n){var e=n.effectiveHeaders,t=n.headerHeight,r=n.rowHeight,o=n.tableBodyContainerRef,a=i(0),c=a[0],s=a[1],d=l(function(n){var e,t;return n.singleRowChildren&&(null===(e=n.children)||void 0===e?void 0:e.length)?1:(null===(t=n.children)||void 0===t?void 0:t.length)?1+Math.max.apply(Math,n.children.map(d)):1},[]),f=u(function(){var n=0;return e.forEach(function(e){var t=d(e);n=Math.max(n,t)}),n},[e,d]),v=u(function(){var n=1;if("undefined"!=typeof window){var e=document.documentElement,o=getComputedStyle(e).getPropertyValue("--st-border-width").trim();if(o){var i=parseFloat(o);isNaN(i)||(n=i)}}return f*(null!=t?t:r)+n},[f,t,r]);return m(function(){var n=function(n,e){void 0===e&&(e=150);var t=null,r=null,o=null,i=function(){null!==r&&clearTimeout(r),r=setTimeout(function(){r=null,function(){if(null!==t){var e=t;t=null,n(e)}}()},e)};return{notify:function(n){t=n,i()},notifyFromObserver:function(n){null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(function(){o=null,t=n(),i()})},publishImmediately:function(e){null!==r&&(clearTimeout(r),r=null),t=null,n(e)},destroy:function(){null!==r&&(clearTimeout(r),r=null),null!==o&&(cancelAnimationFrame(o),o=null),t=null}}}(function(n){s(function(e){return e===n?e:(function(){var n,e=window.__containerResizePerf;e&&(e.containerWidthStateUpdates=(null!==(n=e.containerWidthStateUpdates)&&void 0!==n?n:0)+1,window.dispatchEvent(new CustomEvent("st-container-width-update")))}(),n)})}),e=function(){var n,e;return null!==(e=null===(n=o.current)||void 0===n?void 0:n.clientWidth)&&void 0!==e?e:0},t=e();t>0&&n.publishImmediately(t);var r=null,i=o.current;return i&&"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(function(){n.notifyFromObserver(e)})).observe(i),function(){null==r||r.disconnect(),n.destroy()}},[o]),{containerWidth:c,calculatedHeaderHeight:v,maxHeaderDepth:f}},Pt=function(n){if(null==n)return"";var e=n+"";if(e.includes(",")||e.includes('"')||e.includes("\n")||e.includes("\r")){var t=e.replace(/"/g,'""');return'"'.concat(t,'"')}return e},At=function(n){return function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return new Promise(function(t){n.apply(void 0,e),setTimeout(function(){return t()},0)})}},Ft=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},Dt={COLUMN_REORDER:{duration:180,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},ROW_REORDER:{duration:200,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},REDUCED_MOTION:{duration:150,easing:"ease-out",delay:0}},Lt=function(n){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.top="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating")},Wt=function(n,e,t,r){return void 0===t&&(t={}),new Promise(function(r){n.style.transition="transform ".concat(e.duration,"ms ").concat(e.easing),e.delay&&(n.style.transitionDelay="".concat(e.delay,"ms")),n.style.transform="translate3d(0, 0, 0)";var o=function(){Lt(n),n.removeEventListener("transitionend",o),t.onComplete&&t.onComplete(),r()};n.addEventListener("transitionend",o),setTimeout(o,e.duration+(e.delay||0)+50)})},Ot=function(n){var e=n.element,t=n.finalConfig,r=n.fromBounds,o=n.toBounds;return C(void 0,void 0,void 0,function(){var n,i;return I(this,function(a){switch(a.label){case 0:return n=function(n,e){return{x:("x"in n?n.x:n.left)-e.x,y:("y"in n?n.y:n.top)-e.y}}(r,o),0===n.x&&0===n.y||Ft()&&!1!==t.respectReducedMotion?[2]:(u=t,l=Math.abs(n.x)>Math.abs(n.y)?"column":"row",void 0===u&&(u={}),i=Ft()?x(x({},Dt.REDUCED_MOTION),u):x(x({},"column"===l?Dt.COLUMN_REORDER:Dt.ROW_REORDER),u),Lt(e),function(n,e){n.style.transform="translate3d(".concat(e.x,"px, ").concat(e.y,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating")}(e,n),[4,Wt(e,i,t)]);case 1:return a.sent(),[2]}var u,l})})},Bt=function(n){var e=n.element,t=n.options;return C(void 0,void 0,void 0,function(){var n,r,o,i,a,u,l,c,s,d,f,v,h,p,w,m;return I(this,function(g){return n=t.startY,r=t.endY,o=t.finalY,a=void 0===(i=t.duration)?300:i,l=void 0===(u=t.easing)?"cubic-bezier(0.2, 0.0, 0.2, 1)":u,s=void 0===(c=t.delay)?0:c,d=t.onComplete,v=void 0===(f=t.respectReducedMotion)||f,Ft()&&v?(void 0!==o&&(e.style.transform="",e.style.top="".concat(o,"px")),d&&d(),[2]):(h=e.getBoundingClientRect(),w=n-(p=h.top),m=r-p,[2,new Promise(function(n){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating"),e.style.transform="translate3d(0, ".concat(w,"px, 0)"),e.style.transition="none",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.classList.add("st-animating"),e.style.transition="transform ".concat(a,"ms ").concat(l),s&&(e.style.transitionDelay="".concat(s,"ms")),e.style.transform="translate3d(0, ".concat(m,"px, 0)");var t=function(){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating"),void 0!==o&&(e.style.top="".concat(o,"px")),e.removeEventListener("transitionend",t),d&&d(),n()};e.addEventListener("transitionend",t),setTimeout(t,a+(s||0)+50)})])})})},zt=[],qt=function(n){var e=n.rows,t=n.rowGrouping,r=void 0===t?zt:t,o=n.getRowId,i=n.expandedRows,a=n.collapsedRows,l=n.expandedDepths,c=n.rowStateMap,s=n.hasLoadingRenderer,d=n.hasErrorRenderer,f=n.hasEmptyRenderer,v=n.headers,h=n.rowHeight,p=n.headerHeight,w=n.customTheme;return u(function(){if(!r||0===r.length){var n=e.map(function(n,e){var t=[e],r=[e];return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,rowId:K({row:n,getRowId:o,depth:0,index:e,rowPath:t,rowIndexPath:r,groupingKey:void 0}),rowPath:t,rowIndexPath:r,absoluteRowIndex:e,isLastGroupRow:!1}});return{flattenedRows:n,heightOffsets:[],paginatableRows:n,parentEndPositions:e.map(function(n,e){return e+1})}}var t=[],u=[],m=[],g=[],b=0,x=function(n,e,y,C,I){void 0===y&&(y=[]),void 0===C&&(C=[]),void 0===I&&(I=[]),n.forEach(function(n,S){var M,N,H=r[e],E=t.length,T=R(R([],y,!0),[S],!1),k=R(R([],C,!0),[S],!1),P=K({row:n,getRowId:o,depth:e,index:S,rowPath:T,rowIndexPath:k,groupingKey:H}),A=t.length,F={row:n,depth:e,displayPosition:b,groupingKey:H,position:E,isLastGroupRow:0===e,rowId:P,rowPath:T,rowIndexPath:k,absoluteRowIndex:E,parentIndices:I.length>0?R([],I,!0):void 0};t.push(F),u.push(F),b++;var D=U(P);if(J(D,e,l,i,a)&&r.length>e){var L=null==c?void 0:c.get(D),W=_(n,H),O=v.find(function(n){return n.expandable&&n.nestedTable});if((null==O?void 0:O.nestedTable)&&W.length>0){var q=t.length,G=(null===(M=O.nestedTable.customTheme)||void 0===M?void 0:M.rowHeight)||h,V=(null===(N=O.nestedTable.customTheme)||void 0===N?void 0:N.headerHeight)||p,j=B({childRowCount:W.length,rowHeight:G,headerHeight:V,customTheme:w}),Y=z({calculatedHeight:j,customHeight:O.nestedTable.height,customTheme:w});m.push([q,Y-h]);var X=R(R([],T,!0),[H],!1);t.push({row:{},depth:e+1,displayPosition:b-1,groupingKey:H,position:q,isLastGroupRow:!1,rowId:X,rowPath:X,rowIndexPath:k,nestedTable:{parentRow:n,expandableHeader:O,childAccessor:H,calculatedHeight:Y},absoluteRowIndex:q})}else if(L&&(L.loading||L.error||L.isEmpty)){if(L.loading&&s||L.error&&d||L.isEmpty&&f){var $=t.length,Q=R(R([],T,!0),[H],!1);t.push({row:{},depth:e+1,displayPosition:b-1,groupingKey:H,position:$,isLastGroupRow:!1,rowId:Q,rowPath:Q,rowIndexPath:k,stateIndicator:{parentRowId:D,parentRow:n,state:L},absoluteRowIndex:$,parentIndices:R(R([],I,!0),[A],!1)})}else if(L.loading&&!s){var Z=t.length,nn=R(R([],T,!0),[H,"loading-skeleton"],!1);t.push({row:{},depth:e+1,displayPosition:b-1,groupingKey:H,position:Z,isLastGroupRow:!1,rowId:nn,rowPath:nn,rowIndexPath:k,isLoadingSkeleton:!0,absoluteRowIndex:Z,parentIndices:R(R([],I,!0),[A],!1)})}}else if(W.length>0){var en=R(R([],T,!0),[H],!1),tn=R([],k,!0);x(W,e+1,en,tn,R(R([],I,!0),[A],!1))}}0===e&&g.push(t.length)})};return x(e,0,[],[],[]),{flattenedRows:t,heightOffsets:m,paginatableRows:u,parentEndPositions:g}},[e,r,o,i,a,l,c,s,d,f,v,h,p,w])},Gt={rowHeight:32,headerHeight:32,footerHeight:49,rowSeparatorWidth:1,borderWidth:1,pinnedBorderWidth:1,nestedGridBorderWidth:2,nestedGridPaddingTop:8,nestedGridPaddingBottom:8,nestedGridPaddingLeft:8,nestedGridPaddingRight:8,nestedGridMaxHeight:400,selectionColumnWidth:42},Vt={text:"Columns",searchEnabled:!0,searchPlaceholder:"Search columns...",allowColumnPinning:!0},jt=[{propName:"columnEditorText",replacement:"columnEditorConfig.text",message:"Use the columnEditorConfig object instead for better organization of column editor settings."},{propName:"expandIcon",replacement:"icons.expand",message:"Use the icons object instead for better organization of icon settings."},{propName:"filterIcon",replacement:"icons.filter",message:"Use the icons object instead for better organization of icon settings."},{propName:"headerCollapseIcon",replacement:"icons.headerCollapse",message:"Use the icons object instead for better organization of icon settings."},{propName:"headerExpandIcon",replacement:"icons.headerExpand",message:"Use the icons object instead for better organization of icon settings."},{propName:"nextIcon",replacement:"icons.next",message:"Use the icons object instead for better organization of icon settings."},{propName:"prevIcon",replacement:"icons.prev",message:"Use the icons object instead for better organization of icon settings."},{propName:"sortDownIcon",replacement:"icons.sortDown",message:"Use the icons object instead for better organization of icon settings."},{propName:"sortUpIcon",replacement:"icons.sortUp",message:"Use the icons object instead for better organization of icon settings."}],Kt=function(n,e){var t=[];return n.forEach(function(n){n.hide||(n.children&&n.children.length>0?t.push.apply(t,Kt(n.children,null!=e?e:n.pinned)):t.push(n))}),t},Ut=function(n,e){return e>=n.reduce(function(n,e){return n+Z(e)},0)},_t=function(n,e){var t=new Map,r=n.reduce(function(n,e){return n+("number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):150)},0);if(0===r)return t;var o=e/r;if(.01>Math.abs(o-1))return t;var i=0;return n.forEach(function(r,a){var u,l="number"==typeof r.width?r.width:"string"==typeof r.width&&r.width.endsWith("px")?parseFloat(r.width):150;a===n.length-1?u=e-i:i+=u=Math.round(l*o),t.set(r.accessor,u)}),t},Jt=function(n,e){var t,r=e.containerWidth,o=e.pinnedLeftWidth,i=e.pinnedRightWidth,a=e.mainBodyRef;if(!e.autoExpandColumns||0===r||e.isResizing)return n;t=a.current?a.current.clientWidth:Math.max(0,r-o-i);var u=n.filter(function(n){return"left"===n.pinned}),l=n.filter(function(n){return"right"===n.pinned}),c=n.filter(function(n){return!n.pinned}),s=Kt(u,"left"),d=Kt(l,"right"),f=Kt(c,void 0),v=s.length>0&&Ut(s,o),h=d.length>0&&Ut(d,i),p=f.length>0&&t>0&&Ut(f,t),w=new Map;if(v&&_t(s,o).forEach(function(n,e){return w.set(e,n)}),h&&_t(d,i).forEach(function(n,e){return w.set(e,n)}),p&&_t(f,t).forEach(function(n,e){return w.set(e,n)}),0===w.size)return n;var m=function(n,e){var t;if(n.hide)return n;var r=null!=e?e:n.pinned,o=null===(t=n.children)||void 0===t?void 0:t.map(function(n){return m(n,r)});if(!n.children||0===n.children.length){var i=w.get(n.accessor);return x(x({},n),void 0!==i?{width:i,children:o}:{children:o})}return x(x({},n),{children:o})};return n.map(function(n){return m(n,n.pinned)})},Yt=n(function(){return n("div",x({className:"st-empty-state"},{children:"No rows to display"}))},{}),Xt=function(e){var t=i(!1),r=t[0],a=t[1];return o(function(){!function(n){"production"!==process.env.NODE_ENV&&jt.forEach(function(e){var t=e.propName,r=e.replacement,o=e.message;if(void 0!==n[t]){var i='SimpleTable: The "'.concat(t,'" prop is deprecated and will be removed in a future version.'),a='Please use "'.concat(r,'" instead.'),u=o?"\n".concat(o):"",l=r.split("."),c=l[0],s=l[1],d="string"==typeof n[t]?JSON.stringify(n[t]):"<YourIcon />";console.error("".concat(i,"\n").concat(a).concat(u,"\n\nExample:\n<SimpleTable\n ").concat(c,"={{\n ").concat(s,": ").concat(d,"\n }}\n/>"))}})}(e)},[]),o(function(){a(!0)},[]),r?n($t,x({},e)):null},$t=function(e){var r=e.allowAnimations,c=void 0!==r&&r,s=e.autoExpandColumns,d=void 0!==s&&s,f=e.canExpandRowGroup,v=e.cellUpdateFlash,h=void 0!==v&&v,p=e.className,w=e.columnBorders,g=void 0!==w&&w,y=e.columnEditorConfig,S=void 0===y?Vt:y,N=e.columnEditorText,H=e.columnReordering,E=void 0!==H&&H,T=e.columnResizing,k=void 0!==T&&T,P=e.copyHeadersToClipboard,F=void 0!==P&&P,D=e.customTheme,L=e.defaultHeaders,W=e.editColumns,B=void 0!==W&&W,z=e.editColumnsInitOpen,q=void 0!==z&&z,_=e.emptyStateRenderer,J=e.enableHeaderEditing,$=void 0!==J&&J,Q=e.enableRowSelection,Z=void 0!==Q&&Q,nn=e.enableStickyParents,en=void 0!==nn&&nn,tn=e.errorStateRenderer,on=e.expandAll,an=void 0===on||on,ln=e.expandIcon,dn=e.externalFilterHandling,vn=void 0!==dn&&dn,hn=e.externalSortHandling,wn=void 0!==hn&&hn,gn=e.filterIcon,yn=e.footerRenderer,In=e.headerCollapseIcon,Nn=e.headerDropdown,En=e.headerExpandIcon,Tn=e.height,kn=e.hideFooter,Pn=void 0!==kn&&kn,An=e.hideHeader,Fn=void 0!==An&&An,Dn=e.icons,Ln=e.includeHeadersInCSVExport,Wn=void 0===Ln||Ln,On=e.initialSortColumn,Bn=e.initialSortDirection,zn=void 0===Bn?"asc":Bn,qn=e.isLoading,Gn=void 0!==qn&&qn,Vn=e.loadingStateRenderer,jn=e.maxHeight,Kn=e.nextIcon,Un=e.onCellClick,_n=e.onCellEdit,Jn=e.onColumnOrderChange,Yn=e.onColumnSelect,Xn=e.onColumnVisibilityChange,Zn=e.onColumnWidthChange,ne=e.onFilterChange,te=e.onGridReady,re=e.onHeaderEdit,oe=e.onLoadMore,ae=e.onNextPage,le=e.onPageChange,ce=e.onRowGroupExpand,se=e.onRowSelectionChange,de=e.onSortChange,fe=e.prevIcon,ve=e.quickFilter,he=e.rowButtons,pe=e.rowGrouping,we=e.getRowId,me=e.rows,ge=e.rowsPerPage,be=void 0===ge?10:ge,xe=e.selectableCells,ye=void 0!==xe&&xe,Ce=e.selectableColumns,Ie=void 0!==Ce&&Ce,Re=e.serverSidePagination,Se=void 0!==Re&&Re,Me=e.shouldPaginate,Ne=void 0!==Me&&Me,He=e.sortDownIcon,Ee=e.sortUpIcon,Te=e.tableEmptyStateRenderer,ke=void 0===Te?Yt:Te,Pe=e.tableRef,Ae=e.theme,Fe=void 0===Ae?"modern-light":Ae,De=e.totalRowCount,Le=e.useHoverRowBackground,We=void 0===Le||Le,Oe=e.useOddColumnBackground,Be=void 0!==Oe&&Oe,ze=e.useOddEvenRowBackground,Ge=void 0!==ze&&ze,Ve=u(function(){var e,t,r,o,i,a,u,l,c,s,d,f,v,h,p,w,m,g,b,x={drag:n(Sn,{className:"st-drag-icon"}),expand:n(xn,{className:"st-expand-icon"}),filter:n(Mn,{className:"st-header-icon"}),headerCollapse:n(xn,{className:"st-header-icon"}),headerExpand:n(bn,{className:"st-header-icon"}),next:n(xn,{className:"st-next-prev-icon"}),prev:n(bn,{className:"st-next-prev-icon"}),sortDown:n(Rn,{className:"st-header-icon"}),sortUp:n(Cn,{className:"st-header-icon"}),pinnedLeftIcon:n("div",{children:"L"}),pinnedRightIcon:n("div",{children:"R"})};return{drag:null!==(e=null==Dn?void 0:Dn.drag)&&void 0!==e?e:x.drag,expand:null!==(r=null!==(t=null==Dn?void 0:Dn.expand)&&void 0!==t?t:ln)&&void 0!==r?r:x.expand,filter:null!==(i=null!==(o=null==Dn?void 0:Dn.filter)&&void 0!==o?o:gn)&&void 0!==i?i:x.filter,headerCollapse:null!==(u=null!==(a=null==Dn?void 0:Dn.headerCollapse)&&void 0!==a?a:In)&&void 0!==u?u:x.headerCollapse,headerExpand:null!==(c=null!==(l=null==Dn?void 0:Dn.headerExpand)&&void 0!==l?l:En)&&void 0!==c?c:x.headerExpand,next:null!==(d=null!==(s=null==Dn?void 0:Dn.next)&&void 0!==s?s:Kn)&&void 0!==d?d:x.next,prev:null!==(v=null!==(f=null==Dn?void 0:Dn.prev)&&void 0!==f?f:fe)&&void 0!==v?v:x.prev,sortDown:null!==(p=null!==(h=null==Dn?void 0:Dn.sortDown)&&void 0!==h?h:He)&&void 0!==p?p:x.sortDown,sortUp:null!==(m=null!==(w=null==Dn?void 0:Dn.sortUp)&&void 0!==w?w:Ee)&&void 0!==m?m:x.sortUp,pinnedLeftIcon:null!==(g=null==Dn?void 0:Dn.pinnedLeftIcon)&&void 0!==g?g:x.pinnedLeftIcon,pinnedRightIcon:null!==(b=null==Dn?void 0:Dn.pinnedRightIcon)&&void 0!==b?b:x.pinnedRightIcon}},[Dn,ln,gn,In,En,Kn,fe,He,Ee]),je=u(function(){return x(x({},Gt),D)},[D]),Ke=u(function(){var n,e,t,r,o;return{text:null!==(e=null!==(n=null==S?void 0:S.text)&&void 0!==n?n:N)&&void 0!==e?e:Vt.text,searchEnabled:null!==(t=null==S?void 0:S.searchEnabled)&&void 0!==t?t:Vt.searchEnabled,searchPlaceholder:null!==(r=null==S?void 0:S.searchPlaceholder)&&void 0!==r?r:Vt.searchPlaceholder,allowColumnPinning:null!==(o=null==S?void 0:S.allowColumnPinning)&&void 0!==o?o:Vt.allowColumnPinning,searchFunction:null==S?void 0:S.searchFunction,rowRenderer:null==S?void 0:S.rowRenderer,customRenderer:null==S?void 0:S.customRenderer}},[S,N]),Ue=je.rowHeight,_e=je.headerHeight,Je=je.footerHeight,Ye=je.selectionColumnWidth;Be&&(Ge=!1),g&&(We=!1);var Xe=a(null),$e=a(null),Qe=a(null),Ze=a(null),nt=a(null),et=a(null),tt=a(null),rt=b(function(n){return n+1},0)[1],ot=i(new Map),it=ot[0],at=ot[1],ut=i(me),lt=ut[0],ct=ut[1],st=i(Gn),dt=st[0],ht=st[1],gt=a(Gn),bt=a(new Map);o(function(){ct(me);var n=new Map;me.forEach(function(e,t){var r=K({row:e,getRowId:we,depth:0,index:t,rowPath:[t],rowIndexPath:[t]}),o=U(r);n.set(o,t)}),bt.current=n},[me,we]),o(function(){var n=gt.current,e=Gn;e&&!n?ht(!0):!e&&n&&setTimeout(function(){ht(!1)},0),gt.current=Gn},[Gn]);var xt,yt,Ct,It,Rt,St,Ft,Lt,Wt,Ot,Bt=function(n){var e=n.tableBodyContainerRef,t=i(0),r=t[0],o=t[1];return m(function(){e.current&&o(e.current.offsetWidth-e.current.clientWidth)},[e]),{setScrollbarWidth:o,scrollbarWidth:r,tableBodyContainerRef:e}}({tableBodyContainerRef:et}),zt=Bt.scrollbarWidth,jt=Bt.setScrollbarWidth,Kt=Hn({headerContainerRef:tt,mainSectionRef:et,scrollbarWidth:zt}).isMainSectionScrollable,Ut=u(function(){if(dt&&0===lt.length){var n=Ne?be:10;return Kt&&(n+=1),Array.from({length:n},function(n,e){return{}})}return lt},[dt,lt,be,Kt,Ne]),_t=u(function(){return Qn(L)},[L]),Xt=i(1),$t=Xt[0],Qt=Xt[1],Zt=i(_t),nr=Zt[0],er=Zt[1],tr=i(!1),rr=tr[0],or=tr[1],ir=i(null),ar=ir[0],ur=ir[1],lr=i(q),cr=lr[0],sr=lr[1],dr=l(function(){var n=new Set,e=function(t){t.forEach(function(t){t.collapseDefault&&t.collapsible&&n.add(t.accessor),t.children&&e(t.children)})};return e(_t),n},[_t]),fr=i(dr),vr=fr[0],hr=fr[1];o(function(){er(_t)},[_t]);var pr=u(function(){var n,e=R([],nr,!0);return Z&&!(null===(n=null==nr?void 0:nr[0])||void 0===n?void 0:n.isSelectionColumn)&&(e=R([{accessor:"__row_selection__",label:"",width:Ye,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],e,!0)),e},[Z,nr,Ye]),wr=u(function(){return function(n){var e=new Set,t=function(n){for(var r,o=0,i=n;i.length>o;o++){var a=i[o];a.isEssential&&e.add(a.accessor+""),(null===(r=a.children)||void 0===r?void 0:r.length)&&t(a.children)}};return t(n),e}(pr)},[pr]),mr=i(0),gr=mr[0],br=mr[1],xr=i("none"),yr=xr[0],Cr=xr[1],Ir=function(n,e){var t=i(function(){return function(n,e){if(!e||0===e.length)return new Set;if(n){var t=Array.from({length:e.length},function(n,e){return e});return new Set(t)}return new Set}(n,e)}),r=t[0],a=t[1];return o(function(){a(e&&0!==e.length?function(n){var t=e.length,r=Array.from(n).filter(function(n){return t>n});return new Set(r)}:new Set)},[e]),{expandedDepths:r,setExpandedDepths:a}}(an,pe),Rr=Ir.expandedDepths,Sr=Ir.setExpandedDepths,Mr=i(new Map),Nr=Mr[0],Hr=Mr[1],Er=i(new Map),Tr=Er[0],kr=Er[1],Pr=function(){var n=i(""),e=n[0],t=n[1],r=a(null);o(function(){return e&&(r.current&&clearTimeout(r.current),r.current=setTimeout(function(){t("")},1e3)),function(){r.current&&clearTimeout(r.current)}},[e]);var u=l(function(n){t(n)},[]);return{announcement:e,announce:u}}(),Ar=Pr.announcement,Fr=Pr.announce,Dr=kt({effectiveHeaders:pr,headerHeight:_e,rowHeight:Ue,tableBodyContainerRef:et}),Lr=Dr.containerWidth,Wr=Dr.calculatedHeaderHeight,Or=Dr.maxHeaderDepth,Br=u(function(){var n=qe({headers:pr,containerWidth:Lr,collapsedHeaders:vr});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[pr,Lr,vr]),zr=Br.mainBodyWidth,qr=Br.pinnedLeftWidth,Gr=Br.pinnedRightWidth,Vr=Br.pinnedLeftContentWidth,jr=Br.pinnedRightContentWidth,Kr=function(n){var e=n.autoExpandColumns,t=n.containerWidth,r=n.pinnedLeftWidth,i=n.pinnedRightWidth,u=n.mainBodyRef,c=n.isResizing,s=n.setHeaders,d=a({autoExpandColumns:e,containerWidth:t,pinnedLeftWidth:r,pinnedRightWidth:i,mainBodyRef:u,isResizing:c});d.current={autoExpandColumns:e,containerWidth:t,pinnedLeftWidth:r,pinnedRightWidth:i,mainBodyRef:u,isResizing:c};var f=l(function(n){s(function(e){var t="function"==typeof n?n(e):n;return Jt(t,d.current)})},[s]),v=a(c);o(function(){v.current&&!c&&e&&s(function(n){return Jt(n,d.current)}),v.current=c},[c,e,s]);var h=a(t);return o(function(){t>0&&t!==h.current&&!c&&e&&s(function(n){return Jt(n,d.current)}),h.current=t},[t,c,e,s]),f}({autoExpandColumns:d,containerWidth:Lr,pinnedLeftWidth:qr,pinnedRightWidth:Gr,mainBodyRef:Qe,isResizing:rr,setHeaders:er}),Ur=function(n){var e=n.rows,t=n.headers,r=n.rowGrouping;return u(function(){if(!r||0===r.length)return e;var n=function(n){return A(n).filter(function(n){return n.aggregation})}(t);if(0===n.length)return e;var o=JSON.parse(JSON.stringify(e)),i=function(e,t){return void 0===t&&(t=0),e.map(function(e){var o=r[t],a=r[t+1],u=e[o];if(u&&j(u)){var l=i(u,t+1),c=x({},e);return c[o]=l,n.forEach(function(n){var e=Tt(l,n.accessor,n.aggregation,a);void 0!==e&&V(c,n.accessor,e)}),c}return e})};return i(o)},[e,t,r])}({rows:Ut,headers:nr,rowGrouping:pe}),_r=function(n){var e=n.rows,t=n.headers,r=n.quickFilter;return u(function(){if(!r||!r.text||""===r.text.trim())return e;var n=r.text,o=r.columns,i=r.caseSensitive,a=void 0!==i&&i,u=r.mode,l=void 0===u?"simple":u,c=r.useFormattedValue,s=void 0===c||c,d=t.filter(function(n){return!n.hide&&!n.excludeFromRender&&(o&&o.length>0?o.includes(n.accessor):!1!==n.quickFilterable)}),f="smart"===l?function(n){for(var e=[],t=0;n.length>t;){for(;n.length>t&&/\s/.test(n[t]);)t++;if(t>=n.length)break;if("-"!==n[t])if('"'!==n[t]){for(var r=t;n.length>t&&!/[\s:]/.test(n[t]);)t++;var o=n.substring(r,t);if(n.length>t&&":"===n[t]){for(var i=++t;n.length>t&&!/\s/.test(n[t]);)t++;(l=n.substring(i,t))&&e.push({type:"columnSpecific",value:l,column:o})}else o&&e.push({type:"word",value:o})}else{for(var a=++t;n.length>t&&'"'!==n[t];)t++;(l=n.substring(a,t))&&e.push({type:"phrase",value:l}),n.length>t&&'"'===n[t]&&t++}else{for(var u=++t;n.length>t&&!/\s/.test(n[t]);)t++;var l;(l=n.substring(u,t))&&e.push({type:"negation",value:l})}}return e}(n):null;return e.filter(function(e){if("smart"===l&&f){var t=new Set,r=new Map;f.forEach(function(n,e){"columnSpecific"===n.type&&n.column&&(r.has(n.column)||r.set(n.column,[]),r.get(n.column).push(e))});var o=[];d.forEach(function(n){try{var i;if(n.quickFilterGetter)i=n.quickFilterGetter({row:e,accessor:n.accessor});else{var u=G(e,n.accessor);if(s&&n.valueFormatter){var l=n.valueFormatter({accessor:n.accessor,colIndex:0,row:e,rowIndex:0,value:u});i=Array.isArray(l)?l.join(" "):l+""}else i=null==u?"":Array.isArray(u)?u.join(" "):u+""}o.push(i);var c=r.get(n.accessor);c&&c.forEach(function(n){var e=f[n],r=a?i:i.toLowerCase(),o=a?e.value:e.value.toLowerCase();r.includes(o)&&t.add(n)})}catch(e){console.warn("Quick filter error for column ".concat(n.accessor,":"),e)}});var i=a?o.join(" "):o.join(" ").toLowerCase();return f.forEach(function(n,e){if("columnSpecific"!==n.type){var r=a?n.value:n.value.toLowerCase();switch(n.type){case"word":case"phrase":i.includes(r)&&t.add(e);break;case"negation":i.includes(r)||t.add(e)}}}),t.size===f.length}return d.some(function(t){try{var r=void 0;if(t.quickFilterGetter)r=t.quickFilterGetter({row:e,accessor:t.accessor});else{var o=G(e,t.accessor);if(s&&t.valueFormatter){var i=t.valueFormatter({accessor:t.accessor,colIndex:0,row:e,rowIndex:0,value:o});r=Array.isArray(i)?i.join(" "):i+""}else r=null==o?"":Array.isArray(o)?o.join(" "):o+""}return function(n,e,t){if(!e)return!0;var r=t?n:n.toLowerCase(),o=t?e:e.toLowerCase();return r.includes(o)}(r,n,a)}catch(n){return console.warn("Quick filter error for column ".concat(t.accessor,":"),n),!1}})})},[e,t,r])}({rows:Ur,headers:pr,quickFilter:ve}),Jr=function(n){var e=n.rows,t=n.headers,r=n.externalFilterHandling,o=n.onFilterChange,a=n.announce,c=i({}),s=c[0],d=c[1],f=wt(t),v=u(function(){return Ht({externalFilterHandling:r,tableRows:e,filterState:s})},[e,s,r]),h=l(function(n){var e,t=x(x({},s),((e={})[n.accessor]=n,e));if(d(t),null==o||o(t),a){var r=f.get(n.accessor);r&&a("Filter applied to ".concat(r.label))}},[s,o,a,f]),p=l(function(n){var e=x({},s);if(delete e[n],d(e),null==o||o(e),a){var t=f.get(n);t&&a("Filter removed from ".concat(t.label))}},[s,o,a,f]),w=l(function(){d({}),null==o||o({}),a&&a("All filters cleared")},[o,a]),m=l(function(n){var t,o=x(x({},s),((t={})[n.accessor]=n,t));return Ht({externalFilterHandling:r,tableRows:e,filterState:o})},[s,e,r]);return{filteredRows:v,updateFilter:h,clearFilter:p,clearAllFilters:w,filters:s,computeFilteredRowsPreview:m}}({rows:_r,headers:pr,externalFilterHandling:vn,onFilterChange:ne,announce:Fr}),Yr=Jr.filters,Xr=Jr.updateFilter,$r=Jr.clearFilter,Qr=Jr.clearAllFilters,Zr=Jr.computeFilteredRowsPreview,no=function(n){var e=n.headers,t=n.tableRows,r=n.externalSortHandling,o=n.onSortChange,a=n.rowGrouping,c=n.initialSortColumn,s=n.initialSortDirection,d=n.announce,f=wt(e),v=l(function(){if(!c)return null;var n=f.get(c);return n?{key:n,direction:s||"asc"}:null},[f,c,s]),h=i(v),p=h[0],w=h[1],m=l(function(n){var e=n.groupingKeys,t=n.headers,r=n.sortColumn,o=pt({headers:t,rows:n.rows,sortColumn:r});return e&&0!==e.length?o.map(function(n){var o,i=e[0],a=n[i];if(j(a)){var u=m({rows:a,sortColumn:r,headers:t,groupingKeys:e.slice(1)});return x(x({},n),((o={})[i]=u,o))}return n}):o},[]),g=u(function(){return mt({externalSortHandling:r,tableRows:t,sortColumn:p,rowGrouping:a,headers:e,sortNestedRows:m})},[t,p,e,r,a,m]),b=l(function(n){if(!n)return w(null),void(null==o||o(null));var e=n.accessor,t=n.direction,r=f.get(e);if(r){var i=null;if(t)i={key:r,direction:t};else{var a=r.sortingOrder||["asc","desc",null],u=-1;p&&p.key.accessor===e&&(u=a.indexOf(p.direction));var l=a[(u+1)%a.length];i=null===l?null:{key:r,direction:l}}if(w(i),null==o||o(i),d)if(i){var c="asc"===i.direction?"ascending":"descending";d("Sorted by ".concat(r.label,", ").concat(c))}else d("Sort removed from ".concat(r.label))}},[p,f,o,d]),y=l(function(n){var o=function(e){for(var t=0,r=e;r.length>t;t++){var i=r[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=o(i.children);if(a)return a}}},i=o(e);if(!i)return t;var u=i.sortingOrder||["asc","desc",null],l=-1;p&&p.key.accessor===n&&(l=u.indexOf(p.direction));var c=u[(l+1)%u.length];return mt({externalSortHandling:r,tableRows:t,sortColumn:null===c?null:{key:i,direction:c},rowGrouping:a,headers:e,sortNestedRows:m})},[p,e,t,r,a,m]);return{sort:p,sortedRows:g,updateSort:b,computeSortedRowsPreview:y}}({headers:nr,tableRows:Jr.filteredRows,externalSortHandling:wn,onSortChange:de,rowGrouping:pe,initialSortColumn:On,initialSortDirection:zn,announce:Fr}),eo=no.sort,to=no.updateSort,ro=no.computeSortedRowsPreview,oo=qt({rows:no.sortedRows,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}),io=oo.flattenedRows,ao=oo.heightOffsets,uo=oo.paginatableRows,lo=oo.parentEndPositions,co=function(n){var e=n.tableRows,t=n.onRowSelectionChange,r=n.enableRowSelection,o=void 0!==r&&r,a=i(new Set),c=a[0],s=a[1],d=l(function(n){return!!o&&function(n,e){return e.has(n)}(n,c)},[c,o]),f=l(function(){return!!o&&function(n,e){return 0!==n.length&&n.filter(function(n){return n&&n.rowId}).every(function(n){return e.has(U(n.rowId))})}(e,c)},[e,c,o]),v=u(function(){return o?function(n){return n.size}(c):0},[c,o]),h=u(function(){return o?function(n,e){return n.filter(function(n){return!(!n||!n.rowId)&&e.has(U(n.rowId))}).map(function(n){return n.row})}(e,c):[]},[e,c,o]),p=l(function(n,r){if(o){var i=function(n,e){var t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t}(n,c);if(s(i),t){var a=e.find(function(e){return U(e.rowId)===n});a&&t({row:a.row,isSelected:r,selectedRows:i})}}},[c,e,t,o]),w=l(function(n){var r;o&&(n?(r=function(n){return new Set(n.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)}))}(e),t&&e.forEach(function(n){return t({row:n.row,isSelected:!0,selectedRows:r})})):(r=new Set,t&&c.forEach(function(n){var o=e.find(function(e){return U(e.rowId)===n});o&&t({row:o.row,isSelected:!1,selectedRows:r})})),s(r))},[e,t,c,o]),m=l(function(n){if(o){var e=d(n);p(n,!e)}},[d,p,o]),g=l(function(){if(o){if(t){var n=new Set;c.forEach(function(r){var o=e.find(function(n){return U(n.rowId)===r});o&&t({row:o.row,isSelected:!1,selectedRows:n})})}s(new Set)}},[c,e,t,o]);return{selectedRows:c,setSelectedRows:s,isRowSelected:d,areAllRowsSelected:f,selectedRowCount:v,selectedRowsData:h,handleRowSelect:p,handleSelectAll:w,handleToggleRow:m,clearSelection:g}}({tableRows:io,onRowSelectionChange:se,enableRowSelection:Z});xt=co.selectedRows,yt=co.setSelectedRows,Ct=co.isRowSelected,It=co.areAllRowsSelected,Rt=co.selectedRowCount,St=co.selectedRowsData,Ft=co.handleRowSelect,Lt=co.handleSelectAll,Wt=co.handleToggleRow,Ot=co.clearSelection;var so=qt({rows:Ur,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}).flattenedRows,fo=l(function(n){var e=Zr(n);return pe&&0!==pe.length?Y({rows:e,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}):e.map(function(n,e){return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,isLastGroupRow:!1,rowId:[e],rowPath:[e],absoluteRowIndex:e}})},[Zr,pe,we,Nr,Tr,Rr,it,Vn,tn,_,pr,Ue,_e,je]),vo=l(function(n){var e=ro(n);return pe&&0!==pe.length?Y({rows:e,rowGrouping:pe,getRowId:we,expandedRows:Nr,collapsedRows:Tr,expandedDepths:Rr,rowStateMap:it,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!tn,hasEmptyRenderer:!!_,headers:pr,rowHeight:Ue,headerHeight:_e,customTheme:je}):e.map(function(n,e){return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,isLastGroupRow:!1,rowId:[e],rowPath:[e],absoluteRowIndex:e}})},[ro,pe,we,Nr,Tr,Rr,it,Vn,tn,_,pr,Ue,_e,je]),ho=function(n){var e=n.height,t=n.maxHeight,r=n.rowHeight,o=n.totalRowCount,i=n.headerHeight,a=n.footerHeight;return u(function(){if(t){var n=Et(t);if(0===n)return;var u=i||r;if(n>=u+o*r+(a||0))return;return Math.max(0,n-u)}if(e){var l=Et(e);if(0!==l)return Math.max(0,l-r)}},[e,t,r,o,i,a])}({height:Tn,maxHeight:jn,rowHeight:Ue,shouldPaginate:Ne,rowsPerPage:be,totalRowCount:null!=De?De:uo.length,headerHeight:Wr,footerHeight:Ne&&!Pn?Je:void 0}),po=function(n){var e=n.allowAnimations,t=n.computeFilteredRowsPreview,r=n.computeSortedRowsPreview,o=n.contentHeight,c=n.currentPage,s=n.customTheme,d=n.enableStickyParents,f=n.flattenedRows,v=n.heightOffsets,h=n.originalFlattenedRows,p=n.parentEndPositions,w=n.rowHeight,g=n.rowsPerPage,b=n.scrollDirection,y=void 0===b?"none":b,C=n.scrollTop,I=n.serverSidePagination,S=n.shouldPaginate,N=n.rowGrouping,H=i(!1),E=H[0],T=H[1],k=i([]),P=k[0],A=k[1],F=a([]),D=a([]),L=u(function(){return M(w)},[w]),W=a(new Map),O=a(null),B=l(function(n,e){if(!S||I)return n.map(function(n,e){return x(x({},n),{position:e,absoluteRowIndex:e})});var t=(c-1)*g,r=c*g,o=0===t?0:e[t-1];return n.slice(o,r>e.length?n.length:e[r-1]).map(function(n,e){var t=n.nestedTable?n.absoluteRowIndex:S&&!I?o+e:e;return x(x({},n),{position:e,absoluteRowIndex:t})})},[c,g,I,S]);u(function(){if(0===W.current.size&&h.length>0){var n=new Map;h.forEach(function(e,t){var r=U(e.rowId);n.set(r,t)}),W.current=n}},[h]);var z=u(function(){return B(f,p)},[f,p,B]),q=u(function(){if(!v||0===v.length||!S||I)return v;var n=new Map;return z.forEach(function(e){e.nestedTable&&n.set(e.absoluteRowIndex,e.position)}),v.filter(function(e){return n.has(e[0])}).map(function(e){var t=e[1];return[n.get(e[0]),t]})},[v,z,S,I]),G=u(function(){if(q&&0!==q.length)return function(n,e,t,r){var o=e+r.rowSeparatorWidth,i=Array(n),a=new Map;t&&t.forEach(function(n){a.set(n[0],n[1])});for(var u=0,l=0;n>l;l++){i[l]=u,u+=o;var c=a.get(l);void 0!==c&&(u+=c)}return{rowTopPositions:i,totalHeight:u-r.rowSeparatorWidth}}(z.length,w,q,s)},[z.length,w,q,s]),V=u(function(){return void 0===o?z:rn({bufferRowCount:L,contentHeight:o,tableRows:z,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}).rendered.rows},[z,o,w,C,y,L,G]),j=u(function(){if(!d||void 0===o)return{stickyParents:[],regularRows:V,partiallyVisibleRows:[]};var n=rn({bufferRowCount:L,contentHeight:o,tableRows:z,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}),e=N?function(n,e,t,r,o){return un({allTableRows:n,renderedRows:e,fullyVisibleRows:t,partiallyVisibleRows:r,partiallyVisibleRowIndex:0,recursionDepth:0,stickyParents:[],rowGrouping:o})}(z,n.rendered.rows,n.fullyVisible.rows,n.partiallyVisible.rows,N):{stickyParents:[],regularRows:n.rendered.rows,partiallyVisibleRows:[]};return x(x({},e),{partiallyVisibleRows:n.partiallyVisible.rows})},[L,o,z,d,G,N,w,y,C,V]),K=j.stickyParents,_=j.regularRows,J=j.partiallyVisibleRows,Y=l(function(n,e){var t=new Set(n.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)})),r=new Set(e.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)}));return{staying:e.filter(function(n){var e=U(n.rowId);return t.has(e)}),entering:e.filter(function(n){var e=U(n.rowId);return!t.has(e)}),leaving:n.filter(function(n){var e=U(n.rowId);return!r.has(e)})}},[]),X=u(function(){if(0===F.current.length)return!1;var n=z.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)}),e=F.current.filter(function(n){return n&&n.rowId}).map(function(n){return U(n.rowId)});return n.length!==e.length||!n.every(function(n,t){return n===e[t]})},[z]);m(function(){if(!E){var n=function(){P.length>0&&A([])};if(!e||S)return n(),F.current=z,void(D.current=V);if(0===F.current.length)return n(),F.current=z,void(D.current=V);if(!X)return n(),F.current=z,void(D.current=V);O.current={tableRows:z,visibleRows:V},T(!0)}},[e,z,P.length,X,E,S,V]),m(function(){if(E&&O.current&&P.length>0){var n=setTimeout(function(){var n=O.current;T(!1),A([]),F.current=n.tableRows,D.current=n.visibleRows,O.current=null},Dt.ROW_REORDER.duration+100);return function(){return clearTimeout(n)}}},[E,P.length]);var $=u(function(){if(!e||S)return V;if(P.length>0){var n=new Map,t=new Map;return z.forEach(function(e){var r=U(e.rowId);n.set(r,e.position),t.set(r,e.displayPosition)}),P.map(function(e){var r=U(e.rowId),o=n.get(r),i=t.get(r);return void 0!==o&&void 0!==i?x(x({},e),{position:o,displayPosition:i}):e})}return V},[V,P,z,e,S]),Q=l(function(n){if(e&&!S&&void 0!==o){var r=t(n),i=B(r,[]),a=rn({bufferRowCount:L,contentHeight:o,tableRows:i,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}),u=Y(V,a.rendered.rows).entering.map(function(n){var e=U(n.rowId)+"";return z.find(function(n){return U(n.rowId)+""===e})||n}).filter(Boolean);u.length>0&&A(R(R([],V,!0),u,!0))}},[e,S,t,B,o,w,C,y,Y,z,V,L,G]),Z=l(function(n){if(e&&!S&&void 0!==o){var t=r(n),i=B(t,[]),a=rn({bufferRowCount:L,contentHeight:o,tableRows:i,rowHeight:w,scrollTop:C,scrollDirection:y,heightMap:G}),u=Y(V,a.rendered.rows).entering.map(function(n){var e=U(n.rowId)+"";return z.find(function(n){return U(n.rowId)+""===e})||n}).filter(Boolean);u.length>0&&A(R(R([],V,!0),u,!0))}},[e,S,r,B,o,w,C,y,Y,z,V,L,G]);return{currentTableRows:z,currentVisibleRows:V,isAnimating:E,prepareForFilterChange:Q,prepareForSortChange:Z,rowsToRender:$,stickyParents:K,regularRows:_,partiallyVisibleRows:J,paginatedHeightOffsets:q,heightMap:G}}({allowAnimations:c,computeFilteredRowsPreview:fo,computeSortedRowsPreview:vo,contentHeight:ho,currentPage:$t,customTheme:je,enableStickyParents:en,flattenedRows:io,heightOffsets:ao,originalFlattenedRows:so,paginatableRows:uo,parentEndPositions:lo,rowGrouping:pe,rowHeight:Ue,rowsPerPage:be,scrollDirection:yr,scrollTop:gr,serverSidePagination:Se,shouldPaginate:Ne}),wo=po.currentTableRows,mo=po.rowsToRender,go=po.prepareForFilterChange,bo=po.prepareForSortChange,xo=po.isAnimating,yo=po.stickyParents,Co=po.regularRows,Io=po.partiallyVisibleRows,Ro=po.paginatedHeightOffsets,So=po.heightMap,Mo=a(new Map),No=a(new Map),Ho=function(n){var e=n.selectableCells,t=n.headers,r=n.tableRows,c=n.onCellEdit,s=n.cellRegistry,d=n.collapsedHeaders,f=n.rowHeight,v=n.enableRowSelection,h=void 0!==v&&v,p=n.copyHeadersToClipboard,w=void 0!==p&&p,m=n.customTheme,g=i(new Set),b=g[0],x=g[1],y=i(new Set),R=y[0],S=y[1],M=i(null),N=M[0],H=M[1],E=i(null),T=E[0],k=E[1],P=i(new Set),A=P[0],F=P[1],D=i(new Set),L=D[0],W=D[1],O=i(!1),B=O[0],z=O[1],q=a(!1),j=a(null),K=a(null),_=a(new Set);K.current=T,_.current=b;var J=u(function(){var n=new Set;return b.forEach(function(e){var t=e.split("-");if(t.length>=2){var r=parseInt(t[1],10);isNaN(r)||n.add(r)}}),R.forEach(function(e){n.add(e)}),n},[b,R]),Y=u(function(){var n=new Set;return b.forEach(function(e){var t=e.split("-");if(t.length>=3){var r=t.slice(2).join("-");n.add(r)}}),R.size>0&&r.forEach(function(e){var t=U(e.rowId);n.add(t)}),n},[b,R,r]),$=u(function(){return t.flatMap(function(n){return X(n,d)})},[t,d]),Q=l(function(){var n=_.current;if(0!==n.size){var e=function(n,e,t,r){void 0===r&&(r=!1);var o=e.filter(function(n){return!n.hide&&!n.excludeFromRender}),i=new Map,a=new Map;o.forEach(function(n,e){i.set(e,n.accessor),a.set(e,n)});var u=Array.from(n).reduce(function(n,e){var r,o=e.split("-").map(Number),u=o[0],l=o[1];n[u]||(n[u]=[]);var c=i.get(l),s=a.get(l);if(c&&(null===(r=t[u])||void 0===r?void 0:r.row)){var d=t[u].row,f=G(d,c);if(!1!==(null==s?void 0:s.useFormattedValueForClipboard)&&(null==s?void 0:s.valueFormatter)){var v=s.valueFormatter({accessor:c,colIndex:l,row:d,rowIndex:u,value:f});n[u][l]=v}else n[u][l]=!s||"lineAreaChart"!==s.type&&"barChart"!==s.type?f:Array.isArray(f)?f.join(", "):""}else n[u][l]="";return n},{}),l=new Set;r&&Array.from(n).forEach(function(n){var e=n.split("-").map(Number);l.add(e[1])});var c="";r&&l.size>0&&(c=Array.from(l).sort(function(n,e){return n-e}).map(function(n){var e,t=a.get(n);return null!==(e=null==t?void 0:t.label)&&void 0!==e?e:""}).join("\t"));var s=Object.values(u).map(function(n){return Object.values(n).join("\t")}).join("\n");return r&&c?"".concat(c,"\n").concat(s):s}(n,$,r,w);navigator.clipboard.writeText(e),F(new Set(n)),setTimeout(function(){return F(new Set)},800)}},[$,r,w]),Z=l(function(){return C(void 0,void 0,void 0,function(){var n,e,t,o,i,a;return I(this,function(u){switch(u.label){case 0:if(!(n=K.current))return[2];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=u.sent())?(t=function(n,e,t,r,o,i){var a=new Set,u=new Set,l=n.split("\n").filter(function(n){return n.length>0});if(0===l.length)return{updatedCells:a,warningCells:u};var c=t.filter(function(n){return!n.hide&&!n.excludeFromRender}),s=e.rowIndex,d=e.colIndex;return l.forEach(function(n,e){n.split("\t").forEach(function(n,t){var l=s+e,f=d+t;if(r.length>l&&c.length>f){var v=r[l],h=c[f],p=U(v.rowId);if(null==h?void 0:h.isEditable){var w=n;if("number"===h.type){var m=+n;isNaN(m)||(w=m)}else if("boolean"===h.type)w="true"===n.toLowerCase()||"1"===n;else if("date"===h.type){var g=new Date(n);isNaN(g.getTime())||(w=g)}else"lineAreaChart"!==h.type&&"barChart"!==h.type||(w=n.split(",").map(function(n){var e=+n.trim();return isNaN(e)?0:e}));if(V(v.row,h.accessor,w),i){var b="".concat(p,"-").concat(h.accessor),x=i.get(b);x&&x.updateContent(w)}null==o||o({accessor:h.accessor,newValue:w,row:v.row,rowIndex:l});var y="".concat(l,"-").concat(f,"-").concat(p);a.add(y)}else{var C="".concat(l,"-").concat(f,"-").concat(p);u.add(C)}}})}),{updatedCells:a,warningCells:u}}(e,n,$,r,c,s),i=t.warningCells,(o=t.updatedCells).size>0&&(F(o),setTimeout(function(){return F(new Set)},800)),i.size>0&&(W(i),setTimeout(function(){return W(new Set)},800)),[3,4]):[2];case 3:return a=u.sent(),console.warn("Failed to paste from clipboard:",a),[3,4];case 4:return[2]}})})},[$,r,c,s]),nn=l(function(){var n=_.current;if(0!==n.size){var e=function(n,e,t,r,o){var i=new Set,a=new Set,u=e.filter(function(n){return!n.hide&&!n.excludeFromRender}),l=new Map;return u.forEach(function(n,e){l.set(e,n.accessor)}),Array.from(n).forEach(function(n){var e=n.split("-").map(Number),l=e[0],c=e[1];if(t.length>l&&u.length>c){var s=t[l],d=u[c],f=U(s.rowId);if(null==d?void 0:d.isEditable){var v;if(v="string"===d.type?"":"number"===d.type?null:"boolean"!==d.type&&("date"===d.type?null:"lineAreaChart"===d.type||"barChart"===d.type||Array.isArray(G(s.row,d.accessor))?[]:""),V(s.row,d.accessor,v),o){var h="".concat(f,"-").concat(d.accessor),p=o.get(h);p&&p.updateContent(v)}null==r||r({accessor:d.accessor,newValue:v,row:s.row,rowIndex:l}),i.add(n)}else a.add(n)}}),{deletedCells:i,warningCells:a}}(n,$,r,c,s),t=e.deletedCells,o=e.warningCells;t.size>0&&(F(t),setTimeout(function(){return F(new Set)},800)),o.size>0&&(W(o),setTimeout(function(){return W(new Set)},800))}},[$,r,c,s]),en=l(function(n,e){for(var t=new Set,o=Math.min(n.rowIndex,e.rowIndex),i=Math.max(n.rowIndex,e.rowIndex),a=Math.min(n.colIndex,e.colIndex),u=Math.max(n.colIndex,e.colIndex),l=o;i>=l;l++)for(var c=a;u>=c;c++)if(l>=0&&r.length>l){if(h&&0===c)continue;var s=U(r[l].rowId);t.add(sn({colIndex:c,rowIndex:l,rowId:s}))}S(new Set),H(null),_.current=t,K.current=e,x(t),k(e),setTimeout(function(){return cn(e,f,m)},0)},[r,f,h,m]),tn=l(function(n){if(n.rowIndex>=0&&r.length>n.rowIndex&&n.colIndex>=0&&(h?$.length:$.length-1)>=n.colIndex){var e=sn(n);S(new Set),H(null);var t=new Set([e]);_.current=t,K.current=n,x(t),k(n),setTimeout(function(){return cn(n,f,m)},0)}},[$.length,r.length,f,h,m]),rn=l(function(n,e){void 0===e&&(e=!1),_.current=new Set,K.current=null,x(new Set),k(null),S(function(t){var r=new Set(e?t:[]);return n.forEach(function(n){return r.add(n)}),r}),n.length>0&&H(n[n.length-1])},[]);!function(n){var e=n.copyToClipboard,t=n.deleteSelectedCells,r=n.enableRowSelection,i=void 0!==r&&r,a=n.initialFocusedCellRef,u=n.leafHeaders,l=n.pasteFromClipboard,c=n.selectCellRange,s=n.selectSingleCell,d=n.selectableCells,f=n.selectedCellsRef,v=n.setLastSelectedColumnIndex,h=n.setSelectedCells,p=n.setSelectedColumns,w=n.startCell,m=n.tableRows;o(function(){var n=function(n){if(d){var c=a.current;if(c&&0!==f.current.size){var s=document.activeElement;if(!(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement||"true"===(null==s?void 0:s.getAttribute("contenteditable")))){var R=c.rowIndex,S=c.colIndex,M=c.rowId;if(!n.ctrlKey&&!n.metaKey||"c"!==n.key){if((n.ctrlKey||n.metaKey)&&"v"===n.key)return n.preventDefault(),void l();if((n.ctrlKey||n.metaKey)&&"a"===n.key){n.preventDefault();for(var N=new Set,H=0;m.length>H;H++)for(var E=0;u.length>E;E++){var T=i?E+1:E,k=U(m[H].rowId);N.add("".concat(H,"-").concat(T,"-").concat(k))}return f.current=N,h(N),p(new Set),void v(null)}if("Delete"===n.key||"Backspace"===n.key)return n.preventDefault(),void t();var P=m[R];if((P?U(P.rowId):null)!==M){var A=m.findIndex(function(n){return U(n.rowId)===M});if(-1===A)return;R=A}var F=function(n,e,t){var r=n,o=e;return"up"===t?r=0:"down"===t?r=m.length-1:"left"===t?o=i?1:0:"right"===t&&(o=i?u.length:u.length-1),{rowIndex:r,colIndex:o}};if("ArrowUp"===n.key)n.preventDefault(),r(n,R,S,F);else if("ArrowDown"===n.key)n.preventDefault(),o(n,R,S,F);else if("ArrowLeft"===n.key||"Tab"===n.key&&n.shiftKey)n.preventDefault(),g(n,R,S,F);else if("ArrowRight"===n.key||"Tab"===n.key)n.preventDefault(),b(n,R,S,F);else if("Home"===n.key)n.preventDefault(),x(n,R);else if("End"===n.key)n.preventDefault(),y(n,R);else if("PageUp"===n.key)n.preventDefault(),C(n,R,S);else if("PageDown"===n.key)n.preventDefault(),I(n,R,S);else if("Escape"===n.key){var D=new Set;f.current=D,h(D),p(new Set),v(null),w.current=null}}else e()}}}},r=function(n,e,t,r){if(n.shiftKey){w.current||(w.current=a.current);var o=e-1;if((n.ctrlKey||n.metaKey)&&(o=r(e,t,"up").rowIndex),o>=0){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else e>0&&(o=e-1,(n.ctrlKey||n.metaKey)&&(o=r(e,t,"up").rowIndex),i=U(m[o].rowId),s({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},o=function(n,e,t,r){if(n.shiftKey){w.current||(w.current=a.current);var o=e+1;if((n.ctrlKey||n.metaKey)&&(o=r(e,t,"down").rowIndex),m.length>o){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else m.length-1>e&&(o=e+1,(n.ctrlKey||n.metaKey)&&(o=r(e,t,"down").rowIndex),i=U(m[o].rowId),s({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},g=function(n,e,t,r){if(n.shiftKey&&"ArrowLeft"===n.key){w.current||(w.current=a.current);var o=t-1;if(n.ctrlKey||n.metaKey)o=r(e,t,"left").colIndex;else if(i&&0===o)return;if(o>=0){var u=U(m[e].rowId);c(w.current,{rowIndex:e,colIndex:o,rowId:u})}}else if(t>0){if(o=t-1,(n.ctrlKey||n.metaKey)&&"ArrowLeft"===n.key)o=r(e,t,"left").colIndex;else if(i&&0===o)return;0>o||(u=U(m[e].rowId),s({rowIndex:e,colIndex:o,rowId:u}),w.current=null)}},b=function(n,e,t,r){var o=i?u.length:u.length-1;if(n.shiftKey&&"ArrowRight"===n.key){w.current||(w.current=a.current);var l=t+1;if((n.ctrlKey||n.metaKey)&&(l=r(e,t,"right").colIndex),o>=l){var d=U(m[e].rowId);c(w.current,{rowIndex:e,colIndex:l,rowId:d})}}else o>t&&(l=t+1,(n.ctrlKey||n.metaKey)&&"ArrowRight"===n.key&&(l=r(e,t,"right").colIndex),l>o||(d=U(m[e].rowId),s({rowIndex:e,colIndex:l,rowId:d}),w.current=null))},x=function(n,e,t){if(n.shiftKey){w.current||(w.current=a.current);var r=e,o=i?1:0;(n.ctrlKey||n.metaKey)&&(r=0);var u=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:u})}else r=e,o=i?1:0,(n.ctrlKey||n.metaKey)&&(r=0),u=U(m[r].rowId),s({rowIndex:r,colIndex:o,rowId:u}),w.current=null},y=function(n,e,t){if(n.shiftKey){w.current||(w.current=a.current);var r=e,o=i?u.length:u.length-1;(n.ctrlKey||n.metaKey)&&(r=m.length-1);var l=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:l})}else r=e,o=i?u.length:u.length-1,(n.ctrlKey||n.metaKey)&&(r=m.length-1),l=U(m[r].rowId),s({rowIndex:r,colIndex:o,rowId:l}),w.current=null},C=function(n,e,t){var r=Math.max(0,e-10);if(n.shiftKey){w.current||(w.current=a.current);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),s({rowIndex:r,colIndex:t,rowId:o}),w.current=null},I=function(n,e,t){var r=Math.min(m.length-1,e+10);if(n.shiftKey){w.current||(w.current=a.current);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),s({rowIndex:r,colIndex:t,rowId:o}),w.current=null};return document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}},[d,a,f,m,u,s,c,h,p,v,e,l,t,w,i])}({selectableCells:e,initialFocusedCellRef:K,selectedCellsRef:_,tableRows:r,leafHeaders:$,selectSingleCell:tn,selectCellRange:en,setSelectedCells:x,setSelectedColumns:S,setLastSelectedColumnIndex:H,copyToClipboard:Q,pasteFromClipboard:Z,deleteSelectedCells:nn,startCell:j,enableRowSelection:h});var on=l(function(n,e){var t=new Set,o=new Map;r.forEach(function(n,e){var t=U(n.rowId);o.set(t,e)});for(var i=o.get(n.rowId+""),a=o.get(e.rowId+""),u=void 0!==i?i:n.rowIndex,l=void 0!==a?a:e.rowIndex,c=Math.min(u,l),s=Math.max(u,l),d=Math.min(n.colIndex,e.colIndex),f=Math.max(n.colIndex,e.colIndex),v=c;s>=v;v++)for(var p=d;f>=p;p++)if(v>=0&&r.length>v){if(h&&0===p)continue;var w=U(r[v].rowId);t.add(sn({colIndex:p,rowIndex:v,rowId:w}))}_.current=t,x(t)},[r,h]),an=l(function(n,e){var t=document.querySelector(".st-body-container");if(!t)return null;var r=t.getBoundingClientRect(),o=Array.from(document.querySelectorAll(".st-cell[data-row-index][data-col-index]:not(.st-selection-cell)"));if(0===o.length)return null;var i=Math.max(r.left,Math.min(r.right,n)),a=Math.max(r.top,Math.min(r.bottom,e)),u=null,l=1/0;if(o.forEach(function(n){if(n instanceof HTMLElement){var e=n,t=e.getBoundingClientRect(),r=t.top+t.height/2,o=Math.sqrt(Math.pow(t.left+t.width/2-i,2)+Math.pow(r-a,2));l>o&&(l=o,u=e)}}),null!==u){var c=u,s=parseInt(c.getAttribute("data-row-index")||"-1",10),d=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(s>=0&&d>=0&&null!==f)return{rowIndex:s,colIndex:d,rowId:f}}return null},[]),un=l(function(n,e){var t=document.elementFromPoint(n,e);if(!t)return null;var r=t.closest(".st-cell");if(r instanceof HTMLElement){var o=parseInt(r.getAttribute("data-row-index")||"-1",10),i=parseInt(r.getAttribute("data-col-index")||"-1",10),a=r.getAttribute("data-row-id");if(o>=0&&i>=0&&null!==a)return{rowIndex:o,colIndex:i,rowId:a}}return an(n,e)},[an]),ln=l(function(n,e){var t=document.querySelector(".st-body-container");if(t){var r=t.getBoundingClientRect();r.top+50>e?t.scrollTop-=10*Math.min(3,1+Math.max(0,r.top-e)/100):e>r.bottom-50&&(t.scrollTop+=10*Math.min(3,1+Math.max(0,e-r.bottom)/100));var o=document.querySelector(".st-body-main");o&&(r.left+50>n?o.scrollLeft-=10*Math.min(3,1+Math.max(0,r.left-n)/100):n>r.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,n-r.right)/100)))}},[]),dn=l(function(n){var t=n.colIndex,r=n.rowIndex,o=n.rowId;if(e){q.current=!0,z(!0),j.current={rowIndex:r,colIndex:t,rowId:o};var i=sn({colIndex:t,rowIndex:r,rowId:o}),a=new Set([i]),u={rowIndex:r,colIndex:t,rowId:o};_.current=a,K.current=u,setTimeout(function(){S(new Set),H(null),x(a),k(u)},0);var l=null,c=null,s=null,d=0,f=function(){if(q.current&&j.current){if(null!==l&&null!==c){ln(l,c);var n=Date.now();if(n-d>=16){var e=un(l,c);e&&on(j.current,e),d=n}}s=requestAnimationFrame(f)}else null!==s&&(cancelAnimationFrame(s),s=null)},v=function(n){q.current&&j.current&&(l=n.clientX,c=n.clientY)},h=function(){q.current=!1,z(!1),null!==s&&(cancelAnimationFrame(s),s=null),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",h),s=requestAnimationFrame(f)}},[e,ln,un,on]),fn=l(function(n){e&&q.current&&j.current&&on(j.current,{colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId})},[e,on]),vn=l(function(n){var e=n.colIndex,t=sn({colIndex:e,rowIndex:n.rowIndex,rowId:n.rowId}),r=b.has(t),o=R.has(e);return r||o},[b,R]),hn=l(function(n){var e=n.colIndex,t=n.rowIndex,o=n.rowId;if(B)return"";var i=[],a=r[t-1],u=a?U(a.rowId):null,l=r[t+1],c=l?U(l.rowId):null,s=null!==u?{colIndex:e,rowIndex:t-1,rowId:u}:null,d=null!==c?{colIndex:e,rowIndex:t+1,rowId:c}:null,f={colIndex:e-1,rowIndex:t,rowId:o},v={colIndex:e+1,rowIndex:t,rowId:o};return(!s||!vn(s)||R.has(e)&&0===t)&&i.push("st-selected-top-border"),(!d||!vn(d)||R.has(e)&&t===r.length-1)&&i.push("st-selected-bottom-border"),vn(f)||i.push("st-selected-left-border"),vn(v)||i.push("st-selected-right-border"),i.join(" ")},[B,vn,r,R]),pn=u(function(){return T?function(n){return n.rowIndex===T.rowIndex&&n.colIndex===T.colIndex&&n.rowId===T.rowId}:function(){return!1}},[T]),wn=l(function(n){var e=sn({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return A.has(e)},[A]),mn=l(function(n){var e=sn({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return L.has(e)},[L]);return{getBorderClass:hn,handleMouseDown:dn,handleMouseOver:fn,isCopyFlashing:wn,isWarningFlashing:mn,isInitialFocusedCell:pn,isSelected:vn,lastSelectedColumnIndex:N,pasteFromClipboard:Z,selectColumns:rn,selectedCells:b,selectedColumns:R,setInitialFocusedCell:k,setSelectedCells:x,setSelectedColumns:S,deleteSelectedCells:nn,columnsWithSelectedCells:J,rowsWithSelectedCells:Y,startCell:j}}({selectableCells:ye,headers:pr,tableRows:wo,onCellEdit:_n,cellRegistry:Mo.current,collapsedHeaders:vr,rowHeight:Ue,enableRowSelection:Z,copyHeadersToClipboard:F,customTheme:je}),Eo=Ho.getBorderClass,To=Ho.handleMouseDown,ko=Ho.handleMouseOver,Po=Ho.isCopyFlashing,Ao=Ho.isInitialFocusedCell,Fo=Ho.isSelected,Do=Ho.isWarningFlashing,Lo=Ho.selectColumns,Wo=Ho.selectedCells,Oo=Ho.selectedColumns,Bo=Ho.setInitialFocusedCell,zo=Ho.setSelectedCells,qo=Ho.setSelectedColumns,Go=Ho.columnsWithSelectedCells,Vo=Ho.rowsWithSelectedCells,jo=Ho.startCell,Ko=a(bo);Ko.current=bo;var Uo=a(go);Uo.current=go;var _o=l(function(n){Ko.current(n),setTimeout(function(){to({accessor:n})},0)},[to]),Jo=l(function(n){Kr(n)},[Kr]),Yo=l(function(){Kr(L)},[L,Kr]);!function(n){var e=n.selectableColumns,t=n.selectedCells,r=n.selectedColumns,i=n.setSelectedCells,a=n.setSelectedColumns,u=n.activeHeaderDropdown,l=n.setActiveHeaderDropdown,c=n.startCell;o(function(){var n=function(n){var o=n.target;o.closest(".editable-cell-input")&&o.closest(".st-header-cell")||(u&&l&&(o.closest(".st-header-cell")||o.closest(".dropdown-content")||l(null)),o.closest(".st-cell")||e&&(o.classList.contains("st-header-cell")||o.classList.contains("st-header-label")||o.classList.contains("st-header-label-text"))||(t.size>0&&i(new Set),r.size>0&&a(new Set),c&&(c.current=null)))};return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[e,t,r,i,a,u,l,c])}({selectableColumns:Ie,selectedCells:Wo,selectedColumns:Oo,setSelectedCells:zo,setSelectedColumns:qo,activeHeaderDropdown:ar,setActiveHeaderDropdown:ur,startCell:jo}),function(n){var e=n.forceUpdate,t=n.tableBodyContainerRef,r=n.setScrollbarWidth,o=a(null);m(function(){var n=function(){null!==o.current&&clearTimeout(o.current),o.current=setTimeout(function(){o.current=null,e(),t.current&&r(t.current.offsetWidth-t.current.clientWidth)},150)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n),null!==o.current&&(clearTimeout(o.current),o.current=null)}},[e,t,r])}({forceUpdate:rt,tableBodyContainerRef:et,setScrollbarWidth:jt}),function(n){var e=n.onGridReady;o(function(){null==e||e()},[e])}({onGridReady:te}),function(n){var e=n.cellRegistryRef,t=n.clearAllFilters,r=n.clearFilter,i=n.currentPage,a=n.resetColumns,u=n.editColumns,l=n.essentialAccessors,c=n.expandedDepths,s=n.filters,d=n.flattenedRows,f=n.headerRegistryRef,v=n.headers,h=n.includeHeadersInCSVExport,p=n.onColumnOrderChange,w=n.onColumnVisibilityChange,m=n.onPageChange,g=n.paginatableRows,b=n.quickFilter,y=n.rowGrouping,S=n.rows,M=n.rowsPerPage,N=n.setCollapsedRows,H=n.setColumnEditorOpen,E=n.setCurrentPage,T=n.setExpandedDepths,k=n.setExpandedRows,P=n.setHeaders,A=n.sort,F=n.tableRef,D=n.totalRowCount,L=n.updateFilter,W=n.updateSort,B=n.visibleRows;o(function(){F&&(F.current={updateData:function(n){var t=n.accessor,r=n.rowIndex,o=n.newValue,i=null==S?void 0:S[r];if(i){var a=d.find(function(n){return n.absoluteRowIndex===r});if(a){var u=U(a.rowId),l=O({rowId:u,accessor:t}),c=e.current.get(l);c&&c.updateContent(o)}void 0!==G(i,t)&&V(i,t,o)}},setHeaderRename:function(n){var e=f.current.get(n.accessor+"");e&&e.setEditing(!0)},getVisibleRows:function(){return B},getAllRows:function(){return d},getHeaders:function(){return v},exportToCSV:function(n){!function(n,e,t,r){void 0===r&&(r=!0);var o=function(n,e,t){void 0===t&&(t=!0);var r=function(n){var e=[],t=function(n){for(var r=0,o=n;o.length>r;r++){var i=o[r];i.hide||i.isSelectionColumn||i.excludeFromCsv||(i.children&&i.children.length>0?(i.singleRowChildren&&e.push(i),t(i.children)):e.push(i))}};return t(n),e}(e),o=r.map(function(n){return Pt(n.label)}).join(","),i=n.map(function(n,e){var t=n.row;return r.map(function(n,r){var o=G(t,n.accessor);if(n.exportValueGetter){var i=n.valueFormatter?n.valueFormatter({accessor:n.accessor,colIndex:r,row:t,rowIndex:e,value:o}):void 0,a=n.exportValueGetter({accessor:n.accessor,colIndex:r,row:t,rowIndex:e,value:o,formattedValue:i});return Pt(a)}return!1!==n.useFormattedValueForCSV&&n.valueFormatter?(i=n.valueFormatter({accessor:n.accessor,colIndex:r,row:t,rowIndex:e,value:o}),Pt(i)):Pt(o)}).join(",")});return(t?R([o],i,!0):i).join("\n")}(n,e,r);!function(n,e){void 0===e&&(e="table-export.csv");var t=new Blob([n],{type:"text/csv;charset=utf-8;"}),r=document.createElement("a"),o=URL.createObjectURL(t);r.setAttribute("href",o),r.setAttribute("download",e),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(o)}(o,t)}(d,v,(void 0===n?{}:n).filename,h)},getSortState:function(){return A},applySortState:At(W),getPinnedState:function(){return ie(v)},applyPinnedState:At(function(n){P(function(e){var t=ue(e,n,l);return t?(null==p||p(t),t):(console.warn("applyPinnedState: left, main, and right accessor lists must include each root column exactly once."),e)})}),getFilterState:function(){return s},applyFilter:At(L),clearFilter:At(r),clearAllFilters:At(t),getCurrentPage:function(){return i},getTotalPages:function(){return Math.ceil((null!=D?D:g.length)/M)},setPage:function(n){return C(void 0,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return e=Math.ceil((null!=D?D:g.length)/M),1>n||n>e?[3,2]:(E(n),m?[4,m(n)]:[3,2]);case 1:t.sent(),t.label=2;case 2:return[2]}})})},expandAll:function(){var n=Array.from({length:(null==y?void 0:y.length)||0},function(n,e){return e});T(new Set(n)),k(new Map),N(new Map)},collapseAll:function(){T(new Set),k(new Map),N(new Map)},expandDepth:function(n){T(function(e){for(var t=new Set(e),r=0;n>=r;r++)t.add(r);return t}),k(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),N(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t})},collapseDepth:function(n){T(function(e){var t=new Set(e);return t.delete(n),t}),k(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),N(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t})},toggleDepth:function(n){T(function(e){var t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t}),k(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),N(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t})},setExpandedDepths:function(n){T(n)},getExpandedDepths:function(){return c},getGroupingProperty:function(n){return null==y?void 0:y[n]},getGroupingDepth:function(n){var e;return null!==(e=null==y?void 0:y.indexOf(n))&&void 0!==e?e:-1},toggleColumnEditor:function(n){u&&H(void 0!==n?n:function(n){return!n})},applyColumnVisibility:At(function(n){var e=function(t){return t.map(function(t){var r=t.accessor+"",o=r in n?!n[r]:t.hide;return ee(t,l)&&(o=!1),x(x({},t),{hide:o,children:t.children?e(t.children):t.children})})};P(function(n){return e(n)}),w&&w(n)}),resetColumns:a,setQuickFilter:function(n){(null==b?void 0:b.onChange)&&b.onChange(n)}})},[e,t,r,i,a,u,l,c,s,d,f,v,h,p,w,m,g,b,y,n.rowIndexMap,S,M,n.serverSidePagination,N,H,E,T,k,P,n.setRows,n.shouldPaginate,A,F,D,L,W,B])}({cellRegistryRef:Mo,clearAllFilters:Qr,clearFilter:$r,currentPage:$t,resetColumns:Yo,editColumns:B,essentialAccessors:wr,expandedDepths:Rr,filters:Yr,flattenedRows:io,headerRegistryRef:No,headers:pr,includeHeadersInCSVExport:Wn,onColumnOrderChange:Jn,onColumnVisibilityChange:Xn,onPageChange:le,paginatableRows:uo,quickFilter:ve,rowGrouping:pe,rowIndexMap:bt,rows:Ut,rowsPerPage:be,serverSidePagination:Se,setCollapsedRows:kr,setColumnEditorOpen:sr,setCurrentPage:Qt,setExpandedDepths:Sr,setExpandedRows:Hr,setHeaders:Kr,setRows:ct,shouldPaginate:Ne,sort:eo,tableRef:Pe,totalRowCount:De,updateFilter:Xr,updateSort:to,visibleRows:mo}),function(n){var e=n.filters,t=n.onFilterChange;o(function(){null==t||t(e)},[e,t])}({filters:Yr,onFilterChange:ne}),function(n){var e=n.sort,t=n.onSortChange,r=$n(e);o(function(){!e||(null==r?void 0:r.key.accessor)===e.key.accessor&&(null==r?void 0:r.direction)===e.direction?!e&&r&&(null==t||t(null)):null==t||t(e)},[e,r,t])}({sort:eo,onSortChange:de});var Xo=l(function(n){Uo.current(n),setTimeout(function(){Xr(n)},0)},[Xr]),$o=!dt&&0===wo.length,Qo=u(function(){return{activeHeaderDropdown:ar,allowAnimations:c,areAllRowsSelected:It,autoExpandColumns:d,canExpandRowGroup:f,cellRegistry:Mo.current,cellUpdateFlash:h,clearSelection:Ot,collapsedHeaders:vr,columnBorders:g,columnEditorConfig:Ke,columnReordering:E,columnResizing:k,containerWidth:Lr,columnsWithSelectedCells:Go,copyHeadersToClipboard:F,draggedHeaderRef:Xe,editColumns:B,emptyStateRenderer:_,essentialAccessors:wr,enableHeaderEditing:$,enableRowSelection:Z,errorStateRenderer:tn,expandedDepths:Rr,filters:Yr,icons:Ve,forceUpdate:rt,getBorderClass:Eo,handleApplyFilter:Xo,handleClearAllFilters:Qr,handleClearFilter:$r,handleMouseDown:To,handleMouseOver:ko,handleRowSelect:Ft,handleSelectAll:Lt,handleToggleRow:Wt,headerContainerRef:tt,headerDropdown:Nn,headerHeight:_e,headerRegistry:No.current,headers:pr,heightOffsets:Ro,hoveredHeaderRef:$e,includeHeadersInCSVExport:Wn,isAnimating:xo,isCopyFlashing:Po,isInitialFocusedCell:Ao,isLoading:dt,isResizing:rr,isRowSelected:Ct,isSelected:Fo,isWarningFlashing:Do,loadingStateRenderer:Vn,mainBodyRef:Qe,maxHeaderDepth:Or,onCellClick:Un,onCellEdit:_n,onColumnOrderChange:Jn,onColumnSelect:Yn,onColumnVisibilityChange:Xn,onColumnWidthChange:Zn,onHeaderEdit:re,onLoadMore:oe,onRowGroupExpand:ce,onSort:_o,onTableHeaderDragEnd:Jo,resetColumns:Yo,pinnedLeftRef:Ze,pinnedRightRef:nt,rowButtons:he,rowGrouping:pe,rowHeight:Ue,rowStateMap:it,rows:lt,rowsWithSelectedCells:Vo,scrollbarWidth:zt,selectColumns:Lo,selectableColumns:Ie,selectedColumns:Oo,selectedRowCount:Rt,selectedRows:xt,selectedRowsData:St,setActiveHeaderDropdown:ur,setCollapsedHeaders:hr,setHeaders:Kr,setInitialFocusedCell:Bo,setIsResizing:or,setRowStateMap:at,setSelectedCells:zo,setSelectedColumns:qo,setSelectedRows:yt,setExpandedDepths:Sr,setExpandedRows:Hr,setCollapsedRows:kr,shouldPaginate:Ne,tableBodyContainerRef:et,tableEmptyStateRenderer:ke,tableRows:wo,theme:Fe,customTheme:je,expandedRows:Nr,collapsedRows:Tr,useHoverRowBackground:We,useOddColumnBackground:Be,useOddEvenRowBackground:Ge}},[ar,c,It,d,f,h,Ot,vr,g,Ke,E,k,Lr,Go,F,Xe,B,_,wr,$,Z,tn,Rr,Yr,Ve,rt,Eo,Xo,Qr,$r,To,ko,Ft,Lt,Wt,tt,Nn,_e,pr,Ro,$e,Wn,xo,Po,Ao,dt,rr,Ct,Fo,Do,Vn,Qe,Or,Un,_n,Jn,Yn,Xn,Zn,re,oe,ce,_o,Jo,Yo,Ze,nt,he,pe,Ue,it,lt,Vo,zt,Lo,Ie,Oo,Rt,xt,St,ur,hr,Kr,Bo,or,at,zo,qo,yt,Sr,Hr,kr,Ne,et,ke,wo,Fe,je,Nr,Tr,We,Be,Ge]);return n(fn,x({value:Qo},{children:n(pn,{children:t("div",x({className:"simple-table-root st-wrapper theme-".concat(Fe," ").concat(null!=p?p:""," ").concat(g?"st-column-borders":""),role:"grid",style:jn?{maxHeight:jn,height:void 0===ho?"auto":jn}:Tn?{height:Tn}:{}},{children:[n(Nt,{children:t("div",x({className:"st-wrapper-container"},{children:[t("div",x({className:"st-content-wrapper"},{children:[n(ft,{calculatedHeaderHeight:Wr,hideHeader:Fn,pinnedLeftWidth:qr,pinnedRightWidth:Gr,setScrollTop:br,setScrollDirection:Cr,shouldShowEmptyState:$o,sort:eo,tableRows:wo,rowsToRender:mo,stickyParents:yo,regularRows:Co,partiallyVisibleRows:Io,heightMap:So}),n(Mt,{columnEditorConfig:Ke,editColumns:B,headers:nr,open:cr,setOpen:sr})]})),!$o&&n(vt,{mainBodyRef:Qe,mainBodyWidth:zr,pinnedLeftWidth:qr,pinnedRightWidth:Gr,pinnedLeftContentWidth:Vr,pinnedRightContentWidth:jr,tableBodyContainerRef:et}),!$o&&n(mn,{currentPage:$t,footerRenderer:yn,hideFooter:Pn,onPageChange:Qt,onNextPage:ae,onUserPageChange:le,rowsPerPage:be,shouldPaginate:Ne,totalPages:Math.ceil((null!=De?De:uo.length)/be),totalRows:null!=De?De:uo.length})]}))}),n("div",x({"aria-live":"polite","aria-atomic":"true",className:"st-sr-only"},{children:Ar}))]}))})}))},Qt=function(e){var r=e.data,o=e.width,i=void 0===o?"100%":o,a=e.height,u=void 0===a?30:a,l=e.color,c=e.fillColor,s=e.fillOpacity,d=void 0===s?.25:s,f=e.strokeWidth,v=void 0===f?1.5:f,h=e.className,p=void 0===h?"":h,w=e.min,m=e.max;if(!r||0===r.length)return null;var g=void 0!==w?w:Math.min.apply(Math,r),b=(void 0!==m?m:Math.max.apply(Math,r))-g||1,y=u,C=r.map(function(n,e){return{x:e/(r.length-1)*100,y:y-(n-g)/b*y}}).map(function(n,e){return"".concat(0===e?"M":"L"," ").concat(n.x,",").concat(n.y)}).join(" "),I="\n ".concat(C,"\n L ").concat(100,",").concat(y,"\n L 0,").concat(y,"\n Z\n ");return t("svg",x({width:i,height:u,viewBox:"0 0 100 ".concat(y),preserveAspectRatio:"none",className:"st-line-area-chart ".concat(p),style:{display:"block"},shapeRendering:"geometricPrecision"},{children:[n("path",{d:I,fill:c||"var(--st-chart-fill-color)",fillOpacity:d,stroke:"none"}),n("path",{d:C,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round"})]}))},Zt=Object.freeze({__proto__:null,default:Qt}),nr=function(e){var t=e.data,r=e.width,o=void 0===r?"100%":r,i=e.height,a=void 0===i?30:i,u=e.color,l=e.gap,c=void 0===l?2:l,s=e.className,d=void 0===s?"":s,f=e.min,v=e.max;if(!t||0===t.length)return null;var h=void 0!==f?f:Math.min.apply(Math,t),p=void 0!==v?v:Math.max.apply(Math,t),w=p-h||1,m=a,g=(100-c*(t.length-1))/t.length,b=0>h,y=b?m*(p/w):m;return n("svg",x({width:o,height:a,viewBox:"0 0 100 ".concat(m),preserveAspectRatio:"none",className:"st-bar-chart ".concat(d),style:{display:"block"},shapeRendering:"crispEdges"},{children:t.map(function(e,t){var r=t*(g+c),o=(e-h)/w*m,i=m-o,a=o;return b&&(0>e?(a=Math.abs(e)/w*m,i=y):i=y-(a=e/w*m)),n("rect",{x:r,y:i,width:g,height:a,fill:u||"var(--st-chart-color)",rx:.5},t)})}))},er=Object.freeze({__proto__:null,default:nr});export{Dt as A,nr as B,In as C,Rn as D,Mn as F,Qt as L,S as R,Xt as S,y as _,wn as a,$n as b,M as c,x as d,Bt as e,Ot as f,gn as g,bn as h,xn as i,yn as j,Cn as k,Sn as l,Nn as m,vn as u};
|
|
2
|
+
//# sourceMappingURL=index-2e99c911.js.map
|