simple-table-core 2.2.0 → 2.2.3
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-eba636cf.js → Animate-a18785a9.js} +2 -2
- package/dist/Animate-a18785a9.js.map +1 -0
- package/dist/{DatePicker-6d2d5608.js → DatePicker-8d3a0d83.js} +2 -2
- package/dist/DatePicker-8d3a0d83.js.map +1 -0
- package/dist/cjs/{Animate-878a7aea.js → Animate-300ac2c9.js} +2 -2
- package/dist/cjs/Animate-300ac2c9.js.map +1 -0
- package/dist/cjs/{DatePicker-e468a75e.js → DatePicker-7dba57a6.js} +2 -2
- package/dist/cjs/DatePicker-7dba57a6.js.map +1 -0
- package/dist/cjs/components/simple-table/NestedGridRow.d.ts +17 -0
- package/dist/cjs/components/simple-table/SimpleTable.d.ts +1 -93
- package/dist/cjs/context/TableContext.d.ts +4 -0
- package/dist/cjs/hooks/useFlattenedRows.d.ts +13 -2
- package/dist/cjs/hooks/useSelection.d.ts +3 -1
- package/dist/cjs/hooks/useTableAPI.d.ts +3 -1
- package/dist/cjs/hooks/useTableRowProcessing.d.ts +8 -1
- package/dist/cjs/index-7f1ba462.js +2 -0
- package/dist/cjs/index-7f1ba462.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/cjs/types/CustomTheme.d.ts +26 -0
- package/dist/cjs/types/HeaderObject.d.ts +2 -0
- package/dist/cjs/types/SimpleTableProps.d.ts +91 -0
- package/dist/cjs/types/TableRefType.d.ts +2 -0
- package/dist/cjs/types/TableRow.d.ts +7 -0
- package/dist/cjs/utils/cellScrollUtils.d.ts +2 -1
- package/dist/cjs/utils/infiniteScrollUtils.d.ts +71 -5
- package/dist/cjs/utils/rowUtils.d.ts +22 -2
- package/dist/components/simple-table/NestedGridRow.d.ts +17 -0
- package/dist/components/simple-table/SimpleTable.d.ts +1 -93
- package/dist/context/TableContext.d.ts +4 -0
- package/dist/hooks/useFlattenedRows.d.ts +13 -2
- package/dist/hooks/useSelection.d.ts +3 -1
- package/dist/hooks/useTableAPI.d.ts +3 -1
- package/dist/hooks/useTableRowProcessing.d.ts +8 -1
- package/dist/index-80318b04.js +2 -0
- package/dist/index-80318b04.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.es.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/CustomTheme.d.ts +26 -0
- package/dist/types/HeaderObject.d.ts +2 -0
- package/dist/types/SimpleTableProps.d.ts +91 -0
- package/dist/types/TableRefType.d.ts +2 -0
- package/dist/types/TableRow.d.ts +7 -0
- package/dist/utils/cellScrollUtils.d.ts +2 -1
- package/dist/utils/infiniteScrollUtils.d.ts +71 -5
- package/dist/utils/rowUtils.d.ts +22 -2
- package/package.json +1 -1
- package/src/styles/base.css +7 -0
- package/dist/Animate-eba636cf.js.map +0 -1
- package/dist/DatePicker-6d2d5608.js.map +0 -1
- package/dist/cjs/Animate-878a7aea.js.map +0 -1
- package/dist/cjs/DatePicker-e468a75e.js.map +0 -1
- package/dist/cjs/index-0bd94a48.js +0 -2
- package/dist/cjs/index-0bd94a48.js.map +0 -1
- package/dist/index-84d0a21e.js +0 -2
- package/dist/index-84d0a21e.js.map +0 -1
package/dist/index-84d0a21e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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,isValidElement as m,useLayoutEffect 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=30,E=function(n){return 480>n?.3:768>n?.4:.8},H="parentExpanded",k=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},T=function(n){return n.flatMap(function(n){var e=[n];return n.children&&n.children.length>0&&e.push.apply(e,T(n.children)),e})},A=function(n){return void 0===n&&(n=0),n?n+1:0},D=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},F=function(n){var e=n.header,t=n.pinned,r=n.headers,o=n.collapsedHeaders;return e.hide||e.excludeFromRender||(t||e.pinned)&&e.pinned!==t?null:!(r&&o&&function(n,e,t){var r=function(n,e){for(var t=0,r=T(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}(e,n.accessor);if(r){var o=t.has(r.accessor),i=n.showWhen||H;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(e,r,o))||null},P=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},L=function(n,e){return n.hide?[]:n.children&&0!==n.children.length?e&&e.has(n.accessor)?n.children.filter(function(n){var e=n.showWhen||H;return"parentCollapsed"===e||"always"===e}).flatMap(function(n){return L(n,e)}):n.children.filter(function(n){var e=n.showWhen||H;return"parentExpanded"===e||"always"===e}).flatMap(function(n){return L(n,e)}):[n]},O=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(D({accessor:n.accessor,rowId:"header"}));return(null==e?void 0:e.offsetWidth)||150},W=function(n){var e,t=n.width;"string"==typeof t&&t.includes("fr")&&(n.width=(null===(e=document.getElementById(D({accessor:n.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth)||150),n.children&&n.children.length>0&&n.children.forEach(function(n){W(n)})},B=function(n){return"number"==typeof n.minWidth?n.minWidth:40},q=function(n,e){var t=[];return n.forEach(function(n){n.hide||t.push.apply(t,L(n,e))}),t},z=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=z(e),r=t.index,o=n[t.key];return null!==r&&Array.isArray(o)&&(o=o[r]),o}},n):n[e]},j=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=z(o[a]),l=u.key,c=u.index;if(null==i[l]){var s=z(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=z(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},K=function(n){return Array.isArray(n)&&n.length>0&&"object"==typeof n[0]&&null!==n[0]},V=function(n){return n.join("-")},_=function(n,e){var t=n[e];return K(t)?t:[]},U=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},J=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.displayPositionOffset,l=void 0===u?0:u,c=n.rowStateMap,s=n.hasLoadingRenderer,d=void 0!==s&&s,f=n.hasErrorRenderer,v=void 0!==f&&f,h=n.hasEmptyRenderer,p=void 0!==h&&h,w=[],m=function(n,e,i,u,s){void 0===i&&(i=0),void 0===u&&(u=l),void 0===s&&(s=[]);var f=i,h=u;return n.forEach(function(i,u){var l=a[e],g=R(R([],s,!0),[u],!1),b=V(g);if(w.push({row:i,depth:e,displayPosition:h,groupingKey:l,position:f,isLastGroupRow:0===e&&u===n.length-1,rowPath:g,absoluteRowIndex:f}),f++,h++,U(b,e,t,r,o)&&a.length>e){var x=null==c?void 0:c.get(b),y=_(i,l);if(x&&(x.loading||x.error||x.isEmpty))x.loading&&d||x.error&&v||x.isEmpty&&p?(w.push({row:{},depth:e+1,displayPosition:h,groupingKey:l,position:f,isLastGroupRow:!1,rowPath:R(R([],g,!0),[l],!1),stateIndicator:{parentRowId:b,state:x},absoluteRowIndex:f}),f++,h++):x.loading&&!d&&(w.push({row:{},depth:e+1,displayPosition:h,groupingKey:l,position:f,isLastGroupRow:!1,rowPath:R(R([],g,!0),[l,"loading-skeleton"],!1),isLoadingSkeleton:!0,absoluteRowIndex:f}),f++,h++);else if(y.length>0){var C=R(R([],g,!0),[l],!1);f=m(y,e+1,f,h,C)}}}),f};return m(n.rows,void 0===e?0:e,0,l),w},X=function(n){var e=n.contentHeight,t=n.scrollTop,r=n.tableRows,o=n.scrollDirection,i=void 0===o?"none":o,a=n.rowHeight+1,u=n.bufferRowCount*a,l=u,c=u;"down"===i?(l=Math.max(a,.1*u),c=.9*u):"up"===i&&(l=.9*u,c=Math.max(a,.1*u));var s=t+e+c,d=Math.max(0,Math.floor(Math.max(0,t-l)/a)),f=Math.min(r.length,Math.ceil(s/a)),v=t+e,h=Math.max(0,Math.ceil(t/a)),p=Math.min(r.length,Math.floor(v/a)),w=t+e,m=Math.max(0,Math.floor(t/a)),g=Math.min(r.length,Math.ceil(w/a));return{rendered:{startIndex:d,endIndex:f,rows:r.slice(d,f)},fullyVisible:{startIndex:h,endIndex:p,rows:r.slice(h,p)},partiallyVisible:{startIndex:m,endIndex:g,rows:r.slice(m,g)}}},Y=function(n){return X({bufferRowCount:n.bufferRowCount,contentHeight:n.contentHeight,rowHeight:n.rowHeight,scrollTop:n.scrollTop,tableRows:n.tableRows,scrollDirection:n.scrollDirection}).rendered.rows},$=function(n){return n.position*(n.rowHeight+1)-1},Z=function(n){return n.position*(n.rowHeight+1)},Q=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)}},nn=function(n,e,t){var r=document.querySelector(".st-body-container"),o=document.querySelector(".st-body-main");if(r){var i=e+1,a=document.querySelector('.st-cell[data-row-index="'.concat(n.rowIndex,'"][data-col-index="').concat(n.colIndex,'"][data-row-id="').concat(n.rowId,'"]'));if(a&&t){var u=function(n,e,t,r){var o=X({bufferRowCount:0,contentHeight:e.clientHeight,rowHeight:t,scrollTop:e.scrollTop,tableRows:r,scrollDirection:"none"}).fullyVisible;return n>=o.startIndex&&o.endIndex>n}(n.rowIndex,r,e,t);if(u)return void Q(a,r,o)}if(!a)return r.scrollTop=Math.max(0,n.rowIndex*i-r.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&&Q(e,r,o)},100);Q(a,r,o)}},en=function(n){var e=n.colIndex,t=n.rowId;return"".concat(n.rowIndex,"-").concat(e,"-").concat(t)},tn=c(void 0),rn=function(e){return n(tn.Provider,x({value:e.value},{children:e.children}))},on=function(){var n=s(tn);if(void 0===n)throw Error("useTableContext must be used within a TableProvider");return n},an=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=on(),w=p.nextIcon,m=p.prevIcon,g=i(!0),b=g[0],y=g[1],R=o>1,S=v>o,M=o===v,N=Math.min((o-1)*d+1,h),E=Math.min(o*d,h),H=!R,k=!S&&!c||!b&&M,T=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]}})})},A=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 y(!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]}})})},D=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:N,endRow:E,onPageChange:D,onNextPage:A,onPrevPage:T,hasNextPage:!k,hasPrevPage:!H,nextIcon:w,prevIcon:m})});var F=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);for(var r=n;e>=r;r++)t.push(r);return v-1>e&&(t.push(-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 ",N," to ",E," of ",h.toLocaleString()," results"]}))})),t("div",x({className:"st-footer-pagination"},{children:[F.map(function(e,t){return 0>e?n("span",x({className:"st-page-ellipsis"},{children:"..."}),t):n("button",x({onClick:function(){return D(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(H?"disabled":""),onClick:T,disabled:H,"aria-label":"Go to previous page"},{children:m})),n("button",x({className:"st-next-prev-btn ".concat(k?"disabled":""),onClick:A,disabled:k,"aria-label":"Go to next page"},{children:w}))]}))]}))},un=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"})}))},ln=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"})}))},cn=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"})}))},sn=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"})}))},dn=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"})}))},fn=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"})}))},vn=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"})}))},hn=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"})}))},pn=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"})}))},wn=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=new ResizeObserver(function(){r()});return o.observe(n),function(){n&&o.unobserve(n)}}},[e,t]),{isMainSectionScrollable:u}},mn=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=on().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},gn=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}))},bn=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(mn,x({open:a,onClose:function(){r()},setOpen:u,width:120},{children:[n(gn,x({isSelected:!0===c,onClick:function(){return d(!0)}},{children:"True"})),n(gn,x({isSelected:!1===c,onClick:function(){return d(!1)}},{children:"False"}))]}))},xn=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()}})},yn=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()}})},Cn=d(function(){return import("./Animate-eba636cf.js")}),In=d(function(){return import("./DatePicker-6d2d5608.js")}),Rn=d(function(){return Promise.resolve().then(function(){return ct})}),Sn=d(function(){return Promise.resolve().then(function(){return dt})}),Mn=function(e){var t=y(e,["parentRef","tableRow"]);return n(f,x({fallback:n("div",x({},t))},{children:n(Cn,x({},e))}))},Nn=function(e){return n(f,x({fallback:n("div",x({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:n(In,x({},e))}))},En=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(Rn,x({},e))}))},Hn=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(Sn,x({},e))}))},kn=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)},Tn=function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0)},An=function(n){if(!n)return new Date;if("string"==typeof n)return kn(n);if("number"==typeof n){var e=new Date(n);return isNaN(e.getTime())?new Date:Tn(e)}return n instanceof Date?Tn(n):new Date},Dn=function(n){return n?kn(""+n):new Date},Fn=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(mn,x({open:i,onClose:l,setOpen:a,overflow:"hidden",width:240},{children:n(Nn,{value:Dn(u),onChange:function(n){var e=n.toISOString().split("T")[0];r(e),a(!1),t()},onClose:l})}))},Pn=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(mn,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(gn,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)})}))}))},Ln=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(bn,{onBlur:c,onChange:function(n){return o(n)},open:!0,setOpen:i,value:l}):"date"===u?n(Fn,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?n(Pn,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?n(yn,{defaultValue:l,onBlur:c,onChange:function(n){var e=""===n?0:parseFloat(n);o(isNaN(e)?0:e)}}):n(xn,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},On=0,Wn=function(){return function(n){var e=n.callback,t=n.callbackProps,r=n.limit,o=Date.now();0!==On&&r>o-On||(On=o,e(t))}},Bn=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})},Gn=Date.now(),jn={screenX:0,screenY:0},Kn=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=Kn(o.children,e,R(R([],t,!0),[r],!1));if(i)return i}}return null},Vn=function(n){return"left"===n.pinned?"left":"right"===n.pinned?"right":"main"};var _n=function(n){var e=n.draggedHeaderRef,t=n.headers,r=n.hoveredHeaderRef,o=n.onColumnOrderChange,i=n.onTableHeaderDragEnd,a=on().setHeaders,u=Bn(t);return{handleDragStart:function(n){e.current=n,Gn=Date.now()},handleDragOver:function(n){var o=n.event,a=n.hoveredHeader;if(o.preventDefault(),t&&e.current){var l=o.currentTarget.getAnimations().some(function(n){return"running"===n.playState}),c=o.screenX,s=o.screenY,d=Math.sqrt(Math.pow(c-jn.screenX,2)+Math.pow(s-jn.screenY,2));r.current=a;var f,v=e.current,h=!1;if(Vn(v)!==Vn(a))f=(I=function(n,e,t){var r,o,i=qn(n),a=!1;try{var u=Vn(t),l=i.findIndex(function(n){return n.accessor===e.accessor}),c=i.findIndex(function(n){return n.accessor===t.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var s=i.splice(l,1)[0],d=(r=u,o=x({},s),"left"===r?o.pinned="left":"right"===r?o.pinned="right":delete o.pinned,o);i.splice(c,0,d)}catch(n){console.error("Error in insertHeaderAcrossSections:",n),a=!0}return{newHeaders:i,emergencyBreak:a}}(t,v,a)).newHeaders,h=I.emergencyBreak;else{var p=t,w=Kn(p,v.accessor),m=Kn(p,a.accessor);if(!w||!m)return;var g=w.length,b=m.length,y=m;if(g!==b){var C=b-g;C>0&&(y=m.slice(0,-C))}var I=function(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}}(p,w,y);f=I.newHeaders,h=I.emergencyBreak}if(!(l||a.accessor===v.accessor||10>d||JSON.stringify(f)===JSON.stringify(t)||h)){var R=Date.now();JSON.stringify(f)===JSON.stringify(u)&&(1500>R-Gn||40>d)||(Gn=R,jn={screenX:c,screenY:s},i(f))}}},handleDragEnd:function(){e.current=null,r.current=null,setTimeout(function(){a(function(n){return R([],n,!0)}),null==o||o(t)},10)}}},Un=function(e){var r=e.checked,o=void 0!==r&&r,i=e.children,a=e.onChange;return t("label",x({className:"st-checkbox-label"},{children:[n("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},onKeyDown:function(n){" "===n.key&&n.stopPropagation()},type:"checkbox","aria-label":e.ariaLabel,"aria-checked":o}),n("span",x({className:"st-checkbox-custom ".concat(o?"st-checked":""),"aria-hidden":"true"},{children:o&&n(fn,{className:"st-checkbox-checkmark"})})),i]}))},Jn=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(En,x({data:t},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(r)?(t=r.filter(function(n){return"number"==typeof n})).length>0?n(Hn,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)?An(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):r},Xn=r.memo(function(r){var c=r.borderClass,s=r.colIndex,d=r.displayRowNumber,f=r.header,v=r.isHighlighted,h=r.isInitialFocused,p=r.nestedIndex,w=r.parentHeader,m=r.rowIndex,g=r.tableRow,b=on(),y=b.canExpandRowGroup,C=b.cellRegistry,I=b.cellUpdateFlash,R=b.collapsedRows,S=b.columnBorders,M=b.draggedHeaderRef,N=b.enableRowSelection,E=b.expandedDepths,H=b.expandedRows,k=b.expandIcon,T=b.handleMouseDown,A=b.handleMouseOver,F=b.handleRowSelect,L=b.headers,O=b.hoveredHeaderRef,W=b.isCopyFlashing,B=b.isLoading,q=b.isRowSelected,z=b.isWarningFlashing,_=b.onCellEdit,J=b.onCellClick,X=b.onRowGroupExpand,Y=b.onTableHeaderDragEnd,$=b.rowButtons,Z=b.rowGrouping,Q=b.setCollapsedRows,nn=b.setExpandedRows,en=b.setRowStateMap,tn=b.rowsWithSelectedCells,rn=b.selectedColumns,an=b.tableBodyContainerRef,un=b.theme,ln=b.useOddColumnBackground,cn=g.depth,sn=g.row,dn=g.rowPath,fn=g.absoluteRowIndex,vn=i(G(sn,f.accessor)),hn=vn[0],pn=vn[1],wn=i(!1),mn=wn[0],gn=wn[1],bn=i(!1),xn=bn[0],yn=bn[1],Cn=i(!1),In=Cn[0],Rn=Cn[1],Sn=a(null),Nn=V(dn||[fn]),En=Z&&Z[cn],Hn=!!En&&function(n,e){return!!e&&K(n[e])}(sn,En),kn=Z&&Z.length>cn,Tn=!y||y(sn),An=U(Nn,cn,E,H,R),Dn=W({rowIndex:m,colIndex:s,rowId:Nn}),Fn=z({rowIndex:m,colIndex:s,rowId:Nn}),Pn=u(function(){var n,e,t;if(!S)return!1;var r=L.filter(function(n){return"left"===n.pinned}),o=L.filter(function(n){return!n.pinned}),i=L.filter(function(n){return"right"===n.pinned});return"left"===f.pinned?(null===(n=r[r.length-1])||void 0===n?void 0:n.accessor)===f.accessor:"right"===f.pinned?(null===(e=i[i.length-1])||void 0===e?void 0:e.accessor)===f.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===f.accessor},[S,L,f.accessor,f.pinned]),On=_n({draggedHeaderRef:M,headers:L,hoveredHeaderRef:O,onTableHeaderDragEnd:Y}).handleDragOver,Bn=Wn(),qn=D({accessor:f.accessor,rowId:Nn}),zn=P({rowId:Nn,accessor:f.accessor}),Gn=f.isSelectionColumn&&N;o(function(){if(C){var n="".concat(Nn,"-").concat(f.accessor);return C.set(n,{updateContent:function(n){hn!==n?(pn(n),I&&(yn(!0),Sn.current&&clearTimeout(Sn.current),Sn.current=setTimeout(function(){yn(!1)},800))):pn(n)}}),function(){C.delete(n),Sn.current&&clearTimeout(Sn.current)}}},[C,I,Nn,f.accessor,hn]),o(function(){if(xn){var n=setTimeout(function(){yn(!1)},850);return function(){return clearTimeout(n)}}},[xn]),o(function(){pn(G(sn,f.accessor))},[sn,f.accessor]);var jn="boolean"===f.type||"date"===f.type||"enum"===f.type,Kn=!!(null==f?void 0:f.isEditable),Vn=rn.has(s),Xn=v&&!Vn,Yn=u(function(){return!!Gn&&tn.has(Nn+"")},[Gn,tn,Nn]),$n=null==w?void 0:w.singleRowChildren,Zn="st-cell ".concat(cn>0&&f.expandable?"st-cell-depth-".concat(cn):""," ").concat(Xn?h?"st-cell-selected-first ".concat(c):"st-cell-selected ".concat(c):""," ").concat(Vn?h?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(Kn?"clickable":""," ").concat(xn?h?"st-cell-updating-first":"st-cell-updating":""," ").concat(Dn?h?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Fn?h?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(ln?p%2==0?"even-column":"odd-column":""," ").concat(Gn?"st-selection-cell":""," ").concat(Yn?"st-selection-has-highlighted-cell":""," ").concat(Pn?"st-last-column":""," ").concat($n?"st-sub-cell":""," ").concat(In?"hovered":""),Qn=l(function(n){null==n&&(n="number"===f.type?0:"boolean"!==f.type&&""),pn(n),j(sn,f.accessor,n),null==_||_({accessor:f.accessor,newValue:n,row:sn,rowIndex:m})},[f.accessor,f.type,_,sn,m]),ne=l(function(n){n.stopPropagation();var e=U(Nn,cn,E,H,R),t=Nn+"";if(e?(Q(function(n){var e=new Map(n);return e.set(t,cn),e}),nn(function(n){var e=new Map(n);return e.delete(t),e})):(nn(function(n){var e=new Map(n);return e.set(t,cn),e}),Q(function(n){var e=new Map(n);return e.delete(t),e})),e&&en(function(n){var e=new Map(n);return e.delete(Nn),e}),X){var r=f.pinned;X({depth:cn,event:n,groupingKey:En,groupingKeys:Z||[],isExpanded:!e,row:sn,rowIndexPath:dn||[],setEmpty:function(n,e){en(function(t){var o=new Map(t),i=o.get(Nn)||{};return o.set(Nn,x(x({},i),{isEmpty:n,emptyMessage:e,loading:!1,error:null,triggerSection:r})),o})},setError:function(n){en(function(e){var t=new Map(e),o=t.get(Nn)||{};return t.set(Nn,x(x({},o),{error:n,loading:!1,isEmpty:!1,triggerSection:r})),t})},setLoading:function(n){en(function(e){var t=new Map(e),o=t.get(Nn)||{};return t.set(Nn,x(x({},o),{loading:n,error:null,isEmpty:!1,triggerSection:r})),t})}})}},[R,En,cn,E,H,f.pinned,X,sn,Z,Nn,dn,Q,nn,en]);return B||g.isLoadingSkeleton?n("div",x({className:Zn},{children:n("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:n("div",{className:"st-loading-skeleton"})}))})):!mn||jn||Gn?t(Mn,x({className:Zn,"data-accessor":f.accessor,"data-col-index":s,"data-row-id":Nn,"data-row-index":m,"aria-colindex":s+1,id:qn,onClick:function(){J&&!Gn&&J({accessor:f.accessor,colIndex:s,row:sn,rowIndex:m,value:hn})},onDoubleClick:function(){return f.isEditable&&!Gn&&gn(!0)},onDragOver:function(n){Gn||Bn({callback:On,callbackProps:{event:n,hoveredHeader:f},limit:50})},onKeyDown:function(n){mn||Gn||"F2"!==n.key&&"Enter"!==n.key||!f.isEditable||mn||(n.preventDefault(),gn(!0))},onMouseDown:function(){mn||Gn||T({rowIndex:m,colIndex:s,rowId:Nn})},onMouseEnter:function(){Rn(!0)},onMouseLeave:function(){Rn(!1)},onMouseOver:function(){mn||Gn||A({rowIndex:m,colIndex:s,rowId:Nn})},parentRef:an,tableRow:g},{children:[f.expandable&&kn?n("div",x({className:"st-icon-container st-expand-icon-container ".concat(Tn&&(Hn||X)?An?"expanded":"collapsed":"placeholder"),onClick:Tn&&(Hn||X)?function(n){return ne(n)}:void 0,role:Tn&&(Hn||X)?"button":"presentation",tabIndex:Tn&&(Hn||X)?0:-1,"aria-label":Tn&&(Hn||X)?"".concat(An?"Collapse":"Expand"," row group"):void 0,"aria-expanded":Tn&&(Hn||X)?An:void 0,"aria-hidden":!(Tn&&(Hn||X)),onKeyDown:Tn&&(Hn||X)?function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),ne(n))}:void 0},{children:k})):null,n("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:B||g.isLoadingSkeleton?n("div",{className:"st-loading-skeleton"}):n(e,{children:Gn?t("div",x({className:"st-selection-cell-content"},{children:[n("div",x({className:"st-selection-control"},{children:In||q&&q(Nn+"")?n(Un,{checked:!!q&&q(Nn+""),onChange:function(n){F&&F(Nn+"",n)},ariaLabel:"Select row ".concat(d+1)}):n("span",x({className:"st-row-number"},{children:d+1}))})),function(){if(!$||!Gn||0===$.length)return null;if(!(In||q&&q(Nn+"")))return null;var e={row:sn,rowIndex:d};return n("div",x({className:"st-row-buttons",role:"group","aria-label":"Actions for row ".concat(d+1)},{children:$.map(function(t,r){return n("span",x({className:"st-row-button"},{children:t(e)}),r)})}))}()]})):f.cellRenderer?function(){var n;return f.cellRenderer({accessor:f.accessor,colIndex:s,row:sn,rowIndex:fn,rowPath:dn,theme:un,value:hn,formattedValue:null===(n=null==f?void 0:f.valueFormatter)||void 0===n?void 0:n.call(f,{accessor:f.accessor,colIndex:s,row:sn,rowIndex:m,value:hn})})}():Jn({content:hn,header:f,colIndex:s,row:sn,rowIndex:m})})})),!B&&!g.isLoadingSkeleton&&mn&&jn&&!Gn&&n(Ln,{enumOptions:f.enumOptions,onChange:Qn,setIsEditing:gn,type:f.type,value:hn})]}),zn):n("div",x({className:"st-cell-editing",id:D({accessor:f.accessor,rowId:Nn}),onMouseDown:function(n){return n.stopPropagation()},onKeyDown:function(n){return n.stopPropagation()}},{children:n(Ln,{enumOptions:f.enumOptions,onChange:Qn,setIsEditing:gn,type:f.type,value:hn})}))},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}),Yn=function(e){var r=e.columnIndices,o=e.displayRowNumber,i=e.header,a=e.headers,u=e.nestedIndex,l=e.parentHeader,c=e.pinned,s=e.rowIndex,d=e.rowIndices,f=e.tableRow,h=r[i.accessor],p=on(),w=p.getBorderClass,m=p.isSelected,g=p.isInitialFocusedCell,b=p.collapsedHeaders,x=V(f.rowPath||[f.position]);if(i.children&&i.children.length>0){var y=i.children.filter(function(n){return F({header:n,pinned:c,headers:a,collapsedHeaders:b})});if(i.singleRowChildren){var C={rowIndex:s,colIndex:h,rowId:x},I=w(C),R=m(C),S=g(C),M=D({accessor:i.accessor,rowId:x});return t(v,{children:[n(Xn,{borderClass:I,colIndex:h,displayRowNumber:o,header:i,isHighlighted:R,isInitialFocused:S,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},M),y.map(function(e){var t=D({accessor:e.accessor,rowId:x});return n(Yn,{columnIndices:r,displayRowNumber:o,header:e,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:s,rowIndices:d,tableRow:f},t)})]})}return n(v,{children:y.map(function(e){var t=D({accessor:e.accessor,rowId:x});return n(Yn,{columnIndices:r,displayRowNumber:o,header:e,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:s,rowIndices:d,tableRow:f},t)})})}var N={rowIndex:s,colIndex:h,rowId:x},E=w(N),H=m(N),k=g(N),T=D({accessor:i.accessor,rowId:x});return n(Xn,{borderClass:E,colIndex:h,displayRowNumber:o,header:i,isHighlighted:H,isInitialFocused:k,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},T)},$n=r.memo(function(t){var r=t.columnIndexStart,o=t.columnIndices,i=t.headers,a=t.pinned,u=t.rowIndex,l=t.displayRowNumber,c=t.rowIndices,s=t.tableRow,d=on().collapsedHeaders,f=i.filter(function(n){return F({header:n,pinned:a,headers:i,collapsedHeaders:d})});return n(e,{children:f.map(function(e,t){var d=V(s.rowPath||[s.position]),f=D({accessor:e.accessor,rowId:d});return n(Yn,{columnIndices:o,displayRowNumber:l,header:e,headers:i,nestedIndex:t+(null!=r?r:0),pinned:a,rowIndex:u,rowIndices:c,tableRow:s},f)})})},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.rowIndices===e.rowIndices}),Zn=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},Qn=r.memo(function(e){var t=e.columnIndices,r=e.columnIndexStart,o=e.gridTemplateColumns,i=e.headers,a=e.index,u=e.pinned,l=e.rowHeight,c=e.rowIndices,s=e.setHoveredIndex,d=e.tableRow,f=on(),v=f.useHoverRowBackground,h=f.isAnimating,p=f.isRowSelected,w=f.useOddEvenRowBackground,m=f.rows,g=f.loadingStateRenderer,b=f.errorStateRenderer,y=f.emptyStateRenderer,C=f.maxHeaderDepth,I=d.position,R=d.displayPosition,S=d.stateIndicator;if(S){if(S.state.triggerSection===u){if(!(S.state.loading&&g||S.state.error&&b||S.state.isEmpty&&y))return n("div",{className:"st-row st-state-row-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(Z({position:I,rowHeight:l}),"px, 0)"),height:"".concat(l,"px")}});var M=m.find(function(n,e){return V([e])===S.parentRowId});return n("div",x({className:"st-row st-state-row","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(Z({position:I,rowHeight:l}),"px, 0)"),height:"".concat(l,"px")}},{children:n(Zn,{parentRow:M||{},rowState:S.state,gridTemplateColumns:o,loadingStateRenderer:g,errorStateRenderer:b,emptyStateRenderer:y})}))}return n("div",{className:"st-row st-state-row-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(Z({position:I,rowHeight:l}),"px, 0)"),height:"".concat(l,"px")}})}var N=I%2==0,E=V(d.rowPath||[d.position]),H=!!p&&p(E+"");return n("div",x({className:"st-row ".concat(w?N?"even":"odd":""," ").concat(H?"selected":""),"data-index":a,"aria-rowindex":I+C+1,onMouseEnter:function(){!h&&v&&s(a)},style:{gridTemplateColumns:o,top:Z({position:I,rowHeight:l}),height:"".concat(l,"px")}},{children:n($n,{columnIndexStart:r,columnIndices:t,displayRowNumber:R,headers:i,pinned:u,rowIndex:I,rowIndices:c,tableRow:d},E)}))},function(n,e){return 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.rowIndices===e.rowIndices&&n.columnIndexStart===e.columnIndexStart}),ne=function(e){var t=e.displayStrongBorder,r=e.position,o=e.rowHeight,i=e.templateColumns,u=a(null);return n("div",x({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(n){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){u.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(u.current){var e=u.current.getBoundingClientRect(),t=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:n.clientX,clientY:e.top+e.height/2});u.current.dispatchEvent(t),u.current=null}},style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat($({position:r,rowHeight:o}),"px, 0)")}},{children:n("div",{style:{gridColumn:"1 / -1"}})}))},ee=c(void 0),te=function(n){var e=n.childRef,t=n.children,r=n.group,i=void 0===r?"default":r,a=function(){var n=s(ee);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}})},re=p(function(e,r){var o=e.columnIndexStart,i=e.columnIndices,l=e.headers,c=e.pinned,s=e.rowHeight,d=e.rowIndices,f=e.setHoveredIndex,h=e.templateColumns,p=e.totalHeight,m=e.rowsToRender,g=e.width,b=c?"st-body-pinned-".concat(c):"st-body-main",y=a(null);return w(r,function(){return y.current},[]),u(function(){return zn(l,c)},[l,c])?n(te,x({childRef:y,group:c?"pinned-".concat(c):"default"},{children:n("div",x({className:b,ref:y,style:x({position:"relative",height:"".concat(p,"px"),width:g},!c&&{flexGrow:1})},{children:m.map(function(e,r){var a=e.stateIndicator?"state-".concat(e.stateIndicator.parentRowId,"-").concat(e.position):V(e.rowPath||[e.position]);return t(v,{children:[0!==r&&n(ne,{displayStrongBorder:e.isLastGroupRow,position:e.position,rowHeight:s,templateColumns:h}),n(Qn,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:h,headers:l,index:r,pinned:c,rowHeight:s,rowIndices:d,setHoveredIndex:f,tableRow:e})]},a)})}))})):null});function oe(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){void 0===e&&(e=!1),e||a++,i[n.accessor]=a,n.children&&n.children.length>0&&n.children.filter(function(n){return F({header:n,headers:u,collapsedHeaders:o})}).forEach(function(e,t){l(e,!n.singleRowChildren&&0===t)})};return t.forEach(function(n,e){l(n,0===e)}),e.filter(function(n){return!n.pinned&&F({header:n,headers:u,collapsedHeaders:o})}).forEach(function(n,e){l(n,0===e&&0===t.length)}),r.forEach(function(n){l(n,!1)}),i}re.displayName="TableSection";var ie=function(r){var c=r.mainTemplateColumns,s=r.pinnedLeftColumns,d=r.pinnedLeftTemplateColumns,f=r.pinnedLeftWidth,v=r.pinnedRightColumns,h=r.pinnedRightTemplateColumns,p=r.pinnedRightWidth,w=r.rowsToRender,m=r.setScrollTop,g=r.setScrollDirection,b=r.shouldShowEmptyState,y=r.tableRows,C=on(),I=C.collapsedHeaders,R=C.headerContainerRef,S=C.headers,M=C.isAnimating,N=C.mainBodyRef,E=C.onLoadMore,H=C.rowHeight,k=C.scrollbarWidth,T=C.setIsScrolling,A=C.shouldPaginate,D=C.tableBodyContainerRef,F=C.tableEmptyStateRenderer,P=i(!1),L=P[0],O=P[1],W=a(new Set),B=l(function(n){W.current.forEach(function(n){return n.classList.remove("hovered")}),W.current.clear(),null!==n&&document.querySelectorAll('.st-body-container .st-row[data-index="'.concat(n,'"]')).forEach(function(n){n.classList.add("hovered"),W.current.add(n)})},[]);o(function(){M&&B(null)},[M,B]),wn({headerContainerRef:R,mainSectionRef:D,scrollbarWidth:k}),o(function(){return function(){z.current&&clearTimeout(z.current)}},[]);var q=a(null),z=a(null),G=a(0),j=function(n){return n.length}(y),K=j*(H+1)-1,_=u(function(){return oe({headers:S,pinnedLeftColumns:s,pinnedRightColumns:v,collapsedHeaders:I})},[S,s,v,I]),U=u(function(){var n={};return w.forEach(function(e,t){var r=V(e.rowPath||[e.position])+"";n[r]=t}),n},[w]),J=l(function(n,e){!E||A||L||200>=n.scrollHeight-(e+n.clientHeight)&&e>G.current&&(O(!0),E(),setTimeout(function(){O(!1)},1e3))},[E,A,L]),X={columnIndices:_,headerContainerRef:R,headers:S,rowHeight:H,rowIndices:U,rowsToRender:w,setHoveredIndex:B};return n("div",x({className:"st-body-container",onMouseLeave:function(){return B(null)},onScroll:function(n){var e=n.currentTarget,t=e.scrollTop;T(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(function(){T(!1)},150),q.current&&cancelAnimationFrame(q.current),q.current=requestAnimationFrame(function(){var n=G.current,r=t>n?"down":n>t?"up":"none";m(t),g(r),J(e,t),G.current=t})},ref:D},{children:b?n("div",x({className:"st-empty-state-wrapper"},{children:F})):t(e,{children:[n(re,x({},X,{pinned:"left",templateColumns:d,totalHeight:K,width:f})),n(re,x({},X,{columnIndexStart:s.length,ref:N,templateColumns:c,totalHeight:K})),n(re,x({},X,{columnIndexStart:s.length+c.length,pinned:"right",templateColumns:h,totalHeight:K,width:p}))]})}))},ae=function(n){var e=n.event,t=n.header,r=n.headers,o=n.setHeaders,i=n.setIsResizing,a=n.tableBodyContainerRef,u=n.startWidth,l=n.collapsedHeaders,c=n.autoExpandColumns,s=void 0!==c&&c,d=n.reverse,f=void 0!==d&&d;e.preventDefault();var v="clientX"in e?e.clientX:e.touches[0].clientX,h="touches"in e;if(t&&!t.hide){i(!0);var p,w=B(t);if(t.children&&t.children.length>0){var m=L(t,l);p=m.length>0?m:[t]}else p=[t];var g=new Map,b=0;if(s){var x=r.filter(function(n){return n.pinned===t.pinned});if(q(x,l).forEach(function(n){var e="number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):100;g.set(n.accessor,e)}),a.current){var y=a.current.clientWidth,C=le({headers:r,containerWidth:y,collapsedHeaders:l}),I=C.leftWidth,S=C.rightWidth;b="left"===t.pinned?I:"right"===t.pinned?S:Math.max(0,y-I-S)}}var M=function(n){var e="right"===t.pinned?v-n:n-v;if(s){var i=r.filter(function(n){return n.pinned===t.pinned});se({delta:e,startWidth:u,resizedHeader:p.length>0?p[0]:t,sectionHeaders:i,reverse:f,collapsedHeaders:l,initialWidthsMap:g,sectionWidth:b,isParentResize:p.length>1,childrenToResize:p})}else{var a=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,a=E(window.innerWidth);if(!e.pinned)return 1/0;var u=i*a-t.filter(function(n){return n.pinned===e.pinned&&n.accessor!==e.accessor}).reduce(function(n,e){return e.hide?n:n+L(e,r).reduce(function(n,e){return n+O(e)},0)},0),l=B(e);return l>u?(console.warn("Header ".concat(e.accessor," exceeds pinned section width limit")),l):u}({header:t,headers:r,collapsedHeaders:l});p.length>1?ue({delta:e,leafHeaders:p,minWidth:w,startWidth:u,maxWidth:a}):p[0].width=Math.max(Math.min(u+e,a),w),r.forEach(function(n){W(n)})}var c=R([],r,!0);o(c)};if(h){var N=function(n){M(n.touches[0].clientX)},H=function(){document.removeEventListener("touchmove",N),document.removeEventListener("touchend",H),i(!1)};document.addEventListener("touchmove",N),document.addEventListener("touchend",H)}else{var k=function(n){M(n.clientX)},T=function(){document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",T),i(!1)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",T)}}},ue=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,B(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)})},le=function(n){var e=n.containerWidth,t=n.maxPinnedWidthPercent,r=void 0===t?.8:t,o=n.collapsedHeaders,i=0,a=0,u=0;n.headers.forEach(function(n){if(!n.hide){var e=L(n,o).reduce(function(n,e){return n+O(e)},0);"left"===n.pinned?i+=e:"right"===n.pinned?a+=e:u+=e}});var l=i,c=a;if(e&&e>0){var s=e*r;i>s&&(i=s),a>s&&(a=s)}return{leftWidth:A(i),rightWidth:A(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}},ce=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-30),initialWidth:e,minWidth:30}}),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>N});if(0>=l.length)return"break";var c=a,s=c/l.length,d=0;l.forEach(function(n,e){var t=n.minWidth-N,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,N),d+=r}),a-=d}};a>.5&&"break"!==u(););},se=function(n){var e=n.delta,t=n.startWidth,r=n.resizedHeader,o=n.sectionHeaders,i=n.reverse,a=n.collapsedHeaders,u=n.initialWidthsMap,l=n.sectionWidth,c=n.isParentResize,s=n.childrenToResize,d=void 0===s?[]:s;if(void 0!==c&&c&&d.length>1){var f=q(o,a),v=f.findIndex(function(n){return n.accessor===d[0].accessor}),h=f.findIndex(function(n){return n.accessor===d[d.length-1].accessor});if(-1===v||-1===h)return;var p,w=h===f.length-1;p=0===v?f.slice(h+1):w||i?f.slice(0,v):f.slice(h+1);var m=Array.from(u.values()).reduce(function(n,e){return n+e},0);if(e>0){var g=e,b=!1;if(m+e>l){b=!0;var x=p.reduce(function(n,e){var t=u.get(e.accessor)||100;return n+Math.max(0,t-N)},0);g=Math.min(e,x)}var y=(C=t+g)/(I=d.reduce(function(n,e){return n+(u.get(e.accessor)||100)},0));d.forEach(function(n){var e=u.get(n.accessor)||100;n.width=Math.max(e*y,30)}),b&&g>0&&p.length>0&&ce({columnsToShrink:p,totalCompensation:g,initialWidthsMap:u})}else{var C,I=d.reduce(function(n,e){return n+(u.get(e.accessor)||100)},0),R=(C=Math.max(t+e,N*d.length))/I;d.forEach(function(n){var e=u.get(n.accessor)||100;n.width=Math.max(e*R,30)}),(D=t-C)>0&&p.length>0&&ce({columnsToShrink:p,totalCompensation:-D,initialWidthsMap:u})}}else{var S=q(o,a),M=S.findIndex(function(n){return n.accessor===r.accessor});if(-1!==M){var E,H=M===S.length-1;if(0!==(E=0===M?S.slice(M+1):H||i?S.slice(0,M):S.slice(M+1)).length){var k=Array.from(u.values()).reduce(function(n,e){return n+e},0);if(e>0){if(l>=k+e)return void(r.width=t+e);x=E.reduce(function(n,e){var t=u.get(e.accessor)||100;return n+Math.max(0,t-N)},0);var T=Math.min(e,x);r.width=t+T,T>0&&ce({columnsToShrink:E,totalCompensation:T,initialWidthsMap:u})}else{var A=Math.max(t+e,30),D=t-A;r.width=A,D>0&&ce({columnsToShrink:E,totalCompensation:-D,initialWidthsMap:u})}}else r.width=Math.max(t+e,30)}}},de={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"},fe=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"]}},ve=function(n){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(n)},he=function(n){return["between","notBetween","in","notIn"].includes(n)},pe=function(n){return["isEmpty","isNotEmpty"].includes(n)},we=function(e){return n("div",x({className:"st-filter-container"},{children:e.children}))},me=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(pn,{})]})),n(mn,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)})}))}))]}))},ge=function(e){var t=e.value,r=e.onChange,o=e.operators.map(function(n){return{value:n,label:de[n]}});return n("div",x({className:"st-filter-section"},{children:n(me,{value:t,onChange:function(n){r(n)},options:o})}))},be=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()})},xe=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}))},ye=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"}))]}))},Ce=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=fe("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},ve(s)&&{value:v});u(n)},m=pe(s)||v.trim();return t(we,{children:[n(ge,{value:s,onChange:d,operators:p}),ve(s)&&n(xe,{children:n(be,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:w})}),n(ye,{onApply:w,onClear:l,canApply:!!m,showClear:!!a})]})},Ie=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=fe("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};ve(f)?n.value=parseFloat(p):he(f)&&(n.values=[parseFloat(""+g),parseFloat(""+y)]),c(n)};return t(we,{children:[n(ge,{value:f,onChange:v,operators:I}),ve(f)&&n(xe,{children:n(be,{type:"number",value:p,onChange:w,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),he(f)&&t(xe,{children:[n(be,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),n(be,{type:"number",value:y,onChange:C,placeholder:"To...",onEnterPress:R})]}),n(ye,{onApply:R,onClear:s,canApply:!!pe(f)||(ve(f)?""!==p.trim():!!he(f)&&""!==(g+"").trim()&&""!==(y+"").trim()),showClear:!!l})]})},Re=function(e){var t=e.className;return n(me,{value:e.value,onChange:e.onChange,options:e.options,className:void 0===t?"":t,placeholder:e.placeholder})},Se=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=fe("boolean");o(function(){a?(d(a.operator),h(void 0!==a.value?a.value+"":"true")):(d("equals"),h("true"))},[a]);var w=pe(s)||""!==v;return t(we,{children:[n(ge,{value:s,onChange:d,operators:p}),ve(s)&&n(xe,{children:n(Re,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),n(ye,{onApply:function(){var n={accessor:r.accessor,operator:s};ve(s)&&(n.value="true"===v),u(n)},onClear:l,canApply:w,showClear:!!a})]})},Me=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=fe("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=An(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?An(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(mn,x({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"hidden",width:240},{children:n(Nn,{value:g,onChange:function(n){var e=n.toISOString().split("T")[0];u(e),v(!1)},onClose:function(){return v(!1)}})}))]}))};return t(we,{children:[n(ge,{value:v,onChange:h,operators:S}),ve(v)&&n(xe,{children:n(M,{value:w,onChange:m,placeholder:"Select date...",autoFocus:!0})}),he(v)&&t(xe,{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(ye,{onApply:function(){var n={accessor:l.accessor,operator:v};ve(v)?n.value=w:he(v)&&(n.values=[b,I]),s(n)},onClear:d,canApply:!!pe(v)||(ve(v)?""!==w.trim():!!he(v)&&""!==b.trim()&&""!==I.trim()),showClear:!!c})]})},Ne=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(we,{children:[n(xe,{children:t("div",x({className:"st-enum-filter-options"},{children:[n("div",x({className:"st-enum-select-all"},{children:n(Un,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(be,{type:"text",value:w,onChange:m,placeholder:"Search..."})})),g.map(function(e,t){return n(Un,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(ye,{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})]})},Ee=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(Ie,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return n(Se,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return n(Me,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return n(Ne,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return n(Ce,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},He=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],g=p[1],b=a(null),y=a(null);if(o(function(){return function(){b.current&&clearTimeout(b.current)}},[]),!u||!m(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),g({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}))]})},ke=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=i(!1),C=y[0],I=y[1],S=i(!1),M=S[0],N=S[1],E=i(w.label||""),T=E[0],A=E[1],F=on(),P=F.activeHeaderDropdown,L=F.areAllRowsSelected,O=F.autoExpandColumns,W=F.collapsedHeaders,B=F.columnBorders,q=F.columnReordering,z=F.columnResizing,G=F.columnsWithSelectedCells,j=F.draggedHeaderRef,K=F.enableHeaderEditing,V=F.filterIcon,_=F.handleApplyFilter,U=F.handleClearFilter,J=F.handleSelectAll,X=F.headerCollapseIcon,Y=F.headerDropdown,$=F.headerExpandIcon,Z=F.headerRegistry,Q=F.headers,nn=F.hoveredHeaderRef,en=F.onColumnOrderChange,tn=F.onColumnSelect,rn=F.onHeaderEdit,an=F.onSort,un=F.onTableHeaderDragEnd,ln=F.headerHeight,cn=F.selectColumns,sn=F.selectableColumns,dn=F.selectedColumns,fn=F.setActiveHeaderDropdown,vn=F.setCollapsedHeaders,hn=F.setHeaders,pn=F.setInitialFocusedCell,wn=F.setIsResizing,gn=F.setSelectedCells,bn=F.setSelectedColumns,yn=F.sortDownIcon,Cn=F.sortUpIcon,In=F.tableBodyContainerRef,Rn=!!(null==w?void 0:w.isSortable),Sn=!!(null==w?void 0:w.filterable),Nn=F.filters[w.accessor],En=(null==P?void 0:P.accessor)===w.accessor,Hn=w.isSelectionColumn&&F.enableRowSelection,kn=function(n){var e;return!(!(null===(e=n.children)||void 0===e?void 0:e.length)||!n.collapsible)}(w),Tn=W.has(w.accessor),An=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:En,estimatedHeight:200,estimatedWidth:250,margin:4}),Dn=An.triggerRef,Fn=An.position,Pn=u(function(){var n,e,t;if(!B)return!1;var r=Q.filter(function(n){return"left"===n.pinned}),o=Q.filter(function(n){return!n.pinned}),i=Q.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},[B,Q,w.accessor,w.pinned]),Ln=u(function(){return!(!sn||Hn)&&k(w,s).some(function(n){return dn.has(n)})},[sn,Hn,w,s,dn]),On=u(function(){return!Hn&&k(w,s).some(function(n){return G.has(n)})},[Hn,w,s,G]),Bn=u(function(){return!(!w.children||0===w.children.length)&&(!Tn||w.children.some(function(n){var e=n.showWhen||H;return"parentCollapsed"===e||"always"===e}))},[w.children,Tn]),qn=null==m?void 0:m.singleRowChildren,zn=Bn&&!w.singleRowChildren,Gn="st-header-cell ".concat(w.accessor===(null===(r=nn.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(Rn?"clickable":""," ").concat(q&&!Rn?"columnReordering":""," ").concat(zn?"parent":""," ").concat(qn?"st-sub-header":""," ").concat(Pn?"st-last-column":""," ").concat(K&&!Hn?"st-header-editable":""," ").concat(Ln?"st-header-selected":""," ").concat(On&&!Ln?"st-header-has-highlighted-cell":""),jn=_n({draggedHeaderRef:j,headers:Q,hoveredHeaderRef:nn,onColumnOrderChange:en,onTableHeaderDragEnd:un}),Kn=jn.handleDragStart,Vn=jn.handleDragEnd,Jn=jn.handleDragOver,Xn=Wn();o(function(){if(Z&&!w.isSelectionColumn){var n=w.accessor+"";return Z.set(n,{setEditing:function(n){N(n)}}),function(){Z.delete(n)}}},[Z,w.accessor,w.isSelectionColumn]),o(function(){A(w.label||"")},[w.label]);var Yn=function(n){I(!C)},$n=l(function(n){A(n);var e=Q.map(function(e){return e.accessor===w.accessor?x(x({},e),{label:n}):e});hn(e),rn&&rn(w,n)},[Q,hn,rn,w]),Zn=l(function(){fn&&fn(null)},[fn]),Qn=l(function(n){n.stopPropagation(),vn(function(n){var e=new Set(n);return Tn?e.delete(w.accessor):e.add(w.accessor),e})},[vn,Tn,w.accessor]),ne=function(n){var e=n.event,t=n.header;if(!t.isSelectionColumn){if(sn){var r=k(t,s),o=r.some(function(n){return dn.has(n)});if(K&&o&&!e.shiftKey)return Y&&En&&Zn(),void N(!0);e.shiftKey&&cn?bn(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))}):cn&&cn(r),gn(new Set),pn(null)}tn&&tn(t),!sn&&t.isSortable&&an(t.accessor)}};if(o(function(){var n=function(n){n.preventDefault(),n.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",n),function(){document.removeEventListener("dragover",n)}},[]),!w)return null;var ee=z&&!Hn&&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(D({accessor:w.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Xn({callback:ae,callbackProps:{event:n.nativeEvent,header:w,headers:Q,setHeaders:hn,setIsResizing:wn,tableBodyContainerRef:In,startWidth:t,collapsedHeaders:W,autoExpandColumns:O,reverse:g},limit:10})},onTouchStart:function(n){var e,t=null===(e=document.getElementById(D({accessor:w.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Xn({callback:ae,callbackProps:{event:n,header:w,headers:Q,setHeaders:hn,setIsResizing:wn,tableBodyContainerRef:In,startWidth:t,collapsedHeaders:W,autoExpandColumns:O,reverse:g},limit:10})}},{children:n("div",{className:"st-header-resize-handle"})})),te=b&&b.key.accessor===w.accessor&&t("div",x({className:"st-icon-container",onClick:function(n){return ne({event:n,header:w})},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||an(w.accessor)},tabIndex:0,role:"button","aria-label":"Sort ".concat(w.label," ").concat("asc"===b.direction?"descending":"ascending")},{children:["asc"===b.direction&&Cn&&Cn,"desc"===b.direction&&yn&&yn]})),re=Sn&&V&&t("div",x({className:"st-icon-container",onClick:Yn,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(),Yn()))},tabIndex:0,role:"button","aria-label":"Filter ".concat(w.label),"aria-expanded":C,"aria-haspopup":"dialog"},{children:[h(V,{style:{fill:Nn?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),n(mn,x({open:C,overflow:"visible",setOpen:I,onClose:function(){return I(!1)}},{children:n(Ee,{header:w,currentFilter:Nn,onApplyFilter:function(n){_(n),I(!1)},onClearFilter:function(){U(w.accessor),I(!1)}})}))]})),oe=kn&&!Hn&&n("div",x({className:"st-icon-container st-collapse-icon-container",onClick:function(n){return Qn(n)},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),Qn(n))},tabIndex:0,role:"button","aria-label":"".concat(Tn?"Expand":"Collapse"," ").concat(w.label," column"),"aria-expanded":!Tn},{children:Tn?X:$})),ie=n(He,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:Hn?n(Un,{checked:!!L&&L(),onChange:function(n){J&&J(n)},ariaLabel:"Select all rows"}):M?n(xn,{defaultValue:T,onBlur:function(){return N(!1)},onChange:$n}):T||(null==w?void 0:w.label)}))})),ue="header-desc-".concat(w.accessor),le=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,Sn);return t(Mn,x({className:Gn,id:D({accessor:w.accessor,rowId:"header"}),"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,"aria-describedby":le?ue:void 0,onDragOver:function(n){Hn||Xn({callback:Jn,callbackProps:{event:n,hoveredHeader:w},limit:50})},style:x({gridRowStart:p,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:d},v-p>1?{}:{height:ln})},{children:[g&&ee,!w.headerRenderer&&"right"===w.align&&oe,!w.headerRenderer&&"right"===w.align&&re,!w.headerRenderer&&"right"===w.align&&te,n("div",x({ref:Dn,className:"st-header-label",draggable:q&&!w.disableReorder&&!Hn,onClick:function(n){Hn||ne({event:n,header:w})},onDoubleClick:function(n){Hn||function(n){var e=n.header;e.isSelectionColumn||sn&&e.isSortable&&an(e.accessor)}({event:n,header:w})},onDragEnd:Hn?void 0:function(n){n.preventDefault(),Vn()},onDragStart:Hn?void 0:function(n){q&&w&&function(n){Kn(n)}(w)}},{children:w.headerRenderer?w.headerRenderer({accessor:w.accessor,colIndex:s,header:w,components:{sortIcon:te||void 0,filterIcon:re||void 0,collapseIcon:oe||void 0,labelContent:ie}}):ie})),!w.headerRenderer&&"right"!==w.align&&te,!w.headerRenderer&&"right"!==w.align&&re,!w.headerRenderer&&"right"!==w.align&&oe,!g&&ee,Y&&!Hn&&n("div",x({className:"st-header-dropdown-container"},{children:Y({accessor:w.accessor,colIndex:s,header:w,isOpen:En,onClose:Zn,position:Fn})})),le&&n("span",x({id:ue,className:"st-sr-only"},{children:le}))]}))},Te=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=on().collapsedHeaders,h=u(function(){var n=[],e=1,t=function(o,i,u,s){var d,f;if(void 0===u&&(u=!1),!F({header:o,pinned:c,headers:a,collapsedHeaders:v}))return 0;u||e++;var h,p,w=null!==(f=null===(d=o.children)||void 0===d?void 0:d.filter(function(n){return F({header:n,pinned:c,headers:a,collapsedHeaders:v})}).length)&&void 0!==f?f:0,m=e;if(o.singleRowChildren&&w>0?(h=m+1,p=l+1):w>0?(h=m+w,p=i+1):(h=m+1,p=l+1),n.push({header:o,gridColumnStart:m,gridColumnEnd:h,gridRowStart:i,gridRowEnd:p,colIndex:r[o.accessor],parentHeader:s}),o.children&&o.children.length>0){var g=o.singleRowChildren?i:i+1,b=!o.singleRowChildren;o.children.forEach(function(n){F({header:n,pinned:c,headers:a,collapsedHeaders:v})&&(t(n,g,b,o),b=!1)})}return h-m},o=a.filter(function(n){return F({header:n,pinned:c,headers:a,collapsedHeaders:v})}),i=!0;return o.forEach(function(n){t(n,1,i),i=!1}),n},[a,l,c,r,v]);return n(te,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:h.map(function(e){return n(ke,{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},e.header.accessor)})})}))}))},Ae=function(e){var r=e.centerHeaderRef,o=e.headers,i=e.mainTemplateColumns,a=e.pinnedLeftColumns,l=e.pinnedLeftTemplateColumns,c=e.pinnedRightColumns,s=e.pinnedRightTemplateColumns,d=e.sort,f=e.pinnedLeftWidth,v=e.pinnedRightWidth,h=on(),p=h.headerContainerRef,w=h.pinnedLeftRef,m=h.pinnedRightRef,g=h.collapsedHeaders,b=h.tableRows,y=h.maxHeaderDepth,C=u(function(){return oe({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:g})},[o,a,c,g]),I=u(function(){return Object.keys(C).length},[C]);return t("div",x({className:"st-header-container",ref:p,"aria-rowcount":b.length+y,"aria-colcount":I},{children:[zn(o,"left")&&n(Te,{columnIndices:C,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:y,pinned:"left",sectionRef:w,sort:d,width:f}),n(Te,{columnIndices:C,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:y,sectionRef:r,sort:d}),zn(o,"right")&&n(Te,{columnIndices:C,gridTemplateColumns:s,handleScroll:void 0,headers:o,maxDepth:y,pinned:"right",sectionRef:m,sort:d,width:v})]}))},De=function(n){var e=n.collapsedHeaders,t=n.autoExpandColumns,r=function(n){var t=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||H;return"parentCollapsed"===e||"always"===e});n.singleRowChildren&&t.push(n),o.length>0?r({headers:o,flattenedHeaders:t}):n.singleRowChildren||t.push(n)}else{var i=n.children.filter(function(n){var e=n.showWhen||H;return"parentExpanded"===e||"always"===e});n.singleRowChildren&&t.push(n),r({headers:i,flattenedHeaders:t})}else t.push(n)}),t},o=r({headers:n.headers,flattenedHeaders:[]});return"".concat(o.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,t)}).join(" "))},Fe=function(e){var r=e.hideHeader,o=e.pinnedLeftWidth,i=e.pinnedRightWidth,l=e.setScrollTop,c=e.setScrollDirection,s=e.shouldShowEmptyState,d=e.sort,f=e.tableRows,v=e.rowsToRender,h=on(),p=h.columnResizing,w=h.editColumns,m=h.headers,g=h.collapsedHeaders,b=h.autoExpandColumns,y=a(null),C=m.filter(function(n){return!n.pinned}),I=m.filter(function(n){return"left"===n.pinned}),R=m.filter(function(n){return"right"===n.pinned}),S=u(function(){return De({headers:I,collapsedHeaders:g,autoExpandColumns:b})},[I,g,b]),M=u(function(){return De({headers:C,collapsedHeaders:g,autoExpandColumns:b})},[C,g,b]),N=u(function(){return De({headers:R,collapsedHeaders:g,autoExpandColumns:b})},[R,g,b]),E={centerHeaderRef:y,headers:m,mainTemplateColumns:M,pinnedLeftColumns:I,pinnedLeftTemplateColumns:S,pinnedRightColumns:R,pinnedRightTemplateColumns:N,sort:d,pinnedLeftWidth:o,pinnedRightWidth:i},H={tableRows:f,mainTemplateColumns:M,pinnedLeftColumns:I,pinnedLeftTemplateColumns:S,pinnedLeftWidth:o,pinnedRightColumns:R,pinnedRightTemplateColumns:N,pinnedRightWidth:i,setScrollTop:l,setScrollDirection:c,shouldShowEmptyState:s,rowsToRender:v};return t("div",x({className:"st-content ".concat(p?"st-resizeable":"st-not-resizeable"),style:{width:w?"calc(100% - 27.5px)":"100%"}},{children:[!r&&n(Ae,x({},E)),n(ie,x({},H))]}))},Pe=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=on().editColumns,h=i(!1),p=h[0],w=h[1],m=a(null),g=a(null),b=a(null),y=v?28: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(te,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(te,x({childRef:m},{children:n("div",x({className:"st-horizontal-scrollbar-middle",ref:m},{children:n("div",{style:{width:r}})}))})),c>0&&n(te,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},Le={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 Le.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?Le.string(n,e,t):"number"==typeof n&&"number"==typeof e?Le.number(n,e,t):"boolean"==typeof n&&"boolean"==typeof e?Le.boolean(n,e,t):Le.string(n+"",e+"",t)}},Oe=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 Le.number(i,a,r)}return"date"===t?Le.date(n+"",e+"",r):"boolean"===t?Le.boolean(!!n,!!e,r):"enum"===t?Le.enum(n+"",e+"",r):Le.string(n+"",e+"",r)}(r,l,i,a)})}({rows:n.rows,sortColumn:n.sortColumn,headers:n.headers})},We=function(n){return u(function(){var e=T(n),t=new Map;return e.forEach(function(n){t.set(n.accessor,n)}),t},[n])},Be=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}):Oe({headers:o,rows:e,sortColumn:t}):e},qe=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(qe([s],e,t),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},ze=function(n){return n.every(function(n){return n.hide})},Ge=function(n){n.forEach(function(n){n.children&&n.children.length>0&&(Ge(n.children),ze(n.children)&&(n.hide=!0))})},je=function(r){var o=r.allHeaders,a=r.depth,u=void 0===a?0:a,l=r.doesAnyHeaderHaveChildren,c=r.header,s=r.isCheckedOverride,d=i(!0),f=d[0],v=d[1],h=on(),p=h.expandIcon,w=h.headers,m=h.setHeaders,g=h.onColumnVisibilityChange,b=l?"".concat(16*u,"px"):"8px",y=c.children&&c.children.length>0,C=null!=s?s:c.hide||y&&c.children&&ze(c.children);return t(e,{children:[t("div",x({className:"st-header-checkbox-item",style:{paddingLeft:b}},{children:[l&&n("div",x({className:"st-header-icon-container"},{children:y?n("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(n){n.stopPropagation(),v(!f)}},{children:p})):null})),n(Un,x({checked:C,onChange:function(n){c.hide=n,n?Ge(o):(qe(o,c.accessor),y&&c.children&&c.children.length>0&&c.children.every(function(n){return!0===n.hide})&&c.children[0]&&(c.children[0].hide=!1,qe(o,c.children[0].accessor)));var e=R([],w,!0);if(m(e),g){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);g(t)}}},{children:c.label}))]})),y&&f&&c.children&&n("div",x({className:"st-nested-headers"},{children:c.children.map(function(e,t){return n(je,{allHeaders:o,depth:u+1,doesAnyHeaderHaveChildren:l,header:e,isCheckedOverride:!!C||void 0},"".concat(e.accessor,"-").concat(t))})}))]})},Ke=function(e){var t=e.headers,r=e.open,o="left"===e.position?"left":"",i=u(function(){return t.some(function(n){return n.children&&n.children.length>0})},[t]);return n("div",x({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(o),onClick:function(n){return n.stopPropagation()}},{children:n("div",x({className:"st-column-editor-popout-content"},{children:t.map(function(e,r){return e.isSelectionColumn||e.excludeFromRender?null:n(je,{doesAnyHeaderHaveChildren:i,header:e,allHeaders:t},"".concat(e.accessor,"-").concat(r))})}))}))},Ve=function(e){var r=e.columnEditorText,o=e.editColumns,a=e.headers,u=e.position,l=void 0===u?"right":u,c=i(e.editColumnsInitOpen),s=c[0],d=c[1];return o?t("div",x({className:"st-column-editor ".concat(s?"open":""," ").concat(l),onClick:function(){return function(n){d(n)}(!s)},style:{width:28}},{children:[n("div",x({className:"st-column-editor-text"},{children:r})),n(Ke,{headers:a,open:s,position:l})]})):null},_e=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(ee.Provider,x({value:{registerPane:d,unregisterPane:f}},{children:r.Children.only(t)}))},Ue=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=An(n),v=An((r||"")+""),h=Tn(f),p=Tn(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 Tn(An((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 Tn(An((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},Je=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},Xe=function(n,e,t,r){var o=[],i=function(n){n.forEach(function(n){var t=r?n[r]:void 0;if(r&&t&&K(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}},Ye=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},$e=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)})}},Ze=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},Qe={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}},nt=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")},et=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(){nt(n),n.removeEventListener("transitionend",o),t.onComplete&&t.onComplete(),r()};n.addEventListener("transitionend",o),setTimeout(o,e.duration+(e.delay||0)+50)})},tt=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||Ze()&&!1!==t.respectReducedMotion?[2]:(u=t,l=Math.abs(n.x)>Math.abs(n.y)?"column":"row",void 0===u&&(u={}),i=Ze()?x(x({},Qe.REDUCED_MOTION),u):x(x({},"column"===l?Qe.COLUMN_REORDER:Qe.ROW_REORDER),u),nt(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,et(e,i,t)]);case 1:return a.sent(),[2]}var u,l})})},rt=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,Ze()&&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)})])})})},ot=function(n){var e=n.rows,t=n.rowGrouping,r=void 0===t?[]:t,o=n.expandedRows,i=n.collapsedRows,a=n.expandedDepths,l=n.rowStateMap,c=n.hasLoadingRenderer,s=n.hasErrorRenderer,d=n.hasEmptyRenderer;return u(function(){if(!r||0===r.length)return e.map(function(n,e){return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,rowPath:[e],absoluteRowIndex:e}});var n=[],t=function(e,u,f){void 0===f&&(f=[]),e.forEach(function(e,v){var h=r[u],p=n.length,w=R(R([],f,!0),[v],!1),m=V(w);if(n.push({row:e,depth:u,displayPosition:p,groupingKey:h,position:p,isLastGroupRow:0===u,rowPath:w,absoluteRowIndex:p}),U(m,u,a,o,i)&&r.length>u){var g=null==l?void 0:l.get(m),b=_(e,h);if(g&&(g.loading||g.error||g.isEmpty)){if(g.loading&&c||g.error&&s||g.isEmpty&&d){var x=n.length;n.push({row:{},depth:u+1,displayPosition:x,groupingKey:h,position:x,isLastGroupRow:!1,rowPath:R(R([],w,!0),[h],!1),stateIndicator:{parentRowId:m,state:g},absoluteRowIndex:x})}else if(g.loading&&!c){var y=n.length;n.push({row:{},depth:u+1,displayPosition:y,groupingKey:h,position:y,isLastGroupRow:!1,rowPath:R(R([],w,!0),[h,"loading-skeleton"],!1),isLoadingSkeleton:!0,absoluteRowIndex:y})}}else if(b.length>0){var C=R(R([],w,!0),[h],!1);t(b,u+1,C)}}})};return t(e,0),n},[e,r,o,i,a,l,c,s,d])},it=function(){return n("div",x({className:"st-empty-state"},{children:"No rows to display"}))},at=function(e){var t=i(!1),r=t[0],a=t[1];return o(function(){a(!0)},[]),r?n(ut,x({},e)):null},ut=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,m=void 0!==w&&w,y=e.columnEditorPosition,S=void 0===y?"right":y,N=e.columnEditorText,H=void 0===N?"Columns":N,k=e.columnReordering,A=void 0!==k&&k,D=e.columnResizing,F=void 0!==D&&D,O=e.copyHeadersToClipboard,W=void 0!==O&&O,B=e.defaultHeaders,q=e.editColumns,z=void 0!==q&&q,_=e.editColumnsInitOpen,U=void 0!==_&&_,X=e.emptyStateRenderer,$=e.enableHeaderEditing,Z=void 0!==$&&$,Q=e.enableRowSelection,tn=void 0!==Q&&Q,on=e.errorStateRenderer,un=e.expandAll,sn=void 0===un||un,fn=e.expandIcon,pn=void 0===fn?n(cn,{className:"st-expand-icon"}):fn,mn=e.externalFilterHandling,gn=void 0!==mn&&mn,bn=e.externalSortHandling,xn=void 0!==bn&&bn,yn=e.filterIcon,Cn=void 0===yn?n(hn,{className:"st-header-icon"}):yn,In=e.footerHeight,Rn=void 0===In?49:In,Sn=e.footerRenderer,Mn=e.headerCollapseIcon,Nn=void 0===Mn?n(cn,{className:"st-header-icon"}):Mn,En=e.headerDropdown,Hn=e.headerExpandIcon,kn=void 0===Hn?n(ln,{className:"st-header-icon"}):Hn,Tn=e.headerHeight,An=e.height,Dn=e.hideFooter,Fn=void 0!==Dn&&Dn,Pn=e.hideHeader,Ln=void 0!==Pn&&Pn,On=e.includeHeadersInCSVExport,Wn=void 0===On||On,qn=e.initialSortColumn,zn=e.initialSortDirection,Gn=void 0===zn?"asc":zn,jn=e.isLoading,Kn=void 0!==jn&&jn,Vn=e.loadingStateRenderer,_n=e.maxHeight,Un=e.nextIcon,Jn=void 0===Un?n(cn,{className:"st-next-prev-icon"}):Un,Xn=e.onCellClick,Yn=e.onCellEdit,$n=e.onColumnOrderChange,Zn=e.onColumnSelect,Qn=e.onColumnVisibilityChange,ne=e.onFilterChange,ee=e.onGridReady,te=e.onHeaderEdit,re=e.onLoadMore,oe=e.onNextPage,ie=e.onPageChange,ae=e.onRowGroupExpand,ue=e.onRowSelectionChange,ce=e.onSortChange,se=e.prevIcon,de=void 0===se?n(ln,{className:"st-next-prev-icon"}):se,fe=e.rowButtons,ve=e.rowGrouping,he=e.rowHeight,pe=void 0===he?32:he,we=e.rows,me=e.rowsPerPage,ge=void 0===me?10:me,be=e.selectableCells,xe=void 0!==be&&be,ye=e.selectableColumns,Ce=void 0!==ye&&ye,Ie=e.selectionColumnWidth,Re=void 0===Ie?42:Ie,Se=e.serverSidePagination,Me=void 0!==Se&&Se,Ne=e.shouldPaginate,Ee=void 0!==Ne&&Ne,He=e.sortDownIcon,ke=void 0===He?n(vn,{className:"st-header-icon"}):He,Te=e.sortUpIcon,Ae=void 0===Te?n(dn,{className:"st-header-icon"}):Te,De=e.tableEmptyStateRenderer,Le=void 0===De?n(it,{}):De,qe=e.tableRef,ze=e.theme,Ge=void 0===ze?"light":ze,je=e.totalRowCount,Ke=e.useHoverRowBackground,Ze=void 0===Ke||Ke,nt=e.useOddColumnBackground,et=void 0!==nt&&nt,tt=e.useOddEvenRowBackground,rt=void 0!==tt&&tt;et&&(rt=!1),m&&(Ze=!1);var at=a(null),ut=a(null),lt=a(null),ct=a(null),st=a(null),dt=a(null),ft=a(null),vt=b(function(n){return n+1},0)[1],ht=i(new Map),pt=ht[0],wt=ht[1],mt=i(we),gt=mt[0],bt=mt[1],xt=a(new Map);o(function(){bt(we);var n=new Map;we.forEach(function(e,t){var r=V([t]);n.set(r,t)}),xt.current=n},[we]);var yt,Ct,It,Rt,St,Mt,Nt,Et,Ht,kt,Tt=function(n){var e=n.tableBodyContainerRef,t=i(0),r=t[0],o=t[1];return g(function(){e.current&&o(e.current.offsetWidth-e.current.clientWidth)},[e]),{setScrollbarWidth:o,scrollbarWidth:r,tableBodyContainerRef:e}}({tableBodyContainerRef:dt}),At=Tt.scrollbarWidth,Dt=Tt.setScrollbarWidth,Ft=wn({headerContainerRef:ft,mainSectionRef:dt,scrollbarWidth:At}).isMainSectionScrollable,Pt=u(function(){if(Kn&&0===gt.length){var n=Ee?ge:10;return Ft&&(n+=1),Array.from({length:n},function(n,e){return{}})}return gt},[Kn,gt,ge,Ft,Ee]),Lt=i(1),Ot=Lt[0],Wt=Lt[1],Bt=i(B),qt=Bt[0],zt=Bt[1],Gt=i(!1),jt=Gt[0],Kt=Gt[1],Vt=i(!1),_t=Vt[0],Ut=Vt[1],Jt=i(null),Xt=Jt[0],Yt=Jt[1],$t=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(B),n},[B]),Zt=i($t),Qt=Zt[0],nr=Zt[1];o(function(){zt(B)},[B]);var er=u(function(){var n,e=R([],qt,!0);return tn&&!(null===(n=null==qt?void 0:qt[0])||void 0===n?void 0:n.isSelectionColumn)&&(e=R([{accessor:"__row_selection__",label:"",width:Re,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],e,!0)),e},[tn,qt,Re]),tr=i(0),rr=tr[0],or=tr[1],ir=i("none"),ar=ir[0],ur=ir[1],lr=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}}(sn,ve),cr=lr.expandedDepths,sr=lr.setExpandedDepths,dr=i(new Map),fr=dr[0],vr=dr[1],hr=i(new Map),pr=hr[0],wr=hr[1],mr=function(){var n=i(""),e=n[0],t=n[1],r=a(null);return o(function(){return e&&(r.current&&clearTimeout(r.current),r.current=setTimeout(function(){t("")},1e3)),function(){r.current&&clearTimeout(r.current)}},[e]),{announcement:e,announce:function(n){t(n)}}}(),gr=mr.announcement,br=mr.announce,xr=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 g(function(){var n=function(){o.current&&s(o.current.clientWidth)};n();var e=null;return o.current&&(e=new ResizeObserver(n)).observe(o.current),function(){e&&e.disconnect()}},[o]),{containerWidth:c,calculatedHeaderHeight:v,maxHeaderDepth:f}}({effectiveHeaders:er,headerHeight:Tn,rowHeight:pe,tableBodyContainerRef:dt}),yr=xr.containerWidth,Cr=xr.calculatedHeaderHeight,Ir=xr.maxHeaderDepth,Rr=a(0),Sr=a(0),Mr=u(function(){var n=E(window.innerWidth),e=le({headers:er,containerWidth:yr,maxPinnedWidthPercent:n,collapsedHeaders:Qt});return{mainBodyWidth:e.mainWidth,pinnedLeftWidth:e.leftWidth,pinnedRightWidth:e.rightWidth,pinnedLeftContentWidth:e.leftContentWidth,pinnedRightContentWidth:e.rightContentWidth}},[er,yr,Qt]),Nr=Mr.mainBodyWidth,Er=Mr.pinnedLeftWidth,Hr=Mr.pinnedRightWidth,kr=Mr.pinnedLeftContentWidth,Tr=Mr.pinnedRightContentWidth;o(function(){if(d&&0!==yr&&!jt){var n,e=function(n){var t=[];return n.forEach(function(n){n.hide||(n.children&&n.children.length>0?t.push.apply(t,e(n.children)):t.push(n))}),t};if((n=lt.current?lt.current.clientWidth:Math.max(0,yr-Er-Hr))>0){var t=qt.filter(function(n){return!n.pinned});e(t).length===Sr.current&&10>Math.abs(n-Rr.current)||zt(function(t){var r=t.filter(function(n){return!n.pinned}),o=e(r),i=o.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===i)return t;var a=n/i;if(.01>Math.abs(a-1))return t;Rr.current=n,Sr.current=o.length;var u=new Map,l=0;o.forEach(function(e,t){if(!e.pinned){var r,i="number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):150;t===o.length-1?r=n-l:l+=r=Math.round(i*a),u.set(e.accessor,r)}});var c=function(n){var e;if(n.hide)return n;var t=null===(e=n.children)||void 0===e?void 0:e.map(c);if(!n.children||0===n.children.length){if(n.pinned)return x(x({},n),{children:t});var r=u.get(n.accessor);if(void 0!==r)return x(x({},n),{width:r,children:t});var o="number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):150;return x(x({},n),{width:Math.round(o*a),children:t})}return x(x({},n),{children:t})};return t.map(c)})}}},[d,yr,jt,qt,Er,Hr]);var Ar=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 T(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&&K(u)){var l=i(u,t+1),c=x({},e);return c[o]=l,n.forEach(function(n){var e=Xe(l,n.accessor,n.aggregation,a);void 0!==e&&j(c,n.accessor,e)}),c}return e})};return i(o)},[e,t,r])}({rows:Pt,headers:qt,rowGrouping:ve}),Dr=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=We(t),v=u(function(){return Ue({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 Ue({externalFilterHandling:r,tableRows:e,filterState:o})},[s,e,r]);return{filteredRows:v,updateFilter:h,clearFilter:p,clearAllFilters:w,filters:s,computeFilteredRowsPreview:m}}({rows:Ar,headers:er,externalFilterHandling:gn,onFilterChange:ne,announce:br}),Fr=Dr.filters,Pr=Dr.updateFilter,Lr=Dr.clearFilter,Or=Dr.clearAllFilters,Wr=Dr.computeFilteredRowsPreview,Br=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=We(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=Oe({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(K(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 Be({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}:p&&p.key.accessor===e?"asc"===p.direction&&(i={key:r,direction:"desc"}):i={key:r,direction:"asc"},w(i),null==o||o(i),d)if(i){var a="asc"===i.direction?"ascending":"descending";d("Sorted by ".concat(r.label,", ").concat(a))}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=null;return p&&p.key.accessor===n?"asc"===p.direction&&(u={key:i,direction:"desc"}):u={key:i,direction:"asc"},Be({externalSortHandling:r,tableRows:t,sortColumn:u,rowGrouping:a,headers:e,sortNestedRows:m})},[p,e,t,r,a,m]);return{sort:p,sortedRows:g,updateSort:b,computeSortedRowsPreview:y}}({headers:qt,tableRows:Dr.filteredRows,externalSortHandling:xn,onSortChange:ce,rowGrouping:ve,initialSortColumn:qn,initialSortDirection:Gn,announce:br}),qr=Br.sort,zr=Br.updateSort,Gr=Br.computeSortedRowsPreview,jr=ot({rows:Br.sortedRows,rowGrouping:ve,expandedRows:fr,collapsedRows:pr,expandedDepths:cr,rowStateMap:pt,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!on,hasEmptyRenderer:!!X}),Kr=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.every(function(n){return e.has(V(n.rowPath||[n.position])+"")})}(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 e.has(V(n.rowPath||[n.position])+"")}).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 V(e.rowPath||[e.position])+""===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.map(function(n){return V(n.rowPath||[n.position])+""}))}(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 V(e.rowPath||[e.position])+""===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 V(n.rowPath||[n.position])+""===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:jr,onRowSelectionChange:ue,enableRowSelection:tn});yt=Kr.selectedRows,Ct=Kr.setSelectedRows,It=Kr.isRowSelected,Rt=Kr.areAllRowsSelected,St=Kr.selectedRowCount,Mt=Kr.selectedRowsData,Nt=Kr.handleRowSelect,Et=Kr.handleSelectAll,Ht=Kr.handleToggleRow,kt=Kr.clearSelection;var Vr=ot({rows:Ar,rowGrouping:ve,expandedRows:fr,collapsedRows:pr,expandedDepths:cr,rowStateMap:pt,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!on,hasEmptyRenderer:!!X}),_r=l(function(n){var e=Wr(n);return ve&&0!==ve.length?J({rows:e,rowGrouping:ve,expandedRows:fr,collapsedRows:pr,expandedDepths:cr,rowStateMap:pt,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!on,hasEmptyRenderer:!!X}):e.map(function(n,e){return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,isLastGroupRow:!1,rowPath:[e],absoluteRowIndex:e}})},[Wr,ve,fr,pr,cr,pt,Vn,on,X]),Ur=l(function(n){var e=Gr(n);return ve&&0!==ve.length?J({rows:e,rowGrouping:ve,expandedRows:fr,collapsedRows:pr,expandedDepths:cr,rowStateMap:pt,hasLoadingRenderer:!!Vn,hasErrorRenderer:!!on,hasEmptyRenderer:!!X}):e.map(function(n,e){return{row:n,depth:0,displayPosition:e,groupingKey:void 0,position:e,isLastGroupRow:!1,rowPath:[e],absoluteRowIndex:e}})},[Gr,ve,fr,pr,cr,pt,Vn,on,X]),Jr=function(n){var e=n.height,t=n.maxHeight,r=n.rowHeight,o=n.shouldPaginate,i=n.rowsPerPage,a=n.totalRowCount,l=n.headerHeight,c=n.footerHeight;return u(function(){if(t){var n=Je(t);if(0===n)return;var u=l||r;if(n>=u+a*r+(c||0)||20>a)return;return Math.max(0,n-u)}if(!e&&o&&i)return r*(i+1);if(e){var s=Je(e);if(0!==s)return Math.max(0,s-r)}},[e,t,r,o,i,a,l,c])}({height:An,maxHeight:_n,rowHeight:pe,shouldPaginate:Ee,rowsPerPage:ge,totalRowCount:null!=je?je:jr.length,headerHeight:Cr,footerHeight:Ee&&!Fn?Rn:void 0}),Xr=function(n){var e=n.allowAnimations,t=n.flattenedRows,r=n.originalFlattenedRows,o=n.currentPage,c=n.rowsPerPage,s=n.shouldPaginate,d=n.serverSidePagination,f=n.contentHeight,v=n.rowHeight,h=n.scrollTop,p=n.scrollDirection,w=void 0===p?"none":p,m=n.computeFilteredRowsPreview,b=n.computeSortedRowsPreview,y=i(!1),C=y[0],I=y[1],S=i([]),N=S[0],E=S[1],H=a([]),k=a([]),T=u(function(){return M(v)},[v]),A=a(new Map),D=a(null),F=l(function(n){var e=(o-1)*c;return(s&&!d?n.slice(e,o*c):n).map(function(n,t){return x(x({},n),{position:t,displayPosition:t,absoluteRowIndex:s&&!d?e+t:t})})},[o,c,d,s]);u(function(){if(0===A.current.size&&r.length>0){var n=new Map;r.forEach(function(e,t){var r=V(e.rowPath||[e.position])+"";n.set(r,t)}),A.current=n}},[r]);var P=u(function(){return F(t)},[t,F]),L=u(function(){return void 0===f?P:Y({bufferRowCount:T,contentHeight:f,tableRows:P,rowHeight:v,scrollTop:h,scrollDirection:w})},[P,f,v,h,w,T]),O=l(function(n,e){var t=new Set(n.map(function(n){return V(n.rowPath||[n.position])+""})),r=new Set(e.map(function(n){return V(n.rowPath||[n.position])+""}));return{staying:e.filter(function(n){var e=V(n.rowPath||[n.position])+"";return t.has(e)}),entering:e.filter(function(n){var e=V(n.rowPath||[n.position])+"";return!t.has(e)}),leaving:n.filter(function(n){var e=V(n.rowPath||[n.position])+"";return!r.has(e)})}},[]),W=u(function(){if(0===H.current.length)return!1;var n=P.map(function(n){return V(n.rowPath||[n.position])+""}),e=H.current.map(function(n){return V(n.rowPath||[n.position])+""});return n.length!==e.length||!n.every(function(n,t){return n===e[t]})},[P]);g(function(){if(!C){var n=function(){N.length>0&&E([])};if(!e||s)return n(),H.current=P,void(k.current=L);if(0===H.current.length)return n(),H.current=P,void(k.current=L);if(!W)return n(),H.current=P,void(k.current=L);D.current={tableRows:P,visibleRows:L},I(!0)}},[e,P,N.length,W,C,s,L]),g(function(){if(C&&D.current&&N.length>0){var n=setTimeout(function(){var n=D.current;I(!1),E([]),H.current=n.tableRows,k.current=n.visibleRows,D.current=null},Qe.ROW_REORDER.duration+100);return function(){return clearTimeout(n)}}},[C,N.length]);var B=u(function(){if(!e||s)return L;if(N.length>0){var n=new Map,t=new Map;return P.forEach(function(e){var r=V(e.rowPath||[e.position])+"";n.set(r,e.position),t.set(r,e.displayPosition)}),N.map(function(e){var r=V(e.rowPath||[e.position])+"",o=n.get(r),i=t.get(r);return void 0!==o&&void 0!==i?x(x({},e),{position:o,displayPosition:i}):e})}return L},[L,N,P,e,s]),q=l(function(n){if(e&&!s&&void 0!==f){var t=m(n),r=F(t),o=Y({bufferRowCount:T,contentHeight:f,tableRows:r,rowHeight:v,scrollTop:h,scrollDirection:w}),i=O(L,o).entering.map(function(n){var e=V(n.rowPath||[n.position])+"";return P.find(function(n){return V(n.rowPath||[n.position])+""===e})||n}).filter(Boolean);i.length>0&&E(R(R([],L,!0),i,!0))}},[e,s,m,F,f,v,h,w,O,P,L,T]),z=l(function(n){if(e&&!s&&void 0!==f){var t=b(n),r=F(t),o=Y({bufferRowCount:T,contentHeight:f,tableRows:r,rowHeight:v,scrollTop:h,scrollDirection:w}),i=O(L,o).entering.map(function(n){var e=V(n.rowPath||[n.position])+"";return P.find(function(n){return V(n.rowPath||[n.position])+""===e})||n}).filter(Boolean);i.length>0&&E(R(R([],L,!0),i,!0))}},[e,s,b,F,f,v,h,w,O,P,L,T]);return{currentTableRows:P,currentVisibleRows:L,isAnimating:C,prepareForFilterChange:q,prepareForSortChange:z,rowsToRender:B}}({allowAnimations:c,flattenedRows:jr,originalFlattenedRows:Vr,currentPage:Ot,rowsPerPage:ge,shouldPaginate:Ee,serverSidePagination:Me,contentHeight:Jr,rowHeight:pe,scrollTop:rr,scrollDirection:ar,computeFilteredRowsPreview:_r,computeSortedRowsPreview:Ur}),Yr=Xr.currentTableRows,$r=Xr.rowsToRender,Zr=Xr.prepareForFilterChange,Qr=Xr.prepareForSortChange,no=Xr.isAnimating,eo=a(new Map),to=a(new Map),ro=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=i(new Set),g=m[0],b=m[1],x=i(new Set),y=x[0],R=x[1],S=i(null),M=S[0],N=S[1],E=i(null),H=E[0],k=E[1],T=i(new Set),A=T[0],D=T[1],F=i(new Set),P=F[0],O=F[1],W=i(!1),B=W[0],q=W[1],z=a(!1),K=a(null),_=u(function(){var n=new Set;return g.forEach(function(e){var t=e.split("-");if(t.length>=2){var r=parseInt(t[1],10);isNaN(r)||n.add(r)}}),y.forEach(function(e){n.add(e)}),n},[g,y]),U=u(function(){var n=new Set;return g.forEach(function(e){var t=e.split("-");if(t.length>=3){var r=t.slice(2).join("-");n.add(r)}}),y.size>0&&r.forEach(function(e){var t=V(e.rowPath||[e.position]);n.add(t+"")}),n},[g,y,r]),J=u(function(){return t.flatMap(function(n){return L(n,d)})},[t,d]),X=l(function(){if(0!==g.size){var n=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}(g,J,r,w);navigator.clipboard.writeText(n),D(new Set(g)),setTimeout(function(){return D(new Set)},800)}},[g,J,r,w]),Y=l(function(){return C(void 0,void 0,void 0,function(){var n,e,t,o,i;return I(this,function(a){switch(a.label){case 0:if(!H)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(n=a.sent())?(e=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=V(v.rowPath||[v.position]);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(j(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}}(n,H,J,r,c,s),o=e.warningCells,(t=e.updatedCells).size>0&&(D(t),setTimeout(function(){return D(new Set)},800)),o.size>0&&(O(o),setTimeout(function(){return O(new Set)},800)),[3,4]):[2];case 3:return i=a.sent(),console.warn("Failed to paste from clipboard:",i),[3,4];case 4:return[2]}})})},[H,J,r,c,s]),$=l(function(){if(0!==g.size){var n=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=V(s.rowPath||[s.position]);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))?[]:""),j(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}}(g,J,r,c,s),e=n.deletedCells,t=n.warningCells;e.size>0&&(D(e),setTimeout(function(){return D(new Set)},800)),t.size>0&&(O(t),setTimeout(function(){return O(new Set)},800))}},[g,J,r,c,s]),Z=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=r[l],d=V(s.rowPath||[s.position]);t.add(en({colIndex:c,rowIndex:l,rowId:d}))}R(new Set),N(null),b(t),k(e),setTimeout(function(){return nn(e,f)},0)},[r,f,h]),Q=l(function(n){if(n.rowIndex>=0&&r.length>n.rowIndex&&n.colIndex>=0&&(h?J.length:J.length-1)>=n.colIndex){var e=en(n);R(new Set),N(null),b(new Set([e])),k(n),setTimeout(function(){return nn(n,f)},0)}},[J.length,r.length,f,h]),tn=l(function(n,e){void 0===e&&(e=!1),b(new Set),k(null),R(function(t){var r=new Set(e?t:[]);return n.forEach(function(n){return r.add(n)}),r}),n.length>0&&N(n[n.length-1])},[]);!function(n){var e=n.copyToClipboard,t=n.deleteSelectedCells,r=n.enableRowSelection,i=void 0!==r&&r,a=n.initialFocusedCell,u=n.leafHeaders,l=n.pasteFromClipboard,c=n.selectCellRange,s=n.selectSingleCell,d=n.selectableCells,f=n.selectedCells,v=n.setLastSelectedColumnIndex,h=n.setSelectedCells,p=n.setSelectedColumns,w=n.startCell,m=n.tableRows;o(function(){var n=function(n){if(d&&a&&0!==f.size){var c=document.activeElement;if(!(c instanceof HTMLInputElement||c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement||"true"===(null==c?void 0:c.getAttribute("contenteditable")))){var s=a.rowIndex,R=a.colIndex,S=a.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 M=new Set,N=0;m.length>N;N++)for(var E=0;u.length>E;E++){var H=i?E+1:E,k=m[N],T=V(k.rowPath||[k.position]);M.add("".concat(N,"-").concat(H,"-").concat(T))}return h(M),p(new Set),void v(null)}if("Delete"===n.key||"Backspace"===n.key)return n.preventDefault(),void t();var A=m[s];if((A?V(A.rowPath||[A.position]):null)!==S){var D=m.findIndex(function(n){return V(n.rowPath||[n.position])===S});if(-1===D)return;s=D}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}};"ArrowUp"===n.key?(n.preventDefault(),r(n,s,R,F)):"ArrowDown"===n.key?(n.preventDefault(),o(n,s,R,F)):"ArrowLeft"===n.key||"Tab"===n.key&&n.shiftKey?(n.preventDefault(),g(n,s,R,F)):"ArrowRight"===n.key||"Tab"===n.key?(n.preventDefault(),b(n,s,R,F)):"Home"===n.key?(n.preventDefault(),x(n,s)):"End"===n.key?(n.preventDefault(),y(n,s)):"PageUp"===n.key?(n.preventDefault(),C(n,s,R)):"PageDown"===n.key?(n.preventDefault(),I(n,s,R)):"Escape"===n.key&&(h(new Set),p(new Set),v(null),w.current=null)}else e()}}},r=function(n,e,t,r){if(n.shiftKey){w.current||(w.current=a);var o=e-1;if((n.ctrlKey||n.metaKey)&&(o=r(e,t,"up").rowIndex),o>=0){var i=V((u=m[o]).rowPath||[u.position]);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else if(e>0){var u;o=e-1,(n.ctrlKey||n.metaKey)&&(o=r(e,t,"up").rowIndex),i=V((u=m[o]).rowPath||[u.position]),s({rowIndex:o,colIndex:t,rowId:i}),w.current=null}},o=function(n,e,t,r){if(n.shiftKey){w.current||(w.current=a);var o=e+1;if((n.ctrlKey||n.metaKey)&&(o=r(e,t,"down").rowIndex),m.length>o){var i=V((u=m[o]).rowPath||[u.position]);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else if(m.length-1>e){var u;o=e+1,(n.ctrlKey||n.metaKey)&&(o=r(e,t,"down").rowIndex),i=V((u=m[o]).rowPath||[u.position]),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);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=V((l=m[e]).rowPath||[l.position]);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;var l;0>o||(u=V((l=m[e]).rowPath||[l.position]),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);var l=t+1;if((n.ctrlKey||n.metaKey)&&(l=r(e,t,"right").colIndex),o>=l){var d=V((f=m[e]).rowPath||[f.position]);c(w.current,{rowIndex:e,colIndex:l,rowId:d})}}else if(o>t){var f;l=t+1,(n.ctrlKey||n.metaKey)&&"ArrowRight"===n.key&&(l=r(e,t,"right").colIndex),l>o||(d=V((f=m[e]).rowPath||[f.position]),s({rowIndex:e,colIndex:l,rowId:d}),w.current=null)}},x=function(n,e,t){if(n.shiftKey){w.current||(w.current=a);var r=e,o=i?1:0;(n.ctrlKey||n.metaKey)&&(r=0);var u=V((l=m[r]).rowPath||[l.position]);c(w.current,{rowIndex:r,colIndex:o,rowId:u})}else{var l;r=e,o=i?1:0,(n.ctrlKey||n.metaKey)&&(r=0),u=V((l=m[r]).rowPath||[l.position]),s({rowIndex:r,colIndex:o,rowId:u}),w.current=null}},y=function(n,e,t){if(n.shiftKey){w.current||(w.current=a);var r=e,o=i?u.length:u.length-1;(n.ctrlKey||n.metaKey)&&(r=m.length-1);var l=V((d=m[r]).rowPath||[d.position]);c(w.current,{rowIndex:r,colIndex:o,rowId:l})}else{var d;r=e,o=i?u.length:u.length-1,(n.ctrlKey||n.metaKey)&&(r=m.length-1),l=V((d=m[r]).rowPath||[d.position]),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);var o=V((i=m[r]).rowPath||[i.position]);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else{var i;o=V((i=m[r]).rowPath||[i.position]),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);var o=V((i=m[r]).rowPath||[i.position]);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else{var i;o=V((i=m[r]).rowPath||[i.position]),s({rowIndex:r,colIndex:t,rowId:o}),w.current=null}};return document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}},[d,a,m,u,s,c,f,h,p,v,e,l,t,w,i])}({selectableCells:e,initialFocusedCell:H,tableRows:r,leafHeaders:J,selectSingleCell:Q,selectCellRange:Z,selectedCells:g,setSelectedCells:b,setSelectedColumns:R,setLastSelectedColumnIndex:N,copyToClipboard:X,pasteFromClipboard:Y,deleteSelectedCells:$,startCell:K,enableRowSelection:h});var rn=l(function(n,e){var t=new Set,o=new Map;r.forEach(function(n,e){var t=V(n.rowPath||[n.position]);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=r[v],m=V(w.rowPath||[w.position]);t.add(en({colIndex:p,rowIndex:v,rowId:m}))}b(t)},[r,h]),on=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},[]),an=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 on(n,e)},[on]),un=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)))}},[]),ln=l(function(n){var e=n.colIndex,t=en({colIndex:e,rowIndex:n.rowIndex,rowId:n.rowId}),r=g.has(t),o=y.has(e);return r||o},[g,y]),cn=l(function(n){var e=n.colIndex,t=n.rowIndex,o=n.rowId;if(B)return"";var i=[],a=r[t-1],u=a?V(a.rowPath||[a.position]):null,l=r[t+1],c=l?V(l.rowPath||[l.position]):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||!ln(s)||y.has(e)&&0===t)&&i.push("st-selected-top-border"),(!d||!ln(d)||y.has(e)&&t===r.length-1)&&i.push("st-selected-bottom-border"),ln(f)||i.push("st-selected-left-border"),ln(v)||i.push("st-selected-right-border"),i.join(" ")},[B,ln,r,y]),sn=u(function(){return H?function(n){return n.rowIndex===H.rowIndex&&n.colIndex===H.colIndex&&n.rowId===H.rowId}:function(){return!1}},[H]),dn=l(function(n){var e=en({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return A.has(e)},[A]),fn=l(function(n){var e=en({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return P.has(e)},[P]);return{getBorderClass:cn,handleMouseDown:function(n){var t=n.colIndex,r=n.rowIndex,o=n.rowId;if(e){z.current=!0,q(!0),K.current={rowIndex:r,colIndex:t,rowId:o},setTimeout(function(){R(new Set),N(null);var n=en({colIndex:t,rowIndex:r,rowId:o});b(new Set([n])),k({rowIndex:r,colIndex:t,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(z.current&&K.current){if(null!==i&&null!==a){un(i,a);var n=Date.now();if(n-l>=16){var e=an(i,a);e&&rn(K.current,e),l=n}}u=requestAnimationFrame(c)}else null!==u&&(cancelAnimationFrame(u),u=null)},s=function(n){z.current&&K.current&&(i=n.clientX,a=n.clientY)},d=function(){z.current=!1,q(!1),null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),u=requestAnimationFrame(c)}},handleMouseOver:function(n){e&&z.current&&K.current&&rn(K.current,{colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId})},isCopyFlashing:dn,isWarningFlashing:fn,isInitialFocusedCell:sn,isSelected:ln,lastSelectedColumnIndex:M,pasteFromClipboard:Y,selectColumns:tn,selectedCells:g,selectedColumns:y,setInitialFocusedCell:k,setSelectedCells:b,setSelectedColumns:R,deleteSelectedCells:$,columnsWithSelectedCells:_,rowsWithSelectedCells:U,startCell:K}}({selectableCells:xe,headers:qt,tableRows:Yr,onCellEdit:Yn,cellRegistry:eo.current,collapsedHeaders:Qt,rowHeight:pe,enableRowSelection:tn,copyHeadersToClipboard:W}),oo=ro.getBorderClass,io=ro.handleMouseDown,ao=ro.handleMouseOver,uo=ro.isCopyFlashing,lo=ro.isInitialFocusedCell,co=ro.isSelected,so=ro.isWarningFlashing,fo=ro.selectColumns,vo=ro.selectedCells,ho=ro.selectedColumns,po=ro.setInitialFocusedCell,wo=ro.setSelectedCells,mo=ro.setSelectedColumns,go=ro.columnsWithSelectedCells,bo=ro.rowsWithSelectedCells,xo=ro.startCell,yo=l(function(n){Qr(n),setTimeout(function(){zr({accessor:n})},0)},[Qr,zr]),Co=l(function(n){zt(n)},[]);!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:Ce,selectedCells:vo,selectedColumns:ho,setSelectedCells:wo,setSelectedColumns:mo,activeHeaderDropdown:Xt,setActiveHeaderDropdown:Yt,startCell:xo}),function(n){var e=n.forceUpdate,t=n.tableBodyContainerRef,r=n.setScrollbarWidth;g(function(){var n=function(){e(),t.current&&r(t.current.offsetWidth-t.current.clientWidth)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[e,t,r])}({forceUpdate:vt,tableBodyContainerRef:dt,setScrollbarWidth:Dt}),function(n){var e=n.onGridReady;o(function(){null==e||e()},[e])}({onGridReady:ee}),function(n){var e=n.cellRegistryRef,t=n.clearAllFilters,r=n.clearFilter,i=n.currentPage,a=n.expandedDepths,u=n.filters,l=n.flattenedRows,c=n.headerRegistryRef,s=n.headers,d=n.includeHeadersInCSVExport,f=n.rowGrouping,v=n.rows,h=n.setCollapsedRows,p=n.setCurrentPage,w=n.setExpandedDepths,m=n.setExpandedRows,g=n.sort,b=n.tableRef,x=n.updateFilter,y=n.updateSort,C=n.visibleRows;o(function(){b&&(b.current={updateData:function(n){var t=n.accessor,r=n.rowIndex,o=n.newValue,i=null==v?void 0:v[r];if(i){var a=V([r]),u=P({rowId:a,accessor:t}),l=e.current.get(u);l&&l.updateContent(o),void 0!==G(i,t)&&j(i,t,o)}},setHeaderRename:function(n){var e=c.current.get(n.accessor+"");e&&e.setEditing(!0)},getVisibleRows:function(){return C},getAllRows:function(){return l},getHeaders:function(){return s},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 Ye(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 Ye(a)}return!1!==n.useFormattedValueForCSV&&n.valueFormatter?(i=n.valueFormatter({accessor:n.accessor,colIndex:r,row:t,rowIndex:e,value:o}),Ye(i)):Ye(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)}(l,s,(void 0===n?{}:n).filename,d)},getSortState:function(){return g},applySortState:$e(y),getFilterState:function(){return u},applyFilter:$e(x),clearFilter:$e(r),clearAllFilters:$e(t),getCurrentPage:function(){return i},setPage:function(n){return p(n)},expandAll:function(){var n=Array.from({length:(null==f?void 0:f.length)||0},function(n,e){return e});w(new Set(n)),m(new Map),h(new Map)},collapseAll:function(){w(new Set),m(new Map),h(new Map)},expandDepth:function(n){w(function(e){for(var t=new Set(e),r=0;n>=r;r++)t.add(r);return t}),m(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),h(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){w(function(e){var t=new Set(e);return t.delete(n),t}),m(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),h(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){w(function(e){var t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t}),m(function(e){var t=new Map(e);return Array.from(t.entries()).forEach(function(e){e[1]===n&&t.delete(e[0])}),t}),h(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){w(n)},getExpandedDepths:function(){return a},getGroupingProperty:function(n){return null==f?void 0:f[n]},getGroupingDepth:function(n){var e;return null!==(e=null==f?void 0:f.indexOf(n))&&void 0!==e?e:-1}})},[e,t,r,i,a,u,l,c,s,d,f,n.rowIndexMap,v,n.rowsPerPage,n.serverSidePagination,h,p,w,m,n.setRows,n.shouldPaginate,g,b,x,y,C])}({cellRegistryRef:eo,clearAllFilters:Or,clearFilter:Lr,currentPage:Ot,expandedDepths:cr,filters:Fr,flattenedRows:jr,headerRegistryRef:to,headers:er,includeHeadersInCSVExport:Wn,rowGrouping:ve,rowIndexMap:xt,rows:Pt,rowsPerPage:ge,serverSidePagination:Me,setCollapsedRows:wr,setCurrentPage:Wt,setExpandedDepths:sr,setExpandedRows:vr,setRows:bt,shouldPaginate:Ee,sort:qr,tableRef:qe,updateFilter:Pr,updateSort:zr,visibleRows:$r}),function(n){var e=n.filters,t=n.onFilterChange;o(function(){null==t||t(e)},[e,t])}({filters:Fr,onFilterChange:ne}),function(n){var e=n.sort,t=n.onSortChange,r=Bn(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:qr,onSortChange:ce});var Io=l(function(n){Zr(n),setTimeout(function(){Pr(n)},0)},[Zr,Pr]),Ro=!Kn&&0===Yr.length;return n(rn,x({value:{activeHeaderDropdown:Xt,allowAnimations:c,areAllRowsSelected:Rt,autoExpandColumns:d,canExpandRowGroup:f,cellRegistry:eo.current,cellUpdateFlash:h,clearSelection:kt,collapsedHeaders:Qt,columnBorders:m,columnReordering:A,columnResizing:F,columnsWithSelectedCells:go,copyHeadersToClipboard:W,draggedHeaderRef:at,editColumns:z,emptyStateRenderer:X,enableHeaderEditing:Z,enableRowSelection:tn,errorStateRenderer:on,expandedDepths:cr,expandIcon:pn,filterIcon:Cn,filters:Fr,forceUpdate:vt,getBorderClass:oo,handleApplyFilter:Io,handleClearAllFilters:Or,handleClearFilter:Lr,handleMouseDown:io,handleMouseOver:ao,handleRowSelect:Nt,handleSelectAll:Et,handleToggleRow:Ht,headerCollapseIcon:Nn,headerContainerRef:ft,headerDropdown:En,headerExpandIcon:kn,headerHeight:null!=Tn?Tn:pe,headerRegistry:to.current,headers:er,hoveredHeaderRef:ut,includeHeadersInCSVExport:Wn,isAnimating:no,isCopyFlashing:uo,isInitialFocusedCell:lo,isLoading:Kn,isResizing:jt,isRowSelected:It,isScrolling:_t,isSelected:co,isWarningFlashing:so,loadingStateRenderer:Vn,mainBodyRef:lt,maxHeaderDepth:Ir,nextIcon:Jn,onCellClick:Xn,onCellEdit:Yn,onColumnOrderChange:$n,onColumnSelect:Zn,onColumnVisibilityChange:Qn,onHeaderEdit:te,onLoadMore:re,onRowGroupExpand:ae,onSort:yo,onTableHeaderDragEnd:Co,pinnedLeftRef:ct,pinnedRightRef:st,prevIcon:de,rowButtons:fe,rowGrouping:ve,rowHeight:pe,rowStateMap:pt,rows:gt,rowsWithSelectedCells:bo,scrollbarWidth:At,selectColumns:fo,selectableColumns:Ce,selectedColumns:ho,selectedRowCount:St,selectedRows:yt,selectedRowsData:Mt,setActiveHeaderDropdown:Yt,setCollapsedHeaders:nr,setHeaders:zt,setInitialFocusedCell:po,setIsResizing:Kt,setIsScrolling:Ut,setRowStateMap:wt,setSelectedCells:wo,setSelectedColumns:mo,setSelectedRows:Ct,setExpandedDepths:sr,setExpandedRows:vr,setCollapsedRows:wr,shouldPaginate:Ee,sortDownIcon:ke,sortUpIcon:Ae,tableBodyContainerRef:dt,tableEmptyStateRenderer:Le,tableRows:Yr,theme:Ge,expandedRows:fr,collapsedRows:pr,useHoverRowBackground:Ze,useOddColumnBackground:et,useOddEvenRowBackground:rt}},{children:t("div",x({className:"simple-table-root st-wrapper theme-".concat(Ge," ").concat(null!=p?p:""," ").concat(m?"st-column-borders":""),style:_n?{maxHeight:_n,height:void 0===Jr?"auto":_n}:An?{height:An}:{}},{children:[n(_e,{children:t("div",x({className:"st-wrapper-container"},{children:[t("div",x({className:"st-content-wrapper"},{children:[n(Fe,{hideHeader:Ln,pinnedLeftWidth:Er,pinnedRightWidth:Hr,setScrollTop:or,setScrollDirection:ur,shouldShowEmptyState:Ro,sort:qr,tableRows:Yr,rowsToRender:$r}),n(Ve,{columnEditorText:H,editColumns:z,editColumnsInitOpen:U,headers:qt,position:S})]})),!Ro&&n(Pe,{mainBodyRef:lt,mainBodyWidth:Nr,pinnedLeftWidth:Er,pinnedRightWidth:Hr,pinnedLeftContentWidth:kr,pinnedRightContentWidth:Tr,tableBodyContainerRef:dt}),!Ro&&n(an,{currentPage:Ot,footerRenderer:Sn,hideFooter:Fn,onPageChange:Wt,onNextPage:oe,onUserPageChange:ie,rowsPerPage:ge,shouldPaginate:Ee,totalPages:Math.ceil((null!=je?je:jr.length)/ge),totalRows:null!=je?je:jr.length})]}))}),n("div",x({"aria-live":"polite","aria-atomic":"true",className:"st-sr-only"},{children:gr}))]}))}))},lt=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?.2:s,f=e.strokeWidth,v=void 0===f?2: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"}},{children:[n("path",{d:I,fill:c||"var(--st-chart-fill-color)",fillOpacity:d,stroke:"none",vectorEffect:"non-scaling-stroke"}),n("path",{d:C,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}))},ct=Object.freeze({__proto__:null,default:lt}),st=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"}},{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:1},t)})}))},dt=Object.freeze({__proto__:null,default:st});export{Qe as A,st as B,fn as C,it as D,hn as F,lt as L,S as R,at as S,y as _,Bn as a,x as b,M as c,rt as d,un as e,tt as f,ln as g,cn as h,sn as i,dn as j,vn as k,pn as l,on as u};
|
|
2
|
-
//# sourceMappingURL=index-84d0a21e.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-84d0a21e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|