simple-table-core 1.7.4 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animate-ae71b6e9.js +2 -0
- package/dist/Animate-ae71b6e9.js.map +1 -0
- package/dist/{DatePicker-c37f2180.js → DatePicker-4c44da1d.js} +2 -2
- package/dist/DatePicker-4c44da1d.js.map +1 -0
- package/dist/cjs/{Animate-d7382b4a.js → Animate-0ec45308.js} +2 -2
- package/dist/cjs/Animate-0ec45308.js.map +1 -0
- package/dist/cjs/{DatePicker-2558cb9c.js → DatePicker-66f73792.js} +2 -2
- package/dist/cjs/DatePicker-66f73792.js.map +1 -0
- package/dist/cjs/hooks/useScrollbarVisibility.d.ts +3 -1
- package/dist/cjs/index-309a579d.js +2 -0
- package/dist/cjs/index-309a579d.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/Row.d.ts +1 -1
- package/dist/cjs/utils/rowUtils.d.ts +11 -0
- package/dist/hooks/useScrollbarVisibility.d.ts +3 -1
- package/dist/index-900d626f.js +2 -0
- package/dist/index-900d626f.js.map +1 -0
- package/dist/index.es.js +1 -1
- package/dist/types/Row.d.ts +1 -1
- package/dist/utils/rowUtils.d.ts +11 -0
- package/package.json +1 -1
- package/dist/Animate-ce0ca666.js +0 -2
- package/dist/Animate-ce0ca666.js.map +0 -1
- package/dist/DatePicker-c37f2180.js.map +0 -1
- package/dist/cjs/Animate-d7382b4a.js.map +0 -1
- package/dist/cjs/DatePicker-2558cb9c.js.map +0 -1
- package/dist/cjs/index-b0d43d44.js +0 -2
- package/dist/cjs/index-b0d43d44.js.map +0 -1
- package/dist/index-9e4ebc64.js +0 -2
- package/dist/index-9e4ebc64.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),n=require("react");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=r(n);function o(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&0>n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);t.length>o;o++)0>n.indexOf(t[o])&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}function i(e,n,r,t){return new(r||(r=Promise))(function(o,i){function a(e){try{l(t.next(e))}catch(e){i(e)}}function u(e){try{l(t.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(a,u)}l((t=t.apply(e,n||[])).next())})}function a(e,n){var r,t,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(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,t&&(o=2&u[0]?t.return:u[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,u[1])).done)return o;switch(t=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++,t=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],t=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function u(e,n,r){if(r||2===arguments.length)for(var t,o=0,i=n.length;i>o;o++)!t&&o in n||(t||(t=Array.prototype.slice.call(n,0,o)),t[o]=n[o]);return e.concat(t||Array.prototype.slice.call(n))}exports.__assign=function(){return exports.__assign=Object.assign||function(e){for(var n,r=1,t=arguments.length;t>r;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},exports.__assign.apply(this,arguments)},"function"==typeof SuppressedError&&SuppressedError;var l=function(e){return 480>e?.3:768>e?.4:.8},c=function(e,n){if(!e.children||0===e.children.length)return[n];var r=[],t=function(e,n){if(!e.children||0===e.children.length)return r.push(n),n+1;for(var o=n,i=0,a=e.children;a.length>i;i++)o=t(a[i],o);return o};return t(e,n),r},s=function(e){return e.flatMap(function(e){var n=[e];return e.children&&e.children.length>0&&n.push.apply(n,s(e.children)),n})},d=function(e){return void 0===e&&(e=0),e?e+1:0},f=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},v=function(e){var n=e.header,r=e.pinned,t=e.headers,o=e.collapsedHeaders;return n.hide||(r||n.pinned)&&n.pinned!==r?null:!(t&&o&&function(e,n,r){var t=function(e,n){for(var r=0,t=s(e);t.length>r;r++){var o=t[r];if(o.children&&o.children.length>0&&o.children.some(function(e){return e.accessor===n}))return o}return null}(n,e.accessor);return!!t&&(r.has(t.accessor)?"parentExpanded"===e.showWhen:"parentCollapsed"===e.showWhen)}(n,t,o))||null},h=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},p=function(e,n){return e.hide?[]:e.children&&0!==e.children.length?n&&n.has(e.accessor)?e.children.filter(function(e){return"parentCollapsed"===e.showWhen||"always"===e.showWhen}).flatMap(function(e){return p(e,n)}):e.children.filter(function(e){return"parentExpanded"===e.showWhen||"always"===e.showWhen||!e.showWhen}).flatMap(function(e){return p(e,n)}):[e]},w=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(f({accessor:e.accessor,rowId:"header"}));return(null==n?void 0:n.offsetWidth)||150},m=function(e){var n,r=e.width;"string"==typeof r&&r.includes("fr")&&(e.width=(null===(n=document.getElementById(f({accessor:e.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.length>0&&e.children.forEach(function(e){m(e)})},g=function(e){return"number"==typeof e.minWidth?e.minWidth:40},x=function(e){return Array.isArray(e)&&e.length>0&&"object"==typeof e[0]&&null!==e[0]},b=function(e){return e.row[e.rowIdAccessor]},I=function(e,n,r){var t=e.getBoundingClientRect(),o=n.getBoundingClientRect(),i=10;if(o.top+i>t.top?n.scrollTop-=o.top-t.top+i:t.bottom>o.bottom-i&&(n.scrollTop+=t.bottom-o.bottom+i),r){var a=r.getBoundingClientRect();a.left+i>t.left?r.scrollLeft-=a.left-t.left+i:t.right>a.right-i&&(r.scrollLeft+=t.right-a.right+i)}},C=function(e,n){var r=document.querySelector(".st-body-container"),t=document.querySelector(".st-body-main");if(r){var o=n+1,i=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));if(!i)return r.scrollTop=Math.max(0,e.rowIndex*o-r.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&&I(n,r,t)},100);I(i,r,t)}},y=function(e){var n=e.colIndex,r=e.rowId;return"".concat(e.rowIndex,"-").concat(n,"-").concat(r)},R=n.createContext(void 0),S=function(n){return e.jsx(R.Provider,exports.__assign({value:n.value},{children:n.children}))},N=function(){var e=n.useContext(R);if(void 0===e)throw Error("useTableContext must be used within a TableProvider");return e},A=function(r){var t=r.currentPage,o=r.footerRenderer,u=r.hideFooter,l=r.onPageChange,c=r.onNextPage,s=r.onUserPageChange,d=r.rowsPerPage,f=r.shouldPaginate,v=r.totalPages,h=r.totalRows,p=N(),w=p.nextIcon,m=p.prevIcon,g=n.useState(!0),x=g[0],b=g[1],I=t>1,C=v>t,y=t===v,R=Math.min((t-1)*d+1,h),S=Math.min(t*d,h),A=!I,M=!C&&!c||!x&&y,E=function(){return i(void 0,void 0,void 0,function(){var e;return a(this,function(n){switch(n.label){case 0:return 1>(e=t-1)?[3,2]:(l(e),s?[4,s(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},T=function(){return i(void 0,void 0,void 0,function(){var e,n;return a(this,function(r){switch(r.label){case 0:return e=t===v,n=t+1,c&&e?[4,c(t)]:[3,2];case 1:if(!r.sent())return b(!1),[2];r.label=2;case 2:return n>v&&!c?[3,4]:(l(n),s?[4,s(n)]:[3,4]);case 3:r.sent(),r.label=4;case 4:return[2]}})})},H=function(e){return i(void 0,void 0,void 0,function(){return a(this,function(n){switch(n.label){case 0:return 1>e||e>v?[3,2]:(l(e),s?[4,s(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})};if(u||!f)return null;if(o)return e.jsx(e.Fragment,{children:o({currentPage:t,totalPages:v,rowsPerPage:d,totalRows:h,startRow:R,endRow:S,onPageChange:H,onNextPage:T,onPrevPage:E,hasNextPage:!M,hasPrevPage:!A,nextIcon:w,prevIcon:m})});var k=function(){if(15>=v)return Array.from({length:v},function(e,n){return n+1});var e,n,r=[];t>8?v-7>t?(e=t-7,n=t+7):(e=Math.max(1,v-15+1),n=v):(e=1,n=14);for(var o=e;n>=o;o++)r.push(o);return v-1>n&&(r.push(-1),r.push(v)),r}();return e.jsxs("div",exports.__assign({className:"st-footer"},{children:[e.jsx("div",exports.__assign({className:"st-footer-info"},{children:e.jsxs("span",exports.__assign({className:"st-footer-results-text"},{children:["Showing ",R," to ",S," of ",h.toLocaleString()," results"]}))})),e.jsxs("div",exports.__assign({className:"st-footer-pagination"},{children:[k.map(function(n,r){return 0>n?e.jsx("span",exports.__assign({className:"st-page-ellipsis"},{children:"..."}),r):e.jsx("button",exports.__assign({onClick:function(){return H(n)},className:"st-page-btn ".concat(t===n?"active":"")},{children:n}),r)}),e.jsx("button",exports.__assign({className:"st-next-prev-btn ".concat(A?"disabled":""),onClick:E,disabled:A},{children:m})),e.jsx("button",exports.__assign({className:"st-next-prev-btn ".concat(M?"disabled":""),onClick:T,disabled:M},{children:w}))]}))]}))},M=function(n){return e.jsx("svg",exports.__assign({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},E=function(n){return e.jsx("svg",exports.__assign({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},T=function(n){return e.jsx("svg",exports.__assign({"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.jsx("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"})}))},H=function(n){return e.jsx("svg",exports.__assign({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:n.className,style:exports.__assign({height:"10px"},n.style)},{children:e.jsx("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"})}))},k=function(n){return e.jsx("svg",exports.__assign({"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.jsx("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"})}))},F=function(n){return e.jsx("svg",exports.__assign({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:n.className,style:exports.__assign({height:"1em"},n.style)},{children:e.jsx("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"})}))},D=function(){return e.jsx("svg",exports.__assign({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.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},O=function(e){var n=e.bufferRowCount,r=e.scrollTop,t=e.tableRows,o=e.rowHeight+1,i=r+e.contentHeight+o*n;return t.slice(Math.max(0,Math.floor(Math.max(0,r-o*n)/o)),Math.min(t.length,Math.ceil(i/o)))},P=function(e){return e.position*(e.rowHeight+1)-1},B=function(e){return e.position*(e.rowHeight+1)},L=function(r){var t=r.children,o=r.onClose,i=r.open,a=r.overflow,u=void 0===a?"auto":a,l=r.setOpen,c=r.width,s=r.containerRef,d=r.positioning,f=void 0===d?"fixed":d,v=N().mainBodyRef,h=n.useRef(null),p=n.useRef(null),w=n.useState("bottom-left"),m=w[0],g=w[1],x=n.useState({}),b=x[0],I=x[1],C=n.useState(!1),y=C[0],R=C[1];return n.useEffect(function(){i&&h.current?(R(!1),!p.current&&h.current.parentElement&&(p.current=h.current.parentElement),requestAnimationFrame(function(){if(h.current&&p.current){var e,n=h.current,r=p.current.getBoundingClientRect(),t=n.offsetHeight,o=c||n.offsetWidth,i=(e=(null==s?void 0:s.current)?s.current.getBoundingClientRect():(null==v?void 0:v.current)?v.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-r.bottom,a=r.top-e.top,u="bottom",l={};(t>i&&a>=t||t>i&&a>i)&&(u="top");var d="left";o>e.right-r.right+r.width&&(d="right"),"fixed"===f?("bottom"===u?l.top=r.bottom+4:l.bottom=window.innerHeight-r.top+4,"left"===d?l.left=r.left:l.right=window.innerWidth-r.right):("bottom"===u?l.top=r.height+4:l.bottom=r.height+4,"left"===d?l.left=0:l.right=0),g("".concat(u,"-").concat(d)),I(l),R(!0)}})):i||R(!1)},[i,c,s,v,f]),n.useEffect(function(){var e=function(e){i&&h.current&&h.current&&!h.current.contains(e.target)&&(l(!1),null==o||o())};return i&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}},[i,o,l]),n.useEffect(function(){var e=function(e){if(h.current&&!h.current.contains(e.target)){var n=h.current.parentElement;n&&!n.contains(e.target)&&(l(!1),null==o||o())}};return i&&document.addEventListener("mousedown",e,!0),function(){document.removeEventListener("mousedown",e,!0)}},[o,i,l]),n.useEffect(function(){var e=function(e){"Escape"===e.key&&i&&(l(!1),null==o||o())};return i&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[o,i,l]),i?e.jsx("div",exports.__assign({ref:h,className:"st-dropdown-content st-dropdown-".concat(m),onClick:function(e){return e.stopPropagation()},style:exports.__assign(exports.__assign({position:f,width:c?"".concat(c,"px"):"auto",visibility:y?"visible":"hidden"},b),{overflow:u})},{children:t})):null},W=function(n){var r=n.children,t=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.jsx("div",exports.__assign({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(u?"disabled":""," ").concat(c),onClick:function(){!u&&t&&t()},role:"option","aria-selected":i,"aria-disabled":u},{children:r}))},q=function(r){var t=r.onBlur,o=r.onChange,i=r.open,a=r.setOpen,u=n.useState(r.value),l=u[0],c=u[1],s=function(e){c(e),o(e),a(!1),t()};return e.jsxs(L,exports.__assign({open:i,onClose:function(){t()},setOpen:a,width:120},{children:[e.jsx(W,exports.__assign({isSelected:!0===l,onClick:function(){return s(!0)}},{children:"True"})),e.jsx(W,exports.__assign({isSelected:!1===l,onClick:function(){return s(!1)}},{children:"False"}))]}))},z=function(r){var t=r.defaultValue,o=r.onBlur,i=r.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:o,onChange:function(e){i(e.target.value)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||o()},onMouseDown:function(e){e.stopPropagation()}})},j=function(r){var t=r.defaultValue,o=r.onBlur,i=r.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:""+t,onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||o()},onMouseDown:function(e){e.stopPropagation()}})},U=n.lazy(function(){return Promise.resolve().then(function(){return require("./Animate-d7382b4a.js")})}),G=n.lazy(function(){return Promise.resolve().then(function(){return require("./DatePicker-2558cb9c.js")})}),K=function(r){var t=o(r,["parentRef","tableRow"]);return e.jsx(n.Suspense,exports.__assign({fallback:e.jsx("div",exports.__assign({},t))},{children:e.jsx(U,exports.__assign({},r))}))},J=function(r){return e.jsx(n.Suspense,exports.__assign({fallback:e.jsx("div",exports.__assign({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:e.jsx(G,exports.__assign({},r))}))},V=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 r=new Date(e);return isNaN(r.getTime())?new Date:new Date(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0)},_=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0)},X=function(e){if(!e)return new Date;if("string"==typeof e)return V(e);if("number"==typeof e){var n=new Date(e);return isNaN(n.getTime())?new Date:_(n)}return e instanceof Date?_(e):new Date},Y=function(e){return e?V(""+e):new Date},$=function(r){var t=r.onBlur,o=r.onChange,i=r.open,a=r.setOpen,u=r.value;n.useEffect(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.jsx(L,exports.__assign({open:i,onClose:l,setOpen:a,width:280},{children:e.jsx(J,{value:Y(u),onChange:function(e){var n=e.toISOString().split("T")[0];o(n),a(!1),t()},onClose:l})}))},Q=function(r){var t=r.onBlur,o=r.onChange,i=r.open,a=r.options,u=r.setOpen,l=n.useState(r.value||""),c=l[0],s=l[1];return e.jsx(L,exports.__assign({open:i,onClose:function(){t()},setOpen:u,width:150},{children:e.jsx("div",exports.__assign({className:"st-enum-dropdown-content"},{children:a.map(function(n){return e.jsx(W,exports.__assign({isSelected:c===n.value,onClick:function(){return s(e=n.value),o(e),u(!1),void t();var e}},{children:n.label}),n.value)})}))}))},Z=function(n){var r=n.enumOptions,t=void 0===r?[]:r,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.jsx(q,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l}):"date"===u?e.jsx($,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?e.jsx(Q,{onBlur:c,onChange:o,open:!0,options:t,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?e.jsx(j,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}}):e.jsx(z,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},ee=0,ne=function(){return function(e){var n=e.callback,r=e.callbackProps,t=e.limit,o=Date.now();0!==ee&&t>o-ee||(ee=o,n(r))}},re=function(e){var r=n.useRef(e);return n.useEffect(function(){JSON.stringify(r.current)!==JSON.stringify(e)&&(r.current=e)},[e]),r.current},te=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(te);var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=te(e[r]));return n},oe=function(e,n){return e.filter(function(e){return e.pinned===n}).some(function(e){return!e.hide})},ie=Date.now(),ae={screenX:0,screenY:0},ue=function(e,n,r){void 0===r&&(r=[]);for(var t=0;e.length>t;t++){var o=e[t];if(o.accessor===n)return u(u([],r,!0),[t],!1);if(o.children&&o.children.length>0){var i=ue(o.children,n,u(u([],r,!0),[t],!1));if(i)return i}}return null},le=function(e){return"left"===e.pinned?"left":"right"===e.pinned?"right":"main"};var ce=function(e){var n=e.draggedHeaderRef,r=e.headers,t=e.hoveredHeaderRef,o=e.onColumnOrderChange,i=e.onTableHeaderDragEnd,a=N().setHeaders,l=re(r);return{handleDragStart:function(e){n.current=e,ie=Date.now()},handleDragOver:function(e){var o=e.event,a=e.hoveredHeader;if(o.preventDefault(),r&&n.current){var u=o.currentTarget.getAnimations().some(function(e){return"running"===e.playState}),c=o.screenX,s=o.screenY,d=Math.sqrt(Math.pow(c-ae.screenX,2)+Math.pow(s-ae.screenY,2));t.current=a;var f,v=n.current,h=!1;if(le(v)!==le(a))f=(C=function(e,n,r){var t,o,i=te(e),a=!1;try{var u=le(r),l=i.findIndex(function(e){return e.accessor===n.accessor}),c=i.findIndex(function(e){return e.accessor===r.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var s=i.splice(l,1)[0],d=(t=u,o=exports.__assign({},s),"left"===t?o.pinned="left":"right"===t?o.pinned="right":delete o.pinned,o);i.splice(c,0,d)}catch(e){console.error("Error in insertHeaderAcrossSections:",e),a=!0}return{newHeaders:i,emergencyBreak:a}}(r,v,a)).newHeaders,h=C.emergencyBreak;else{var p=r,w=ue(p,v.accessor),m=ue(p,a.accessor);if(!w||!m)return;var g=w.length,x=m.length,b=m;if(g!==x){var I=x-g;I>0&&(b=m.slice(0,-I))}var C=function(e,n,r){var t=te(e),o=!1;function i(e,n){for(var r=e,t=0;n.length-1>t;t++)r=r[n[t]].children;return r[n[n.length-1]]}function a(e,n,r){for(var t=e,i=0;n.length-1>i;i++){if(!t[n[i]].children){o=!0;break}t=t[n[i]].children}t[n[n.length-1]]=r}var u=i(t,n);return a(t,n,i(t,r)),a(t,r,u),{newHeaders:t,emergencyBreak:o}}(p,w,b);f=C.newHeaders,h=C.emergencyBreak}if(!(u||a.accessor===v.accessor||10>d||JSON.stringify(f)===JSON.stringify(r)||h)){var y=Date.now();JSON.stringify(f)===JSON.stringify(l)&&(1500>y-ie||40>d)||(ie=y,ae={screenX:c,screenY:s},i(f))}}},handleDragEnd:function(){n.current=null,t.current=null,setTimeout(function(){a(function(e){return u([],e,!0)}),null==o||o(r)},10)}}},se=function(n){var r=n.checked,t=void 0!==r&&r,o=n.children,i=n.onChange;return e.jsxs("label",exports.__assign({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:t,className:"st-checkbox-input",onChange:function(){i&&i(!t)},type:"checkbox"}),e.jsx("span",exports.__assign({className:"st-checkbox-custom ".concat(t?"st-checked":"")},{children:t&&e.jsx(H,{className:"st-checkbox-checkmark"})})),o]}))},de=function(e){var n=e.content,r=e.header;return"boolean"==typeof n?n?"True":"False":Array.isArray(n)?0===n.length?"[]":n.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", "):"date"===r.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?X(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},fe=function(r){var t=r.borderClass,o=r.colIndex,i=r.displayRowNumber,a=r.header,u=r.isHighlighted,l=r.isInitialFocused,c=r.nestedIndex,s=r.rowIndex,d=r.tableRow,v=N(),p=v.cellRegistry,w=v.cellUpdateFlash,m=v.columnBorders,g=v.draggedHeaderRef,I=v.enableRowSelection,C=v.expandIcon,y=v.handleMouseDown,R=v.handleMouseOver,S=v.handleRowSelect,A=v.headers,M=v.hoveredHeaderRef,E=v.isCopyFlashing,T=v.isLoading,H=v.isRowSelected,k=v.isWarningFlashing,F=v.onCellEdit,D=v.onCellClick,O=v.onTableHeaderDragEnd,P=v.rowButtons,B=v.rowGrouping,L=v.rowIdAccessor,W=v.rowsWithSelectedCells,q=v.selectedColumns,z=v.setUnexpandedRows,j=v.tableBodyContainerRef,U=v.theme,G=v.unexpandedRows,J=v.useOddColumnBackground,V=d.depth,_=d.row,X=n.useState(_[a.accessor]),Y=X[0],$=X[1],Q=n.useState(!1),ee=Q[0],re=Q[1],te=n.useState(!1),oe=te[0],ie=te[1],ae=n.useState(!1),ue=ae[0],le=ae[1],fe=n.useRef(null),ve=b({row:_,rowIdAccessor:L}),he=B&&B[V],pe=!!he&&function(e,n){return!!n&&x(e[n])}(_,he),we=!G.has(ve+""),me=E({rowIndex:s,colIndex:o,rowId:ve}),ge=k({rowIndex:s,colIndex:o,rowId:ve}),xe=n.useMemo(function(){var e,n,r;if(!m)return!1;var t=A.filter(function(e){return"left"===e.pinned}),o=A.filter(function(e){return!e.pinned}),i=A.filter(function(e){return"right"===e.pinned});return"left"===a.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===a.accessor:"right"===a.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===a.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===a.accessor},[m,A,a.accessor,a.pinned]),be=ce({draggedHeaderRef:g,headers:A,hoveredHeaderRef:M,onTableHeaderDragEnd:O}).handleDragOver,Ie=ne(),Ce=f({accessor:a.accessor,rowId:ve}),ye=h({rowId:ve,accessor:a.accessor}),Re=a.isSelectionColumn&&I;n.useEffect(function(){if(p){var e="".concat(ve,"-").concat(a.accessor);return p.set(e,{updateContent:function(e){Y!==e?($(e),w&&(ie(!0),fe.current&&clearTimeout(fe.current),fe.current=setTimeout(function(){ie(!1)},800))):$(e)}}),function(){p.delete(e),fe.current&&clearTimeout(fe.current)}}},[p,w,ve,a.accessor,Y]),n.useEffect(function(){if(oe){var e=setTimeout(function(){ie(!1)},850);return function(){return clearTimeout(e)}}},[oe]),n.useEffect(function(){$(_[a.accessor])},[_,a.accessor]);var Se="boolean"===a.type||"date"===a.type||"enum"===a.type,Ne=!!(null==a?void 0:a.isEditable),Ae=q.has(o),Me=u&&!Ae,Ee=n.useMemo(function(){return!!Re&&W.has(ve+"")},[Re,W,ve]),Te="st-cell ".concat(V>0&&a.expandable?"st-cell-depth-".concat(V):""," ").concat(Me?l?"st-cell-selected-first ".concat(t):"st-cell-selected ".concat(t):""," ").concat(Ae?l?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(Ne?"clickable":""," ").concat(oe?l?"st-cell-updating-first":"st-cell-updating":""," ").concat(me?l?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(ge?l?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(J?c%2==0?"even-column":"odd-column":""," ").concat(Re?"st-selection-cell":""," ").concat(Ee?"st-selection-has-highlighted-cell":""," ").concat(xe?"st-last-column":""),He=n.useCallback(function(e){null==e&&(e="number"===a.type?0:"boolean"!==a.type&&""),$(e),_[a.accessor]=e,null==F||F({accessor:a.accessor,newValue:e,row:_,rowIndex:s})},[a.accessor,a.type,F,_,s]),ke=n.useCallback(function(){z(function(e){var n=new Set(e),r=ve+"";return n.has(r)?n.delete(r):n.add(r),n})},[ve,z]);return!ee||Se||Re?e.jsxs(K,exports.__assign({className:Te,"data-accessor":a.accessor,"data-col-index":o,"data-row-id":ve,"data-row-index":s,id:Ce,onClick:function(){D&&!Re&&D({accessor:a.accessor,colIndex:o,row:_,rowId:ve,rowIndex:s,value:Y})},onDoubleClick:function(){return a.isEditable&&!Re&&re(!0)},onDragOver:function(e){Re||Ie({callback:be,callbackProps:{event:e,hoveredHeader:a},limit:50})},onKeyDown:function(e){ee||Re||"F2"!==e.key&&"Enter"!==e.key||!a.isEditable||ee||(e.preventDefault(),re(!0))},onMouseDown:function(){ee||Re||y({rowIndex:s,colIndex:o,rowId:ve})},onMouseEnter:function(){le(!0)},onMouseLeave:function(){le(!1)},onMouseOver:function(){ee||Re||R({rowIndex:s,colIndex:o,rowId:ve})},parentRef:j,tableRow:d},{children:[a.expandable&&pe?e.jsx("div",exports.__assign({className:"st-icon-container st-expand-icon-container ".concat(we?"expanded":"collapsed"),onClick:ke},{children:C})):null,e.jsx("span",exports.__assign({className:"st-cell-content ".concat("right"===a.align?"right-aligned":"center"===a.align?"center-aligned":"left-aligned")},{children:T?e.jsx("div",{className:"st-loading-skeleton"}):e.jsx("span",{children:Re?e.jsxs("div",exports.__assign({className:"st-selection-cell-content"},{children:[e.jsx("div",exports.__assign({className:"st-selection-control"},{children:ue||H&&H(ve+"")?e.jsx(se,{checked:!!H&&H(ve+""),onChange:function(e){S&&S(ve+"",e)}}):e.jsx("span",exports.__assign({className:"st-row-number"},{children:i+1}))})),function(){if(!P||!Re||0===P.length)return null;if(!(ue||H&&H(ve+"")))return null;var n={row:_};return e.jsx("div",exports.__assign({className:"st-row-buttons"},{children:P.map(function(r,t){return e.jsx("span",exports.__assign({className:"st-row-button"},{children:r(n)}),t)})}))}()]})):a.cellRenderer?a.cellRenderer({accessor:a.accessor,colIndex:o,row:_,theme:U}):de({content:Y,header:a})})})),!T&&ee&&Se&&!Re&&e.jsx(Z,{enumOptions:a.enumOptions,onChange:He,setIsEditing:re,type:a.type,value:Y})]}),ye):e.jsx("div",exports.__assign({className:"st-cell-editing",id:f({accessor:a.accessor,rowId:ve}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e.jsx(Z,{enumOptions:a.enumOptions,onChange:He,setIsEditing:re,type:a.type,value:Y})}))},ve=function(n){var r=n.columnIndexStart,t=n.columnIndices,o=n.headers,i=n.pinned,a=n.rowIndex,u=n.displayRowNumber,l=n.rowIndices,c=n.tableRow,s=N(),d=s.rowIdAccessor,h=s.collapsedHeaders,p=o.filter(function(e){return v({header:e,pinned:i,headers:o,collapsedHeaders:h})});return e.jsx(e.Fragment,{children:p.map(function(n,s){var v=b({row:c.row,rowIdAccessor:d}),h=f({accessor:n.accessor,rowId:v});return e.jsx(he,{columnIndices:t,displayRowNumber:u,header:n,headers:o,nestedIndex:s+(null!=r?r:0),pinned:i,rowIndex:a,rowIndices:l,tableRow:c},h)})})},he=function(r){var t=r.columnIndices,o=r.displayRowNumber,i=r.header,a=r.headers,u=r.nestedIndex,l=r.pinned,c=r.rowIndex,s=r.rowIndices,d=r.tableRow,h=t[i.accessor],p=N(),w=p.getBorderClass,m=p.isSelected,g=p.isInitialFocusedCell,x=p.collapsedHeaders,I=b({row:d.row,rowIdAccessor:p.rowIdAccessor});if(i.children&&i.children.length>0){var C=i.children.filter(function(e){return v({header:e,pinned:l,headers:a,collapsedHeaders:x})});return e.jsx(n.Fragment,{children:C.map(function(n){var r=f({accessor:n.accessor,rowId:I});return e.jsx(he,{columnIndices:t,displayRowNumber:o,header:n,headers:a,nestedIndex:u,pinned:l,rowIndex:c,rowIndices:s,tableRow:d},r)})})}var y={rowIndex:c,colIndex:h,rowId:I},R=w(y),S=m(y),A=g(y),M=f({accessor:i.accessor,rowId:I});return e.jsx(fe,{borderClass:R,colIndex:h,displayRowNumber:o,header:i,isHighlighted:S,isInitialFocused:A,nestedIndex:u,rowIndex:c,tableRow:d},M)},pe=function(n){var r=n.columnIndices,t=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.index,u=n.pinned,l=n.rowHeight,c=n.rowIndices,s=n.setHoveredIndex,d=n.tableRow,f=N(),v=f.useHoverRowBackground,h=f.isAnimating,p=f.isRowSelected,w=f.useOddEvenRowBackground,m=d.position,g=d.displayPosition,x=m%2==0,I=b({row:d.row,rowIdAccessor:f.rowIdAccessor}),C=!!p&&p(I+"");return e.jsx("div",exports.__assign({className:"st-row ".concat(w?x?"even":"odd":""," ").concat(C?"selected":""),"data-index":a,onMouseEnter:function(){!h&&v&&s(a)},style:{gridTemplateColumns:o,top:B({position:m,rowHeight:l}),height:"".concat(l,"px")}},{children:e.jsx(ve,{columnIndexStart:t,columnIndices:r,displayRowNumber:g,headers:i,pinned:u,rowIndex:m,rowIndices:c,tableRow:d},I)}))},we=function(r){var t=r.displayStrongBorder,o=r.position,i=r.rowHeight,a=r.templateColumns,u=n.useRef(null);return e.jsx("div",exports.__assign({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(e){var n=e.currentTarget,r=n.style.pointerEvents;n.style.pointerEvents="none";var t=document.elementFromPoint(e.clientX,e.clientY);if(n.style.pointerEvents=r,t){var o=t.closest(".st-cell");if(o instanceof HTMLElement){u.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(e){if(u.current){var n=u.current.getBoundingClientRect(),r=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:n.top+n.height/2});u.current.dispatchEvent(r),u.current=null}},style:{gridTemplateColumns:a,top:P({position:o,rowHeight:i})}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},me=n.createContext(void 0),ge=function(e){var r=e.childRef,t=e.children,o=e.group,i=void 0===o?"default":o,a=function(){var e=n.useContext(me);if(!e)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),u=a.registerPane,l=a.unregisterPane;return n.useEffect(function(){var e=[i];return r.current&&u(r.current,e),function(){r.current&&l(r.current,e)}},[r,u,l,i]),n.cloneElement(t,{ref:function(e){r.current=e}})},xe=n.forwardRef(function(r,t){var o=r.columnIndexStart,i=r.columnIndices,a=r.headers,u=r.pinned,l=r.rowHeight,c=r.rowIndices,s=r.setHoveredIndex,d=r.templateColumns,f=r.totalHeight,v=r.rowsToRender,h=r.width,p=u?"st-body-pinned-".concat(u):"st-body-main",w=N().rowIdAccessor,m=n.useRef(null);return n.useImperativeHandle(t,function(){return m.current},[]),n.useMemo(function(){return oe(a,u)},[a,u])?e.jsx(ge,exports.__assign({childRef:m,group:u?"pinned-".concat(u):"default"},{children:e.jsx("div",exports.__assign({className:p,ref:m,style:exports.__assign({position:"relative",height:"".concat(f,"px"),width:h},!u&&{flexGrow:1})},{children:v.map(function(r,t){var f=b({row:r.row,rowIdAccessor:w});return e.jsxs(n.Fragment,{children:[0!==t&&e.jsx(we,{displayStrongBorder:r.isLastGroupRow,position:r.position,rowHeight:l,templateColumns:d,rowIndex:t-1}),e.jsx(pe,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:d,headers:a,index:t,pinned:u,rowHeight:l,rowIndices:c,setHoveredIndex:s,tableRow:r},f)]},f)})}))})):null});function be(e){var n=e.headers,r=e.pinnedLeftColumns,t=e.pinnedRightColumns,o=e.collapsedHeaders,i={},a=0,l=u(u(u([],r,!0),n,!0),t,!0),c=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 v({header:e,headers:l,collapsedHeaders:o})}).forEach(function(e,n){c(e,0===n)})};return r.forEach(function(e,n){c(e,0===n)}),n.filter(function(e){return!e.pinned&&v({header:e,headers:l,collapsedHeaders:o})}).forEach(function(e,n){c(e,0===n&&0===r.length)}),t.forEach(function(e){c(e,!1)}),i}xe.displayName="TableSection";var Ie=function(r){var t=r.mainTemplateColumns,o=r.pinnedLeftColumns,i=r.pinnedLeftTemplateColumns,a=r.pinnedLeftWidth,u=r.pinnedRightColumns,l=r.pinnedRightTemplateColumns,c=r.pinnedRightWidth,s=r.rowsToRender,d=r.setScrollTop,f=r.tableRows,v=N(),h=v.collapsedHeaders,p=v.headerContainerRef,w=v.headers,m=v.isAnimating,g=v.mainBodyRef,x=v.onLoadMore,I=v.rowHeight,C=v.rowIdAccessor,y=v.scrollbarWidth,R=v.setIsScrolling,S=v.shouldPaginate,A=v.tableBodyContainerRef,M=n.useState(!1),E=M[0],T=M[1],H=n.useRef(new Set),k=n.useCallback(function(e){H.current.forEach(function(e){return e.classList.remove("hovered")}),H.current.clear(),null!==e&&document.querySelectorAll('.st-body-container .st-row[data-index="'.concat(e,'"]')).forEach(function(e){e.classList.add("hovered"),H.current.add(e)})},[]);n.useEffect(function(){m&&k(null)},[m,k]),function(e){var r=e.headerContainerRef,t=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],u=i[1];n.useEffect(function(){var e=null==r?void 0:r.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}},[r,a,o]),n.useEffect(function(){var e=null==t?void 0:t.current;if(e&&(null==r?void 0:r.current)){var n=function(){e&&u(e.scrollHeight>e.clientHeight)};n();var o=new ResizeObserver(function(){n()});return o.observe(e),function(){e&&o.unobserve(e)}}},[r,t])}({headerContainerRef:p,mainSectionRef:A,scrollbarWidth:y}),n.useEffect(function(){return function(){D.current&&clearTimeout(D.current)}},[]);var F=n.useRef(null),D=n.useRef(null),O=n.useRef(0),P=function(e){return e.length}(f),B=P*(I+1)-1,L=n.useMemo(function(){return be({headers:w,pinnedLeftColumns:o,pinnedRightColumns:u,collapsedHeaders:h})},[w,o,u,h]),W=n.useMemo(function(){var e={};return s.forEach(function(n,r){var t=b({row:n.row,rowIdAccessor:C})+"";e[t]=r}),e},[s,C]),q=n.useCallback(function(e,n){!x||S||E||200>=e.scrollHeight-(n+e.clientHeight)&&n>O.current&&(T(!0),x(),setTimeout(function(){T(!1)},1e3))},[x,S,E]),z={columnIndices:L,headerContainerRef:p,headers:w,rowHeight:I,rowIndices:W,rowsToRender:s,setHoveredIndex:k};return e.jsxs("div",exports.__assign({className:"st-body-container",onMouseLeave:function(){return k(null)},onScroll:function(e){var n=e.currentTarget,r=n.scrollTop;R(!0),D.current&&clearTimeout(D.current),D.current=setTimeout(function(){R(!1)},150),F.current&&cancelAnimationFrame(F.current),F.current=requestAnimationFrame(function(){d(r),q(n,r),O.current=r})},ref:A},{children:[e.jsx(xe,exports.__assign({},z,{pinned:"left",templateColumns:i,totalHeight:B,width:a})),e.jsx(xe,exports.__assign({},z,{columnIndexStart:o.length,ref:g,templateColumns:t,totalHeight:B})),e.jsx(xe,exports.__assign({},z,{columnIndexStart:o.length+t.length,pinned:"right",templateColumns:l,totalHeight:B,width:c}))]}))},Ce=function(e){var n=e.event,r=e.header,t=e.headers,o=e.setHeaders,i=e.setIsResizing,a=e.startWidth,c=e.collapsedHeaders;n.preventDefault();var s="clientX"in n?n.clientX:n.touches[0].clientX,d="touches"in n;if(r&&!r.hide){i(!0);var f,v=g(r);if(r.children&&r.children.length>0){var h=p(r,c);f=h.length>0?h:[r]}else f=[r];var x=function(e){var n="right"===r.pinned?s-e:e-s,i=function(e){var n=e.header,r=e.headers,t=e.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth,a=i*l(window.innerWidth);if(!n.pinned)return Math.max(.6*i,600);var u=a-r.filter(function(e){return e.pinned===n.pinned&&e.accessor!==n.accessor}).reduce(function(e,n){return n.hide?e:e+p(n,t).reduce(function(e,n){return e+w(n)},0)},0),c=g(n);return c>u?(console.warn("Header ".concat(n.accessor," exceeds pinned section width limit")),c):u}({header:r,headers:t,collapsedHeaders:c});f.length>1?ye({delta:n,leafHeaders:f,minWidth:v,startWidth:a,maxWidth:i}):f[0].width=Math.max(Math.min(a+n,i),v),t.forEach(function(e){m(e)});var d=u([],t,!0);o(d)};if(d){var b=function(e){x(e.touches[0].clientX)},I=function(){document.removeEventListener("touchmove",b),document.removeEventListener("touchend",I),i(!1)};document.addEventListener("touchmove",b),document.addEventListener("touchend",I)}else{var C=function(e){x(e.clientX)},y=function(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",y),i(!1)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",y)}}},ye=function(e){var n=e.delta,r=e.leafHeaders,t=e.minWidth,o=e.startWidth,i=e.maxWidth,a=r.reduce(function(e,n){return Math.min(e,g(n))},40),u=r.reduce(function(e,n){return e+("number"==typeof n.width?n.width:150)},0),l=Math.max(Math.min(o+n,i),a)-u;r.forEach(function(e){var n="number"==typeof e.width?e.width:150;e.width=Math.max(n+l*(n/u),t)})},Re={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"},Se=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"]}},Ne=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},Ae=function(e){return["between","notBetween","in","notIn"].includes(e)},Me=function(e){return["isEmpty","isNotEmpty"].includes(e)},Ee=function(n){return e.jsx("div",exports.__assign({className:"st-filter-container"},{children:n.children}))},Te=function(r){var t=r.value,o=r.onChange,i=r.options,a=r.placeholder,u=void 0===a?"Select...":a,l=r.className,c=void 0===l?"":l,s=r.disabled,d=void 0!==s&&s,f=n.useState(!1),v=f[0],h=f[1],p=n.useState(-1),w=p[0],m=p[1],g=n.useRef(null),x=i.find(function(e){return e.value===t});return n.useEffect(function(){var e=function(e){if(v)switch(e.key){case"ArrowDown":e.preventDefault(),m(function(e){return i.length-1>e?e+1:0});break;case"ArrowUp":e.preventDefault(),m(function(e){return e>0?e-1:i.length-1});break;case"Enter":e.preventDefault(),0>w||(o(i[w].value),h(!1),m(-1));break;case"Escape":e.preventDefault(),h(!1),m(-1)}};if(v)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[v,w,i,o]),e.jsxs("div",exports.__assign({ref:g,className:"st-custom-select ".concat(c," ").concat(d?"st-custom-select-disabled":""," ").concat(v?"st-custom-select-open":"").trim()},{children:[e.jsxs("button",exports.__assign({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!d)if(h(!v),v)m(-1);else{var e=i.findIndex(function(e){return e.value===t});m(0>e?0:e)}},disabled:d,"aria-haspopup":"listbox","aria-expanded":v,"aria-labelledby":"select-label"},{children:[e.jsx("span",exports.__assign({className:"st-custom-select-value"},{children:x?x.label:u})),e.jsx(D,{})]})),e.jsx(L,exports.__assign({open:v,setOpen:h,onClose:function(){h(!1),m(-1)},positioning:"absolute",overflow:"auto"},{children:e.jsx("div",exports.__assign({className:"st-custom-select-options",role:"listbox"},{children:i.map(function(n,r){return e.jsx("div",exports.__assign({className:"st-custom-select-option ".concat(n.value===t?"st-custom-select-option-selected":""," ").concat(r===w?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===t,onClick:function(){return o(n.value),h(!1),void m(-1)}},{children:n.label}),r)})}))}))]}))},He=function(n){var r=n.value,t=n.onChange,o=n.operators.map(function(e){return{value:e,label:Re[e]}});return e.jsx("div",exports.__assign({className:"st-filter-section"},{children:e.jsx(Te,{value:r,onChange:function(e){t(e)},options:o})}))},ke=function(n){var r=n.type,t=n.onChange,o=n.autoFocus,i=n.className,a=n.onEnterPress;return e.jsx("input",{type:void 0===r?"text":r,value:n.value,onChange:function(e){return t(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()})},Fe=function(n){var r=n.children,t=n.className;return e.jsx("div",exports.__assign({className:"st-filter-section ".concat(void 0===t?"":t).trim()},{children:r}))},De=function(n){var r=n.onClear,t=n.canApply,o=n.showClear;return e.jsxs("div",exports.__assign({className:"st-filter-actions"},{children:[e.jsx("button",exports.__assign({onClick:n.onApply,disabled:!t,className:"st-filter-button st-filter-button-apply ".concat(t?"":"st-filter-button-disabled")},{children:"Apply"})),o&&r&&e.jsx("button",exports.__assign({onClick:r,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},Oe=function(r){var t=r.header,o=r.currentFilter,i=r.onApplyFilter,a=r.onClearFilter,u=n.useState((null==o?void 0:o.operator)||"contains"),l=u[0],c=u[1],s=n.useState(((null==o?void 0:o.value)||"")+""),d=s[0],f=s[1],v=Se("string");n.useEffect(function(){o?(c(o.operator),f((o.value||"")+"")):(c("contains"),f(""))},[o]);var h=function(){var e=exports.__assign({accessor:t.accessor,operator:l},Ne(l)&&{value:d});i(e)},p=Me(l)||d.trim();return e.jsxs(Ee,{children:[e.jsx(He,{value:l,onChange:c,operators:v}),Ne(l)&&e.jsx(Fe,{children:e.jsx(ke,{type:"text",value:d,onChange:f,placeholder:"Filter...",autoFocus:!0,onEnterPress:h})}),e.jsx(De,{onApply:h,onClear:a,canApply:!!p,showClear:!!o})]})},Pe=function(r){var t,o,i=r.header,a=r.currentFilter,u=r.onApplyFilter,l=r.onClearFilter,c=n.useState((null==a?void 0:a.operator)||"equals"),s=c[0],d=c[1],f=n.useState(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],p=n.useState(((null===(t=null==a?void 0:a.values)||void 0===t?void 0:t[0])||"")+""),w=p[0],m=p[1],g=n.useState(((null===(o=null==a?void 0:a.values)||void 0===o?void 0:o[1])||"")+""),x=g[0],b=g[1],I=Se("number");n.useEffect(function(){var e,n;a?(d(a.operator),h((a.value||"")+""),m(((null===(e=a.values)||void 0===e?void 0:e[0])||"")+""),b(((null===(n=a.values)||void 0===n?void 0:n[1])||"")+"")):(d("equals"),h(""),m(""),b(""))},[a]);var C=function(){var e={accessor:i.accessor,operator:s};Ne(s)?e.value=parseFloat(v):Ae(s)&&(e.values=[parseFloat(""+w),parseFloat(""+x)]),u(e)};return e.jsxs(Ee,{children:[e.jsx(He,{value:s,onChange:d,operators:I}),Ne(s)&&e.jsx(Fe,{children:e.jsx(ke,{type:"number",value:v,onChange:h,placeholder:"Enter number...",autoFocus:!0,onEnterPress:C})}),Ae(s)&&e.jsxs(Fe,{children:[e.jsx(ke,{type:"number",value:w,onChange:m,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:C}),e.jsx(ke,{type:"number",value:x,onChange:b,placeholder:"To...",onEnterPress:C})]}),e.jsx(De,{onApply:C,onClear:l,canApply:!!Me(s)||(Ne(s)?""!==v.trim():!!Ae(s)&&""!==(w+"").trim()&&""!==(x+"").trim()),showClear:!!a})]})},Be=function(n){var r=n.className;return e.jsx(Te,{value:n.value,onChange:n.onChange,options:n.options,className:void 0===r?"":r,placeholder:n.placeholder})},Le=function(r){var t=r.header,o=r.currentFilter,i=r.onApplyFilter,a=r.onClearFilter,u=n.useState((null==o?void 0:o.operator)||"equals"),l=u[0],c=u[1],s=n.useState(void 0!==(null==o?void 0:o.value)?o.value+"":"true"),d=s[0],f=s[1],v=Se("boolean");n.useEffect(function(){o?(c(o.operator),f(void 0!==o.value?o.value+"":"true")):(c("equals"),f("true"))},[o]);var h=Me(l)||""!==d;return e.jsxs(Ee,{children:[e.jsx(He,{value:l,onChange:c,operators:v}),Ne(l)&&e.jsx(Fe,{children:e.jsx(Be,{value:d,onChange:f,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e.jsx(De,{onApply:function(){var e={accessor:t.accessor,operator:l};Ne(l)&&(e.value="true"===d),i(e)},onClear:a,canApply:h,showClear:!!o})]})},We=function(r){var t,o,i=r.header,a=r.currentFilter,u=r.onApplyFilter,l=r.onClearFilter,c=n.useState((null==a?void 0:a.operator)||"equals"),s=c[0],d=c[1],f=n.useState((null==a?void 0:a.value)?a.value+"":""),v=f[0],h=f[1],p=n.useState((null===(t=null==a?void 0:a.values)||void 0===t?void 0:t[0])?a.values[0]+"":""),w=p[0],m=p[1],g=n.useState(((null===(o=null==a?void 0:a.values)||void 0===o?void 0:o[1])||"")+""),x=g[0],b=g[1],I=Se("date");n.useEffect(function(){var e,n;a?(d(a.operator),h((a.value||"")+""),m(((null===(e=a.values)||void 0===e?void 0:e[0])||"")+""),b(((null===(n=a.values)||void 0===n?void 0:n[1])||"")+"")):(d("equals"),h(""),m(""),b(""))},[a]);var C=function(r){var t=r.value,o=r.onChange,i=r.placeholder,a=r.autoFocus,u=r.className,l=n.useState(!1),c=l[0],s=l[1],d=n.useState(""),f=d[0],v=d[1],h=n.useRef(null);n.useEffect(function(){if(t){var e=X(t);isNaN(e.getTime())||v(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else v("")},[t]),n.useEffect(function(){a&&h.current&&h.current.focus()},[a]);var p=t?X(t):new Date;return e.jsxs("div",exports.__assign({className:"st-date-input-container",style:{position:"relative"}},{children:[e.jsx("input",{ref:h,type:"text",value:f,placeholder:i,onClick:function(){s(!c)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),s(!c)):"Escape"===e.key&&s(!1)},readOnly:!0,className:"st-filter-input ".concat(u||""),style:{cursor:"pointer"}}),e.jsx(L,exports.__assign({open:c,setOpen:s,onClose:function(){s(!1)},positioning:"absolute",overflow:"visible"},{children:e.jsx(J,{value:p,onChange:function(e){var n=e.toISOString().split("T")[0];o(n),s(!1)},onClose:function(){return s(!1)}})}))]}))};return e.jsxs(Ee,{children:[e.jsx(He,{value:s,onChange:d,operators:I}),Ne(s)&&e.jsx(Fe,{children:e.jsx(C,{value:v,onChange:h,placeholder:"Select date...",autoFocus:!0})}),Ae(s)&&e.jsxs(Fe,{children:[e.jsx(C,{value:w,onChange:m,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e.jsx(C,{value:x,onChange:b,placeholder:"To date..."})]}),e.jsx(De,{onApply:function(){var e={accessor:i.accessor,operator:s};Ne(s)?e.value=v:Ae(s)&&(e.values=[w,x]),u(e)},onClear:l,canApply:!!Me(s)||(Ne(s)?""!==v.trim():!!Ae(s)&&""!==w.trim()&&""!==x.trim()),showClear:!!a})]})},qe=function(r){var t=r.header,o=r.currentFilter,i=r.onApplyFilter,a=r.onClearFilter,l=n.useMemo(function(){return t.enumOptions||[]},[t.enumOptions]),c=n.useMemo(function(){return l.map(function(e){return e.value})},[l]),s=n.useState((null==o?void 0:o.values)?o.values.map(String):c),d=s[0],f=s[1],v=n.useState(""),h=v[0],p=v[1],w=n.useMemo(function(){if(!h)return l;var e=h.toLowerCase();return l.filter(function(n){return n.label.toLowerCase().includes(e)})},[l,h]);n.useEffect(function(){f(o?o.values?o.values.map(String):[]:c)},[o,c]);var m=l.length>10;return e.jsxs(Ee,{children:[e.jsx(Fe,{children:e.jsxs("div",exports.__assign({className:"st-enum-filter-options"},{children:[e.jsx("div",exports.__assign({className:"st-enum-select-all"},{children:e.jsx(se,exports.__assign({checked:d.length===c.length,onChange:function(e){f(e?c:[])}},{children:e.jsx("span",exports.__assign({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),m&&e.jsx("div",exports.__assign({className:"st-enum-search"},{children:e.jsx(ke,{type:"text",value:h,onChange:p,placeholder:"Search..."})})),w.map(function(n,r){return e.jsx(se,exports.__assign({checked:d.includes(n.value),onChange:function(){return e=n.value,void f(function(n){return n.includes(e)?n.filter(function(n){return n!==e}):u(u([],n,!0),[e],!1)});var e}},{children:e.jsx("span",exports.__assign({className:"st-enum-option-label"},{children:n.label}))}),r)}),h&&0===w.length&&e.jsx("div",exports.__assign({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),e.jsx(De,{onApply:function(){d.length!==c.length?i({accessor:t.accessor,operator:"in",values:d}):a()},onClear:a,canApply:0!==d.length&&d.length!==c.length,showClear:!!o})]})},ze=function(n){var r=n.header,t=n.currentFilter,o=n.onApplyFilter,i=n.onClearFilter;return e.jsx(e.Fragment,{children:function(){switch(r.type){case"number":return e.jsx(Pe,{header:r,currentFilter:t,onApplyFilter:o,onClearFilter:i});case"boolean":return e.jsx(Le,{header:r,currentFilter:t,onApplyFilter:o,onClearFilter:i});case"date":return e.jsx(We,{header:r,currentFilter:t,onApplyFilter:o,onClearFilter:i});case"enum":return e.jsx(qe,{header:r,currentFilter:t,onApplyFilter:o,onClearFilter:i});default:return e.jsx(Oe,{header:r,currentFilter:t,onApplyFilter:o,onClearFilter:i})}}()})},je=function(r){var t=r.content,o=r.children,i=r.delay,a=void 0===i?500:i,u=n.useState(!1),l=u[0],c=u[1],s=n.useState({top:0,left:0}),d=s[0],f=s[1],v=n.useRef(null),h=n.useRef(null);if(n.useEffect(function(){return function(){v.current&&clearTimeout(v.current)}},[]),!t||!n.isValidElement(o))return e.jsx(e.Fragment,{children:o});var p=n.cloneElement(o,{ref:h,onMouseEnter:function(){v.current=setTimeout(function(){if(h.current&&t.trim()){var e=h.current.getBoundingClientRect();if(e.width>0&&e.height>0){var n=e.left+e.width/2-100,r=e.bottom+8;8>n?n=8:n+200>window.innerWidth-8&&(n=window.innerWidth-200-8),r+40>window.innerHeight-8&&(r=e.top-40-8),f({top:r,left:n}),c(!0)}}},a)},onMouseLeave:function(){v.current&&(clearTimeout(v.current),v.current=null),c(!1)}});return e.jsxs(e.Fragment,{children:[p,l&&e.jsx("div",exports.__assign({className:"st-tooltip",style:{position:"fixed",top:"".concat(d.top,"px"),left:"".concat(d.left,"px"),zIndex:1e4}},{children:t}))]})},Ue=function(r){var t,o,i=r.colIndex,a=r.gridColumnEnd,l=r.gridColumnStart,s=r.gridRowEnd,d=r.gridRowStart,v=r.header,h=r.reverse,p=r.sort,w=n.useState(!1),m=w[0],g=w[1],x=n.useState(!1),b=x[0],I=x[1],C=n.useState(v.label||""),y=C[0],R=C[1],S=N(),A=S.activeHeaderDropdown,M=S.areAllRowsSelected,E=S.collapsedHeaders,T=S.columnBorders,H=S.columnReordering,k=S.columnResizing,F=S.columnsWithSelectedCells,D=S.draggedHeaderRef,O=S.enableHeaderEditing,P=S.filterIcon,B=S.handleApplyFilter,W=S.handleClearFilter,q=S.handleSelectAll,j=S.headerCollapseIcon,U=S.headerDropdown,G=S.headerExpandIcon,J=S.headerRegistry,V=S.headers,_=S.hoveredHeaderRef,X=S.onColumnOrderChange,Y=S.onColumnSelect,$=S.onHeaderEdit,Q=S.onSort,Z=S.onTableHeaderDragEnd,ee=S.headerHeight,re=S.selectColumns,te=S.selectableColumns,oe=S.selectedColumns,ie=S.setActiveHeaderDropdown,ae=S.setCollapsedHeaders,ue=S.setHeaders,le=S.setInitialFocusedCell,de=S.setIsResizing,fe=S.setSelectedCells,ve=S.setSelectedColumns,he=S.sortDownIcon,pe=S.sortUpIcon,we=!!(null==v?void 0:v.isSortable),me=!!(null==v?void 0:v.filterable),ge=S.filters[v.accessor],xe=(null==A?void 0:A.accessor)===v.accessor,be=v.isSelectionColumn&&S.enableRowSelection,Ie=function(e){var n;return!(!(null===(n=e.children)||void 0===n?void 0:n.length)||!e.collapsible)}(v),ye=E.has(v.accessor),Re=function(e){var r=e.isOpen,t=e.estimatedHeight,o=void 0===t?200:t,i=e.estimatedWidth,a=void 0===i?250:i,u=e.margin,l=void 0===u?4:u,c=n.useRef(null),s=n.useState({}),d=s[0],f=s[1];return n.useEffect(function(){if(r&&c.current){var e=function(){if(c.current){var e=c.current.getBoundingClientRect(),n=window.innerHeight-e.bottom,r=window.innerWidth-e.right,t="bottom",i={};o>n&&e.top>=o&&(t="top");var u="left";a>r+e.width&&(u="right"),"bottom"===t?i.top=e.bottom+l:i.bottom=window.innerHeight-e.top+l,"left"===u?i.left=e.left:i.right=window.innerWidth-e.right,f(i)}};requestAnimationFrame(e);var n=function(){return requestAnimationFrame(e)},t=function(){return requestAnimationFrame(e)};return window.addEventListener("resize",n),window.addEventListener("scroll",t,!0),function(){window.removeEventListener("resize",n),window.removeEventListener("scroll",t,!0)}}f({})},[r,o,a,l]),{triggerRef:c,position:d}}({isOpen:xe,estimatedHeight:200,estimatedWidth:250,margin:4}),Se=Re.triggerRef,Ne=Re.position,Ae=n.useMemo(function(){var e,n,r;if(!T)return!1;var t=V.filter(function(e){return"left"===e.pinned}),o=V.filter(function(e){return!e.pinned}),i=V.filter(function(e){return"right"===e.pinned});return"left"===v.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===v.accessor:"right"===v.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===v.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===v.accessor},[T,V,v.accessor,v.pinned]),Me=n.useMemo(function(){return!(!te||be)&&c(v,i).some(function(e){return oe.has(e)})},[te,be,v,i,oe]),Ee=n.useMemo(function(){return!be&&c(v,i).some(function(e){return F.has(e)})},[be,v,i,F]),Te=n.useMemo(function(){return!(!v.children||0===v.children.length)&&(!ye||v.children.some(function(e){return"parentCollapsed"===e.showWhen||"always"===e.showWhen}))},[v.children,ye]),He="st-header-cell ".concat(v.accessor===(null===(t=_.current)||void 0===t?void 0:t.accessor)?"st-hovered":""," ").concat((null===(o=D.current)||void 0===o?void 0:o.accessor)===v.accessor?"st-dragging":""," ").concat(we?"clickable":""," ").concat(H&&!we?"columnReordering":""," ").concat(Te?"parent":""," ").concat(Ae?"st-last-column":""," ").concat(O&&!be?"st-header-editable":""," ").concat(Me?"st-header-selected":""," ").concat(Ee&&!Me?"st-header-has-highlighted-cell":""),ke=ce({draggedHeaderRef:D,headers:V,hoveredHeaderRef:_,onColumnOrderChange:X,onTableHeaderDragEnd:Z}),Fe=ke.handleDragStart,De=ke.handleDragEnd,Oe=ke.handleDragOver,Pe=ne();n.useEffect(function(){if(J&&!v.isSelectionColumn){var e=v.accessor+"";return J.set(e,{setEditing:function(e){I(e)}}),function(){J.delete(e)}}},[J,v.accessor,v.isSelectionColumn]),n.useEffect(function(){R(v.label||"")},[v.label]);var Be=n.useCallback(function(e){R(e);var n=V.map(function(n){return n.accessor===v.accessor?exports.__assign(exports.__assign({},n),{label:e}):n});ue(n),$&&$(v,e)},[V,ue,$,v]),Le=n.useCallback(function(){ie&&ie(null)},[ie]),We=n.useCallback(function(e){e.stopPropagation(),ae(function(e){var n=new Set(e);return ye?n.delete(v.accessor):n.add(v.accessor),n})},[ae,ye,v.accessor]),qe=function(e){var n=e.event,r=e.header;if(!r.isSelectionColumn){if(te){var t=c(r,i),o=t.some(function(e){return oe.has(e)});if(O&&o&&!n.shiftKey)return U&&xe&&Le(),void I(!0);n.shiftKey&&re?ve(function(e){if(0===e.size)return new Set(t);var n=t[0],r=Array.from(e).sort(function(e,n){return e-n}),o=r[0],i=Math.abs(n-o);r.forEach(function(e){var r=Math.abs(n-e);i>r&&(i=r,o=e)});var a,l,c,s=u(u([],(c=Math.min(a=o,l=n),Array.from({length:Math.max(a,l)-c+1},function(e,n){return c+n})),!0),t,!0);return new Set(u(u([],Array.from(e),!0),s,!0))}):re&&re(t),fe(new Set),le(null)}Y&&Y(r),!te&&r.isSortable&&Q(r.accessor)}};if(n.useEffect(function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}},[]),!v)return null;var Ue=k&&!be&&e.jsx("div",exports.__assign({className:"st-header-resize-handle-container",onMouseDown:function(e){var n,r=null===(n=document.getElementById(f({accessor:v.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;Pe({callback:Ce,callbackProps:{event:e.nativeEvent,gridColumnEnd:a,gridColumnStart:l,header:v,headers:V,setHeaders:ue,setIsResizing:de,startWidth:r,collapsedHeaders:E},limit:10})},onTouchStart:function(e){var n,r=null===(n=document.getElementById(f({accessor:v.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;Pe({callback:Ce,callbackProps:{event:e,gridColumnEnd:a,gridColumnStart:l,header:v,headers:V,setHeaders:ue,setIsResizing:de,startWidth:r,collapsedHeaders:E},limit:10})}},{children:e.jsx("div",{className:"st-header-resize-handle"})})),Ge=p&&p.key.accessor===v.accessor&&e.jsxs("div",exports.__assign({className:"st-icon-container",onClick:function(e){return qe({event:e,header:v})}},{children:["ascending"===p.direction&&pe&&pe,"descending"===p.direction&&he&&he]})),Ke=me&&P&&e.jsxs("div",exports.__assign({className:"st-icon-container",onClick:function(e){e.stopPropagation(),g(!m)}},{children:[n.cloneElement(P,{style:{fill:ge?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e.jsx(L,exports.__assign({open:m,overflow:"visible",setOpen:g,onClose:function(){return g(!1)}},{children:e.jsx(ze,{header:v,currentFilter:ge,onApplyFilter:function(e){B(e),g(!1)},onClearFilter:function(){W(v.accessor),g(!1)}})}))]})),Je=Ie&&!be&&e.jsx("div",exports.__assign({className:"st-icon-container st-collapse-icon-container",onClick:We},{children:ye?j:G}));return e.jsxs(K,exports.__assign({className:He,id:f({accessor:v.accessor,rowId:"header"}),onDragOver:function(e){be||Pe({callback:Oe,callbackProps:{event:e,hoveredHeader:v},limit:50})},style:exports.__assign({gridRowStart:d,gridRowEnd:s,gridColumnStart:l,gridColumnEnd:a},s-d>1?{}:{height:ee})},{children:[h&&Ue,"right"===v.align&&Je,"right"===v.align&&Ke,"right"===v.align&&Ge,e.jsx("div",exports.__assign({ref:Se,className:"st-header-label",draggable:H&&!v.disableReorder&&!be,onClick:function(e){be||qe({event:e,header:v})},onDoubleClick:function(e){be||function(e){var n=e.header;n.isSelectionColumn||te&&n.isSortable&&Q(n.accessor)}({event:e,header:v})},onDragEnd:be?void 0:function(e){e.preventDefault(),De()},onDragStart:be?void 0:function(e){H&&v&&function(e){Fe(e)}(v)}},{children:e.jsx(je,exports.__assign({content:v.tooltip||""},{children:e.jsx("span",exports.__assign({className:"st-header-label-text ".concat("right"===v.align?"right-aligned":"center"===v.align?"center-aligned":"left-aligned")},{children:be?e.jsx(se,{checked:!!M&&M(),onChange:function(e){q&&q(e)}}):b?e.jsx(z,{defaultValue:y,onBlur:function(){return I(!1)},onChange:Be}):v.headerRenderer?v.headerRenderer({accessor:v.accessor,colIndex:i,header:v}):y||(null==v?void 0:v.label)}))}))})),"right"!==v.align&&Ge,"right"!==v.align&&Ke,"right"!==v.align&&Je,!h&&Ue,U&&!be&&e.jsx("div",exports.__assign({className:"st-header-dropdown-container"},{children:U({accessor:v.accessor,colIndex:i,header:v,isOpen:xe,onClose:Le,position:Ne})}))]}))},Ge=function(r){var t=r.columnIndices,o=r.gridTemplateColumns,i=r.handleScroll,a=r.headers,u=r.maxDepth,l=r.pinned,c=r.sectionRef,s=r.sort,d=r.width,f=N().collapsedHeaders,h=n.useMemo(function(){var e=[],n=1,r=function(o,i,c){var s,d;if(void 0===c&&(c=!1),!v({header:o,pinned:l,headers:a,collapsedHeaders:f}))return 0;c||n++;var h=null!==(d=null===(s=o.children)||void 0===s?void 0:s.filter(function(e){return v({header:e,pinned:l,headers:a,collapsedHeaders:f})}).length)&&void 0!==d?d:0,p=n,w=h>0?p+h:p+1;if(e.push({header:o,gridColumnStart:p,gridColumnEnd:w,gridRowStart:i,gridRowEnd:h>0?i+1:u+1,colIndex:t[o.accessor]}),o.children&&o.children.length>0){var m=!0;o.children.forEach(function(e){v({header:e,pinned:l,headers:a,collapsedHeaders:f})&&(r(e,i+1,m),m=!1)})}return w-p},o=a.filter(function(e){return v({header:e,pinned:l,headers:a,collapsedHeaders:f})}),i=!0;return o.forEach(function(e){r(e,1,i),i=!1}),e},[a,u,l,t,f]);return e.jsx(ge,exports.__assign({childRef:c,group:l?"pinned-".concat(l):"default"},{children:e.jsx("div",exports.__assign({className:"st-header-".concat(l?"pinned-".concat(l):"main")},i&&{onScroll:i},{ref:c,style:{gridTemplateColumns:o,width:d,position:"relative"}},{children:e.jsx(e.Fragment,{children:h.map(function(n){return e.jsx(Ue,{colIndex:n.colIndex,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,reverse:"right"===l,sort:s},n.header.accessor)})})}))}))},Ke=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(Ke)):1},Je=function(r){var t=r.centerHeaderRef,o=r.headers,i=r.mainTemplateColumns,a=r.pinnedLeftColumns,l=r.pinnedLeftTemplateColumns,c=r.pinnedRightColumns,s=r.pinnedRightTemplateColumns,d=r.sort,f=r.pinnedLeftWidth,h=r.pinnedRightWidth,p=N(),w=p.headerContainerRef,m=p.pinnedLeftRef,g=p.pinnedRightRef,x=p.collapsedHeaders,b=n.useMemo(function(){return be({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:x})},[o,a,c,x]),I=n.useMemo(function(){var e=0,n=u(u(u([],a,!0),o,!0),c,!0);return o.forEach(function(r){if(v({header:r,headers:n,collapsedHeaders:x})){var t=Ke(r);e=Math.max(e,t)}}),{maxDepth:e}},[o,a,c,x]).maxDepth;return e.jsxs("div",exports.__assign({className:"st-header-container",ref:w},{children:[oe(o,"left")&&e.jsx(Ge,{columnIndices:b,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:I,pinned:"left",sectionRef:m,sort:d,width:f}),e.jsx(Ge,{columnIndices:b,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:I,sectionRef:t,sort:d}),oe(o,"right")&&e.jsx(Ge,{columnIndices:b,gridTemplateColumns:s,handleScroll:void 0,headers:o,maxDepth:I,pinned:"right",sectionRef:g,sort:d,width:h})]}))},Ve=function(e){var n=e.collapsedHeaders,r=function(e){var t=e.flattenedHeaders;return e.headers.forEach(function(e){if(!e.hide)if(e.children&&e.children.length>0)if(n&&n.has(e.accessor)){var o=e.children.filter(function(e){return"parentCollapsed"===e.showWhen||"always"===e.showWhen});o.length>0?r({headers:o,flattenedHeaders:t}):t.push(e)}else{var i=e.children.filter(function(e){return"parentExpanded"===e.showWhen||"always"===e.showWhen||!e.showWhen});r({headers:i,flattenedHeaders:t})}else t.push(e)}),t},t=r({headers:e.headers,flattenedHeaders:[]});return"".concat(t.map(function(e){return function(e){var n=e.minWidth,r=e.width;return"number"==typeof r&&(r="".concat(r,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(n,", ").concat(r,")"):"max(".concat(n,", ").concat(r,")"):r}(e)}).join(" "))},_e=function(r){var t=r.pinnedLeftWidth,o=r.pinnedRightWidth,i=r.setScrollTop,a=r.sort,u=r.tableRows,l=r.rowsToRender,c=N(),s=c.columnResizing,d=c.editColumns,f=c.headers,v=c.collapsedHeaders,h=n.useRef(null),p=f.filter(function(e){return!e.pinned}),w=f.filter(function(e){return"left"===e.pinned}),m=f.filter(function(e){return"right"===e.pinned}),g=n.useMemo(function(){return Ve({headers:w,collapsedHeaders:v})},[w,v]),x=n.useMemo(function(){return Ve({headers:p,collapsedHeaders:v})},[p,v]),b=n.useMemo(function(){return Ve({headers:m,collapsedHeaders:v})},[m,v]),I={centerHeaderRef:h,headers:f,mainTemplateColumns:x,pinnedLeftColumns:w,pinnedLeftTemplateColumns:g,pinnedRightColumns:m,pinnedRightTemplateColumns:b,sort:a,pinnedLeftWidth:t,pinnedRightWidth:o},C={tableRows:u,mainTemplateColumns:x,pinnedLeftColumns:w,pinnedLeftTemplateColumns:g,pinnedLeftWidth:t,pinnedRightColumns:m,pinnedRightTemplateColumns:b,pinnedRightWidth:o,setScrollTop:i,rowsToRender:l};return e.jsxs("div",exports.__assign({className:"st-content ".concat(s?"st-resizeable":"st-not-resizeable"),style:{width:d?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(Je,exports.__assign({},I)),e.jsx(Ie,exports.__assign({},C))]}))},Xe=function(r){var t=r.mainBodyWidth,o=r.mainBodyRef,i=r.pinnedLeftWidth,a=r.pinnedRightWidth,u=r.pinnedLeftContentWidth,l=r.pinnedRightContentWidth,c=r.tableBodyContainerRef,s=N().editColumns,d=n.useState(!1),f=d[0],v=d[1],h=n.useRef(null),p=n.useRef(null),w=n.useRef(null),m=s?28:0,g=(s?a+1:a)+(c.current&&c.current&&c.current.scrollHeight>c.current.clientHeight?c.current.offsetWidth-c.current.clientWidth:0);return n.useEffect(function(){setTimeout(function(){o.current&&v(t>o.current.clientWidth)},1)},[o,t]),f?e.jsxs("div",exports.__assign({className:"st-horizontal-scrollbar-container"},{children:[i>0&&e.jsx(ge,exports.__assign({childRef:p,group:"pinned-left"},{children:e.jsx("div",exports.__assign({className:"st-horizontal-scrollbar-left",ref:p,style:{width:i}},{children:e.jsx("div",{style:{width:u}})}))})),t>0&&e.jsx(ge,exports.__assign({childRef:h},{children:e.jsx("div",exports.__assign({className:"st-horizontal-scrollbar-middle",ref:h},{children:e.jsx("div",{style:{width:t}})}))})),a>0&&e.jsx(ge,exports.__assign({childRef:w,group:"pinned-right"},{children:e.jsx("div",exports.__assign({className:"st-horizontal-scrollbar-right",ref:w,style:{width:g}},{children:e.jsx("div",{style:{width:l}})}))})),m>0&&e.jsx("div",{style:{width:m-1.5,height:"100%",flexShrink:0}})]})):null},Ye={string:function(e,n,r){if(e===n)return 0;var t=e.localeCompare(n);return"ascending"===r?t:-t},number:function(e,n,r){if(e===n)return 0;var t=e-n;return"ascending"===r?t:-t},boolean:function(e,n,r){if(e===n)return 0;var t=e===n?0:e?-1:1;return"ascending"===r?t:-t},date:function(e,n,r){var t=new Date(e),o=new Date(n);if(t.getTime()===o.getTime())return 0;var i=t.getTime()-o.getTime();return"ascending"===r?i:-i},enum:function(e,n,r){return Ye.string(e,n,r)},default:function(e,n,r){return e===n?0:null==e?"ascending"===r?-1:1:null==n?"ascending"===r?1:-1:"string"==typeof e&&"string"==typeof n?Ye.string(e,n,r):"number"==typeof e&&"number"==typeof n?Ye.number(e,n,r):"boolean"==typeof e&&"boolean"==typeof n?Ye.boolean(e,n,r):Ye.string(e+"",n+"",r)}},$e=function(e){return function(e){var n=e.rows,r=e.sortColumn,t=function(e,n){for(var r=0,o=e;o.length>r;r++){var i=o[r];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=t(i.children,n);if(a)return a}}},o=t(e.headers,r.key.accessor),i=(null==o?void 0:o.type)||"string",a=r.direction;return u([],n,!0).sort(function(e,n){var t=r.key.accessor;return function(e,n,r,t){if(void 0===r&&(r="string"),null==e||""===e)return"ascending"===t?-1:1;if(null==n||""===n)return"ascending"===t?1:-1;if("number"===r){var o=function(e){var n;if("number"==typeof e)return e;var r=e+"";if("string"==typeof r){var t=r.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(t){var o=parseFloat(t[1]),i=null===(n=t[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(r)||0},i=o(e),a=o(n);return Ye.number(i,a,t)}return"date"===r?Ye.date(e+"",n+"",t):"boolean"===r?Ye.boolean(!!e,!!n,t):"enum"===r?Ye.enum(e+"",n+"",t):Ye.string(e+"",n+"",t)}(e[t],n[t],i,a)})}({rows:e.rows,sortColumn:e.sortColumn,headers:e.headers})},Qe=function(e){var n=e.tableRows,r=e.sortColumn,t=e.rowGrouping,o=e.headers;return e.externalSortHandling?n:r?t&&t.length>0?(0,e.sortNestedRows)({groupingKeys:t,headers:o,rows:n,sortColumn:r}):$e({headers:o,rows:n,sortColumn:r}):n},Ze=function(e,n,r){void 0===r&&(r=new Set);for(var t=0,o=e;o.length>t;t++){var i=o[t];if(!r.has(i.accessor)&&(r.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 s=c[l];if(Ze([s],n,r),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},en=function(e){return e.every(function(e){return e.hide})},nn=function(e){e.forEach(function(e){e.children&&e.children.length>0&&(nn(e.children),en(e.children)&&(e.hide=!0))})},rn=function(r){var t=r.allHeaders,o=r.depth,i=void 0===o?0:o,a=r.doesAnyHeaderHaveChildren,l=r.header,c=r.isCheckedOverride,s=n.useState(!0),d=s[0],f=s[1],v=N(),h=v.expandIcon,p=v.headers,w=v.setHeaders,m=a?"".concat(16*i,"px"):"8px",g=l.children&&l.children.length>0,x=null!=c?c:l.hide||g&&l.children&&en(l.children);return e.jsxs(e.Fragment,{children:[e.jsxs("div",exports.__assign({className:"st-header-checkbox-item",style:{paddingLeft:m}},{children:[a&&e.jsx("div",exports.__assign({className:"st-header-icon-container"},{children:g?e.jsx("div",exports.__assign({className:"st-collapsible-header-icon st-expand-icon-container ".concat(d?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),f(!d)}},{children:h})):null})),e.jsx(se,exports.__assign({checked:x,onChange:function(e){l.hide=e,e?nn(t):(Ze(t,l.accessor),g&&l.children&&l.children.length>0&&l.children.every(function(e){return!0===e.hide})&&l.children[0]&&(l.children[0].hide=!1,Ze(t,l.children[0].accessor))),w(u([],p,!0))}},{children:l.label}))]})),g&&d&&l.children&&e.jsx("div",exports.__assign({className:"st-nested-headers"},{children:l.children.map(function(n,r){return e.jsx(rn,{allHeaders:t,depth:i+1,doesAnyHeaderHaveChildren:a,header:n,isCheckedOverride:!!x||void 0},"".concat(n.accessor,"-").concat(r))})}))]})},tn=function(r){var t=r.headers,o=r.open,i="left"===r.position?"left":"",a=n.useMemo(function(){return t.some(function(e){return e.children&&e.children.length>0})},[t]);return e.jsx("div",exports.__assign({className:"st-column-editor-popout ".concat(o?"open":""," ").concat(i),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",exports.__assign({className:"st-column-editor-popout-content"},{children:t.map(function(n,r){return n.isSelectionColumn?null:e.jsx(rn,{doesAnyHeaderHaveChildren:a,header:n,allHeaders:t},"".concat(n.accessor,"-").concat(r))})}))}))},on=function(r){var t=r.columnEditorText,o=r.editColumns,i=r.headers,a=r.position,u=void 0===a?"right":a,l=n.useState(r.editColumnsInitOpen),c=l[0],s=l[1];return o?e.jsxs("div",exports.__assign({className:"st-column-editor ".concat(c?"open":""," ").concat(u),onClick:function(){return function(e){s(e)}(!c)},style:{width:28}},{children:[e.jsx("div",exports.__assign({className:"st-column-editor-text"},{children:t})),e.jsx(tn,{headers:i,open:c,position:u})]})):null},an=function(r){var o=r.children,i=n.useRef({}),a=n.useCallback(function(e,n){return!!i.current[n]&&i.current[n].find(function(n){return n===e})},[]),u=n.useCallback(function(e,n){e.scrollWidth-e.clientWidth>0&&(n.scrollLeft=e.scrollLeft)},[]),l=n.useCallback(function(e){e.onscroll=null},[]),c=n.useCallback(function(e,n){e.onscroll=function(){window.requestAnimationFrame(function(){n.forEach(function(n){var r;null===(r=i.current[n])||void 0===r||r.forEach(function(n){e!==n&&(l(n),u(e,n),window.requestAnimationFrame(function(){var e=Object.keys(i.current).filter(function(e){return i.current[e].includes(n)});c(n,e)}))})})})}},[l,u]),s=n.useCallback(function(e,n){n.forEach(function(n){i.current[n]||(i.current[n]=[]),a(e,n)||(i.current[n].length>0&&u(i.current[n][0],e),i.current[n].push(e))}),c(e,n)},[a,u,c]),d=n.useCallback(function(e,n){n.forEach(function(n){if(a(e,n)){l(e);var r=i.current[n].indexOf(e);-1!==r&&i.current[n].splice(r,1)}})},[a,l]);return e.jsx(me.Provider,exports.__assign({value:{registerPane:s,unregisterPane:d}},{children:t.default.Children.only(o)}))},un=function(e){var n=e.tableRows,r=e.filterState;return e.externalFilterHandling?n:r&&0!==Object.keys(r).length?n.filter(function(e){return Object.values(r).every(function(n){try{return function(e,n){var r=n.operator,t=n.value,o=n.values;if(null==e)return"isEmpty"===r;if("isEmpty"===r)return!e||""===(e+"").trim();if("isNotEmpty"===r)return e&&""!==(e+"").trim();if("string"==typeof e||"contains"===r||"notContains"===r||"startsWith"===r||"endsWith"===r){var i=(e+"").toLowerCase(),a=t?(t+"").toLowerCase():"";switch(r){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=+t;switch(r){case"equals":return u===l;case"notEquals":return u!==l;case"greaterThan":return u>l;case"lessThan":return l>u;case"greaterThanOrEqual":return u>=l;case"lessThanOrEqual":return l>=u;case"between":if(o&&2===o.length){var c=o.map(Number),s=c[1];return u>=c[0]&&s>=u}return!1;case"notBetween":if(o&&2===o.length){var d=o.map(Number);return s=d[1],d[0]>u||u>s}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=X(e),v=X((t||"")+""),h=_(f),p=_(v);switch(r){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 _(X((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 _(X((e||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof e&&"equals"===r)return e===!!t;if(Array.isArray(e)){var x=e.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", ");e=x}if("in"===r||"notIn"===r){if(o&&Array.isArray(o)){var b=o.includes(e+"");return"in"===r?b:!b}return!1}var I=(e+"").toLowerCase(),C=t?(t+"").toLowerCase():"";switch(r){case"equals":return I===C;case"notEquals":return I!==C;default:return!0}}(e[n.accessor],n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}})}):n},ln=function(e,n,r,t){var o=[],i=function(e){e.forEach(function(e){var r=t?e[t]:void 0;t&&r&&x(r)?i(r):null!=e[n]&&o.push(e[n])})};if(i(e),0!==o.length){if("custom"===r.type&&r.customFn)return r.customFn(o);var a,u=r.parseValue?o.map(r.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"===r.type?o.length:void 0;switch(r.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 r.formatResult?r.formatResult(a):a}},cn=function(e){if(null==e)return"";var n=e+"";if(n.includes(",")||n.includes('"')||n.includes("\n")||n.includes("\r")){var r=n.replace(/"/g,'""');return'"'.concat(r,'"')}return n},sn=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},dn={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}},fn=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")},vn=function(e,n,r,t){return void 0===r&&(r={}),new Promise(function(t){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(){fn(e),e.removeEventListener("transitionend",o),r.onComplete&&r.onComplete(),t()};e.addEventListener("transitionend",o),setTimeout(o,n.duration+(n.delay||0)+50)})},hn=function(r){var t=r.allowAnimations,o=void 0!==t&&t,c=r.cellUpdateFlash,f=void 0!==c&&c,v=r.className,m=r.columnBorders,g=void 0!==m&&m,I=r.columnEditorPosition,R=void 0===I?"right":I,N=r.columnEditorText,H=void 0===N?"Columns":N,D=r.columnReordering,P=void 0!==D&&D,B=r.columnResizing,L=void 0!==B&&B,W=r.defaultHeaders,q=r.editColumns,z=void 0!==q&&q,j=r.editColumnsInitOpen,U=void 0!==j&&j,G=r.enableHeaderEditing,K=void 0!==G&&G,J=r.enableRowSelection,V=void 0!==J&&J,_=r.expandAll,X=void 0===_||_,Y=r.expandIcon,$=void 0===Y?e.jsx(E,{className:"st-expand-icon"}):Y,Q=r.externalFilterHandling,Z=void 0!==Q&&Q,ee=r.externalSortHandling,ne=void 0!==ee&&ee,te=r.filterIcon,oe=void 0===te?e.jsx(F,{className:"st-header-icon"}):te,ie=r.footerRenderer,ae=r.headerCollapseIcon,ue=void 0===ae?e.jsx(E,{className:"st-header-icon"}):ae,le=r.headerExpandIcon,ce=void 0===le?e.jsx(M,{className:"st-header-icon"}):le,se=r.headerDropdown,de=r.headerHeight,fe=r.height,ve=r.hideFooter,he=void 0!==ve&&ve,pe=r.isLoading,we=void 0!==pe&&pe,me=r.nextIcon,ge=void 0===me?e.jsx(E,{className:"st-next-prev-icon"}):me,xe=r.onCellEdit,be=r.onCellClick,Ie=r.onColumnOrderChange,Ce=r.onColumnSelect,ye=r.onFilterChange,Re=r.onGridReady,Se=r.onHeaderEdit,Ne=r.onLoadMore,Ae=r.onNextPage,Me=r.onPageChange,Ee=r.onRowSelectionChange,Te=r.onSortChange,He=r.prevIcon,ke=void 0===He?e.jsx(M,{className:"st-next-prev-icon"}):He,Fe=r.rowButtons,De=r.rowGrouping,Oe=r.rowHeight,Pe=void 0===Oe?32:Oe,Be=r.rowIdAccessor,Le=r.rows,We=r.selectionColumnWidth,qe=void 0===We?42:We,ze=r.rowsPerPage,je=void 0===ze?10:ze,Ue=r.selectableCells,Ge=void 0!==Ue&&Ue,Ke=r.selectableColumns,Je=void 0!==Ke&&Ke,Ve=r.serverSidePagination,Ye=void 0!==Ve&&Ve,Ze=r.shouldPaginate,en=void 0!==Ze&&Ze,nn=r.sortDownIcon,rn=void 0===nn?e.jsx(k,{className:"st-header-icon"}):nn,tn=r.sortUpIcon,sn=void 0===tn?e.jsx(T,{className:"st-header-icon"}):tn,fn=r.tableRef,vn=r.theme,hn=void 0===vn?"light":vn,pn=r.totalRowCount,wn=r.useHoverRowBackground,mn=void 0===wn||wn,gn=r.useOddEvenRowBackground,xn=void 0!==gn&&gn,bn=r.useOddColumnBackground,In=void 0!==bn&&bn;In&&(xn=!1),g&&(mn=!1);var Cn=n.useMemo(function(){if(we){var e=Array.from({length:en?je:10},function(e,n){var r;return(r={})[Be]="loading-".concat(n),r});return e}return Le},[we,Le,Be,je]),yn=n.useReducer(function(e){return e+1},0)[1],Rn=n.useRef(null),Sn=n.useRef(null),Nn=n.useRef(null),An=n.useRef(null),Mn=n.useRef(null),En=n.useRef(null),Tn=n.useRef(null),Hn=n.useState(1),kn=Hn[0],Fn=Hn[1],Dn=n.useState(W),On=Dn[0],Pn=Dn[1],Bn=n.useState(!1),Ln=Bn[0],Wn=Bn[1],qn=n.useState(!1),zn=qn[0],jn=qn[1],Un=n.useState(null),Gn=Un[0],Kn=Un[1],Jn=n.useState(new Set),Vn=Jn[0],_n=Jn[1];n.useEffect(function(){Pn(W)},[W]);var Xn=function(e){var r=e.rows,t=e.rowIdAccessor,o=e.onRowSelectionChange,i=e.enableRowSelection,a=void 0!==i&&i,u=n.useState(new Set),l=u[0],c=u[1],s=n.useCallback(function(e){return!!a&&function(e,n){return n.has(e)}(e,l)},[l,a]),d=n.useCallback(function(){return!!a&&function(e,n,r){return 0!==e.length&&e.every(function(e){return r.has(e[n]+"")})}(r,t,l)},[r,t,l,a]),f=n.useMemo(function(){return a?function(e){return e.size}(l):0},[l,a]),v=n.useMemo(function(){return a?function(e,n,r){return e.filter(function(e){return r.has(e[n]+"")})}(r,t,l):[]},[r,t,l,a]),h=n.useCallback(function(e,n){if(a){var i=function(e,n){var r=new Set(n);return r.has(e)?r.delete(e):r.add(e),r}(e,l);if(c(i),o){var u=r.find(function(n){return n[t]+""===e});u&&o({row:u,isSelected:n,selectedRows:i})}}},[l,r,t,o,a]),p=n.useCallback(function(e){var n;a&&(e?(n=function(e,n){return new Set(e.map(function(e){return e[n]+""}))}(r,t),o&&r.forEach(function(e){return o({row:e,isSelected:!0,selectedRows:n})})):(n=new Set,o&&l.forEach(function(e){var i=r.find(function(n){return n[t]+""===e});i&&o({row:i,isSelected:!1,selectedRows:n})})),c(n))},[r,t,o,l,a]),w=n.useCallback(function(e){if(a){var n=s(e);h(e,!n)}},[s,h,a]),m=n.useCallback(function(){if(a){if(o){var e=new Set;l.forEach(function(n){var i=r.find(function(e){return e[t]+""===n});i&&o({row:i,isSelected:!1,selectedRows:e})})}c(new Set)}},[l,r,t,o,a]);return{selectedRows:l,setSelectedRows:c,isRowSelected:s,areAllRowsSelected:d,selectedRowCount:f,selectedRowsData:v,handleRowSelect:h,handleSelectAll:p,handleToggleRow:w,clearSelection:m}}({rows:Cn,rowIdAccessor:Be,onRowSelectionChange:Ee,enableRowSelection:V}),Yn=Xn.selectedRows,$n=Xn.setSelectedRows,Qn=Xn.isRowSelected,Zn=Xn.areAllRowsSelected,er=Xn.selectedRowCount,nr=Xn.selectedRowsData,rr=Xn.handleRowSelect,tr=Xn.handleSelectAll,or=Xn.handleToggleRow,ir=Xn.clearSelection,ar=n.useMemo(function(){var e,n=u([],On,!0);return V&&!(null===(e=null==On?void 0:On[0])||void 0===e?void 0:e.isSelectionColumn)&&(n=u([{accessor:"__row_selection__",label:"",width:qe,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],n,!0)),n},[V,On,qe]),ur=n.useState(0),lr=ur[0],cr=ur[1],sr=n.useState(new Set),dr=sr[0],fr=sr[1],vr=function(e){var r=e.tableBodyContainerRef,t=n.useState(0),o=t[0],i=t[1];return n.useLayoutEffect(function(){r.current&&i(r.current.offsetWidth-r.current.clientWidth)},[r]),{setScrollbarWidth:i,scrollbarWidth:o,tableBodyContainerRef:r}}({tableBodyContainerRef:En}),hr=vr.scrollbarWidth,pr=vr.setScrollbarWidth,wr=n.useState(0),mr=wr[0],gr=wr[1];n.useLayoutEffect(function(){var e=function(){En.current&&gr(En.current.clientWidth)};e();var n=null;return En.current&&(n=new ResizeObserver(e)).observe(En.current),function(){n&&n.disconnect()}},[]);var xr=n.useMemo(function(){var e=l(window.innerWidth),n=function(e){var n=e.containerWidth,r=e.maxPinnedWidthPercent,t=void 0===r?.8:r,o=e.collapsedHeaders,i=0,a=0,u=0;e.headers.forEach(function(e){if(!e.hide){var n=p(e,o).reduce(function(e,n){return e+w(n)},0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:u+=n}});var l=i,c=a;if(n&&n>0){var s=n*t;i>s&&(i=s),a>s&&(a=s)}return{leftWidth:d(i),rightWidth:d(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}}({headers:ar,containerWidth:mr,maxPinnedWidthPercent:e,collapsedHeaders:Vn});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[ar,mr,Vn]),br=xr.mainBodyWidth,Ir=xr.pinnedLeftWidth,Cr=xr.pinnedRightWidth,yr=xr.pinnedLeftContentWidth,Rr=xr.pinnedRightContentWidth,Sr=function(e){var r=e.height,t=e.rowHeight,o=e.shouldPaginate,i=e.rowsPerPage;return n.useMemo(function(){var e;if(!r&&o&&i)return t*(i+1);if(!r)return window.innerHeight-t;var n,a=document.querySelector(".simple-table-root");return n="string"==typeof r?r.endsWith("px")?parseInt(r,10):r.endsWith("vh")?window.innerHeight*parseInt(r,10)/100:r.endsWith("%")?((null===(e=null==a?void 0:a.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*parseInt(r,10)/100:window.innerHeight:r,Math.max(0,n-t)},[r,t,o,i])}({height:fe,rowHeight:Pe,shouldPaginate:en,rowsPerPage:je}),Nr=function(e){var r=e.rows,t=e.headers,o=e.rowGrouping;return n.useMemo(function(){if(!o||0===o.length)return r;var e=function(e){return s(e).filter(function(e){return e.aggregation})}(t);if(0===e.length)return r;var n=JSON.parse(JSON.stringify(r)),i=function(n,r){return void 0===r&&(r=0),n.map(function(n){var t=o[r],a=o[r+1],u=n[t];if(u&&x(u)){var l=i(u,r+1),c=exports.__assign({},n);return c[t]=l,e.forEach(function(e){var n=ln(l,e.accessor,e.aggregation,a);void 0!==n&&(c[e.accessor]=n)}),c}return n})};return i(n)},[r,t,o])}({rows:Cn,headers:On,rowGrouping:De}),Ar=function(e){var r=e.rows,t=e.externalFilterHandling,o=e.onFilterChange,i=n.useState({}),a=i[0],u=i[1],l=n.useMemo(function(){return un({externalFilterHandling:t,tableRows:r,filterState:a})},[r,a,t]),c=n.useCallback(function(e){var n,r=exports.__assign(exports.__assign({},a),((n={})[e.accessor]=e,n));u(r),null==o||o(r)},[a,o]),s=n.useCallback(function(e){var n=exports.__assign({},a);delete n[e],u(n),null==o||o(n)},[a,o]),d=n.useCallback(function(){u({}),null==o||o({})},[o]),f=n.useCallback(function(e){var n,o=exports.__assign(exports.__assign({},a),((n={})[e.accessor]=e,n));return un({externalFilterHandling:t,tableRows:r,filterState:o})},[a,r,t]);return{filteredRows:l,updateFilter:c,clearFilter:s,clearAllFilters:d,filters:a,computeFilteredRowsPreview:f}}({rows:Nr,externalFilterHandling:Z,onFilterChange:ye}),Mr=Ar.filters,Er=Ar.updateFilter,Tr=Ar.clearFilter,Hr=Ar.clearAllFilters,kr=Ar.computeFilteredRowsPreview,Fr=function(e){var r=e.headers,t=e.tableRows,o=e.externalSortHandling,i=e.onSortChange,a=e.rowGrouping,u=n.useState(null),l=u[0],c=u[1],s=n.useCallback(function(e){var n=e.groupingKeys,r=e.headers,t=e.sortColumn,o=$e({headers:r,rows:e.rows,sortColumn:t});return n&&0!==n.length?o.map(function(e){var o,i=n[0],a=e[i];if(x(a)){var u=s({rows:a,sortColumn:t,headers:r,groupingKeys:n.slice(1)});return exports.__assign(exports.__assign({},e),((o={})[i]=u,o))}return e}):o},[]),d=n.useMemo(function(){return Qe({externalSortHandling:o,tableRows:t,sortColumn:l,rowGrouping:a,headers:r,sortNestedRows:s})},[t,l,r,o,a,s]),f=n.useCallback(function(e){var n=function(r){for(var t=0,o=r;o.length>t;t++){var i=o[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=n(i.children);if(a)return a}}},t=n(r);if(t){var o=null;l&&l.key.accessor===e?"ascending"===l.direction&&(o={key:t,direction:"descending"}):o={key:t,direction:"ascending"},c(o),null==i||i(o)}},[l,r,i]),v=n.useCallback(function(e){var n=function(r){for(var t=0,o=r;o.length>t;t++){var i=o[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=n(i.children);if(a)return a}}},i=n(r);if(!i)return t;var u=null;return l&&l.key.accessor===e?"ascending"===l.direction&&(u={key:i,direction:"descending"}):u={key:i,direction:"ascending"},Qe({externalSortHandling:o,tableRows:t,sortColumn:u,rowGrouping:a,headers:r,sortNestedRows:s})},[l,r,t,o,a,s]);return{sort:l,sortedRows:d,updateSort:f,computeSortedRowsPreview:v}}({headers:On,tableRows:Ar.filteredRows,externalSortHandling:ne,onSortChange:Te,rowGrouping:De}),Dr=Fr.sort,Or=Fr.sortedRows,Pr=Fr.updateSort,Br=function(e){var r=e.allowAnimations,t=e.sortedRows,o=e.originalRows,i=e.currentPage,a=e.rowsPerPage,l=e.shouldPaginate,c=e.serverSidePagination,s=e.rowGrouping,d=e.rowIdAccessor,f=e.unexpandedRows,v=e.expandAll,h=e.contentHeight,p=e.rowHeight,w=e.scrollTop,m=e.computeFilteredRowsPreview,g=e.computeSortedRowsPreview,I=n.useState(!1),C=I[0],y=I[1],R=n.useState([]),S=R[0],N=R[1],A=n.useRef([]),M=n.useRef([]),E=n.useRef(new Map),T=n.useRef(null),H=n.useCallback(function(e){var n=l&&!c?e.slice((i-1)*a,i*a):e,r=l?(i-1)*a:0;return s&&0!==s.length?function(e){var n=e.depth,r=e.expandAll,t=void 0!==r&&r,o=e.unexpandedRows,i=e.rowGrouping,a=void 0===i?[]:i,u=e.rowIdAccessor,l=e.displayPositionOffset,c=void 0===l?0:l,s=[],d=function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=c);var l=r,f=i;return e.forEach(function(r,i){var c=b({row:r,rowIdAccessor:u}),v=a[n];s.push({row:r,depth:n,displayPosition:f,groupingKey:v,position:l,isLastGroupRow:0===n&&i===e.length-1}),l++,f++;var h=c+"";if((t?!o.has(h):o.has(h))&&a.length>n){var p=function(e,n){var r=e[n];return x(r)?r:[]}(r,v);p.length>0&&(l=d(p,n+1,l,f))}}),l};return d(e.rows,void 0===n?0:n,0,c),s}({rows:n,rowGrouping:s,rowIdAccessor:d,unexpandedRows:f,expandAll:v,displayPositionOffset:r}):n.map(function(e,n){return{row:e,depth:0,displayPosition:r+n,groupingKey:void 0,position:n,isLastGroupRow:!1}})},[i,a,l,c,s,d,f,v]);n.useMemo(function(){if(0===E.current.size){var e=H(o),n=new Map;e.forEach(function(e){var r=b({row:e.row,rowIdAccessor:d})+"";n.set(r,e.position)}),E.current=n}},[o,H,d]);var k=n.useMemo(function(){return H(t)},[t,H]),F=n.useMemo(function(){return O({bufferRowCount:5,contentHeight:h,tableRows:k,rowHeight:p,scrollTop:w})},[k,h,p,w]),D=n.useCallback(function(e,n){var r=new Set(e.map(function(e){return b({row:e.row,rowIdAccessor:d})+""})),t=new Set(n.map(function(e){return b({row:e.row,rowIdAccessor:d})+""}));return{staying:n.filter(function(e){var n=b({row:e.row,rowIdAccessor:d})+"";return r.has(n)}),entering:n.filter(function(e){var n=b({row:e.row,rowIdAccessor:d})+"";return!r.has(n)}),leaving:e.filter(function(e){var n=b({row:e.row,rowIdAccessor:d})+"";return!t.has(n)})}},[d]),P=n.useMemo(function(){if(0===A.current.length)return!1;var e=k.map(function(e){return b({row:e.row,rowIdAccessor:d})+""}),n=A.current.map(function(e){return b({row:e.row,rowIdAccessor:d})+""});return e.length!==n.length||!e.every(function(e,r){return e===n[r]})},[k,d]);n.useLayoutEffect(function(){if(!C){if(!r||l)return N([]),A.current=k,void(M.current=F);if(0===A.current.length)return N([]),A.current=k,void(M.current=F);if(!P)return N([]),A.current=k,void(M.current=F);T.current={tableRows:k,visibleRows:F},y(!0)}},[r,k,P,C,l,F]),n.useLayoutEffect(function(){if(C&&T.current&&S.length>0){var e=setTimeout(function(){var e=T.current;y(!1),N([]),A.current=e.tableRows,M.current=e.visibleRows,T.current=null},dn.ROW_REORDER.duration+100);return function(){return clearTimeout(e)}}},[C,S.length]);var B=n.useMemo(function(){if(!r||l)return F;if(S.length>0){var e=new Map,n=new Map;return k.forEach(function(r){var t=b({row:r.row,rowIdAccessor:d})+"";e.set(t,r.position),n.set(t,r.displayPosition)}),S.map(function(r){var t=b({row:r.row,rowIdAccessor:d})+"",o=e.get(t),i=n.get(t);return void 0!==o&&void 0!==i?exports.__assign(exports.__assign({},r),{position:o,displayPosition:i}):r})}return F},[F,S,k,r,l,d]),L=n.useCallback(function(e){if(r&&!l){var n=m(e),t=H(n),o=O({bufferRowCount:5,contentHeight:h,tableRows:t,rowHeight:p,scrollTop:w}),i=D(F,o).entering.map(function(e){var n=b({row:e.row,rowIdAccessor:d})+"";return k.find(function(e){return b({row:e.row,rowIdAccessor:d})+""===n})||e}).filter(Boolean);i.length>0&&N(u(u([],F,!0),i,!0))}},[r,l,m,H,h,p,w,D,k,F,d]),W=n.useCallback(function(e){if(r&&!l){var n=g(e),t=H(n),o=O({bufferRowCount:5,contentHeight:h,tableRows:t,rowHeight:p,scrollTop:w}),i=D(F,o).entering.map(function(e){var n=b({row:e.row,rowIdAccessor:d})+"";return k.find(function(e){return b({row:e.row,rowIdAccessor:d})+""===n})||e}).filter(Boolean);i.length>0&&N(u(u([],F,!0),i,!0))}},[r,l,g,H,h,p,w,D,k,F,d]);return{currentTableRows:k,currentVisibleRows:F,isAnimating:C,prepareForFilterChange:L,prepareForSortChange:W,rowsToRender:B}}({allowAnimations:o,sortedRows:Or,originalRows:Nr,currentPage:kn,rowsPerPage:je,shouldPaginate:en,serverSidePagination:Ye,rowGrouping:De,rowIdAccessor:Be,unexpandedRows:dr,expandAll:X,contentHeight:Sr,rowHeight:Pe,scrollTop:lr,computeFilteredRowsPreview:kr,computeSortedRowsPreview:Fr.computeSortedRowsPreview}),Lr=Br.currentTableRows,Wr=Br.rowsToRender,qr=Br.prepareForFilterChange,zr=Br.prepareForSortChange,jr=Br.isAnimating,Ur=n.useRef(new Map),Gr=n.useRef(new Map),Kr=function(e){var r=e.selectableCells,t=e.headers,o=e.tableRows,u=e.rowIdAccessor,l=e.onCellEdit,c=e.cellRegistry,s=e.collapsedHeaders,d=e.rowHeight,f=e.enableRowSelection,v=void 0!==f&&f,h=n.useState(new Set),w=h[0],m=h[1],g=n.useState(new Set),x=g[0],I=g[1],R=n.useState(null),S=R[0],N=R[1],A=n.useState(null),M=A[0],E=A[1],T=n.useState(new Set),H=T[0],k=T[1],F=n.useState(new Set),D=F[0],O=F[1],P=n.useState(!1),B=P[0],L=P[1],W=n.useRef(!1),q=n.useRef(null),z=n.useMemo(function(){var e=new Set;return w.forEach(function(n){var r=n.split("-");if(r.length>=2){var t=parseInt(r[1],10);isNaN(t)||e.add(t)}}),x.forEach(function(n){e.add(n)}),e},[w,x]),j=n.useMemo(function(){var e=new Set;return w.forEach(function(n){var r=n.split("-");if(r.length>=3){var t=r.slice(2).join("-");e.add(t)}}),x.size>0&&o.forEach(function(n){var r=b({row:n.row,rowIdAccessor:u});e.add(r+"")}),e},[w,x,o,u]),U=n.useMemo(function(){return t.flatMap(function(e){return p(e,s)})},[t,s]),G=n.useCallback(function(){if(0!==w.size){var e=function(e,n,r){var t=n.filter(function(e){return!e.hide}),o=new Map;t.forEach(function(e,n){o.set(n,e.accessor)});var i=Array.from(e).reduce(function(e,n){var t,i=n.split("-").map(Number),a=i[0],u=i[1];e[a]||(e[a]=[]);var l=o.get(u);return e[a][u]=l&&(null===(t=r[a])||void 0===t?void 0:t.row)?r[a].row[l]:"",e},{});return Object.values(i).map(function(e){return Object.values(e).join("\t")}).join("\n")}(w,U,o);navigator.clipboard.writeText(e),k(new Set(w)),setTimeout(function(){return k(new Set)},800)}},[w,U,o]),K=n.useCallback(function(){return i(void 0,void 0,void 0,function(){var e,n,r,t,i;return a(this,function(a){switch(a.label){case 0:if(!M)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,r,t,o,i,a){var u=new Set,l=new Set,c=e.split("\n").filter(function(e){return e.length>0});if(0===c.length)return{updatedCells:u,warningCells:l};var s=r.filter(function(e){return!e.hide}),d=n.rowIndex,f=n.colIndex;return c.forEach(function(e,n){e.split("\t").forEach(function(e,r){var c=d+n,v=f+r;if(t.length>c&&s.length>v){var h=t[c],p=s[v],w=b({row:h.row,rowIdAccessor:o});if(null==p?void 0:p.isEditable){var m=e;if("number"===p.type){var g=+e;isNaN(g)||(m=g)}else if("boolean"===p.type)m="true"===e.toLowerCase()||"1"===e;else if("date"===p.type){var x=new Date(e);isNaN(x.getTime())||(m=x)}if(h.row[p.accessor]=m,a){var I="".concat(w,"-").concat(p.accessor),C=a.get(I);C&&C.updateContent(m)}null==i||i({accessor:p.accessor,newValue:m,row:h.row,rowIndex:c});var y="".concat(c,"-").concat(v,"-").concat(w);u.add(y)}else{var R="".concat(c,"-").concat(v,"-").concat(w);l.add(R)}}})}),{updatedCells:u,warningCells:l}}(e,M,U,o,u,l,c),t=n.warningCells,(r=n.updatedCells).size>0&&(k(r),setTimeout(function(){return k(new Set)},800)),t.size>0&&(O(t),setTimeout(function(){return O(new Set)},800)),[3,4]):[2];case 3:return i=a.sent(),console.warn("Failed to paste from clipboard:",i),[3,4];case 4:return[2]}})})},[M,U,o,u,l,c]),J=n.useCallback(function(){if(0!==w.size){var e=function(e,n,r,t,o,i){var a=new Set,u=new Set,l=n.filter(function(e){return!e.hide}),c=new Map;return l.forEach(function(e,n){c.set(n,e.accessor)}),Array.from(e).forEach(function(e){var n=e.split("-").map(Number),c=n[0],s=n[1];if(r.length>c&&l.length>s){var d=r[c],f=l[s],v=b({row:d.row,rowIdAccessor:t});if(null==f?void 0:f.isEditable){var h;if(d.row[f.accessor]=h="string"===f.type?"":"number"===f.type?null:"boolean"!==f.type&&("date"===f.type?null:Array.isArray(d.row[f.accessor])?[]:""),i){var p="".concat(v,"-").concat(f.accessor),w=i.get(p);w&&w.updateContent(h)}null==o||o({accessor:f.accessor,newValue:h,row:d.row,rowIndex:c}),a.add(e)}else u.add(e)}}),{deletedCells:a,warningCells:u}}(w,U,o,u,l,c),n=e.deletedCells,r=e.warningCells;n.size>0&&(k(n),setTimeout(function(){return k(new Set)},800)),r.size>0&&(O(r),setTimeout(function(){return O(new Set)},800))}},[w,U,o,u,l,c]),V=n.useCallback(function(e,n){for(var r=new Set,t=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),l=Math.max(e.colIndex,n.colIndex),c=t;i>=c;c++)for(var s=a;l>=s;s++)if(c>=0&&o.length>c){if(v&&0===s)continue;var f=b({row:o[c].row,rowIdAccessor:u});r.add(y({colIndex:s,rowIndex:c,rowId:f}))}I(new Set),N(null),m(r),E(n),setTimeout(function(){return C(n,d)},0)},[o,u,d,v]),_=n.useCallback(function(e){if(e.rowIndex>=0&&o.length>e.rowIndex&&e.colIndex>=0&&(v?U.length:U.length-1)>=e.colIndex){var n=y(e);I(new Set),N(null),m(new Set([n])),E(e),setTimeout(function(){return C(e,d)},0)}},[U.length,o.length,d,v]),X=n.useCallback(function(e,n){void 0===n&&(n=!1),m(new Set),E(null),I(function(r){var t=new Set(n?r:[]);return e.forEach(function(e){return t.add(e)}),t}),e.length>0&&N(e[e.length-1])},[]);!function(e){var r=e.selectableCells,t=e.initialFocusedCell,o=e.tableRows,i=e.leafHeaders,a=e.rowIdAccessor,u=e.selectSingleCell,l=e.selectCellRange,c=e.setSelectedCells,s=e.setSelectedColumns,d=e.setLastSelectedColumnIndex,f=e.copyToClipboard,v=e.pasteFromClipboard,h=e.deleteSelectedCells,p=e.startCell,w=e.enableRowSelection,m=void 0!==w&&w;n.useEffect(function(){var e=function(e){var u;if(r&&t){var l=t.rowIndex,S=t.colIndex,N=t.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void v();if((e.ctrlKey||e.metaKey)&&"a"===e.key){e.preventDefault();for(var A=new Set,M=0;o.length>M;M++)for(var E=0;i.length>E;E++){var T=m?E+1:E,H=b({row:o[M].row,rowIdAccessor:a});A.add("".concat(M,"-").concat(T,"-").concat(H))}return c(A),s(new Set),void d(null)}if("Delete"===e.key||"Backspace"===e.key)return e.preventDefault(),void h();if(b({row:null===(u=o[l])||void 0===u?void 0:u.row,rowIdAccessor:a})!==N){var k=o.findIndex(function(e){return b({row:e.row,rowIdAccessor:a})===N});if(-1===k)return;l=k}var F=function(e,n,r){var t=e,a=n;return"up"===r?t=0:"down"===r?t=o.length-1:"left"===r?a=m?1:0:"right"===r&&(a=m?i.length:i.length-1),{rowIndex:t,colIndex:a}};"ArrowUp"===e.key?(e.preventDefault(),n(e,l,S,F)):"ArrowDown"===e.key?(e.preventDefault(),w(e,l,S,F)):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),g(e,l,S,F)):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),x(e,l,S,F)):"Home"===e.key?(e.preventDefault(),I(e,l)):"End"===e.key?(e.preventDefault(),C(e,l)):"PageUp"===e.key?(e.preventDefault(),y(e,l,S)):"PageDown"===e.key?(e.preventDefault(),R(e,l,S)):"Escape"===e.key&&(c(new Set),s(new Set),d(null),p.current=null)}else f()}},n=function(e,n,r,i){if(e.shiftKey){p.current||(p.current=t);var c=n-1;if((e.ctrlKey||e.metaKey)&&(c=i(n,r,"up").rowIndex),c>=0){var s=b({row:o[c].row,rowIdAccessor:a});l(p.current,{rowIndex:c,colIndex:r,rowId:s})}}else n>0&&(c=n-1,(e.ctrlKey||e.metaKey)&&(c=i(n,r,"up").rowIndex),s=b({row:o[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:r,rowId:s}),p.current=null)},w=function(e,n,r,i){if(e.shiftKey){p.current||(p.current=t);var c=n+1;if((e.ctrlKey||e.metaKey)&&(c=i(n,r,"down").rowIndex),o.length>c){var s=b({row:o[c].row,rowIdAccessor:a});l(p.current,{rowIndex:c,colIndex:r,rowId:s})}}else o.length-1>n&&(c=n+1,(e.ctrlKey||e.metaKey)&&(c=i(n,r,"down").rowIndex),s=b({row:o[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:r,rowId:s}),p.current=null)},g=function(e,n,r,i){if(e.shiftKey&&"ArrowLeft"===e.key){p.current||(p.current=t);var c=r-1;if(e.ctrlKey||e.metaKey)c=i(n,r,"left").colIndex;else if(m&&0===c)return;if(c>=0){var s=b({row:o[n].row,rowIdAccessor:a});l(p.current,{rowIndex:n,colIndex:c,rowId:s})}}else if(r>0){if(c=r-1,(e.ctrlKey||e.metaKey)&&"ArrowLeft"===e.key)c=i(n,r,"left").colIndex;else if(m&&0===c)return;0>c||(s=b({row:o[n].row,rowIdAccessor:a}),u({rowIndex:n,colIndex:c,rowId:s}),p.current=null)}},x=function(e,n,r,c){var s=m?i.length:i.length-1;if(e.shiftKey&&"ArrowRight"===e.key){p.current||(p.current=t);var d=r+1;if((e.ctrlKey||e.metaKey)&&(d=c(n,r,"right").colIndex),s>=d){var f=b({row:o[n].row,rowIdAccessor:a});l(p.current,{rowIndex:n,colIndex:d,rowId:f})}}else s>r&&(d=r+1,(e.ctrlKey||e.metaKey)&&"ArrowRight"===e.key&&(d=c(n,r,"right").colIndex),d>s||(f=b({row:o[n].row,rowIdAccessor:a}),u({rowIndex:n,colIndex:d,rowId:f}),p.current=null))},I=function(e,n,r){if(e.shiftKey){p.current||(p.current=t);var i=n,c=m?1:0;(e.ctrlKey||e.metaKey)&&(i=0);var s=b({row:o[i].row,rowIdAccessor:a});l(p.current,{rowIndex:i,colIndex:c,rowId:s})}else i=n,c=m?1:0,(e.ctrlKey||e.metaKey)&&(i=0),s=b({row:o[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:c,rowId:s}),p.current=null},C=function(e,n,r){if(e.shiftKey){p.current||(p.current=t);var c=n,s=m?i.length:i.length-1;(e.ctrlKey||e.metaKey)&&(c=o.length-1);var d=b({row:o[c].row,rowIdAccessor:a});l(p.current,{rowIndex:c,colIndex:s,rowId:d})}else c=n,s=m?i.length:i.length-1,(e.ctrlKey||e.metaKey)&&(c=o.length-1),d=b({row:o[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:s,rowId:d}),p.current=null},y=function(e,n,r){var i=Math.max(0,n-10);if(e.shiftKey){p.current||(p.current=t);var c=b({row:o[i].row,rowIdAccessor:a});l(p.current,{rowIndex:i,colIndex:r,rowId:c})}else c=b({row:o[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:r,rowId:c}),p.current=null},R=function(e,n,r){var i=Math.min(o.length-1,n+10);if(e.shiftKey){p.current||(p.current=t);var c=b({row:o[i].row,rowIdAccessor:a});l(p.current,{rowIndex:i,colIndex:r,rowId:c})}else c=b({row:o[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:r,rowId:c}),p.current=null};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[r,t,o,i,a,u,l,c,s,d,f,v,h,p,m])}({selectableCells:r,initialFocusedCell:M,tableRows:o,leafHeaders:U,rowIdAccessor:u,selectSingleCell:_,selectCellRange:V,setSelectedCells:m,setSelectedColumns:I,setLastSelectedColumnIndex:N,copyToClipboard:G,pasteFromClipboard:K,deleteSelectedCells:J,startCell:q,enableRowSelection:v});var Y=n.useCallback(function(e,n){var r=new Set,t=new Map;o.forEach(function(e,n){var r=b({row:e.row,rowIdAccessor:u});t.set(r+"",n)});for(var i=t.get(e.rowId+""),a=t.get(n.rowId+""),l=void 0!==i?i:e.rowIndex,c=void 0!==a?a:n.rowIndex,s=Math.min(l,c),d=Math.max(l,c),f=Math.min(e.colIndex,n.colIndex),h=Math.max(e.colIndex,n.colIndex),p=s;d>=p;p++)for(var w=f;h>=w;w++)if(p>=0&&o.length>p){if(v&&0===w)continue;var g=b({row:o[p].row,rowIdAccessor:u});r.add(y({colIndex:w,rowIndex:p,rowId:g}))}m(r)},[o,u,v]),$=n.useCallback(function(e,n){var r=document.querySelector(".st-body-container");if(!r)return null;var t=r.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(t.left,Math.min(t.right,e)),a=Math.max(t.top,Math.min(t.bottom,n)),u=null,l=1/0;if(o.forEach(function(e){if(e instanceof HTMLElement){var n=e,r=n.getBoundingClientRect(),t=r.top+r.height/2,o=Math.sqrt(Math.pow(r.left+r.width/2-i,2)+Math.pow(t-a,2));l>o&&(l=o,u=n)}}),null!==u){var c=u,s=parseInt(c.getAttribute("data-row-index")||"-1",10),d=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(s>=0&&d>=0&&null!==f)return{rowIndex:s,colIndex:d,rowId:f}}return null},[]),Q=n.useCallback(function(e,n){var r=document.elementFromPoint(e,n);if(!r)return null;var t=r.closest(".st-cell");if(t instanceof HTMLElement){var o=parseInt(t.getAttribute("data-row-index")||"-1",10),i=parseInt(t.getAttribute("data-col-index")||"-1",10),a=t.getAttribute("data-row-id");if(o>=0&&i>=0&&null!==a)return{rowIndex:o,colIndex:i,rowId:a}}return $(e,n)},[$]),Z=n.useCallback(function(e,n){var r=document.querySelector(".st-body-container");if(r){var t=r.getBoundingClientRect();t.top+50>n?r.scrollTop-=10*Math.min(3,1+Math.max(0,t.top-n)/100):n>t.bottom-50&&(r.scrollTop+=10*Math.min(3,1+Math.max(0,n-t.bottom)/100));var o=document.querySelector(".st-body-main");o&&(t.left+50>e?o.scrollLeft-=10*Math.min(3,1+Math.max(0,t.left-e)/100):e>t.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,e-t.right)/100)))}},[]),ee=n.useCallback(function(e){var n=e.colIndex,r=y({colIndex:n,rowIndex:e.rowIndex,rowId:e.rowId}),t=w.has(r),o=x.has(n);return t||o},[w,x]),ne=n.useCallback(function(e){var n=e.colIndex,r=e.rowIndex,t=e.rowId;if(B)return"";var i=[],a=o[r-1]?b({row:o[r-1].row,rowIdAccessor:u}):null,l=o[r+1]?b({row:o[r+1].row,rowIdAccessor:u}):null,c=null!==a?{colIndex:n,rowIndex:r-1,rowId:a}:null,s=null!==l?{colIndex:n,rowIndex:r+1,rowId:l}:null,d={colIndex:n-1,rowIndex:r,rowId:t},f={colIndex:n+1,rowIndex:r,rowId:t};return(!c||!ee(c)||x.has(n)&&0===r)&&i.push("st-selected-top-border"),(!s||!ee(s)||x.has(n)&&r===o.length-1)&&i.push("st-selected-bottom-border"),ee(d)||i.push("st-selected-left-border"),ee(f)||i.push("st-selected-right-border"),i.join(" ")},[B,ee,o,x,u]),re=n.useMemo(function(){return M?function(e){return e.rowIndex===M.rowIndex&&e.colIndex===M.colIndex&&e.rowId===M.rowId}:function(){return!1}},[M]),te=n.useCallback(function(e){var n=y({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return H.has(n)},[H]),oe=n.useCallback(function(e){var n=y({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return D.has(n)},[D]);return{getBorderClass:ne,handleMouseDown:function(e){var n=e.colIndex,t=e.rowIndex,o=e.rowId;if(r){W.current=!0,L(!0),q.current={rowIndex:t,colIndex:n,rowId:o},setTimeout(function(){I(new Set),N(null);var e=y({colIndex:n,rowIndex:t,rowId:o});m(new Set([e])),E({rowIndex:t,colIndex:n,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(W.current&&q.current){if(null!==i&&null!==a){Z(i,a);var e=Date.now();if(e-l>=16){var n=Q(i,a);n&&Y(q.current,n),l=e}}u=requestAnimationFrame(c)}else null!==u&&(cancelAnimationFrame(u),u=null)},s=function(e){W.current&&q.current&&(i=e.clientX,a=e.clientY)},d=function(){W.current=!1,L(!1),null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),u=requestAnimationFrame(c)}},handleMouseOver:function(e){r&&W.current&&q.current&&Y(q.current,{colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId})},isCopyFlashing:te,isWarningFlashing:oe,isInitialFocusedCell:re,isSelected:ee,lastSelectedColumnIndex:S,pasteFromClipboard:K,selectColumns:X,selectedCells:w,selectedColumns:x,setInitialFocusedCell:E,setSelectedCells:m,setSelectedColumns:I,deleteSelectedCells:J,columnsWithSelectedCells:z,rowsWithSelectedCells:j}}({selectableCells:Ge,headers:On,tableRows:Lr,rowIdAccessor:Be,onCellEdit:xe,cellRegistry:Ur.current,collapsedHeaders:Vn,rowHeight:Pe,enableRowSelection:V}),Jr=Kr.getBorderClass,Vr=Kr.handleMouseDown,_r=Kr.handleMouseOver,Xr=Kr.isCopyFlashing,Yr=Kr.isInitialFocusedCell,$r=Kr.isSelected,Qr=Kr.isWarningFlashing,Zr=Kr.selectColumns,et=Kr.selectedCells,nt=Kr.selectedColumns,rt=Kr.setInitialFocusedCell,tt=Kr.setSelectedCells,ot=Kr.setSelectedColumns,it=Kr.columnsWithSelectedCells,at=Kr.rowsWithSelectedCells,ut=n.useCallback(function(e){zr(e),setTimeout(function(){Pr(e)},0)},[zr,Pr]),lt=n.useCallback(function(e){Pn(e)},[]);!function(e){var r=e.selectableColumns,t=e.selectedCells,o=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns,u=e.activeHeaderDropdown,l=e.setActiveHeaderDropdown;n.useEffect(function(){var e=function(e){var n=e.target;n.closest(".editable-cell-input")&&n.closest(".st-header-cell")||(u&&l&&(n.closest(".st-header-cell")||n.closest(".dropdown-content")||l(null)),n.closest(".st-cell")||r&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label")||n.classList.contains("st-header-label-text"))||(t.size>0&&i(new Set),o.size>0&&a(new Set)))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[r,t,o,i,a,u,l])}({selectableColumns:Je,selectedCells:et,selectedColumns:nt,setSelectedCells:tt,setSelectedColumns:ot,activeHeaderDropdown:Gn,setActiveHeaderDropdown:Kn}),function(e){var r=e.forceUpdate,t=e.tableBodyContainerRef,o=e.setScrollbarWidth;n.useLayoutEffect(function(){var e=function(){r(),t.current&&o(t.current.offsetWidth-t.current.clientWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[r,t,o])}({forceUpdate:yn,tableBodyContainerRef:En,setScrollbarWidth:pr}),function(e){var r=e.onGridReady;n.useEffect(function(){null==r||r()},[r])}({onGridReady:Re}),function(e){var r=e.cellRegistryRef,t=e.currentTableRows,o=e.headerRegistryRef,i=e.headers,a=e.rowIdAccessor,l=e.rows,c=e.tableRef,s=e.visibleRows;n.useEffect(function(){c&&(c.current={updateData:function(e){var n=e.accessor,t=e.newValue,o=null==l?void 0:l[e.rowIndex];if(o){var i=b({row:o,rowIdAccessor:a}),u=h({rowId:i,accessor:n}),c=r.current.get(u);c&&c.updateContent(t),void 0!==o[n]&&(o[n]=t)}},setHeaderRename:function(e){var n=o.current.get(e.accessor+"");n&&n.setEditing(!0)},getVisibleRows:function(){return s},exportToCSV:function(e){!function(e,n,r){var t=function(e,n){var r=function(e){var n=[],r=function(e){for(var t=0,o=e;o.length>t;t++){var i=o[t];i.hide||i.isSelectionColumn||(i.children&&i.children.length>0?r(i.children):n.push(i))}};return r(e),n}(n);return u([r.map(function(e){return cn(e.label)}).join(",")],e.map(function(e){var n=e.row;return r.map(function(e){return cn(n[e.accessor])}).join(",")}),!0).join("\n")}(e,n);!function(e,n){void 0===n&&(n="table-export.csv");var r=new Blob([e],{type:"text/csv;charset=utf-8;"}),t=document.createElement("a"),o=URL.createObjectURL(r);t.setAttribute("href",o),t.setAttribute("download",n),t.style.visibility="hidden",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(o)}(t,r)}(t,i,(void 0===e?{}:e).filename)}})},[r,t,o,i,a,l,c,s])}({cellRegistryRef:Ur,currentTableRows:Lr,headerRegistryRef:Gr,headers:ar,rowIdAccessor:Be,rows:Cn,tableRef:fn,visibleRows:Wr}),function(e){var r=e.filters,t=e.onFilterChange;n.useEffect(function(){null==t||t(r)},[r,t])}({filters:Mr,onFilterChange:ye}),function(e){var r=e.sort,t=e.onSortChange,o=re(r);n.useEffect(function(){!r||(null==o?void 0:o.key.accessor)===r.key.accessor&&(null==o?void 0:o.direction)===r.direction?!r&&o&&(null==t||t(null)):null==t||t(r)},[r,o,t])}({sort:Dr,onSortChange:Te});var ct=n.useCallback(function(e){qr(e),setTimeout(function(){Er(e)},0)},[qr,Er]);return e.jsx(S,exports.__assign({value:{allowAnimations:o,areAllRowsSelected:Zn,cellRegistry:Ur.current,cellUpdateFlash:f,clearSelection:ir,collapsedHeaders:Vn,columnBorders:g,columnReordering:P,columnResizing:L,draggedHeaderRef:Rn,editColumns:z,enableHeaderEditing:K,enableRowSelection:V,expandIcon:$,filterIcon:oe,filters:Mr,forceUpdate:yn,getBorderClass:Jr,handleApplyFilter:ct,handleClearAllFilters:Hr,handleClearFilter:Tr,handleMouseDown:Vr,handleMouseOver:_r,handleRowSelect:rr,handleSelectAll:tr,handleToggleRow:or,headerCollapseIcon:ue,headerContainerRef:Tn,headerDropdown:se,headerExpandIcon:ce,headerRegistry:Gr.current,headers:ar,hoveredHeaderRef:Sn,isAnimating:jr,isCopyFlashing:Xr,isInitialFocusedCell:Yr,isLoading:we,isResizing:Ln,isRowSelected:Qn,isScrolling:zn,isSelected:$r,isWarningFlashing:Qr,mainBodyRef:Nn,nextIcon:ge,onCellEdit:xe,onCellClick:be,onColumnOrderChange:Ie,onColumnSelect:Ce,onLoadMore:Ne,onSort:ut,onTableHeaderDragEnd:lt,pinnedLeftRef:An,pinnedRightRef:Mn,prevIcon:ke,rowButtons:Fe,rowGrouping:De,rowHeight:Pe,headerHeight:null!=de?de:Pe,rowIdAccessor:Be,scrollbarWidth:hr,selectColumns:Zr,selectableColumns:Je,selectedColumns:nt,columnsWithSelectedCells:it,rowsWithSelectedCells:at,selectedRows:Yn,selectedRowCount:er,selectedRowsData:nr,setCollapsedHeaders:_n,setHeaders:Pn,setInitialFocusedCell:rt,setIsResizing:Wn,setIsScrolling:jn,setSelectedCells:tt,setSelectedColumns:ot,setSelectedRows:$n,setUnexpandedRows:fr,shouldPaginate:en,sortDownIcon:rn,sortUpIcon:sn,tableBodyContainerRef:En,tableRows:Lr,theme:hn,unexpandedRows:dr,useHoverRowBackground:mn,useOddColumnBackground:In,useOddEvenRowBackground:xn,activeHeaderDropdown:Gn,setActiveHeaderDropdown:Kn,onHeaderEdit:Se}},{children:e.jsx("div",exports.__assign({className:"simple-table-root st-wrapper theme-".concat(hn," ").concat(null!=v?v:""," ").concat(g?"st-column-borders":""),style:fe?{height:fe}:{}},{children:e.jsx(an,{children:e.jsxs("div",exports.__assign({className:"st-wrapper-container"},{children:[e.jsxs("div",exports.__assign({className:"st-content-wrapper"},{children:[e.jsx(_e,{pinnedLeftWidth:Ir,pinnedRightWidth:Cr,setScrollTop:cr,sort:Dr,tableRows:Lr,rowsToRender:Wr}),e.jsx(on,{columnEditorText:H,editColumns:z,editColumnsInitOpen:U,headers:On,position:R})]})),e.jsx(Xe,{mainBodyRef:Nn,mainBodyWidth:br,pinnedLeftWidth:Ir,pinnedRightWidth:Cr,pinnedLeftContentWidth:yr,pinnedRightContentWidth:Rr,tableBodyContainerRef:En}),e.jsx(A,{currentPage:kn,footerRenderer:ie,hideFooter:he,onPageChange:Fn,onNextPage:Ae,onUserPageChange:Me,rowsPerPage:je,shouldPaginate:en,totalPages:Math.ceil((null!=pn?pn:Or.length)/je),totalRows:null!=pn?pn:Or.length})]}))})}))}))};exports.ANIMATION_CONFIGS=dn,exports.AngleDownIcon=function(n){return e.jsx("svg",exports.__assign({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},exports.AngleLeftIcon=M,exports.AngleRightIcon=E,exports.AngleUpIcon=function(n){return e.jsx("svg",exports.__assign({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},exports.AscIcon=T,exports.BUFFER_ROW_COUNT=5,exports.CheckIcon=H,exports.DescIcon=k,exports.FilterIcon=F,exports.SelectIcon=D,exports.SimpleTable=function(r){var t=n.useState(!1),o=t[0],i=t[1];return n.useEffect(function(){i(!0)},[]),o?e.jsx(hn,exports.__assign({},r)):null},exports.__rest=o,exports.animateWithCustomCoordinates=function(e){var n=e.element,r=e.options;return i(void 0,void 0,void 0,function(){var e,t,o,i,u,l,c,s,d,f,v,h,p,w,m,g;return a(this,function(a){return e=r.startY,t=r.endY,o=r.finalY,u=void 0===(i=r.duration)?300:i,c=void 0===(l=r.easing)?"cubic-bezier(0.2, 0.0, 0.2, 1)":l,d=void 0===(s=r.delay)?0:s,f=r.onComplete,h=void 0===(v=r.respectReducedMotion)||v,sn()&&h?(void 0!==o&&(n.style.transform="",n.style.top="".concat(o,"px")),f&&f(),[2]):(p=n.getBoundingClientRect(),m=e-(w=p.top),g=t-w,[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(m,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating"),n.style.transition="transform ".concat(u,"ms ").concat(c),d&&(n.style.transitionDelay="".concat(d,"ms")),n.style.transform="translate3d(0, ".concat(g,"px, 0)");var r=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",r),f&&f(),e()};n.addEventListener("transitionend",r),setTimeout(r,u+(d||0)+50)})])})})},exports.flipElement=function(e){var n=e.element,r=e.finalConfig,t=e.fromBounds,o=e.toBounds;return i(void 0,void 0,void 0,function(){var e,i;return a(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}}(t,o),0===e.x&&0===e.y||sn()&&!1!==r.respectReducedMotion?[2]:(u=r,l=Math.abs(e.x)>Math.abs(e.y)?"column":"row",void 0===u&&(u={}),i=sn()?exports.__assign(exports.__assign({},dn.REDUCED_MOTION),u):"column"===l?exports.__assign(exports.__assign({},dn.COLUMN_REORDER),u):exports.__assign(exports.__assign({},dn.ROW_REORDER),u),fn(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,vn(n,i,r)]);case 1:return a.sent(),[2]}var u,l})})},exports.usePrevious=re,exports.useTableContext=N;
|
|
2
|
-
//# sourceMappingURL=index-b0d43d44.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-b0d43d44.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index-9e4ebc64.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as n,Fragment as e,jsxs as r}from"react/jsx-runtime";import t,{useEffect as o,useState as i,useRef as a,useMemo as u,useCallback as l,createContext as c,useContext as s,lazy as d,Suspense as f,Fragment as v,cloneElement as h,forwardRef as w,useImperativeHandle as p,isValidElement as m,useLayoutEffect as g,useReducer as b}from"react";var I=function(){return I=Object.assign||function(n){for(var e,r=1,t=arguments.length;t>r;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},I.apply(this,arguments)};function C(n,e){var r={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&0>e.indexOf(t)&&(r[t]=n[t]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(n);t.length>o;o++)0>e.indexOf(t[o])&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(r[t[o]]=n[t[o]])}return r}function y(n,e,r,t){return new(r||(r=Promise))(function(o,i){function a(n){try{l(t.next(n))}catch(n){i(n)}}function u(n){try{l(t.throw(n))}catch(n){i(n)}}function l(n){var e;n.done?o(n.value):(e=n.value,e instanceof r?e:new r(function(n){n(e)})).then(a,u)}l((t=t.apply(n,e||[])).next())})}function x(n,e){var r,t,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(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,t&&(o=2&u[0]?t.return:u[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,u[1])).done)return o;switch(t=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++,t=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&o[3]>u[1])){i.label=u[1];break}if(6===u[0]&&o[1]>i.label){i.label=o[1],o=u;break}if(o&&o[2]>i.label){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(n,i)}catch(n){u=[6,n],t=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function R(n,e,r){if(r||2===arguments.length)for(var t,o=0,i=e.length;i>o;o++)!t&&o in e||(t||(t=Array.prototype.slice.call(e,0,o)),t[o]=e[o]);return n.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var S=5,N=function(n){return 480>n?.3:768>n?.4:.8},A=function(n,e){if(!n.children||0===n.children.length)return[e];var r=[],t=function(n,e){if(!n.children||0===n.children.length)return r.push(e),e+1;for(var o=e,i=0,a=n.children;a.length>i;i++)o=t(a[i],o);return o};return t(n,e),r},M=function(n){return n.flatMap(function(n){var e=[n];return n.children&&n.children.length>0&&e.push.apply(e,M(n.children)),e})},E=function(n){return void 0===n&&(n=0),n?n+1:0},T=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},H=function(n){var e=n.header,r=n.pinned,t=n.headers,o=n.collapsedHeaders;return e.hide||(r||e.pinned)&&e.pinned!==r?null:!(t&&o&&function(n,e,r){var t=function(n,e){for(var r=0,t=M(n);t.length>r;r++){var o=t[r];if(o.children&&o.children.length>0&&o.children.some(function(n){return n.accessor===e}))return o}return null}(e,n.accessor);return!!t&&(r.has(t.accessor)?"parentExpanded"===n.showWhen:"parentCollapsed"===n.showWhen)}(e,t,o))||null},k=function(n){var e=n.accessor;return"".concat(n.rowId,"-").concat(e)},F=function(n,e){return n.hide?[]:n.children&&0!==n.children.length?e&&e.has(n.accessor)?n.children.filter(function(n){return"parentCollapsed"===n.showWhen||"always"===n.showWhen}).flatMap(function(n){return F(n,e)}):n.children.filter(function(n){return"parentExpanded"===n.showWhen||"always"===n.showWhen||!n.showWhen}).flatMap(function(n){return F(n,e)}):[n]},D=function(n){if(n.hide)return 0;if("number"==typeof n.width)return n.width;if("string"==typeof n.width&&n.width.endsWith("px"))return parseFloat(n.width);var e=document.getElementById(T({accessor:n.accessor,rowId:"header"}));return(null==e?void 0:e.offsetWidth)||150},O=function(n){var e,r=n.width;"string"==typeof r&&r.includes("fr")&&(n.width=(null===(e=document.getElementById(T({accessor:n.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth)||150),n.children&&n.children.length>0&&n.children.forEach(function(n){O(n)})},P=function(n){return"number"==typeof n.minWidth?n.minWidth:40},B=function(n){return Array.isArray(n)&&n.length>0&&"object"==typeof n[0]&&null!==n[0]},L=function(n){return n.row[n.rowIdAccessor]},W=function(n,e,r){var t=n.getBoundingClientRect(),o=e.getBoundingClientRect(),i=10;if(o.top+i>t.top?e.scrollTop-=o.top-t.top+i:t.bottom>o.bottom-i&&(e.scrollTop+=t.bottom-o.bottom+i),r){var a=r.getBoundingClientRect();a.left+i>t.left?r.scrollLeft-=a.left-t.left+i:t.right>a.right-i&&(r.scrollLeft+=t.right-a.right+i)}},q=function(n,e){var r=document.querySelector(".st-body-container"),t=document.querySelector(".st-body-main");if(r){var o=e+1,i=document.querySelector('.st-cell[data-row-index="'.concat(n.rowIndex,'"][data-col-index="').concat(n.colIndex,'"][data-row-id="').concat(n.rowId,'"]'));if(!i)return r.scrollTop=Math.max(0,n.rowIndex*o-r.clientHeight/3),void setTimeout(function(){var e=document.querySelector('.st-cell[data-row-index="'.concat(n.rowIndex,'"][data-col-index="').concat(n.colIndex,'"][data-row-id="').concat(n.rowId,'"]'));e&&W(e,r,t)},100);W(i,r,t)}},z=function(n){var e=n.colIndex,r=n.rowId;return"".concat(n.rowIndex,"-").concat(e,"-").concat(r)},j=c(void 0),U=function(e){return n(j.Provider,I({value:e.value},{children:e.children}))},G=function(){var n=s(j);if(void 0===n)throw Error("useTableContext must be used within a TableProvider");return n},K=function(t){var o=t.currentPage,a=t.footerRenderer,u=t.hideFooter,l=t.onPageChange,c=t.onNextPage,s=t.onUserPageChange,d=t.rowsPerPage,f=t.shouldPaginate,v=t.totalPages,h=t.totalRows,w=G(),p=w.nextIcon,m=w.prevIcon,g=i(!0),b=g[0],C=g[1],R=o>1,S=v>o,N=o===v,A=Math.min((o-1)*d+1,h),M=Math.min(o*d,h),E=!R,T=!S&&!c||!b&&N,H=function(){return y(void 0,void 0,void 0,function(){var n;return x(this,function(e){switch(e.label){case 0:return 1>(n=o-1)?[3,2]:(l(n),s?[4,s(n)]:[3,2]);case 1:e.sent(),e.label=2;case 2:return[2]}})})},k=function(){return y(void 0,void 0,void 0,function(){var n,e;return x(this,function(r){switch(r.label){case 0:return n=o===v,e=o+1,c&&n?[4,c(o)]:[3,2];case 1:if(!r.sent())return C(!1),[2];r.label=2;case 2:return e>v&&!c?[3,4]:(l(e),s?[4,s(e)]:[3,4]);case 3:r.sent(),r.label=4;case 4:return[2]}})})},F=function(n){return y(void 0,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return 1>n||n>v?[3,2]:(l(n),s?[4,s(n)]:[3,2]);case 1:e.sent(),e.label=2;case 2:return[2]}})})};if(u||!f)return null;if(a)return n(e,{children:a({currentPage:o,totalPages:v,rowsPerPage:d,totalRows:h,startRow:A,endRow:M,onPageChange:F,onNextPage:k,onPrevPage:H,hasNextPage:!T,hasPrevPage:!E,nextIcon:p,prevIcon:m})});var D=function(){if(15>=v)return Array.from({length:v},function(n,e){return e+1});var n,e,r=[];o>8?v-7>o?(n=o-7,e=o+7):(n=Math.max(1,v-15+1),e=v):(n=1,e=14);for(var t=n;e>=t;t++)r.push(t);return v-1>e&&(r.push(-1),r.push(v)),r}();return r("div",I({className:"st-footer"},{children:[n("div",I({className:"st-footer-info"},{children:r("span",I({className:"st-footer-results-text"},{children:["Showing ",A," to ",M," of ",h.toLocaleString()," results"]}))})),r("div",I({className:"st-footer-pagination"},{children:[D.map(function(e,r){return 0>e?n("span",I({className:"st-page-ellipsis"},{children:"..."}),r):n("button",I({onClick:function(){return F(e)},className:"st-page-btn ".concat(o===e?"active":"")},{children:e}),r)}),n("button",I({className:"st-next-prev-btn ".concat(E?"disabled":""),onClick:H,disabled:E},{children:m})),n("button",I({className:"st-next-prev-btn ".concat(T?"disabled":""),onClick:k,disabled:T},{children:p}))]}))]}))},J=function(e){return n("svg",I({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},V=function(e){return n("svg",I({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},_=function(e){return n("svg",I({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},X=function(e){return n("svg",I({className:e.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},Y=function(e){return n("svg",I({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:e.className,style:{height:"1em"}},{children:n("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},$=function(e){return n("svg",I({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:e.className,style:I({height:"10px"},e.style)},{children:n("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},Q=function(e){return n("svg",I({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:e.className,style:{height:"1em"}},{children:n("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},Z=function(e){return n("svg",I({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:e.className,style:I({height:"1em"},e.style)},{children:n("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},nn=function(){return n("svg",I({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},en=function(n){var e=n.bufferRowCount,r=n.scrollTop,t=n.tableRows,o=n.rowHeight+1,i=r+n.contentHeight+o*e;return t.slice(Math.max(0,Math.floor(Math.max(0,r-o*e)/o)),Math.min(t.length,Math.ceil(i/o)))},rn=function(n){return n.position*(n.rowHeight+1)-1},tn=function(n){return n.position*(n.rowHeight+1)},on=function(e){var r=e.children,t=e.onClose,u=e.open,l=e.overflow,c=void 0===l?"auto":l,s=e.setOpen,d=e.width,f=e.containerRef,v=e.positioning,h=void 0===v?"fixed":v,w=G().mainBodyRef,p=a(null),m=a(null),g=i("bottom-left"),b=g[0],C=g[1],y=i({}),x=y[0],R=y[1],S=i(!1),N=S[0],A=S[1];return o(function(){u&&p.current?(A(!1),!m.current&&p.current.parentElement&&(m.current=p.current.parentElement),requestAnimationFrame(function(){if(p.current&&m.current){var n,e=p.current,r=m.current.getBoundingClientRect(),t=e.offsetHeight,o=d||e.offsetWidth,i=(n=(null==f?void 0:f.current)?f.current.getBoundingClientRect():(null==w?void 0:w.current)?w.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-r.bottom,a=r.top-n.top,u="bottom",l={};(t>i&&a>=t||t>i&&a>i)&&(u="top");var c="left";o>n.right-r.right+r.width&&(c="right"),"fixed"===h?("bottom"===u?l.top=r.bottom+4:l.bottom=window.innerHeight-r.top+4,"left"===c?l.left=r.left:l.right=window.innerWidth-r.right):("bottom"===u?l.top=r.height+4:l.bottom=r.height+4,"left"===c?l.left=0:l.right=0),C("".concat(u,"-").concat(c)),R(l),A(!0)}})):u||A(!1)},[u,d,f,w,h]),o(function(){var n=function(n){u&&p.current&&p.current&&!p.current.contains(n.target)&&(s(!1),null==t||t())};return u&&window.addEventListener("scroll",n,!0),function(){window.removeEventListener("scroll",n,!0)}},[u,t,s]),o(function(){var n=function(n){if(p.current&&!p.current.contains(n.target)){var e=p.current.parentElement;e&&!e.contains(n.target)&&(s(!1),null==t||t())}};return u&&document.addEventListener("mousedown",n,!0),function(){document.removeEventListener("mousedown",n,!0)}},[t,u,s]),o(function(){var n=function(n){"Escape"===n.key&&u&&(s(!1),null==t||t())};return u&&document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}},[t,u,s]),u?n("div",I({ref:p,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(n){return n.stopPropagation()},style:I(I({position:h,width:d?"".concat(d,"px"):"auto",visibility:N?"visible":"hidden"},x),{overflow:c})},{children:r})):null},an=function(e){var r=e.children,t=e.onClick,o=e.isSelected,i=void 0!==o&&o,a=e.disabled,u=void 0!==a&&a,l=e.className,c=void 0===l?"":l;return n("div",I({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(u?"disabled":""," ").concat(c),onClick:function(){!u&&t&&t()},role:"option","aria-selected":i,"aria-disabled":u},{children:r}))},un=function(e){var t=e.onBlur,o=e.onChange,a=e.open,u=e.setOpen,l=i(e.value),c=l[0],s=l[1],d=function(n){s(n),o(n),u(!1),t()};return r(on,I({open:a,onClose:function(){t()},setOpen:u,width:120},{children:[n(an,I({isSelected:!0===c,onClick:function(){return d(!0)}},{children:"True"})),n(an,I({isSelected:!1===c,onClick:function(){return d(!1)}},{children:"False"}))]}))},ln=function(e){var r=e.defaultValue,t=e.onBlur,o=e.onChange,i=a(null);return n("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:t,onChange:function(n){o(n.target.value)},onKeyDown:function(n){n.stopPropagation(),"Enter"!==n.key&&"Escape"!==n.key||t()},onMouseDown:function(n){n.stopPropagation()}})},cn=function(e){var r=e.defaultValue,t=e.onBlur,o=e.onChange,i=a(null);return n("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:""+r,onBlur:t,onChange:function(n){var e=n.target.value;/^\d*\.?\d*$/.test(e)&&o(e)},onKeyDown:function(n){n.stopPropagation(),"Enter"!==n.key&&"Escape"!==n.key||t()},onMouseDown:function(n){n.stopPropagation()}})},sn=d(function(){return import("./Animate-ce0ca666.js")}),dn=d(function(){return import("./DatePicker-c37f2180.js")}),fn=function(e){var r=C(e,["parentRef","tableRow"]);return n(f,I({fallback:n("div",I({},r))},{children:n(sn,I({},e))}))},vn=function(e){return n(f,I({fallback:n("div",I({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:n(dn,I({},e))}))},hn=function(n){if(!n)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(n)){var e=n.split("-").map(Number);return new Date(e[0],e[1]-1,e[2],12,0,0)}var r=new Date(n);return isNaN(r.getTime())?new Date:new Date(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0)},wn=function(n){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0)},pn=function(n){if(!n)return new Date;if("string"==typeof n)return hn(n);if("number"==typeof n){var e=new Date(n);return isNaN(e.getTime())?new Date:wn(e)}return n instanceof Date?wn(n):new Date},mn=function(n){return n?hn(""+n):new Date},gn=function(e){var r=e.onBlur,t=e.onChange,i=e.open,a=e.setOpen,u=e.value;o(function(){var n=setTimeout(function(){var n=document.querySelector(".st-dropdown-container");n instanceof HTMLElement&&n.focus()},0);return function(){return clearTimeout(n)}},[]);var l=function(){r()};return n(on,I({open:i,onClose:l,setOpen:a,width:280},{children:n(vn,{value:mn(u),onChange:function(n){var e=n.toISOString().split("T")[0];t(e),a(!1),r()},onClose:l})}))},bn=function(e){var r=e.onBlur,t=e.onChange,o=e.open,a=e.options,u=e.setOpen,l=i(e.value||""),c=l[0],s=l[1];return n(on,I({open:o,onClose:function(){r()},setOpen:u,width:150},{children:n("div",I({className:"st-enum-dropdown-content"},{children:a.map(function(e){return n(an,I({isSelected:c===e.value,onClick:function(){return s(n=e.value),t(n),u(!1),void r();var n}},{children:e.label}),e.value)})}))}))},In=function(e){var r=e.enumOptions,t=void 0===r?[]:r,o=e.onChange,i=e.setIsEditing,a=e.type,u=void 0===a?"string":a,l=e.value,c=function(){i(!1)};return"boolean"===u&&"boolean"==typeof l?n(un,{onBlur:c,onChange:function(n){return o(n)},open:!0,setOpen:i,value:l}):"date"===u?n(gn,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?n(bn,{onBlur:c,onChange:o,open:!0,options:t,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?n(cn,{defaultValue:l,onBlur:c,onChange:function(n){var e=""===n?0:parseFloat(n);o(isNaN(e)?0:e)}}):n(ln,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},Cn=0,yn=function(){return function(n){var e=n.callback,r=n.callbackProps,t=n.limit,o=Date.now();0!==Cn&&t>o-Cn||(Cn=o,e(r))}},xn=function(n){var e=a(n);return o(function(){JSON.stringify(e.current)!==JSON.stringify(n)&&(e.current=n)},[n]),e.current},Rn=function(n){if(null===n||"object"!=typeof n)return n;if(Array.isArray(n))return n.map(Rn);var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=Rn(n[r]));return e},Sn=function(n,e){return n.filter(function(n){return n.pinned===e}).some(function(n){return!n.hide})},Nn=Date.now(),An={screenX:0,screenY:0},Mn=function(n,e,r){void 0===r&&(r=[]);for(var t=0;n.length>t;t++){var o=n[t];if(o.accessor===e)return R(R([],r,!0),[t],!1);if(o.children&&o.children.length>0){var i=Mn(o.children,e,R(R([],r,!0),[t],!1));if(i)return i}}return null},En=function(n){return"left"===n.pinned?"left":"right"===n.pinned?"right":"main"};var Tn=function(n){var e=n.draggedHeaderRef,r=n.headers,t=n.hoveredHeaderRef,o=n.onColumnOrderChange,i=n.onTableHeaderDragEnd,a=G().setHeaders,u=xn(r);return{handleDragStart:function(n){e.current=n,Nn=Date.now()},handleDragOver:function(n){var o=n.event,a=n.hoveredHeader;if(o.preventDefault(),r&&e.current){var l=o.currentTarget.getAnimations().some(function(n){return"running"===n.playState}),c=o.screenX,s=o.screenY,d=Math.sqrt(Math.pow(c-An.screenX,2)+Math.pow(s-An.screenY,2));t.current=a;var f,v=e.current,h=!1;if(En(v)!==En(a))f=(x=function(n,e,r){var t,o,i=Rn(n),a=!1;try{var u=En(r),l=i.findIndex(function(n){return n.accessor===e.accessor}),c=i.findIndex(function(n){return n.accessor===r.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var s=i.splice(l,1)[0],d=(t=u,o=I({},s),"left"===t?o.pinned="left":"right"===t?o.pinned="right":delete o.pinned,o);i.splice(c,0,d)}catch(n){console.error("Error in insertHeaderAcrossSections:",n),a=!0}return{newHeaders:i,emergencyBreak:a}}(r,v,a)).newHeaders,h=x.emergencyBreak;else{var w=r,p=Mn(w,v.accessor),m=Mn(w,a.accessor);if(!p||!m)return;var g=p.length,b=m.length,C=m;if(g!==b){var y=b-g;y>0&&(C=m.slice(0,-y))}var x=function(n,e,r){var t=Rn(n),o=!1;function i(n,e){for(var r=n,t=0;e.length-1>t;t++)r=r[e[t]].children;return r[e[e.length-1]]}function a(n,e,r){for(var t=n,i=0;e.length-1>i;i++){if(!t[e[i]].children){o=!0;break}t=t[e[i]].children}t[e[e.length-1]]=r}var u=i(t,e);return a(t,e,i(t,r)),a(t,r,u),{newHeaders:t,emergencyBreak:o}}(w,p,C);f=x.newHeaders,h=x.emergencyBreak}if(!(l||a.accessor===v.accessor||10>d||JSON.stringify(f)===JSON.stringify(r)||h)){var R=Date.now();JSON.stringify(f)===JSON.stringify(u)&&(1500>R-Nn||40>d)||(Nn=R,An={screenX:c,screenY:s},i(f))}}},handleDragEnd:function(){e.current=null,t.current=null,setTimeout(function(){a(function(n){return R([],n,!0)}),null==o||o(r)},10)}}},Hn=function(e){var t=e.checked,o=void 0!==t&&t,i=e.children,a=e.onChange;return r("label",I({className:"st-checkbox-label"},{children:[n("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),n("span",I({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&n($,{className:"st-checkbox-checkmark"})})),i]}))},kn=function(n){var e=n.content,r=n.header;return"boolean"==typeof e?e?"True":"False":Array.isArray(e)?0===e.length?"[]":e.map(function(n){return"object"==typeof n&&null!==n?JSON.stringify(n):n+""}).join(", "):"date"===r.type&&null!==e&&("string"==typeof e||"number"==typeof e||"object"==typeof e&&e instanceof Date)?pn(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):e},Fn=function(e){var t=e.borderClass,c=e.colIndex,s=e.displayRowNumber,d=e.header,f=e.isHighlighted,v=e.isInitialFocused,h=e.nestedIndex,w=e.rowIndex,p=e.tableRow,m=G(),g=m.cellRegistry,b=m.cellUpdateFlash,C=m.columnBorders,y=m.draggedHeaderRef,x=m.enableRowSelection,R=m.expandIcon,S=m.handleMouseDown,N=m.handleMouseOver,A=m.handleRowSelect,M=m.headers,E=m.hoveredHeaderRef,H=m.isCopyFlashing,F=m.isLoading,D=m.isRowSelected,O=m.isWarningFlashing,P=m.onCellEdit,W=m.onCellClick,q=m.onTableHeaderDragEnd,z=m.rowButtons,j=m.rowGrouping,U=m.rowIdAccessor,K=m.rowsWithSelectedCells,J=m.selectedColumns,V=m.setUnexpandedRows,_=m.tableBodyContainerRef,X=m.theme,Y=m.unexpandedRows,$=m.useOddColumnBackground,Q=p.depth,Z=p.row,nn=i(Z[d.accessor]),en=nn[0],rn=nn[1],tn=i(!1),on=tn[0],an=tn[1],un=i(!1),ln=un[0],cn=un[1],sn=i(!1),dn=sn[0],vn=sn[1],hn=a(null),wn=L({row:Z,rowIdAccessor:U}),pn=j&&j[Q],mn=!!pn&&function(n,e){return!!e&&B(n[e])}(Z,pn),gn=!Y.has(wn+""),bn=H({rowIndex:w,colIndex:c,rowId:wn}),Cn=O({rowIndex:w,colIndex:c,rowId:wn}),xn=u(function(){var n,e,r;if(!C)return!1;var t=M.filter(function(n){return"left"===n.pinned}),o=M.filter(function(n){return!n.pinned}),i=M.filter(function(n){return"right"===n.pinned});return"left"===d.pinned?(null===(n=t[t.length-1])||void 0===n?void 0:n.accessor)===d.accessor:"right"===d.pinned?(null===(e=i[i.length-1])||void 0===e?void 0:e.accessor)===d.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===d.accessor},[C,M,d.accessor,d.pinned]),Rn=Tn({draggedHeaderRef:y,headers:M,hoveredHeaderRef:E,onTableHeaderDragEnd:q}).handleDragOver,Sn=yn(),Nn=T({accessor:d.accessor,rowId:wn}),An=k({rowId:wn,accessor:d.accessor}),Mn=d.isSelectionColumn&&x;o(function(){if(g){var n="".concat(wn,"-").concat(d.accessor);return g.set(n,{updateContent:function(n){en!==n?(rn(n),b&&(cn(!0),hn.current&&clearTimeout(hn.current),hn.current=setTimeout(function(){cn(!1)},800))):rn(n)}}),function(){g.delete(n),hn.current&&clearTimeout(hn.current)}}},[g,b,wn,d.accessor,en]),o(function(){if(ln){var n=setTimeout(function(){cn(!1)},850);return function(){return clearTimeout(n)}}},[ln]),o(function(){rn(Z[d.accessor])},[Z,d.accessor]);var En="boolean"===d.type||"date"===d.type||"enum"===d.type,Fn=!!(null==d?void 0:d.isEditable),Dn=J.has(c),On=f&&!Dn,Pn=u(function(){return!!Mn&&K.has(wn+"")},[Mn,K,wn]),Bn="st-cell ".concat(Q>0&&d.expandable?"st-cell-depth-".concat(Q):""," ").concat(On?v?"st-cell-selected-first ".concat(t):"st-cell-selected ".concat(t):""," ").concat(Dn?v?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(Fn?"clickable":""," ").concat(ln?v?"st-cell-updating-first":"st-cell-updating":""," ").concat(bn?v?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Cn?v?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat($?h%2==0?"even-column":"odd-column":""," ").concat(Mn?"st-selection-cell":""," ").concat(Pn?"st-selection-has-highlighted-cell":""," ").concat(xn?"st-last-column":""),Ln=l(function(n){null==n&&(n="number"===d.type?0:"boolean"!==d.type&&""),rn(n),Z[d.accessor]=n,null==P||P({accessor:d.accessor,newValue:n,row:Z,rowIndex:w})},[d.accessor,d.type,P,Z,w]),Wn=l(function(){V(function(n){var e=new Set(n),r=wn+"";return e.has(r)?e.delete(r):e.add(r),e})},[wn,V]);return!on||En||Mn?r(fn,I({className:Bn,"data-accessor":d.accessor,"data-col-index":c,"data-row-id":wn,"data-row-index":w,id:Nn,onClick:function(){W&&!Mn&&W({accessor:d.accessor,colIndex:c,row:Z,rowId:wn,rowIndex:w,value:en})},onDoubleClick:function(){return d.isEditable&&!Mn&&an(!0)},onDragOver:function(n){Mn||Sn({callback:Rn,callbackProps:{event:n,hoveredHeader:d},limit:50})},onKeyDown:function(n){on||Mn||"F2"!==n.key&&"Enter"!==n.key||!d.isEditable||on||(n.preventDefault(),an(!0))},onMouseDown:function(){on||Mn||S({rowIndex:w,colIndex:c,rowId:wn})},onMouseEnter:function(){vn(!0)},onMouseLeave:function(){vn(!1)},onMouseOver:function(){on||Mn||N({rowIndex:w,colIndex:c,rowId:wn})},parentRef:_,tableRow:p},{children:[d.expandable&&mn?n("div",I({className:"st-icon-container st-expand-icon-container ".concat(gn?"expanded":"collapsed"),onClick:Wn},{children:R})):null,n("span",I({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:F?n("div",{className:"st-loading-skeleton"}):n("span",{children:Mn?r("div",I({className:"st-selection-cell-content"},{children:[n("div",I({className:"st-selection-control"},{children:dn||D&&D(wn+"")?n(Hn,{checked:!!D&&D(wn+""),onChange:function(n){A&&A(wn+"",n)}}):n("span",I({className:"st-row-number"},{children:s+1}))})),function(){if(!z||!Mn||0===z.length)return null;if(!(dn||D&&D(wn+"")))return null;var e={row:Z};return n("div",I({className:"st-row-buttons"},{children:z.map(function(r,t){return n("span",I({className:"st-row-button"},{children:r(e)}),t)})}))}()]})):d.cellRenderer?d.cellRenderer({accessor:d.accessor,colIndex:c,row:Z,theme:X}):kn({content:en,header:d})})})),!F&&on&&En&&!Mn&&n(In,{enumOptions:d.enumOptions,onChange:Ln,setIsEditing:an,type:d.type,value:en})]}),An):n("div",I({className:"st-cell-editing",id:T({accessor:d.accessor,rowId:wn}),onMouseDown:function(n){return n.stopPropagation()},onKeyDown:function(n){return n.stopPropagation()}},{children:n(In,{enumOptions:d.enumOptions,onChange:Ln,setIsEditing:an,type:d.type,value:en})}))},Dn=function(r){var t=r.columnIndexStart,o=r.columnIndices,i=r.headers,a=r.pinned,u=r.rowIndex,l=r.displayRowNumber,c=r.rowIndices,s=r.tableRow,d=G(),f=d.rowIdAccessor,v=d.collapsedHeaders,h=i.filter(function(n){return H({header:n,pinned:a,headers:i,collapsedHeaders:v})});return n(e,{children:h.map(function(e,r){var d=L({row:s.row,rowIdAccessor:f}),v=T({accessor:e.accessor,rowId:d});return n(On,{columnIndices:o,displayRowNumber:l,header:e,headers:i,nestedIndex:r+(null!=t?t:0),pinned:a,rowIndex:u,rowIndices:c,tableRow:s},v)})})},On=function(e){var r=e.columnIndices,t=e.displayRowNumber,o=e.header,i=e.headers,a=e.nestedIndex,u=e.pinned,l=e.rowIndex,c=e.rowIndices,s=e.tableRow,d=r[o.accessor],f=G(),h=f.getBorderClass,w=f.isSelected,p=f.isInitialFocusedCell,m=f.collapsedHeaders,g=L({row:s.row,rowIdAccessor:f.rowIdAccessor});if(o.children&&o.children.length>0){var b=o.children.filter(function(n){return H({header:n,pinned:u,headers:i,collapsedHeaders:m})});return n(v,{children:b.map(function(e){var o=T({accessor:e.accessor,rowId:g});return n(On,{columnIndices:r,displayRowNumber:t,header:e,headers:i,nestedIndex:a,pinned:u,rowIndex:l,rowIndices:c,tableRow:s},o)})})}var I={rowIndex:l,colIndex:d,rowId:g},C=h(I),y=w(I),x=p(I),R=T({accessor:o.accessor,rowId:g});return n(Fn,{borderClass:C,colIndex:d,displayRowNumber:t,header:o,isHighlighted:y,isInitialFocused:x,nestedIndex:a,rowIndex:l,tableRow:s},R)},Pn=function(e){var r=e.columnIndices,t=e.columnIndexStart,o=e.gridTemplateColumns,i=e.headers,a=e.index,u=e.pinned,l=e.rowHeight,c=e.rowIndices,s=e.setHoveredIndex,d=e.tableRow,f=G(),v=f.useHoverRowBackground,h=f.isAnimating,w=f.isRowSelected,p=f.useOddEvenRowBackground,m=d.position,g=d.displayPosition,b=m%2==0,C=L({row:d.row,rowIdAccessor:f.rowIdAccessor}),y=!!w&&w(C+"");return n("div",I({className:"st-row ".concat(p?b?"even":"odd":""," ").concat(y?"selected":""),"data-index":a,onMouseEnter:function(){!h&&v&&s(a)},style:{gridTemplateColumns:o,top:tn({position:m,rowHeight:l}),height:"".concat(l,"px")}},{children:n(Dn,{columnIndexStart:t,columnIndices:r,displayRowNumber:g,headers:i,pinned:u,rowIndex:m,rowIndices:c,tableRow:d},C)}))},Bn=function(e){var r=e.displayStrongBorder,t=e.position,o=e.rowHeight,i=e.templateColumns,u=a(null);return n("div",I({className:"st-row-separator ".concat(r?"st-last-group-row":""),onMouseDown:function(n){var e=n.currentTarget,r=e.style.pointerEvents;e.style.pointerEvents="none";var t=document.elementFromPoint(n.clientX,n.clientY);if(e.style.pointerEvents=r,t){var o=t.closest(".st-cell");if(o instanceof HTMLElement){u.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:n.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(n){if(u.current){var e=u.current.getBoundingClientRect(),r=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:n.clientX,clientY:e.top+e.height/2});u.current.dispatchEvent(r),u.current=null}},style:{gridTemplateColumns:i,top:rn({position:t,rowHeight:o})}},{children:n("div",{style:{gridColumn:"1 / -1"}})}))},Ln=c(void 0),Wn=function(n){var e=n.childRef,r=n.children,t=n.group,i=void 0===t?"default":t,a=function(){var n=s(Ln);if(!n)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return n}(),u=a.registerPane,l=a.unregisterPane;return o(function(){var n=[i];return e.current&&u(e.current,n),function(){e.current&&l(e.current,n)}},[e,u,l,i]),h(r,{ref:function(n){e.current=n}})},qn=w(function(e,t){var o=e.columnIndexStart,i=e.columnIndices,l=e.headers,c=e.pinned,s=e.rowHeight,d=e.rowIndices,f=e.setHoveredIndex,h=e.templateColumns,w=e.totalHeight,m=e.rowsToRender,g=e.width,b=c?"st-body-pinned-".concat(c):"st-body-main",C=G().rowIdAccessor,y=a(null);return p(t,function(){return y.current},[]),u(function(){return Sn(l,c)},[l,c])?n(Wn,I({childRef:y,group:c?"pinned-".concat(c):"default"},{children:n("div",I({className:b,ref:y,style:I({position:"relative",height:"".concat(w,"px"),width:g},!c&&{flexGrow:1})},{children:m.map(function(e,t){var a=L({row:e.row,rowIdAccessor:C});return r(v,{children:[0!==t&&n(Bn,{displayStrongBorder:e.isLastGroupRow,position:e.position,rowHeight:s,templateColumns:h,rowIndex:t-1}),n(Pn,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:h,headers:l,index:t,pinned:c,rowHeight:s,rowIndices:d,setHoveredIndex:f,tableRow:e},a)]},a)})}))})):null});function zn(n){var e=n.headers,r=n.pinnedLeftColumns,t=n.pinnedRightColumns,o=n.collapsedHeaders,i={},a=0,u=R(R(R([],r,!0),e,!0),t,!0),l=function(n,e){void 0===e&&(e=!1),e||a++,i[n.accessor]=a,n.children&&n.children.length>0&&n.children.filter(function(n){return H({header:n,headers:u,collapsedHeaders:o})}).forEach(function(n,e){l(n,0===e)})};return r.forEach(function(n,e){l(n,0===e)}),e.filter(function(n){return!n.pinned&&H({header:n,headers:u,collapsedHeaders:o})}).forEach(function(n,e){l(n,0===e&&0===r.length)}),t.forEach(function(n){l(n,!1)}),i}qn.displayName="TableSection";var jn=function(e){var t=e.mainTemplateColumns,c=e.pinnedLeftColumns,s=e.pinnedLeftTemplateColumns,d=e.pinnedLeftWidth,f=e.pinnedRightColumns,v=e.pinnedRightTemplateColumns,h=e.pinnedRightWidth,w=e.rowsToRender,p=e.setScrollTop,m=e.tableRows,g=G(),b=g.collapsedHeaders,C=g.headerContainerRef,y=g.headers,x=g.isAnimating,R=g.mainBodyRef,S=g.onLoadMore,N=g.rowHeight,A=g.rowIdAccessor,M=g.scrollbarWidth,E=g.setIsScrolling,T=g.shouldPaginate,H=g.tableBodyContainerRef,k=i(!1),F=k[0],D=k[1],O=a(new Set),P=l(function(n){O.current.forEach(function(n){return n.classList.remove("hovered")}),O.current.clear(),null!==n&&document.querySelectorAll('.st-body-container .st-row[data-index="'.concat(n,'"]')).forEach(function(n){n.classList.add("hovered"),O.current.add(n)})},[]);o(function(){x&&P(null)},[x,P]),function(n){var e=n.headerContainerRef,r=n.mainSectionRef,t=n.scrollbarWidth,a=i(!1),u=a[0],l=a[1];o(function(){var n=null==e?void 0:e.current;if(u&&n)return n.classList.add("st-header-scroll-padding"),n.style.setProperty("--st-after-width","".concat(t,"px")),function(){n.classList.remove("st-header-scroll-padding")}},[e,u,t]),o(function(){var n=null==r?void 0:r.current;if(n&&(null==e?void 0:e.current)){var t=function(){n&&l(n.scrollHeight>n.clientHeight)};t();var o=new ResizeObserver(function(){t()});return o.observe(n),function(){n&&o.unobserve(n)}}},[e,r])}({headerContainerRef:C,mainSectionRef:H,scrollbarWidth:M}),o(function(){return function(){W.current&&clearTimeout(W.current)}},[]);var B=a(null),W=a(null),q=a(0),z=function(n){return n.length}(m),j=z*(N+1)-1,U=u(function(){return zn({headers:y,pinnedLeftColumns:c,pinnedRightColumns:f,collapsedHeaders:b})},[y,c,f,b]),K=u(function(){var n={};return w.forEach(function(e,r){var t=L({row:e.row,rowIdAccessor:A})+"";n[t]=r}),n},[w,A]),J=l(function(n,e){!S||T||F||200>=n.scrollHeight-(e+n.clientHeight)&&e>q.current&&(D(!0),S(),setTimeout(function(){D(!1)},1e3))},[S,T,F]),V={columnIndices:U,headerContainerRef:C,headers:y,rowHeight:N,rowIndices:K,rowsToRender:w,setHoveredIndex:P};return r("div",I({className:"st-body-container",onMouseLeave:function(){return P(null)},onScroll:function(n){var e=n.currentTarget,r=e.scrollTop;E(!0),W.current&&clearTimeout(W.current),W.current=setTimeout(function(){E(!1)},150),B.current&&cancelAnimationFrame(B.current),B.current=requestAnimationFrame(function(){p(r),J(e,r),q.current=r})},ref:H},{children:[n(qn,I({},V,{pinned:"left",templateColumns:s,totalHeight:j,width:d})),n(qn,I({},V,{columnIndexStart:c.length,ref:R,templateColumns:t,totalHeight:j})),n(qn,I({},V,{columnIndexStart:c.length+t.length,pinned:"right",templateColumns:v,totalHeight:j,width:h}))]}))},Un=function(n){var e=n.event,r=n.header,t=n.headers,o=n.setHeaders,i=n.setIsResizing,a=n.startWidth,u=n.collapsedHeaders;e.preventDefault();var l="clientX"in e?e.clientX:e.touches[0].clientX,c="touches"in e;if(r&&!r.hide){i(!0);var s,d=P(r);if(r.children&&r.children.length>0){var f=F(r,u);s=f.length>0?f:[r]}else s=[r];var v=function(n){var e="right"===r.pinned?l-n:n-l,i=function(n){var e=n.header,r=n.headers,t=n.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth,a=i*N(window.innerWidth);if(!e.pinned)return Math.max(.6*i,600);var u=a-r.filter(function(n){return n.pinned===e.pinned&&n.accessor!==e.accessor}).reduce(function(n,e){return e.hide?n:n+F(e,t).reduce(function(n,e){return n+D(e)},0)},0),l=P(e);return l>u?(console.warn("Header ".concat(e.accessor," exceeds pinned section width limit")),l):u}({header:r,headers:t,collapsedHeaders:u});s.length>1?Gn({delta:e,leafHeaders:s,minWidth:d,startWidth:a,maxWidth:i}):s[0].width=Math.max(Math.min(a+e,i),d),t.forEach(function(n){O(n)});var c=R([],t,!0);o(c)};if(c){var h=function(n){v(n.touches[0].clientX)},w=function(){document.removeEventListener("touchmove",h),document.removeEventListener("touchend",w),i(!1)};document.addEventListener("touchmove",h),document.addEventListener("touchend",w)}else{var p=function(n){v(n.clientX)},m=function(){document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",m),i(!1)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",m)}}},Gn=function(n){var e=n.delta,r=n.leafHeaders,t=n.minWidth,o=n.startWidth,i=n.maxWidth,a=r.reduce(function(n,e){return Math.min(n,P(e))},40),u=r.reduce(function(n,e){return n+("number"==typeof e.width?e.width:150)},0),l=Math.max(Math.min(o+e,i),a)-u;r.forEach(function(n){var e="number"==typeof n.width?n.width:150;n.width=Math.max(e+l*(e/u),t)})},Kn={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"},Jn=function(n){switch(n){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},Vn=function(n){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(n)},_n=function(n){return["between","notBetween","in","notIn"].includes(n)},Xn=function(n){return["isEmpty","isNotEmpty"].includes(n)},Yn=function(e){return n("div",I({className:"st-filter-container"},{children:e.children}))},$n=function(e){var t=e.value,u=e.onChange,l=e.options,c=e.placeholder,s=void 0===c?"Select...":c,d=e.className,f=void 0===d?"":d,v=e.disabled,h=void 0!==v&&v,w=i(!1),p=w[0],m=w[1],g=i(-1),b=g[0],C=g[1],y=a(null),x=l.find(function(n){return n.value===t});return o(function(){var n=function(n){if(p)switch(n.key){case"ArrowDown":n.preventDefault(),C(function(n){return l.length-1>n?n+1:0});break;case"ArrowUp":n.preventDefault(),C(function(n){return n>0?n-1:l.length-1});break;case"Enter":n.preventDefault(),0>b||(u(l[b].value),m(!1),C(-1));break;case"Escape":n.preventDefault(),m(!1),C(-1)}};if(p)return document.addEventListener("keydown",n),function(){return document.removeEventListener("keydown",n)}},[p,b,l,u]),r("div",I({ref:y,className:"st-custom-select ".concat(f," ").concat(h?"st-custom-select-disabled":""," ").concat(p?"st-custom-select-open":"").trim()},{children:[r("button",I({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(m(!p),p)C(-1);else{var n=l.findIndex(function(n){return n.value===t});C(0>n?0:n)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":p,"aria-labelledby":"select-label"},{children:[n("span",I({className:"st-custom-select-value"},{children:x?x.label:s})),n(nn,{})]})),n(on,I({open:p,setOpen:m,onClose:function(){m(!1),C(-1)},positioning:"absolute",overflow:"auto"},{children:n("div",I({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(e,r){return n("div",I({className:"st-custom-select-option ".concat(e.value===t?"st-custom-select-option-selected":""," ").concat(r===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":e.value===t,onClick:function(){return u(e.value),m(!1),void C(-1)}},{children:e.label}),r)})}))}))]}))},Qn=function(e){var r=e.value,t=e.onChange,o=e.operators.map(function(n){return{value:n,label:Kn[n]}});return n("div",I({className:"st-filter-section"},{children:n($n,{value:r,onChange:function(n){t(n)},options:o})}))},Zn=function(e){var r=e.type,t=e.onChange,o=e.autoFocus,i=e.className,a=e.onEnterPress;return n("input",{type:void 0===r?"text":r,value:e.value,onChange:function(n){return t(n.target.value)},onKeyDown:function(n){"Enter"===n.key&&a&&a()},placeholder:e.placeholder,autoFocus:void 0!==o&&o,className:"st-filter-input ".concat(void 0===i?"":i).trim()})},ne=function(e){var r=e.children,t=e.className;return n("div",I({className:"st-filter-section ".concat(void 0===t?"":t).trim()},{children:r}))},ee=function(e){var t=e.onClear,o=e.canApply,i=e.showClear;return r("div",I({className:"st-filter-actions"},{children:[n("button",I({onClick:e.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled")},{children:"Apply"})),i&&t&&n("button",I({onClick:t,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},re=function(e){var t=e.header,a=e.currentFilter,u=e.onApplyFilter,l=e.onClearFilter,c=i((null==a?void 0:a.operator)||"contains"),s=c[0],d=c[1],f=i(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],w=Jn("string");o(function(){a?(d(a.operator),h((a.value||"")+"")):(d("contains"),h(""))},[a]);var p=function(){var n=I({accessor:t.accessor,operator:s},Vn(s)&&{value:v});u(n)},m=Xn(s)||v.trim();return r(Yn,{children:[n(Qn,{value:s,onChange:d,operators:w}),Vn(s)&&n(ne,{children:n(Zn,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:p})}),n(ee,{onApply:p,onClear:l,canApply:!!m,showClear:!!a})]})},te=function(e){var t,a,u=e.header,l=e.currentFilter,c=e.onApplyFilter,s=e.onClearFilter,d=i((null==l?void 0:l.operator)||"equals"),f=d[0],v=d[1],h=i(((null==l?void 0:l.value)||"")+""),w=h[0],p=h[1],m=i(((null===(t=null==l?void 0:l.values)||void 0===t?void 0:t[0])||"")+""),g=m[0],b=m[1],I=i(((null===(a=null==l?void 0:l.values)||void 0===a?void 0:a[1])||"")+""),C=I[0],y=I[1],x=Jn("number");o(function(){var n,e;l?(v(l.operator),p((l.value||"")+""),b(((null===(n=l.values)||void 0===n?void 0:n[0])||"")+""),y(((null===(e=l.values)||void 0===e?void 0:e[1])||"")+"")):(v("equals"),p(""),b(""),y(""))},[l]);var R=function(){var n={accessor:u.accessor,operator:f};Vn(f)?n.value=parseFloat(w):_n(f)&&(n.values=[parseFloat(""+g),parseFloat(""+C)]),c(n)};return r(Yn,{children:[n(Qn,{value:f,onChange:v,operators:x}),Vn(f)&&n(ne,{children:n(Zn,{type:"number",value:w,onChange:p,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),_n(f)&&r(ne,{children:[n(Zn,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),n(Zn,{type:"number",value:C,onChange:y,placeholder:"To...",onEnterPress:R})]}),n(ee,{onApply:R,onClear:s,canApply:!!Xn(f)||(Vn(f)?""!==w.trim():!!_n(f)&&""!==(g+"").trim()&&""!==(C+"").trim()),showClear:!!l})]})},oe=function(e){var r=e.className;return n($n,{value:e.value,onChange:e.onChange,options:e.options,className:void 0===r?"":r,placeholder:e.placeholder})},ie=function(e){var t=e.header,a=e.currentFilter,u=e.onApplyFilter,l=e.onClearFilter,c=i((null==a?void 0:a.operator)||"equals"),s=c[0],d=c[1],f=i(void 0!==(null==a?void 0:a.value)?a.value+"":"true"),v=f[0],h=f[1],w=Jn("boolean");o(function(){a?(d(a.operator),h(void 0!==a.value?a.value+"":"true")):(d("equals"),h("true"))},[a]);var p=Xn(s)||""!==v;return r(Yn,{children:[n(Qn,{value:s,onChange:d,operators:w}),Vn(s)&&n(ne,{children:n(oe,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),n(ee,{onApply:function(){var n={accessor:t.accessor,operator:s};Vn(s)&&(n.value="true"===v),u(n)},onClear:l,canApply:p,showClear:!!a})]})},ae=function(e){var t,u,l=e.header,c=e.currentFilter,s=e.onApplyFilter,d=e.onClearFilter,f=i((null==c?void 0:c.operator)||"equals"),v=f[0],h=f[1],w=i((null==c?void 0:c.value)?c.value+"":""),p=w[0],m=w[1],g=i((null===(t=null==c?void 0:c.values)||void 0===t?void 0:t[0])?c.values[0]+"":""),b=g[0],C=g[1],y=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),x=y[0],R=y[1],S=Jn("date");o(function(){var n,e;c?(h(c.operator),m((c.value||"")+""),C(((null===(n=c.values)||void 0===n?void 0:n[0])||"")+""),R(((null===(e=c.values)||void 0===e?void 0:e[1])||"")+"")):(h("equals"),m(""),C(""),R(""))},[c]);var N=function(e){var t=e.value,u=e.onChange,l=e.placeholder,c=e.autoFocus,s=e.className,d=i(!1),f=d[0],v=d[1],h=i(""),w=h[0],p=h[1],m=a(null);o(function(){if(t){var n=pn(t);isNaN(n.getTime())||p(n.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else p("")},[t]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=t?pn(t):new Date;return r("div",I({className:"st-date-input-container",style:{position:"relative"}},{children:[n("input",{ref:m,type:"text",value:w,placeholder:l,onClick:function(){v(!f)},onKeyDown:function(n){"Enter"===n.key||" "===n.key?(n.preventDefault(),v(!f)):"Escape"===n.key&&v(!1)},readOnly:!0,className:"st-filter-input ".concat(s||""),style:{cursor:"pointer"}}),n(on,I({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"visible"},{children:n(vn,{value:g,onChange:function(n){var e=n.toISOString().split("T")[0];u(e),v(!1)},onClose:function(){return v(!1)}})}))]}))};return r(Yn,{children:[n(Qn,{value:v,onChange:h,operators:S}),Vn(v)&&n(ne,{children:n(N,{value:p,onChange:m,placeholder:"Select date...",autoFocus:!0})}),_n(v)&&r(ne,{children:[n(N,{value:b,onChange:C,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),n(N,{value:x,onChange:R,placeholder:"To date..."})]}),n(ee,{onApply:function(){var n={accessor:l.accessor,operator:v};Vn(v)?n.value=p:_n(v)&&(n.values=[b,x]),s(n)},onClear:d,canApply:!!Xn(v)||(Vn(v)?""!==p.trim():!!_n(v)&&""!==b.trim()&&""!==x.trim()),showClear:!!c})]})},ue=function(e){var t=e.header,a=e.currentFilter,l=e.onApplyFilter,c=e.onClearFilter,s=u(function(){return t.enumOptions||[]},[t.enumOptions]),d=u(function(){return s.map(function(n){return n.value})},[s]),f=i((null==a?void 0:a.values)?a.values.map(String):d),v=f[0],h=f[1],w=i(""),p=w[0],m=w[1],g=u(function(){if(!p)return s;var n=p.toLowerCase();return s.filter(function(e){return e.label.toLowerCase().includes(n)})},[s,p]);o(function(){h(a?a.values?a.values.map(String):[]:d)},[a,d]);var b=s.length>10;return r(Yn,{children:[n(ne,{children:r("div",I({className:"st-enum-filter-options"},{children:[n("div",I({className:"st-enum-select-all"},{children:n(Hn,I({checked:v.length===d.length,onChange:function(n){h(n?d:[])}},{children:n("span",I({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&n("div",I({className:"st-enum-search"},{children:n(Zn,{type:"text",value:p,onChange:m,placeholder:"Search..."})})),g.map(function(e,r){return n(Hn,I({checked:v.includes(e.value),onChange:function(){return n=e.value,void h(function(e){return e.includes(n)?e.filter(function(e){return e!==n}):R(R([],e,!0),[n],!1)});var n}},{children:n("span",I({className:"st-enum-option-label"},{children:e.label}))}),r)}),p&&0===g.length&&n("div",I({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),n(ee,{onApply:function(){v.length!==d.length?l({accessor:t.accessor,operator:"in",values:v}):c()},onClear:c,canApply:0!==v.length&&v.length!==d.length,showClear:!!a})]})},le=function(r){var t=r.header,o=r.currentFilter,i=r.onApplyFilter,a=r.onClearFilter;return n(e,{children:function(){switch(t.type){case"number":return n(te,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return n(ie,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return n(ae,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return n(ue,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return n(re,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},ce=function(t){var u=t.content,l=t.children,c=t.delay,s=void 0===c?500:c,d=i(!1),f=d[0],v=d[1],w=i({top:0,left:0}),p=w[0],g=w[1],b=a(null),C=a(null);if(o(function(){return function(){b.current&&clearTimeout(b.current)}},[]),!u||!m(l))return n(e,{children:l});var y=h(l,{ref:C,onMouseEnter:function(){b.current=setTimeout(function(){if(C.current&&u.trim()){var n=C.current.getBoundingClientRect();if(n.width>0&&n.height>0){var e=n.left+n.width/2-100,r=n.bottom+8;8>e?e=8:e+200>window.innerWidth-8&&(e=window.innerWidth-200-8),r+40>window.innerHeight-8&&(r=n.top-40-8),g({top:r,left:e}),v(!0)}}},s)},onMouseLeave:function(){b.current&&(clearTimeout(b.current),b.current=null),v(!1)}});return r(e,{children:[y,f&&n("div",I({className:"st-tooltip",style:{position:"fixed",top:"".concat(p.top,"px"),left:"".concat(p.left,"px"),zIndex:1e4}},{children:u}))]})},se=function(e){var t,c,s=e.colIndex,d=e.gridColumnEnd,f=e.gridColumnStart,v=e.gridRowEnd,w=e.gridRowStart,p=e.header,m=e.reverse,g=e.sort,b=i(!1),C=b[0],y=b[1],x=i(!1),S=x[0],N=x[1],M=i(p.label||""),E=M[0],H=M[1],k=G(),F=k.activeHeaderDropdown,D=k.areAllRowsSelected,O=k.collapsedHeaders,P=k.columnBorders,B=k.columnReordering,L=k.columnResizing,W=k.columnsWithSelectedCells,q=k.draggedHeaderRef,z=k.enableHeaderEditing,j=k.filterIcon,U=k.handleApplyFilter,K=k.handleClearFilter,J=k.handleSelectAll,V=k.headerCollapseIcon,_=k.headerDropdown,X=k.headerExpandIcon,Y=k.headerRegistry,$=k.headers,Q=k.hoveredHeaderRef,Z=k.onColumnOrderChange,nn=k.onColumnSelect,en=k.onHeaderEdit,rn=k.onSort,tn=k.onTableHeaderDragEnd,an=k.headerHeight,un=k.selectColumns,cn=k.selectableColumns,sn=k.selectedColumns,dn=k.setActiveHeaderDropdown,vn=k.setCollapsedHeaders,hn=k.setHeaders,wn=k.setInitialFocusedCell,pn=k.setIsResizing,mn=k.setSelectedCells,gn=k.setSelectedColumns,bn=k.sortDownIcon,In=k.sortUpIcon,Cn=!!(null==p?void 0:p.isSortable),xn=!!(null==p?void 0:p.filterable),Rn=k.filters[p.accessor],Sn=(null==F?void 0:F.accessor)===p.accessor,Nn=p.isSelectionColumn&&k.enableRowSelection,An=function(n){var e;return!(!(null===(e=n.children)||void 0===e?void 0:e.length)||!n.collapsible)}(p),Mn=O.has(p.accessor),En=function(n){var e=n.isOpen,r=n.estimatedHeight,t=void 0===r?200:r,u=n.estimatedWidth,l=void 0===u?250:u,c=n.margin,s=void 0===c?4:c,d=a(null),f=i({}),v=f[0],h=f[1];return o(function(){if(e&&d.current){var n=function(){if(d.current){var n=d.current.getBoundingClientRect(),e=window.innerHeight-n.bottom,r=window.innerWidth-n.right,o="bottom",i={};t>e&&n.top>=t&&(o="top");var a="left";l>r+n.width&&(a="right"),"bottom"===o?i.top=n.bottom+s:i.bottom=window.innerHeight-n.top+s,"left"===a?i.left=n.left:i.right=window.innerWidth-n.right,h(i)}};requestAnimationFrame(n);var r=function(){return requestAnimationFrame(n)},o=function(){return requestAnimationFrame(n)};return window.addEventListener("resize",r),window.addEventListener("scroll",o,!0),function(){window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}h({})},[e,t,l,s]),{triggerRef:d,position:v}}({isOpen:Sn,estimatedHeight:200,estimatedWidth:250,margin:4}),kn=En.triggerRef,Fn=En.position,Dn=u(function(){var n,e,r;if(!P)return!1;var t=$.filter(function(n){return"left"===n.pinned}),o=$.filter(function(n){return!n.pinned}),i=$.filter(function(n){return"right"===n.pinned});return"left"===p.pinned?(null===(n=t[t.length-1])||void 0===n?void 0:n.accessor)===p.accessor:"right"===p.pinned?(null===(e=i[i.length-1])||void 0===e?void 0:e.accessor)===p.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===p.accessor},[P,$,p.accessor,p.pinned]),On=u(function(){return!(!cn||Nn)&&A(p,s).some(function(n){return sn.has(n)})},[cn,Nn,p,s,sn]),Pn=u(function(){return!Nn&&A(p,s).some(function(n){return W.has(n)})},[Nn,p,s,W]),Bn=u(function(){return!(!p.children||0===p.children.length)&&(!Mn||p.children.some(function(n){return"parentCollapsed"===n.showWhen||"always"===n.showWhen}))},[p.children,Mn]),Ln="st-header-cell ".concat(p.accessor===(null===(t=Q.current)||void 0===t?void 0:t.accessor)?"st-hovered":""," ").concat((null===(c=q.current)||void 0===c?void 0:c.accessor)===p.accessor?"st-dragging":""," ").concat(Cn?"clickable":""," ").concat(B&&!Cn?"columnReordering":""," ").concat(Bn?"parent":""," ").concat(Dn?"st-last-column":""," ").concat(z&&!Nn?"st-header-editable":""," ").concat(On?"st-header-selected":""," ").concat(Pn&&!On?"st-header-has-highlighted-cell":""),Wn=Tn({draggedHeaderRef:q,headers:$,hoveredHeaderRef:Q,onColumnOrderChange:Z,onTableHeaderDragEnd:tn}),qn=Wn.handleDragStart,zn=Wn.handleDragEnd,jn=Wn.handleDragOver,Gn=yn();o(function(){if(Y&&!p.isSelectionColumn){var n=p.accessor+"";return Y.set(n,{setEditing:function(n){N(n)}}),function(){Y.delete(n)}}},[Y,p.accessor,p.isSelectionColumn]),o(function(){H(p.label||"")},[p.label]);var Kn=l(function(n){H(n);var e=$.map(function(e){return e.accessor===p.accessor?I(I({},e),{label:n}):e});hn(e),en&&en(p,n)},[$,hn,en,p]),Jn=l(function(){dn&&dn(null)},[dn]),Vn=l(function(n){n.stopPropagation(),vn(function(n){var e=new Set(n);return Mn?e.delete(p.accessor):e.add(p.accessor),e})},[vn,Mn,p.accessor]),_n=function(n){var e=n.event,r=n.header;if(!r.isSelectionColumn){if(cn){var t=A(r,s),o=t.some(function(n){return sn.has(n)});if(z&&o&&!e.shiftKey)return _&&Sn&&Jn(),void N(!0);e.shiftKey&&un?gn(function(n){if(0===n.size)return new Set(t);var e=t[0],r=Array.from(n).sort(function(n,e){return n-e}),o=r[0],i=Math.abs(e-o);r.forEach(function(n){var r=Math.abs(e-n);i>r&&(i=r,o=n)});var a,u,l,c=R(R([],(l=Math.min(a=o,u=e),Array.from({length:Math.max(a,u)-l+1},function(n,e){return l+e})),!0),t,!0);return new Set(R(R([],Array.from(n),!0),c,!0))}):un&&un(t),mn(new Set),wn(null)}nn&&nn(r),!cn&&r.isSortable&&rn(r.accessor)}};if(o(function(){var n=function(n){n.preventDefault(),n.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",n),function(){document.removeEventListener("dragover",n)}},[]),!p)return null;var Xn=L&&!Nn&&n("div",I({className:"st-header-resize-handle-container",onMouseDown:function(n){var e,r=null===(e=document.getElementById(T({accessor:p.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Gn({callback:Un,callbackProps:{event:n.nativeEvent,gridColumnEnd:d,gridColumnStart:f,header:p,headers:$,setHeaders:hn,setIsResizing:pn,startWidth:r,collapsedHeaders:O},limit:10})},onTouchStart:function(n){var e,r=null===(e=document.getElementById(T({accessor:p.accessor,rowId:"header"})))||void 0===e?void 0:e.offsetWidth;Gn({callback:Un,callbackProps:{event:n,gridColumnEnd:d,gridColumnStart:f,header:p,headers:$,setHeaders:hn,setIsResizing:pn,startWidth:r,collapsedHeaders:O},limit:10})}},{children:n("div",{className:"st-header-resize-handle"})})),Yn=g&&g.key.accessor===p.accessor&&r("div",I({className:"st-icon-container",onClick:function(n){return _n({event:n,header:p})}},{children:["ascending"===g.direction&&In&&In,"descending"===g.direction&&bn&&bn]})),$n=xn&&j&&r("div",I({className:"st-icon-container",onClick:function(n){n.stopPropagation(),y(!C)}},{children:[h(j,{style:{fill:Rn?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),n(on,I({open:C,overflow:"visible",setOpen:y,onClose:function(){return y(!1)}},{children:n(le,{header:p,currentFilter:Rn,onApplyFilter:function(n){U(n),y(!1)},onClearFilter:function(){K(p.accessor),y(!1)}})}))]})),Qn=An&&!Nn&&n("div",I({className:"st-icon-container st-collapse-icon-container",onClick:Vn},{children:Mn?V:X}));return r(fn,I({className:Ln,id:T({accessor:p.accessor,rowId:"header"}),onDragOver:function(n){Nn||Gn({callback:jn,callbackProps:{event:n,hoveredHeader:p},limit:50})},style:I({gridRowStart:w,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:d},v-w>1?{}:{height:an})},{children:[m&&Xn,"right"===p.align&&Qn,"right"===p.align&&$n,"right"===p.align&&Yn,n("div",I({ref:kn,className:"st-header-label",draggable:B&&!p.disableReorder&&!Nn,onClick:function(n){Nn||_n({event:n,header:p})},onDoubleClick:function(n){Nn||function(n){var e=n.header;e.isSelectionColumn||cn&&e.isSortable&&rn(e.accessor)}({event:n,header:p})},onDragEnd:Nn?void 0:function(n){n.preventDefault(),zn()},onDragStart:Nn?void 0:function(n){B&&p&&function(n){qn(n)}(p)}},{children:n(ce,I({content:p.tooltip||""},{children:n("span",I({className:"st-header-label-text ".concat("right"===p.align?"right-aligned":"center"===p.align?"center-aligned":"left-aligned")},{children:Nn?n(Hn,{checked:!!D&&D(),onChange:function(n){J&&J(n)}}):S?n(ln,{defaultValue:E,onBlur:function(){return N(!1)},onChange:Kn}):p.headerRenderer?p.headerRenderer({accessor:p.accessor,colIndex:s,header:p}):E||(null==p?void 0:p.label)}))}))})),"right"!==p.align&&Yn,"right"!==p.align&&$n,"right"!==p.align&&Qn,!m&&Xn,_&&!Nn&&n("div",I({className:"st-header-dropdown-container"},{children:_({accessor:p.accessor,colIndex:s,header:p,isOpen:Sn,onClose:Jn,position:Fn})}))]}))},de=function(r){var t=r.columnIndices,o=r.gridTemplateColumns,i=r.handleScroll,a=r.headers,l=r.maxDepth,c=r.pinned,s=r.sectionRef,d=r.sort,f=r.width,v=G().collapsedHeaders,h=u(function(){var n=[],e=1,r=function(o,i,u){var s,d;if(void 0===u&&(u=!1),!H({header:o,pinned:c,headers:a,collapsedHeaders:v}))return 0;u||e++;var f=null!==(d=null===(s=o.children)||void 0===s?void 0:s.filter(function(n){return H({header:n,pinned:c,headers:a,collapsedHeaders:v})}).length)&&void 0!==d?d:0,h=e,w=f>0?h+f:h+1;if(n.push({header:o,gridColumnStart:h,gridColumnEnd:w,gridRowStart:i,gridRowEnd:f>0?i+1:l+1,colIndex:t[o.accessor]}),o.children&&o.children.length>0){var p=!0;o.children.forEach(function(n){H({header:n,pinned:c,headers:a,collapsedHeaders:v})&&(r(n,i+1,p),p=!1)})}return w-h},o=a.filter(function(n){return H({header:n,pinned:c,headers:a,collapsedHeaders:v})}),i=!0;return o.forEach(function(n){r(n,1,i),i=!1}),n},[a,l,c,t,v]);return n(Wn,I({childRef:s,group:c?"pinned-".concat(c):"default"},{children:n("div",I({className:"st-header-".concat(c?"pinned-".concat(c):"main")},i&&{onScroll:i},{ref:s,style:{gridTemplateColumns:o,width:f,position:"relative"}},{children:n(e,{children:h.map(function(e){return n(se,{colIndex:e.colIndex,gridColumnEnd:e.gridColumnEnd,gridColumnStart:e.gridColumnStart,gridRowEnd:e.gridRowEnd,gridRowStart:e.gridRowStart,header:e.header,reverse:"right"===c,sort:d},e.header.accessor)})})}))}))},fe=function(n){var e;return(null===(e=n.children)||void 0===e?void 0:e.length)?1+Math.max.apply(Math,n.children.map(fe)):1},ve=function(e){var t=e.centerHeaderRef,o=e.headers,i=e.mainTemplateColumns,a=e.pinnedLeftColumns,l=e.pinnedLeftTemplateColumns,c=e.pinnedRightColumns,s=e.pinnedRightTemplateColumns,d=e.sort,f=e.pinnedLeftWidth,v=e.pinnedRightWidth,h=G(),w=h.headerContainerRef,p=h.pinnedLeftRef,m=h.pinnedRightRef,g=h.collapsedHeaders,b=u(function(){return zn({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:g})},[o,a,c,g]),C=u(function(){var n=0,e=R(R(R([],a,!0),o,!0),c,!0);return o.forEach(function(r){if(H({header:r,headers:e,collapsedHeaders:g})){var t=fe(r);n=Math.max(n,t)}}),{maxDepth:n}},[o,a,c,g]).maxDepth;return r("div",I({className:"st-header-container",ref:w},{children:[Sn(o,"left")&&n(de,{columnIndices:b,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:C,pinned:"left",sectionRef:p,sort:d,width:f}),n(de,{columnIndices:b,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:C,sectionRef:t,sort:d}),Sn(o,"right")&&n(de,{columnIndices:b,gridTemplateColumns:s,handleScroll:void 0,headers:o,maxDepth:C,pinned:"right",sectionRef:m,sort:d,width:v})]}))},he=function(n){var e=n.collapsedHeaders,r=function(n){var t=n.flattenedHeaders;return n.headers.forEach(function(n){if(!n.hide)if(n.children&&n.children.length>0)if(e&&e.has(n.accessor)){var o=n.children.filter(function(n){return"parentCollapsed"===n.showWhen||"always"===n.showWhen});o.length>0?r({headers:o,flattenedHeaders:t}):t.push(n)}else{var i=n.children.filter(function(n){return"parentExpanded"===n.showWhen||"always"===n.showWhen||!n.showWhen});r({headers:i,flattenedHeaders:t})}else t.push(n)}),t},t=r({headers:n.headers,flattenedHeaders:[]});return"".concat(t.map(function(n){return function(n){var e=n.minWidth,r=n.width;return"number"==typeof r&&(r="".concat(r,"px")),e&&"number"==typeof e&&(e="".concat(e,"px")),void 0!==e?"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(e,", ").concat(r,")"):"max(".concat(e,", ").concat(r,")"):r}(n)}).join(" "))},we=function(e){var t=e.pinnedLeftWidth,o=e.pinnedRightWidth,i=e.setScrollTop,l=e.sort,c=e.tableRows,s=e.rowsToRender,d=G(),f=d.columnResizing,v=d.editColumns,h=d.headers,w=d.collapsedHeaders,p=a(null),m=h.filter(function(n){return!n.pinned}),g=h.filter(function(n){return"left"===n.pinned}),b=h.filter(function(n){return"right"===n.pinned}),C=u(function(){return he({headers:g,collapsedHeaders:w})},[g,w]),y=u(function(){return he({headers:m,collapsedHeaders:w})},[m,w]),x=u(function(){return he({headers:b,collapsedHeaders:w})},[b,w]),R={centerHeaderRef:p,headers:h,mainTemplateColumns:y,pinnedLeftColumns:g,pinnedLeftTemplateColumns:C,pinnedRightColumns:b,pinnedRightTemplateColumns:x,sort:l,pinnedLeftWidth:t,pinnedRightWidth:o},S={tableRows:c,mainTemplateColumns:y,pinnedLeftColumns:g,pinnedLeftTemplateColumns:C,pinnedLeftWidth:t,pinnedRightColumns:b,pinnedRightTemplateColumns:x,pinnedRightWidth:o,setScrollTop:i,rowsToRender:s};return r("div",I({className:"st-content ".concat(f?"st-resizeable":"st-not-resizeable"),style:{width:v?"calc(100% - 27.5px)":"100%"}},{children:[n(ve,I({},R)),n(jn,I({},S))]}))},pe=function(e){var t=e.mainBodyWidth,u=e.mainBodyRef,l=e.pinnedLeftWidth,c=e.pinnedRightWidth,s=e.pinnedLeftContentWidth,d=e.pinnedRightContentWidth,f=e.tableBodyContainerRef,v=G().editColumns,h=i(!1),w=h[0],p=h[1],m=a(null),g=a(null),b=a(null),C=v?28:0,y=(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&&p(t>u.current.clientWidth)},1)},[u,t]),w?r("div",I({className:"st-horizontal-scrollbar-container"},{children:[l>0&&n(Wn,I({childRef:g,group:"pinned-left"},{children:n("div",I({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:n("div",{style:{width:s}})}))})),t>0&&n(Wn,I({childRef:m},{children:n("div",I({className:"st-horizontal-scrollbar-middle",ref:m},{children:n("div",{style:{width:t}})}))})),c>0&&n(Wn,I({childRef:b,group:"pinned-right"},{children:n("div",I({className:"st-horizontal-scrollbar-right",ref:b,style:{width:y}},{children:n("div",{style:{width:d}})}))})),C>0&&n("div",{style:{width:C-1.5,height:"100%",flexShrink:0}})]})):null},me={string:function(n,e,r){if(n===e)return 0;var t=n.localeCompare(e);return"ascending"===r?t:-t},number:function(n,e,r){if(n===e)return 0;var t=n-e;return"ascending"===r?t:-t},boolean:function(n,e,r){if(n===e)return 0;var t=n===e?0:n?-1:1;return"ascending"===r?t:-t},date:function(n,e,r){var t=new Date(n),o=new Date(e);if(t.getTime()===o.getTime())return 0;var i=t.getTime()-o.getTime();return"ascending"===r?i:-i},enum:function(n,e,r){return me.string(n,e,r)},default:function(n,e,r){return n===e?0:null==n?"ascending"===r?-1:1:null==e?"ascending"===r?1:-1:"string"==typeof n&&"string"==typeof e?me.string(n,e,r):"number"==typeof n&&"number"==typeof e?me.number(n,e,r):"boolean"==typeof n&&"boolean"==typeof e?me.boolean(n,e,r):me.string(n+"",e+"",r)}},ge=function(n){return function(n){var e=n.rows,r=n.sortColumn,t=function(n,e){for(var r=0,o=n;o.length>r;r++){var i=o[r];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=t(i.children,e);if(a)return a}}},o=t(n.headers,r.key.accessor),i=(null==o?void 0:o.type)||"string",a=r.direction;return R([],e,!0).sort(function(n,e){var t=r.key.accessor;return function(n,e,r,t){if(void 0===r&&(r="string"),null==n||""===n)return"ascending"===t?-1:1;if(null==e||""===e)return"ascending"===t?1:-1;if("number"===r){var o=function(n){var e;if("number"==typeof n)return n;var r=n+"";if("string"==typeof r){var t=r.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(t){var o=parseFloat(t[1]),i=null===(e=t[2])||void 0===e?void 0:e.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(r)||0},i=o(n),a=o(e);return me.number(i,a,t)}return"date"===r?me.date(n+"",e+"",t):"boolean"===r?me.boolean(!!n,!!e,t):"enum"===r?me.enum(n+"",e+"",t):me.string(n+"",e+"",t)}(n[t],e[t],i,a)})}({rows:n.rows,sortColumn:n.sortColumn,headers:n.headers})},be=function(n){var e=n.tableRows,r=n.sortColumn,t=n.rowGrouping,o=n.headers;return n.externalSortHandling?e:r?t&&t.length>0?(0,n.sortNestedRows)({groupingKeys:t,headers:o,rows:e,sortColumn:r}):ge({headers:o,rows:e,sortColumn:r}):e},Ie=function(n,e,r){void 0===r&&(r=new Set);for(var t=0,o=n;o.length>t;t++){var i=o[t];if(!r.has(i.accessor)&&(r.add(i.accessor),i.children&&i.children.length>0)){var a=i.children.some(function(n){return n.accessor===e}),u=!1;if(!a)for(var l=0,c=i.children;c.length>l;l++){var s=c[l];if(Ie([s],e,r),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},Ce=function(n){return n.every(function(n){return n.hide})},ye=function(n){n.forEach(function(n){n.children&&n.children.length>0&&(ye(n.children),Ce(n.children)&&(n.hide=!0))})},xe=function(t){var o=t.allHeaders,a=t.depth,u=void 0===a?0:a,l=t.doesAnyHeaderHaveChildren,c=t.header,s=t.isCheckedOverride,d=i(!0),f=d[0],v=d[1],h=G(),w=h.expandIcon,p=h.headers,m=h.setHeaders,g=l?"".concat(16*u,"px"):"8px",b=c.children&&c.children.length>0,C=null!=s?s:c.hide||b&&c.children&&Ce(c.children);return r(e,{children:[r("div",I({className:"st-header-checkbox-item",style:{paddingLeft:g}},{children:[l&&n("div",I({className:"st-header-icon-container"},{children:b?n("div",I({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(n){n.stopPropagation(),v(!f)}},{children:w})):null})),n(Hn,I({checked:C,onChange:function(n){c.hide=n,n?ye(o):(Ie(o,c.accessor),b&&c.children&&c.children.length>0&&c.children.every(function(n){return!0===n.hide})&&c.children[0]&&(c.children[0].hide=!1,Ie(o,c.children[0].accessor))),m(R([],p,!0))}},{children:c.label}))]})),b&&f&&c.children&&n("div",I({className:"st-nested-headers"},{children:c.children.map(function(e,r){return n(xe,{allHeaders:o,depth:u+1,doesAnyHeaderHaveChildren:l,header:e,isCheckedOverride:!!C||void 0},"".concat(e.accessor,"-").concat(r))})}))]})},Re=function(e){var r=e.headers,t=e.open,o="left"===e.position?"left":"",i=u(function(){return r.some(function(n){return n.children&&n.children.length>0})},[r]);return n("div",I({className:"st-column-editor-popout ".concat(t?"open":""," ").concat(o),onClick:function(n){return n.stopPropagation()}},{children:n("div",I({className:"st-column-editor-popout-content"},{children:r.map(function(e,t){return e.isSelectionColumn?null:n(xe,{doesAnyHeaderHaveChildren:i,header:e,allHeaders:r},"".concat(e.accessor,"-").concat(t))})}))}))},Se=function(e){var t=e.columnEditorText,o=e.editColumns,a=e.headers,u=e.position,l=void 0===u?"right":u,c=i(e.editColumnsInitOpen),s=c[0],d=c[1];return o?r("div",I({className:"st-column-editor ".concat(s?"open":""," ").concat(l),onClick:function(){return function(n){d(n)}(!s)},style:{width:28}},{children:[n("div",I({className:"st-column-editor-text"},{children:t})),n(Re,{headers:a,open:s,position:l})]})):null},Ne=function(e){var r=e.children,o=a({}),i=l(function(n,e){return!!o.current[e]&&o.current[e].find(function(e){return e===n})},[]),u=l(function(n,e){n.scrollWidth-n.clientWidth>0&&(e.scrollLeft=n.scrollLeft)},[]),c=l(function(n){n.onscroll=null},[]),s=l(function(n,e){n.onscroll=function(){window.requestAnimationFrame(function(){e.forEach(function(e){var r;null===(r=o.current[e])||void 0===r||r.forEach(function(e){n!==e&&(c(e),u(n,e),window.requestAnimationFrame(function(){var n=Object.keys(o.current).filter(function(n){return o.current[n].includes(e)});s(e,n)}))})})})}},[c,u]),d=l(function(n,e){e.forEach(function(e){o.current[e]||(o.current[e]=[]),i(n,e)||(o.current[e].length>0&&u(o.current[e][0],n),o.current[e].push(n))}),s(n,e)},[i,u,s]),f=l(function(n,e){e.forEach(function(e){if(i(n,e)){c(n);var r=o.current[e].indexOf(n);-1!==r&&o.current[e].splice(r,1)}})},[i,c]);return n(Ln.Provider,I({value:{registerPane:d,unregisterPane:f}},{children:t.Children.only(r)}))},Ae=function(n){var e=n.tableRows,r=n.filterState;return n.externalFilterHandling?e:r&&0!==Object.keys(r).length?e.filter(function(n){return Object.values(r).every(function(e){try{return function(n,e){var r=e.operator,t=e.value,o=e.values;if(null==n)return"isEmpty"===r;if("isEmpty"===r)return!n||""===(n+"").trim();if("isNotEmpty"===r)return n&&""!==(n+"").trim();if("string"==typeof n||"contains"===r||"notContains"===r||"startsWith"===r||"endsWith"===r){var i=(n+"").toLowerCase(),a=t?(t+"").toLowerCase():"";switch(r){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof n||!isNaN(+n)){var u=+n,l=+t;switch(r){case"equals":return u===l;case"notEquals":return u!==l;case"greaterThan":return u>l;case"lessThan":return l>u;case"greaterThanOrEqual":return u>=l;case"lessThanOrEqual":return l>=u;case"between":if(o&&2===o.length){var c=o.map(Number),s=c[1];return u>=c[0]&&s>=u}return!1;case"notBetween":if(o&&2===o.length){var d=o.map(Number);return s=d[1],d[0]>u||u>s}return!0}}if(n instanceof Date||!isNaN(Date.parse(n))){var f=pn(n),v=pn((t||"")+""),h=wn(f),w=wn(v);switch(r){case"equals":return h.getTime()===w.getTime();case"notEquals":return h.getTime()!==w.getTime();case"before":return w>h;case"after":return h>w;case"between":if(o&&2===o.length){var p=o.map(function(n){return wn(pn((n||"")+""))}),m=p[1];return h>=p[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(n){return wn(pn((n||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof n&&"equals"===r)return n===!!t;if(Array.isArray(n)){var b=n.map(function(n){return"object"==typeof n&&null!==n?JSON.stringify(n):n+""}).join(", ");n=b}if("in"===r||"notIn"===r){if(o&&Array.isArray(o)){var I=o.includes(n+"");return"in"===r?I:!I}return!1}var C=(n+"").toLowerCase(),y=t?(t+"").toLowerCase():"";switch(r){case"equals":return C===y;case"notEquals":return C!==y;default:return!0}}(n[e.accessor],e)}catch(n){return console.warn("Filter error for accessor ".concat(e.accessor,":"),n),!0}})}):e},Me=function(n,e,r,t){var o=[],i=function(n){n.forEach(function(n){var r=t?n[t]:void 0;t&&r&&B(r)?i(r):null!=n[e]&&o.push(n[e])})};if(i(n),0!==o.length){if("custom"===r.type&&r.customFn)return r.customFn(o);var a,u=r.parseValue?o.map(r.parseValue).filter(function(n){return!isNaN(n)}):o.map(function(n){return"number"==typeof n?n:"string"==typeof n?parseFloat(n):NaN}).filter(function(n){return!isNaN(n)});if(0===u.length)return"count"===r.type?o.length:void 0;switch(r.type){case"sum":a=u.reduce(function(n,e){return n+e},0);break;case"average":a=u.reduce(function(n,e){return n+e},0)/u.length;break;case"count":a=o.length;break;case"min":a=Math.min.apply(Math,u);break;case"max":a=Math.max.apply(Math,u);break;default:return}return r.formatResult?r.formatResult(a):a}},Ee=function(n){if(null==n)return"";var e=n+"";if(e.includes(",")||e.includes('"')||e.includes("\n")||e.includes("\r")){var r=e.replace(/"/g,'""');return'"'.concat(r,'"')}return e},Te=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},He={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}},ke=function(n){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.top="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating")},Fe=function(n,e,r,t){return void 0===r&&(r={}),new Promise(function(t){n.style.transition="transform ".concat(e.duration,"ms ").concat(e.easing),e.delay&&(n.style.transitionDelay="".concat(e.delay,"ms")),n.style.transform="translate3d(0, 0, 0)";var o=function(){ke(n),n.removeEventListener("transitionend",o),r.onComplete&&r.onComplete(),t()};n.addEventListener("transitionend",o),setTimeout(o,e.duration+(e.delay||0)+50)})},De=function(n){var e=n.element,r=n.finalConfig,t=n.fromBounds,o=n.toBounds;return y(void 0,void 0,void 0,function(){var n,i;return x(this,function(a){switch(a.label){case 0:return n=function(n,e){return{x:("x"in n?n.x:n.left)-e.x,y:("y"in n?n.y:n.top)-e.y}}(t,o),0===n.x&&0===n.y||Te()&&!1!==r.respectReducedMotion?[2]:(u=r,l=Math.abs(n.x)>Math.abs(n.y)?"column":"row",void 0===u&&(u={}),i=Te()?I(I({},He.REDUCED_MOTION),u):I(I({},"column"===l?He.COLUMN_REORDER:He.ROW_REORDER),u),ke(e),function(n,e){n.style.transform="translate3d(".concat(e.x,"px, ").concat(e.y,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating")}(e,n),[4,Fe(e,i,r)]);case 1:return a.sent(),[2]}var u,l})})},Oe=function(n){var e=n.element,r=n.options;return y(void 0,void 0,void 0,function(){var n,t,o,i,a,u,l,c,s,d,f,v,h,w,p,m;return x(this,function(g){return n=r.startY,t=r.endY,o=r.finalY,a=void 0===(i=r.duration)?300:i,l=void 0===(u=r.easing)?"cubic-bezier(0.2, 0.0, 0.2, 1)":u,s=void 0===(c=r.delay)?0:c,d=r.onComplete,v=void 0===(f=r.respectReducedMotion)||f,Te()&&v?(void 0!==o&&(e.style.transform="",e.style.top="".concat(o,"px")),d&&d(),[2]):(h=e.getBoundingClientRect(),p=n-(w=h.top),m=t-w,[2,new Promise(function(n){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating"),e.style.transform="translate3d(0, ".concat(p,"px, 0)"),e.style.transition="none",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.classList.add("st-animating"),e.style.transition="transform ".concat(a,"ms ").concat(l),s&&(e.style.transitionDelay="".concat(s,"ms")),e.style.transform="translate3d(0, ".concat(m,"px, 0)");var r=function(){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating"),void 0!==o&&(e.style.top="".concat(o,"px")),e.removeEventListener("transitionend",r),d&&d(),n()};e.addEventListener("transitionend",r),setTimeout(r,a+(s||0)+50)})])})})},Pe=function(e){var r=i(!1),t=r[0],a=r[1];return o(function(){a(!0)},[]),t?n(Be,I({},e)):null},Be=function(e){var t=e.allowAnimations,c=void 0!==t&&t,s=e.cellUpdateFlash,d=void 0!==s&&s,f=e.className,v=e.columnBorders,h=void 0!==v&&v,w=e.columnEditorPosition,p=void 0===w?"right":w,m=e.columnEditorText,C=void 0===m?"Columns":m,S=e.columnReordering,A=void 0!==S&&S,T=e.columnResizing,H=void 0!==T&&T,O=e.defaultHeaders,P=e.editColumns,W=void 0!==P&&P,j=e.editColumnsInitOpen,G=void 0!==j&&j,J=e.enableHeaderEditing,X=void 0!==J&&J,$=e.enableRowSelection,nn=void 0!==$&&$,rn=e.expandAll,tn=void 0===rn||rn,on=e.expandIcon,an=void 0===on?n(_,{className:"st-expand-icon"}):on,un=e.externalFilterHandling,ln=void 0!==un&&un,cn=e.externalSortHandling,sn=void 0!==cn&&cn,dn=e.filterIcon,fn=void 0===dn?n(Z,{className:"st-header-icon"}):dn,vn=e.footerRenderer,hn=e.headerCollapseIcon,wn=void 0===hn?n(_,{className:"st-header-icon"}):hn,pn=e.headerExpandIcon,mn=void 0===pn?n(V,{className:"st-header-icon"}):pn,gn=e.headerDropdown,bn=e.headerHeight,In=e.height,Cn=e.hideFooter,yn=void 0!==Cn&&Cn,Rn=e.isLoading,Sn=void 0!==Rn&&Rn,Nn=e.nextIcon,An=void 0===Nn?n(_,{className:"st-next-prev-icon"}):Nn,Mn=e.onCellEdit,En=e.onCellClick,Tn=e.onColumnOrderChange,Hn=e.onColumnSelect,kn=e.onFilterChange,Fn=e.onGridReady,Dn=e.onHeaderEdit,On=e.onLoadMore,Pn=e.onNextPage,Bn=e.onPageChange,Ln=e.onRowSelectionChange,Wn=e.onSortChange,qn=e.prevIcon,zn=void 0===qn?n(V,{className:"st-next-prev-icon"}):qn,jn=e.rowButtons,Un=e.rowGrouping,Gn=e.rowHeight,Kn=void 0===Gn?32:Gn,Jn=e.rowIdAccessor,Vn=e.rows,_n=e.selectionColumnWidth,Xn=void 0===_n?42:_n,Yn=e.rowsPerPage,$n=void 0===Yn?10:Yn,Qn=e.selectableCells,Zn=void 0!==Qn&&Qn,ne=e.selectableColumns,ee=void 0!==ne&&ne,re=e.serverSidePagination,te=void 0!==re&&re,oe=e.shouldPaginate,ie=void 0!==oe&&oe,ae=e.sortDownIcon,ue=void 0===ae?n(Q,{className:"st-header-icon"}):ae,le=e.sortUpIcon,ce=void 0===le?n(Y,{className:"st-header-icon"}):le,se=e.tableRef,de=e.theme,fe=void 0===de?"light":de,ve=e.totalRowCount,he=e.useHoverRowBackground,me=void 0===he||he,Ie=e.useOddEvenRowBackground,Ce=void 0!==Ie&&Ie,ye=e.useOddColumnBackground,xe=void 0!==ye&&ye;xe&&(Ce=!1),h&&(me=!1);var Re=u(function(){if(Sn){var n=Array.from({length:ie?$n:10},function(n,e){var r;return(r={})[Jn]="loading-".concat(e),r});return n}return Vn},[Sn,Vn,Jn,$n]),Te=b(function(n){return n+1},0)[1],ke=a(null),Fe=a(null),De=a(null),Oe=a(null),Pe=a(null),Be=a(null),Le=a(null),We=i(1),qe=We[0],ze=We[1],je=i(O),Ue=je[0],Ge=je[1],Ke=i(!1),Je=Ke[0],Ve=Ke[1],_e=i(!1),Xe=_e[0],Ye=_e[1],$e=i(null),Qe=$e[0],Ze=$e[1],nr=i(new Set),er=nr[0],rr=nr[1];o(function(){Ge(O)},[O]);var tr=function(n){var e=n.rows,r=n.rowIdAccessor,t=n.onRowSelectionChange,o=n.enableRowSelection,a=void 0!==o&&o,c=i(new Set),s=c[0],d=c[1],f=l(function(n){return!!a&&function(n,e){return e.has(n)}(n,s)},[s,a]),v=l(function(){return!!a&&function(n,e,r){return 0!==n.length&&n.every(function(n){return r.has(n[e]+"")})}(e,r,s)},[e,r,s,a]),h=u(function(){return a?function(n){return n.size}(s):0},[s,a]),w=u(function(){return a?function(n,e,r){return n.filter(function(n){return r.has(n[e]+"")})}(e,r,s):[]},[e,r,s,a]),p=l(function(n,o){if(a){var i=function(n,e){var r=new Set(e);return r.has(n)?r.delete(n):r.add(n),r}(n,s);if(d(i),t){var u=e.find(function(e){return e[r]+""===n});u&&t({row:u,isSelected:o,selectedRows:i})}}},[s,e,r,t,a]),m=l(function(n){var o;a&&(n?(o=function(n,e){return new Set(n.map(function(n){return n[e]+""}))}(e,r),t&&e.forEach(function(n){return t({row:n,isSelected:!0,selectedRows:o})})):(o=new Set,t&&s.forEach(function(n){var i=e.find(function(e){return e[r]+""===n});i&&t({row:i,isSelected:!1,selectedRows:o})})),d(o))},[e,r,t,s,a]),g=l(function(n){if(a){var e=f(n);p(n,!e)}},[f,p,a]),b=l(function(){if(a){if(t){var n=new Set;s.forEach(function(o){var i=e.find(function(n){return n[r]+""===o});i&&t({row:i,isSelected:!1,selectedRows:n})})}d(new Set)}},[s,e,r,t,a]);return{selectedRows:s,setSelectedRows:d,isRowSelected:f,areAllRowsSelected:v,selectedRowCount:h,selectedRowsData:w,handleRowSelect:p,handleSelectAll:m,handleToggleRow:g,clearSelection:b}}({rows:Re,rowIdAccessor:Jn,onRowSelectionChange:Ln,enableRowSelection:nn}),or=tr.selectedRows,ir=tr.setSelectedRows,ar=tr.isRowSelected,ur=tr.areAllRowsSelected,lr=tr.selectedRowCount,cr=tr.selectedRowsData,sr=tr.handleRowSelect,dr=tr.handleSelectAll,fr=tr.handleToggleRow,vr=tr.clearSelection,hr=u(function(){var n,e=R([],Ue,!0);return nn&&!(null===(n=null==Ue?void 0:Ue[0])||void 0===n?void 0:n.isSelectionColumn)&&(e=R([{accessor:"__row_selection__",label:"",width:Xn,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],e,!0)),e},[nn,Ue,Xn]),wr=i(0),pr=wr[0],mr=wr[1],gr=i(new Set),br=gr[0],Ir=gr[1],Cr=function(n){var e=n.tableBodyContainerRef,r=i(0),t=r[0],o=r[1];return g(function(){e.current&&o(e.current.offsetWidth-e.current.clientWidth)},[e]),{setScrollbarWidth:o,scrollbarWidth:t,tableBodyContainerRef:e}}({tableBodyContainerRef:Be}),yr=Cr.scrollbarWidth,xr=Cr.setScrollbarWidth,Rr=i(0),Sr=Rr[0],Nr=Rr[1];g(function(){var n=function(){Be.current&&Nr(Be.current.clientWidth)};n();var e=null;return Be.current&&(e=new ResizeObserver(n)).observe(Be.current),function(){e&&e.disconnect()}},[]);var Ar=u(function(){var n=N(window.innerWidth),e=function(n){var e=n.containerWidth,r=n.maxPinnedWidthPercent,t=void 0===r?.8:r,o=n.collapsedHeaders,i=0,a=0,u=0;n.headers.forEach(function(n){if(!n.hide){var e=F(n,o).reduce(function(n,e){return n+D(e)},0);"left"===n.pinned?i+=e:"right"===n.pinned?a+=e:u+=e}});var l=i,c=a;if(e&&e>0){var s=e*t;i>s&&(i=s),a>s&&(a=s)}return{leftWidth:E(i),rightWidth:E(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}}({headers:hr,containerWidth:Sr,maxPinnedWidthPercent:n,collapsedHeaders:er});return{mainBodyWidth:e.mainWidth,pinnedLeftWidth:e.leftWidth,pinnedRightWidth:e.rightWidth,pinnedLeftContentWidth:e.leftContentWidth,pinnedRightContentWidth:e.rightContentWidth}},[hr,Sr,er]),Mr=Ar.mainBodyWidth,Er=Ar.pinnedLeftWidth,Tr=Ar.pinnedRightWidth,Hr=Ar.pinnedLeftContentWidth,kr=Ar.pinnedRightContentWidth,Fr=function(n){var e=n.height,r=n.rowHeight,t=n.shouldPaginate,o=n.rowsPerPage;return u(function(){var n;if(!e&&t&&o)return r*(o+1);if(!e)return window.innerHeight-r;var i,a=document.querySelector(".simple-table-root");return i="string"==typeof e?e.endsWith("px")?parseInt(e,10):e.endsWith("vh")?window.innerHeight*parseInt(e,10)/100:e.endsWith("%")?((null===(n=null==a?void 0:a.parentElement)||void 0===n?void 0:n.clientHeight)||window.innerHeight)*parseInt(e,10)/100:window.innerHeight:e,Math.max(0,i-r)},[e,r,t,o])}({height:In,rowHeight:Kn,shouldPaginate:ie,rowsPerPage:$n}),Dr=function(n){var e=n.rows,r=n.headers,t=n.rowGrouping;return u(function(){if(!t||0===t.length)return e;var n=function(n){return M(n).filter(function(n){return n.aggregation})}(r);if(0===n.length)return e;var o=JSON.parse(JSON.stringify(e)),i=function(e,r){return void 0===r&&(r=0),e.map(function(e){var o=t[r],a=t[r+1],u=e[o];if(u&&B(u)){var l=i(u,r+1),c=I({},e);return c[o]=l,n.forEach(function(n){var e=Me(l,n.accessor,n.aggregation,a);void 0!==e&&(c[n.accessor]=e)}),c}return e})};return i(o)},[e,r,t])}({rows:Re,headers:Ue,rowGrouping:Un}),Or=function(n){var e=n.rows,r=n.externalFilterHandling,t=n.onFilterChange,o=i({}),a=o[0],c=o[1],s=u(function(){return Ae({externalFilterHandling:r,tableRows:e,filterState:a})},[e,a,r]),d=l(function(n){var e,r=I(I({},a),((e={})[n.accessor]=n,e));c(r),null==t||t(r)},[a,t]),f=l(function(n){var e=I({},a);delete e[n],c(e),null==t||t(e)},[a,t]),v=l(function(){c({}),null==t||t({})},[t]),h=l(function(n){var t,o=I(I({},a),((t={})[n.accessor]=n,t));return Ae({externalFilterHandling:r,tableRows:e,filterState:o})},[a,e,r]);return{filteredRows:s,updateFilter:d,clearFilter:f,clearAllFilters:v,filters:a,computeFilteredRowsPreview:h}}({rows:Dr,externalFilterHandling:ln,onFilterChange:kn}),Pr=Or.filters,Br=Or.updateFilter,Lr=Or.clearFilter,Wr=Or.clearAllFilters,qr=Or.computeFilteredRowsPreview,zr=function(n){var e=n.headers,r=n.tableRows,t=n.externalSortHandling,o=n.onSortChange,a=n.rowGrouping,c=i(null),s=c[0],d=c[1],f=l(function(n){var e=n.groupingKeys,r=n.headers,t=n.sortColumn,o=ge({headers:r,rows:n.rows,sortColumn:t});return e&&0!==e.length?o.map(function(n){var o,i=e[0],a=n[i];if(B(a)){var u=f({rows:a,sortColumn:t,headers:r,groupingKeys:e.slice(1)});return I(I({},n),((o={})[i]=u,o))}return n}):o},[]),v=u(function(){return be({externalSortHandling:t,tableRows:r,sortColumn:s,rowGrouping:a,headers:e,sortNestedRows:f})},[r,s,e,t,a,f]),h=l(function(n){var r=function(e){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);if(a)return a}}},t=r(e);if(t){var i=null;s&&s.key.accessor===n?"ascending"===s.direction&&(i={key:t,direction:"descending"}):i={key:t,direction:"ascending"},d(i),null==o||o(i)}},[s,e,o]),w=l(function(n){var o=function(e){for(var r=0,t=e;t.length>r;r++){var i=t[r];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=o(i.children);if(a)return a}}},i=o(e);if(!i)return r;var u=null;return s&&s.key.accessor===n?"ascending"===s.direction&&(u={key:i,direction:"descending"}):u={key:i,direction:"ascending"},be({externalSortHandling:t,tableRows:r,sortColumn:u,rowGrouping:a,headers:e,sortNestedRows:f})},[s,e,r,t,a,f]);return{sort:s,sortedRows:v,updateSort:h,computeSortedRowsPreview:w}}({headers:Ue,tableRows:Or.filteredRows,externalSortHandling:sn,onSortChange:Wn,rowGrouping:Un}),jr=zr.sort,Ur=zr.sortedRows,Gr=zr.updateSort,Kr=function(n){var e=n.allowAnimations,r=n.sortedRows,t=n.originalRows,o=n.currentPage,c=n.rowsPerPage,s=n.shouldPaginate,d=n.serverSidePagination,f=n.rowGrouping,v=n.rowIdAccessor,h=n.unexpandedRows,w=n.expandAll,p=n.contentHeight,m=n.rowHeight,b=n.scrollTop,C=n.computeFilteredRowsPreview,y=n.computeSortedRowsPreview,x=i(!1),S=x[0],N=x[1],A=i([]),M=A[0],E=A[1],T=a([]),H=a([]),k=a(new Map),F=a(null),D=l(function(n){var e=s&&!d?n.slice((o-1)*c,o*c):n,r=s?(o-1)*c:0;return f&&0!==f.length?function(n){var e=n.depth,r=n.expandAll,t=void 0!==r&&r,o=n.unexpandedRows,i=n.rowGrouping,a=void 0===i?[]:i,u=n.rowIdAccessor,l=n.displayPositionOffset,c=void 0===l?0:l,s=[],d=function(n,e,r,i){void 0===r&&(r=0),void 0===i&&(i=c);var l=r,f=i;return n.forEach(function(r,i){var c=L({row:r,rowIdAccessor:u}),v=a[e];s.push({row:r,depth:e,displayPosition:f,groupingKey:v,position:l,isLastGroupRow:0===e&&i===n.length-1}),l++,f++;var h=c+"";if((t?!o.has(h):o.has(h))&&a.length>e){var w=function(n,e){var r=n[e];return B(r)?r:[]}(r,v);w.length>0&&(l=d(w,e+1,l,f))}}),l};return d(n.rows,void 0===e?0:e,0,c),s}({rows:e,rowGrouping:f,rowIdAccessor:v,unexpandedRows:h,expandAll:w,displayPositionOffset:r}):e.map(function(n,e){return{row:n,depth:0,displayPosition:r+e,groupingKey:void 0,position:e,isLastGroupRow:!1}})},[o,c,s,d,f,v,h,w]);u(function(){if(0===k.current.size){var n=D(t),e=new Map;n.forEach(function(n){var r=L({row:n.row,rowIdAccessor:v})+"";e.set(r,n.position)}),k.current=e}},[t,D,v]);var O=u(function(){return D(r)},[r,D]),P=u(function(){return en({bufferRowCount:5,contentHeight:p,tableRows:O,rowHeight:m,scrollTop:b})},[O,p,m,b]),W=l(function(n,e){var r=new Set(n.map(function(n){return L({row:n.row,rowIdAccessor:v})+""})),t=new Set(e.map(function(n){return L({row:n.row,rowIdAccessor:v})+""}));return{staying:e.filter(function(n){var e=L({row:n.row,rowIdAccessor:v})+"";return r.has(e)}),entering:e.filter(function(n){var e=L({row:n.row,rowIdAccessor:v})+"";return!r.has(e)}),leaving:n.filter(function(n){var e=L({row:n.row,rowIdAccessor:v})+"";return!t.has(e)})}},[v]),q=u(function(){if(0===T.current.length)return!1;var n=O.map(function(n){return L({row:n.row,rowIdAccessor:v})+""}),e=T.current.map(function(n){return L({row:n.row,rowIdAccessor:v})+""});return n.length!==e.length||!n.every(function(n,r){return n===e[r]})},[O,v]);g(function(){if(!S){if(!e||s)return E([]),T.current=O,void(H.current=P);if(0===T.current.length)return E([]),T.current=O,void(H.current=P);if(!q)return E([]),T.current=O,void(H.current=P);F.current={tableRows:O,visibleRows:P},N(!0)}},[e,O,q,S,s,P]),g(function(){if(S&&F.current&&M.length>0){var n=setTimeout(function(){var n=F.current;N(!1),E([]),T.current=n.tableRows,H.current=n.visibleRows,F.current=null},He.ROW_REORDER.duration+100);return function(){return clearTimeout(n)}}},[S,M.length]);var z=u(function(){if(!e||s)return P;if(M.length>0){var n=new Map,r=new Map;return O.forEach(function(e){var t=L({row:e.row,rowIdAccessor:v})+"";n.set(t,e.position),r.set(t,e.displayPosition)}),M.map(function(e){var t=L({row:e.row,rowIdAccessor:v})+"",o=n.get(t),i=r.get(t);return void 0!==o&&void 0!==i?I(I({},e),{position:o,displayPosition:i}):e})}return P},[P,M,O,e,s,v]),j=l(function(n){if(e&&!s){var r=C(n),t=D(r),o=en({bufferRowCount:5,contentHeight:p,tableRows:t,rowHeight:m,scrollTop:b}),i=W(P,o).entering.map(function(n){var e=L({row:n.row,rowIdAccessor:v})+"";return O.find(function(n){return L({row:n.row,rowIdAccessor:v})+""===e})||n}).filter(Boolean);i.length>0&&E(R(R([],P,!0),i,!0))}},[e,s,C,D,p,m,b,W,O,P,v]),U=l(function(n){if(e&&!s){var r=y(n),t=D(r),o=en({bufferRowCount:5,contentHeight:p,tableRows:t,rowHeight:m,scrollTop:b}),i=W(P,o).entering.map(function(n){var e=L({row:n.row,rowIdAccessor:v})+"";return O.find(function(n){return L({row:n.row,rowIdAccessor:v})+""===e})||n}).filter(Boolean);i.length>0&&E(R(R([],P,!0),i,!0))}},[e,s,y,D,p,m,b,W,O,P,v]);return{currentTableRows:O,currentVisibleRows:P,isAnimating:S,prepareForFilterChange:j,prepareForSortChange:U,rowsToRender:z}}({allowAnimations:c,sortedRows:Ur,originalRows:Dr,currentPage:qe,rowsPerPage:$n,shouldPaginate:ie,serverSidePagination:te,rowGrouping:Un,rowIdAccessor:Jn,unexpandedRows:br,expandAll:tn,contentHeight:Fr,rowHeight:Kn,scrollTop:pr,computeFilteredRowsPreview:qr,computeSortedRowsPreview:zr.computeSortedRowsPreview}),Jr=Kr.currentTableRows,Vr=Kr.rowsToRender,_r=Kr.prepareForFilterChange,Xr=Kr.prepareForSortChange,Yr=Kr.isAnimating,$r=a(new Map),Qr=a(new Map),Zr=function(n){var e=n.selectableCells,r=n.headers,t=n.tableRows,c=n.rowIdAccessor,s=n.onCellEdit,d=n.cellRegistry,f=n.collapsedHeaders,v=n.rowHeight,h=n.enableRowSelection,w=void 0!==h&&h,p=i(new Set),m=p[0],g=p[1],b=i(new Set),I=b[0],C=b[1],R=i(null),S=R[0],N=R[1],A=i(null),M=A[0],E=A[1],T=i(new Set),H=T[0],k=T[1],D=i(new Set),O=D[0],P=D[1],B=i(!1),W=B[0],j=B[1],U=a(!1),G=a(null),K=u(function(){var n=new Set;return m.forEach(function(e){var r=e.split("-");if(r.length>=2){var t=parseInt(r[1],10);isNaN(t)||n.add(t)}}),I.forEach(function(e){n.add(e)}),n},[m,I]),J=u(function(){var n=new Set;return m.forEach(function(e){var r=e.split("-");if(r.length>=3){var t=r.slice(2).join("-");n.add(t)}}),I.size>0&&t.forEach(function(e){var r=L({row:e.row,rowIdAccessor:c});n.add(r+"")}),n},[m,I,t,c]),V=u(function(){return r.flatMap(function(n){return F(n,f)})},[r,f]),_=l(function(){if(0!==m.size){var n=function(n,e,r){var t=e.filter(function(n){return!n.hide}),o=new Map;t.forEach(function(n,e){o.set(e,n.accessor)});var i=Array.from(n).reduce(function(n,e){var t,i=e.split("-").map(Number),a=i[0],u=i[1];n[a]||(n[a]=[]);var l=o.get(u);return n[a][u]=l&&(null===(t=r[a])||void 0===t?void 0:t.row)?r[a].row[l]:"",n},{});return Object.values(i).map(function(n){return Object.values(n).join("\t")}).join("\n")}(m,V,t);navigator.clipboard.writeText(n),k(new Set(m)),setTimeout(function(){return k(new Set)},800)}},[m,V,t]),X=l(function(){return y(void 0,void 0,void 0,function(){var n,e,r,o,i;return x(this,function(a){switch(a.label){case 0:if(!M)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(n=a.sent())?(e=function(n,e,r,t,o,i,a){var u=new Set,l=new Set,c=n.split("\n").filter(function(n){return n.length>0});if(0===c.length)return{updatedCells:u,warningCells:l};var s=r.filter(function(n){return!n.hide}),d=e.rowIndex,f=e.colIndex;return c.forEach(function(n,e){n.split("\t").forEach(function(n,r){var c=d+e,v=f+r;if(t.length>c&&s.length>v){var h=t[c],w=s[v],p=L({row:h.row,rowIdAccessor:o});if(null==w?void 0:w.isEditable){var m=n;if("number"===w.type){var g=+n;isNaN(g)||(m=g)}else if("boolean"===w.type)m="true"===n.toLowerCase()||"1"===n;else if("date"===w.type){var b=new Date(n);isNaN(b.getTime())||(m=b)}if(h.row[w.accessor]=m,a){var I="".concat(p,"-").concat(w.accessor),C=a.get(I);C&&C.updateContent(m)}null==i||i({accessor:w.accessor,newValue:m,row:h.row,rowIndex:c});var y="".concat(c,"-").concat(v,"-").concat(p);u.add(y)}else{var x="".concat(c,"-").concat(v,"-").concat(p);l.add(x)}}})}),{updatedCells:u,warningCells:l}}(n,M,V,t,c,s,d),o=e.warningCells,(r=e.updatedCells).size>0&&(k(r),setTimeout(function(){return k(new Set)},800)),o.size>0&&(P(o),setTimeout(function(){return P(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]}})})},[M,V,t,c,s,d]),Y=l(function(){if(0!==m.size){var n=function(n,e,r,t,o,i){var a=new Set,u=new Set,l=e.filter(function(n){return!n.hide}),c=new Map;return l.forEach(function(n,e){c.set(e,n.accessor)}),Array.from(n).forEach(function(n){var e=n.split("-").map(Number),c=e[0],s=e[1];if(r.length>c&&l.length>s){var d=r[c],f=l[s],v=L({row:d.row,rowIdAccessor:t});if(null==f?void 0:f.isEditable){var h;if(d.row[f.accessor]=h="string"===f.type?"":"number"===f.type?null:"boolean"!==f.type&&("date"===f.type?null:Array.isArray(d.row[f.accessor])?[]:""),i){var w="".concat(v,"-").concat(f.accessor),p=i.get(w);p&&p.updateContent(h)}null==o||o({accessor:f.accessor,newValue:h,row:d.row,rowIndex:c}),a.add(n)}else u.add(n)}}),{deletedCells:a,warningCells:u}}(m,V,t,c,s,d),e=n.deletedCells,r=n.warningCells;e.size>0&&(k(e),setTimeout(function(){return k(new Set)},800)),r.size>0&&(P(r),setTimeout(function(){return P(new Set)},800))}},[m,V,t,c,s,d]),$=l(function(n,e){for(var r=new Set,o=Math.min(n.rowIndex,e.rowIndex),i=Math.max(n.rowIndex,e.rowIndex),a=Math.min(n.colIndex,e.colIndex),u=Math.max(n.colIndex,e.colIndex),l=o;i>=l;l++)for(var s=a;u>=s;s++)if(l>=0&&t.length>l){if(w&&0===s)continue;var d=L({row:t[l].row,rowIdAccessor:c});r.add(z({colIndex:s,rowIndex:l,rowId:d}))}C(new Set),N(null),g(r),E(e),setTimeout(function(){return q(e,v)},0)},[t,c,v,w]),Q=l(function(n){if(n.rowIndex>=0&&t.length>n.rowIndex&&n.colIndex>=0&&(w?V.length:V.length-1)>=n.colIndex){var e=z(n);C(new Set),N(null),g(new Set([e])),E(n),setTimeout(function(){return q(n,v)},0)}},[V.length,t.length,v,w]),Z=l(function(n,e){void 0===e&&(e=!1),g(new Set),E(null),C(function(r){var t=new Set(e?r:[]);return n.forEach(function(n){return t.add(n)}),t}),n.length>0&&N(n[n.length-1])},[]);!function(n){var e=n.selectableCells,r=n.initialFocusedCell,t=n.tableRows,i=n.leafHeaders,a=n.rowIdAccessor,u=n.selectSingleCell,l=n.selectCellRange,c=n.setSelectedCells,s=n.setSelectedColumns,d=n.setLastSelectedColumnIndex,f=n.copyToClipboard,v=n.pasteFromClipboard,h=n.deleteSelectedCells,w=n.startCell,p=n.enableRowSelection,m=void 0!==p&&p;o(function(){var n=function(n){var u;if(e&&r){var l=r.rowIndex,R=r.colIndex,S=r.rowId;if(!n.ctrlKey&&!n.metaKey||"c"!==n.key){if((n.ctrlKey||n.metaKey)&&"v"===n.key)return n.preventDefault(),void v();if((n.ctrlKey||n.metaKey)&&"a"===n.key){n.preventDefault();for(var N=new Set,A=0;t.length>A;A++)for(var M=0;i.length>M;M++){var E=m?M+1:M,T=L({row:t[A].row,rowIdAccessor:a});N.add("".concat(A,"-").concat(E,"-").concat(T))}return c(N),s(new Set),void d(null)}if("Delete"===n.key||"Backspace"===n.key)return n.preventDefault(),void h();if(L({row:null===(u=t[l])||void 0===u?void 0:u.row,rowIdAccessor:a})!==S){var H=t.findIndex(function(n){return L({row:n.row,rowIdAccessor:a})===S});if(-1===H)return;l=H}var k=function(n,e,r){var o=n,a=e;return"up"===r?o=0:"down"===r?o=t.length-1:"left"===r?a=m?1:0:"right"===r&&(a=m?i.length:i.length-1),{rowIndex:o,colIndex:a}};"ArrowUp"===n.key?(n.preventDefault(),o(n,l,R,k)):"ArrowDown"===n.key?(n.preventDefault(),p(n,l,R,k)):"ArrowLeft"===n.key||"Tab"===n.key&&n.shiftKey?(n.preventDefault(),g(n,l,R,k)):"ArrowRight"===n.key||"Tab"===n.key?(n.preventDefault(),b(n,l,R,k)):"Home"===n.key?(n.preventDefault(),I(n,l)):"End"===n.key?(n.preventDefault(),C(n,l)):"PageUp"===n.key?(n.preventDefault(),y(n,l,R)):"PageDown"===n.key?(n.preventDefault(),x(n,l,R)):"Escape"===n.key&&(c(new Set),s(new Set),d(null),w.current=null)}else f()}},o=function(n,e,o,i){if(n.shiftKey){w.current||(w.current=r);var c=e-1;if((n.ctrlKey||n.metaKey)&&(c=i(e,o,"up").rowIndex),c>=0){var s=L({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:o,rowId:s})}}else e>0&&(c=e-1,(n.ctrlKey||n.metaKey)&&(c=i(e,o,"up").rowIndex),s=L({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:o,rowId:s}),w.current=null)},p=function(n,e,o,i){if(n.shiftKey){w.current||(w.current=r);var c=e+1;if((n.ctrlKey||n.metaKey)&&(c=i(e,o,"down").rowIndex),t.length>c){var s=L({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:o,rowId:s})}}else t.length-1>e&&(c=e+1,(n.ctrlKey||n.metaKey)&&(c=i(e,o,"down").rowIndex),s=L({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:o,rowId:s}),w.current=null)},g=function(n,e,o,i){if(n.shiftKey&&"ArrowLeft"===n.key){w.current||(w.current=r);var c=o-1;if(n.ctrlKey||n.metaKey)c=i(e,o,"left").colIndex;else if(m&&0===c)return;if(c>=0){var s=L({row:t[e].row,rowIdAccessor:a});l(w.current,{rowIndex:e,colIndex:c,rowId:s})}}else if(o>0){if(c=o-1,(n.ctrlKey||n.metaKey)&&"ArrowLeft"===n.key)c=i(e,o,"left").colIndex;else if(m&&0===c)return;0>c||(s=L({row:t[e].row,rowIdAccessor:a}),u({rowIndex:e,colIndex:c,rowId:s}),w.current=null)}},b=function(n,e,o,c){var s=m?i.length:i.length-1;if(n.shiftKey&&"ArrowRight"===n.key){w.current||(w.current=r);var d=o+1;if((n.ctrlKey||n.metaKey)&&(d=c(e,o,"right").colIndex),s>=d){var f=L({row:t[e].row,rowIdAccessor:a});l(w.current,{rowIndex:e,colIndex:d,rowId:f})}}else s>o&&(d=o+1,(n.ctrlKey||n.metaKey)&&"ArrowRight"===n.key&&(d=c(e,o,"right").colIndex),d>s||(f=L({row:t[e].row,rowIdAccessor:a}),u({rowIndex:e,colIndex:d,rowId:f}),w.current=null))},I=function(n,e,o){if(n.shiftKey){w.current||(w.current=r);var i=e,c=m?1:0;(n.ctrlKey||n.metaKey)&&(i=0);var s=L({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:c,rowId:s})}else i=e,c=m?1:0,(n.ctrlKey||n.metaKey)&&(i=0),s=L({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:c,rowId:s}),w.current=null},C=function(n,e,o){if(n.shiftKey){w.current||(w.current=r);var c=e,s=m?i.length:i.length-1;(n.ctrlKey||n.metaKey)&&(c=t.length-1);var d=L({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:s,rowId:d})}else c=e,s=m?i.length:i.length-1,(n.ctrlKey||n.metaKey)&&(c=t.length-1),d=L({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:s,rowId:d}),w.current=null},y=function(n,e,o){var i=Math.max(0,e-10);if(n.shiftKey){w.current||(w.current=r);var c=L({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:o,rowId:c})}else c=L({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:o,rowId:c}),w.current=null},x=function(n,e,o){var i=Math.min(t.length-1,e+10);if(n.shiftKey){w.current||(w.current=r);var c=L({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:o,rowId:c})}else c=L({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:o,rowId:c}),w.current=null};return document.addEventListener("keydown",n),function(){document.removeEventListener("keydown",n)}},[e,r,t,i,a,u,l,c,s,d,f,v,h,w,m])}({selectableCells:e,initialFocusedCell:M,tableRows:t,leafHeaders:V,rowIdAccessor:c,selectSingleCell:Q,selectCellRange:$,setSelectedCells:g,setSelectedColumns:C,setLastSelectedColumnIndex:N,copyToClipboard:_,pasteFromClipboard:X,deleteSelectedCells:Y,startCell:G,enableRowSelection:w});var nn=l(function(n,e){var r=new Set,o=new Map;t.forEach(function(n,e){var r=L({row:n.row,rowIdAccessor:c});o.set(r+"",e)});for(var i=o.get(n.rowId+""),a=o.get(e.rowId+""),u=void 0!==i?i:n.rowIndex,l=void 0!==a?a:e.rowIndex,s=Math.min(u,l),d=Math.max(u,l),f=Math.min(n.colIndex,e.colIndex),v=Math.max(n.colIndex,e.colIndex),h=s;d>=h;h++)for(var p=f;v>=p;p++)if(h>=0&&t.length>h){if(w&&0===p)continue;var m=L({row:t[h].row,rowIdAccessor:c});r.add(z({colIndex:p,rowIndex:h,rowId:m}))}g(r)},[t,c,w]),en=l(function(n,e){var r=document.querySelector(".st-body-container");if(!r)return null;var t=r.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(t.left,Math.min(t.right,n)),a=Math.max(t.top,Math.min(t.bottom,e)),u=null,l=1/0;if(o.forEach(function(n){if(n instanceof HTMLElement){var e=n,r=e.getBoundingClientRect(),t=r.top+r.height/2,o=Math.sqrt(Math.pow(r.left+r.width/2-i,2)+Math.pow(t-a,2));l>o&&(l=o,u=e)}}),null!==u){var c=u,s=parseInt(c.getAttribute("data-row-index")||"-1",10),d=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(s>=0&&d>=0&&null!==f)return{rowIndex:s,colIndex:d,rowId:f}}return null},[]),rn=l(function(n,e){var r=document.elementFromPoint(n,e);if(!r)return null;var t=r.closest(".st-cell");if(t instanceof HTMLElement){var o=parseInt(t.getAttribute("data-row-index")||"-1",10),i=parseInt(t.getAttribute("data-col-index")||"-1",10),a=t.getAttribute("data-row-id");if(o>=0&&i>=0&&null!==a)return{rowIndex:o,colIndex:i,rowId:a}}return en(n,e)},[en]),tn=l(function(n,e){var r=document.querySelector(".st-body-container");if(r){var t=r.getBoundingClientRect();t.top+50>e?r.scrollTop-=10*Math.min(3,1+Math.max(0,t.top-e)/100):e>t.bottom-50&&(r.scrollTop+=10*Math.min(3,1+Math.max(0,e-t.bottom)/100));var o=document.querySelector(".st-body-main");o&&(t.left+50>n?o.scrollLeft-=10*Math.min(3,1+Math.max(0,t.left-n)/100):n>t.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,n-t.right)/100)))}},[]),on=l(function(n){var e=n.colIndex,r=z({colIndex:e,rowIndex:n.rowIndex,rowId:n.rowId}),t=m.has(r),o=I.has(e);return t||o},[m,I]),an=l(function(n){var e=n.colIndex,r=n.rowIndex,o=n.rowId;if(W)return"";var i=[],a=t[r-1]?L({row:t[r-1].row,rowIdAccessor:c}):null,u=t[r+1]?L({row:t[r+1].row,rowIdAccessor:c}):null,l=null!==a?{colIndex:e,rowIndex:r-1,rowId:a}:null,s=null!==u?{colIndex:e,rowIndex:r+1,rowId:u}:null,d={colIndex:e-1,rowIndex:r,rowId:o},f={colIndex:e+1,rowIndex:r,rowId:o};return(!l||!on(l)||I.has(e)&&0===r)&&i.push("st-selected-top-border"),(!s||!on(s)||I.has(e)&&r===t.length-1)&&i.push("st-selected-bottom-border"),on(d)||i.push("st-selected-left-border"),on(f)||i.push("st-selected-right-border"),i.join(" ")},[W,on,t,I,c]),un=u(function(){return M?function(n){return n.rowIndex===M.rowIndex&&n.colIndex===M.colIndex&&n.rowId===M.rowId}:function(){return!1}},[M]),ln=l(function(n){var e=z({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return H.has(e)},[H]),cn=l(function(n){var e=z({colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId});return O.has(e)},[O]);return{getBorderClass:an,handleMouseDown:function(n){var r=n.colIndex,t=n.rowIndex,o=n.rowId;if(e){U.current=!0,j(!0),G.current={rowIndex:t,colIndex:r,rowId:o},setTimeout(function(){C(new Set),N(null);var n=z({colIndex:r,rowIndex:t,rowId:o});g(new Set([n])),E({rowIndex:t,colIndex:r,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(U.current&&G.current){if(null!==i&&null!==a){tn(i,a);var n=Date.now();if(n-l>=16){var e=rn(i,a);e&&nn(G.current,e),l=n}}u=requestAnimationFrame(c)}else null!==u&&(cancelAnimationFrame(u),u=null)},s=function(n){U.current&&G.current&&(i=n.clientX,a=n.clientY)},d=function(){U.current=!1,j(!1),null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),u=requestAnimationFrame(c)}},handleMouseOver:function(n){e&&U.current&&G.current&&nn(G.current,{colIndex:n.colIndex,rowIndex:n.rowIndex,rowId:n.rowId})},isCopyFlashing:ln,isWarningFlashing:cn,isInitialFocusedCell:un,isSelected:on,lastSelectedColumnIndex:S,pasteFromClipboard:X,selectColumns:Z,selectedCells:m,selectedColumns:I,setInitialFocusedCell:E,setSelectedCells:g,setSelectedColumns:C,deleteSelectedCells:Y,columnsWithSelectedCells:K,rowsWithSelectedCells:J}}({selectableCells:Zn,headers:Ue,tableRows:Jr,rowIdAccessor:Jn,onCellEdit:Mn,cellRegistry:$r.current,collapsedHeaders:er,rowHeight:Kn,enableRowSelection:nn}),nt=Zr.getBorderClass,et=Zr.handleMouseDown,rt=Zr.handleMouseOver,tt=Zr.isCopyFlashing,ot=Zr.isInitialFocusedCell,it=Zr.isSelected,at=Zr.isWarningFlashing,ut=Zr.selectColumns,lt=Zr.selectedCells,ct=Zr.selectedColumns,st=Zr.setInitialFocusedCell,dt=Zr.setSelectedCells,ft=Zr.setSelectedColumns,vt=Zr.columnsWithSelectedCells,ht=Zr.rowsWithSelectedCells,wt=l(function(n){Xr(n),setTimeout(function(){Gr(n)},0)},[Xr,Gr]),pt=l(function(n){Ge(n)},[]);!function(n){var e=n.selectableColumns,r=n.selectedCells,t=n.selectedColumns,i=n.setSelectedCells,a=n.setSelectedColumns,u=n.activeHeaderDropdown,l=n.setActiveHeaderDropdown;o(function(){var n=function(n){var o=n.target;o.closest(".editable-cell-input")&&o.closest(".st-header-cell")||(u&&l&&(o.closest(".st-header-cell")||o.closest(".dropdown-content")||l(null)),o.closest(".st-cell")||e&&(o.classList.contains("st-header-cell")||o.classList.contains("st-header-label")||o.classList.contains("st-header-label-text"))||(r.size>0&&i(new Set),t.size>0&&a(new Set)))};return document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[e,r,t,i,a,u,l])}({selectableColumns:ee,selectedCells:lt,selectedColumns:ct,setSelectedCells:dt,setSelectedColumns:ft,activeHeaderDropdown:Qe,setActiveHeaderDropdown:Ze}),function(n){var e=n.forceUpdate,r=n.tableBodyContainerRef,t=n.setScrollbarWidth;g(function(){var n=function(){e(),r.current&&t(r.current.offsetWidth-r.current.clientWidth)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[e,r,t])}({forceUpdate:Te,tableBodyContainerRef:Be,setScrollbarWidth:xr}),function(n){var e=n.onGridReady;o(function(){null==e||e()},[e])}({onGridReady:Fn}),function(n){var e=n.cellRegistryRef,r=n.currentTableRows,t=n.headerRegistryRef,i=n.headers,a=n.rowIdAccessor,u=n.rows,l=n.tableRef,c=n.visibleRows;o(function(){l&&(l.current={updateData:function(n){var r=n.accessor,t=n.newValue,o=null==u?void 0:u[n.rowIndex];if(o){var i=L({row:o,rowIdAccessor:a}),l=k({rowId:i,accessor:r}),c=e.current.get(l);c&&c.updateContent(t),void 0!==o[r]&&(o[r]=t)}},setHeaderRename:function(n){var e=t.current.get(n.accessor+"");e&&e.setEditing(!0)},getVisibleRows:function(){return c},exportToCSV:function(n){!function(n,e,r){var t=function(n,e){var r=function(n){var e=[],r=function(n){for(var t=0,o=n;o.length>t;t++){var i=o[t];i.hide||i.isSelectionColumn||(i.children&&i.children.length>0?r(i.children):e.push(i))}};return r(n),e}(e);return R([r.map(function(n){return Ee(n.label)}).join(",")],n.map(function(n){var e=n.row;return r.map(function(n){return Ee(e[n.accessor])}).join(",")}),!0).join("\n")}(n,e);!function(n,e){void 0===e&&(e="table-export.csv");var r=new Blob([n],{type:"text/csv;charset=utf-8;"}),t=document.createElement("a"),o=URL.createObjectURL(r);t.setAttribute("href",o),t.setAttribute("download",e),t.style.visibility="hidden",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(o)}(t,r)}(r,i,(void 0===n?{}:n).filename)}})},[e,r,t,i,a,u,l,c])}({cellRegistryRef:$r,currentTableRows:Jr,headerRegistryRef:Qr,headers:hr,rowIdAccessor:Jn,rows:Re,tableRef:se,visibleRows:Vr}),function(n){var e=n.filters,r=n.onFilterChange;o(function(){null==r||r(e)},[e,r])}({filters:Pr,onFilterChange:kn}),function(n){var e=n.sort,r=n.onSortChange,t=xn(e);o(function(){!e||(null==t?void 0:t.key.accessor)===e.key.accessor&&(null==t?void 0:t.direction)===e.direction?!e&&t&&(null==r||r(null)):null==r||r(e)},[e,t,r])}({sort:jr,onSortChange:Wn});var mt=l(function(n){_r(n),setTimeout(function(){Br(n)},0)},[_r,Br]);return n(U,I({value:{allowAnimations:c,areAllRowsSelected:ur,cellRegistry:$r.current,cellUpdateFlash:d,clearSelection:vr,collapsedHeaders:er,columnBorders:h,columnReordering:A,columnResizing:H,draggedHeaderRef:ke,editColumns:W,enableHeaderEditing:X,enableRowSelection:nn,expandIcon:an,filterIcon:fn,filters:Pr,forceUpdate:Te,getBorderClass:nt,handleApplyFilter:mt,handleClearAllFilters:Wr,handleClearFilter:Lr,handleMouseDown:et,handleMouseOver:rt,handleRowSelect:sr,handleSelectAll:dr,handleToggleRow:fr,headerCollapseIcon:wn,headerContainerRef:Le,headerDropdown:gn,headerExpandIcon:mn,headerRegistry:Qr.current,headers:hr,hoveredHeaderRef:Fe,isAnimating:Yr,isCopyFlashing:tt,isInitialFocusedCell:ot,isLoading:Sn,isResizing:Je,isRowSelected:ar,isScrolling:Xe,isSelected:it,isWarningFlashing:at,mainBodyRef:De,nextIcon:An,onCellEdit:Mn,onCellClick:En,onColumnOrderChange:Tn,onColumnSelect:Hn,onLoadMore:On,onSort:wt,onTableHeaderDragEnd:pt,pinnedLeftRef:Oe,pinnedRightRef:Pe,prevIcon:zn,rowButtons:jn,rowGrouping:Un,rowHeight:Kn,headerHeight:null!=bn?bn:Kn,rowIdAccessor:Jn,scrollbarWidth:yr,selectColumns:ut,selectableColumns:ee,selectedColumns:ct,columnsWithSelectedCells:vt,rowsWithSelectedCells:ht,selectedRows:or,selectedRowCount:lr,selectedRowsData:cr,setCollapsedHeaders:rr,setHeaders:Ge,setInitialFocusedCell:st,setIsResizing:Ve,setIsScrolling:Ye,setSelectedCells:dt,setSelectedColumns:ft,setSelectedRows:ir,setUnexpandedRows:Ir,shouldPaginate:ie,sortDownIcon:ue,sortUpIcon:ce,tableBodyContainerRef:Be,tableRows:Jr,theme:fe,unexpandedRows:br,useHoverRowBackground:me,useOddColumnBackground:xe,useOddEvenRowBackground:Ce,activeHeaderDropdown:Qe,setActiveHeaderDropdown:Ze,onHeaderEdit:Dn}},{children:n("div",I({className:"simple-table-root st-wrapper theme-".concat(fe," ").concat(null!=f?f:""," ").concat(h?"st-column-borders":""),style:In?{height:In}:{}},{children:n(Ne,{children:r("div",I({className:"st-wrapper-container"},{children:[r("div",I({className:"st-content-wrapper"},{children:[n(we,{pinnedLeftWidth:Er,pinnedRightWidth:Tr,setScrollTop:mr,sort:jr,tableRows:Jr,rowsToRender:Vr}),n(Se,{columnEditorText:C,editColumns:W,editColumnsInitOpen:G,headers:Ue,position:p})]})),n(pe,{mainBodyRef:De,mainBodyWidth:Mr,pinnedLeftWidth:Er,pinnedRightWidth:Tr,pinnedLeftContentWidth:Hr,pinnedRightContentWidth:kr,tableBodyContainerRef:Be}),n(K,{currentPage:qe,footerRenderer:vn,hideFooter:yn,onPageChange:ze,onNextPage:Pn,onUserPageChange:Bn,rowsPerPage:$n,shouldPaginate:ie,totalPages:Math.ceil((null!=ve?ve:Ur.length)/$n),totalRows:null!=ve?ve:Ur.length})]}))})}))}))};export{He as A,S as B,$ as C,Q as D,Z as F,Pe as S,C as _,xn as a,I as b,Oe as c,J as d,V as e,De as f,_ as g,X as h,Y as i,nn as j,G as u};
|
|
2
|
-
//# sourceMappingURL=index-9e4ebc64.js.map
|