simple-table-core 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as n,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 d,lazy as s,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(e){for(var n,t=1,r=arguments.length;r>t;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},x.apply(this,arguments)};function y(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);r.length>o;o++)0>n.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function I(e,n,t,r){return new(t||(t=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function u(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,u)}l((r=r.apply(e,n||[])).next())})}function C(e,n){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=n.call(e,i)}catch(e){u=[6,e],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(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;i>o;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var S=1,M=function(e){return Math.ceil(800/(e+1))},N=30,H=function(e){return 480>e?.3:768>e?.4:.8},E="parentExpanded",T=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;a.length>i;i++)o=r(a[i],o);return o};return r(e,n),t},k=function(e){return e.flatMap(function(e){var n=[e];return e.children&&e.children.length>0&&n.push.apply(n,k(e.children)),n})},P=function(e){return void 0===e&&(e=0),e?e+1:0},A=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},D=function(e){var n=e.header,t=e.pinned,r=e.headers,o=e.collapsedHeaders;return n.hide||n.excludeFromRender||(t||n.pinned)&&n.pinned!==t?null:!(r&&o&&function(e,n,t){var r=function(e,n){for(var t=0,r=k(e);r.length>t;t++){var o=r[t];if(o.children&&o.children.length>0&&o.children.some(function(e){return e.accessor===n}))return o}return null}(n,e.accessor);if(r){var o=t.has(r.accessor),i=e.showWhen||E;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(n,r,o))||null},F=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},O=function(e,n){return e.hide?[]:e.children&&0!==e.children.length?n&&n.has(e.accessor)?e.children.filter(function(e){var n=e.showWhen||E;return"parentCollapsed"===n||"always"===n}).flatMap(function(e){return O(e,n)}):e.children.filter(function(e){var n=e.showWhen||E;return"parentExpanded"===n||"always"===n}).flatMap(function(e){return O(e,n)}):[e]},L=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(A({accessor:e.accessor,rowId:"header"}));return(null==n?void 0:n.offsetWidth)||150},W=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(A({accessor:e.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.length>0&&e.children.forEach(function(e){W(e)})},B=function(e){return"number"==typeof e.minWidth?e.minWidth:40},q=function(e,n){var t=[];return e.forEach(function(e){e.hide||t.push.apply(t,O(e,n))}),t},G=function(e){var n=e.customTheme;return Math.min(e.headerHeight+n.rowSeparatorWidth+e.childRowCount*(e.rowHeight+n.rowSeparatorWidth)+n.nestedGridPaddingTop+n.nestedGridPaddingBottom+n.nestedGridBorderWidth,n.nestedGridMaxHeight+n.nestedGridPaddingTop+n.nestedGridPaddingBottom+n.nestedGridBorderWidth)},z=function(e){var n=e.match(/^(.+?)\[(\d+)\]$/);return n?{key:n[1],index:parseInt(n[2],10)}:{key:e,index:null}},K=function(e,n){var t=n+"";return t.includes(".")||t.includes("[")?t.split(".").reduce(function(e,n){if(null!=e){var t=z(n),r=t.index,o=e[t.key];return null!==r&&Array.isArray(o)&&(o=o[r]),o}},e):e[n]},j=function(e,n,t){var r=n+"";if(r.includes(".")||r.includes("[")){for(var o=r.split("."),i=e,a=0;o.length-1>a;a++){var u=z(o[a]),l=u.key,c=u.index;if(null==i[l]){var d=z(o[a+1]);i[l]=null!==d.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 s=z(o[o.length-1]),f=s.key,v=s.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 e[n]=t},V=function(e){return Array.isArray(e)&&e.length>0&&"object"==typeof e[0]&&null!==e[0]},_=function(e){var n=e.getRowId,t=R([],e.rowPath,!0);if(n){var r=n({row:e.row,depth:e.depth,index:e.index,rowPath:e.rowPath,rowIndexPath:e.rowIndexPath,groupingKey:e.groupingKey});t.push(r)}return t},U=function(e){return e.join("-")},J=function(e,n){var t=e[n];return V(t)?t:[]},X=function(e,n,t,r,o){var i=e+"",a=r.has(i)&&r.get(i)===n,u=o.has(i)&&o.get(i)===n;return t.has(n)?!u:a},Y=function(e){var n=e.depth,t=e.expandedDepths,r=e.expandedRows,o=e.collapsedRows,i=e.rowGrouping,a=void 0===i?[]:i,u=e.getRowId,l=e.displayPositionOffset,c=void 0===l?0:l,d=e.rowStateMap,s=e.hasLoadingRenderer,f=void 0!==s&&s,v=e.hasErrorRenderer,h=void 0!==v&&v,p=e.hasEmptyRenderer,w=void 0!==p&&p,m=e.headers,g=void 0===m?[]:m,b=e.rowHeight,x=e.headerHeight,y=e.customTheme,I=[],C=function(e,n,i,l,s,v){void 0===i&&(i=0),void 0===l&&(l=c),void 0===s&&(s=[]),void 0===v&&(v=[]);var p=i,m=l;return e.forEach(function(i,l){var c,S,M=a[n],N=R(R([],s,!0),[l],!1),H=R(R([],v,!0),[l],!1),E=_({row:i,getRowId:u,depth:n,index:l,rowPath:N,rowIndexPath:H,groupingKey:M});I.push({row:i,depth:n,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:0===n&&l===e.length-1,rowId:E,rowPath:N,rowIndexPath:H,absoluteRowIndex:p}),p++,m++;var T=U(E);if(X(T,n,t,r,o)&&a.length>n){var k=null==d?void 0:d.get(T),P=J(i,M),A=g.find(function(e){return e.expandable&&e.nestedTable});if((null==A?void 0:A.nestedTable)&&P.length>0){var D=(null===(c=A.nestedTable.customTheme)||void 0===c?void 0:c.rowHeight)||b,F=(null===(S=A.nestedTable.customTheme)||void 0===S?void 0:S.headerHeight)||x,O=G({childRowCount:P.length,rowHeight:D,headerHeight:F,customTheme:y}),L=R(R([],N,!0),[M],!1);I.push({row:{},depth:n+1,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:!1,rowId:L,rowPath:L,rowIndexPath:H,nestedTable:{parentRow:i,expandableHeader:A,childAccessor:M,calculatedHeight:O},absoluteRowIndex:p}),p++,m++}else if(k&&(k.loading||k.error||k.isEmpty)){if(k.loading&&f||k.error&&h||k.isEmpty&&w){var W=R(R([],N,!0),[M],!1);I.push({row:{},depth:n+1,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:!1,rowId:W,rowPath:W,rowIndexPath:H,stateIndicator:{parentRowId:T,state:k},absoluteRowIndex:p}),p++,m++}else if(k.loading&&!f){var B=R(R([],N,!0),[M,"loading-skeleton"],!1);I.push({row:{},depth:n+1,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:!1,rowId:B,rowPath:B,rowIndexPath:H,isLoadingSkeleton:!0,absoluteRowIndex:p}),p++,m++}}else if(P.length>0){var q=R(R([],N,!0),[M],!1),z=R([],H,!0);p=C(P,n+1,p,m,q,z)}}}),p};return C(e.rows,void 0===n?0:n,0,c,[],[]),I},$=function(e,n){var t=n.rowTopPositions;if(0===t.length)return 0;if(0>=e)return 0;if(e>=n.totalHeight)return t.length-1;for(var r=0,o=t.length-1;o>r;){var i=Math.floor((r+o+1)/2);t[i]>e?o=i-1:r=i}return r},Z=function(e,n){if(!n||0===n.length)return 0;for(var t=0,r=0,o=n.length;o>r;){var i=Math.floor((r+o)/2);e>n[i][0]?r=i+1:o=i}for(var a=0;r>a;a++)t+=n[a][1];return t},Q=function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.scrollTop,o=e.tableRows,i=e.scrollDirection,a=void 0===i?"none":i,u=e.heightMap,l=e.rowHeight+1;if(!u){var c=n*l,d=c,s=c;"down"===a?(d=Math.max(l,.1*c),s=.9*c):"up"===a&&(d=.9*c,s=Math.max(l,.1*c));var f=r+t+s,v=Math.max(0,Math.floor(Math.max(0,r-d)/l)),h=Math.min(o.length,Math.ceil(f/l)),p=r+t,w=Math.max(0,Math.ceil(r/l)),m=Math.min(o.length,Math.floor(p/l)),g=r+t,b=Math.max(0,Math.floor(r/l)),x=Math.min(o.length,Math.ceil(g/l));return{rendered:{startIndex:v,endIndex:h,rows:o.slice(v,h)},fullyVisible:{startIndex:w,endIndex:m,rows:o.slice(w,m)},partiallyVisible:{startIndex:b,endIndex:x,rows:o.slice(b,x)}}}var y=u.rowTopPositions,I=n*l,C=I,R=I;"down"===a?(C=Math.max(l,.1*I),R=.9*I):"up"===a&&(C=.9*I,R=Math.max(l,.1*I));var S=r+t+R,M=$(Math.max(0,r-C),u),N=$(S,u)+1;N=Math.min(o.length,N);var H=r,E=r+t,T=$(H,u);H>y[T]&&(T=Math.min(T+1,o.length));var k=$(E,u);k=Math.min(o.length,k);var P=r+t,A=$(r,u),D=$(P,u)+1;return D=Math.min(o.length,D),{rendered:{startIndex:M,endIndex:N,rows:o.slice(M,N)},fullyVisible:{startIndex:T,endIndex:k,rows:o.slice(T,k)},partiallyVisible:{startIndex:A,endIndex:D,rows:o.slice(A,D)}}},ee=function(e){return Q({bufferRowCount:e.bufferRowCount,contentHeight:e.contentHeight,rowHeight:e.rowHeight,scrollTop:e.scrollTop,tableRows:e.tableRows,scrollDirection:e.scrollDirection,heightMap:e.heightMap}).rendered.rows},ne=function(e){var n=e.position,t=e.customTheme;return n*(e.rowHeight+t.rowSeparatorWidth)-t.rowSeparatorWidth+Z(n,e.heightOffsets)},te=function(e){var n=e.position;return n*(e.rowHeight+e.customTheme.rowSeparatorWidth)+Z(n,e.heightOffsets)},re=function(e,n,t){var r=e.getBoundingClientRect(),o=n.getBoundingClientRect(),i=10;if(o.top+i>r.top?n.scrollTop-=o.top-r.top+i:r.bottom>o.bottom-i&&(n.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)}},oe=function(e,n,t,r){var o=document.querySelector(".st-body-container"),i=document.querySelector(".st-body-main");if(o){var a=n+t.rowSeparatorWidth,u=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));if(u&&r){var l=function(e,n,t,r){var o=Q({bufferRowCount:0,contentHeight:n.clientHeight,rowHeight:t,scrollTop:n.scrollTop,tableRows:r,scrollDirection:"none"}).fullyVisible;return e>=o.startIndex&&o.endIndex>e}(e.rowIndex,o,n,r);if(l)return void re(u,o,i)}if(!u)return o.scrollTop=Math.max(0,e.rowIndex*a-o.clientHeight/3),void setTimeout(function(){var n=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));n&&re(n,o,i)},100);re(u,o,i)}},ie=function(e){var n=e.colIndex,t=e.rowId;return"".concat(e.rowIndex,"-").concat(n,"-").concat(t)},ae=c(void 0),ue=function(n){return e(ae.Provider,x({value:n.value},{children:n.children}))},le=function(){var e=d(ae);if(void 0===e)throw Error("useTableContext must be used within a TableProvider");return e},ce=function(r){var o=r.currentPage,a=r.footerRenderer,u=r.hideFooter,l=r.onPageChange,c=r.onNextPage,d=r.onUserPageChange,s=r.rowsPerPage,f=r.shouldPaginate,v=r.totalPages,h=r.totalRows,p=le(),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)*s+1,h),H=Math.min(o*s,h),E=!R,T=!S&&!c||!b&&M,k=function(){return I(void 0,void 0,void 0,function(){var e;return C(this,function(n){switch(n.label){case 0:return 1>(e=o-1)?[3,2]:(l(e),d?[4,d(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},P=function(){return I(void 0,void 0,void 0,function(){var e,n;return C(this,function(t){switch(t.label){case 0:return e=o===v,n=o+1,c&&e?[4,c(o)]:[3,2];case 1:if(!t.sent())return y(!1),[2];t.label=2;case 2:return n>v&&!c?[3,4]:(l(n),d?[4,d(n)]:[3,4]);case 3:t.sent(),t.label=4;case 4:return[2]}})})},A=function(e){return I(void 0,void 0,void 0,function(){return C(this,function(n){switch(n.label){case 0:return 1>e||e>v?[3,2]:(l(e),d?[4,d(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})};if(u||!f)return null;if(a)return e(n,{children:a({currentPage:o,totalPages:v,rowsPerPage:s,totalRows:h,startRow:N,endRow:H,onPageChange:A,onNextPage:P,onPrevPage:k,hasNextPage:!T,hasPrevPage:!E,nextIcon:w,prevIcon:m})});var D=function(){if(15>=v)return Array.from({length:v},function(e,n){return n+1});var e,n,t=[];o>8?v-7>o?(e=o-7,n=o+7):(e=Math.max(1,v-15+1),n=v):(e=1,n=14),e>2?(t.push(1),t.push(-1)):2===e&&t.push(1);for(var r=e;n>=r;r++)t.push(r);return v-1>n?(t.push(-2),t.push(v)):n===v-1&&t.push(v),t}();return t("div",x({className:"st-footer"},{children:[e("div",x({className:"st-footer-info"},{children:t("span",x({className:"st-footer-results-text"},{children:["Showing ",N," to ",H," of ",h.toLocaleString()," results"]}))})),t("div",x({className:"st-footer-pagination"},{children:[D.map(function(n,t){return 0>n?e("span",x({className:"st-page-ellipsis"},{children:"..."}),t):e("button",x({onClick:function(){return A(n)},className:"st-page-btn ".concat(o===n?"active":""),"aria-label":"Go to page ".concat(n),"aria-current":o===n?"page":void 0},{children:n}),t)}),e("button",x({className:"st-next-prev-btn ".concat(E?"disabled":""),onClick:k,disabled:E,"aria-label":"Go to previous page"},{children:m})),e("button",x({className:"st-next-prev-btn ".concat(T?"disabled":""),onClick:P,disabled:T,"aria-label":"Go to next page"},{children:w}))]}))]}))},de=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},se=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},fe=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},ve=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},he=function(n){return e("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("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"})}))},pe=function(n){return e("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:n.className,style:x({height:"10px"},n.style)},{children:e("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"})}))},we=function(n){return e("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("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"})}))},me=function(n){return e("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:n.className,style:x({height:"1em"},n.style)},{children:e("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"})}))},ge=function(){return e("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:e("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},be=function(e){var n=e.headerContainerRef,t=e.mainSectionRef,r=e.scrollbarWidth,a=i(!1),u=a[0],l=a[1];return o(function(){var e=null==n?void 0:n.current;if(u&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(r,"px")),function(){e.classList.remove("st-header-scroll-padding")}},[n,u,r]),o(function(){var e=null==t?void 0:t.current;if(e&&(null==n?void 0:n.current)){var r=function(){e&&l(e.scrollHeight>e.clientHeight)};r();var o=new ResizeObserver(function(){r()});return o.observe(e),function(){e&&o.unobserve(e)}}},[n,t]),{isMainSectionScrollable:u}},xe=function(n){var t=n.children,r=n.onClose,u=n.open,l=n.overflow,c=void 0===l?"auto":l,d=n.setOpen,s=n.width,f=n.containerRef,v=n.positioning,h=void 0===v?"fixed":v,p=le().mainBodyRef,w=a(null),m=a(null),g=i("bottom-left"),b=g[0],y=g[1],I=i({}),C=I[0],R=I[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 e,n=w.current,t=m.current.getBoundingClientRect(),r=n.offsetHeight,o=s||n.offsetWidth,i=(e=(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-e.top,u="bottom",l={};(r>i&&a>=r||r>i&&a>i)&&(u="top");var c="left";o>e.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,s,f,p,h]),o(function(){var e=function(e){u&&w.current&&w.current&&!w.current.contains(e.target)&&(d(!1),null==r||r())};return u&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}},[u,r,d]),o(function(){var e=function(e){if(w.current&&!w.current.contains(e.target)){var n=w.current.parentElement;n&&!n.contains(e.target)&&(d(!1),null==r||r())}},n=function(n){"Enter"===n.key&&e(n)};return u&&(document.addEventListener("mousedown",e,!0),document.addEventListener("keydown",n,!0)),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",n,!0)}},[r,u,d]),o(function(){var e=function(e){"Escape"===e.key&&u&&(d(!1),null==r||r())};return u&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[r,u,d]),u?e("div",x({ref:w,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},onTouchStart:function(e){return e.stopPropagation()},style:x(x({position:h,width:s?"".concat(s,"px"):"auto",visibility:M?"visible":"hidden"},C),{overflow:c})},{children:t})):null},ye=function(n){var t=n.children,r=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,u=void 0!==a&&a,l=n.className,c=void 0===l?"":l;return e("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}))},Ie=function(n){var r=n.onBlur,o=n.onChange,a=n.open,u=n.setOpen,l=i(n.value),c=l[0],d=l[1],s=function(e){d(e),o(e),u(!1),r()};return t(xe,x({open:a,onClose:function(){r()},setOpen:u,width:120},{children:[e(ye,x({isSelected:!0===c,onClick:function(){return s(!0)}},{children:"True"})),e(ye,x({isSelected:!1===c,onClick:function(){return s(!1)}},{children:"False"}))]}))},Ce=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(e){o(e.target.value)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},Re=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:""+t,onBlur:r,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},Se=s(function(){return import("./Animate-ad25ec9b.js")}),Me=s(function(){return import("./DatePicker-947629c5.js")}),Ne=s(function(){return Promise.resolve().then(function(){return pt})}),He=s(function(){return Promise.resolve().then(function(){return mt})}),Ee=function(n){var t=y(n,["parentRef","tableRow"]);return e(f,x({fallback:e("div",x({},t))},{children:e(Se,x({},n))}))},Te=function(n){return e(f,x({fallback:e("div",x({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:e(Me,x({},n))}))},ke=function(n){var t=n.width,r=n.height;return e(f,x({fallback:e("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:e(Ne,x({},n))}))},Pe=function(n){var t=n.width,r=n.height;return e(f,x({fallback:e("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:e(He,x({},n))}))},Ae=function(e){if(!e)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){var n=e.split("-").map(Number);return new Date(n[0],n[1]-1,n[2],12,0,0)}var t=new Date(e);return isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate(),12,0,0)},De=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0)},Fe=function(e){if(!e)return new Date;if("string"==typeof e)return Ae(e);if("number"==typeof e){var n=new Date(e);return isNaN(n.getTime())?new Date:De(n)}return e instanceof Date?De(e):new Date},Oe=function(e){return e?Ae(""+e):new Date},Le=function(n){var t=n.onBlur,r=n.onChange,i=n.open,a=n.setOpen,u=n.value;o(function(){var e=setTimeout(function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()},0);return function(){return clearTimeout(e)}},[]);var l=function(){t()};return e(xe,x({open:i,onClose:l,setOpen:a,overflow:"hidden",width:240},{children:e(Te,{value:Oe(u),onChange:function(e){var n=e.toISOString().split("T")[0];r(n),a(!1),t()},onClose:l})}))},We=function(n){var t=n.onBlur,r=n.onChange,o=n.open,a=n.options,u=n.setOpen,l=i(n.value||""),c=l[0],d=l[1];return e(xe,x({open:o,onClose:function(){t()},setOpen:u,width:150},{children:e("div",x({className:"st-enum-dropdown-content"},{children:a.map(function(n){return e(ye,x({isSelected:c===n.value,onClick:function(){return d(e=n.value),r(e),u(!1),void t();var e}},{children:n.label}),n.value)})}))}))},Be=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,u=void 0===a?"string":a,l=n.value,c=function(){i(!1)};return"boolean"===u&&"boolean"==typeof l?e(Ie,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l}):"date"===u?e(Le,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?e(We,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?e(Re,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}}):e(Ce,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},qe=0,Ge=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();0!==qe&&r>o-qe||(qe=o,n(t))}},ze=function(e){var n=a(e);return o(function(){JSON.stringify(n.current)!==JSON.stringify(e)&&(n.current=e)},[e]),n.current},Ke=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Ke);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=Ke(e[t]));return n},je=function(e,n){return e.filter(function(e){return e.pinned===n}).some(function(e){return!e.hide})},Ve=Date.now(),_e={screenX:0,screenY:0},Ue=function(e,n,t){void 0===t&&(t=[]);for(var r=0;e.length>r;r++){var o=e[r];if(o.accessor===n)return R(R([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=Ue(o.children,n,R(R([],t,!0),[r],!1));if(i)return i}}return null},Je=function(e){return"left"===e.pinned?"left":"right"===e.pinned?"right":"main"};var Xe=function(e){var n=e.draggedHeaderRef,t=e.headers,r=e.hoveredHeaderRef,o=e.onColumnOrderChange,i=e.onTableHeaderDragEnd,a=le().setHeaders,u=ze(t);return{handleDragStart:function(e){n.current=e,Ve=Date.now()},handleDragOver:function(e){var o=e.event,a=e.hoveredHeader;if(o.preventDefault(),t&&n.current){var l=o.currentTarget.getAnimations().some(function(e){return"running"===e.playState}),c=o.screenX,d=o.screenY,s=Math.sqrt(Math.pow(c-_e.screenX,2)+Math.pow(d-_e.screenY,2));r.current=a;var f,v,h,p=n.current,w=!1;if(Je(p)!==Je(a))f=(S=function(e,n,t){var r,o,i=Ke(e),a=!1;try{var u=Je(t),l=i.findIndex(function(e){return e.accessor===n.accessor}),c=i.findIndex(function(e){return e.accessor===t.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var d=i.splice(l,1)[0],s=(r=u,o=x({},d),"left"===r?o.pinned="left":"right"===r?o.pinned="right":delete o.pinned,o);i.splice(c,0,s)}catch(e){console.error("Error in insertHeaderAcrossSections:",e),a=!0}return{newHeaders:i,emergencyBreak:a}}(t,p,a)).newHeaders,w=S.emergencyBreak;else{var m=t,g=Ue(m,p.accessor),b=Ue(m,a.accessor);if(!g||!b)return;var y=g.length,I=b.length,C=b;if(y!==I){var R=I-y;R>0&&(C=b.slice(0,-R))}if((v=g).length!==(h=C).length||1!==v.length&&!v.slice(0,-1).every(function(e,n){return e===h[n]}))return;var S=function(e,n,t){var r=Ke(e),o=!1;function i(e,n){for(var t=e,r=0;n.length-1>r;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;n.length-1>i;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var u=i(r,n);return a(r,n,i(r,t)),a(r,t,u),{newHeaders:r,emergencyBreak:o}}(m,g,C);f=S.newHeaders,w=S.emergencyBreak}if(!(l||a.accessor===p.accessor||10>s||JSON.stringify(f)===JSON.stringify(t)||w)){var M=Date.now();JSON.stringify(f)===JSON.stringify(u)&&(1500>M-Ve||40>s)||(Ve=M,_e={screenX:c,screenY:d},i(f))}}},handleDragEnd:function(){n.current=null,r.current=null,setTimeout(function(){a(function(e){return R([],e,!0)}),null==o||o(t)},10)}}},Ye=function(n){var r=n.checked,o=void 0!==r&&r,i=n.children,a=n.onChange;return t("label",x({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},onKeyDown:function(e){" "===e.key&&e.stopPropagation()},type:"checkbox","aria-label":n.ariaLabel,"aria-checked":o}),e("span",x({className:"st-checkbox-custom ".concat(o?"st-checked":""),"aria-hidden":"true"},{children:o&&e(pe,{className:"st-checkbox-checkmark"})})),i]}))},$e=function(n){var t,r=n.content,o=n.header;return o.valueFormatter?o.valueFormatter({accessor:o.accessor,colIndex:n.colIndex,row:n.row,rowIndex:n.rowIndex,value:r}):"lineAreaChart"===o.type&&Array.isArray(r)?(t=r.filter(function(e){return"number"==typeof e})).length>0?e(ke,x({data:t},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(r)?(t=r.filter(function(e){return"number"==typeof e})).length>0?e(Pe,x({data:t},o.chartOptions)):null:"boolean"==typeof r?r?"True":"False":Array.isArray(r)?0===r.length?"[]":r.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", "):"date"===o.type&&null!==r&&("string"==typeof r||"number"==typeof r||"object"==typeof r&&r instanceof Date)?Fe(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):r},Ze=r.memo(function(r){var c=r.borderClass,d=r.colIndex,s=r.displayRowNumber,f=r.header,v=r.isHighlighted,h=r.isInitialFocused,p=r.nestedIndex,w=r.parentHeader,m=r.rowIndex,g=r.tableRow,b=le(),y=b.canExpandRowGroup,I=b.cellRegistry,C=b.cellUpdateFlash,R=b.collapsedRows,S=b.columnBorders,M=b.draggedHeaderRef,N=b.enableRowSelection,H=b.expandedDepths,E=b.expandedRows,T=b.expandIcon,k=b.handleMouseDown,P=b.handleMouseOver,D=b.handleRowSelect,O=b.headers,L=b.hoveredHeaderRef,W=b.isCopyFlashing,B=b.isLoading,q=b.isRowSelected,G=b.isWarningFlashing,z=b.onCellEdit,_=b.onCellClick,J=b.onRowGroupExpand,Y=b.onTableHeaderDragEnd,$=b.rowButtons,Z=b.rowGrouping,Q=b.setCollapsedRows,ee=b.setExpandedRows,ne=b.setRowStateMap,te=b.rowsWithSelectedCells,re=b.selectedColumns,oe=b.tableBodyContainerRef,ie=b.theme,ae=b.useOddColumnBackground,ue=g.depth,ce=g.row,de=g.rowPath,se=g.rowIndexPath,fe=g.absoluteRowIndex,ve=g.rowId,he=i(K(ce,f.accessor)),pe=he[0],we=he[1],me=i(!1),ge=me[0],be=me[1],xe=i(!1),ye=xe[0],Ie=xe[1],Ce=i(!1),Re=Ce[0],Se=Ce[1],Me=a(null),Ne=U(ve),He=Z&&Z[ue],Te=!!He&&function(e,n){return!!n&&V(e[n])}(ce,He),ke=Z&&Z.length>ue,Pe=!y||y(ce),Ae=!!f.nestedTable,De=X(Ne,ue,H,E,R),Fe=W({rowIndex:m,colIndex:d,rowId:Ne}),Oe=G({rowIndex:m,colIndex:d,rowId:Ne}),Le=u(function(){var e,n,t;if(!S)return!1;var r=O.filter(function(e){return"left"===e.pinned}),o=O.filter(function(e){return!e.pinned}),i=O.filter(function(e){return"right"===e.pinned});return"left"===f.pinned?(null===(e=r[r.length-1])||void 0===e?void 0:e.accessor)===f.accessor:"right"===f.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===f.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===f.accessor},[S,O,f.accessor,f.pinned]),We=Xe({draggedHeaderRef:M,headers:O,hoveredHeaderRef:L,onTableHeaderDragEnd:Y}).handleDragOver,qe=Ge(),ze=A({accessor:f.accessor,rowId:Ne}),Ke=F({rowId:Ne,accessor:f.accessor}),je=f.isSelectionColumn&&N;o(function(){if(I){var e="".concat(Ne,"-").concat(f.accessor);return I.set(e,{updateContent:function(e){pe!==e?(we(e),C&&(Ie(!0),Me.current&&clearTimeout(Me.current),Me.current=setTimeout(function(){Ie(!1)},800))):we(e)}}),function(){I.delete(e),Me.current&&clearTimeout(Me.current)}}},[I,C,Ne,f.accessor,pe]),o(function(){if(ye){var e=setTimeout(function(){Ie(!1)},850);return function(){return clearTimeout(e)}}},[ye]),o(function(){we(K(ce,f.accessor))},[ce,f.accessor]);var Ve="boolean"===f.type||"date"===f.type||"enum"===f.type,_e=!!(null==f?void 0:f.isEditable),Ue=re.has(d),Je=v&&!Ue,Ze=u(function(){return!!je&&te.has(Ne+"")},[je,te,Ne]),Qe=null==w?void 0:w.singleRowChildren,en="st-cell ".concat(ue>0&&f.expandable?"st-cell-depth-".concat(ue):""," ").concat(Je?h?"st-cell-selected-first ".concat(c):"st-cell-selected ".concat(c):""," ").concat(Ue?h?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(_e?"clickable":""," ").concat(ye?h?"st-cell-updating-first":"st-cell-updating":""," ").concat(Fe?h?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Oe?h?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(ae?p%2==0?"even-column":"odd-column":""," ").concat(je?"st-selection-cell":""," ").concat(Ze?"st-selection-has-highlighted-cell":""," ").concat(Le?"st-last-column":""," ").concat(Qe?"st-sub-cell":""," ").concat(Re?"hovered":""),nn=l(function(e){null==e&&(e="number"===f.type?0:"boolean"!==f.type&&""),we(e),j(ce,f.accessor,e),null==z||z({accessor:f.accessor,newValue:e,row:ce,rowIndex:m})},[f.accessor,f.type,z,ce,m]),tn=l(function(e){e.stopPropagation();var n=X(Ne,ue,H,E,R),t=Ne+"";if(n?(Q(function(e){var n=new Map(e);return n.set(t,ue),n}),ee(function(e){var n=new Map(e);return n.delete(t),n})):(ee(function(e){var n=new Map(e);return n.set(t,ue),n}),Q(function(e){var n=new Map(e);return n.delete(t),n})),n&&ne(function(e){var n=new Map(e);return n.delete(Ne),n}),J){var r=f.pinned;J({depth:ue,event:e,groupingKey:He,groupingKeys:Z||[],isExpanded:!n,row:ce,rowIndexPath:se||[],rowIdPath:de,setEmpty:function(e,n){ne(function(t){var o=new Map(t),i=o.get(Ne)||{};return o.set(Ne,x(x({},i),{isEmpty:e,emptyMessage:n,loading:!1,error:null,triggerSection:r})),o})},setError:function(e){ne(function(n){var t=new Map(n),o=t.get(Ne)||{};return t.set(Ne,x(x({},o),{error:e,loading:!1,isEmpty:!1,triggerSection:r})),t})},setLoading:function(e){e?ne(function(e){var n=new Map(e),t=n.get(Ne)||{};return n.set(Ne,x(x({},t),{loading:!0,error:null,isEmpty:!1,triggerSection:r})),n}):setTimeout(function(){ne(function(e){var n=new Map(e),t=n.get(Ne)||{};return n.set(Ne,x(x({},t),{loading:!1,error:null,isEmpty:!1,triggerSection:r})),n})},0)}})}},[R,He,ue,H,E,f.pinned,J,ce,Z,Ne,se,de,Q,ee,ne]);return B||g.isLoadingSkeleton?e("div",x({className:en},{children:e("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:e("div",{className:"st-loading-skeleton"})}))})):!ge||Ve||je?t(Ee,x({className:en,"data-accessor":f.accessor,"data-col-index":d,"data-row-id":Ne,"data-row-index":m,"aria-colindex":d+1,id:ze,onClick:function(){_&&!je&&_({accessor:f.accessor,colIndex:d,row:ce,rowIndex:m,value:pe})},onDoubleClick:function(){return f.isEditable&&!je&&be(!0)},onDragOver:function(e){je||qe({callback:We,callbackProps:{event:e,hoveredHeader:f},limit:50})},onKeyDown:function(e){ge||je||"F2"!==e.key&&"Enter"!==e.key||!f.isEditable||ge||(e.preventDefault(),be(!0))},onMouseDown:function(){ge||je||k({rowIndex:m,colIndex:d,rowId:Ne})},onMouseEnter:function(){Se(!0)},onMouseLeave:function(){Se(!1)},onMouseOver:function(){ge||je||P({rowIndex:m,colIndex:d,rowId:Ne})},parentRef:oe,tableRow:g},{children:[f.expandable&&ke?e("div",x({className:"st-icon-container st-expand-icon-container ".concat(Pe&&(Te||J||Ae)?De?"expanded":"collapsed":"placeholder"),onClick:Pe&&(Te||J||Ae)?function(e){return tn(e)}:void 0,role:Pe&&(Te||J||Ae)?"button":"presentation",tabIndex:Pe&&(Te||J||Ae)?0:-1,"aria-label":Pe&&(Te||J||Ae)?"".concat(De?"Collapse":"Expand"," row group"):void 0,"aria-expanded":Pe&&(Te||J||Ae)?De:void 0,"aria-hidden":!(Pe&&(Te||J||Ae)),onKeyDown:Pe&&(Te||J||Ae)?function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),tn(e))}:void 0},{children:T})):null,e("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:B||g.isLoadingSkeleton?e("div",{className:"st-loading-skeleton"}):e(n,{children:je?t("div",x({className:"st-selection-cell-content"},{children:[e("div",x({className:"st-selection-control"},{children:Re||q&&q(Ne+"")?e(Ye,{checked:!!q&&q(Ne+""),onChange:function(e){D&&D(Ne+"",e)},ariaLabel:"Select row ".concat(s+1)}):e("span",x({className:"st-row-number"},{children:s+1}))})),function(){if(!$||!je||0===$.length)return null;if(!(Re||q&&q(Ne+"")))return null;var n={row:ce,rowIndex:s};return e("div",x({className:"st-row-buttons",role:"group","aria-label":"Actions for row ".concat(s+1)},{children:$.map(function(t,r){return e("span",x({className:"st-row-button"},{children:t(n)}),r)})}))}()]})):f.cellRenderer?function(){var e;return f.cellRenderer({accessor:f.accessor,colIndex:d,row:ce,rowIndex:fe,rowPath:de,theme:ie,value:pe,formattedValue:null===(e=null==f?void 0:f.valueFormatter)||void 0===e?void 0:e.call(f,{accessor:f.accessor,colIndex:d,row:ce,rowIndex:m,value:pe})})}():$e({content:pe,header:f,colIndex:d,row:ce,rowIndex:m})})})),!B&&!g.isLoadingSkeleton&&ge&&Ve&&!je&&e(Be,{enumOptions:f.enumOptions,onChange:nn,setIsEditing:be,type:f.type,value:pe})]}),Ke):e("div",x({className:"st-cell-editing",id:A({accessor:f.accessor,rowId:Ne}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e(Be,{enumOptions:f.enumOptions,onChange:nn,setIsEditing:be,type:f.type,value:pe})}))},function(e,n){if(e.rowIndex!==n.rowIndex||e.colIndex!==n.colIndex||e.isHighlighted!==n.isHighlighted||e.isInitialFocused!==n.isInitialFocused||e.borderClass!==n.borderClass)return!1;if(e.tableRow!==n.tableRow){if(e.tableRow.row!==n.tableRow.row)return!1;if(e.tableRow.position!==n.tableRow.position||e.tableRow.displayPosition!==n.tableRow.displayPosition)return!1}return(e.header===n.header||e.header.accessor===n.header.accessor&&e.header.isEditable===n.header.isEditable&&e.header.type===n.header.type&&e.header.cellRenderer===n.header.cellRenderer&&e.header.valueFormatter===n.header.valueFormatter)&&e.parentHeader===n.parentHeader&&e.displayRowNumber===n.displayRowNumber&&e.nestedIndex===n.nestedIndex}),Qe=function(n){var r=n.columnIndices,o=n.displayRowNumber,i=n.header,a=n.headers,u=n.nestedIndex,l=n.parentHeader,c=n.pinned,d=n.rowIndex,s=n.rowIndices,f=n.tableRow,h=r[i.accessor],p=le(),w=p.getBorderClass,m=p.isSelected,g=p.isInitialFocusedCell,b=p.collapsedHeaders,x=U(f.rowId);if(i.children&&i.children.length>0){var y=i.children.filter(function(e){return D({header:e,pinned:c,headers:a,collapsedHeaders:b})});if(i.singleRowChildren){var I={rowIndex:d,colIndex:h,rowId:x},C=w(I),R=m(I),S=g(I),M=A({accessor:i.accessor,rowId:x});return t(v,{children:[e(Ze,{borderClass:C,colIndex:h,displayRowNumber:o,header:i,isHighlighted:R,isInitialFocused:S,nestedIndex:u,parentHeader:l,rowIndex:d,tableRow:f},M),y.map(function(n){var t=A({accessor:n.accessor,rowId:x});return e(Qe,{columnIndices:r,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:d,rowIndices:s,tableRow:f},t)})]})}return e(v,{children:y.map(function(n){var t=A({accessor:n.accessor,rowId:x});return e(Qe,{columnIndices:r,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:d,rowIndices:s,tableRow:f},t)})})}var N={rowIndex:d,colIndex:h,rowId:x},H=w(N),E=m(N),T=g(N),k=A({accessor:i.accessor,rowId:x});return e(Ze,{borderClass:H,colIndex:h,displayRowNumber:o,header:i,isHighlighted:E,isInitialFocused:T,nestedIndex:u,parentHeader:l,rowIndex:d,tableRow:f},k)},en=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,d=t.tableRow,s=le().collapsedHeaders,f=i.filter(function(e){return D({header:e,pinned:a,headers:i,collapsedHeaders:s})});return e(n,{children:f.map(function(n,t){var s=U(d.rowId),f=A({accessor:n.accessor,rowId:s});return e(Qe,{columnIndices:o,displayRowNumber:l,header:n,headers:i,nestedIndex:t+(null!=r?r:0),pinned:a,rowIndex:u,rowIndices:c,tableRow:d},f)})})},function(e,n){return e.rowIndex===n.rowIndex&&e.displayRowNumber===n.displayRowNumber&&e.columnIndexStart===n.columnIndexStart&&(e.tableRow===n.tableRow||e.tableRow.row===n.tableRow.row)&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices}),nn=function(n){var t=n.rowState,r=n.loadingStateRenderer,o=n.errorStateRenderer,i=n.emptyStateRenderer,a=null;return t.loading&&r?a=r:t.error&&o?a=o:t.isEmpty&&i&&(a=i),a?e("div",x({className:"st-cell st-state-row-cell",style:{gridColumn:"1 / -1",padding:0}},{children:a})):null},tn=function(n){var t=n.calculatedHeight,r=n.childAccessor,o=n.depth,i=n.expandableHeader,a=n.index,u=n.parentRow,l=n.position,c=le(),d=c.theme,s=c.rowGrouping,f=c.rowHeight,v=c.heightOffsets,h=c.customTheme,p=c.loadingStateRenderer,w=c.errorStateRenderer,m=c.emptyStateRenderer,g=c.expandIcon,b=c.filterIcon,y=c.sortUpIcon,I=c.sortDownIcon,C=c.nextIcon,R=c.prevIcon,S=c.headerCollapseIcon,M=c.headerExpandIcon,N=i.nestedTable;if(!N)return null;var H=K(u,r),E=Array.isArray(H)?H:[],T=s&&s[o+1]?null==s?void 0:s.slice(o+1):void 0,k=t-h.nestedGridPaddingTop-h.nestedGridPaddingBottom,P=N.customTheme?x(x({},h),N.customTheme):h;return e("div",x({className:"st-row st-nested-grid-row","data-index":a,style:{transform:"translate3d(0, ".concat(te({position:l,rowHeight:f,heightOffsets:v,customTheme:h}),"px, 0)"),height:"".concat(t,"px"),paddingTop:"".concat(h.nestedGridPaddingTop,"px"),paddingBottom:"".concat(h.nestedGridPaddingBottom,"px")}},{children:e(ft,x({},N,{rows:E,theme:d,customTheme:P,height:"".concat(k,"px"),rowGrouping:T,loadingStateRenderer:p,errorStateRenderer:w,emptyStateRenderer:m,expandIcon:g,filterIcon:b,sortUpIcon:y,sortDownIcon:I,nextIcon:C,prevIcon:R,headerCollapseIcon:S,headerExpandIcon:M}))}))},rn=r.memo(function(n){var t=n.columnIndices,r=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.index,u=n.pinned,l=n.rowHeight,c=n.rowIndices,d=n.setHoveredIndex,s=n.tableRow,f=le(),v=f.customTheme,h=f.emptyStateRenderer,p=f.errorStateRenderer,w=f.heightOffsets,m=f.isAnimating,g=f.isRowSelected,b=f.loadingStateRenderer,y=f.maxHeaderDepth,I=f.rows,C=f.useHoverRowBackground,R=f.useOddEvenRowBackground,S=s.position,M=s.displayPosition,N=s.stateIndicator,H=s.nestedTable;if(H)return u?e("div",{className:"st-row st-nested-grid-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(H.calculatedHeight,"px")}}):e(tn,{calculatedHeight:H.calculatedHeight,childAccessor:H.childAccessor,depth:s.depth-1,expandableHeader:H.expandableHeader,index:a,parentRow:H.parentRow,position:S});if(N){if(N.state.triggerSection===u){if(!(N.state.loading&&b||N.state.error&&p||N.state.isEmpty&&h))return e("div",{className:"st-row st-state-row-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(l,"px")}});var E=I.find(function(e,n){return U([n])===N.parentRowId});return e("div",x({className:"st-row st-state-row","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(l,"px")}},{children:e(nn,{parentRow:E||{},rowState:N.state,gridTemplateColumns:o,loadingStateRenderer:b,errorStateRenderer:p,emptyStateRenderer:h})}))}return e("div",{className:"st-row st-state-row-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(l,"px")}})}var T=S%2==0,k=U(s.rowId),P=!!g&&g(k);return e("div",x({className:"st-row ".concat(R?T?"even":"odd":""," ").concat(P?"selected":""),"data-index":a,"aria-rowindex":S+y+1,onMouseEnter:function(){!m&&C&&d(a)},style:{gridTemplateColumns:o,top:te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),height:"".concat(l,"px")}},{children:e(en,{columnIndexStart:r,columnIndices:t,displayRowNumber:M,headers:i,pinned:u,rowIndex:S,rowIndices:c,tableRow:s},k)}))},function(e,n){return e.index===n.index&&e.tableRow.position===n.tableRow.position&&e.tableRow.displayPosition===n.tableRow.displayPosition&&e.tableRow.row===n.tableRow.row&&e.tableRow.stateIndicator===n.tableRow.stateIndicator&&e.rowHeight===n.rowHeight&&e.gridTemplateColumns===n.gridTemplateColumns&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices&&e.columnIndexStart===n.columnIndexStart}),on=function(n){var t=n.displayStrongBorder,r=n.position,o=n.rowHeight,i=n.templateColumns,u=le(),l=u.heightOffsets,c=u.customTheme,d=a(null);return e("div",x({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(e){var n=e.currentTarget,t=n.style.pointerEvents;n.style.pointerEvents="none";var r=document.elementFromPoint(e.clientX,e.clientY);if(n.style.pointerEvents=t,r){var o=r.closest(".st-cell");if(o instanceof HTMLElement){d.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(e){if(d.current){var n=d.current.getBoundingClientRect(),t=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:n.top+n.height/2});d.current.dispatchEvent(t),d.current=null}},style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(ne({position:r,rowHeight:o,heightOffsets:l,customTheme:c}),"px, 0)")}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},an=c(void 0),un=function(e){var n=e.childRef,t=e.children,r=e.group,i=void 0===r?"default":r,a=function(){var e=d(an);if(!e)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),u=a.registerPane,l=a.unregisterPane;return o(function(){var e=[i];return n.current&&u(n.current,e),function(){n.current&&l(n.current,e)}},[n,u,l,i]),h(t,{ref:function(e){n.current=e}})},ln=p(function(n,r){var o=n.columnIndexStart,i=n.columnIndices,l=n.headers,c=n.pinned,d=n.rowHeight,s=n.rowIndices,f=n.setHoveredIndex,h=n.templateColumns,p=n.totalHeight,m=n.rowsToRender,g=n.width,b=c?"st-body-pinned-".concat(c):"st-body-main",y=a(null);return w(r,function(){return y.current},[]),u(function(){return je(l,c)},[l,c])?e(un,x({childRef:y,group:c?"pinned-".concat(c):"default"},{children:e("div",x({className:b,ref:y,style:x({position:"relative",height:"".concat(p,"px"),width:g},!c&&{flexGrow:1})},{children:m.map(function(n,r){var a=n.stateIndicator?"state-".concat(n.stateIndicator.parentRowId,"-").concat(n.position):U(n.rowId);return t(v,{children:[0!==r&&e(on,{displayStrongBorder:n.isLastGroupRow,position:n.position,rowHeight:d,templateColumns:h}),e(rn,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:h,headers:l,index:r,pinned:c,rowHeight:d,rowIndices:s,setHoveredIndex:f,tableRow:n})]},a)})}))})):null});function cn(e){var n=e.headers,t=e.pinnedLeftColumns,r=e.pinnedRightColumns,o=e.collapsedHeaders,i={},a=0,u=R(R(R([],t,!0),n,!0),r,!0),l=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter(function(e){return D({header:e,headers:u,collapsedHeaders:o})}).forEach(function(n,t){l(n,!e.singleRowChildren&&0===t)})};return t.forEach(function(e,n){l(e,0===n)}),n.filter(function(e){return!e.pinned&&D({header:e,headers:u,collapsedHeaders:o})}).forEach(function(e,n){l(e,0===n&&0===t.length)}),r.forEach(function(e){l(e,!1)}),i}ln.displayName="TableSection";var dn=function(r){var c=r.mainTemplateColumns,d=r.pinnedLeftColumns,s=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,I=le(),C=I.collapsedHeaders,R=I.headerContainerRef,S=I.headers,M=I.heightOffsets,N=I.isAnimating,H=I.mainBodyRef,E=I.onLoadMore,T=I.rowHeight,k=I.scrollbarWidth,P=I.setIsScrolling,A=I.shouldPaginate,D=I.tableBodyContainerRef,F=I.tableEmptyStateRenderer,O=I.customTheme,L=i(!1),W=L[0],B=L[1],q=a(new Set),G=l(function(e){if(document.querySelectorAll(".st-row.hovered").forEach(function(e){e.classList.remove("hovered")}),q.current.clear(),null!==e&&D.current){var n=D.current;n.querySelectorAll('.st-row[data-index="'.concat(e,'"]:not(.st-nested-grid-row)')).forEach(function(e){var t=e;t.closest(".st-body-container")===n&&(t.classList.add("hovered"),q.current.add(t))})}},[D]);o(function(){N&&G(null)},[N,G]),be({headerContainerRef:R,mainSectionRef:D,scrollbarWidth:k}),o(function(){return function(){K.current&&clearTimeout(K.current)}},[]);var z=a(null),K=a(null),j=a(0),V=function(e){return e.length}(y),_=u(function(){return function(e,n,t,r){return e*(n+r.rowSeparatorWidth)-r.rowSeparatorWidth+((null==t?void 0:t.reduce(function(e,n){return e+n[1]},0))||0)}(V,T,M,O)},[V,T,M,O]),J=u(function(){return cn({headers:S,pinnedLeftColumns:d,pinnedRightColumns:v,collapsedHeaders:C})},[S,d,v,C]),X=u(function(){var e={};return w.forEach(function(n,t){var r=U(n.rowId);e[r]=t}),e},[w]),Y=l(function(e,n){!E||A||W||200>=e.scrollHeight-(n+e.clientHeight)&&n>j.current&&(B(!0),E(),setTimeout(function(){B(!1)},1e3))},[E,A,W]),$={columnIndices:J,headerContainerRef:R,headers:S,rowHeight:T,rowIndices:X,rowsToRender:w,setHoveredIndex:G};return e("div",x({className:"st-body-container",onMouseLeave:function(){return G(null)},onScroll:function(e){var n=e.currentTarget,t=n.scrollTop;P(!0),K.current&&clearTimeout(K.current),K.current=setTimeout(function(){P(!1)},150),z.current&&cancelAnimationFrame(z.current),z.current=requestAnimationFrame(function(){var e=j.current,r=t>e?"down":e>t?"up":"none";m(t),g(r),Y(n,t),j.current=t})},ref:D},{children:b?e("div",x({className:"st-empty-state-wrapper"},{children:F})):t(n,{children:[e(ln,x({},$,{pinned:"left",templateColumns:s,totalHeight:_,width:f})),e(ln,x({},$,{columnIndexStart:d.length,ref:H,templateColumns:c,totalHeight:_})),e(ln,x({},$,{columnIndexStart:d.length+c.length,pinned:"right",templateColumns:h,totalHeight:_,width:p}))]})}))},sn=function(e){var n=e.event,t=e.header,r=e.headers,o=e.setHeaders,i=e.setIsResizing,a=e.tableBodyContainerRef,u=e.startWidth,l=e.collapsedHeaders,c=e.autoExpandColumns,d=void 0!==c&&c,s=e.reverse,f=void 0!==s&&s;n.preventDefault();var v="clientX"in n?n.clientX:n.touches[0].clientX,h="touches"in n;if(t&&!t.hide){i(!0);var p,w=B(t);if(t.children&&t.children.length>0){var m=O(t,l);p=m.length>0?m:[t]}else p=[t];var g=new Map,b=0;if(d){var x=r.filter(function(e){return e.pinned===t.pinned});if(q(x,l).forEach(function(e){var n="number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):100;g.set(e.accessor,n)}),a.current){var y=a.current.clientWidth,I=vn({headers:r,containerWidth:y,collapsedHeaders:l}),C=I.leftWidth,S=I.rightWidth;b="left"===t.pinned?C:"right"===t.pinned?S:Math.max(0,y-C-S)}}var M=function(e){var n="right"===t.pinned?v-e:e-v;if(d){var i=r.filter(function(e){return e.pinned===t.pinned});pn({delta:n,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(e){var n=e.header,t=e.headers,r=e.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth,a=H(window.innerWidth);if(!n.pinned)return 1/0;var u=i*a-t.filter(function(e){return e.pinned===n.pinned&&e.accessor!==n.accessor}).reduce(function(e,n){return n.hide?e:e+O(n,r).reduce(function(e,n){return e+L(n)},0)},0),l=B(n);return l>u?(console.warn("Header ".concat(n.accessor," exceeds pinned section width limit")),l):u}({header:t,headers:r,collapsedHeaders:l});p.length>1?fn({delta:n,leafHeaders:p,minWidth:w,startWidth:u,maxWidth:a}):p[0].width=Math.max(Math.min(u+n,a),w),r.forEach(function(e){W(e)})}var c=R([],r,!0);o(c)};if(h){var N=function(e){M(e.touches[0].clientX)},E=function(){document.removeEventListener("touchmove",N),document.removeEventListener("touchend",E),i(!1)};document.addEventListener("touchmove",N),document.addEventListener("touchend",E)}else{var T=function(e){M(e.clientX)},k=function(){document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",k),i(!1)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",k)}}},fn=function(e){var n=e.delta,t=e.leafHeaders,r=e.minWidth,o=e.startWidth,i=e.maxWidth,a=t.reduce(function(e,n){return Math.min(e,B(n))},40),u=t.reduce(function(e,n){return e+("number"==typeof n.width?n.width:150)},0),l=Math.max(Math.min(o+n,i),a)-u;t.forEach(function(e){var n="number"==typeof e.width?e.width:150;e.width=Math.max(n+l*(n/u),r)})},vn=function(e){var n=e.containerWidth,t=e.maxPinnedWidthPercent,r=void 0===t?.8:t,o=e.collapsedHeaders,i=0,a=0,u=0;e.headers.forEach(function(e){if(!e.hide){var n=O(e,o).reduce(function(e,n){return e+L(n)},0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:u+=n}});var l=i,c=a;if(n&&n>0){var d=n*r;i>d&&(i=d),a>d&&(a=d)}return{leftWidth:P(i),rightWidth:P(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}},hn=function(e){var n=e.columnsToShrink,t=e.totalCompensation,r=e.initialWidthsMap;if(0>t){var o=Math.abs(t),i=n.reduce(function(e,n){return e+(r.get(n.accessor)||100)},0);if(0===i)return;n.forEach(function(e,t){var a=r.get(e.accessor)||100,u=o*(a/i);if(t===n.length-1){var l=n.slice(0,t).reduce(function(e,n){var t=r.get(n.accessor)||100;return e+(("number"==typeof n.width?n.width:100)-t)},0);u=o-l}e.width=a+u})}else for(var a=t,u=function(){var e=n.map(function(e){var n=r.get(e.accessor)||100;return{column:e,headroom:Math.max(0,n-30),initialWidth:n,minWidth:30}}),t=e.filter(function(e){return e.headroom>0});if(t.length>0){var o=t.reduce(function(e,n){return e+n.headroom},0),i=0,u=a;t.forEach(function(e,n){var r=u*(e.headroom/o);r=Math.min(r,e.headroom),n===t.length-1&&(r=Math.min(u-i,e.headroom)),e.column.width=e.initialWidth-r,i+=r}),a-=i}else{var l=e.filter(function(e){return e.minWidth>N});if(0>=l.length)return"break";var c=a,d=c/l.length,s=0;l.forEach(function(e,n){var t=e.minWidth-N,r=Math.min(d,t);n===l.length-1&&(r=Math.min(c-s,t));var o=e.initialWidth-r;e.column.width=o,e.column.minWidth=Math.max(o,N),s+=r}),a-=s}};a>.5&&"break"!==u(););},pn=function(e){var n=e.delta,t=e.startWidth,r=e.resizedHeader,o=e.sectionHeaders,i=e.reverse,a=e.collapsedHeaders,u=e.initialWidthsMap,l=e.sectionWidth,c=e.isParentResize,d=e.childrenToResize,s=void 0===d?[]:d;if(void 0!==c&&c&&s.length>1){var f=q(o,a),v=f.findIndex(function(e){return e.accessor===s[0].accessor}),h=f.findIndex(function(e){return e.accessor===s[s.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(e,n){return e+n},0);if(n>0){var g=n,b=!1;if(m+n>l){b=!0;var x=p.reduce(function(e,n){var t=u.get(n.accessor)||100;return e+Math.max(0,t-N)},0);g=Math.min(n,x)}var y=(I=t+g)/(C=s.reduce(function(e,n){return e+(u.get(n.accessor)||100)},0));s.forEach(function(e){var n=u.get(e.accessor)||100;e.width=Math.max(n*y,30)}),b&&g>0&&p.length>0&&hn({columnsToShrink:p,totalCompensation:g,initialWidthsMap:u})}else{var I,C=s.reduce(function(e,n){return e+(u.get(n.accessor)||100)},0),R=(I=Math.max(t+n,N*s.length))/C;s.forEach(function(e){var n=u.get(e.accessor)||100;e.width=Math.max(n*R,30)}),(A=t-I)>0&&p.length>0&&hn({columnsToShrink:p,totalCompensation:-A,initialWidthsMap:u})}}else{var S=q(o,a),M=S.findIndex(function(e){return e.accessor===r.accessor});if(-1!==M){var H,E=M===S.length-1;if(0!==(H=0===M?S.slice(M+1):E||i?S.slice(0,M):S.slice(M+1)).length){var T=Array.from(u.values()).reduce(function(e,n){return e+n},0);if(n>0){if(l>=T+n)return void(r.width=t+n);x=H.reduce(function(e,n){var t=u.get(n.accessor)||100;return e+Math.max(0,t-N)},0);var k=Math.min(n,x);r.width=t+k,k>0&&hn({columnsToShrink:H,totalCompensation:k,initialWidthsMap:u})}else{var P=Math.max(t+n,30),A=t-P;r.width=P,A>0&&hn({columnsToShrink:H,totalCompensation:-A,initialWidthsMap:u})}}else r.width=Math.max(t+n,30)}}},wn={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"},mn=function(e){switch(e){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"]}},gn=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},bn=function(e){return["between","notBetween","in","notIn"].includes(e)},xn=function(e){return["isEmpty","isNotEmpty"].includes(e)},yn=function(n){return e("div",x({className:"st-filter-container"},{children:n.children}))},In=function(n){var r=n.value,u=n.onChange,l=n.options,c=n.placeholder,d=void 0===c?"Select...":c,s=n.className,f=void 0===s?"":s,v=n.disabled,h=void 0!==v&&v,p=i(!1),w=p[0],m=p[1],g=i(-1),b=g[0],y=g[1],I=a(null),C=l.find(function(e){return e.value===r});o(function(){var e=function(e){if(w)switch(e.key){case"ArrowDown":e.preventDefault(),y(function(e){return l.length-1>e?e+1:0});break;case"ArrowUp":e.preventDefault(),y(function(e){return e>0?e-1:l.length-1});break;case"Enter":e.preventDefault(),0>b||(u(l[b].value),m(!1),y(-1));break;case"Escape":e.preventDefault(),m(!1),y(-1)}};if(w)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[w,b,l,u]);var R=function(e){u(e),m(!1),y(-1)};return t("div",x({ref:I,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 e=l.findIndex(function(e){return e.value===r});y(0>e?0:e)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":w,"aria-labelledby":"select-label"},{children:[e("span",x({className:"st-custom-select-value"},{children:C?C.label:d})),e(ge,{})]})),e(xe,x({open:w,setOpen:m,onClose:function(){m(!1),y(-1)},positioning:"absolute",overflow:"auto"},{children:e("div",x({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(n,t){return e("div",x({className:"st-custom-select-option ".concat(n.value===r?"st-custom-select-option-selected":""," ").concat(t===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===r,onClick:function(){return R(n.value)},tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),R(n.value))}},{children:n.label}),t)})}))}))]}))},Cn=function(n){var t=n.value,r=n.onChange,o=n.operators.map(function(e){return{value:e,label:wn[e]}});return e("div",x({className:"st-filter-section"},{children:e(In,{value:t,onChange:function(e){r(e)},options:o})}))},Rn=function(n){var t=n.type,r=n.onChange,o=n.autoFocus,i=n.className,a=n.onEnterPress;return e("input",{type:void 0===t?"text":t,value:n.value,onChange:function(e){return r(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&a&&a()},placeholder:n.placeholder,autoFocus:void 0!==o&&o,className:"st-filter-input ".concat(void 0===i?"":i).trim()})},Sn=function(n){var t=n.children,r=n.className;return e("div",x({className:"st-filter-section ".concat(void 0===r?"":r).trim()},{children:t}))},Mn=function(n){var r=n.onClear,o=n.canApply,i=n.showClear;return t("div",x({className:"st-filter-actions"},{children:[e("button",x({onClick:n.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled"),tabIndex:0},{children:"Apply"})),i&&r&&e("button",x({onClick:r,className:"st-filter-button st-filter-button-clear",tabIndex:0},{children:"Clear"}))]}))},Nn=function(n){var r=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"contains"),d=c[0],s=c[1],f=i(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],p=mn("string");o(function(){a?(s(a.operator),h((a.value||"")+"")):(s("contains"),h(""))},[a]);var w=function(){var e=x({accessor:r.accessor,operator:d},gn(d)&&{value:v});u(e)},m=xn(d)||v.trim();return t(yn,{children:[e(Cn,{value:d,onChange:s,operators:p}),gn(d)&&e(Sn,{children:e(Rn,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:w})}),e(Mn,{onApply:w,onClear:l,canApply:!!m,showClear:!!a})]})},Hn=function(n){var r,a,u=n.header,l=n.currentFilter,c=n.onApplyFilter,d=n.onClearFilter,s=i((null==l?void 0:l.operator)||"equals"),f=s[0],v=s[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],I=x[1],C=mn("number");o(function(){var e,n;l?(v(l.operator),w((l.value||"")+""),b(((null===(e=l.values)||void 0===e?void 0:e[0])||"")+""),I(((null===(n=l.values)||void 0===n?void 0:n[1])||"")+"")):(v("equals"),w(""),b(""),I(""))},[l]);var R=function(){var e={accessor:u.accessor,operator:f};gn(f)?e.value=parseFloat(p):bn(f)&&(e.values=[parseFloat(""+g),parseFloat(""+y)]),c(e)};return t(yn,{children:[e(Cn,{value:f,onChange:v,operators:C}),gn(f)&&e(Sn,{children:e(Rn,{type:"number",value:p,onChange:w,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),bn(f)&&t(Sn,{children:[e(Rn,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),e(Rn,{type:"number",value:y,onChange:I,placeholder:"To...",onEnterPress:R})]}),e(Mn,{onApply:R,onClear:d,canApply:!!xn(f)||(gn(f)?""!==p.trim():!!bn(f)&&""!==(g+"").trim()&&""!==(y+"").trim()),showClear:!!l})]})},En=function(n){var t=n.className;return e(In,{value:n.value,onChange:n.onChange,options:n.options,className:void 0===t?"":t,placeholder:n.placeholder})},Tn=function(n){var r=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"equals"),d=c[0],s=c[1],f=i(void 0!==(null==a?void 0:a.value)?a.value+"":"true"),v=f[0],h=f[1],p=mn("boolean");o(function(){a?(s(a.operator),h(void 0!==a.value?a.value+"":"true")):(s("equals"),h("true"))},[a]);var w=xn(d)||""!==v;return t(yn,{children:[e(Cn,{value:d,onChange:s,operators:p}),gn(d)&&e(Sn,{children:e(En,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e(Mn,{onApply:function(){var e={accessor:r.accessor,operator:d};gn(d)&&(e.value="true"===v),u(e)},onClear:l,canApply:w,showClear:!!a})]})},kn=function(n){var r,u,l=n.header,c=n.currentFilter,d=n.onApplyFilter,s=n.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],I=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),C=I[0],R=I[1],S=mn("date");o(function(){var e,n;c?(h(c.operator),m((c.value||"")+""),y(((null===(e=c.values)||void 0===e?void 0:e[0])||"")+""),R(((null===(n=c.values)||void 0===n?void 0:n[1])||"")+"")):(h("equals"),m(""),y(""),R(""))},[c]);var M=function(n){var r=n.value,u=n.onChange,l=n.placeholder,c=n.autoFocus,d=n.className,s=i(!1),f=s[0],v=s[1],h=i(""),p=h[0],w=h[1],m=a(null);o(function(){if(r){var e=Fe(r);isNaN(e.getTime())||w(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else w("")},[r]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=r?Fe(r):new Date;return t("div",x({className:"st-date-input-container",style:{position:"relative"}},{children:[e("input",{ref:m,type:"text",value:p,placeholder:l,onClick:function(){v(!f)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),v(!f)):"Escape"===e.key&&v(!1)},readOnly:!0,className:"st-filter-input ".concat(d||""),style:{cursor:"pointer"}}),e(xe,x({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"hidden",width:240},{children:e(Te,{value:g,onChange:function(e){var n=e.toISOString().split("T")[0];u(n),v(!1)},onClose:function(){return v(!1)}})}))]}))};return t(yn,{children:[e(Cn,{value:v,onChange:h,operators:S}),gn(v)&&e(Sn,{children:e(M,{value:w,onChange:m,placeholder:"Select date...",autoFocus:!0})}),bn(v)&&t(Sn,{children:[e(M,{value:b,onChange:y,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e(M,{value:C,onChange:R,placeholder:"To date..."})]}),e(Mn,{onApply:function(){var e={accessor:l.accessor,operator:v};gn(v)?e.value=w:bn(v)&&(e.values=[b,C]),d(e)},onClear:s,canApply:!!xn(v)||(gn(v)?""!==w.trim():!!bn(v)&&""!==b.trim()&&""!==C.trim()),showClear:!!c})]})},Pn=function(n){var r=n.header,a=n.currentFilter,l=n.onApplyFilter,c=n.onClearFilter,d=u(function(){return r.enumOptions||[]},[r.enumOptions]),s=u(function(){return d.map(function(e){return e.value})},[d]),f=i((null==a?void 0:a.values)?a.values.map(String):s),v=f[0],h=f[1],p=i(""),w=p[0],m=p[1],g=u(function(){if(!w)return d;var e=w.toLowerCase();return d.filter(function(n){return n.label.toLowerCase().includes(e)})},[d,w]);o(function(){h(a?a.values?a.values.map(String):[]:s)},[a,s]);var b=d.length>10;return t(yn,{children:[e(Sn,{children:t("div",x({className:"st-enum-filter-options"},{children:[e("div",x({className:"st-enum-select-all"},{children:e(Ye,x({checked:v.length===s.length,onChange:function(e){h(e?s:[])}},{children:e("span",x({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&e("div",x({className:"st-enum-search"},{children:e(Rn,{type:"text",value:w,onChange:m,placeholder:"Search..."})})),g.map(function(n,t){return e(Ye,x({checked:v.includes(n.value),onChange:function(){return e=n.value,void h(function(n){return n.includes(e)?n.filter(function(n){return n!==e}):R(R([],n,!0),[e],!1)});var e}},{children:e("span",x({className:"st-enum-option-label"},{children:n.label}))}),t)}),w&&0===g.length&&e("div",x({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),e(Mn,{onApply:function(){v.length!==s.length?l({accessor:r.accessor,operator:"in",values:v}):c()},onClear:c,canApply:0!==v.length&&v.length!==s.length,showClear:!!a})]})},An=function(t){var r=t.header,o=t.currentFilter,i=t.onApplyFilter,a=t.onClearFilter;return e(n,{children:function(){switch(r.type){case"number":return e(Hn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return e(Tn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return e(kn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return e(Pn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return e(Nn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},Dn=function(r){var u=r.content,l=r.children,c=r.delay,d=void 0===c?500:c,s=i(!1),f=s[0],v=s[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 e(n,{children:l});var I=h(l,{ref:y,onMouseEnter:function(){b.current=setTimeout(function(){if(y.current&&u.trim()){var e=y.current.getBoundingClientRect();if(e.width>0&&e.height>0){var n=e.left+e.width/2-100,t=e.bottom+8;8>n?n=8:n+200>window.innerWidth-8&&(n=window.innerWidth-200-8),t+40>window.innerHeight-8&&(t=e.top-40-8),g({top:t,left:n}),v(!0)}}},d)},onMouseLeave:function(){b.current&&(clearTimeout(b.current),b.current=null),v(!1)}});return t(n,{children:[I,f&&e("div",x({className:"st-tooltip",style:{position:"fixed",top:"".concat(w.top,"px"),left:"".concat(w.left,"px"),zIndex:1e4}},{children:u}))]})},Fn=function(n){var r,c,d=n.colIndex,s=n.gridColumnEnd,f=n.gridColumnStart,v=n.gridRowEnd,p=n.gridRowStart,w=n.header,m=n.parentHeader,g=n.reverse,b=n.sort,y=i(!1),I=y[0],C=y[1],S=i(!1),M=S[0],N=S[1],H=i(w.label||""),k=H[0],P=H[1],D=le(),F=D.activeHeaderDropdown,O=D.areAllRowsSelected,L=D.autoExpandColumns,W=D.collapsedHeaders,B=D.columnBorders,q=D.columnReordering,G=D.columnResizing,z=D.columnsWithSelectedCells,K=D.draggedHeaderRef,j=D.enableHeaderEditing,V=D.filterIcon,_=D.handleApplyFilter,U=D.handleClearFilter,J=D.handleSelectAll,X=D.headerCollapseIcon,Y=D.headerDropdown,$=D.headerExpandIcon,Z=D.headerRegistry,Q=D.headers,ee=D.hoveredHeaderRef,ne=D.onColumnOrderChange,te=D.onColumnSelect,re=D.onHeaderEdit,oe=D.onSort,ie=D.onTableHeaderDragEnd,ae=D.headerHeight,ue=D.selectColumns,ce=D.selectableColumns,de=D.selectedColumns,se=D.setActiveHeaderDropdown,fe=D.setCollapsedHeaders,ve=D.setHeaders,he=D.setInitialFocusedCell,pe=D.setIsResizing,we=D.setSelectedCells,me=D.setSelectedColumns,ge=D.sortDownIcon,be=D.sortUpIcon,ye=D.tableBodyContainerRef,Ie=!!(null==w?void 0:w.isSortable),Re=!!(null==w?void 0:w.filterable),Se=D.filters[w.accessor],Me=(null==F?void 0:F.accessor)===w.accessor,Ne=w.isSelectionColumn&&D.enableRowSelection,He=function(e){var n;return!(!(null===(n=e.children)||void 0===n?void 0:n.length)||!e.collapsible)}(w),Te=W.has(w.accessor),ke=function(e){var n=e.isOpen,t=e.estimatedHeight,r=void 0===t?200:t,u=e.estimatedWidth,l=void 0===u?250:u,c=e.margin,d=void 0===c?4:c,s=a(null),f=i({}),v=f[0],h=f[1];return o(function(){if(n&&s.current){var e=function(){if(s.current){var e=s.current.getBoundingClientRect(),n=window.innerHeight-e.bottom,t=window.innerWidth-e.right,o="bottom",i={};r>n&&e.top>=r&&(o="top");var a="left";l>t+e.width&&(a="right"),"bottom"===o?i.top=e.bottom+d:i.bottom=window.innerHeight-e.top+d,"left"===a?i.left=e.left:i.right=window.innerWidth-e.right,h(i)}};requestAnimationFrame(e);var t=function(){return requestAnimationFrame(e)},o=function(){return requestAnimationFrame(e)};return window.addEventListener("resize",t),window.addEventListener("scroll",o,!0),function(){window.removeEventListener("resize",t),window.removeEventListener("scroll",o,!0)}}h({})},[n,r,l,d]),{triggerRef:s,position:v}}({isOpen:Me,estimatedHeight:200,estimatedWidth:250,margin:4}),Pe=ke.triggerRef,Ae=ke.position,De=u(function(){var e,n,t;if(!B)return!1;var r=Q.filter(function(e){return"left"===e.pinned}),o=Q.filter(function(e){return!e.pinned}),i=Q.filter(function(e){return"right"===e.pinned});return"left"===w.pinned?(null===(e=r[r.length-1])||void 0===e?void 0:e.accessor)===w.accessor:"right"===w.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===w.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===w.accessor},[B,Q,w.accessor,w.pinned]),Fe=u(function(){return!(!ce||Ne)&&T(w,d).some(function(e){return de.has(e)})},[ce,Ne,w,d,de]),Oe=u(function(){return!Ne&&T(w,d).some(function(e){return z.has(e)})},[Ne,w,d,z]),Le=u(function(){return!(!w.children||0===w.children.length)&&(!Te||w.children.some(function(e){var n=e.showWhen||E;return"parentCollapsed"===n||"always"===n}))},[w.children,Te]),We=null==m?void 0:m.singleRowChildren,Be=Le&&!w.singleRowChildren,qe="st-header-cell ".concat(w.accessor===(null===(r=ee.current)||void 0===r?void 0:r.accessor)?"st-hovered":""," ").concat((null===(c=K.current)||void 0===c?void 0:c.accessor)===w.accessor?"st-dragging":""," ").concat(Ie?"clickable":""," ").concat(q&&!Ie?"columnReordering":""," ").concat(Be?"parent":""," ").concat(We?"st-sub-header":""," ").concat(De?"st-last-column":""," ").concat(j&&!Ne?"st-header-editable":""," ").concat(Fe?"st-header-selected":""," ").concat(Oe&&!Fe?"st-header-has-highlighted-cell":""),ze=Xe({draggedHeaderRef:K,headers:Q,hoveredHeaderRef:ee,onColumnOrderChange:ne,onTableHeaderDragEnd:ie}),Ke=ze.handleDragStart,je=ze.handleDragEnd,Ve=ze.handleDragOver,_e=Ge();o(function(){if(Z&&!w.isSelectionColumn){var e=w.accessor+"";return Z.set(e,{setEditing:function(e){N(e)}}),function(){Z.delete(e)}}},[Z,w.accessor,w.isSelectionColumn]),o(function(){P(w.label||"")},[w.label]);var Ue=function(e){C(!I)},Je=l(function(e){P(e);var n=Q.map(function(n){return n.accessor===w.accessor?x(x({},n),{label:e}):n});ve(n),re&&re(w,e)},[Q,ve,re,w]),$e=l(function(){se&&se(null)},[se]),Ze=l(function(e){e.stopPropagation(),fe(function(e){var n=new Set(e);return Te?n.delete(w.accessor):n.add(w.accessor),n})},[fe,Te,w.accessor]),Qe=function(e){var n=e.event,t=e.header;if(!t.isSelectionColumn){if(ce){var r=T(t,d),o=r.some(function(e){return de.has(e)});if(j&&o&&!n.shiftKey)return Y&&Me&&$e(),void N(!0);n.shiftKey&&ue?me(function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort(function(e,n){return e-n}),o=t[0],i=Math.abs(n-o);t.forEach(function(e){var t=Math.abs(n-e);i>t&&(i=t,o=e)});var a,u,l,c=R(R([],(l=Math.min(a=o,u=n),Array.from({length:Math.max(a,u)-l+1},function(e,n){return l+n})),!0),r,!0);return new Set(R(R([],Array.from(e),!0),c,!0))}):ue&&ue(r),we(new Set),he(null)}te&&te(t),!ce&&t.isSortable&&oe(t.accessor)}};if(o(function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}},[]),!w)return null;var en=G&&!Ne&&e("div",x({className:"st-header-resize-handle-container",role:"separator","aria-label":"Resize ".concat(w.label," column"),"aria-orientation":"vertical",onMouseDown:function(e){var n,t=null===(n=document.getElementById(A({accessor:w.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;_e({callback:sn,callbackProps:{event:e.nativeEvent,header:w,headers:Q,setHeaders:ve,setIsResizing:pe,tableBodyContainerRef:ye,startWidth:t,collapsedHeaders:W,autoExpandColumns:L,reverse:g},limit:10})},onTouchStart:function(e){var n,t=null===(n=document.getElementById(A({accessor:w.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;_e({callback:sn,callbackProps:{event:e,header:w,headers:Q,setHeaders:ve,setIsResizing:pe,tableBodyContainerRef:ye,startWidth:t,collapsedHeaders:W,autoExpandColumns:L,reverse:g},limit:10})}},{children:e("div",{className:"st-header-resize-handle"})})),nn=b&&b.key.accessor===w.accessor&&t("div",x({className:"st-icon-container",onClick:function(e){return Qe({event:e,header:w})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||oe(w.accessor)},tabIndex:0,role:"button","aria-label":"Sort ".concat(w.label," ").concat("asc"===b.direction?"descending":"ascending")},{children:["asc"===b.direction&&be&&be,"desc"===b.direction&&ge&&ge]})),tn=Re&&V&&t("div",x({className:"st-icon-container",onClick:Ue,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.target===e.currentTarget||e.currentTarget.contains(e.target))&&(e.target.closest(".st-dropdown-content")||(e.preventDefault(),Ue()))},tabIndex:0,role:"button","aria-label":"Filter ".concat(w.label),"aria-expanded":I,"aria-haspopup":"dialog"},{children:[h(V,{style:{fill:Se?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e(xe,x({open:I,overflow:"visible",setOpen:C,onClose:function(){return C(!1)}},{children:e(An,{header:w,currentFilter:Se,onApplyFilter:function(e){_(e),C(!1)},onClearFilter:function(){U(w.accessor),C(!1)}})}))]})),rn=He&&!Ne&&e("div",x({className:"st-icon-container st-collapse-icon-container",onClick:function(e){return Ze(e)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ze(e))},tabIndex:0,role:"button","aria-label":"".concat(Te?"Expand":"Collapse"," ").concat(w.label," column"),"aria-expanded":!Te},{children:Te?X:$})),on=e(Dn,x({content:w.tooltip||""},{children:e("span",x({className:"st-header-label-text ".concat("right"===w.align?"right-aligned":"center"===w.align?"center-aligned":"left-aligned")},{children:Ne?e(Ye,{checked:!!O&&O(),onChange:function(e){J&&J(e)},ariaLabel:"Select all rows"}):M?e(Ce,{defaultValue:k,onBlur:function(){return N(!1)},onChange:Je}):k||(null==w?void 0:w.label)}))})),an="header-desc-".concat(w.accessor),un=function(e,n){var t=[];return e.type&&"other"!==e.type&&t.push("".concat(e.type," column")),e.isSortable&&t.push("sortable"),n&&t.push("filterable"),e.tooltip&&t.push(e.tooltip),t.join(", ")}(w,Re);return t(Ee,x({className:qe,id:A({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":d+1,"aria-describedby":un?an:void 0,onDragOver:function(e){Ne||_e({callback:Ve,callbackProps:{event:e,hoveredHeader:w},limit:50})},style:x({gridRowStart:p,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:s},v-p>1?{}:{height:ae})},{children:[g&&en,!w.headerRenderer&&"right"===w.align&&rn,!w.headerRenderer&&"right"===w.align&&tn,!w.headerRenderer&&"right"===w.align&&nn,e("div",x({ref:Pe,className:"st-header-label",draggable:q&&!w.disableReorder&&!Ne,onClick:function(e){Ne||Qe({event:e,header:w})},onDoubleClick:function(e){Ne||function(e){var n=e.header;n.isSelectionColumn||ce&&n.isSortable&&oe(n.accessor)}({event:e,header:w})},onDragEnd:Ne?void 0:function(e){e.preventDefault(),je()},onDragStart:Ne?void 0:function(e){q&&w&&function(e){Ke(e)}(w)}},{children:w.headerRenderer?w.headerRenderer({accessor:w.accessor,colIndex:d,header:w,components:{sortIcon:nn||void 0,filterIcon:tn||void 0,collapseIcon:rn||void 0,labelContent:on}}):on})),!w.headerRenderer&&"right"!==w.align&&nn,!w.headerRenderer&&"right"!==w.align&&tn,!w.headerRenderer&&"right"!==w.align&&rn,!g&&en,Y&&!Ne&&e("div",x({className:"st-header-dropdown-container"},{children:Y({accessor:w.accessor,colIndex:d,header:w,isOpen:Me,onClose:$e,position:Ae})})),un&&e("span",x({id:an,className:"st-sr-only"},{children:un}))]}))},On=function(t){var r=t.columnIndices,o=t.gridTemplateColumns,i=t.handleScroll,a=t.headers,l=t.maxDepth,c=t.pinned,d=t.sectionRef,s=t.sort,f=t.width,v=le().collapsedHeaders,h=u(function(){var e=[],n=1,t=function(o,i,u,d){var s,f;if(void 0===u&&(u=!1),!D({header:o,pinned:c,headers:a,collapsedHeaders:v}))return 0;u||n++;var h,p,w=null!==(f=null===(s=o.children)||void 0===s?void 0:s.filter(function(e){return D({header:e,pinned:c,headers:a,collapsedHeaders:v})}).length)&&void 0!==f?f:0,m=n;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),e.push({header:o,gridColumnStart:m,gridColumnEnd:h,gridRowStart:i,gridRowEnd:p,colIndex:r[o.accessor],parentHeader:d}),o.children&&o.children.length>0){var g=o.singleRowChildren?i:i+1,b=!o.singleRowChildren;o.children.forEach(function(e){D({header:e,pinned:c,headers:a,collapsedHeaders:v})&&(t(e,g,b,o),b=!1)})}return h-m},o=a.filter(function(e){return D({header:e,pinned:c,headers:a,collapsedHeaders:v})}),i=!0;return o.forEach(function(e){t(e,1,i),i=!1}),e},[a,l,c,r,v]);return e(un,x({childRef:d,group:c?"pinned-".concat(c):"default"},{children:e("div",x({className:"st-header-".concat(c?"pinned-".concat(c):"main")},i&&{onScroll:i},{ref:d,style:{gridTemplateColumns:o,width:f,position:"relative"}},{children:e(n,{children:h.map(function(n){return e(Fn,{colIndex:n.colIndex,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,parentHeader:n.parentHeader,reverse:"right"===c,sort:s},n.header.accessor)})})}))}))},Ln=function(n){var r=n.centerHeaderRef,o=n.headers,i=n.mainTemplateColumns,a=n.pinnedLeftColumns,l=n.pinnedLeftTemplateColumns,c=n.pinnedRightColumns,d=n.pinnedRightTemplateColumns,s=n.sort,f=n.pinnedLeftWidth,v=n.pinnedRightWidth,h=le(),p=h.headerContainerRef,w=h.pinnedLeftRef,m=h.pinnedRightRef,g=h.collapsedHeaders,b=h.tableRows,y=h.maxHeaderDepth,I=u(function(){return cn({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:g})},[o,a,c,g]),C=u(function(){return Object.keys(I).length},[I]);return t("div",x({className:"st-header-container",ref:p,"aria-rowcount":b.length+y,"aria-colcount":C},{children:[je(o,"left")&&e(On,{columnIndices:I,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:y,pinned:"left",sectionRef:w,sort:s,width:f}),e(On,{columnIndices:I,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:y,sectionRef:r,sort:s}),je(o,"right")&&e(On,{columnIndices:I,gridTemplateColumns:d,handleScroll:void 0,headers:o,maxDepth:y,pinned:"right",sectionRef:m,sort:s,width:v})]}))},Wn=function(e){var n=e.collapsedHeaders,t=e.autoExpandColumns,r=function(e){var t=e.flattenedHeaders;return e.headers.forEach(function(e){if(!e.hide&&!e.excludeFromRender)if(e.children&&e.children.length>0)if(n&&n.has(e.accessor)){var o=e.children.filter(function(e){var n=e.showWhen||E;return"parentCollapsed"===n||"always"===n});e.singleRowChildren&&t.push(e),o.length>0?r({headers:o,flattenedHeaders:t}):e.singleRowChildren||t.push(e)}else{var i=e.children.filter(function(e){var n=e.showWhen||E;return"parentExpanded"===n||"always"===n});e.singleRowChildren&&t.push(e),r({headers:i,flattenedHeaders:t})}else t.push(e)}),t},o=r({headers:e.headers,flattenedHeaders:[]});return"".concat(o.map(function(e){return function(e,n){var t=e.minWidth,r=e.width;return"number"==typeof r&&(r="".concat(r,"px")),t&&"number"==typeof t&&(t="".concat(t,"px")),void 0===t||n?r:"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(t,", ").concat(r,")"):"max(".concat(t,", ").concat(r,")")}(e,t)}).join(" "))},Bn=function(n){var r=n.hideHeader,o=n.pinnedLeftWidth,i=n.pinnedRightWidth,l=n.setScrollTop,c=n.setScrollDirection,d=n.shouldShowEmptyState,s=n.sort,f=n.tableRows,v=n.rowsToRender,h=le(),p=h.columnResizing,w=h.editColumns,m=h.headers,g=h.collapsedHeaders,b=h.autoExpandColumns,y=a(null),I=m.filter(function(e){return!e.pinned}),C=m.filter(function(e){return"left"===e.pinned}),R=m.filter(function(e){return"right"===e.pinned}),S=u(function(){return Wn({headers:C,collapsedHeaders:g,autoExpandColumns:b})},[C,g,b]),M=u(function(){return Wn({headers:I,collapsedHeaders:g,autoExpandColumns:b})},[I,g,b]),N=u(function(){return Wn({headers:R,collapsedHeaders:g,autoExpandColumns:b})},[R,g,b]),H={centerHeaderRef:y,headers:m,mainTemplateColumns:M,pinnedLeftColumns:C,pinnedLeftTemplateColumns:S,pinnedRightColumns:R,pinnedRightTemplateColumns:N,sort:s,pinnedLeftWidth:o,pinnedRightWidth:i},E={mainTemplateColumns:M,pinnedLeftColumns:C,pinnedLeftTemplateColumns:S,pinnedLeftWidth:o,pinnedRightColumns:R,pinnedRightTemplateColumns:N,pinnedRightWidth:i,rowsToRender:v,setScrollDirection:c,setScrollTop:l,shouldShowEmptyState:d,tableRows:f};return t("div",x({className:"st-content ".concat(p?"st-resizeable":"st-not-resizeable"),style:{width:w?"calc(100% - 27.5px)":"100%"}},{children:[!r&&e(Ln,x({},H)),e(dn,x({},E))]}))},qn=function(n){var r=n.mainBodyWidth,u=n.mainBodyRef,l=n.pinnedLeftWidth,c=n.pinnedRightWidth,d=n.pinnedLeftContentWidth,s=n.pinnedRightContentWidth,f=n.tableBodyContainerRef,v=le().editColumns,h=i(!1),p=h[0],w=h[1],m=a(null),g=a(null),b=a(null),y=v?28:0,I=(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&&e(un,x({childRef:g,group:"pinned-left"},{children:e("div",x({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:e("div",{style:{width:d}})}))})),r>0&&e(un,x({childRef:m},{children:e("div",x({className:"st-horizontal-scrollbar-middle",ref:m},{children:e("div",{style:{width:r}})}))})),c>0&&e(un,x({childRef:b,group:"pinned-right"},{children:e("div",x({className:"st-horizontal-scrollbar-right",ref:b,style:{width:I}},{children:e("div",{style:{width:s}})}))})),y>0&&e("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},Gn={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"asc"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"asc"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"asc"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"asc"===t?i:-i},enum:function(e,n,t){return Gn.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"asc"===t?-1:1:null==n?"asc"===t?1:-1:"string"==typeof e&&"string"==typeof n?Gn.string(e,n,t):"number"==typeof e&&"number"==typeof n?Gn.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?Gn.boolean(e,n,t):Gn.string(e+"",n+"",t)}},zn=function(e){return function(e){var n=e.rows,t=e.sortColumn,r=function(e,n){for(var t=0,o=e;o.length>t;t++){var i=o[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=r(i.children,n);if(a)return a}}},o=r(e.headers,t.key.accessor),i=(null==o?void 0:o.type)||"string",a=t.direction,u=t.key.accessor;return R([],n,!0).sort(function(e,t){var r,l;if(null==o?void 0:o.valueGetter){var c=n.indexOf(e),d=n.indexOf(t);r=o.valueGetter({accessor:u,row:e,rowIndex:c}),l=o.valueGetter({accessor:u,row:t,rowIndex:d})}else r=K(e,u),l=K(t,u);return(null==o?void 0:o.comparator)?o.comparator({rowA:e,rowB:t,valueA:r,valueB:l,direction:a}):function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"asc"===r?-1:1;if(null==n||""===n)return"asc"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=e+"";if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.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(e),a=o(n);return Gn.number(i,a,r)}return"date"===t?Gn.date(e+"",n+"",r):"boolean"===t?Gn.boolean(!!e,!!n,r):"enum"===t?Gn.enum(e+"",n+"",r):Gn.string(e+"",n+"",r)}(r,l,i,a)})}({rows:e.rows,sortColumn:e.sortColumn,headers:e.headers})},Kn=function(e){return u(function(){var n=k(e),t=new Map;return n.forEach(function(e){t.set(e.accessor,e)}),t},[e])},jn=function(e){var n=e.tableRows,t=e.sortColumn,r=e.rowGrouping,o=e.headers;return e.externalSortHandling?n:t?r&&r.length>0?(0,e.sortNestedRows)({groupingKeys:r,headers:o,rows:n,sortColumn:t}):zn({headers:o,rows:n,sortColumn:t}):n},Vn=function(e,n,t){void 0===t&&(t=new Set);for(var r=0,o=e;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(e){return e.accessor===n}),u=!1;if(!a)for(var l=0,c=i.children;c.length>l;l++){var d=c[l];if(Vn([d],n,t),!1===d.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},_n=function(e){return e.every(function(e){return e.hide})},Un=function(e){e.forEach(function(e){e.children&&e.children.length>0&&(Un(e.children),_n(e.children)&&(e.hide=!0))})},Jn=function(r){var o=r.allHeaders,a=r.depth,u=void 0===a?0:a,l=r.doesAnyHeaderHaveChildren,c=r.header,d=r.isCheckedOverride,s=i(!0),f=s[0],v=s[1],h=le(),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,I=null!=d?d:!(c.hide||y&&c.children&&_n(c.children));return t(n,{children:[t("div",x({className:"st-header-checkbox-item",style:{paddingLeft:b}},{children:[l&&e("div",x({className:"st-header-icon-container"},{children:y?e("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),v(!f)}},{children:p})):null})),e(Ye,x({checked:I,onChange:function(e){c.hide=!e,e?(Vn(o,c.accessor),y&&c.children&&c.children.length>0&&c.children.every(function(e){return!0===e.hide})&&c.children[0]&&(c.children[0].hide=!1,Vn(o,c.children[0].accessor))):Un(o);var n=R([],w,!0);if(m(n),g){var t=function(e){var n={},t=function(e){n[e.accessor]=!e.hide,e.children&&e.children.length>0&&e.children.forEach(t)};return e.forEach(t),n}(n);g(t)}}},{children:c.label}))]})),y&&f&&c.children&&e("div",x({className:"st-nested-headers"},{children:c.children.map(function(n,t){return e(Jn,{allHeaders:o,depth:u+1,doesAnyHeaderHaveChildren:l,header:n,isCheckedOverride:!!I&&void 0},"".concat(n.accessor,"-").concat(t))})}))]})},Xn=function(n){var t=n.headers,r=n.open,o="left"===n.position?"left":"",i=u(function(){return t.some(function(e){return e.children&&e.children.length>0})},[t]);return e("div",x({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(o),onClick:function(e){return e.stopPropagation()}},{children:e("div",x({className:"st-column-editor-popout-content"},{children:t.map(function(n,r){return n.isSelectionColumn||n.excludeFromRender?null:e(Jn,{doesAnyHeaderHaveChildren:i,header:n,allHeaders:t},"".concat(n.accessor,"-").concat(r))})}))}))},Yn=function(n){var r=n.columnEditorText,o=n.editColumns,a=n.headers,u=n.position,l=void 0===u?"right":u,c=i(n.editColumnsInitOpen),d=c[0],s=c[1];return o?t("div",x({className:"st-column-editor ".concat(d?"open":""," ").concat(l),onClick:function(){return function(e){s(e)}(!d)},style:{width:28}},{children:[e("div",x({className:"st-column-editor-text"},{children:r})),e(Xn,{headers:a,open:d,position:l})]})):null},$n=function(n){var t=n.children,o=a({}),i=l(function(e,n){return!!o.current[n]&&o.current[n].find(function(n){return n===e})},[]),u=l(function(e,n){e.scrollWidth-e.clientWidth>0&&(n.scrollLeft=e.scrollLeft)},[]),c=l(function(e){e.onscroll=null},[]),d=l(function(e,n){e.onscroll=function(){window.requestAnimationFrame(function(){n.forEach(function(n){var t;null===(t=o.current[n])||void 0===t||t.forEach(function(n){e!==n&&(c(n),u(e,n),window.requestAnimationFrame(function(){var e=Object.keys(o.current).filter(function(e){return o.current[e].includes(n)});d(n,e)}))})})})}},[c,u]),s=l(function(e,n){n.forEach(function(n){o.current[n]||(o.current[n]=[]),i(e,n)||(o.current[n].length>0&&u(o.current[n][0],e),o.current[n].push(e))}),d(e,n)},[i,u,d]),f=l(function(e,n){n.forEach(function(n){if(i(e,n)){c(e);var t=o.current[n].indexOf(e);-1!==t&&o.current[n].splice(t,1)}})},[i,c]);return e(an.Provider,x({value:{registerPane:s,unregisterPane:f}},{children:r.Children.only(t)}))},Zn=function(e){var n=e.tableRows,t=e.filterState;return e.externalFilterHandling?n:t&&0!==Object.keys(t).length?n.filter(function(e){return Object.values(t).every(function(n){try{return function(e,n){var t=n.operator,r=n.value,o=n.values;if(null==e)return"isEmpty"===t;if("isEmpty"===t)return!e||""===(e+"").trim();if("isNotEmpty"===t)return e&&""!==(e+"").trim();if("string"==typeof e||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=(e+"").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 e||!isNaN(+e)){var u=+e,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),d=c[1];return u>=c[0]&&d>=u}return!1;case"notBetween":if(o&&2===o.length){var s=o.map(Number);return d=s[1],s[0]>u||u>d}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=Fe(e),v=Fe((r||"")+""),h=De(f),p=De(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(e){return De(Fe((e||"")+""))}),m=w[1];return h>=w[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(e){return De(Fe((e||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof e&&"equals"===t)return e===!!r;if(Array.isArray(e)){var b=e.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", ");e=b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var x=o.includes(e+"");return"in"===t?x:!x}return!1}var y=(e+"").toLowerCase(),I=r?(r+"").toLowerCase():"";switch(t){case"equals":return y===I;case"notEquals":return y!==I;default:return!0}}(K(e,n.accessor),n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}})}):n},Qn=function(e){var n,t=document.querySelector(".simple-table-root");if("string"==typeof e){if(e.endsWith("px"))return parseInt(e,10);if(e.endsWith("vh"))return window.innerHeight*parseInt(e,10)/100;if(e.endsWith("%")){var r=null===(n=null==t?void 0:t.parentElement)||void 0===n?void 0:n.clientHeight;return!r||50>r?0:r*parseInt(e,10)/100}return window.innerHeight}return e},et=function(e,n,t,r){var o=[],i=function(e){e.forEach(function(e){var t=r?e[r]:void 0;if(r&&t&&V(t))i(t);else{var a=K(e,n);null!=a&&o.push(a)}})};if(i(e),0!==o.length){if("custom"===t.type&&t.customFn)return t.customFn(o);var a,u=t.parseValue?o.map(t.parseValue).filter(function(e){return!isNaN(e)}):o.map(function(e){return"number"==typeof e?e:"string"==typeof e?parseFloat(e):NaN}).filter(function(e){return!isNaN(e)});if(0===u.length)return"count"===t.type?o.length:void 0;switch(t.type){case"sum":a=u.reduce(function(e,n){return e+n},0);break;case"average":a=u.reduce(function(e,n){return e+n},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}},nt=function(e){if(null==e)return"";var n=e+"";if(n.includes(",")||n.includes('"')||n.includes("\n")||n.includes("\r")){var t=n.replace(/"/g,'""');return'"'.concat(t,'"')}return n},tt=function(e){return function(){for(var n=[],t=0;arguments.length>t;t++)n[t]=arguments[t];return new Promise(function(t){e.apply(void 0,n),setTimeout(function(){return t()},0)})}},rt=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},ot={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}},it=function(e){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.top="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating")},at=function(e,n,t,r){return void 0===t&&(t={}),new Promise(function(r){e.style.transition="transform ".concat(n.duration,"ms ").concat(n.easing),n.delay&&(e.style.transitionDelay="".concat(n.delay,"ms")),e.style.transform="translate3d(0, 0, 0)";var o=function(){it(e),e.removeEventListener("transitionend",o),t.onComplete&&t.onComplete(),r()};e.addEventListener("transitionend",o),setTimeout(o,n.duration+(n.delay||0)+50)})},ut=function(e){var n=e.element,t=e.finalConfig,r=e.fromBounds,o=e.toBounds;return I(void 0,void 0,void 0,function(){var e,i;return C(this,function(a){switch(a.label){case 0:return e=function(e,n){return{x:("x"in e?e.x:e.left)-n.x,y:("y"in e?e.y:e.top)-n.y}}(r,o),0===e.x&&0===e.y||rt()&&!1!==t.respectReducedMotion?[2]:(u=t,l=Math.abs(e.x)>Math.abs(e.y)?"column":"row",void 0===u&&(u={}),i=rt()?x(x({},ot.REDUCED_MOTION),u):x(x({},"column"===l?ot.COLUMN_REORDER:ot.ROW_REORDER),u),it(n),function(e,n){e.style.transform="translate3d(".concat(n.x,"px, ").concat(n.y,"px, 0)"),e.style.transition="none",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.classList.add("st-animating")}(n,e),[4,at(n,i,t)]);case 1:return a.sent(),[2]}var u,l})})},lt=function(e){var n=e.element,t=e.options;return I(void 0,void 0,void 0,function(){var e,r,o,i,a,u,l,c,d,s,f,v,h,p,w,m;return C(this,function(g){return e=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,d=void 0===(c=t.delay)?0:c,s=t.onComplete,v=void 0===(f=t.respectReducedMotion)||f,rt()&&v?(void 0!==o&&(n.style.transform="",n.style.top="".concat(o,"px")),s&&s(),[2]):(h=n.getBoundingClientRect(),w=e-(p=h.top),m=r-p,[2,new Promise(function(e){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),n.style.transform="translate3d(0, ".concat(w,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating"),n.style.transition="transform ".concat(a,"ms ").concat(l),d&&(n.style.transitionDelay="".concat(d,"ms")),n.style.transform="translate3d(0, ".concat(m,"px, 0)");var t=function(){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),void 0!==o&&(n.style.top="".concat(o,"px")),n.removeEventListener("transitionend",t),s&&s(),e()};n.addEventListener("transitionend",t),setTimeout(t,a+(d||0)+50)})])})})},ct=function(e){var n=e.rows,t=e.rowGrouping,r=void 0===t?[]:t,o=e.getRowId,i=e.expandedRows,a=e.collapsedRows,l=e.expandedDepths,c=e.rowStateMap,d=e.hasLoadingRenderer,s=e.hasErrorRenderer,f=e.hasEmptyRenderer,v=e.headers,h=e.rowHeight,p=e.headerHeight,w=e.customTheme;return u(function(){if(!r||0===r.length){var e=n.map(function(e,n){var t=[n],r=[n];return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,rowId:_({row:e,getRowId:o,depth:0,index:n,rowPath:t,rowIndexPath:r,groupingKey:void 0}),rowPath:t,rowIndexPath:r,absoluteRowIndex:n,isLastGroupRow:!0}});return{flattenedRows:e,heightOffsets:[],paginatableRows:e,parentEndPositions:n.map(function(e,n){return n+1})}}var t=[],u=[],m=[],g=[],b=0,x=function(e,n,y,I){void 0===y&&(y=[]),void 0===I&&(I=[]),e.forEach(function(e,C){var S,M,N=r[n],H=t.length,E=R(R([],y,!0),[C],!1),T=R(R([],I,!0),[C],!1),k=_({row:e,getRowId:o,depth:n,index:C,rowPath:E,rowIndexPath:T,groupingKey:N}),P={row:e,depth:n,displayPosition:b,groupingKey:N,position:H,isLastGroupRow:0===n,rowId:k,rowPath:E,rowIndexPath:T,absoluteRowIndex:H};t.push(P),u.push(P),b++;var A=U(k);if(X(A,n,l,i,a)&&r.length>n){var D=null==c?void 0:c.get(A),F=J(e,N),O=v.find(function(e){return e.expandable&&e.nestedTable});if((null==O?void 0:O.nestedTable)&&F.length>0){var L=t.length,W=(null===(S=O.nestedTable.customTheme)||void 0===S?void 0:S.rowHeight)||h,B=(null===(M=O.nestedTable.customTheme)||void 0===M?void 0:M.headerHeight)||p,q=G({childRowCount:F.length,rowHeight:W,headerHeight:B,customTheme:w});m.push([L,q-h]);var z=R(R([],E,!0),[N],!1);t.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:N,position:L,isLastGroupRow:!1,rowId:z,rowPath:z,rowIndexPath:T,nestedTable:{parentRow:e,expandableHeader:O,childAccessor:N,calculatedHeight:q},absoluteRowIndex:L})}else if(D&&(D.loading||D.error||D.isEmpty)){if(D.loading&&d||D.error&&s||D.isEmpty&&f){var K=t.length,j=R(R([],E,!0),[N],!1);t.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:N,position:K,isLastGroupRow:!1,rowId:j,rowPath:j,rowIndexPath:T,stateIndicator:{parentRowId:A,state:D},absoluteRowIndex:K})}else if(D.loading&&!d){var V=t.length,Y=R(R([],E,!0),[N,"loading-skeleton"],!1);t.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:N,position:V,isLastGroupRow:!1,rowId:Y,rowPath:Y,rowIndexPath:T,isLoadingSkeleton:!0,absoluteRowIndex:V})}}else if(F.length>0){var $=R(R([],E,!0),[N],!1),Z=R([],T,!0);x(F,n+1,$,Z)}}0===n&&g.push(t.length)})};return x(n,0,[],[]),{flattenedRows:t,heightOffsets:m,paginatableRows:u,parentEndPositions:g}},[n,r,o,i,a,l,c,d,s,f,v,h,p,w])},dt=function(){return e("div",x({className:"st-empty-state"},{children:"No rows to display"}))},st={rowHeight:32,headerHeight:32,footerHeight:49,rowSeparatorWidth:1,borderWidth:1,pinnedBorderWidth:1,nestedGridBorderWidth:2,nestedGridPaddingTop:8,nestedGridPaddingBottom:8,nestedGridPaddingLeft:8,nestedGridPaddingRight:8,nestedGridMaxHeight:400,selectionColumnWidth:42},ft=function(n){var t=i(!1),r=t[0],a=t[1];return o(function(){a(!0)},[]),r?e(vt,x({},n)):null},vt=function(n){var r=n.allowAnimations,c=void 0!==r&&r,d=n.autoExpandColumns,s=void 0!==d&&d,f=n.canExpandRowGroup,v=n.cellUpdateFlash,h=void 0!==v&&v,p=n.className,w=n.columnBorders,m=void 0!==w&&w,y=n.columnEditorPosition,S=void 0===y?"right":y,N=n.columnEditorText,E=void 0===N?"Columns":N,T=n.columnReordering,P=void 0!==T&&T,A=n.columnResizing,D=void 0!==A&&A,L=n.copyHeadersToClipboard,W=void 0!==L&&L,B=n.customTheme,q=n.defaultHeaders,G=n.editColumns,z=void 0!==G&&G,J=n.editColumnsInitOpen,X=void 0!==J&&J,$=n.emptyStateRenderer,Z=n.enableHeaderEditing,Q=void 0!==Z&&Z,ne=n.enableRowSelection,te=void 0!==ne&&ne,re=n.errorStateRenderer,ae=n.expandAll,le=void 0===ae||ae,de=n.expandIcon,ve=void 0===de?e(fe,{className:"st-expand-icon"}):de,pe=n.externalFilterHandling,ge=void 0!==pe&&pe,xe=n.externalSortHandling,ye=void 0!==xe&&xe,Ie=n.filterIcon,Ce=void 0===Ie?e(me,{className:"st-header-icon"}):Ie,Re=n.footerRenderer,Se=n.headerCollapseIcon,Me=void 0===Se?e(fe,{className:"st-header-icon"}):Se,Ne=n.headerDropdown,He=n.headerExpandIcon,Ee=void 0===He?e(se,{className:"st-header-icon"}):He,Te=n.height,ke=n.hideFooter,Pe=void 0!==ke&&ke,Ae=n.hideHeader,De=void 0!==Ae&&Ae,Fe=n.includeHeadersInCSVExport,Oe=void 0===Fe||Fe,Le=n.initialSortColumn,We=n.initialSortDirection,Be=void 0===We?"asc":We,qe=n.isLoading,Ge=void 0!==qe&&qe,Ke=n.loadingStateRenderer,je=n.maxHeight,Ve=n.nextIcon,_e=void 0===Ve?e(fe,{className:"st-next-prev-icon"}):Ve,Ue=n.onCellClick,Je=n.onCellEdit,Xe=n.onColumnOrderChange,Ye=n.onColumnSelect,$e=n.onColumnVisibilityChange,Ze=n.onFilterChange,Qe=n.onGridReady,en=n.onHeaderEdit,nn=n.onLoadMore,tn=n.onNextPage,rn=n.onPageChange,on=n.onRowGroupExpand,an=n.onRowSelectionChange,un=n.onSortChange,ln=n.prevIcon,cn=void 0===ln?e(se,{className:"st-next-prev-icon"}):ln,dn=n.rowButtons,sn=n.rowGrouping,fn=n.getRowId,hn=n.rows,pn=n.rowsPerPage,wn=void 0===pn?10:pn,mn=n.selectableCells,gn=void 0!==mn&&mn,bn=n.selectableColumns,xn=void 0!==bn&&bn,yn=n.serverSidePagination,In=void 0!==yn&&yn,Cn=n.shouldPaginate,Rn=void 0!==Cn&&Cn,Sn=n.sortDownIcon,Mn=void 0===Sn?e(we,{className:"st-header-icon"}):Sn,Nn=n.sortUpIcon,Hn=void 0===Nn?e(he,{className:"st-header-icon"}):Nn,En=n.tableEmptyStateRenderer,Tn=void 0===En?e(dt,{}):En,kn=n.tableRef,Pn=n.theme,An=void 0===Pn?"light":Pn,Dn=n.totalRowCount,Fn=n.useHoverRowBackground,On=void 0===Fn||Fn,Ln=n.useOddColumnBackground,Wn=void 0!==Ln&&Ln,Gn=n.useOddEvenRowBackground,Vn=void 0!==Gn&&Gn,_n=u(function(){return x(x({},st),B)},[B]),Un=_n.rowHeight,Jn=_n.headerHeight,Xn=_n.footerHeight,rt=_n.selectionColumnWidth;Wn&&(Vn=!1),m&&(On=!1);var it=a(null),at=a(null),ut=a(null),lt=a(null),ft=a(null),vt=a(null),ht=a(null),pt=b(function(e){return e+1},0)[1],wt=i(new Map),mt=wt[0],gt=wt[1],bt=i(hn),xt=bt[0],yt=bt[1],It=i(Ge),Ct=It[0],Rt=It[1],St=a(Ge),Mt=a(new Map);o(function(){yt(hn);var e=new Map;hn.forEach(function(n,t){var r=_({row:n,getRowId:fn,depth:0,index:t,rowPath:[t],rowIndexPath:[t]}),o=U(r);e.set(o,t)}),Mt.current=e},[hn,fn]),o(function(){var e=St.current,n=Ge;n&&!e?Rt(!0):!n&&e&&setTimeout(function(){Rt(!1)},0),St.current=Ge},[Ge]);var Nt,Ht,Et,Tt,kt,Pt,At,Dt,Ft,Ot,Lt=function(e){var n=e.tableBodyContainerRef,t=i(0),r=t[0],o=t[1];return g(function(){n.current&&o(n.current.offsetWidth-n.current.clientWidth)},[n]),{setScrollbarWidth:o,scrollbarWidth:r,tableBodyContainerRef:n}}({tableBodyContainerRef:vt}),Wt=Lt.scrollbarWidth,Bt=Lt.setScrollbarWidth,qt=be({headerContainerRef:ht,mainSectionRef:vt,scrollbarWidth:Wt}).isMainSectionScrollable,Gt=u(function(){if(Ct&&0===xt.length){var e=Rn?wn:10;return qt&&(e+=1),Array.from({length:e},function(e,n){return{}})}return xt},[Ct,xt,wn,qt,Rn]),zt=i(1),Kt=zt[0],jt=zt[1],Vt=i(q),_t=Vt[0],Ut=Vt[1],Jt=i(!1),Xt=Jt[0],Yt=Jt[1],$t=i(!1),Zt=$t[0],Qt=$t[1],er=i(null),nr=er[0],tr=er[1],rr=l(function(){var e=new Set,n=function(t){t.forEach(function(t){t.collapseDefault&&t.collapsible&&e.add(t.accessor),t.children&&n(t.children)})};return n(q),e},[q]),or=i(rr),ir=or[0],ar=or[1];o(function(){Ut(q)},[q]);var ur=u(function(){var e,n=R([],_t,!0);return te&&!(null===(e=null==_t?void 0:_t[0])||void 0===e?void 0:e.isSelectionColumn)&&(n=R([{accessor:"__row_selection__",label:"",width:rt,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],n,!0)),n},[te,_t,rt]),lr=i(0),cr=lr[0],dr=lr[1],sr=i("none"),fr=sr[0],vr=sr[1],hr=function(e,n){var t=i(function(){return function(e,n){if(!n||0===n.length)return new Set;if(e){var t=Array.from({length:n.length},function(e,n){return n});return new Set(t)}return new Set}(e,n)}),r=t[0],a=t[1];return o(function(){a(n&&0!==n.length?function(e){var t=n.length,r=Array.from(e).filter(function(e){return t>e});return new Set(r)}:new Set)},[n]),{expandedDepths:r,setExpandedDepths:a}}(le,sn),pr=hr.expandedDepths,wr=hr.setExpandedDepths,mr=i(new Map),gr=mr[0],br=mr[1],xr=i(new Map),yr=xr[0],Ir=xr[1],Cr=function(){var e=i(""),n=e[0],t=e[1],r=a(null);return o(function(){return n&&(r.current&&clearTimeout(r.current),r.current=setTimeout(function(){t("")},1e3)),function(){r.current&&clearTimeout(r.current)}},[n]),{announcement:n,announce:function(e){t(e)}}}(),Rr=Cr.announcement,Sr=Cr.announce,Mr=function(e){var n=e.effectiveHeaders,t=e.headerHeight,r=e.rowHeight,o=e.tableBodyContainerRef,a=i(0),c=a[0],d=a[1],s=l(function(e){var n,t;return e.singleRowChildren&&(null===(n=e.children)||void 0===n?void 0:n.length)?1:(null===(t=e.children)||void 0===t?void 0:t.length)?1+Math.max.apply(Math,e.children.map(s)):1},[]),f=u(function(){var e=0;return n.forEach(function(n){var t=s(n);e=Math.max(e,t)}),e},[n,s]),v=u(function(){var e=1;if("undefined"!=typeof window){var n=document.documentElement,o=getComputedStyle(n).getPropertyValue("--st-border-width").trim();if(o){var i=parseFloat(o);isNaN(i)||(e=i)}}return f*(null!=t?t:r)+e},[f,t,r]);return g(function(){var e=function(){o.current&&d(o.current.clientWidth)};e();var n=null;return o.current&&(n=new ResizeObserver(e)).observe(o.current),function(){n&&n.disconnect()}},[o]),{containerWidth:c,calculatedHeaderHeight:v,maxHeaderDepth:f}}({effectiveHeaders:ur,headerHeight:Jn,rowHeight:Un,tableBodyContainerRef:vt}),Nr=Mr.containerWidth,Hr=Mr.calculatedHeaderHeight,Er=Mr.maxHeaderDepth,Tr=a(0),kr=a(0),Pr=u(function(){var e=H(window.innerWidth),n=vn({headers:ur,containerWidth:Nr,maxPinnedWidthPercent:e,collapsedHeaders:ir});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[ur,Nr,ir]),Ar=Pr.mainBodyWidth,Dr=Pr.pinnedLeftWidth,Fr=Pr.pinnedRightWidth,Or=Pr.pinnedLeftContentWidth,Lr=Pr.pinnedRightContentWidth;o(function(){if(s&&0!==Nr&&!Xt){var e,n=function(e){var t=[];return e.forEach(function(e){e.hide||(e.children&&e.children.length>0?t.push.apply(t,n(e.children)):t.push(e))}),t};if((e=ut.current?ut.current.clientWidth:Math.max(0,Nr-Dr-Fr))>0){var t=_t.filter(function(e){return!e.pinned});n(t).length===kr.current&&10>Math.abs(e-Tr.current)||Ut(function(t){var r=t.filter(function(e){return!e.pinned}),o=n(r),i=o.reduce(function(e,n){return e+("number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):150)},0);if(0===i)return t;var a=e/i;if(.01>Math.abs(a-1))return t;Tr.current=e,kr.current=o.length;var u=new Map,l=0;o.forEach(function(n,t){if(!n.pinned){var r,i="number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):150;t===o.length-1?r=e-l:l+=r=Math.round(i*a),u.set(n.accessor,r)}});var c=function(e){var n;if(e.hide)return e;var t=null===(n=e.children)||void 0===n?void 0:n.map(c);if(!e.children||0===e.children.length){if(e.pinned)return x(x({},e),{children:t});var r=u.get(e.accessor);if(void 0!==r)return x(x({},e),{width:r,children:t});var o="number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):150;return x(x({},e),{width:Math.round(o*a),children:t})}return x(x({},e),{children:t})};return t.map(c)})}}},[s,Nr,Xt,_t,Dr,Fr]);var Wr=function(e){var n=e.rows,t=e.headers,r=e.rowGrouping;return u(function(){if(!r||0===r.length)return n;var e=function(e){return k(e).filter(function(e){return e.aggregation})}(t);if(0===e.length)return n;var o=JSON.parse(JSON.stringify(n)),i=function(n,t){return void 0===t&&(t=0),n.map(function(n){var o=r[t],a=r[t+1],u=n[o];if(u&&V(u)){var l=i(u,t+1),c=x({},n);return c[o]=l,e.forEach(function(e){var n=et(l,e.accessor,e.aggregation,a);void 0!==n&&j(c,e.accessor,n)}),c}return n})};return i(o)},[n,t,r])}({rows:Gt,headers:_t,rowGrouping:sn}),Br=function(e){var n=e.rows,t=e.headers,r=e.externalFilterHandling,o=e.onFilterChange,a=e.announce,c=i({}),d=c[0],s=c[1],f=Kn(t),v=u(function(){return Zn({externalFilterHandling:r,tableRows:n,filterState:d})},[n,d,r]),h=l(function(e){var n,t=x(x({},d),((n={})[e.accessor]=e,n));if(s(t),null==o||o(t),a){var r=f.get(e.accessor);r&&a("Filter applied to ".concat(r.label))}},[d,o,a,f]),p=l(function(e){var n=x({},d);if(delete n[e],s(n),null==o||o(n),a){var t=f.get(e);t&&a("Filter removed from ".concat(t.label))}},[d,o,a,f]),w=l(function(){s({}),null==o||o({}),a&&a("All filters cleared")},[o,a]),m=l(function(e){var t,o=x(x({},d),((t={})[e.accessor]=e,t));return Zn({externalFilterHandling:r,tableRows:n,filterState:o})},[d,n,r]);return{filteredRows:v,updateFilter:h,clearFilter:p,clearAllFilters:w,filters:d,computeFilteredRowsPreview:m}}({rows:Wr,headers:ur,externalFilterHandling:ge,onFilterChange:Ze,announce:Sr}),qr=Br.filters,Gr=Br.updateFilter,zr=Br.clearFilter,Kr=Br.clearAllFilters,jr=Br.computeFilteredRowsPreview,Vr=function(e){var n=e.headers,t=e.tableRows,r=e.externalSortHandling,o=e.onSortChange,a=e.rowGrouping,c=e.initialSortColumn,d=e.initialSortDirection,s=e.announce,f=Kn(n),v=l(function(){if(!c)return null;var e=f.get(c);return e?{key:e,direction:d||"asc"}:null},[f,c,d]),h=i(v),p=h[0],w=h[1],m=l(function(e){var n=e.groupingKeys,t=e.headers,r=e.sortColumn,o=zn({headers:t,rows:e.rows,sortColumn:r});return n&&0!==n.length?o.map(function(e){var o,i=n[0],a=e[i];if(V(a)){var u=m({rows:a,sortColumn:r,headers:t,groupingKeys:n.slice(1)});return x(x({},e),((o={})[i]=u,o))}return e}):o},[]),g=u(function(){return jn({externalSortHandling:r,tableRows:t,sortColumn:p,rowGrouping:a,headers:n,sortNestedRows:m})},[t,p,n,r,a,m]),b=l(function(e){if(!e)return w(null),void(null==o||o(null));var n=e.accessor,t=e.direction,r=f.get(n);if(r){var i=null;if(t)i={key:r,direction:t};else{var a=r.sortingOrder||["asc","desc",null],u=-1;p&&p.key.accessor===n&&(u=a.indexOf(p.direction));var l=a[(u+1)%a.length];i=null===l?null:{key:r,direction:l}}if(w(i),null==o||o(i),s)if(i){var c="asc"===i.direction?"ascending":"descending";s("Sorted by ".concat(r.label,", ").concat(c))}else s("Sort removed from ".concat(r.label))}},[p,f,o,s]),y=l(function(e){var o=function(n){for(var t=0,r=n;r.length>t;t++){var i=r[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=o(i.children);if(a)return a}}},i=o(n);if(!i)return t;var u=i.sortingOrder||["asc","desc",null],l=-1;p&&p.key.accessor===e&&(l=u.indexOf(p.direction));var c=u[(l+1)%u.length];return jn({externalSortHandling:r,tableRows:t,sortColumn:null===c?null:{key:i,direction:c},rowGrouping:a,headers:n,sortNestedRows:m})},[p,n,t,r,a,m]);return{sort:p,sortedRows:g,updateSort:b,computeSortedRowsPreview:y}}({headers:_t,tableRows:Br.filteredRows,externalSortHandling:ye,onSortChange:un,rowGrouping:sn,initialSortColumn:Le,initialSortDirection:Be,announce:Sr}),_r=Vr.sort,Ur=Vr.updateSort,Jr=Vr.computeSortedRowsPreview,Xr=ct({rows:Vr.sortedRows,rowGrouping:sn,getRowId:fn,expandedRows:gr,collapsedRows:yr,expandedDepths:pr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:ur,rowHeight:Un,headerHeight:Jn,customTheme:_n}),Yr=Xr.flattenedRows,$r=Xr.heightOffsets,Zr=Xr.paginatableRows,Qr=Xr.parentEndPositions,eo=function(e){var n=e.tableRows,t=e.onRowSelectionChange,r=e.enableRowSelection,o=void 0!==r&&r,a=i(new Set),c=a[0],d=a[1],s=l(function(e){return!!o&&function(e,n){return n.has(e)}(e,c)},[c,o]),f=l(function(){return!!o&&function(e,n){return 0!==e.length&&e.filter(function(e){return e&&e.rowId}).every(function(e){return n.has(U(e.rowId))})}(n,c)},[n,c,o]),v=u(function(){return o?function(e){return e.size}(c):0},[c,o]),h=u(function(){return o?function(e,n){return e.filter(function(e){return!(!e||!e.rowId)&&n.has(U(e.rowId))}).map(function(e){return e.row})}(n,c):[]},[n,c,o]),p=l(function(e,r){if(o){var i=function(e,n){var t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}(e,c);if(d(i),t){var a=n.find(function(n){return U(n.rowId)===e});a&&t({row:a.row,isSelected:r,selectedRows:i})}}},[c,n,t,o]),w=l(function(e){var r;o&&(e?(r=function(e){return new Set(e.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)}))}(n),t&&n.forEach(function(e){return t({row:e.row,isSelected:!0,selectedRows:r})})):(r=new Set,t&&c.forEach(function(e){var o=n.find(function(n){return U(n.rowId)===e});o&&t({row:o.row,isSelected:!1,selectedRows:r})})),d(r))},[n,t,c,o]),m=l(function(e){if(o){var n=s(e);p(e,!n)}},[s,p,o]),g=l(function(){if(o){if(t){var e=new Set;c.forEach(function(r){var o=n.find(function(e){return U(e.rowId)===r});o&&t({row:o.row,isSelected:!1,selectedRows:e})})}d(new Set)}},[c,n,t,o]);return{selectedRows:c,setSelectedRows:d,isRowSelected:s,areAllRowsSelected:f,selectedRowCount:v,selectedRowsData:h,handleRowSelect:p,handleSelectAll:w,handleToggleRow:m,clearSelection:g}}({tableRows:Yr,onRowSelectionChange:an,enableRowSelection:te});Nt=eo.selectedRows,Ht=eo.setSelectedRows,Et=eo.isRowSelected,Tt=eo.areAllRowsSelected,kt=eo.selectedRowCount,Pt=eo.selectedRowsData,At=eo.handleRowSelect,Dt=eo.handleSelectAll,Ft=eo.handleToggleRow,Ot=eo.clearSelection;var no=ct({rows:Wr,rowGrouping:sn,getRowId:fn,expandedRows:gr,collapsedRows:yr,expandedDepths:pr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:ur,rowHeight:Un,headerHeight:Jn,customTheme:_n}).flattenedRows,to=l(function(e){var n=jr(e);return sn&&0!==sn.length?Y({rows:n,rowGrouping:sn,getRowId:fn,expandedRows:gr,collapsedRows:yr,expandedDepths:pr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:ur,rowHeight:Un,headerHeight:Jn,customTheme:_n}):n.map(function(e,n){return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,isLastGroupRow:!1,rowId:[n],rowPath:[n],absoluteRowIndex:n}})},[jr,sn,fn,gr,yr,pr,mt,Ke,re,$,ur,Un,Jn,_n]),ro=l(function(e){var n=Jr(e);return sn&&0!==sn.length?Y({rows:n,rowGrouping:sn,getRowId:fn,expandedRows:gr,collapsedRows:yr,expandedDepths:pr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:ur,rowHeight:Un,headerHeight:Jn,customTheme:_n}):n.map(function(e,n){return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,isLastGroupRow:!1,rowId:[n],rowPath:[n],absoluteRowIndex:n}})},[Jr,sn,fn,gr,yr,pr,mt,Ke,re,$,ur,Un,Jn,_n]),oo=function(e){var n=e.height,t=e.maxHeight,r=e.rowHeight,o=e.totalRowCount,i=e.headerHeight,a=e.footerHeight;return u(function(){if(t){var e=Qn(t);if(0===e)return;var u=i||r;if(e>=u+o*r+(a||0)||20>o)return;return Math.max(0,e-u)}if(n){var l=Qn(n);if(0!==l)return Math.max(0,l-r)}},[n,t,r,o,i,a])}({height:Te,maxHeight:je,rowHeight:Un,shouldPaginate:Rn,rowsPerPage:wn,totalRowCount:null!=Dn?Dn:Zr.length,headerHeight:Hr,footerHeight:Rn&&!Pe?Xn:void 0}),io=function(e){var n=e.allowAnimations,t=e.flattenedRows,r=e.originalFlattenedRows,o=e.parentEndPositions,c=e.currentPage,d=e.rowsPerPage,s=e.shouldPaginate,f=e.serverSidePagination,v=e.contentHeight,h=e.rowHeight,p=e.scrollTop,w=e.scrollDirection,m=void 0===w?"none":w,b=e.heightOffsets,y=e.customTheme,I=e.computeFilteredRowsPreview,C=e.computeSortedRowsPreview,S=i(!1),N=S[0],H=S[1],E=i([]),T=E[0],k=E[1],P=a([]),A=a([]),D=u(function(){return M(h)},[h]),F=a(new Map),O=a(null),L=l(function(e,n){if(!s||f)return e.map(function(e,n){return x(x({},e),{position:n,absoluteRowIndex:n})});var t=(c-1)*d,r=c*d,o=0===t?0:n[t-1];return e.slice(o,r>n.length?e.length:n[r-1]).map(function(e,n){var t=e.nestedTable?e.absoluteRowIndex:s&&!f?o+n:n;return x(x({},e),{position:n,absoluteRowIndex:t})})},[c,d,f,s]);u(function(){if(0===F.current.size&&r.length>0){var e=new Map;r.forEach(function(n,t){var r=U(n.rowId);e.set(r,t)}),F.current=e}},[r]);var W=u(function(){return L(t,o)},[t,o,L]),B=u(function(){if(!b||0===b.length||!s||f)return b;var e=new Map;return W.forEach(function(n){n.nestedTable&&e.set(n.absoluteRowIndex,n.position)}),b.filter(function(n){return e.has(n[0])}).map(function(n){var t=n[1];return[e.get(n[0]),t]})},[b,W,s,f]),q=u(function(){if(B&&0!==B.length)return function(e,n,t,r){var o=n+r.rowSeparatorWidth,i=Array(e),a=new Map;t&&t.forEach(function(e){a.set(e[0],e[1])});for(var u=0,l=0;e>l;l++){i[l]=u,u+=o;var c=a.get(l);void 0!==c&&(u+=c)}return{rowTopPositions:i,totalHeight:u-r.rowSeparatorWidth}}(W.length,h,B,y)},[W.length,h,B,y]),G=u(function(){return void 0===v?W:ee({bufferRowCount:D,contentHeight:v,tableRows:W,rowHeight:h,scrollTop:p,scrollDirection:m,heightMap:q})},[W,v,h,p,m,D,q]),z=l(function(e,n){var t=new Set(e.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)})),r=new Set(n.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)}));return{staying:n.filter(function(e){var n=U(e.rowId);return t.has(n)}),entering:n.filter(function(e){var n=U(e.rowId);return!t.has(n)}),leaving:e.filter(function(e){var n=U(e.rowId);return!r.has(n)})}},[]),K=u(function(){if(0===P.current.length)return!1;var e=W.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)}),n=P.current.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)});return e.length!==n.length||!e.every(function(e,t){return e===n[t]})},[W]);g(function(){if(!N){var e=function(){T.length>0&&k([])};if(!n||s)return e(),P.current=W,void(A.current=G);if(0===P.current.length)return e(),P.current=W,void(A.current=G);if(!K)return e(),P.current=W,void(A.current=G);O.current={tableRows:W,visibleRows:G},H(!0)}},[n,W,T.length,K,N,s,G]),g(function(){if(N&&O.current&&T.length>0){var e=setTimeout(function(){var e=O.current;H(!1),k([]),P.current=e.tableRows,A.current=e.visibleRows,O.current=null},ot.ROW_REORDER.duration+100);return function(){return clearTimeout(e)}}},[N,T.length]);var j=u(function(){if(!n||s)return G;if(T.length>0){var e=new Map,t=new Map;return W.forEach(function(n){var r=U(n.rowId);e.set(r,n.position),t.set(r,n.displayPosition)}),T.map(function(n){var r=U(n.rowId),o=e.get(r),i=t.get(r);return void 0!==o&&void 0!==i?x(x({},n),{position:o,displayPosition:i}):n})}return G},[G,T,W,n,s]),V=l(function(e){if(n&&!s&&void 0!==v){var t=I(e),r=L(t,[]),o=ee({bufferRowCount:D,contentHeight:v,tableRows:r,rowHeight:h,scrollTop:p,scrollDirection:m,heightMap:q}),i=z(G,o).entering.map(function(e){var n=U(e.rowId)+"";return W.find(function(e){return U(e.rowId)+""===n})||e}).filter(Boolean);i.length>0&&k(R(R([],G,!0),i,!0))}},[n,s,I,L,v,h,p,m,z,W,G,D,q]),_=l(function(e){if(n&&!s&&void 0!==v){var t=C(e),r=L(t,[]),o=ee({bufferRowCount:D,contentHeight:v,tableRows:r,rowHeight:h,scrollTop:p,scrollDirection:m,heightMap:q}),i=z(G,o).entering.map(function(e){var n=U(e.rowId)+"";return W.find(function(e){return U(e.rowId)+""===n})||e}).filter(Boolean);i.length>0&&k(R(R([],G,!0),i,!0))}},[n,s,C,L,v,h,p,m,z,W,G,D,q]);return{currentTableRows:W,currentVisibleRows:G,isAnimating:N,prepareForFilterChange:V,prepareForSortChange:_,rowsToRender:j,paginatedHeightOffsets:B}}({allowAnimations:c,flattenedRows:Yr,originalFlattenedRows:no,paginatableRows:Zr,parentEndPositions:Qr,currentPage:Kt,rowsPerPage:wn,shouldPaginate:Rn,serverSidePagination:In,contentHeight:oo,rowHeight:Un,scrollTop:cr,scrollDirection:fr,heightOffsets:$r,customTheme:_n,computeFilteredRowsPreview:to,computeSortedRowsPreview:ro}),ao=io.currentTableRows,uo=io.rowsToRender,lo=io.prepareForFilterChange,co=io.prepareForSortChange,so=io.isAnimating,fo=io.paginatedHeightOffsets,vo=a(new Map),ho=a(new Map),po=function(e){var n=e.selectableCells,t=e.headers,r=e.tableRows,c=e.onCellEdit,d=e.cellRegistry,s=e.collapsedHeaders,f=e.rowHeight,v=e.enableRowSelection,h=void 0!==v&&v,p=e.copyHeadersToClipboard,w=void 0!==p&&p,m=e.customTheme,g=i(new Set),b=g[0],x=g[1],y=i(new Set),R=y[0],S=y[1],M=i(null),N=M[0],H=M[1],E=i(null),T=E[0],k=E[1],P=i(new Set),A=P[0],D=P[1],F=i(new Set),L=F[0],W=F[1],B=i(!1),q=B[0],G=B[1],z=a(!1),V=a(null),_=u(function(){var e=new Set;return b.forEach(function(n){var t=n.split("-");if(t.length>=2){var r=parseInt(t[1],10);isNaN(r)||e.add(r)}}),R.forEach(function(n){e.add(n)}),e},[b,R]),J=u(function(){var e=new Set;return b.forEach(function(n){var t=n.split("-");if(t.length>=3){var r=t.slice(2).join("-");e.add(r)}}),R.size>0&&r.forEach(function(n){var t=U(n.rowId);e.add(t)}),e},[b,R,r]),X=u(function(){return t.flatMap(function(e){return O(e,s)})},[t,s]),Y=l(function(){if(0!==b.size){var e=function(e,n,t,r){void 0===r&&(r=!1);var o=n.filter(function(e){return!e.hide&&!e.excludeFromRender}),i=new Map,a=new Map;o.forEach(function(e,n){i.set(n,e.accessor),a.set(n,e)});var u=Array.from(e).reduce(function(e,n){var r,o=n.split("-").map(Number),u=o[0],l=o[1];e[u]||(e[u]=[]);var c=i.get(l),d=a.get(l);if(c&&(null===(r=t[u])||void 0===r?void 0:r.row)){var s=t[u].row,f=K(s,c);if(!1!==(null==d?void 0:d.useFormattedValueForClipboard)&&(null==d?void 0:d.valueFormatter)){var v=d.valueFormatter({accessor:c,colIndex:l,row:s,rowIndex:u,value:f});e[u][l]=v}else e[u][l]=!d||"lineAreaChart"!==d.type&&"barChart"!==d.type?f:Array.isArray(f)?f.join(", "):""}else e[u][l]="";return e},{}),l=new Set;r&&Array.from(e).forEach(function(e){var n=e.split("-").map(Number);l.add(n[1])});var c="";r&&l.size>0&&(c=Array.from(l).sort(function(e,n){return e-n}).map(function(e){var n,t=a.get(e);return null!==(n=null==t?void 0:t.label)&&void 0!==n?n:""}).join("\t"));var d=Object.values(u).map(function(e){return Object.values(e).join("\t")}).join("\n");return r&&c?"".concat(c,"\n").concat(d):d}(b,X,r,w);navigator.clipboard.writeText(e),D(new Set(b)),setTimeout(function(){return D(new Set)},800)}},[b,X,r,w]),$=l(function(){return I(void 0,void 0,void 0,function(){var e,n,t,o,i;return C(this,function(a){switch(a.label){case 0:if(!T)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=a.sent())?(n=function(e,n,t,r,o,i){var a=new Set,u=new Set,l=e.split("\n").filter(function(e){return e.length>0});if(0===l.length)return{updatedCells:a,warningCells:u};var c=t.filter(function(e){return!e.hide&&!e.excludeFromRender}),d=n.rowIndex,s=n.colIndex;return l.forEach(function(e,n){e.split("\t").forEach(function(e,t){var l=d+n,f=s+t;if(r.length>l&&c.length>f){var v=r[l],h=c[f],p=U(v.rowId);if(null==h?void 0:h.isEditable){var w=e;if("number"===h.type){var m=+e;isNaN(m)||(w=m)}else if("boolean"===h.type)w="true"===e.toLowerCase()||"1"===e;else if("date"===h.type){var g=new Date(e);isNaN(g.getTime())||(w=g)}else"lineAreaChart"!==h.type&&"barChart"!==h.type||(w=e.split(",").map(function(e){var n=+e.trim();return isNaN(n)?0:n}));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 I="".concat(l,"-").concat(f,"-").concat(p);u.add(I)}}})}),{updatedCells:a,warningCells:u}}(e,T,X,r,c,d),o=n.warningCells,(t=n.updatedCells).size>0&&(D(t),setTimeout(function(){return D(new Set)},800)),o.size>0&&(W(o),setTimeout(function(){return W(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]}})})},[T,X,r,c,d]),Z=l(function(){if(0!==b.size){var e=function(e,n,t,r,o){var i=new Set,a=new Set,u=n.filter(function(e){return!e.hide&&!e.excludeFromRender}),l=new Map;return u.forEach(function(e,n){l.set(n,e.accessor)}),Array.from(e).forEach(function(e){var n=e.split("-").map(Number),l=n[0],c=n[1];if(t.length>l&&u.length>c){var d=t[l],s=u[c],f=U(d.rowId);if(null==s?void 0:s.isEditable){var v;if(v="string"===s.type?"":"number"===s.type?null:"boolean"!==s.type&&("date"===s.type?null:"lineAreaChart"===s.type||"barChart"===s.type||Array.isArray(K(d.row,s.accessor))?[]:""),j(d.row,s.accessor,v),o){var h="".concat(f,"-").concat(s.accessor),p=o.get(h);p&&p.updateContent(v)}null==r||r({accessor:s.accessor,newValue:v,row:d.row,rowIndex:l}),i.add(e)}else a.add(e)}}),{deletedCells:i,warningCells:a}}(b,X,r,c,d),n=e.deletedCells,t=e.warningCells;n.size>0&&(D(n),setTimeout(function(){return D(new Set)},800)),t.size>0&&(W(t),setTimeout(function(){return W(new Set)},800))}},[b,X,r,c,d]),Q=l(function(e,n){for(var t=new Set,o=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),u=Math.max(e.colIndex,n.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 d=U(r[l].rowId);t.add(ie({colIndex:c,rowIndex:l,rowId:d}))}S(new Set),H(null),x(t),k(n),setTimeout(function(){return oe(n,f,m)},0)},[r,f,h,m]),ee=l(function(e){if(e.rowIndex>=0&&r.length>e.rowIndex&&e.colIndex>=0&&(h?X.length:X.length-1)>=e.colIndex){var n=ie(e);S(new Set),H(null),x(new Set([n])),k(e),setTimeout(function(){return oe(e,f,m)},0)}},[X.length,r.length,f,h,m]),ne=l(function(e,n){void 0===n&&(n=!1),x(new Set),k(null),S(function(t){var r=new Set(n?t:[]);return e.forEach(function(e){return r.add(e)}),r}),e.length>0&&H(e[e.length-1])},[]);!function(e){var n=e.copyToClipboard,t=e.deleteSelectedCells,r=e.enableRowSelection,i=void 0!==r&&r,a=e.initialFocusedCell,u=e.leafHeaders,l=e.pasteFromClipboard,c=e.selectCellRange,d=e.selectSingleCell,s=e.selectableCells,f=e.selectedCells,v=e.setLastSelectedColumnIndex,h=e.setSelectedCells,p=e.setSelectedColumns,w=e.startCell,m=e.tableRows;o(function(){var e=function(e){if(s&&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 d=a.rowIndex,R=a.colIndex,S=a.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void l();if((e.ctrlKey||e.metaKey)&&"a"===e.key){e.preventDefault();for(var M=new Set,N=0;m.length>N;N++)for(var H=0;u.length>H;H++){var E=i?H+1:H,T=U(m[N].rowId);M.add("".concat(N,"-").concat(E,"-").concat(T))}return h(M),p(new Set),void v(null)}if("Delete"===e.key||"Backspace"===e.key)return e.preventDefault(),void t();var k=m[d];if((k?U(k.rowId):null)!==S){var P=m.findIndex(function(e){return U(e.rowId)===S});if(-1===P)return;d=P}var A=function(e,n,t){var r=e,o=n;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"===e.key?(e.preventDefault(),r(e,d,R,A)):"ArrowDown"===e.key?(e.preventDefault(),o(e,d,R,A)):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),g(e,d,R,A)):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),b(e,d,R,A)):"Home"===e.key?(e.preventDefault(),x(e,d)):"End"===e.key?(e.preventDefault(),y(e,d)):"PageUp"===e.key?(e.preventDefault(),I(e,d,R)):"PageDown"===e.key?(e.preventDefault(),C(e,d,R)):"Escape"===e.key&&(h(new Set),p(new Set),v(null),w.current=null)}else n()}}},r=function(e,n,t,r){if(e.shiftKey){w.current||(w.current=a);var o=n-1;if((e.ctrlKey||e.metaKey)&&(o=r(n,t,"up").rowIndex),o>=0){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else n>0&&(o=n-1,(e.ctrlKey||e.metaKey)&&(o=r(n,t,"up").rowIndex),i=U(m[o].rowId),d({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},o=function(e,n,t,r){if(e.shiftKey){w.current||(w.current=a);var o=n+1;if((e.ctrlKey||e.metaKey)&&(o=r(n,t,"down").rowIndex),m.length>o){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else m.length-1>n&&(o=n+1,(e.ctrlKey||e.metaKey)&&(o=r(n,t,"down").rowIndex),i=U(m[o].rowId),d({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},g=function(e,n,t,r){if(e.shiftKey&&"ArrowLeft"===e.key){w.current||(w.current=a);var o=t-1;if(e.ctrlKey||e.metaKey)o=r(n,t,"left").colIndex;else if(i&&0===o)return;if(o>=0){var u=U(m[n].rowId);c(w.current,{rowIndex:n,colIndex:o,rowId:u})}}else if(t>0){if(o=t-1,(e.ctrlKey||e.metaKey)&&"ArrowLeft"===e.key)o=r(n,t,"left").colIndex;else if(i&&0===o)return;0>o||(u=U(m[n].rowId),d({rowIndex:n,colIndex:o,rowId:u}),w.current=null)}},b=function(e,n,t,r){var o=i?u.length:u.length-1;if(e.shiftKey&&"ArrowRight"===e.key){w.current||(w.current=a);var l=t+1;if((e.ctrlKey||e.metaKey)&&(l=r(n,t,"right").colIndex),o>=l){var s=U(m[n].rowId);c(w.current,{rowIndex:n,colIndex:l,rowId:s})}}else o>t&&(l=t+1,(e.ctrlKey||e.metaKey)&&"ArrowRight"===e.key&&(l=r(n,t,"right").colIndex),l>o||(s=U(m[n].rowId),d({rowIndex:n,colIndex:l,rowId:s}),w.current=null))},x=function(e,n,t){if(e.shiftKey){w.current||(w.current=a);var r=n,o=i?1:0;(e.ctrlKey||e.metaKey)&&(r=0);var u=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:u})}else r=n,o=i?1:0,(e.ctrlKey||e.metaKey)&&(r=0),u=U(m[r].rowId),d({rowIndex:r,colIndex:o,rowId:u}),w.current=null},y=function(e,n,t){if(e.shiftKey){w.current||(w.current=a);var r=n,o=i?u.length:u.length-1;(e.ctrlKey||e.metaKey)&&(r=m.length-1);var l=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:l})}else r=n,o=i?u.length:u.length-1,(e.ctrlKey||e.metaKey)&&(r=m.length-1),l=U(m[r].rowId),d({rowIndex:r,colIndex:o,rowId:l}),w.current=null},I=function(e,n,t){var r=Math.max(0,n-10);if(e.shiftKey){w.current||(w.current=a);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),d({rowIndex:r,colIndex:t,rowId:o}),w.current=null},C=function(e,n,t){var r=Math.min(m.length-1,n+10);if(e.shiftKey){w.current||(w.current=a);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),d({rowIndex:r,colIndex:t,rowId:o}),w.current=null};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[s,a,m,u,d,c,f,h,p,v,n,l,t,w,i])}({selectableCells:n,initialFocusedCell:T,tableRows:r,leafHeaders:X,selectSingleCell:ee,selectCellRange:Q,selectedCells:b,setSelectedCells:x,setSelectedColumns:S,setLastSelectedColumnIndex:H,copyToClipboard:Y,pasteFromClipboard:$,deleteSelectedCells:Z,startCell:V,enableRowSelection:h});var te=l(function(e,n){var t=new Set,o=new Map;r.forEach(function(e,n){var t=U(e.rowId);o.set(t,n)});for(var i=o.get(e.rowId+""),a=o.get(n.rowId+""),u=void 0!==i?i:e.rowIndex,l=void 0!==a?a:n.rowIndex,c=Math.min(u,l),d=Math.max(u,l),s=Math.min(e.colIndex,n.colIndex),f=Math.max(e.colIndex,n.colIndex),v=c;d>=v;v++)for(var p=s;f>=p;p++)if(v>=0&&r.length>v){if(h&&0===p)continue;var w=U(r[v].rowId);t.add(ie({colIndex:p,rowIndex:v,rowId:w}))}x(t)},[r,h]),re=l(function(e,n){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,e)),a=Math.max(r.top,Math.min(r.bottom,n)),u=null,l=1/0;if(o.forEach(function(e){if(e instanceof HTMLElement){var n=e,t=n.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=n)}}),null!==u){var c=u,d=parseInt(c.getAttribute("data-row-index")||"-1",10),s=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(d>=0&&s>=0&&null!==f)return{rowIndex:d,colIndex:s,rowId:f}}return null},[]),ae=l(function(e,n){var t=document.elementFromPoint(e,n);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 re(e,n)},[re]),ue=l(function(e,n){var t=document.querySelector(".st-body-container");if(t){var r=t.getBoundingClientRect();r.top+50>n?t.scrollTop-=10*Math.min(3,1+Math.max(0,r.top-n)/100):n>r.bottom-50&&(t.scrollTop+=10*Math.min(3,1+Math.max(0,n-r.bottom)/100));var o=document.querySelector(".st-body-main");o&&(r.left+50>e?o.scrollLeft-=10*Math.min(3,1+Math.max(0,r.left-e)/100):e>r.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,e-r.right)/100)))}},[]),le=l(function(e){var n=e.colIndex,t=ie({colIndex:n,rowIndex:e.rowIndex,rowId:e.rowId}),r=b.has(t),o=R.has(n);return r||o},[b,R]),ce=l(function(e){var n=e.colIndex,t=e.rowIndex,o=e.rowId;if(q)return"";var i=[],a=r[t-1],u=a?U(a.rowId):null,l=r[t+1],c=l?U(l.rowId):null,d=null!==u?{colIndex:n,rowIndex:t-1,rowId:u}:null,s=null!==c?{colIndex:n,rowIndex:t+1,rowId:c}:null,f={colIndex:n-1,rowIndex:t,rowId:o},v={colIndex:n+1,rowIndex:t,rowId:o};return(!d||!le(d)||R.has(n)&&0===t)&&i.push("st-selected-top-border"),(!s||!le(s)||R.has(n)&&t===r.length-1)&&i.push("st-selected-bottom-border"),le(f)||i.push("st-selected-left-border"),le(v)||i.push("st-selected-right-border"),i.join(" ")},[q,le,r,R]),de=u(function(){return T?function(e){return e.rowIndex===T.rowIndex&&e.colIndex===T.colIndex&&e.rowId===T.rowId}:function(){return!1}},[T]),se=l(function(e){var n=ie({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return A.has(n)},[A]),fe=l(function(e){var n=ie({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return L.has(n)},[L]);return{getBorderClass:ce,handleMouseDown:function(e){var t=e.colIndex,r=e.rowIndex,o=e.rowId;if(n){z.current=!0,G(!0),V.current={rowIndex:r,colIndex:t,rowId:o},setTimeout(function(){S(new Set),H(null);var e=ie({colIndex:t,rowIndex:r,rowId:o});x(new Set([e])),k({rowIndex:r,colIndex:t,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(z.current&&V.current){if(null!==i&&null!==a){ue(i,a);var e=Date.now();if(e-l>=16){var n=ae(i,a);n&&te(V.current,n),l=e}}u=requestAnimationFrame(c)}else null!==u&&(cancelAnimationFrame(u),u=null)},d=function(e){z.current&&V.current&&(i=e.clientX,a=e.clientY)},s=function(){z.current=!1,G(!1),null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",s),u=requestAnimationFrame(c)}},handleMouseOver:function(e){n&&z.current&&V.current&&te(V.current,{colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId})},isCopyFlashing:se,isWarningFlashing:fe,isInitialFocusedCell:de,isSelected:le,lastSelectedColumnIndex:N,pasteFromClipboard:$,selectColumns:ne,selectedCells:b,selectedColumns:R,setInitialFocusedCell:k,setSelectedCells:x,setSelectedColumns:S,deleteSelectedCells:Z,columnsWithSelectedCells:_,rowsWithSelectedCells:J,startCell:V}}({selectableCells:gn,headers:_t,tableRows:ao,onCellEdit:Je,cellRegistry:vo.current,collapsedHeaders:ir,rowHeight:Un,enableRowSelection:te,copyHeadersToClipboard:W,customTheme:_n}),wo=po.getBorderClass,mo=po.handleMouseDown,go=po.handleMouseOver,bo=po.isCopyFlashing,xo=po.isInitialFocusedCell,yo=po.isSelected,Io=po.isWarningFlashing,Co=po.selectColumns,Ro=po.selectedCells,So=po.selectedColumns,Mo=po.setInitialFocusedCell,No=po.setSelectedCells,Ho=po.setSelectedColumns,Eo=po.columnsWithSelectedCells,To=po.rowsWithSelectedCells,ko=po.startCell,Po=l(function(e){co(e),setTimeout(function(){Ur({accessor:e})},0)},[co,Ur]),Ao=l(function(e){Ut(e)},[]);!function(e){var n=e.selectableColumns,t=e.selectedCells,r=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns,u=e.activeHeaderDropdown,l=e.setActiveHeaderDropdown,c=e.startCell;o(function(){var e=function(e){var o=e.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")||n&&(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",e),function(){document.removeEventListener("mousedown",e)}},[n,t,r,i,a,u,l,c])}({selectableColumns:xn,selectedCells:Ro,selectedColumns:So,setSelectedCells:No,setSelectedColumns:Ho,activeHeaderDropdown:nr,setActiveHeaderDropdown:tr,startCell:ko}),function(e){var n=e.forceUpdate,t=e.tableBodyContainerRef,r=e.setScrollbarWidth;g(function(){var e=function(){n(),t.current&&r(t.current.offsetWidth-t.current.clientWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n,t,r])}({forceUpdate:pt,tableBodyContainerRef:vt,setScrollbarWidth:Bt}),function(e){var n=e.onGridReady;o(function(){null==n||n()},[n])}({onGridReady:Qe}),function(e){var n=e.cellRegistryRef,t=e.clearAllFilters,r=e.clearFilter,i=e.currentPage,a=e.expandedDepths,u=e.filters,l=e.flattenedRows,c=e.headerRegistryRef,d=e.headers,s=e.includeHeadersInCSVExport,f=e.onPageChange,v=e.paginatableRows,h=e.rowGrouping,p=e.rows,w=e.rowsPerPage,m=e.setCollapsedRows,g=e.setCurrentPage,b=e.setExpandedDepths,x=e.setExpandedRows,y=e.sort,S=e.tableRef,M=e.totalRowCount,N=e.updateFilter,H=e.updateSort,E=e.visibleRows;o(function(){S&&(S.current={updateData:function(e){var t=e.accessor,r=e.rowIndex,o=e.newValue,i=null==p?void 0:p[r];if(i){var a=U([r]),u=F({rowId:a,accessor:t}),l=n.current.get(u);l&&l.updateContent(o),void 0!==K(i,t)&&j(i,t,o)}},setHeaderRename:function(e){var n=c.current.get(e.accessor+"");n&&n.setEditing(!0)},getVisibleRows:function(){return E},getAllRows:function(){return l},getHeaders:function(){return d},exportToCSV:function(e){!function(e,n,t,r){void 0===r&&(r=!0);var o=function(e,n,t){void 0===t&&(t=!0);var r=function(e){var n=[],t=function(e){for(var r=0,o=e;o.length>r;r++){var i=o[r];i.hide||i.isSelectionColumn||i.excludeFromCsv||(i.children&&i.children.length>0?(i.singleRowChildren&&n.push(i),t(i.children)):n.push(i))}};return t(e),n}(n),o=r.map(function(e){return nt(e.label)}).join(","),i=e.map(function(e,n){var t=e.row;return r.map(function(e,r){var o=K(t,e.accessor);if(e.exportValueGetter){var i=e.valueFormatter?e.valueFormatter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o}):void 0,a=e.exportValueGetter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o,formattedValue:i});return nt(a)}return!1!==e.useFormattedValueForCSV&&e.valueFormatter?(i=e.valueFormatter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o}),nt(i)):nt(o)}).join(",")});return(t?R([o],i,!0):i).join("\n")}(e,n,r);!function(e,n){void 0===n&&(n="table-export.csv");var t=new Blob([e],{type:"text/csv;charset=utf-8;"}),r=document.createElement("a"),o=URL.createObjectURL(t);r.setAttribute("href",o),r.setAttribute("download",n),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(o)}(o,t)}(l,d,(void 0===e?{}:e).filename,s)},getSortState:function(){return y},applySortState:tt(H),getFilterState:function(){return u},applyFilter:tt(N),clearFilter:tt(r),clearAllFilters:tt(t),getCurrentPage:function(){return i},getTotalPages:function(){return Math.ceil((null!=M?M:v.length)/w)},setPage:function(e){return I(void 0,void 0,void 0,function(){var n;return C(this,function(t){switch(t.label){case 0:return n=Math.ceil((null!=M?M:v.length)/w),1>e||e>n?[3,2]:(g(e),f?[4,f(e)]:[3,2]);case 1:t.sent(),t.label=2;case 2:return[2]}})})},expandAll:function(){var e=Array.from({length:(null==h?void 0:h.length)||0},function(e,n){return n});b(new Set(e)),x(new Map),m(new Map)},collapseAll:function(){b(new Set),x(new Map),m(new Map)},expandDepth:function(e){b(function(n){for(var t=new Set(n),r=0;e>=r;r++)t.add(r);return t}),x(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t}),m(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t})},collapseDepth:function(e){b(function(n){var t=new Set(n);return t.delete(e),t}),x(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t}),m(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t})},toggleDepth:function(e){b(function(n){var t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}),x(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t}),m(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t})},setExpandedDepths:function(e){b(e)},getExpandedDepths:function(){return a},getGroupingProperty:function(e){return null==h?void 0:h[e]},getGroupingDepth:function(e){var n;return null!==(n=null==h?void 0:h.indexOf(e))&&void 0!==n?n:-1}})},[n,t,r,i,a,u,l,c,d,s,f,v,h,e.rowIndexMap,p,w,e.serverSidePagination,m,g,b,x,e.setRows,e.shouldPaginate,y,S,M,N,H,E])}({cellRegistryRef:vo,clearAllFilters:Kr,clearFilter:zr,currentPage:Kt,expandedDepths:pr,filters:qr,flattenedRows:Yr,headerRegistryRef:ho,headers:ur,includeHeadersInCSVExport:Oe,onPageChange:rn,paginatableRows:Zr,rowGrouping:sn,rowIndexMap:Mt,rows:Gt,rowsPerPage:wn,serverSidePagination:In,setCollapsedRows:Ir,setCurrentPage:jt,setExpandedDepths:wr,setExpandedRows:br,setRows:yt,shouldPaginate:Rn,sort:_r,tableRef:kn,totalRowCount:Dn,updateFilter:Gr,updateSort:Ur,visibleRows:uo}),function(e){var n=e.filters,t=e.onFilterChange;o(function(){null==t||t(n)},[n,t])}({filters:qr,onFilterChange:Ze}),function(e){var n=e.sort,t=e.onSortChange,r=ze(n);o(function(){!n||(null==r?void 0:r.key.accessor)===n.key.accessor&&(null==r?void 0:r.direction)===n.direction?!n&&r&&(null==t||t(null)):null==t||t(n)},[n,r,t])}({sort:_r,onSortChange:un});var Do=l(function(e){lo(e),setTimeout(function(){Gr(e)},0)},[lo,Gr]),Fo=!Ct&&0===ao.length;return e(ue,x({value:{activeHeaderDropdown:nr,allowAnimations:c,areAllRowsSelected:Tt,autoExpandColumns:s,canExpandRowGroup:f,cellRegistry:vo.current,cellUpdateFlash:h,clearSelection:Ot,collapsedHeaders:ir,columnBorders:m,columnReordering:P,columnResizing:D,columnsWithSelectedCells:Eo,copyHeadersToClipboard:W,draggedHeaderRef:it,editColumns:z,emptyStateRenderer:$,enableHeaderEditing:Q,enableRowSelection:te,errorStateRenderer:re,expandedDepths:pr,expandIcon:ve,filterIcon:Ce,filters:qr,forceUpdate:pt,getBorderClass:wo,handleApplyFilter:Do,handleClearAllFilters:Kr,handleClearFilter:zr,handleMouseDown:mo,handleMouseOver:go,handleRowSelect:At,handleSelectAll:Dt,handleToggleRow:Ft,headerCollapseIcon:Me,headerContainerRef:ht,headerDropdown:Ne,headerExpandIcon:Ee,headerHeight:Jn,headerRegistry:ho.current,headers:ur,heightOffsets:fo,hoveredHeaderRef:at,includeHeadersInCSVExport:Oe,isAnimating:so,isCopyFlashing:bo,isInitialFocusedCell:xo,isLoading:Ct,isResizing:Xt,isRowSelected:Et,isScrolling:Zt,isSelected:yo,isWarningFlashing:Io,loadingStateRenderer:Ke,mainBodyRef:ut,maxHeaderDepth:Er,nextIcon:_e,onCellClick:Ue,onCellEdit:Je,onColumnOrderChange:Xe,onColumnSelect:Ye,onColumnVisibilityChange:$e,onHeaderEdit:en,onLoadMore:nn,onRowGroupExpand:on,onSort:Po,onTableHeaderDragEnd:Ao,pinnedLeftRef:lt,pinnedRightRef:ft,prevIcon:cn,rowButtons:dn,rowGrouping:sn,rowHeight:Un,rowStateMap:mt,rows:xt,rowsWithSelectedCells:To,scrollbarWidth:Wt,selectColumns:Co,selectableColumns:xn,selectedColumns:So,selectedRowCount:kt,selectedRows:Nt,selectedRowsData:Pt,setActiveHeaderDropdown:tr,setCollapsedHeaders:ar,setHeaders:Ut,setInitialFocusedCell:Mo,setIsResizing:Yt,setIsScrolling:Qt,setRowStateMap:gt,setSelectedCells:No,setSelectedColumns:Ho,setSelectedRows:Ht,setExpandedDepths:wr,setExpandedRows:br,setCollapsedRows:Ir,shouldPaginate:Rn,sortDownIcon:Mn,sortUpIcon:Hn,tableBodyContainerRef:vt,tableEmptyStateRenderer:Tn,tableRows:ao,theme:An,customTheme:_n,expandedRows:gr,collapsedRows:yr,useHoverRowBackground:On,useOddColumnBackground:Wn,useOddEvenRowBackground:Vn}},{children:t("div",x({className:"simple-table-root st-wrapper theme-".concat(An," ").concat(null!=p?p:""," ").concat(m?"st-column-borders":""),style:je?{maxHeight:je,height:void 0===oo?"auto":je}:Te?{height:Te}:{}},{children:[e($n,{children:t("div",x({className:"st-wrapper-container"},{children:[t("div",x({className:"st-content-wrapper"},{children:[e(Bn,{hideHeader:De,pinnedLeftWidth:Dr,pinnedRightWidth:Fr,setScrollTop:dr,setScrollDirection:vr,shouldShowEmptyState:Fo,sort:_r,tableRows:ao,rowsToRender:uo}),e(Yn,{columnEditorText:E,editColumns:z,editColumnsInitOpen:X,headers:_t,position:S})]})),!Fo&&e(qn,{mainBodyRef:ut,mainBodyWidth:Ar,pinnedLeftWidth:Dr,pinnedRightWidth:Fr,pinnedLeftContentWidth:Or,pinnedRightContentWidth:Lr,tableBodyContainerRef:vt}),!Fo&&e(ce,{currentPage:Kt,footerRenderer:Re,hideFooter:Pe,onPageChange:jt,onNextPage:tn,onUserPageChange:rn,rowsPerPage:wn,shouldPaginate:Rn,totalPages:Math.ceil((null!=Dn?Dn:Zr.length)/wn),totalRows:null!=Dn?Dn:Zr.length})]}))}),e("div",x({"aria-live":"polite","aria-atomic":"true",className:"st-sr-only"},{children:Rr}))]}))}))},ht=function(n){var r=n.data,o=n.width,i=void 0===o?"100%":o,a=n.height,u=void 0===a?30:a,l=n.color,c=n.fillColor,d=n.fillOpacity,s=void 0===d?.2:d,f=n.strokeWidth,v=void 0===f?2:f,h=n.className,p=void 0===h?"":h,w=n.min,m=n.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,I=r.map(function(e,n){return{x:n/(r.length-1)*100,y:y-(e-g)/b*y}}).map(function(e,n){return"".concat(0===n?"M":"L"," ").concat(e.x,",").concat(e.y)}).join(" "),C="\n ".concat(I,"\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:[e("path",{d:C,fill:c||"var(--st-chart-fill-color)",fillOpacity:s,stroke:"none",vectorEffect:"non-scaling-stroke"}),e("path",{d:I,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}))},pt=Object.freeze({__proto__:null,default:ht}),wt=function(n){var t=n.data,r=n.width,o=void 0===r?"100%":r,i=n.height,a=void 0===i?30:i,u=n.color,l=n.gap,c=void 0===l?2:l,d=n.className,s=void 0===d?"":d,f=n.min,v=n.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 e("svg",x({width:o,height:a,viewBox:"0 0 100 ".concat(m),preserveAspectRatio:"none",className:"st-bar-chart ".concat(s),style:{display:"block"}},{children:t.map(function(n,t){var r=t*(g+c),o=(n-h)/w*m,i=m-o,a=o;return b&&(0>n?(a=Math.abs(n)/w*m,i=y):i=y-(a=n/w*m)),e("rect",{x:r,y:i,width:g,height:a,fill:u||"var(--st-chart-color)",rx:1},t)})}))},mt=Object.freeze({__proto__:null,default:wt});export{ot as A,wt as B,pe as C,dt as D,me as F,ht as L,S as R,ft as S,y as _,ze as a,x as b,M as c,lt as d,st as e,ut as f,de as g,se as h,fe as i,ve as j,he as k,we as l,ge as m,U as r,le as u};
2
- //# sourceMappingURL=index-33c4178f.js.map
1
+ import{jsx as e,Fragment as n,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 d,lazy as s,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(e){for(var n,t=1,r=arguments.length;r>t;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},x.apply(this,arguments)};function y(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>n.indexOf(r)&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);r.length>o;o++)0>n.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function I(e,n,t,r){return new(t||(t=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function u(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,u)}l((r=r.apply(e,n||[])).next())})}function C(e,n){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=n.call(e,i)}catch(e){u=[6,e],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(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;i>o;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var S=1,M=function(e){return Math.ceil(800/(e+1))},N=30,E=function(e){return 480>e?.3:768>e?.4:.8},H="parentExpanded",T=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;a.length>i;i++)o=r(a[i],o);return o};return r(e,n),t},k=function(e){return e.flatMap(function(e){var n=[e];return e.children&&e.children.length>0&&n.push.apply(n,k(e.children)),n})},P=function(e){return void 0===e&&(e=0),e?e+1:0},A=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},D=function(e){var n=e.header,t=e.pinned,r=e.headers,o=e.collapsedHeaders;return n.hide||n.excludeFromRender||(t||n.pinned)&&n.pinned!==t?null:!(r&&o&&function(e,n,t){var r=function(e,n){for(var t=0,r=k(e);r.length>t;t++){var o=r[t];if(o.children&&o.children.length>0&&o.children.some(function(e){return e.accessor===n}))return o}return null}(n,e.accessor);if(r){var o=t.has(r.accessor),i=e.showWhen||H;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(n,r,o))||null},F=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},O=function(e,n){return e.hide?[]:e.children&&0!==e.children.length?n&&n.has(e.accessor)?e.children.filter(function(e){var n=e.showWhen||H;return"parentCollapsed"===n||"always"===n}).flatMap(function(e){return O(e,n)}):e.children.filter(function(e){var n=e.showWhen||H;return"parentExpanded"===n||"always"===n}).flatMap(function(e){return O(e,n)}):[e]},L=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(A({accessor:e.accessor,rowId:"header"}));return(null==n?void 0:n.offsetWidth)||150},W=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(A({accessor:e.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.length>0&&e.children.forEach(function(e){W(e)})},B=function(e){return"number"==typeof e.minWidth?e.minWidth:40},q=function(e,n){var t=[];return e.forEach(function(e){e.hide||t.push.apply(t,O(e,n))}),t},G=function(e){var n=e.customTheme;return Math.min(e.headerHeight+n.rowSeparatorWidth+e.childRowCount*(e.rowHeight+n.rowSeparatorWidth)+n.nestedGridPaddingTop+n.nestedGridPaddingBottom+n.nestedGridBorderWidth,n.nestedGridMaxHeight+n.nestedGridPaddingTop+n.nestedGridPaddingBottom+n.nestedGridBorderWidth)},z=function(e){var n=e.match(/^(.+?)\[(\d+)\]$/);return n?{key:n[1],index:parseInt(n[2],10)}:{key:e,index:null}},K=function(e,n){var t=n+"";return t.includes(".")||t.includes("[")?t.split(".").reduce(function(e,n){if(null!=e){var t=z(n),r=t.index,o=e[t.key];return null!==r&&Array.isArray(o)&&(o=o[r]),o}},e):e[n]},j=function(e,n,t){var r=n+"";if(r.includes(".")||r.includes("[")){for(var o=r.split("."),i=e,a=0;o.length-1>a;a++){var u=z(o[a]),l=u.key,c=u.index;if(null==i[l]){var d=z(o[a+1]);i[l]=null!==d.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 s=z(o[o.length-1]),f=s.key,v=s.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 e[n]=t},V=function(e){return Array.isArray(e)&&e.length>0&&"object"==typeof e[0]&&null!==e[0]},_=function(e){var n=e.getRowId,t=R([],e.rowPath,!0);if(n){var r=n({row:e.row,depth:e.depth,index:e.index,rowPath:e.rowPath,rowIndexPath:e.rowIndexPath,groupingKey:e.groupingKey});t.push(r)}return t},U=function(e){return e.join("-")},J=function(e,n){var t=e[n];return V(t)?t:[]},X=function(e,n,t,r,o){var i=e+"",a=r.has(i)&&r.get(i)===n,u=o.has(i)&&o.get(i)===n;return t.has(n)?!u:a},Y=function(e){var n=e.depth,t=e.expandedDepths,r=e.expandedRows,o=e.collapsedRows,i=e.rowGrouping,a=void 0===i?[]:i,u=e.getRowId,l=e.displayPositionOffset,c=void 0===l?0:l,d=e.rowStateMap,s=e.hasLoadingRenderer,f=void 0!==s&&s,v=e.hasErrorRenderer,h=void 0!==v&&v,p=e.hasEmptyRenderer,w=void 0!==p&&p,m=e.headers,g=void 0===m?[]:m,b=e.rowHeight,x=e.headerHeight,y=e.customTheme,I=[],C=function(e,n,i,l,s,v){void 0===i&&(i=0),void 0===l&&(l=c),void 0===s&&(s=[]),void 0===v&&(v=[]);var p=i,m=l;return e.forEach(function(i,l){var c,S,M=a[n],N=R(R([],s,!0),[l],!1),E=R(R([],v,!0),[l],!1),H=_({row:i,getRowId:u,depth:n,index:l,rowPath:N,rowIndexPath:E,groupingKey:M});I.push({row:i,depth:n,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:0===n&&l===e.length-1,rowId:H,rowPath:N,rowIndexPath:E,absoluteRowIndex:p}),p++,m++;var T=U(H);if(X(T,n,t,r,o)&&a.length>n){var k=null==d?void 0:d.get(T),P=J(i,M),A=g.find(function(e){return e.expandable&&e.nestedTable});if((null==A?void 0:A.nestedTable)&&P.length>0){var D=(null===(c=A.nestedTable.customTheme)||void 0===c?void 0:c.rowHeight)||b,F=(null===(S=A.nestedTable.customTheme)||void 0===S?void 0:S.headerHeight)||x,O=G({childRowCount:P.length,rowHeight:D,headerHeight:F,customTheme:y}),L=R(R([],N,!0),[M],!1);I.push({row:{},depth:n+1,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:!1,rowId:L,rowPath:L,rowIndexPath:E,nestedTable:{parentRow:i,expandableHeader:A,childAccessor:M,calculatedHeight:O},absoluteRowIndex:p}),p++,m++}else if(k&&(k.loading||k.error||k.isEmpty)){if(k.loading&&f||k.error&&h||k.isEmpty&&w){var W=R(R([],N,!0),[M],!1);I.push({row:{},depth:n+1,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:!1,rowId:W,rowPath:W,rowIndexPath:E,stateIndicator:{parentRowId:T,state:k},absoluteRowIndex:p}),p++,m++}else if(k.loading&&!f){var B=R(R([],N,!0),[M,"loading-skeleton"],!1);I.push({row:{},depth:n+1,displayPosition:m,groupingKey:M,position:p,isLastGroupRow:!1,rowId:B,rowPath:B,rowIndexPath:E,isLoadingSkeleton:!0,absoluteRowIndex:p}),p++,m++}}else if(P.length>0){var q=R(R([],N,!0),[M],!1),z=R([],E,!0);p=C(P,n+1,p,m,q,z)}}}),p};return C(e.rows,void 0===n?0:n,0,c,[],[]),I},$=function(e,n){var t=n.rowTopPositions;if(0===t.length)return 0;if(0>=e)return 0;if(e>=n.totalHeight)return t.length-1;for(var r=0,o=t.length-1;o>r;){var i=Math.floor((r+o+1)/2);t[i]>e?o=i-1:r=i}return r},Z=function(e,n){if(!n||0===n.length)return 0;for(var t=0,r=0,o=n.length;o>r;){var i=Math.floor((r+o)/2);e>n[i][0]?r=i+1:o=i}for(var a=0;r>a;a++)t+=n[a][1];return t},Q=function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.scrollTop,o=e.tableRows,i=e.scrollDirection,a=void 0===i?"none":i,u=e.heightMap,l=e.rowHeight+1;if(!u){var c=n*l,d=c,s=c;"down"===a?(d=Math.max(l,.1*c),s=.9*c):"up"===a&&(d=.9*c,s=Math.max(l,.1*c));var f=r+t+s,v=Math.max(0,Math.floor(Math.max(0,r-d)/l)),h=Math.min(o.length,Math.ceil(f/l)),p=r+t,w=Math.max(0,Math.ceil(r/l)),m=Math.min(o.length,Math.floor(p/l)),g=r+t,b=Math.max(0,Math.floor(r/l)),x=Math.min(o.length,Math.ceil(g/l));return{rendered:{startIndex:v,endIndex:h,rows:o.slice(v,h)},fullyVisible:{startIndex:w,endIndex:m,rows:o.slice(w,m)},partiallyVisible:{startIndex:b,endIndex:x,rows:o.slice(b,x)}}}var y=u.rowTopPositions,I=n*l,C=I,R=I;"down"===a?(C=Math.max(l,.1*I),R=.9*I):"up"===a&&(C=.9*I,R=Math.max(l,.1*I));var S=r+t+R,M=$(Math.max(0,r-C),u),N=$(S,u)+1;N=Math.min(o.length,N);var E=r,H=r+t,T=$(E,u);E>y[T]&&(T=Math.min(T+1,o.length));var k=$(H,u);k=Math.min(o.length,k);var P=r+t,A=$(r,u),D=$(P,u)+1;return D=Math.min(o.length,D),{rendered:{startIndex:M,endIndex:N,rows:o.slice(M,N)},fullyVisible:{startIndex:T,endIndex:k,rows:o.slice(T,k)},partiallyVisible:{startIndex:A,endIndex:D,rows:o.slice(A,D)}}},ee=function(e){return Q({bufferRowCount:e.bufferRowCount,contentHeight:e.contentHeight,rowHeight:e.rowHeight,scrollTop:e.scrollTop,tableRows:e.tableRows,scrollDirection:e.scrollDirection,heightMap:e.heightMap}).rendered.rows},ne=function(e){var n=e.position,t=e.customTheme;return n*(e.rowHeight+t.rowSeparatorWidth)-t.rowSeparatorWidth+Z(n,e.heightOffsets)},te=function(e){var n=e.position;return n*(e.rowHeight+e.customTheme.rowSeparatorWidth)+Z(n,e.heightOffsets)},re=function(e,n,t){var r=e.getBoundingClientRect(),o=n.getBoundingClientRect(),i=10;if(o.top+i>r.top?n.scrollTop-=o.top-r.top+i:r.bottom>o.bottom-i&&(n.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)}},oe=function(e,n,t,r){var o=document.querySelector(".st-body-container"),i=document.querySelector(".st-body-main");if(o){var a=n+t.rowSeparatorWidth,u=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));if(u&&r){var l=function(e,n,t,r){var o=Q({bufferRowCount:0,contentHeight:n.clientHeight,rowHeight:t,scrollTop:n.scrollTop,tableRows:r,scrollDirection:"none"}).fullyVisible;return e>=o.startIndex&&o.endIndex>e}(e.rowIndex,o,n,r);if(l)return void re(u,o,i)}if(!u)return o.scrollTop=Math.max(0,e.rowIndex*a-o.clientHeight/3),void setTimeout(function(){var n=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));n&&re(n,o,i)},100);re(u,o,i)}},ie=function(e){var n=e.colIndex,t=e.rowId;return"".concat(e.rowIndex,"-").concat(n,"-").concat(t)},ae=c(void 0),ue=function(n){return e(ae.Provider,x({value:n.value},{children:n.children}))},le=function(){var e=d(ae);if(void 0===e)throw Error("useTableContext must be used within a TableProvider");return e},ce=function(r){var o=r.currentPage,a=r.footerRenderer,u=r.hideFooter,l=r.onPageChange,c=r.onNextPage,d=r.onUserPageChange,s=r.rowsPerPage,f=r.shouldPaginate,v=r.totalPages,h=r.totalRows,p=le(),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)*s+1,h),E=Math.min(o*s,h),H=!R,T=!S&&!c||!b&&M,k=function(){return I(void 0,void 0,void 0,function(){var e;return C(this,function(n){switch(n.label){case 0:return 1>(e=o-1)?[3,2]:(l(e),d?[4,d(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},P=function(){return I(void 0,void 0,void 0,function(){var e,n;return C(this,function(t){switch(t.label){case 0:return e=o===v,n=o+1,c&&e?[4,c(o)]:[3,2];case 1:if(!t.sent())return y(!1),[2];t.label=2;case 2:return n>v&&!c?[3,4]:(l(n),d?[4,d(n)]:[3,4]);case 3:t.sent(),t.label=4;case 4:return[2]}})})},A=function(e){return I(void 0,void 0,void 0,function(){return C(this,function(n){switch(n.label){case 0:return 1>e||e>v?[3,2]:(l(e),d?[4,d(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})};if(u||!f)return null;if(a)return e(n,{children:a({currentPage:o,totalPages:v,rowsPerPage:s,totalRows:h,startRow:N,endRow:E,onPageChange:A,onNextPage:P,onPrevPage:k,hasNextPage:!T,hasPrevPage:!H,nextIcon:w,prevIcon:m})});var D=function(){if(15>=v)return Array.from({length:v},function(e,n){return n+1});var e,n,t=[];o>8?v-7>o?(e=o-7,n=o+7):(e=Math.max(1,v-15+1),n=v):(e=1,n=14),e>2?(t.push(1),t.push(-1)):2===e&&t.push(1);for(var r=e;n>=r;r++)t.push(r);return v-1>n?(t.push(-2),t.push(v)):n===v-1&&t.push(v),t}();return t("div",x({className:"st-footer"},{children:[e("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:[D.map(function(n,t){return 0>n?e("span",x({className:"st-page-ellipsis"},{children:"..."}),t):e("button",x({onClick:function(){return A(n)},className:"st-page-btn ".concat(o===n?"active":""),"aria-label":"Go to page ".concat(n),"aria-current":o===n?"page":void 0},{children:n}),t)}),e("button",x({className:"st-next-prev-btn ".concat(H?"disabled":""),onClick:k,disabled:H,"aria-label":"Go to previous page"},{children:m})),e("button",x({className:"st-next-prev-btn ".concat(T?"disabled":""),onClick:P,disabled:T,"aria-label":"Go to next page"},{children:w}))]}))]}))},de=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},se=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},fe=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},ve=function(n){return e("svg",x({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},he=function(n){return e("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("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"})}))},pe=function(n){return e("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:n.className,style:x({height:"10px"},n.style)},{children:e("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"})}))},we=function(n){return e("svg",x({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("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"})}))},me=function(n){return e("svg",x({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:n.className,style:x({height:"1em"},n.style)},{children:e("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"})}))},ge=function(){return e("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:e("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},be=function(e){var n=e.headerContainerRef,t=e.mainSectionRef,r=e.scrollbarWidth,a=i(!1),u=a[0],l=a[1];return o(function(){var e=null==n?void 0:n.current;if(u&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(r,"px")),function(){e.classList.remove("st-header-scroll-padding")}},[n,u,r]),o(function(){var e=null==t?void 0:t.current;if(e&&(null==n?void 0:n.current)){var r=function(){e&&l(e.scrollHeight>e.clientHeight)};r();var o=new ResizeObserver(function(){r()});return o.observe(e),function(){e&&o.unobserve(e)}}},[n,t]),{isMainSectionScrollable:u}},xe=function(n){var t=n.children,r=n.onClose,u=n.open,l=n.overflow,c=void 0===l?"auto":l,d=n.setOpen,s=n.width,f=n.containerRef,v=n.positioning,h=void 0===v?"fixed":v,p=le().mainBodyRef,w=a(null),m=a(null),g=i("bottom-left"),b=g[0],y=g[1],I=i({}),C=I[0],R=I[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 e,n=w.current,t=m.current.getBoundingClientRect(),r=n.offsetHeight,o=s||n.offsetWidth,i=(e=(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-e.top,u="bottom",l={};(r>i&&a>=r||r>i&&a>i)&&(u="top");var c="left";o>e.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,s,f,p,h]),o(function(){var e=function(e){u&&w.current&&w.current&&!w.current.contains(e.target)&&(d(!1),null==r||r())};return u&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}},[u,r,d]),o(function(){var e=function(e){if(w.current&&!w.current.contains(e.target)){var n=w.current.parentElement;n&&!n.contains(e.target)&&(d(!1),null==r||r())}},n=function(n){"Enter"===n.key&&e(n)};return u&&(document.addEventListener("mousedown",e,!0),document.addEventListener("keydown",n,!0)),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",n,!0)}},[r,u,d]),o(function(){var e=function(e){"Escape"===e.key&&u&&(d(!1),null==r||r())};return u&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[r,u,d]),u?e("div",x({ref:w,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(e){return e.stopPropagation()},onMouseDown:function(e){return e.stopPropagation()},onTouchStart:function(e){return e.stopPropagation()},style:x(x({position:h,width:s?"".concat(s,"px"):"auto",visibility:M?"visible":"hidden"},C),{overflow:c})},{children:t})):null},ye=function(n){var t=n.children,r=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,u=void 0!==a&&a,l=n.className,c=void 0===l?"":l;return e("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}))},Ie=function(n){var r=n.onBlur,o=n.onChange,a=n.open,u=n.setOpen,l=i(n.value),c=l[0],d=l[1],s=function(e){d(e),o(e),u(!1),r()};return t(xe,x({open:a,onClose:function(){r()},setOpen:u,width:120},{children:[e(ye,x({isSelected:!0===c,onClick:function(){return s(!0)}},{children:"True"})),e(ye,x({isSelected:!1===c,onClick:function(){return s(!1)}},{children:"False"}))]}))},Ce=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(e){o(e.target.value)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},Re=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:""+t,onBlur:r,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},Se=s(function(){return import("./Animate-1b5ee5ce.js")}),Me=s(function(){return import("./DatePicker-30799710.js")}),Ne=s(function(){return Promise.resolve().then(function(){return pt})}),Ee=s(function(){return Promise.resolve().then(function(){return mt})}),He=function(n){var t=y(n,["parentRef","tableRow"]);return e(f,x({fallback:e("div",x({},t))},{children:e(Se,x({},n))}))},Te=function(n){return e(f,x({fallback:e("div",x({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:e(Me,x({},n))}))},ke=function(n){var t=n.width,r=n.height;return e(f,x({fallback:e("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:e(Ne,x({},n))}))},Pe=function(n){var t=n.width,r=n.height;return e(f,x({fallback:e("div",{style:{width:void 0===t?100:t,height:void 0===r?30:r,background:"#f3f4f6"}})},{children:e(Ee,x({},n))}))},Ae=function(e){if(!e)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){var n=e.split("-").map(Number);return new Date(n[0],n[1]-1,n[2],12,0,0)}var t=new Date(e);return isNaN(t.getTime())?new Date:new Date(t.getFullYear(),t.getMonth(),t.getDate(),12,0,0)},De=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0)},Fe=function(e){if(!e)return new Date;if("string"==typeof e)return Ae(e);if("number"==typeof e){var n=new Date(e);return isNaN(n.getTime())?new Date:De(n)}return e instanceof Date?De(e):new Date},Oe=function(e){return e?Ae(""+e):new Date},Le=function(n){var t=n.onBlur,r=n.onChange,i=n.open,a=n.setOpen,u=n.value;o(function(){var e=setTimeout(function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()},0);return function(){return clearTimeout(e)}},[]);var l=function(){t()};return e(xe,x({open:i,onClose:l,setOpen:a,overflow:"hidden",width:240},{children:e(Te,{value:Oe(u),onChange:function(e){var n=e.toISOString().split("T")[0];r(n),a(!1),t()},onClose:l})}))},We=function(n){var t=n.onBlur,r=n.onChange,o=n.open,a=n.options,u=n.setOpen,l=i(n.value||""),c=l[0],d=l[1];return e(xe,x({open:o,onClose:function(){t()},setOpen:u,width:150},{children:e("div",x({className:"st-enum-dropdown-content"},{children:a.map(function(n){return e(ye,x({isSelected:c===n.value,onClick:function(){return d(e=n.value),r(e),u(!1),void t();var e}},{children:n.label}),n.value)})}))}))},Be=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,u=void 0===a?"string":a,l=n.value,c=function(){i(!1)};return"boolean"===u&&"boolean"==typeof l?e(Ie,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l}):"date"===u?e(Le,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?e(We,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?e(Re,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}}):e(Ce,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},qe=0,Ge=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();0!==qe&&r>o-qe||(qe=o,n(t))}},ze=function(e){var n=a(e);return o(function(){JSON.stringify(n.current)!==JSON.stringify(e)&&(n.current=e)},[e]),n.current},Ke=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Ke);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=Ke(e[t]));return n},je=function(e,n){return e.filter(function(e){return e.pinned===n}).some(function(e){return!e.hide})},Ve=Date.now(),_e={screenX:0,screenY:0},Ue=function(e,n,t){void 0===t&&(t=[]);for(var r=0;e.length>r;r++){var o=e[r];if(o.accessor===n)return R(R([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=Ue(o.children,n,R(R([],t,!0),[r],!1));if(i)return i}}return null},Je=function(e){return"left"===e.pinned?"left":"right"===e.pinned?"right":"main"};var Xe=function(e){var n=e.draggedHeaderRef,t=e.headers,r=e.hoveredHeaderRef,o=e.onColumnOrderChange,i=e.onTableHeaderDragEnd,a=le().setHeaders,u=ze(t);return{handleDragStart:function(e){n.current=e,Ve=Date.now()},handleDragOver:function(e){var o=e.event,a=e.hoveredHeader;if(o.preventDefault(),t&&n.current){var l=o.currentTarget.getAnimations().some(function(e){return"running"===e.playState}),c=o.screenX,d=o.screenY,s=Math.sqrt(Math.pow(c-_e.screenX,2)+Math.pow(d-_e.screenY,2));r.current=a;var f,v,h,p=n.current,w=!1;if(Je(p)!==Je(a))f=(S=function(e,n,t){var r,o,i=Ke(e),a=!1;try{var u=Je(t),l=i.findIndex(function(e){return e.accessor===n.accessor}),c=i.findIndex(function(e){return e.accessor===t.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var d=i.splice(l,1)[0],s=(r=u,o=x({},d),"left"===r?o.pinned="left":"right"===r?o.pinned="right":delete o.pinned,o);i.splice(c,0,s)}catch(e){console.error("Error in insertHeaderAcrossSections:",e),a=!0}return{newHeaders:i,emergencyBreak:a}}(t,p,a)).newHeaders,w=S.emergencyBreak;else{var m=t,g=Ue(m,p.accessor),b=Ue(m,a.accessor);if(!g||!b)return;var y=g.length,I=b.length,C=b;if(y!==I){var R=I-y;R>0&&(C=b.slice(0,-R))}if((v=g).length!==(h=C).length||1!==v.length&&!v.slice(0,-1).every(function(e,n){return e===h[n]}))return;var S=function(e,n,t){var r=Ke(e),o=!1;function i(e,n){for(var t=e,r=0;n.length-1>r;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;n.length-1>i;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var u=i(r,n);return a(r,n,i(r,t)),a(r,t,u),{newHeaders:r,emergencyBreak:o}}(m,g,C);f=S.newHeaders,w=S.emergencyBreak}if(!(l||a.accessor===p.accessor||10>s||JSON.stringify(f)===JSON.stringify(t)||w)){var M=Date.now();JSON.stringify(f)===JSON.stringify(u)&&(1500>M-Ve||40>s)||(Ve=M,_e={screenX:c,screenY:d},i(f))}}},handleDragEnd:function(){n.current=null,r.current=null,setTimeout(function(){a(function(e){return R([],e,!0)}),null==o||o(t)},10)}}},Ye=function(n){var r=n.checked,o=void 0!==r&&r,i=n.children,a=n.onChange;return t("label",x({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},onKeyDown:function(e){" "===e.key&&e.stopPropagation()},type:"checkbox","aria-label":n.ariaLabel,"aria-checked":o}),e("span",x({className:"st-checkbox-custom ".concat(o?"st-checked":""),"aria-hidden":"true"},{children:o&&e(pe,{className:"st-checkbox-checkmark"})})),i]}))},$e=function(n){var t,r=n.content,o=n.header;return o.valueFormatter?o.valueFormatter({accessor:o.accessor,colIndex:n.colIndex,row:n.row,rowIndex:n.rowIndex,value:r}):"lineAreaChart"===o.type&&Array.isArray(r)?(t=r.filter(function(e){return"number"==typeof e})).length>0?e(ke,x({data:t},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(r)?(t=r.filter(function(e){return"number"==typeof e})).length>0?e(Pe,x({data:t},o.chartOptions)):null:"boolean"==typeof r?r?"True":"False":Array.isArray(r)?0===r.length?"[]":r.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", "):"date"===o.type&&null!==r&&("string"==typeof r||"number"==typeof r||"object"==typeof r&&r instanceof Date)?Fe(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):r},Ze=r.memo(function(r){var c=r.borderClass,d=r.colIndex,s=r.displayRowNumber,f=r.header,v=r.isHighlighted,h=r.isInitialFocused,p=r.nestedIndex,w=r.parentHeader,m=r.rowIndex,g=r.tableRow,b=le(),y=b.canExpandRowGroup,I=b.cellRegistry,C=b.cellUpdateFlash,R=b.collapsedRows,S=b.columnBorders,M=b.draggedHeaderRef,N=b.enableRowSelection,E=b.expandedDepths,H=b.expandedRows,T=b.expandIcon,k=b.handleMouseDown,P=b.handleMouseOver,D=b.handleRowSelect,O=b.headers,L=b.hoveredHeaderRef,W=b.isCopyFlashing,B=b.isLoading,q=b.isRowSelected,G=b.isWarningFlashing,z=b.onCellEdit,_=b.onCellClick,J=b.onRowGroupExpand,Y=b.onTableHeaderDragEnd,$=b.rowButtons,Z=b.rowGrouping,Q=b.setCollapsedRows,ee=b.setExpandedRows,ne=b.setRowStateMap,te=b.rowsWithSelectedCells,re=b.selectedColumns,oe=b.tableBodyContainerRef,ie=b.theme,ae=b.useOddColumnBackground,ue=g.depth,ce=g.row,de=g.rowPath,se=g.rowIndexPath,fe=g.absoluteRowIndex,ve=g.rowId,he=i(K(ce,f.accessor)),pe=he[0],we=he[1],me=i(!1),ge=me[0],be=me[1],xe=i(!1),ye=xe[0],Ie=xe[1],Ce=i(!1),Re=Ce[0],Se=Ce[1],Me=a(null),Ne=U(ve),Ee=Z&&Z[ue],Te=!!Ee&&function(e,n){return!!n&&V(e[n])}(ce,Ee),ke=Z&&Z.length>ue,Pe=!y||y(ce),Ae=!!f.nestedTable,De=X(Ne,ue,E,H,R),Fe=W({rowIndex:m,colIndex:d,rowId:Ne}),Oe=G({rowIndex:m,colIndex:d,rowId:Ne}),Le=u(function(){var e,n,t;if(!S)return!1;var r=O.filter(function(e){return"left"===e.pinned}),o=O.filter(function(e){return!e.pinned}),i=O.filter(function(e){return"right"===e.pinned});return"left"===f.pinned?(null===(e=r[r.length-1])||void 0===e?void 0:e.accessor)===f.accessor:"right"===f.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===f.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===f.accessor},[S,O,f.accessor,f.pinned]),We=Xe({draggedHeaderRef:M,headers:O,hoveredHeaderRef:L,onTableHeaderDragEnd:Y}).handleDragOver,qe=Ge(),ze=A({accessor:f.accessor,rowId:Ne}),Ke=F({rowId:Ne,accessor:f.accessor}),je=f.isSelectionColumn&&N;o(function(){if(I){var e="".concat(Ne,"-").concat(f.accessor);return I.set(e,{updateContent:function(e){pe!==e?(we(e),C&&(Ie(!0),Me.current&&clearTimeout(Me.current),Me.current=setTimeout(function(){Ie(!1)},800))):we(e)}}),function(){I.delete(e),Me.current&&clearTimeout(Me.current)}}},[I,C,Ne,f.accessor,pe]),o(function(){if(ye){var e=setTimeout(function(){Ie(!1)},850);return function(){return clearTimeout(e)}}},[ye]),o(function(){we(K(ce,f.accessor))},[ce,f.accessor]);var Ve="boolean"===f.type||"date"===f.type||"enum"===f.type,_e=!!(null==f?void 0:f.isEditable),Ue=re.has(d),Je=v&&!Ue,Ze=u(function(){return!!je&&te.has(Ne+"")},[je,te,Ne]),Qe=null==w?void 0:w.singleRowChildren,en="st-cell ".concat(ue>0&&f.expandable?"st-cell-depth-".concat(ue):""," ").concat(Je?h?"st-cell-selected-first ".concat(c):"st-cell-selected ".concat(c):""," ").concat(Ue?h?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(_e?"clickable":""," ").concat(ye?h?"st-cell-updating-first":"st-cell-updating":""," ").concat(Fe?h?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Oe?h?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(ae?p%2==0?"even-column":"odd-column":""," ").concat(je?"st-selection-cell":""," ").concat(Ze?"st-selection-has-highlighted-cell":""," ").concat(Le?"st-last-column":""," ").concat(Qe?"st-sub-cell":""," ").concat(Re?"hovered":""),nn=l(function(e){null==e&&(e="number"===f.type?0:"boolean"!==f.type&&""),we(e),j(ce,f.accessor,e),null==z||z({accessor:f.accessor,newValue:e,row:ce,rowIndex:m})},[f.accessor,f.type,z,ce,m]),tn=l(function(e){e.stopPropagation();var n=X(Ne,ue,E,H,R),t=Ne+"";if(n?(Q(function(e){var n=new Map(e);return n.set(t,ue),n}),ee(function(e){var n=new Map(e);return n.delete(t),n})):(ee(function(e){var n=new Map(e);return n.set(t,ue),n}),Q(function(e){var n=new Map(e);return n.delete(t),n})),n&&ne(function(e){var n=new Map(e);return n.delete(Ne),n}),J){var r=f.pinned;J({depth:ue,event:e,groupingKey:Ee,groupingKeys:Z||[],isExpanded:!n,row:ce,rowIndexPath:se||[],rowIdPath:de,setEmpty:function(e,n){ne(function(t){var o=new Map(t),i=o.get(Ne)||{};return o.set(Ne,x(x({},i),{isEmpty:e,emptyMessage:n,loading:!1,error:null,triggerSection:r})),o})},setError:function(e){ne(function(n){var t=new Map(n),o=t.get(Ne)||{};return t.set(Ne,x(x({},o),{error:e,loading:!1,isEmpty:!1,triggerSection:r})),t})},setLoading:function(e){e?ne(function(e){var n=new Map(e),t=n.get(Ne)||{};return n.set(Ne,x(x({},t),{loading:!0,error:null,isEmpty:!1,triggerSection:r})),n}):setTimeout(function(){ne(function(e){var n=new Map(e),t=n.get(Ne)||{};return n.set(Ne,x(x({},t),{loading:!1,error:null,isEmpty:!1,triggerSection:r})),n})},0)}})}},[R,Ee,ue,E,H,f.pinned,J,ce,Z,Ne,se,de,Q,ee,ne]);return B||g.isLoadingSkeleton?e("div",x({className:en},{children:e("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:e("div",{className:"st-loading-skeleton"})}))})):!ge||Ve||je?t(He,x({className:en,"data-accessor":f.accessor,"data-col-index":d,"data-row-id":Ne,"data-row-index":m,"aria-colindex":d+1,id:ze,onClick:function(){_&&!je&&_({accessor:f.accessor,colIndex:d,row:ce,rowIndex:m,value:pe})},onDoubleClick:function(){return f.isEditable&&!je&&be(!0)},onDragOver:function(e){je||qe({callback:We,callbackProps:{event:e,hoveredHeader:f},limit:50})},onKeyDown:function(e){ge||je||"F2"!==e.key&&"Enter"!==e.key||!f.isEditable||ge||(e.preventDefault(),be(!0))},onMouseDown:function(){ge||je||k({rowIndex:m,colIndex:d,rowId:Ne})},onMouseEnter:function(){Se(!0)},onMouseLeave:function(){Se(!1)},onMouseOver:function(){ge||je||P({rowIndex:m,colIndex:d,rowId:Ne})},parentRef:oe,tableRow:g},{children:[f.expandable&&ke?e("div",x({className:"st-icon-container st-expand-icon-container ".concat(Pe&&(Te||J||Ae)?De?"expanded":"collapsed":"placeholder"),onClick:Pe&&(Te||J||Ae)?function(e){return tn(e)}:void 0,role:Pe&&(Te||J||Ae)?"button":"presentation",tabIndex:Pe&&(Te||J||Ae)?0:-1,"aria-label":Pe&&(Te||J||Ae)?"".concat(De?"Collapse":"Expand"," row group"):void 0,"aria-expanded":Pe&&(Te||J||Ae)?De:void 0,"aria-hidden":!(Pe&&(Te||J||Ae)),onKeyDown:Pe&&(Te||J||Ae)?function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),tn(e))}:void 0},{children:T})):null,e("span",x({className:"st-cell-content ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:B||g.isLoadingSkeleton?e("div",{className:"st-loading-skeleton"}):e(n,{children:je?t("div",x({className:"st-selection-cell-content"},{children:[e("div",x({className:"st-selection-control"},{children:Re||q&&q(Ne+"")?e(Ye,{checked:!!q&&q(Ne+""),onChange:function(e){D&&D(Ne+"",e)},ariaLabel:"Select row ".concat(s+1)}):e("span",x({className:"st-row-number"},{children:s+1}))})),function(){if(!$||!je||0===$.length)return null;if(!(Re||q&&q(Ne+"")))return null;var n={row:ce,rowIndex:s};return e("div",x({className:"st-row-buttons",role:"group","aria-label":"Actions for row ".concat(s+1)},{children:$.map(function(t,r){return e("span",x({className:"st-row-button"},{children:t(n)}),r)})}))}()]})):f.cellRenderer?function(){var e;return f.cellRenderer({accessor:f.accessor,colIndex:d,row:ce,rowIndex:fe,rowPath:de,theme:ie,value:pe,formattedValue:null===(e=null==f?void 0:f.valueFormatter)||void 0===e?void 0:e.call(f,{accessor:f.accessor,colIndex:d,row:ce,rowIndex:m,value:pe})})}():$e({content:pe,header:f,colIndex:d,row:ce,rowIndex:m})})})),!B&&!g.isLoadingSkeleton&&ge&&Ve&&!je&&e(Be,{enumOptions:f.enumOptions,onChange:nn,setIsEditing:be,type:f.type,value:pe})]}),Ke):e("div",x({className:"st-cell-editing",id:A({accessor:f.accessor,rowId:Ne}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e(Be,{enumOptions:f.enumOptions,onChange:nn,setIsEditing:be,type:f.type,value:pe})}))},function(e,n){if(e.rowIndex!==n.rowIndex||e.colIndex!==n.colIndex||e.isHighlighted!==n.isHighlighted||e.isInitialFocused!==n.isInitialFocused||e.borderClass!==n.borderClass)return!1;if(e.tableRow!==n.tableRow){if(e.tableRow.row!==n.tableRow.row)return!1;if(e.tableRow.position!==n.tableRow.position||e.tableRow.displayPosition!==n.tableRow.displayPosition)return!1}return(e.header===n.header||e.header.accessor===n.header.accessor&&e.header.isEditable===n.header.isEditable&&e.header.type===n.header.type&&e.header.cellRenderer===n.header.cellRenderer&&e.header.valueFormatter===n.header.valueFormatter)&&e.parentHeader===n.parentHeader&&e.displayRowNumber===n.displayRowNumber&&e.nestedIndex===n.nestedIndex}),Qe=function(n){var r=n.columnIndices,o=n.displayRowNumber,i=n.header,a=n.headers,u=n.nestedIndex,l=n.parentHeader,c=n.pinned,d=n.rowIndex,s=n.rowIndices,f=n.tableRow,h=r[i.accessor],p=le(),w=p.getBorderClass,m=p.isSelected,g=p.isInitialFocusedCell,b=p.collapsedHeaders,x=U(f.rowId);if(i.children&&i.children.length>0){var y=i.children.filter(function(e){return D({header:e,pinned:c,headers:a,collapsedHeaders:b})});if(i.singleRowChildren){var I={rowIndex:d,colIndex:h,rowId:x},C=w(I),R=m(I),S=g(I),M=A({accessor:i.accessor,rowId:x});return t(v,{children:[e(Ze,{borderClass:C,colIndex:h,displayRowNumber:o,header:i,isHighlighted:R,isInitialFocused:S,nestedIndex:u,parentHeader:l,rowIndex:d,tableRow:f},M),y.map(function(n){var t=A({accessor:n.accessor,rowId:x});return e(Qe,{columnIndices:r,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:d,rowIndices:s,tableRow:f},t)})]})}return e(v,{children:y.map(function(n){var t=A({accessor:n.accessor,rowId:x});return e(Qe,{columnIndices:r,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:d,rowIndices:s,tableRow:f},t)})})}var N={rowIndex:d,colIndex:h,rowId:x},E=w(N),H=m(N),T=g(N),k=A({accessor:i.accessor,rowId:x});return e(Ze,{borderClass:E,colIndex:h,displayRowNumber:o,header:i,isHighlighted:H,isInitialFocused:T,nestedIndex:u,parentHeader:l,rowIndex:d,tableRow:f},k)},en=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,d=t.tableRow,s=le().collapsedHeaders,f=i.filter(function(e){return D({header:e,pinned:a,headers:i,collapsedHeaders:s})});return e(n,{children:f.map(function(n,t){var s=U(d.rowId),f=A({accessor:n.accessor,rowId:s});return e(Qe,{columnIndices:o,displayRowNumber:l,header:n,headers:i,nestedIndex:t+(null!=r?r:0),pinned:a,rowIndex:u,rowIndices:c,tableRow:d},f)})})},function(e,n){return e.rowIndex===n.rowIndex&&e.displayRowNumber===n.displayRowNumber&&e.columnIndexStart===n.columnIndexStart&&(e.tableRow===n.tableRow||e.tableRow.row===n.tableRow.row)&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices}),nn=function(n){var t=n.rowState,r=n.loadingStateRenderer,o=n.errorStateRenderer,i=n.emptyStateRenderer,a=null;return t.loading&&r?a=r:t.error&&o?a=o:t.isEmpty&&i&&(a=i),a?e("div",x({className:"st-cell st-state-row-cell",style:{gridColumn:"1 / -1",padding:0}},{children:a})):null},tn=function(n){var t=n.calculatedHeight,r=n.childAccessor,o=n.depth,i=n.expandableHeader,a=n.index,u=n.parentRow,l=n.position,c=le(),d=c.theme,s=c.rowGrouping,f=c.rowHeight,v=c.heightOffsets,h=c.customTheme,p=c.loadingStateRenderer,w=c.errorStateRenderer,m=c.emptyStateRenderer,g=c.expandIcon,b=c.filterIcon,y=c.sortUpIcon,I=c.sortDownIcon,C=c.nextIcon,R=c.prevIcon,S=c.headerCollapseIcon,M=c.headerExpandIcon,N=i.nestedTable;if(!N)return null;var E=K(u,r),H=Array.isArray(E)?E:[],T=s&&s[o+1]?null==s?void 0:s.slice(o+1):void 0,k=t-h.nestedGridPaddingTop-h.nestedGridPaddingBottom,P=N.customTheme?x(x({},h),N.customTheme):h;return e("div",x({className:"st-row st-nested-grid-row","data-index":a,style:{transform:"translate3d(0, ".concat(te({position:l,rowHeight:f,heightOffsets:v,customTheme:h}),"px, 0)"),height:"".concat(t,"px"),paddingTop:"".concat(h.nestedGridPaddingTop,"px"),paddingBottom:"".concat(h.nestedGridPaddingBottom,"px")}},{children:e(ft,x({},N,{rows:H,theme:d,customTheme:P,height:"".concat(k,"px"),rowGrouping:T,loadingStateRenderer:p,errorStateRenderer:w,emptyStateRenderer:m,expandIcon:g,filterIcon:b,sortUpIcon:y,sortDownIcon:I,nextIcon:C,prevIcon:R,headerCollapseIcon:S,headerExpandIcon:M}))}))},rn=r.memo(function(n){var t=n.columnIndices,r=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.index,u=n.pinned,l=n.rowHeight,c=n.rowIndices,d=n.setHoveredIndex,s=n.tableRow,f=le(),v=f.customTheme,h=f.emptyStateRenderer,p=f.errorStateRenderer,w=f.heightOffsets,m=f.isAnimating,g=f.isRowSelected,b=f.loadingStateRenderer,y=f.maxHeaderDepth,I=f.rows,C=f.useHoverRowBackground,R=f.useOddEvenRowBackground,S=s.position,M=s.displayPosition,N=s.stateIndicator,E=s.nestedTable;if(E)return u?e("div",{className:"st-row st-nested-grid-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(E.calculatedHeight,"px")}}):e(tn,{calculatedHeight:E.calculatedHeight,childAccessor:E.childAccessor,depth:s.depth-1,expandableHeader:E.expandableHeader,index:a,parentRow:E.parentRow,position:S});if(N){if(N.state.triggerSection===u){if(!(N.state.loading&&b||N.state.error&&p||N.state.isEmpty&&h))return e("div",{className:"st-row st-state-row-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(l,"px")}});var H=I.find(function(e,n){return U([n])===N.parentRowId});return e("div",x({className:"st-row st-state-row","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(l,"px")}},{children:e(nn,{parentRow:H||{},rowState:N.state,gridTemplateColumns:o,loadingStateRenderer:b,errorStateRenderer:p,emptyStateRenderer:h})}))}return e("div",{className:"st-row st-state-row-spacer","data-index":a,style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),"px, 0)"),height:"".concat(l,"px")}})}var T=S%2==0,k=U(s.rowId),P=!!g&&g(k);return e("div",x({className:"st-row ".concat(R?T?"even":"odd":""," ").concat(P?"selected":""),"data-index":a,"aria-rowindex":S+y+1,onMouseEnter:function(){!m&&C&&d(a)},style:{gridTemplateColumns:o,top:te({position:S,rowHeight:l,heightOffsets:w,customTheme:v}),height:"".concat(l,"px")}},{children:e(en,{columnIndexStart:r,columnIndices:t,displayRowNumber:M,headers:i,pinned:u,rowIndex:S,rowIndices:c,tableRow:s},k)}))},function(e,n){return e.index===n.index&&e.tableRow.position===n.tableRow.position&&e.tableRow.displayPosition===n.tableRow.displayPosition&&e.tableRow.row===n.tableRow.row&&e.tableRow.stateIndicator===n.tableRow.stateIndicator&&e.rowHeight===n.rowHeight&&e.gridTemplateColumns===n.gridTemplateColumns&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices&&e.columnIndexStart===n.columnIndexStart}),on=function(n){var t=n.displayStrongBorder,r=n.position,o=n.rowHeight,i=n.templateColumns,u=le(),l=u.heightOffsets,c=u.customTheme,d=a(null);return e("div",x({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(e){var n=e.currentTarget,t=n.style.pointerEvents;n.style.pointerEvents="none";var r=document.elementFromPoint(e.clientX,e.clientY);if(n.style.pointerEvents=t,r){var o=r.closest(".st-cell");if(o instanceof HTMLElement){d.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(e){if(d.current){var n=d.current.getBoundingClientRect(),t=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:n.top+n.height/2});d.current.dispatchEvent(t),d.current=null}},style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(ne({position:r,rowHeight:o,heightOffsets:l,customTheme:c}),"px, 0)")}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},an=c(void 0),un=function(e){var n=e.childRef,t=e.children,r=e.group,i=void 0===r?"default":r,a=function(){var e=d(an);if(!e)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),u=a.registerPane,l=a.unregisterPane;return o(function(){var e=[i];return n.current&&u(n.current,e),function(){n.current&&l(n.current,e)}},[n,u,l,i]),h(t,{ref:function(e){n.current=e}})},ln=p(function(n,r){var o=n.columnIndexStart,i=n.columnIndices,l=n.headers,c=n.pinned,d=n.rowHeight,s=n.rowIndices,f=n.setHoveredIndex,h=n.templateColumns,p=n.totalHeight,m=n.rowsToRender,g=n.width,b=c?"st-body-pinned-".concat(c):"st-body-main",y=a(null);return w(r,function(){return y.current},[]),u(function(){return je(l,c)},[l,c])?e(un,x({childRef:y,group:c?"pinned-".concat(c):"default"},{children:e("div",x({className:b,ref:y,style:x({position:"relative",height:"".concat(p,"px"),width:g},!c&&{flexGrow:1})},{children:m.map(function(n,r){var a=n.stateIndicator?"state-".concat(n.stateIndicator.parentRowId,"-").concat(n.position):U(n.rowId);return t(v,{children:[0!==r&&e(on,{displayStrongBorder:n.isLastGroupRow,position:n.position,rowHeight:d,templateColumns:h}),e(rn,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:h,headers:l,index:r,pinned:c,rowHeight:d,rowIndices:s,setHoveredIndex:f,tableRow:n})]},a)})}))})):null});function cn(e){var n=e.headers,t=e.pinnedLeftColumns,r=e.pinnedRightColumns,o=e.collapsedHeaders,i={},a=0,u=R(R(R([],t,!0),n,!0),r,!0),l=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter(function(e){return D({header:e,headers:u,collapsedHeaders:o})}).forEach(function(n,t){l(n,!e.singleRowChildren&&0===t)})};return t.forEach(function(e,n){l(e,0===n)}),n.filter(function(e){return!e.pinned&&D({header:e,headers:u,collapsedHeaders:o})}).forEach(function(e,n){l(e,0===n&&0===t.length)}),r.forEach(function(e){l(e,!1)}),i}ln.displayName="TableSection";var dn=function(r){var c=r.mainTemplateColumns,d=r.pinnedLeftColumns,s=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,I=le(),C=I.collapsedHeaders,R=I.headerContainerRef,S=I.headers,M=I.heightOffsets,N=I.isAnimating,E=I.mainBodyRef,H=I.onLoadMore,T=I.rowHeight,k=I.scrollbarWidth,P=I.setIsScrolling,A=I.shouldPaginate,D=I.tableBodyContainerRef,F=I.tableEmptyStateRenderer,O=I.customTheme,L=i(!1),W=L[0],B=L[1],q=a(new Set),G=l(function(e){if(document.querySelectorAll(".st-row.hovered").forEach(function(e){e.classList.remove("hovered")}),q.current.clear(),null!==e&&D.current){var n=D.current;n.querySelectorAll('.st-row[data-index="'.concat(e,'"]:not(.st-nested-grid-row)')).forEach(function(e){var t=e;t.closest(".st-body-container")===n&&(t.classList.add("hovered"),q.current.add(t))})}},[D]);o(function(){N&&G(null)},[N,G]),be({headerContainerRef:R,mainSectionRef:D,scrollbarWidth:k}),o(function(){return function(){K.current&&clearTimeout(K.current)}},[]);var z=a(null),K=a(null),j=a(0),V=function(e){return e.length}(y),_=u(function(){return function(e,n,t,r){return e*(n+r.rowSeparatorWidth)-r.rowSeparatorWidth+((null==t?void 0:t.reduce(function(e,n){return e+n[1]},0))||0)}(V,T,M,O)},[V,T,M,O]),J=u(function(){return cn({headers:S,pinnedLeftColumns:d,pinnedRightColumns:v,collapsedHeaders:C})},[S,d,v,C]),X=u(function(){var e={};return w.forEach(function(n,t){var r=U(n.rowId);e[r]=t}),e},[w]),Y=l(function(e,n){!H||A||W||200>=e.scrollHeight-(n+e.clientHeight)&&n>j.current&&(B(!0),H(),setTimeout(function(){B(!1)},1e3))},[H,A,W]),$={columnIndices:J,headerContainerRef:R,headers:S,rowHeight:T,rowIndices:X,rowsToRender:w,setHoveredIndex:G};return e("div",x({className:"st-body-container",onMouseLeave:function(){return G(null)},onScroll:function(e){var n=e.currentTarget,t=n.scrollTop;P(!0),K.current&&clearTimeout(K.current),K.current=setTimeout(function(){P(!1)},150),z.current&&cancelAnimationFrame(z.current),z.current=requestAnimationFrame(function(){var e=j.current,r=t>e?"down":e>t?"up":"none";m(t),g(r),Y(n,t),j.current=t})},ref:D},{children:b?e("div",x({className:"st-empty-state-wrapper"},{children:F})):t(n,{children:[e(ln,x({},$,{pinned:"left",templateColumns:s,totalHeight:_,width:f})),e(ln,x({},$,{columnIndexStart:d.length,ref:E,templateColumns:c,totalHeight:_})),e(ln,x({},$,{columnIndexStart:d.length+c.length,pinned:"right",templateColumns:h,totalHeight:_,width:p}))]})}))},sn=function(e){var n=e.event,t=e.header,r=e.headers,o=e.setHeaders,i=e.setIsResizing,a=e.tableBodyContainerRef,u=e.startWidth,l=e.collapsedHeaders,c=e.autoExpandColumns,d=void 0!==c&&c,s=e.reverse,f=void 0!==s&&s;n.preventDefault();var v="clientX"in n?n.clientX:n.touches[0].clientX,h="touches"in n;if(t&&!t.hide){i(!0);var p,w=B(t);if(t.children&&t.children.length>0){var m=O(t,l);p=m.length>0?m:[t]}else p=[t];var g=new Map,b=0;if(d){var x=r.filter(function(e){return e.pinned===t.pinned});if(q(x,l).forEach(function(e){var n="number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):100;g.set(e.accessor,n)}),a.current){var y=a.current.clientWidth,I=vn({headers:r,containerWidth:y,collapsedHeaders:l}),C=I.leftWidth,S=I.rightWidth;b="left"===t.pinned?C:"right"===t.pinned?S:Math.max(0,y-C-S)}}var M=function(e){var n="right"===t.pinned?v-e:e-v;if(d){var i=r.filter(function(e){return e.pinned===t.pinned});pn({delta:n,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(e){var n=e.header,t=e.headers,r=e.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth,a=E(window.innerWidth);if(!n.pinned)return 1/0;var u=i*a-t.filter(function(e){return e.pinned===n.pinned&&e.accessor!==n.accessor}).reduce(function(e,n){return n.hide?e:e+O(n,r).reduce(function(e,n){return e+L(n)},0)},0),l=B(n);return l>u?(console.warn("Header ".concat(n.accessor," exceeds pinned section width limit")),l):u}({header:t,headers:r,collapsedHeaders:l});p.length>1?fn({delta:n,leafHeaders:p,minWidth:w,startWidth:u,maxWidth:a}):p[0].width=Math.max(Math.min(u+n,a),w),r.forEach(function(e){W(e)})}var c=R([],r,!0);o(c)};if(h){var N=function(e){M(e.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 T=function(e){M(e.clientX)},k=function(){document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",k),i(!1)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",k)}}},fn=function(e){var n=e.delta,t=e.leafHeaders,r=e.minWidth,o=e.startWidth,i=e.maxWidth,a=t.reduce(function(e,n){return Math.min(e,B(n))},40),u=t.reduce(function(e,n){return e+("number"==typeof n.width?n.width:150)},0),l=Math.max(Math.min(o+n,i),a)-u;t.forEach(function(e){var n="number"==typeof e.width?e.width:150;e.width=Math.max(n+l*(n/u),r)})},vn=function(e){var n=e.containerWidth,t=e.maxPinnedWidthPercent,r=void 0===t?.8:t,o=e.collapsedHeaders,i=0,a=0,u=0;e.headers.forEach(function(e){if(!e.hide){var n=O(e,o).reduce(function(e,n){return e+L(n)},0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:u+=n}});var l=i,c=a;if(n&&n>0){var d=n*r;i>d&&(i=d),a>d&&(a=d)}return{leftWidth:P(i),rightWidth:P(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}},hn=function(e){var n=e.columnsToShrink,t=e.totalCompensation,r=e.initialWidthsMap;if(0>t){var o=Math.abs(t),i=n.reduce(function(e,n){return e+(r.get(n.accessor)||100)},0);if(0===i)return;n.forEach(function(e,t){var a=r.get(e.accessor)||100,u=o*(a/i);if(t===n.length-1){var l=n.slice(0,t).reduce(function(e,n){var t=r.get(n.accessor)||100;return e+(("number"==typeof n.width?n.width:100)-t)},0);u=o-l}e.width=a+u})}else for(var a=t,u=function(){var e=n.map(function(e){var n=r.get(e.accessor)||100;return{column:e,headroom:Math.max(0,n-30),initialWidth:n,minWidth:30}}),t=e.filter(function(e){return e.headroom>0});if(t.length>0){var o=t.reduce(function(e,n){return e+n.headroom},0),i=0,u=a;t.forEach(function(e,n){var r=u*(e.headroom/o);r=Math.min(r,e.headroom),n===t.length-1&&(r=Math.min(u-i,e.headroom)),e.column.width=e.initialWidth-r,i+=r}),a-=i}else{var l=e.filter(function(e){return e.minWidth>N});if(0>=l.length)return"break";var c=a,d=c/l.length,s=0;l.forEach(function(e,n){var t=e.minWidth-N,r=Math.min(d,t);n===l.length-1&&(r=Math.min(c-s,t));var o=e.initialWidth-r;e.column.width=o,e.column.minWidth=Math.max(o,N),s+=r}),a-=s}};a>.5&&"break"!==u(););},pn=function(e){var n=e.delta,t=e.startWidth,r=e.resizedHeader,o=e.sectionHeaders,i=e.reverse,a=e.collapsedHeaders,u=e.initialWidthsMap,l=e.sectionWidth,c=e.isParentResize,d=e.childrenToResize,s=void 0===d?[]:d;if(void 0!==c&&c&&s.length>1){var f=q(o,a),v=f.findIndex(function(e){return e.accessor===s[0].accessor}),h=f.findIndex(function(e){return e.accessor===s[s.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(e,n){return e+n},0);if(n>0){var g=n,b=!1;if(m+n>l){b=!0;var x=p.reduce(function(e,n){var t=u.get(n.accessor)||100;return e+Math.max(0,t-N)},0);g=Math.min(n,x)}var y=(I=t+g)/(C=s.reduce(function(e,n){return e+(u.get(n.accessor)||100)},0));s.forEach(function(e){var n=u.get(e.accessor)||100;e.width=Math.max(n*y,30)}),b&&g>0&&p.length>0&&hn({columnsToShrink:p,totalCompensation:g,initialWidthsMap:u})}else{var I,C=s.reduce(function(e,n){return e+(u.get(n.accessor)||100)},0),R=(I=Math.max(t+n,N*s.length))/C;s.forEach(function(e){var n=u.get(e.accessor)||100;e.width=Math.max(n*R,30)}),(A=t-I)>0&&p.length>0&&hn({columnsToShrink:p,totalCompensation:-A,initialWidthsMap:u})}}else{var S=q(o,a),M=S.findIndex(function(e){return e.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 T=Array.from(u.values()).reduce(function(e,n){return e+n},0);if(n>0){if(l>=T+n)return void(r.width=t+n);x=E.reduce(function(e,n){var t=u.get(n.accessor)||100;return e+Math.max(0,t-N)},0);var k=Math.min(n,x);r.width=t+k,k>0&&hn({columnsToShrink:E,totalCompensation:k,initialWidthsMap:u})}else{var P=Math.max(t+n,30),A=t-P;r.width=P,A>0&&hn({columnsToShrink:E,totalCompensation:-A,initialWidthsMap:u})}}else r.width=Math.max(t+n,30)}}},wn={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"},mn=function(e){switch(e){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"]}},gn=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},bn=function(e){return["between","notBetween","in","notIn"].includes(e)},xn=function(e){return["isEmpty","isNotEmpty"].includes(e)},yn=function(n){return e("div",x({className:"st-filter-container"},{children:n.children}))},In=function(n){var r=n.value,u=n.onChange,l=n.options,c=n.placeholder,d=void 0===c?"Select...":c,s=n.className,f=void 0===s?"":s,v=n.disabled,h=void 0!==v&&v,p=i(!1),w=p[0],m=p[1],g=i(-1),b=g[0],y=g[1],I=a(null),C=l.find(function(e){return e.value===r});o(function(){var e=function(e){if(w)switch(e.key){case"ArrowDown":e.preventDefault(),y(function(e){return l.length-1>e?e+1:0});break;case"ArrowUp":e.preventDefault(),y(function(e){return e>0?e-1:l.length-1});break;case"Enter":e.preventDefault(),0>b||(u(l[b].value),m(!1),y(-1));break;case"Escape":e.preventDefault(),m(!1),y(-1)}};if(w)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[w,b,l,u]);var R=function(e){u(e),m(!1),y(-1)};return t("div",x({ref:I,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 e=l.findIndex(function(e){return e.value===r});y(0>e?0:e)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":w,"aria-labelledby":"select-label"},{children:[e("span",x({className:"st-custom-select-value"},{children:C?C.label:d})),e(ge,{})]})),e(xe,x({open:w,setOpen:m,onClose:function(){m(!1),y(-1)},positioning:"absolute",overflow:"auto"},{children:e("div",x({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(n,t){return e("div",x({className:"st-custom-select-option ".concat(n.value===r?"st-custom-select-option-selected":""," ").concat(t===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===r,onClick:function(){return R(n.value)},tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),R(n.value))}},{children:n.label}),t)})}))}))]}))},Cn=function(n){var t=n.value,r=n.onChange,o=n.operators.map(function(e){return{value:e,label:wn[e]}});return e("div",x({className:"st-filter-section"},{children:e(In,{value:t,onChange:function(e){r(e)},options:o})}))},Rn=function(n){var t=n.type,r=n.onChange,o=n.autoFocus,i=n.className,a=n.onEnterPress;return e("input",{type:void 0===t?"text":t,value:n.value,onChange:function(e){return r(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&a&&a()},placeholder:n.placeholder,autoFocus:void 0!==o&&o,className:"st-filter-input ".concat(void 0===i?"":i).trim()})},Sn=function(n){var t=n.children,r=n.className;return e("div",x({className:"st-filter-section ".concat(void 0===r?"":r).trim()},{children:t}))},Mn=function(n){var r=n.onClear,o=n.canApply,i=n.showClear;return t("div",x({className:"st-filter-actions"},{children:[e("button",x({onClick:n.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled"),tabIndex:0},{children:"Apply"})),i&&r&&e("button",x({onClick:r,className:"st-filter-button st-filter-button-clear",tabIndex:0},{children:"Clear"}))]}))},Nn=function(n){var r=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"contains"),d=c[0],s=c[1],f=i(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],p=mn("string");o(function(){a?(s(a.operator),h((a.value||"")+"")):(s("contains"),h(""))},[a]);var w=function(){var e=x({accessor:r.accessor,operator:d},gn(d)&&{value:v});u(e)},m=xn(d)||v.trim();return t(yn,{children:[e(Cn,{value:d,onChange:s,operators:p}),gn(d)&&e(Sn,{children:e(Rn,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:w})}),e(Mn,{onApply:w,onClear:l,canApply:!!m,showClear:!!a})]})},En=function(n){var r,a,u=n.header,l=n.currentFilter,c=n.onApplyFilter,d=n.onClearFilter,s=i((null==l?void 0:l.operator)||"equals"),f=s[0],v=s[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],I=x[1],C=mn("number");o(function(){var e,n;l?(v(l.operator),w((l.value||"")+""),b(((null===(e=l.values)||void 0===e?void 0:e[0])||"")+""),I(((null===(n=l.values)||void 0===n?void 0:n[1])||"")+"")):(v("equals"),w(""),b(""),I(""))},[l]);var R=function(){var e={accessor:u.accessor,operator:f};gn(f)?e.value=parseFloat(p):bn(f)&&(e.values=[parseFloat(""+g),parseFloat(""+y)]),c(e)};return t(yn,{children:[e(Cn,{value:f,onChange:v,operators:C}),gn(f)&&e(Sn,{children:e(Rn,{type:"number",value:p,onChange:w,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),bn(f)&&t(Sn,{children:[e(Rn,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),e(Rn,{type:"number",value:y,onChange:I,placeholder:"To...",onEnterPress:R})]}),e(Mn,{onApply:R,onClear:d,canApply:!!xn(f)||(gn(f)?""!==p.trim():!!bn(f)&&""!==(g+"").trim()&&""!==(y+"").trim()),showClear:!!l})]})},Hn=function(n){var t=n.className;return e(In,{value:n.value,onChange:n.onChange,options:n.options,className:void 0===t?"":t,placeholder:n.placeholder})},Tn=function(n){var r=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"equals"),d=c[0],s=c[1],f=i(void 0!==(null==a?void 0:a.value)?a.value+"":"true"),v=f[0],h=f[1],p=mn("boolean");o(function(){a?(s(a.operator),h(void 0!==a.value?a.value+"":"true")):(s("equals"),h("true"))},[a]);var w=xn(d)||""!==v;return t(yn,{children:[e(Cn,{value:d,onChange:s,operators:p}),gn(d)&&e(Sn,{children:e(Hn,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e(Mn,{onApply:function(){var e={accessor:r.accessor,operator:d};gn(d)&&(e.value="true"===v),u(e)},onClear:l,canApply:w,showClear:!!a})]})},kn=function(n){var r,u,l=n.header,c=n.currentFilter,d=n.onApplyFilter,s=n.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],I=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),C=I[0],R=I[1],S=mn("date");o(function(){var e,n;c?(h(c.operator),m((c.value||"")+""),y(((null===(e=c.values)||void 0===e?void 0:e[0])||"")+""),R(((null===(n=c.values)||void 0===n?void 0:n[1])||"")+"")):(h("equals"),m(""),y(""),R(""))},[c]);var M=function(n){var r=n.value,u=n.onChange,l=n.placeholder,c=n.autoFocus,d=n.className,s=i(!1),f=s[0],v=s[1],h=i(""),p=h[0],w=h[1],m=a(null);o(function(){if(r){var e=Fe(r);isNaN(e.getTime())||w(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else w("")},[r]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=r?Fe(r):new Date;return t("div",x({className:"st-date-input-container",style:{position:"relative"}},{children:[e("input",{ref:m,type:"text",value:p,placeholder:l,onClick:function(){v(!f)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),v(!f)):"Escape"===e.key&&v(!1)},readOnly:!0,className:"st-filter-input ".concat(d||""),style:{cursor:"pointer"}}),e(xe,x({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"hidden",width:240},{children:e(Te,{value:g,onChange:function(e){var n=e.toISOString().split("T")[0];u(n),v(!1)},onClose:function(){return v(!1)}})}))]}))};return t(yn,{children:[e(Cn,{value:v,onChange:h,operators:S}),gn(v)&&e(Sn,{children:e(M,{value:w,onChange:m,placeholder:"Select date...",autoFocus:!0})}),bn(v)&&t(Sn,{children:[e(M,{value:b,onChange:y,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e(M,{value:C,onChange:R,placeholder:"To date..."})]}),e(Mn,{onApply:function(){var e={accessor:l.accessor,operator:v};gn(v)?e.value=w:bn(v)&&(e.values=[b,C]),d(e)},onClear:s,canApply:!!xn(v)||(gn(v)?""!==w.trim():!!bn(v)&&""!==b.trim()&&""!==C.trim()),showClear:!!c})]})},Pn=function(n){var r=n.header,a=n.currentFilter,l=n.onApplyFilter,c=n.onClearFilter,d=u(function(){return r.enumOptions||[]},[r.enumOptions]),s=u(function(){return d.map(function(e){return e.value})},[d]),f=i((null==a?void 0:a.values)?a.values.map(String):s),v=f[0],h=f[1],p=i(""),w=p[0],m=p[1],g=u(function(){if(!w)return d;var e=w.toLowerCase();return d.filter(function(n){return n.label.toLowerCase().includes(e)})},[d,w]);o(function(){h(a?a.values?a.values.map(String):[]:s)},[a,s]);var b=d.length>10;return t(yn,{children:[e(Sn,{children:t("div",x({className:"st-enum-filter-options"},{children:[e("div",x({className:"st-enum-select-all"},{children:e(Ye,x({checked:v.length===s.length,onChange:function(e){h(e?s:[])}},{children:e("span",x({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&e("div",x({className:"st-enum-search"},{children:e(Rn,{type:"text",value:w,onChange:m,placeholder:"Search..."})})),g.map(function(n,t){return e(Ye,x({checked:v.includes(n.value),onChange:function(){return e=n.value,void h(function(n){return n.includes(e)?n.filter(function(n){return n!==e}):R(R([],n,!0),[e],!1)});var e}},{children:e("span",x({className:"st-enum-option-label"},{children:n.label}))}),t)}),w&&0===g.length&&e("div",x({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),e(Mn,{onApply:function(){v.length!==s.length?l({accessor:r.accessor,operator:"in",values:v}):c()},onClear:c,canApply:0!==v.length&&v.length!==s.length,showClear:!!a})]})},An=function(t){var r=t.header,o=t.currentFilter,i=t.onApplyFilter,a=t.onClearFilter;return e(n,{children:function(){switch(r.type){case"number":return e(En,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return e(Tn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return e(kn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return e(Pn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return e(Nn,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},Dn=function(r){var u=r.content,l=r.children,c=r.delay,d=void 0===c?500:c,s=i(!1),f=s[0],v=s[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 e(n,{children:l});var I=h(l,{ref:y,onMouseEnter:function(){b.current=setTimeout(function(){if(y.current&&u.trim()){var e=y.current.getBoundingClientRect();if(e.width>0&&e.height>0){var n=e.left+e.width/2-100,t=e.bottom+8;8>n?n=8:n+200>window.innerWidth-8&&(n=window.innerWidth-200-8),t+40>window.innerHeight-8&&(t=e.top-40-8),g({top:t,left:n}),v(!0)}}},d)},onMouseLeave:function(){b.current&&(clearTimeout(b.current),b.current=null),v(!1)}});return t(n,{children:[I,f&&e("div",x({className:"st-tooltip",style:{position:"fixed",top:"".concat(w.top,"px"),left:"".concat(w.left,"px"),zIndex:1e4}},{children:u}))]})},Fn=function(n){var r,c,d=n.colIndex,s=n.gridColumnEnd,f=n.gridColumnStart,v=n.gridRowEnd,p=n.gridRowStart,w=n.header,m=n.parentHeader,g=n.reverse,b=n.sort,y=i(!1),I=y[0],C=y[1],S=i(!1),M=S[0],N=S[1],E=i(w.label||""),k=E[0],P=E[1],D=le(),F=D.activeHeaderDropdown,O=D.areAllRowsSelected,L=D.autoExpandColumns,W=D.collapsedHeaders,B=D.columnBorders,q=D.columnReordering,G=D.columnResizing,z=D.columnsWithSelectedCells,K=D.draggedHeaderRef,j=D.enableHeaderEditing,V=D.filterIcon,_=D.handleApplyFilter,U=D.handleClearFilter,J=D.handleSelectAll,X=D.headerCollapseIcon,Y=D.headerDropdown,$=D.headerExpandIcon,Z=D.headerRegistry,Q=D.headers,ee=D.hoveredHeaderRef,ne=D.onColumnOrderChange,te=D.onColumnSelect,re=D.onHeaderEdit,oe=D.onSort,ie=D.onTableHeaderDragEnd,ae=D.headerHeight,ue=D.selectColumns,ce=D.selectableColumns,de=D.selectedColumns,se=D.setActiveHeaderDropdown,fe=D.setCollapsedHeaders,ve=D.setHeaders,he=D.setInitialFocusedCell,pe=D.setIsResizing,we=D.setSelectedCells,me=D.setSelectedColumns,ge=D.sortDownIcon,be=D.sortUpIcon,ye=D.tableBodyContainerRef,Ie=!!(null==w?void 0:w.isSortable),Re=!!(null==w?void 0:w.filterable),Se=D.filters[w.accessor],Me=(null==F?void 0:F.accessor)===w.accessor,Ne=w.isSelectionColumn&&D.enableRowSelection,Ee=function(e){var n;return!(!(null===(n=e.children)||void 0===n?void 0:n.length)||!e.collapsible)}(w),Te=W.has(w.accessor),ke=function(e){var n=e.isOpen,t=e.estimatedHeight,r=void 0===t?200:t,u=e.estimatedWidth,l=void 0===u?250:u,c=e.margin,d=void 0===c?4:c,s=a(null),f=i({}),v=f[0],h=f[1];return o(function(){if(n&&s.current){var e=function(){if(s.current){var e=s.current.getBoundingClientRect(),n=window.innerHeight-e.bottom,t=window.innerWidth-e.right,o="bottom",i={};r>n&&e.top>=r&&(o="top");var a="left";l>t+e.width&&(a="right"),"bottom"===o?i.top=e.bottom+d:i.bottom=window.innerHeight-e.top+d,"left"===a?i.left=e.left:i.right=window.innerWidth-e.right,h(i)}};requestAnimationFrame(e);var t=function(){return requestAnimationFrame(e)},o=function(){return requestAnimationFrame(e)};return window.addEventListener("resize",t),window.addEventListener("scroll",o,!0),function(){window.removeEventListener("resize",t),window.removeEventListener("scroll",o,!0)}}h({})},[n,r,l,d]),{triggerRef:s,position:v}}({isOpen:Me,estimatedHeight:200,estimatedWidth:250,margin:4}),Pe=ke.triggerRef,Ae=ke.position,De=u(function(){var e,n,t;if(!B)return!1;var r=Q.filter(function(e){return"left"===e.pinned}),o=Q.filter(function(e){return!e.pinned}),i=Q.filter(function(e){return"right"===e.pinned});return"left"===w.pinned?(null===(e=r[r.length-1])||void 0===e?void 0:e.accessor)===w.accessor:"right"===w.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===w.accessor:(null===(t=o[o.length-1])||void 0===t?void 0:t.accessor)===w.accessor},[B,Q,w.accessor,w.pinned]),Fe=u(function(){return!(!ce||Ne)&&T(w,d).some(function(e){return de.has(e)})},[ce,Ne,w,d,de]),Oe=u(function(){return!Ne&&T(w,d).some(function(e){return z.has(e)})},[Ne,w,d,z]),Le=u(function(){return!(!w.children||0===w.children.length)&&(!Te||w.children.some(function(e){var n=e.showWhen||H;return"parentCollapsed"===n||"always"===n}))},[w.children,Te]),We=null==m?void 0:m.singleRowChildren,Be=Le&&!w.singleRowChildren,qe="st-header-cell ".concat(w.accessor===(null===(r=ee.current)||void 0===r?void 0:r.accessor)?"st-hovered":""," ").concat((null===(c=K.current)||void 0===c?void 0:c.accessor)===w.accessor?"st-dragging":""," ").concat(Ie?"clickable":""," ").concat(q&&!Ie?"columnReordering":""," ").concat(Be?"parent":""," ").concat(We?"st-sub-header":""," ").concat(De?"st-last-column":""," ").concat(j&&!Ne?"st-header-editable":""," ").concat(Fe?"st-header-selected":""," ").concat(Oe&&!Fe?"st-header-has-highlighted-cell":""),ze=Xe({draggedHeaderRef:K,headers:Q,hoveredHeaderRef:ee,onColumnOrderChange:ne,onTableHeaderDragEnd:ie}),Ke=ze.handleDragStart,je=ze.handleDragEnd,Ve=ze.handleDragOver,_e=Ge();o(function(){if(Z&&!w.isSelectionColumn){var e=w.accessor+"";return Z.set(e,{setEditing:function(e){N(e)}}),function(){Z.delete(e)}}},[Z,w.accessor,w.isSelectionColumn]),o(function(){P(w.label||"")},[w.label]);var Ue=function(e){C(!I)},Je=l(function(e){P(e);var n=Q.map(function(n){return n.accessor===w.accessor?x(x({},n),{label:e}):n});ve(n),re&&re(w,e)},[Q,ve,re,w]),$e=l(function(){se&&se(null)},[se]),Ze=l(function(e){e.stopPropagation(),fe(function(e){var n=new Set(e);return Te?n.delete(w.accessor):n.add(w.accessor),n})},[fe,Te,w.accessor]),Qe=function(e){var n=e.event,t=e.header;if(!t.isSelectionColumn){if(ce){var r=T(t,d),o=r.some(function(e){return de.has(e)});if(j&&o&&!n.shiftKey)return Y&&Me&&$e(),void N(!0);n.shiftKey&&ue?me(function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort(function(e,n){return e-n}),o=t[0],i=Math.abs(n-o);t.forEach(function(e){var t=Math.abs(n-e);i>t&&(i=t,o=e)});var a,u,l,c=R(R([],(l=Math.min(a=o,u=n),Array.from({length:Math.max(a,u)-l+1},function(e,n){return l+n})),!0),r,!0);return new Set(R(R([],Array.from(e),!0),c,!0))}):ue&&ue(r),we(new Set),he(null)}te&&te(t),!ce&&t.isSortable&&oe(t.accessor)}};if(o(function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}},[]),!w)return null;var en=G&&!Ne&&e("div",x({className:"st-header-resize-handle-container",role:"separator","aria-label":"Resize ".concat(w.label," column"),"aria-orientation":"vertical",onMouseDown:function(e){var n,t=null===(n=document.getElementById(A({accessor:w.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;_e({callback:sn,callbackProps:{event:e.nativeEvent,header:w,headers:Q,setHeaders:ve,setIsResizing:pe,tableBodyContainerRef:ye,startWidth:t,collapsedHeaders:W,autoExpandColumns:L,reverse:g},limit:10})},onTouchStart:function(e){var n,t=null===(n=document.getElementById(A({accessor:w.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;_e({callback:sn,callbackProps:{event:e,header:w,headers:Q,setHeaders:ve,setIsResizing:pe,tableBodyContainerRef:ye,startWidth:t,collapsedHeaders:W,autoExpandColumns:L,reverse:g},limit:10})}},{children:e("div",{className:"st-header-resize-handle"})})),nn=b&&b.key.accessor===w.accessor&&t("div",x({className:"st-icon-container",onClick:function(e){return Qe({event:e,header:w})},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||oe(w.accessor)},tabIndex:0,role:"button","aria-label":"Sort ".concat(w.label," ").concat("asc"===b.direction?"descending":"ascending")},{children:["asc"===b.direction&&be&&be,"desc"===b.direction&&ge&&ge]})),tn=Re&&V&&t("div",x({className:"st-icon-container",onClick:Ue,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.target===e.currentTarget||e.currentTarget.contains(e.target))&&(e.target.closest(".st-dropdown-content")||(e.preventDefault(),Ue()))},tabIndex:0,role:"button","aria-label":"Filter ".concat(w.label),"aria-expanded":I,"aria-haspopup":"dialog"},{children:[h(V,{style:{fill:Se?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e(xe,x({open:I,overflow:"visible",setOpen:C,onClose:function(){return C(!1)}},{children:e(An,{header:w,currentFilter:Se,onApplyFilter:function(e){_(e),C(!1)},onClearFilter:function(){U(w.accessor),C(!1)}})}))]})),rn=Ee&&!Ne&&e("div",x({className:"st-icon-container st-collapse-icon-container",onClick:function(e){return Ze(e)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ze(e))},tabIndex:0,role:"button","aria-label":"".concat(Te?"Expand":"Collapse"," ").concat(w.label," column"),"aria-expanded":!Te},{children:Te?X:$})),on=e(Dn,x({content:w.tooltip||""},{children:e("span",x({className:"st-header-label-text ".concat("right"===w.align?"right-aligned":"center"===w.align?"center-aligned":"left-aligned")},{children:Ne?e(Ye,{checked:!!O&&O(),onChange:function(e){J&&J(e)},ariaLabel:"Select all rows"}):M?e(Ce,{defaultValue:k,onBlur:function(){return N(!1)},onChange:Je}):k||(null==w?void 0:w.label)}))})),an="header-desc-".concat(w.accessor),un=function(e,n){var t=[];return e.type&&"other"!==e.type&&t.push("".concat(e.type," column")),e.isSortable&&t.push("sortable"),n&&t.push("filterable"),e.tooltip&&t.push(e.tooltip),t.join(", ")}(w,Re);return t(He,x({className:qe,id:A({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":d+1,"aria-describedby":un?an:void 0,onDragOver:function(e){Ne||_e({callback:Ve,callbackProps:{event:e,hoveredHeader:w},limit:50})},style:x({gridRowStart:p,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:s},v-p>1?{}:{height:ae})},{children:[g&&en,!w.headerRenderer&&"right"===w.align&&rn,!w.headerRenderer&&"right"===w.align&&tn,!w.headerRenderer&&"right"===w.align&&nn,e("div",x({ref:Pe,className:"st-header-label",draggable:q&&!w.disableReorder&&!Ne,onClick:function(e){Ne||Qe({event:e,header:w})},onDoubleClick:function(e){Ne||function(e){var n=e.header;n.isSelectionColumn||ce&&n.isSortable&&oe(n.accessor)}({event:e,header:w})},onDragEnd:Ne?void 0:function(e){e.preventDefault(),je()},onDragStart:Ne?void 0:function(e){q&&w&&function(e){Ke(e)}(w)}},{children:w.headerRenderer?w.headerRenderer({accessor:w.accessor,colIndex:d,header:w,components:{sortIcon:nn||void 0,filterIcon:tn||void 0,collapseIcon:rn||void 0,labelContent:on}}):on})),!w.headerRenderer&&"right"!==w.align&&nn,!w.headerRenderer&&"right"!==w.align&&tn,!w.headerRenderer&&"right"!==w.align&&rn,!g&&en,Y&&!Ne&&e("div",x({className:"st-header-dropdown-container"},{children:Y({accessor:w.accessor,colIndex:d,header:w,isOpen:Me,onClose:$e,position:Ae})})),un&&e("span",x({id:an,className:"st-sr-only"},{children:un}))]}))},On=function(t){var r=t.columnIndices,o=t.gridTemplateColumns,i=t.handleScroll,a=t.headers,l=t.maxDepth,c=t.pinned,d=t.sectionRef,s=t.sort,f=t.width,v=le().collapsedHeaders,h=u(function(){var e=[],n=1,t=function(o,i,u,d){var s,f;if(void 0===u&&(u=!1),!D({header:o,pinned:c,headers:a,collapsedHeaders:v}))return 0;u||n++;var h,p,w=null!==(f=null===(s=o.children)||void 0===s?void 0:s.filter(function(e){return D({header:e,pinned:c,headers:a,collapsedHeaders:v})}).length)&&void 0!==f?f:0,m=n;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),e.push({header:o,gridColumnStart:m,gridColumnEnd:h,gridRowStart:i,gridRowEnd:p,colIndex:r[o.accessor],parentHeader:d}),o.children&&o.children.length>0){var g=o.singleRowChildren?i:i+1,b=!o.singleRowChildren;o.children.forEach(function(e){D({header:e,pinned:c,headers:a,collapsedHeaders:v})&&(t(e,g,b,o),b=!1)})}return h-m},o=a.filter(function(e){return D({header:e,pinned:c,headers:a,collapsedHeaders:v})}),i=!0;return o.forEach(function(e){t(e,1,i),i=!1}),e},[a,l,c,r,v]);return e(un,x({childRef:d,group:c?"pinned-".concat(c):"default"},{children:e("div",x({className:"st-header-".concat(c?"pinned-".concat(c):"main")},i&&{onScroll:i},{ref:d,style:{gridTemplateColumns:o,width:f,position:"relative"}},{children:e(n,{children:h.map(function(n){return e(Fn,{colIndex:n.colIndex,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,parentHeader:n.parentHeader,reverse:"right"===c,sort:s},n.header.accessor)})})}))}))},Ln=function(n){var r=n.centerHeaderRef,o=n.headers,i=n.mainTemplateColumns,a=n.pinnedLeftColumns,l=n.pinnedLeftTemplateColumns,c=n.pinnedRightColumns,d=n.pinnedRightTemplateColumns,s=n.sort,f=n.pinnedLeftWidth,v=n.pinnedRightWidth,h=le(),p=h.headerContainerRef,w=h.pinnedLeftRef,m=h.pinnedRightRef,g=h.collapsedHeaders,b=h.tableRows,y=h.maxHeaderDepth,I=u(function(){return cn({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:g})},[o,a,c,g]),C=u(function(){return Object.keys(I).length},[I]);return t("div",x({className:"st-header-container",ref:p,"aria-rowcount":b.length+y,"aria-colcount":C},{children:[je(o,"left")&&e(On,{columnIndices:I,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:y,pinned:"left",sectionRef:w,sort:s,width:f}),e(On,{columnIndices:I,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:y,sectionRef:r,sort:s}),je(o,"right")&&e(On,{columnIndices:I,gridTemplateColumns:d,handleScroll:void 0,headers:o,maxDepth:y,pinned:"right",sectionRef:m,sort:s,width:v})]}))},Wn=function(e){var n=e.collapsedHeaders,t=e.autoExpandColumns,r=function(e){var t=e.flattenedHeaders;return e.headers.forEach(function(e){if(!e.hide&&!e.excludeFromRender)if(e.children&&e.children.length>0)if(n&&n.has(e.accessor)){var o=e.children.filter(function(e){var n=e.showWhen||H;return"parentCollapsed"===n||"always"===n});e.singleRowChildren&&t.push(e),o.length>0?r({headers:o,flattenedHeaders:t}):e.singleRowChildren||t.push(e)}else{var i=e.children.filter(function(e){var n=e.showWhen||H;return"parentExpanded"===n||"always"===n});e.singleRowChildren&&t.push(e),r({headers:i,flattenedHeaders:t})}else t.push(e)}),t},o=r({headers:e.headers,flattenedHeaders:[]});return"".concat(o.map(function(e){return function(e,n){var t=e.minWidth,r=e.width;return"number"==typeof r&&(r="".concat(r,"px")),t&&"number"==typeof t&&(t="".concat(t,"px")),void 0===t||n?r:"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(t,", ").concat(r,")"):"max(".concat(t,", ").concat(r,")")}(e,t)}).join(" "))},Bn=function(n){var r=n.hideHeader,o=n.pinnedLeftWidth,i=n.pinnedRightWidth,l=n.setScrollTop,c=n.setScrollDirection,d=n.shouldShowEmptyState,s=n.sort,f=n.tableRows,v=n.rowsToRender,h=le(),p=h.columnResizing,w=h.editColumns,m=h.headers,g=h.collapsedHeaders,b=h.autoExpandColumns,y=a(null),I=m.filter(function(e){return!e.pinned}),C=m.filter(function(e){return"left"===e.pinned}),R=m.filter(function(e){return"right"===e.pinned}),S=u(function(){return Wn({headers:C,collapsedHeaders:g,autoExpandColumns:b})},[C,g,b]),M=u(function(){return Wn({headers:I,collapsedHeaders:g,autoExpandColumns:b})},[I,g,b]),N=u(function(){return Wn({headers:R,collapsedHeaders:g,autoExpandColumns:b})},[R,g,b]),E={centerHeaderRef:y,headers:m,mainTemplateColumns:M,pinnedLeftColumns:C,pinnedLeftTemplateColumns:S,pinnedRightColumns:R,pinnedRightTemplateColumns:N,sort:s,pinnedLeftWidth:o,pinnedRightWidth:i},H={mainTemplateColumns:M,pinnedLeftColumns:C,pinnedLeftTemplateColumns:S,pinnedLeftWidth:o,pinnedRightColumns:R,pinnedRightTemplateColumns:N,pinnedRightWidth:i,rowsToRender:v,setScrollDirection:c,setScrollTop:l,shouldShowEmptyState:d,tableRows:f};return t("div",x({className:"st-content ".concat(p?"st-resizeable":"st-not-resizeable"),style:{width:w?"calc(100% - 27.5px)":"100%"}},{children:[!r&&e(Ln,x({},E)),e(dn,x({},H))]}))},qn=function(n){var r=n.mainBodyWidth,u=n.mainBodyRef,l=n.pinnedLeftWidth,c=n.pinnedRightWidth,d=n.pinnedLeftContentWidth,s=n.pinnedRightContentWidth,f=n.tableBodyContainerRef,v=le().editColumns,h=i(!1),p=h[0],w=h[1],m=a(null),g=a(null),b=a(null),y=v?28:0,I=(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&&e(un,x({childRef:g,group:"pinned-left"},{children:e("div",x({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:e("div",{style:{width:d}})}))})),r>0&&e(un,x({childRef:m},{children:e("div",x({className:"st-horizontal-scrollbar-middle",ref:m},{children:e("div",{style:{width:r}})}))})),c>0&&e(un,x({childRef:b,group:"pinned-right"},{children:e("div",x({className:"st-horizontal-scrollbar-right",ref:b,style:{width:I}},{children:e("div",{style:{width:s}})}))})),y>0&&e("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},Gn={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"asc"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"asc"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"asc"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"asc"===t?i:-i},enum:function(e,n,t){return Gn.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"asc"===t?-1:1:null==n?"asc"===t?1:-1:"string"==typeof e&&"string"==typeof n?Gn.string(e,n,t):"number"==typeof e&&"number"==typeof n?Gn.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?Gn.boolean(e,n,t):Gn.string(e+"",n+"",t)}},zn=function(e){return function(e){var n=e.rows,t=e.sortColumn,r=function(e,n){for(var t=0,o=e;o.length>t;t++){var i=o[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=r(i.children,n);if(a)return a}}},o=r(e.headers,t.key.accessor),i=(null==o?void 0:o.type)||"string",a=t.direction,u=t.key.accessor;return R([],n,!0).sort(function(e,t){var r,l;if(null==o?void 0:o.valueGetter){var c=n.indexOf(e),d=n.indexOf(t);r=o.valueGetter({accessor:u,row:e,rowIndex:c}),l=o.valueGetter({accessor:u,row:t,rowIndex:d})}else r=K(e,u),l=K(t,u);return(null==o?void 0:o.comparator)?o.comparator({rowA:e,rowB:t,valueA:r,valueB:l,direction:a}):function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"asc"===r?-1:1;if(null==n||""===n)return"asc"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=e+"";if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.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(e),a=o(n);return Gn.number(i,a,r)}return"date"===t?Gn.date(e+"",n+"",r):"boolean"===t?Gn.boolean(!!e,!!n,r):"enum"===t?Gn.enum(e+"",n+"",r):Gn.string(e+"",n+"",r)}(r,l,i,a)})}({rows:e.rows,sortColumn:e.sortColumn,headers:e.headers})},Kn=function(e){return u(function(){var n=k(e),t=new Map;return n.forEach(function(e){t.set(e.accessor,e)}),t},[e])},jn=function(e){var n=e.tableRows,t=e.sortColumn,r=e.rowGrouping,o=e.headers;return e.externalSortHandling?n:t?r&&r.length>0?(0,e.sortNestedRows)({groupingKeys:r,headers:o,rows:n,sortColumn:t}):zn({headers:o,rows:n,sortColumn:t}):n},Vn=function(e,n,t){void 0===t&&(t=new Set);for(var r=0,o=e;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(e){return e.accessor===n}),u=!1;if(!a)for(var l=0,c=i.children;c.length>l;l++){var d=c[l];if(Vn([d],n,t),!1===d.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},_n=function(e){return e.every(function(e){return e.hide})},Un=function(e){e.forEach(function(e){e.children&&e.children.length>0&&(Un(e.children),_n(e.children)&&(e.hide=!0))})},Jn=function(r){var o=r.allHeaders,a=r.depth,u=void 0===a?0:a,l=r.doesAnyHeaderHaveChildren,c=r.header,d=r.isCheckedOverride,s=i(!0),f=s[0],v=s[1],h=le(),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,I=null!=d?d:!(c.hide||y&&c.children&&_n(c.children));return t(n,{children:[t("div",x({className:"st-header-checkbox-item",style:{paddingLeft:b}},{children:[l&&e("div",x({className:"st-header-icon-container"},{children:y?e("div",x({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),v(!f)}},{children:p})):null})),e(Ye,x({checked:I,onChange:function(e){c.hide=!e,e?(Vn(o,c.accessor),y&&c.children&&c.children.length>0&&c.children.every(function(e){return!0===e.hide})&&c.children[0]&&(c.children[0].hide=!1,Vn(o,c.children[0].accessor))):Un(o);var n=R([],w,!0);if(m(n),g){var t=function(e){var n={},t=function(e){n[e.accessor]=!e.hide,e.children&&e.children.length>0&&e.children.forEach(t)};return e.forEach(t),n}(n);g(t)}}},{children:c.label}))]})),y&&f&&c.children&&e("div",x({className:"st-nested-headers"},{children:c.children.map(function(n,t){return e(Jn,{allHeaders:o,depth:u+1,doesAnyHeaderHaveChildren:l,header:n,isCheckedOverride:!!I&&void 0},"".concat(n.accessor,"-").concat(t))})}))]})},Xn=function(n){var t=n.headers,r=n.open,o="left"===n.position?"left":"",i=u(function(){return t.some(function(e){return e.children&&e.children.length>0})},[t]);return e("div",x({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(o),onClick:function(e){return e.stopPropagation()}},{children:e("div",x({className:"st-column-editor-popout-content"},{children:t.map(function(n,r){return n.isSelectionColumn||n.excludeFromRender?null:e(Jn,{doesAnyHeaderHaveChildren:i,header:n,allHeaders:t},"".concat(n.accessor,"-").concat(r))})}))}))},Yn=function(n){var r=n.columnEditorText,o=n.headers,i=n.open,a=n.position,u=void 0===a?"right":a,l=n.setOpen;return n.editColumns?t("div",x({className:"st-column-editor ".concat(i?"open":""," ").concat(u),onClick:function(){l(!i)},style:{width:28}},{children:[e("div",x({className:"st-column-editor-text"},{children:r})),e(Xn,{headers:o,open:i,position:u})]})):null},$n=function(n){var t=n.children,o=a({}),i=l(function(e,n){return!!o.current[n]&&o.current[n].find(function(n){return n===e})},[]),u=l(function(e,n){e.scrollWidth-e.clientWidth>0&&(n.scrollLeft=e.scrollLeft)},[]),c=l(function(e){e.onscroll=null},[]),d=l(function(e,n){e.onscroll=function(){window.requestAnimationFrame(function(){n.forEach(function(n){var t;null===(t=o.current[n])||void 0===t||t.forEach(function(n){e!==n&&(c(n),u(e,n),window.requestAnimationFrame(function(){var e=Object.keys(o.current).filter(function(e){return o.current[e].includes(n)});d(n,e)}))})})})}},[c,u]),s=l(function(e,n){n.forEach(function(n){o.current[n]||(o.current[n]=[]),i(e,n)||(o.current[n].length>0&&u(o.current[n][0],e),o.current[n].push(e))}),d(e,n)},[i,u,d]),f=l(function(e,n){n.forEach(function(n){if(i(e,n)){c(e);var t=o.current[n].indexOf(e);-1!==t&&o.current[n].splice(t,1)}})},[i,c]);return e(an.Provider,x({value:{registerPane:s,unregisterPane:f}},{children:r.Children.only(t)}))},Zn=function(e){var n=e.tableRows,t=e.filterState;return e.externalFilterHandling?n:t&&0!==Object.keys(t).length?n.filter(function(e){return Object.values(t).every(function(n){try{return function(e,n){var t=n.operator,r=n.value,o=n.values;if(null==e)return"isEmpty"===t;if("isEmpty"===t)return!e||""===(e+"").trim();if("isNotEmpty"===t)return e&&""!==(e+"").trim();if("string"==typeof e||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=(e+"").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 e||!isNaN(+e)){var u=+e,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),d=c[1];return u>=c[0]&&d>=u}return!1;case"notBetween":if(o&&2===o.length){var s=o.map(Number);return d=s[1],s[0]>u||u>d}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=Fe(e),v=Fe((r||"")+""),h=De(f),p=De(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(e){return De(Fe((e||"")+""))}),m=w[1];return h>=w[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(e){return De(Fe((e||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof e&&"equals"===t)return e===!!r;if(Array.isArray(e)){var b=e.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", ");e=b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var x=o.includes(e+"");return"in"===t?x:!x}return!1}var y=(e+"").toLowerCase(),I=r?(r+"").toLowerCase():"";switch(t){case"equals":return y===I;case"notEquals":return y!==I;default:return!0}}(K(e,n.accessor),n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}})}):n},Qn=function(e){var n,t=document.querySelector(".simple-table-root");if("string"==typeof e){if(e.endsWith("px"))return parseInt(e,10);if(e.endsWith("vh"))return window.innerHeight*parseInt(e,10)/100;if(e.endsWith("%")){var r=null===(n=null==t?void 0:t.parentElement)||void 0===n?void 0:n.clientHeight;return!r||50>r?0:r*parseInt(e,10)/100}return window.innerHeight}return e},et=function(e,n,t,r){var o=[],i=function(e){e.forEach(function(e){var t=r?e[r]:void 0;if(r&&t&&V(t))i(t);else{var a=K(e,n);null!=a&&o.push(a)}})};if(i(e),0!==o.length){if("custom"===t.type&&t.customFn)return t.customFn(o);var a,u=t.parseValue?o.map(t.parseValue).filter(function(e){return!isNaN(e)}):o.map(function(e){return"number"==typeof e?e:"string"==typeof e?parseFloat(e):NaN}).filter(function(e){return!isNaN(e)});if(0===u.length)return"count"===t.type?o.length:void 0;switch(t.type){case"sum":a=u.reduce(function(e,n){return e+n},0);break;case"average":a=u.reduce(function(e,n){return e+n},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}},nt=function(e){if(null==e)return"";var n=e+"";if(n.includes(",")||n.includes('"')||n.includes("\n")||n.includes("\r")){var t=n.replace(/"/g,'""');return'"'.concat(t,'"')}return n},tt=function(e){return function(){for(var n=[],t=0;arguments.length>t;t++)n[t]=arguments[t];return new Promise(function(t){e.apply(void 0,n),setTimeout(function(){return t()},0)})}},rt=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},ot={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}},it=function(e){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.top="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating")},at=function(e,n,t,r){return void 0===t&&(t={}),new Promise(function(r){e.style.transition="transform ".concat(n.duration,"ms ").concat(n.easing),n.delay&&(e.style.transitionDelay="".concat(n.delay,"ms")),e.style.transform="translate3d(0, 0, 0)";var o=function(){it(e),e.removeEventListener("transitionend",o),t.onComplete&&t.onComplete(),r()};e.addEventListener("transitionend",o),setTimeout(o,n.duration+(n.delay||0)+50)})},ut=function(e){var n=e.element,t=e.finalConfig,r=e.fromBounds,o=e.toBounds;return I(void 0,void 0,void 0,function(){var e,i;return C(this,function(a){switch(a.label){case 0:return e=function(e,n){return{x:("x"in e?e.x:e.left)-n.x,y:("y"in e?e.y:e.top)-n.y}}(r,o),0===e.x&&0===e.y||rt()&&!1!==t.respectReducedMotion?[2]:(u=t,l=Math.abs(e.x)>Math.abs(e.y)?"column":"row",void 0===u&&(u={}),i=rt()?x(x({},ot.REDUCED_MOTION),u):x(x({},"column"===l?ot.COLUMN_REORDER:ot.ROW_REORDER),u),it(n),function(e,n){e.style.transform="translate3d(".concat(n.x,"px, ").concat(n.y,"px, 0)"),e.style.transition="none",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.classList.add("st-animating")}(n,e),[4,at(n,i,t)]);case 1:return a.sent(),[2]}var u,l})})},lt=function(e){var n=e.element,t=e.options;return I(void 0,void 0,void 0,function(){var e,r,o,i,a,u,l,c,d,s,f,v,h,p,w,m;return C(this,function(g){return e=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,d=void 0===(c=t.delay)?0:c,s=t.onComplete,v=void 0===(f=t.respectReducedMotion)||f,rt()&&v?(void 0!==o&&(n.style.transform="",n.style.top="".concat(o,"px")),s&&s(),[2]):(h=n.getBoundingClientRect(),w=e-(p=h.top),m=r-p,[2,new Promise(function(e){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),n.style.transform="translate3d(0, ".concat(w,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating"),n.style.transition="transform ".concat(a,"ms ").concat(l),d&&(n.style.transitionDelay="".concat(d,"ms")),n.style.transform="translate3d(0, ".concat(m,"px, 0)");var t=function(){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),void 0!==o&&(n.style.top="".concat(o,"px")),n.removeEventListener("transitionend",t),s&&s(),e()};n.addEventListener("transitionend",t),setTimeout(t,a+(d||0)+50)})])})})},ct=function(e){var n=e.rows,t=e.rowGrouping,r=void 0===t?[]:t,o=e.getRowId,i=e.expandedRows,a=e.collapsedRows,l=e.expandedDepths,c=e.rowStateMap,d=e.hasLoadingRenderer,s=e.hasErrorRenderer,f=e.hasEmptyRenderer,v=e.headers,h=e.rowHeight,p=e.headerHeight,w=e.customTheme;return u(function(){if(!r||0===r.length){var e=n.map(function(e,n){var t=[n],r=[n];return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,rowId:_({row:e,getRowId:o,depth:0,index:n,rowPath:t,rowIndexPath:r,groupingKey:void 0}),rowPath:t,rowIndexPath:r,absoluteRowIndex:n,isLastGroupRow:!0}});return{flattenedRows:e,heightOffsets:[],paginatableRows:e,parentEndPositions:n.map(function(e,n){return n+1})}}var t=[],u=[],m=[],g=[],b=0,x=function(e,n,y,I){void 0===y&&(y=[]),void 0===I&&(I=[]),e.forEach(function(e,C){var S,M,N=r[n],E=t.length,H=R(R([],y,!0),[C],!1),T=R(R([],I,!0),[C],!1),k=_({row:e,getRowId:o,depth:n,index:C,rowPath:H,rowIndexPath:T,groupingKey:N}),P={row:e,depth:n,displayPosition:b,groupingKey:N,position:E,isLastGroupRow:0===n,rowId:k,rowPath:H,rowIndexPath:T,absoluteRowIndex:E};t.push(P),u.push(P),b++;var A=U(k);if(X(A,n,l,i,a)&&r.length>n){var D=null==c?void 0:c.get(A),F=J(e,N),O=v.find(function(e){return e.expandable&&e.nestedTable});if((null==O?void 0:O.nestedTable)&&F.length>0){var L=t.length,W=(null===(S=O.nestedTable.customTheme)||void 0===S?void 0:S.rowHeight)||h,B=(null===(M=O.nestedTable.customTheme)||void 0===M?void 0:M.headerHeight)||p,q=G({childRowCount:F.length,rowHeight:W,headerHeight:B,customTheme:w});m.push([L,q-h]);var z=R(R([],H,!0),[N],!1);t.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:N,position:L,isLastGroupRow:!1,rowId:z,rowPath:z,rowIndexPath:T,nestedTable:{parentRow:e,expandableHeader:O,childAccessor:N,calculatedHeight:q},absoluteRowIndex:L})}else if(D&&(D.loading||D.error||D.isEmpty)){if(D.loading&&d||D.error&&s||D.isEmpty&&f){var K=t.length,j=R(R([],H,!0),[N],!1);t.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:N,position:K,isLastGroupRow:!1,rowId:j,rowPath:j,rowIndexPath:T,stateIndicator:{parentRowId:A,state:D},absoluteRowIndex:K})}else if(D.loading&&!d){var V=t.length,Y=R(R([],H,!0),[N,"loading-skeleton"],!1);t.push({row:{},depth:n+1,displayPosition:b-1,groupingKey:N,position:V,isLastGroupRow:!1,rowId:Y,rowPath:Y,rowIndexPath:T,isLoadingSkeleton:!0,absoluteRowIndex:V})}}else if(F.length>0){var $=R(R([],H,!0),[N],!1),Z=R([],T,!0);x(F,n+1,$,Z)}}0===n&&g.push(t.length)})};return x(n,0,[],[]),{flattenedRows:t,heightOffsets:m,paginatableRows:u,parentEndPositions:g}},[n,r,o,i,a,l,c,d,s,f,v,h,p,w])},dt=function(){return e("div",x({className:"st-empty-state"},{children:"No rows to display"}))},st={rowHeight:32,headerHeight:32,footerHeight:49,rowSeparatorWidth:1,borderWidth:1,pinnedBorderWidth:1,nestedGridBorderWidth:2,nestedGridPaddingTop:8,nestedGridPaddingBottom:8,nestedGridPaddingLeft:8,nestedGridPaddingRight:8,nestedGridMaxHeight:400,selectionColumnWidth:42},ft=function(n){var t=i(!1),r=t[0],a=t[1];return o(function(){a(!0)},[]),r?e(vt,x({},n)):null},vt=function(n){var r=n.allowAnimations,c=void 0!==r&&r,d=n.autoExpandColumns,s=void 0!==d&&d,f=n.canExpandRowGroup,v=n.cellUpdateFlash,h=void 0!==v&&v,p=n.className,w=n.columnBorders,m=void 0!==w&&w,y=n.columnEditorPosition,S=void 0===y?"right":y,N=n.columnEditorText,H=void 0===N?"Columns":N,T=n.columnReordering,P=void 0!==T&&T,A=n.columnResizing,D=void 0!==A&&A,L=n.copyHeadersToClipboard,W=void 0!==L&&L,B=n.customTheme,q=n.defaultHeaders,G=n.editColumns,z=void 0!==G&&G,J=n.editColumnsInitOpen,X=void 0!==J&&J,$=n.emptyStateRenderer,Z=n.enableHeaderEditing,Q=void 0!==Z&&Z,ne=n.enableRowSelection,te=void 0!==ne&&ne,re=n.errorStateRenderer,ae=n.expandAll,le=void 0===ae||ae,de=n.expandIcon,ve=void 0===de?e(fe,{className:"st-expand-icon"}):de,pe=n.externalFilterHandling,ge=void 0!==pe&&pe,xe=n.externalSortHandling,ye=void 0!==xe&&xe,Ie=n.filterIcon,Ce=void 0===Ie?e(me,{className:"st-header-icon"}):Ie,Re=n.footerRenderer,Se=n.headerCollapseIcon,Me=void 0===Se?e(fe,{className:"st-header-icon"}):Se,Ne=n.headerDropdown,Ee=n.headerExpandIcon,He=void 0===Ee?e(se,{className:"st-header-icon"}):Ee,Te=n.height,ke=n.hideFooter,Pe=void 0!==ke&&ke,Ae=n.hideHeader,De=void 0!==Ae&&Ae,Fe=n.includeHeadersInCSVExport,Oe=void 0===Fe||Fe,Le=n.initialSortColumn,We=n.initialSortDirection,Be=void 0===We?"asc":We,qe=n.isLoading,Ge=void 0!==qe&&qe,Ke=n.loadingStateRenderer,je=n.maxHeight,Ve=n.nextIcon,_e=void 0===Ve?e(fe,{className:"st-next-prev-icon"}):Ve,Ue=n.onCellClick,Je=n.onCellEdit,Xe=n.onColumnOrderChange,Ye=n.onColumnSelect,$e=n.onColumnVisibilityChange,Ze=n.onFilterChange,Qe=n.onGridReady,en=n.onHeaderEdit,nn=n.onLoadMore,tn=n.onNextPage,rn=n.onPageChange,on=n.onRowGroupExpand,an=n.onRowSelectionChange,un=n.onSortChange,ln=n.prevIcon,cn=void 0===ln?e(se,{className:"st-next-prev-icon"}):ln,dn=n.rowButtons,sn=n.rowGrouping,fn=n.getRowId,hn=n.rows,pn=n.rowsPerPage,wn=void 0===pn?10:pn,mn=n.selectableCells,gn=void 0!==mn&&mn,bn=n.selectableColumns,xn=void 0!==bn&&bn,yn=n.serverSidePagination,In=void 0!==yn&&yn,Cn=n.shouldPaginate,Rn=void 0!==Cn&&Cn,Sn=n.sortDownIcon,Mn=void 0===Sn?e(we,{className:"st-header-icon"}):Sn,Nn=n.sortUpIcon,En=void 0===Nn?e(he,{className:"st-header-icon"}):Nn,Hn=n.tableEmptyStateRenderer,Tn=void 0===Hn?e(dt,{}):Hn,kn=n.tableRef,Pn=n.theme,An=void 0===Pn?"light":Pn,Dn=n.totalRowCount,Fn=n.useHoverRowBackground,On=void 0===Fn||Fn,Ln=n.useOddColumnBackground,Wn=void 0!==Ln&&Ln,Gn=n.useOddEvenRowBackground,Vn=void 0!==Gn&&Gn,_n=u(function(){return x(x({},st),B)},[B]),Un=_n.rowHeight,Jn=_n.headerHeight,Xn=_n.footerHeight,rt=_n.selectionColumnWidth;Wn&&(Vn=!1),m&&(On=!1);var it=a(null),at=a(null),ut=a(null),lt=a(null),ft=a(null),vt=a(null),ht=a(null),pt=b(function(e){return e+1},0)[1],wt=i(new Map),mt=wt[0],gt=wt[1],bt=i(hn),xt=bt[0],yt=bt[1],It=i(Ge),Ct=It[0],Rt=It[1],St=a(Ge),Mt=a(new Map);o(function(){yt(hn);var e=new Map;hn.forEach(function(n,t){var r=_({row:n,getRowId:fn,depth:0,index:t,rowPath:[t],rowIndexPath:[t]}),o=U(r);e.set(o,t)}),Mt.current=e},[hn,fn]),o(function(){var e=St.current,n=Ge;n&&!e?Rt(!0):!n&&e&&setTimeout(function(){Rt(!1)},0),St.current=Ge},[Ge]);var Nt,Et,Ht,Tt,kt,Pt,At,Dt,Ft,Ot,Lt=function(e){var n=e.tableBodyContainerRef,t=i(0),r=t[0],o=t[1];return g(function(){n.current&&o(n.current.offsetWidth-n.current.clientWidth)},[n]),{setScrollbarWidth:o,scrollbarWidth:r,tableBodyContainerRef:n}}({tableBodyContainerRef:vt}),Wt=Lt.scrollbarWidth,Bt=Lt.setScrollbarWidth,qt=be({headerContainerRef:ht,mainSectionRef:vt,scrollbarWidth:Wt}).isMainSectionScrollable,Gt=u(function(){if(Ct&&0===xt.length){var e=Rn?wn:10;return qt&&(e+=1),Array.from({length:e},function(e,n){return{}})}return xt},[Ct,xt,wn,qt,Rn]),zt=i(1),Kt=zt[0],jt=zt[1],Vt=i(q),_t=Vt[0],Ut=Vt[1],Jt=i(!1),Xt=Jt[0],Yt=Jt[1],$t=i(!1),Zt=$t[0],Qt=$t[1],er=i(null),nr=er[0],tr=er[1],rr=i(X),or=rr[0],ir=rr[1],ar=l(function(){var e=new Set,n=function(t){t.forEach(function(t){t.collapseDefault&&t.collapsible&&e.add(t.accessor),t.children&&n(t.children)})};return n(q),e},[q]),ur=i(ar),lr=ur[0],cr=ur[1];o(function(){Ut(q)},[q]);var dr=u(function(){var e,n=R([],_t,!0);return te&&!(null===(e=null==_t?void 0:_t[0])||void 0===e?void 0:e.isSelectionColumn)&&(n=R([{accessor:"__row_selection__",label:"",width:rt,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],n,!0)),n},[te,_t,rt]),sr=i(0),fr=sr[0],vr=sr[1],hr=i("none"),pr=hr[0],wr=hr[1],mr=function(e,n){var t=i(function(){return function(e,n){if(!n||0===n.length)return new Set;if(e){var t=Array.from({length:n.length},function(e,n){return n});return new Set(t)}return new Set}(e,n)}),r=t[0],a=t[1];return o(function(){a(n&&0!==n.length?function(e){var t=n.length,r=Array.from(e).filter(function(e){return t>e});return new Set(r)}:new Set)},[n]),{expandedDepths:r,setExpandedDepths:a}}(le,sn),gr=mr.expandedDepths,br=mr.setExpandedDepths,xr=i(new Map),yr=xr[0],Ir=xr[1],Cr=i(new Map),Rr=Cr[0],Sr=Cr[1],Mr=function(){var e=i(""),n=e[0],t=e[1],r=a(null);return o(function(){return n&&(r.current&&clearTimeout(r.current),r.current=setTimeout(function(){t("")},1e3)),function(){r.current&&clearTimeout(r.current)}},[n]),{announcement:n,announce:function(e){t(e)}}}(),Nr=Mr.announcement,Er=Mr.announce,Hr=function(e){var n=e.effectiveHeaders,t=e.headerHeight,r=e.rowHeight,o=e.tableBodyContainerRef,a=i(0),c=a[0],d=a[1],s=l(function(e){var n,t;return e.singleRowChildren&&(null===(n=e.children)||void 0===n?void 0:n.length)?1:(null===(t=e.children)||void 0===t?void 0:t.length)?1+Math.max.apply(Math,e.children.map(s)):1},[]),f=u(function(){var e=0;return n.forEach(function(n){var t=s(n);e=Math.max(e,t)}),e},[n,s]),v=u(function(){var e=1;if("undefined"!=typeof window){var n=document.documentElement,o=getComputedStyle(n).getPropertyValue("--st-border-width").trim();if(o){var i=parseFloat(o);isNaN(i)||(e=i)}}return f*(null!=t?t:r)+e},[f,t,r]);return g(function(){var e=function(){o.current&&d(o.current.clientWidth)};e();var n=null;return o.current&&(n=new ResizeObserver(e)).observe(o.current),function(){n&&n.disconnect()}},[o]),{containerWidth:c,calculatedHeaderHeight:v,maxHeaderDepth:f}}({effectiveHeaders:dr,headerHeight:Jn,rowHeight:Un,tableBodyContainerRef:vt}),Tr=Hr.containerWidth,kr=Hr.calculatedHeaderHeight,Pr=Hr.maxHeaderDepth,Ar=a(0),Dr=a(0),Fr=u(function(){var e=E(window.innerWidth),n=vn({headers:dr,containerWidth:Tr,maxPinnedWidthPercent:e,collapsedHeaders:lr});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[dr,Tr,lr]),Or=Fr.mainBodyWidth,Lr=Fr.pinnedLeftWidth,Wr=Fr.pinnedRightWidth,Br=Fr.pinnedLeftContentWidth,qr=Fr.pinnedRightContentWidth;o(function(){if(s&&0!==Tr&&!Xt){var e,n=function(e){var t=[];return e.forEach(function(e){e.hide||(e.children&&e.children.length>0?t.push.apply(t,n(e.children)):t.push(e))}),t};if((e=ut.current?ut.current.clientWidth:Math.max(0,Tr-Lr-Wr))>0){var t=_t.filter(function(e){return!e.pinned});n(t).length===Dr.current&&10>Math.abs(e-Ar.current)||Ut(function(t){var r=t.filter(function(e){return!e.pinned}),o=n(r),i=o.reduce(function(e,n){return e+("number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):150)},0);if(0===i)return t;var a=e/i;if(.01>Math.abs(a-1))return t;Ar.current=e,Dr.current=o.length;var u=new Map,l=0;o.forEach(function(n,t){if(!n.pinned){var r,i="number"==typeof n.width?n.width:"string"==typeof n.width&&n.width.endsWith("px")?parseFloat(n.width):150;t===o.length-1?r=e-l:l+=r=Math.round(i*a),u.set(n.accessor,r)}});var c=function(e){var n;if(e.hide)return e;var t=null===(n=e.children)||void 0===n?void 0:n.map(c);if(!e.children||0===e.children.length){if(e.pinned)return x(x({},e),{children:t});var r=u.get(e.accessor);if(void 0!==r)return x(x({},e),{width:r,children:t});var o="number"==typeof e.width?e.width:"string"==typeof e.width&&e.width.endsWith("px")?parseFloat(e.width):150;return x(x({},e),{width:Math.round(o*a),children:t})}return x(x({},e),{children:t})};return t.map(c)})}}},[s,Tr,Xt,_t,Lr,Wr]);var Gr=function(e){var n=e.rows,t=e.headers,r=e.rowGrouping;return u(function(){if(!r||0===r.length)return n;var e=function(e){return k(e).filter(function(e){return e.aggregation})}(t);if(0===e.length)return n;var o=JSON.parse(JSON.stringify(n)),i=function(n,t){return void 0===t&&(t=0),n.map(function(n){var o=r[t],a=r[t+1],u=n[o];if(u&&V(u)){var l=i(u,t+1),c=x({},n);return c[o]=l,e.forEach(function(e){var n=et(l,e.accessor,e.aggregation,a);void 0!==n&&j(c,e.accessor,n)}),c}return n})};return i(o)},[n,t,r])}({rows:Gt,headers:_t,rowGrouping:sn}),zr=function(e){var n=e.rows,t=e.headers,r=e.externalFilterHandling,o=e.onFilterChange,a=e.announce,c=i({}),d=c[0],s=c[1],f=Kn(t),v=u(function(){return Zn({externalFilterHandling:r,tableRows:n,filterState:d})},[n,d,r]),h=l(function(e){var n,t=x(x({},d),((n={})[e.accessor]=e,n));if(s(t),null==o||o(t),a){var r=f.get(e.accessor);r&&a("Filter applied to ".concat(r.label))}},[d,o,a,f]),p=l(function(e){var n=x({},d);if(delete n[e],s(n),null==o||o(n),a){var t=f.get(e);t&&a("Filter removed from ".concat(t.label))}},[d,o,a,f]),w=l(function(){s({}),null==o||o({}),a&&a("All filters cleared")},[o,a]),m=l(function(e){var t,o=x(x({},d),((t={})[e.accessor]=e,t));return Zn({externalFilterHandling:r,tableRows:n,filterState:o})},[d,n,r]);return{filteredRows:v,updateFilter:h,clearFilter:p,clearAllFilters:w,filters:d,computeFilteredRowsPreview:m}}({rows:Gr,headers:dr,externalFilterHandling:ge,onFilterChange:Ze,announce:Er}),Kr=zr.filters,jr=zr.updateFilter,Vr=zr.clearFilter,_r=zr.clearAllFilters,Ur=zr.computeFilteredRowsPreview,Jr=function(e){var n=e.headers,t=e.tableRows,r=e.externalSortHandling,o=e.onSortChange,a=e.rowGrouping,c=e.initialSortColumn,d=e.initialSortDirection,s=e.announce,f=Kn(n),v=l(function(){if(!c)return null;var e=f.get(c);return e?{key:e,direction:d||"asc"}:null},[f,c,d]),h=i(v),p=h[0],w=h[1],m=l(function(e){var n=e.groupingKeys,t=e.headers,r=e.sortColumn,o=zn({headers:t,rows:e.rows,sortColumn:r});return n&&0!==n.length?o.map(function(e){var o,i=n[0],a=e[i];if(V(a)){var u=m({rows:a,sortColumn:r,headers:t,groupingKeys:n.slice(1)});return x(x({},e),((o={})[i]=u,o))}return e}):o},[]),g=u(function(){return jn({externalSortHandling:r,tableRows:t,sortColumn:p,rowGrouping:a,headers:n,sortNestedRows:m})},[t,p,n,r,a,m]),b=l(function(e){if(!e)return w(null),void(null==o||o(null));var n=e.accessor,t=e.direction,r=f.get(n);if(r){var i=null;if(t)i={key:r,direction:t};else{var a=r.sortingOrder||["asc","desc",null],u=-1;p&&p.key.accessor===n&&(u=a.indexOf(p.direction));var l=a[(u+1)%a.length];i=null===l?null:{key:r,direction:l}}if(w(i),null==o||o(i),s)if(i){var c="asc"===i.direction?"ascending":"descending";s("Sorted by ".concat(r.label,", ").concat(c))}else s("Sort removed from ".concat(r.label))}},[p,f,o,s]),y=l(function(e){var o=function(n){for(var t=0,r=n;r.length>t;t++){var i=r[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=o(i.children);if(a)return a}}},i=o(n);if(!i)return t;var u=i.sortingOrder||["asc","desc",null],l=-1;p&&p.key.accessor===e&&(l=u.indexOf(p.direction));var c=u[(l+1)%u.length];return jn({externalSortHandling:r,tableRows:t,sortColumn:null===c?null:{key:i,direction:c},rowGrouping:a,headers:n,sortNestedRows:m})},[p,n,t,r,a,m]);return{sort:p,sortedRows:g,updateSort:b,computeSortedRowsPreview:y}}({headers:_t,tableRows:zr.filteredRows,externalSortHandling:ye,onSortChange:un,rowGrouping:sn,initialSortColumn:Le,initialSortDirection:Be,announce:Er}),Xr=Jr.sort,Yr=Jr.updateSort,$r=Jr.computeSortedRowsPreview,Zr=ct({rows:Jr.sortedRows,rowGrouping:sn,getRowId:fn,expandedRows:yr,collapsedRows:Rr,expandedDepths:gr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:dr,rowHeight:Un,headerHeight:Jn,customTheme:_n}),Qr=Zr.flattenedRows,eo=Zr.heightOffsets,no=Zr.paginatableRows,to=Zr.parentEndPositions,ro=function(e){var n=e.tableRows,t=e.onRowSelectionChange,r=e.enableRowSelection,o=void 0!==r&&r,a=i(new Set),c=a[0],d=a[1],s=l(function(e){return!!o&&function(e,n){return n.has(e)}(e,c)},[c,o]),f=l(function(){return!!o&&function(e,n){return 0!==e.length&&e.filter(function(e){return e&&e.rowId}).every(function(e){return n.has(U(e.rowId))})}(n,c)},[n,c,o]),v=u(function(){return o?function(e){return e.size}(c):0},[c,o]),h=u(function(){return o?function(e,n){return e.filter(function(e){return!(!e||!e.rowId)&&n.has(U(e.rowId))}).map(function(e){return e.row})}(n,c):[]},[n,c,o]),p=l(function(e,r){if(o){var i=function(e,n){var t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}(e,c);if(d(i),t){var a=n.find(function(n){return U(n.rowId)===e});a&&t({row:a.row,isSelected:r,selectedRows:i})}}},[c,n,t,o]),w=l(function(e){var r;o&&(e?(r=function(e){return new Set(e.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)}))}(n),t&&n.forEach(function(e){return t({row:e.row,isSelected:!0,selectedRows:r})})):(r=new Set,t&&c.forEach(function(e){var o=n.find(function(n){return U(n.rowId)===e});o&&t({row:o.row,isSelected:!1,selectedRows:r})})),d(r))},[n,t,c,o]),m=l(function(e){if(o){var n=s(e);p(e,!n)}},[s,p,o]),g=l(function(){if(o){if(t){var e=new Set;c.forEach(function(r){var o=n.find(function(e){return U(e.rowId)===r});o&&t({row:o.row,isSelected:!1,selectedRows:e})})}d(new Set)}},[c,n,t,o]);return{selectedRows:c,setSelectedRows:d,isRowSelected:s,areAllRowsSelected:f,selectedRowCount:v,selectedRowsData:h,handleRowSelect:p,handleSelectAll:w,handleToggleRow:m,clearSelection:g}}({tableRows:Qr,onRowSelectionChange:an,enableRowSelection:te});Nt=ro.selectedRows,Et=ro.setSelectedRows,Ht=ro.isRowSelected,Tt=ro.areAllRowsSelected,kt=ro.selectedRowCount,Pt=ro.selectedRowsData,At=ro.handleRowSelect,Dt=ro.handleSelectAll,Ft=ro.handleToggleRow,Ot=ro.clearSelection;var oo=ct({rows:Gr,rowGrouping:sn,getRowId:fn,expandedRows:yr,collapsedRows:Rr,expandedDepths:gr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:dr,rowHeight:Un,headerHeight:Jn,customTheme:_n}).flattenedRows,io=l(function(e){var n=Ur(e);return sn&&0!==sn.length?Y({rows:n,rowGrouping:sn,getRowId:fn,expandedRows:yr,collapsedRows:Rr,expandedDepths:gr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:dr,rowHeight:Un,headerHeight:Jn,customTheme:_n}):n.map(function(e,n){return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,isLastGroupRow:!1,rowId:[n],rowPath:[n],absoluteRowIndex:n}})},[Ur,sn,fn,yr,Rr,gr,mt,Ke,re,$,dr,Un,Jn,_n]),ao=l(function(e){var n=$r(e);return sn&&0!==sn.length?Y({rows:n,rowGrouping:sn,getRowId:fn,expandedRows:yr,collapsedRows:Rr,expandedDepths:gr,rowStateMap:mt,hasLoadingRenderer:!!Ke,hasErrorRenderer:!!re,hasEmptyRenderer:!!$,headers:dr,rowHeight:Un,headerHeight:Jn,customTheme:_n}):n.map(function(e,n){return{row:e,depth:0,displayPosition:n,groupingKey:void 0,position:n,isLastGroupRow:!1,rowId:[n],rowPath:[n],absoluteRowIndex:n}})},[$r,sn,fn,yr,Rr,gr,mt,Ke,re,$,dr,Un,Jn,_n]),uo=function(e){var n=e.height,t=e.maxHeight,r=e.rowHeight,o=e.totalRowCount,i=e.headerHeight,a=e.footerHeight;return u(function(){if(t){var e=Qn(t);if(0===e)return;var u=i||r;if(e>=u+o*r+(a||0)||20>o)return;return Math.max(0,e-u)}if(n){var l=Qn(n);if(0!==l)return Math.max(0,l-r)}},[n,t,r,o,i,a])}({height:Te,maxHeight:je,rowHeight:Un,shouldPaginate:Rn,rowsPerPage:wn,totalRowCount:null!=Dn?Dn:no.length,headerHeight:kr,footerHeight:Rn&&!Pe?Xn:void 0}),lo=function(e){var n=e.allowAnimations,t=e.flattenedRows,r=e.originalFlattenedRows,o=e.parentEndPositions,c=e.currentPage,d=e.rowsPerPage,s=e.shouldPaginate,f=e.serverSidePagination,v=e.contentHeight,h=e.rowHeight,p=e.scrollTop,w=e.scrollDirection,m=void 0===w?"none":w,b=e.heightOffsets,y=e.customTheme,I=e.computeFilteredRowsPreview,C=e.computeSortedRowsPreview,S=i(!1),N=S[0],E=S[1],H=i([]),T=H[0],k=H[1],P=a([]),A=a([]),D=u(function(){return M(h)},[h]),F=a(new Map),O=a(null),L=l(function(e,n){if(!s||f)return e.map(function(e,n){return x(x({},e),{position:n,absoluteRowIndex:n})});var t=(c-1)*d,r=c*d,o=0===t?0:n[t-1];return e.slice(o,r>n.length?e.length:n[r-1]).map(function(e,n){var t=e.nestedTable?e.absoluteRowIndex:s&&!f?o+n:n;return x(x({},e),{position:n,absoluteRowIndex:t})})},[c,d,f,s]);u(function(){if(0===F.current.size&&r.length>0){var e=new Map;r.forEach(function(n,t){var r=U(n.rowId);e.set(r,t)}),F.current=e}},[r]);var W=u(function(){return L(t,o)},[t,o,L]),B=u(function(){if(!b||0===b.length||!s||f)return b;var e=new Map;return W.forEach(function(n){n.nestedTable&&e.set(n.absoluteRowIndex,n.position)}),b.filter(function(n){return e.has(n[0])}).map(function(n){var t=n[1];return[e.get(n[0]),t]})},[b,W,s,f]),q=u(function(){if(B&&0!==B.length)return function(e,n,t,r){var o=n+r.rowSeparatorWidth,i=Array(e),a=new Map;t&&t.forEach(function(e){a.set(e[0],e[1])});for(var u=0,l=0;e>l;l++){i[l]=u,u+=o;var c=a.get(l);void 0!==c&&(u+=c)}return{rowTopPositions:i,totalHeight:u-r.rowSeparatorWidth}}(W.length,h,B,y)},[W.length,h,B,y]),G=u(function(){return void 0===v?W:ee({bufferRowCount:D,contentHeight:v,tableRows:W,rowHeight:h,scrollTop:p,scrollDirection:m,heightMap:q})},[W,v,h,p,m,D,q]),z=l(function(e,n){var t=new Set(e.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)})),r=new Set(n.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)}));return{staying:n.filter(function(e){var n=U(e.rowId);return t.has(n)}),entering:n.filter(function(e){var n=U(e.rowId);return!t.has(n)}),leaving:e.filter(function(e){var n=U(e.rowId);return!r.has(n)})}},[]),K=u(function(){if(0===P.current.length)return!1;var e=W.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)}),n=P.current.filter(function(e){return e&&e.rowId}).map(function(e){return U(e.rowId)});return e.length!==n.length||!e.every(function(e,t){return e===n[t]})},[W]);g(function(){if(!N){var e=function(){T.length>0&&k([])};if(!n||s)return e(),P.current=W,void(A.current=G);if(0===P.current.length)return e(),P.current=W,void(A.current=G);if(!K)return e(),P.current=W,void(A.current=G);O.current={tableRows:W,visibleRows:G},E(!0)}},[n,W,T.length,K,N,s,G]),g(function(){if(N&&O.current&&T.length>0){var e=setTimeout(function(){var e=O.current;E(!1),k([]),P.current=e.tableRows,A.current=e.visibleRows,O.current=null},ot.ROW_REORDER.duration+100);return function(){return clearTimeout(e)}}},[N,T.length]);var j=u(function(){if(!n||s)return G;if(T.length>0){var e=new Map,t=new Map;return W.forEach(function(n){var r=U(n.rowId);e.set(r,n.position),t.set(r,n.displayPosition)}),T.map(function(n){var r=U(n.rowId),o=e.get(r),i=t.get(r);return void 0!==o&&void 0!==i?x(x({},n),{position:o,displayPosition:i}):n})}return G},[G,T,W,n,s]),V=l(function(e){if(n&&!s&&void 0!==v){var t=I(e),r=L(t,[]),o=ee({bufferRowCount:D,contentHeight:v,tableRows:r,rowHeight:h,scrollTop:p,scrollDirection:m,heightMap:q}),i=z(G,o).entering.map(function(e){var n=U(e.rowId)+"";return W.find(function(e){return U(e.rowId)+""===n})||e}).filter(Boolean);i.length>0&&k(R(R([],G,!0),i,!0))}},[n,s,I,L,v,h,p,m,z,W,G,D,q]),_=l(function(e){if(n&&!s&&void 0!==v){var t=C(e),r=L(t,[]),o=ee({bufferRowCount:D,contentHeight:v,tableRows:r,rowHeight:h,scrollTop:p,scrollDirection:m,heightMap:q}),i=z(G,o).entering.map(function(e){var n=U(e.rowId)+"";return W.find(function(e){return U(e.rowId)+""===n})||e}).filter(Boolean);i.length>0&&k(R(R([],G,!0),i,!0))}},[n,s,C,L,v,h,p,m,z,W,G,D,q]);return{currentTableRows:W,currentVisibleRows:G,isAnimating:N,prepareForFilterChange:V,prepareForSortChange:_,rowsToRender:j,paginatedHeightOffsets:B}}({allowAnimations:c,flattenedRows:Qr,originalFlattenedRows:oo,paginatableRows:no,parentEndPositions:to,currentPage:Kt,rowsPerPage:wn,shouldPaginate:Rn,serverSidePagination:In,contentHeight:uo,rowHeight:Un,scrollTop:fr,scrollDirection:pr,heightOffsets:eo,customTheme:_n,computeFilteredRowsPreview:io,computeSortedRowsPreview:ao}),co=lo.currentTableRows,so=lo.rowsToRender,fo=lo.prepareForFilterChange,vo=lo.prepareForSortChange,ho=lo.isAnimating,po=lo.paginatedHeightOffsets,wo=a(new Map),mo=a(new Map),go=function(e){var n=e.selectableCells,t=e.headers,r=e.tableRows,c=e.onCellEdit,d=e.cellRegistry,s=e.collapsedHeaders,f=e.rowHeight,v=e.enableRowSelection,h=void 0!==v&&v,p=e.copyHeadersToClipboard,w=void 0!==p&&p,m=e.customTheme,g=i(new Set),b=g[0],x=g[1],y=i(new Set),R=y[0],S=y[1],M=i(null),N=M[0],E=M[1],H=i(null),T=H[0],k=H[1],P=i(new Set),A=P[0],D=P[1],F=i(new Set),L=F[0],W=F[1],B=i(!1),q=B[0],G=B[1],z=a(!1),V=a(null),_=u(function(){var e=new Set;return b.forEach(function(n){var t=n.split("-");if(t.length>=2){var r=parseInt(t[1],10);isNaN(r)||e.add(r)}}),R.forEach(function(n){e.add(n)}),e},[b,R]),J=u(function(){var e=new Set;return b.forEach(function(n){var t=n.split("-");if(t.length>=3){var r=t.slice(2).join("-");e.add(r)}}),R.size>0&&r.forEach(function(n){var t=U(n.rowId);e.add(t)}),e},[b,R,r]),X=u(function(){return t.flatMap(function(e){return O(e,s)})},[t,s]),Y=l(function(){if(0!==b.size){var e=function(e,n,t,r){void 0===r&&(r=!1);var o=n.filter(function(e){return!e.hide&&!e.excludeFromRender}),i=new Map,a=new Map;o.forEach(function(e,n){i.set(n,e.accessor),a.set(n,e)});var u=Array.from(e).reduce(function(e,n){var r,o=n.split("-").map(Number),u=o[0],l=o[1];e[u]||(e[u]=[]);var c=i.get(l),d=a.get(l);if(c&&(null===(r=t[u])||void 0===r?void 0:r.row)){var s=t[u].row,f=K(s,c);if(!1!==(null==d?void 0:d.useFormattedValueForClipboard)&&(null==d?void 0:d.valueFormatter)){var v=d.valueFormatter({accessor:c,colIndex:l,row:s,rowIndex:u,value:f});e[u][l]=v}else e[u][l]=!d||"lineAreaChart"!==d.type&&"barChart"!==d.type?f:Array.isArray(f)?f.join(", "):""}else e[u][l]="";return e},{}),l=new Set;r&&Array.from(e).forEach(function(e){var n=e.split("-").map(Number);l.add(n[1])});var c="";r&&l.size>0&&(c=Array.from(l).sort(function(e,n){return e-n}).map(function(e){var n,t=a.get(e);return null!==(n=null==t?void 0:t.label)&&void 0!==n?n:""}).join("\t"));var d=Object.values(u).map(function(e){return Object.values(e).join("\t")}).join("\n");return r&&c?"".concat(c,"\n").concat(d):d}(b,X,r,w);navigator.clipboard.writeText(e),D(new Set(b)),setTimeout(function(){return D(new Set)},800)}},[b,X,r,w]),$=l(function(){return I(void 0,void 0,void 0,function(){var e,n,t,o,i;return C(this,function(a){switch(a.label){case 0:if(!T)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=a.sent())?(n=function(e,n,t,r,o,i){var a=new Set,u=new Set,l=e.split("\n").filter(function(e){return e.length>0});if(0===l.length)return{updatedCells:a,warningCells:u};var c=t.filter(function(e){return!e.hide&&!e.excludeFromRender}),d=n.rowIndex,s=n.colIndex;return l.forEach(function(e,n){e.split("\t").forEach(function(e,t){var l=d+n,f=s+t;if(r.length>l&&c.length>f){var v=r[l],h=c[f],p=U(v.rowId);if(null==h?void 0:h.isEditable){var w=e;if("number"===h.type){var m=+e;isNaN(m)||(w=m)}else if("boolean"===h.type)w="true"===e.toLowerCase()||"1"===e;else if("date"===h.type){var g=new Date(e);isNaN(g.getTime())||(w=g)}else"lineAreaChart"!==h.type&&"barChart"!==h.type||(w=e.split(",").map(function(e){var n=+e.trim();return isNaN(n)?0:n}));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 I="".concat(l,"-").concat(f,"-").concat(p);u.add(I)}}})}),{updatedCells:a,warningCells:u}}(e,T,X,r,c,d),o=n.warningCells,(t=n.updatedCells).size>0&&(D(t),setTimeout(function(){return D(new Set)},800)),o.size>0&&(W(o),setTimeout(function(){return W(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]}})})},[T,X,r,c,d]),Z=l(function(){if(0!==b.size){var e=function(e,n,t,r,o){var i=new Set,a=new Set,u=n.filter(function(e){return!e.hide&&!e.excludeFromRender}),l=new Map;return u.forEach(function(e,n){l.set(n,e.accessor)}),Array.from(e).forEach(function(e){var n=e.split("-").map(Number),l=n[0],c=n[1];if(t.length>l&&u.length>c){var d=t[l],s=u[c],f=U(d.rowId);if(null==s?void 0:s.isEditable){var v;if(v="string"===s.type?"":"number"===s.type?null:"boolean"!==s.type&&("date"===s.type?null:"lineAreaChart"===s.type||"barChart"===s.type||Array.isArray(K(d.row,s.accessor))?[]:""),j(d.row,s.accessor,v),o){var h="".concat(f,"-").concat(s.accessor),p=o.get(h);p&&p.updateContent(v)}null==r||r({accessor:s.accessor,newValue:v,row:d.row,rowIndex:l}),i.add(e)}else a.add(e)}}),{deletedCells:i,warningCells:a}}(b,X,r,c,d),n=e.deletedCells,t=e.warningCells;n.size>0&&(D(n),setTimeout(function(){return D(new Set)},800)),t.size>0&&(W(t),setTimeout(function(){return W(new Set)},800))}},[b,X,r,c,d]),Q=l(function(e,n){for(var t=new Set,o=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),u=Math.max(e.colIndex,n.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 d=U(r[l].rowId);t.add(ie({colIndex:c,rowIndex:l,rowId:d}))}S(new Set),E(null),x(t),k(n),setTimeout(function(){return oe(n,f,m)},0)},[r,f,h,m]),ee=l(function(e){if(e.rowIndex>=0&&r.length>e.rowIndex&&e.colIndex>=0&&(h?X.length:X.length-1)>=e.colIndex){var n=ie(e);S(new Set),E(null),x(new Set([n])),k(e),setTimeout(function(){return oe(e,f,m)},0)}},[X.length,r.length,f,h,m]),ne=l(function(e,n){void 0===n&&(n=!1),x(new Set),k(null),S(function(t){var r=new Set(n?t:[]);return e.forEach(function(e){return r.add(e)}),r}),e.length>0&&E(e[e.length-1])},[]);!function(e){var n=e.copyToClipboard,t=e.deleteSelectedCells,r=e.enableRowSelection,i=void 0!==r&&r,a=e.initialFocusedCell,u=e.leafHeaders,l=e.pasteFromClipboard,c=e.selectCellRange,d=e.selectSingleCell,s=e.selectableCells,f=e.selectedCells,v=e.setLastSelectedColumnIndex,h=e.setSelectedCells,p=e.setSelectedColumns,w=e.startCell,m=e.tableRows;o(function(){var e=function(e){if(s&&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 d=a.rowIndex,R=a.colIndex,S=a.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void l();if((e.ctrlKey||e.metaKey)&&"a"===e.key){e.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,T=U(m[N].rowId);M.add("".concat(N,"-").concat(H,"-").concat(T))}return h(M),p(new Set),void v(null)}if("Delete"===e.key||"Backspace"===e.key)return e.preventDefault(),void t();var k=m[d];if((k?U(k.rowId):null)!==S){var P=m.findIndex(function(e){return U(e.rowId)===S});if(-1===P)return;d=P}var A=function(e,n,t){var r=e,o=n;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"===e.key?(e.preventDefault(),r(e,d,R,A)):"ArrowDown"===e.key?(e.preventDefault(),o(e,d,R,A)):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),g(e,d,R,A)):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),b(e,d,R,A)):"Home"===e.key?(e.preventDefault(),x(e,d)):"End"===e.key?(e.preventDefault(),y(e,d)):"PageUp"===e.key?(e.preventDefault(),I(e,d,R)):"PageDown"===e.key?(e.preventDefault(),C(e,d,R)):"Escape"===e.key&&(h(new Set),p(new Set),v(null),w.current=null)}else n()}}},r=function(e,n,t,r){if(e.shiftKey){w.current||(w.current=a);var o=n-1;if((e.ctrlKey||e.metaKey)&&(o=r(n,t,"up").rowIndex),o>=0){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else n>0&&(o=n-1,(e.ctrlKey||e.metaKey)&&(o=r(n,t,"up").rowIndex),i=U(m[o].rowId),d({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},o=function(e,n,t,r){if(e.shiftKey){w.current||(w.current=a);var o=n+1;if((e.ctrlKey||e.metaKey)&&(o=r(n,t,"down").rowIndex),m.length>o){var i=U(m[o].rowId);c(w.current,{rowIndex:o,colIndex:t,rowId:i})}}else m.length-1>n&&(o=n+1,(e.ctrlKey||e.metaKey)&&(o=r(n,t,"down").rowIndex),i=U(m[o].rowId),d({rowIndex:o,colIndex:t,rowId:i}),w.current=null)},g=function(e,n,t,r){if(e.shiftKey&&"ArrowLeft"===e.key){w.current||(w.current=a);var o=t-1;if(e.ctrlKey||e.metaKey)o=r(n,t,"left").colIndex;else if(i&&0===o)return;if(o>=0){var u=U(m[n].rowId);c(w.current,{rowIndex:n,colIndex:o,rowId:u})}}else if(t>0){if(o=t-1,(e.ctrlKey||e.metaKey)&&"ArrowLeft"===e.key)o=r(n,t,"left").colIndex;else if(i&&0===o)return;0>o||(u=U(m[n].rowId),d({rowIndex:n,colIndex:o,rowId:u}),w.current=null)}},b=function(e,n,t,r){var o=i?u.length:u.length-1;if(e.shiftKey&&"ArrowRight"===e.key){w.current||(w.current=a);var l=t+1;if((e.ctrlKey||e.metaKey)&&(l=r(n,t,"right").colIndex),o>=l){var s=U(m[n].rowId);c(w.current,{rowIndex:n,colIndex:l,rowId:s})}}else o>t&&(l=t+1,(e.ctrlKey||e.metaKey)&&"ArrowRight"===e.key&&(l=r(n,t,"right").colIndex),l>o||(s=U(m[n].rowId),d({rowIndex:n,colIndex:l,rowId:s}),w.current=null))},x=function(e,n,t){if(e.shiftKey){w.current||(w.current=a);var r=n,o=i?1:0;(e.ctrlKey||e.metaKey)&&(r=0);var u=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:u})}else r=n,o=i?1:0,(e.ctrlKey||e.metaKey)&&(r=0),u=U(m[r].rowId),d({rowIndex:r,colIndex:o,rowId:u}),w.current=null},y=function(e,n,t){if(e.shiftKey){w.current||(w.current=a);var r=n,o=i?u.length:u.length-1;(e.ctrlKey||e.metaKey)&&(r=m.length-1);var l=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:o,rowId:l})}else r=n,o=i?u.length:u.length-1,(e.ctrlKey||e.metaKey)&&(r=m.length-1),l=U(m[r].rowId),d({rowIndex:r,colIndex:o,rowId:l}),w.current=null},I=function(e,n,t){var r=Math.max(0,n-10);if(e.shiftKey){w.current||(w.current=a);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),d({rowIndex:r,colIndex:t,rowId:o}),w.current=null},C=function(e,n,t){var r=Math.min(m.length-1,n+10);if(e.shiftKey){w.current||(w.current=a);var o=U(m[r].rowId);c(w.current,{rowIndex:r,colIndex:t,rowId:o})}else o=U(m[r].rowId),d({rowIndex:r,colIndex:t,rowId:o}),w.current=null};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[s,a,m,u,d,c,f,h,p,v,n,l,t,w,i])}({selectableCells:n,initialFocusedCell:T,tableRows:r,leafHeaders:X,selectSingleCell:ee,selectCellRange:Q,selectedCells:b,setSelectedCells:x,setSelectedColumns:S,setLastSelectedColumnIndex:E,copyToClipboard:Y,pasteFromClipboard:$,deleteSelectedCells:Z,startCell:V,enableRowSelection:h});var te=l(function(e,n){var t=new Set,o=new Map;r.forEach(function(e,n){var t=U(e.rowId);o.set(t,n)});for(var i=o.get(e.rowId+""),a=o.get(n.rowId+""),u=void 0!==i?i:e.rowIndex,l=void 0!==a?a:n.rowIndex,c=Math.min(u,l),d=Math.max(u,l),s=Math.min(e.colIndex,n.colIndex),f=Math.max(e.colIndex,n.colIndex),v=c;d>=v;v++)for(var p=s;f>=p;p++)if(v>=0&&r.length>v){if(h&&0===p)continue;var w=U(r[v].rowId);t.add(ie({colIndex:p,rowIndex:v,rowId:w}))}x(t)},[r,h]),re=l(function(e,n){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,e)),a=Math.max(r.top,Math.min(r.bottom,n)),u=null,l=1/0;if(o.forEach(function(e){if(e instanceof HTMLElement){var n=e,t=n.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=n)}}),null!==u){var c=u,d=parseInt(c.getAttribute("data-row-index")||"-1",10),s=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(d>=0&&s>=0&&null!==f)return{rowIndex:d,colIndex:s,rowId:f}}return null},[]),ae=l(function(e,n){var t=document.elementFromPoint(e,n);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 re(e,n)},[re]),ue=l(function(e,n){var t=document.querySelector(".st-body-container");if(t){var r=t.getBoundingClientRect();r.top+50>n?t.scrollTop-=10*Math.min(3,1+Math.max(0,r.top-n)/100):n>r.bottom-50&&(t.scrollTop+=10*Math.min(3,1+Math.max(0,n-r.bottom)/100));var o=document.querySelector(".st-body-main");o&&(r.left+50>e?o.scrollLeft-=10*Math.min(3,1+Math.max(0,r.left-e)/100):e>r.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,e-r.right)/100)))}},[]),le=l(function(e){var n=e.colIndex,t=ie({colIndex:n,rowIndex:e.rowIndex,rowId:e.rowId}),r=b.has(t),o=R.has(n);return r||o},[b,R]),ce=l(function(e){var n=e.colIndex,t=e.rowIndex,o=e.rowId;if(q)return"";var i=[],a=r[t-1],u=a?U(a.rowId):null,l=r[t+1],c=l?U(l.rowId):null,d=null!==u?{colIndex:n,rowIndex:t-1,rowId:u}:null,s=null!==c?{colIndex:n,rowIndex:t+1,rowId:c}:null,f={colIndex:n-1,rowIndex:t,rowId:o},v={colIndex:n+1,rowIndex:t,rowId:o};return(!d||!le(d)||R.has(n)&&0===t)&&i.push("st-selected-top-border"),(!s||!le(s)||R.has(n)&&t===r.length-1)&&i.push("st-selected-bottom-border"),le(f)||i.push("st-selected-left-border"),le(v)||i.push("st-selected-right-border"),i.join(" ")},[q,le,r,R]),de=u(function(){return T?function(e){return e.rowIndex===T.rowIndex&&e.colIndex===T.colIndex&&e.rowId===T.rowId}:function(){return!1}},[T]),se=l(function(e){var n=ie({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return A.has(n)},[A]),fe=l(function(e){var n=ie({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return L.has(n)},[L]);return{getBorderClass:ce,handleMouseDown:function(e){var t=e.colIndex,r=e.rowIndex,o=e.rowId;if(n){z.current=!0,G(!0),V.current={rowIndex:r,colIndex:t,rowId:o},setTimeout(function(){S(new Set),E(null);var e=ie({colIndex:t,rowIndex:r,rowId:o});x(new Set([e])),k({rowIndex:r,colIndex:t,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(z.current&&V.current){if(null!==i&&null!==a){ue(i,a);var e=Date.now();if(e-l>=16){var n=ae(i,a);n&&te(V.current,n),l=e}}u=requestAnimationFrame(c)}else null!==u&&(cancelAnimationFrame(u),u=null)},d=function(e){z.current&&V.current&&(i=e.clientX,a=e.clientY)},s=function(){z.current=!1,G(!1),null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",s),u=requestAnimationFrame(c)}},handleMouseOver:function(e){n&&z.current&&V.current&&te(V.current,{colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId})},isCopyFlashing:se,isWarningFlashing:fe,isInitialFocusedCell:de,isSelected:le,lastSelectedColumnIndex:N,pasteFromClipboard:$,selectColumns:ne,selectedCells:b,selectedColumns:R,setInitialFocusedCell:k,setSelectedCells:x,setSelectedColumns:S,deleteSelectedCells:Z,columnsWithSelectedCells:_,rowsWithSelectedCells:J,startCell:V}}({selectableCells:gn,headers:_t,tableRows:co,onCellEdit:Je,cellRegistry:wo.current,collapsedHeaders:lr,rowHeight:Un,enableRowSelection:te,copyHeadersToClipboard:W,customTheme:_n}),bo=go.getBorderClass,xo=go.handleMouseDown,yo=go.handleMouseOver,Io=go.isCopyFlashing,Co=go.isInitialFocusedCell,Ro=go.isSelected,So=go.isWarningFlashing,Mo=go.selectColumns,No=go.selectedCells,Eo=go.selectedColumns,Ho=go.setInitialFocusedCell,To=go.setSelectedCells,ko=go.setSelectedColumns,Po=go.columnsWithSelectedCells,Ao=go.rowsWithSelectedCells,Do=go.startCell,Fo=l(function(e){vo(e),setTimeout(function(){Yr({accessor:e})},0)},[vo,Yr]),Oo=l(function(e){Ut(e)},[]);!function(e){var n=e.selectableColumns,t=e.selectedCells,r=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns,u=e.activeHeaderDropdown,l=e.setActiveHeaderDropdown,c=e.startCell;o(function(){var e=function(e){var o=e.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")||n&&(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",e),function(){document.removeEventListener("mousedown",e)}},[n,t,r,i,a,u,l,c])}({selectableColumns:xn,selectedCells:No,selectedColumns:Eo,setSelectedCells:To,setSelectedColumns:ko,activeHeaderDropdown:nr,setActiveHeaderDropdown:tr,startCell:Do}),function(e){var n=e.forceUpdate,t=e.tableBodyContainerRef,r=e.setScrollbarWidth;g(function(){var e=function(){n(),t.current&&r(t.current.offsetWidth-t.current.clientWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n,t,r])}({forceUpdate:pt,tableBodyContainerRef:vt,setScrollbarWidth:Bt}),function(e){var n=e.onGridReady;o(function(){null==n||n()},[n])}({onGridReady:Qe}),function(e){var n=e.cellRegistryRef,t=e.clearAllFilters,r=e.clearFilter,i=e.currentPage,a=e.editColumns,u=e.expandedDepths,l=e.filters,c=e.flattenedRows,d=e.headerRegistryRef,s=e.headers,f=e.includeHeadersInCSVExport,v=e.onColumnVisibilityChange,h=e.onPageChange,p=e.paginatableRows,w=e.rowGrouping,m=e.rows,g=e.rowsPerPage,b=e.setCollapsedRows,y=e.setColumnEditorOpen,S=e.setCurrentPage,M=e.setExpandedDepths,N=e.setExpandedRows,E=e.setHeaders,H=e.sort,T=e.tableRef,k=e.totalRowCount,P=e.updateFilter,A=e.updateSort,D=e.visibleRows;o(function(){T&&(T.current={updateData:function(e){var t=e.accessor,r=e.rowIndex,o=e.newValue,i=null==m?void 0:m[r];if(i){var a=U([r]),u=F({rowId:a,accessor:t}),l=n.current.get(u);l&&l.updateContent(o),void 0!==K(i,t)&&j(i,t,o)}},setHeaderRename:function(e){var n=d.current.get(e.accessor+"");n&&n.setEditing(!0)},getVisibleRows:function(){return D},getAllRows:function(){return c},getHeaders:function(){return s},exportToCSV:function(e){!function(e,n,t,r){void 0===r&&(r=!0);var o=function(e,n,t){void 0===t&&(t=!0);var r=function(e){var n=[],t=function(e){for(var r=0,o=e;o.length>r;r++){var i=o[r];i.hide||i.isSelectionColumn||i.excludeFromCsv||(i.children&&i.children.length>0?(i.singleRowChildren&&n.push(i),t(i.children)):n.push(i))}};return t(e),n}(n),o=r.map(function(e){return nt(e.label)}).join(","),i=e.map(function(e,n){var t=e.row;return r.map(function(e,r){var o=K(t,e.accessor);if(e.exportValueGetter){var i=e.valueFormatter?e.valueFormatter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o}):void 0,a=e.exportValueGetter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o,formattedValue:i});return nt(a)}return!1!==e.useFormattedValueForCSV&&e.valueFormatter?(i=e.valueFormatter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o}),nt(i)):nt(o)}).join(",")});return(t?R([o],i,!0):i).join("\n")}(e,n,r);!function(e,n){void 0===n&&(n="table-export.csv");var t=new Blob([e],{type:"text/csv;charset=utf-8;"}),r=document.createElement("a"),o=URL.createObjectURL(t);r.setAttribute("href",o),r.setAttribute("download",n),r.style.visibility="hidden",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(o)}(o,t)}(c,s,(void 0===e?{}:e).filename,f)},getSortState:function(){return H},applySortState:tt(A),getFilterState:function(){return l},applyFilter:tt(P),clearFilter:tt(r),clearAllFilters:tt(t),getCurrentPage:function(){return i},getTotalPages:function(){return Math.ceil((null!=k?k:p.length)/g)},setPage:function(e){return I(void 0,void 0,void 0,function(){var n;return C(this,function(t){switch(t.label){case 0:return n=Math.ceil((null!=k?k:p.length)/g),1>e||e>n?[3,2]:(S(e),h?[4,h(e)]:[3,2]);case 1:t.sent(),t.label=2;case 2:return[2]}})})},expandAll:function(){var e=Array.from({length:(null==w?void 0:w.length)||0},function(e,n){return n});M(new Set(e)),N(new Map),b(new Map)},collapseAll:function(){M(new Set),N(new Map),b(new Map)},expandDepth:function(e){M(function(n){for(var t=new Set(n),r=0;e>=r;r++)t.add(r);return t}),N(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t}),b(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t})},collapseDepth:function(e){M(function(n){var t=new Set(n);return t.delete(e),t}),N(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t}),b(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t})},toggleDepth:function(e){M(function(n){var t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}),N(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t}),b(function(n){var t=new Map(n);return Array.from(t.entries()).forEach(function(n){n[1]===e&&t.delete(n[0])}),t})},setExpandedDepths:function(e){M(e)},getExpandedDepths:function(){return u},getGroupingProperty:function(e){return null==w?void 0:w[e]},getGroupingDepth:function(e){var n;return null!==(n=null==w?void 0:w.indexOf(e))&&void 0!==n?n:-1},toggleColumnEditor:function(e){a&&y(void 0!==e?e:function(e){return!e})},applyColumnVisibility:tt(function(e){var n=function(t){return t.map(function(t){var r=t.accessor+"",o=r in e;return x(x({},t),{hide:o?!e[r]:t.hide,children:t.children?n(t.children):t.children})})};E(function(e){return n(e)}),v&&v(e)})})},[n,t,r,i,a,u,l,c,d,s,f,v,h,p,w,e.rowIndexMap,m,g,e.serverSidePagination,b,y,S,M,N,E,e.setRows,e.shouldPaginate,H,T,k,P,A,D])}({cellRegistryRef:wo,clearAllFilters:_r,clearFilter:Vr,currentPage:Kt,editColumns:z,expandedDepths:gr,filters:Kr,flattenedRows:Qr,headerRegistryRef:mo,headers:dr,includeHeadersInCSVExport:Oe,onColumnVisibilityChange:$e,onPageChange:rn,paginatableRows:no,rowGrouping:sn,rowIndexMap:Mt,rows:Gt,rowsPerPage:wn,serverSidePagination:In,setCollapsedRows:Sr,setColumnEditorOpen:ir,setCurrentPage:jt,setExpandedDepths:br,setExpandedRows:Ir,setHeaders:Ut,setRows:yt,shouldPaginate:Rn,sort:Xr,tableRef:kn,totalRowCount:Dn,updateFilter:jr,updateSort:Yr,visibleRows:so}),function(e){var n=e.filters,t=e.onFilterChange;o(function(){null==t||t(n)},[n,t])}({filters:Kr,onFilterChange:Ze}),function(e){var n=e.sort,t=e.onSortChange,r=ze(n);o(function(){!n||(null==r?void 0:r.key.accessor)===n.key.accessor&&(null==r?void 0:r.direction)===n.direction?!n&&r&&(null==t||t(null)):null==t||t(n)},[n,r,t])}({sort:Xr,onSortChange:un});var Lo=l(function(e){fo(e),setTimeout(function(){jr(e)},0)},[fo,jr]),Wo=!Ct&&0===co.length;return e(ue,x({value:{activeHeaderDropdown:nr,allowAnimations:c,areAllRowsSelected:Tt,autoExpandColumns:s,canExpandRowGroup:f,cellRegistry:wo.current,cellUpdateFlash:h,clearSelection:Ot,collapsedHeaders:lr,columnBorders:m,columnReordering:P,columnResizing:D,columnsWithSelectedCells:Po,copyHeadersToClipboard:W,draggedHeaderRef:it,editColumns:z,emptyStateRenderer:$,enableHeaderEditing:Q,enableRowSelection:te,errorStateRenderer:re,expandedDepths:gr,expandIcon:ve,filterIcon:Ce,filters:Kr,forceUpdate:pt,getBorderClass:bo,handleApplyFilter:Lo,handleClearAllFilters:_r,handleClearFilter:Vr,handleMouseDown:xo,handleMouseOver:yo,handleRowSelect:At,handleSelectAll:Dt,handleToggleRow:Ft,headerCollapseIcon:Me,headerContainerRef:ht,headerDropdown:Ne,headerExpandIcon:He,headerHeight:Jn,headerRegistry:mo.current,headers:dr,heightOffsets:po,hoveredHeaderRef:at,includeHeadersInCSVExport:Oe,isAnimating:ho,isCopyFlashing:Io,isInitialFocusedCell:Co,isLoading:Ct,isResizing:Xt,isRowSelected:Ht,isScrolling:Zt,isSelected:Ro,isWarningFlashing:So,loadingStateRenderer:Ke,mainBodyRef:ut,maxHeaderDepth:Pr,nextIcon:_e,onCellClick:Ue,onCellEdit:Je,onColumnOrderChange:Xe,onColumnSelect:Ye,onColumnVisibilityChange:$e,onHeaderEdit:en,onLoadMore:nn,onRowGroupExpand:on,onSort:Fo,onTableHeaderDragEnd:Oo,pinnedLeftRef:lt,pinnedRightRef:ft,prevIcon:cn,rowButtons:dn,rowGrouping:sn,rowHeight:Un,rowStateMap:mt,rows:xt,rowsWithSelectedCells:Ao,scrollbarWidth:Wt,selectColumns:Mo,selectableColumns:xn,selectedColumns:Eo,selectedRowCount:kt,selectedRows:Nt,selectedRowsData:Pt,setActiveHeaderDropdown:tr,setCollapsedHeaders:cr,setHeaders:Ut,setInitialFocusedCell:Ho,setIsResizing:Yt,setIsScrolling:Qt,setRowStateMap:gt,setSelectedCells:To,setSelectedColumns:ko,setSelectedRows:Et,setExpandedDepths:br,setExpandedRows:Ir,setCollapsedRows:Sr,shouldPaginate:Rn,sortDownIcon:Mn,sortUpIcon:En,tableBodyContainerRef:vt,tableEmptyStateRenderer:Tn,tableRows:co,theme:An,customTheme:_n,expandedRows:yr,collapsedRows:Rr,useHoverRowBackground:On,useOddColumnBackground:Wn,useOddEvenRowBackground:Vn}},{children:t("div",x({className:"simple-table-root st-wrapper theme-".concat(An," ").concat(null!=p?p:""," ").concat(m?"st-column-borders":""),style:je?{maxHeight:je,height:void 0===uo?"auto":je}:Te?{height:Te}:{}},{children:[e($n,{children:t("div",x({className:"st-wrapper-container"},{children:[t("div",x({className:"st-content-wrapper"},{children:[e(Bn,{hideHeader:De,pinnedLeftWidth:Lr,pinnedRightWidth:Wr,setScrollTop:vr,setScrollDirection:wr,shouldShowEmptyState:Wo,sort:Xr,tableRows:co,rowsToRender:so}),e(Yn,{columnEditorText:H,editColumns:z,headers:_t,open:or,position:S,setOpen:ir})]})),!Wo&&e(qn,{mainBodyRef:ut,mainBodyWidth:Or,pinnedLeftWidth:Lr,pinnedRightWidth:Wr,pinnedLeftContentWidth:Br,pinnedRightContentWidth:qr,tableBodyContainerRef:vt}),!Wo&&e(ce,{currentPage:Kt,footerRenderer:Re,hideFooter:Pe,onPageChange:jt,onNextPage:tn,onUserPageChange:rn,rowsPerPage:wn,shouldPaginate:Rn,totalPages:Math.ceil((null!=Dn?Dn:no.length)/wn),totalRows:null!=Dn?Dn:no.length})]}))}),e("div",x({"aria-live":"polite","aria-atomic":"true",className:"st-sr-only"},{children:Nr}))]}))}))},ht=function(n){var r=n.data,o=n.width,i=void 0===o?"100%":o,a=n.height,u=void 0===a?30:a,l=n.color,c=n.fillColor,d=n.fillOpacity,s=void 0===d?.2:d,f=n.strokeWidth,v=void 0===f?2:f,h=n.className,p=void 0===h?"":h,w=n.min,m=n.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,I=r.map(function(e,n){return{x:n/(r.length-1)*100,y:y-(e-g)/b*y}}).map(function(e,n){return"".concat(0===n?"M":"L"," ").concat(e.x,",").concat(e.y)}).join(" "),C="\n ".concat(I,"\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:[e("path",{d:C,fill:c||"var(--st-chart-fill-color)",fillOpacity:s,stroke:"none",vectorEffect:"non-scaling-stroke"}),e("path",{d:I,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}))},pt=Object.freeze({__proto__:null,default:ht}),wt=function(n){var t=n.data,r=n.width,o=void 0===r?"100%":r,i=n.height,a=void 0===i?30:i,u=n.color,l=n.gap,c=void 0===l?2:l,d=n.className,s=void 0===d?"":d,f=n.min,v=n.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 e("svg",x({width:o,height:a,viewBox:"0 0 100 ".concat(m),preserveAspectRatio:"none",className:"st-bar-chart ".concat(s),style:{display:"block"}},{children:t.map(function(n,t){var r=t*(g+c),o=(n-h)/w*m,i=m-o,a=o;return b&&(0>n?(a=Math.abs(n)/w*m,i=y):i=y-(a=n/w*m)),e("rect",{x:r,y:i,width:g,height:a,fill:u||"var(--st-chart-color)",rx:1},t)})}))},mt=Object.freeze({__proto__:null,default:wt});export{ot as A,wt as B,pe as C,dt as D,me as F,ht as L,S as R,ft as S,y as _,ze as a,x as b,M as c,lt as d,st as e,ut as f,de as g,se as h,fe as i,ve as j,he as k,we as l,ge as m,U as r,le as u};
2
+ //# sourceMappingURL=index-a69df6ad.js.map