simple-table-core 0.8.21 → 0.8.24

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.
@@ -0,0 +1,4 @@
1
+ declare const AscIcon: ({ className }: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default AscIcon;
@@ -0,0 +1,4 @@
1
+ declare const DescIcon: ({ className }: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default DescIcon;
package/dist/index.es.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as r,useRef as o,useCallback as i,useEffect as a,useMemo as d,createContext as c,useContext as l,forwardRef as s,useLayoutEffect as u,Fragment as h,useReducer as f,createRef as v}from"react";var m=function(){return m=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},m.apply(this,arguments)};function g(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function d(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,d)}c((r=r.apply(e,n||[])).next())}))}function p(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=d(0),a.throw=d(1),a.return=d(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(d){return function(c){return function(d){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&d[0]?r.return:d[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,d[1])).done)return o;switch(r=0,o&&(d=[2&d[0],o.value]),d[0]){case 0:case 1:o=d;break;case 4:return i.label++,{value:d[1],done:!1};case 5:i.label++,r=d[1],d=[0];continue;case 7:d=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==d[0]&&2!==d[0])){i=0;continue}if(3===d[0]&&(!o||d[1]>o[0]&&d[1]<o[3])){i.label=d[1];break}if(6===d[0]&&i.label<o[1]){i.label=o[1],o=d;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(d);break}o[2]&&i.ops.pop(),i.trys.pop();continue}d=n.call(e,i)}catch(e){d=[6,e],r=0}finally{t=o=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([d,c])}}}function w(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var C=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},I=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},x=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},y=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return y(e)})):[e]},b=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(C({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},R=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(C({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){R(e)}))},M=function(e){return"number"==typeof e.minWidth?e.minWidth:40},E=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},S=c(void 0),k=function(n){var t=n.children,r=n.value;return e(S.Provider,m({value:r},{children:t}))},D=function(){var e=l(S);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},W=function(t){var o=t.currentPage,i=t.hideFooter,a=t.onPageChange,d=t.onNextPage,c=t.shouldPaginate,l=t.totalPages,s=D(),u=s.nextIcon,h=s.prevIcon,f=r(!0),v=f[0],w=f[1],C=!(o>1),I=!(o<l)&&!d||!v&&o===l;if(i||!c)return null;var x=function(){if(l<=15)return Array.from({length:l},(function(e,n){return n+1}));var e,n,t=[],r=15;if(o<=Math.ceil(7.5))e=1,n=14;else if(o>=l-Math.floor(7.5))e=Math.max(1,l-r+1),n=l;else{var i=Math.floor(7);e=o-i,n=o+(r-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<l-1&&(t.push(-1),t.push(l)),t}();return n("div",m({className:"st-footer"},{children:[e("button",m({className:"st-next-prev-btn ".concat(C?"disabled":""),onClick:function(){var e=o-1;e>=1&&a(e)},disabled:C},{children:h})),e("button",m({className:"st-next-prev-btn ".concat(I?"disabled":""),onClick:function(){return g(void 0,void 0,void 0,(function(){var e,n;return p(this,(function(t){switch(t.label){case 0:return e=o===l,n=o+1,d&&e?[4,d(o)]:[3,2];case 1:if(!t.sent())return w(!1),[2];t.label=2;case 2:return(n<=l||d)&&a(n),[2]}}))}))},disabled:I},{children:u})),x.map((function(n,t){return n<0?e("span",m({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e("button",m({onClick:function(){return function(e){e>=1&&e<=l&&a(e)}(n)},className:"st-page-btn ".concat(o===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},H=function(n){var t=n.className;return e("svg",m({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},N=function(n){var t=n.className;return e("svg",m({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},L=function(n){var t=n.className;return e("svg",m({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},T=function(n){var t=n.className;return e("svg",m({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},B=function(e){return e.position*(e.rowHeight+1)-1},O=function(e){return e.position*(e.rowHeight+1)},P=function(n){var t=n.children,i=n.onClose,d=n.open,c=n.setOpen,l=n.width,s=n.containerRef,u=D(),h=null==u?void 0:u.mainBodyRef,f=o(null),v=o(null),g=r("bottom-left"),p=g[0],w=g[1],C=r({}),I=C[0],x=C[1],y=r(!1),b=y[0],R=y[1];return a((function(){d&&f.current?(R(!1),!v.current&&f.current.parentElement&&(v.current=f.current.parentElement),requestAnimationFrame((function(){if(f.current&&v.current){var e,n=f.current,t=v.current.getBoundingClientRect(),r=n.offsetHeight,o=l||n.offsetWidth,i=(e=(null==s?void 0:s.current)?s.current.getBoundingClientRect():(null==h?void 0:h.current)?h.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,d="bottom",c={};(r>i&&r<=a||r>i&&a>i)&&(d="top");var u="left";o>e.right-t.right+t.width&&(u="right"),"bottom"===d?c.top=t.bottom+4:c.bottom=window.innerHeight-t.top+4,"left"===u?c.left=t.left:c.right=window.innerWidth-t.right,w("".concat(d,"-").concat(u)),x(c),R(!0)}}))):d||R(!1)}),[d,l,s,h]),a((function(){var e=function(e){if(d&&f.current){var n=e.target;f.current&&!f.current.contains(n)&&(c(!1),null==i||i())}};return d&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[d,i,c]),a((function(){var e=function(e){f.current&&!f.current.contains(e.target)&&(c(!1),null==i||i())};return d&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,d,c]),a((function(){var e=function(e){"Escape"===e.key&&d&&(c(!1),null==i||i())};return d&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,d,c]),d?e("div",m({ref:f,className:"st-dropdown-content st-dropdown-".concat(p),style:m({width:l?"".concat(l,"px"):"auto",visibility:b?"visible":"hidden"},I)},{children:t})):null},F=function(n){var t=n.children,r=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,d=void 0!==a&&a,c=n.className,l=void 0===c?"":c;return e("div",m({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(d?"disabled":""," ").concat(l),onClick:function(){!d&&r&&r()},role:"option","aria-selected":i,"aria-disabled":d},{children:t}))},A=function(t){var o=t.onBlur,i=t.onChange,d=t.open,c=t.setOpen,l=t.value,s=r(l),u=s[0],h=s[1];a((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var f=function(e){h(e),i(e),c(!1),o()};return n(P,m({open:d,onClose:function(){o()},setOpen:c,width:120},{children:[e(F,m({isSelected:!0===u,onClick:function(){return f(!0)}},{children:"True"})),e(F,m({isSelected:!1===u,onClick:function(){return f(!1)}},{children:"False"}))]}))},z=function(n){var t=n.defaultValue,r=n.onBlur,i=n.onChange,a=o(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(e){var n=e.target.value;i(n)}})},U=function(n){var t=n.defaultValue,r=n.onBlur,i=n.onChange,a=o(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:t.toString(),onBlur:r,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},j=function(o){var i,a,d=o.value,c=o.onChange,l=o.onClose,s=D(),u=s.nextIcon,h=s.prevIcon,f=r(d||new Date),v=f[0],g=f[1],p=r("days"),w=p[0],C=p[1],I=function(e,n){return new Date(e,n+1,0).getDate()};return n("div",m({className:"st-datepicker"},{children:[n("div",m({className:"st-datepicker-header"},{children:["days"===w&&n(t,{children:[e("button",m({onClick:function(){g(new Date(v.getFullYear(),v.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:h})),n("div",m({className:"st-datepicker-header-label",onClick:function(){return C("months")}},{children:[(a=v,a.toLocaleString("default",{month:"long"}))," ",v.getFullYear()]})),e("button",m({onClick:function(){g(new Date(v.getFullYear(),v.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:u}))]}),"months"===w&&e("div",m({className:"st-datepicker-header-label",onClick:function(){return C("years")}},{children:v.getFullYear()})),"years"===w&&e("div",m({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),n("div",m({className:"st-datepicker-grid st-datepicker-".concat(w,"-grid")},{children:["days"===w&&function(){var n=[],t=v.getFullYear(),r=v.getMonth(),o=I(t,r),i=function(e,n){return new Date(e,n,1).getDay()}(t,r),a=I(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e("div",m({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var s=function(t){var r=a-i+t+1;n.push(e("div",m({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()-1,e);g(n),c(n),null==l||l()}(r)}},{children:r}),"prev-".concat(r)))},u=0;u<i;u++)s(u);for(var h=function(o){var i=o===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),a=o===new Date(d).getDate()&&r===new Date(d).getMonth()&&t===new Date(d).getFullYear();n.push(e("div",m({className:"st-datepicker-day ".concat(i?"today":""," ").concat(a?"selected":""),onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth(),e);g(n),c(n),null==l||l()}(o)}},{children:o}),"day-".concat(o)))},f=1;f<=o;f++)h(f);var p=35-(i+o),w=function(t){n.push(e("div",m({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()+1,e);g(n),c(n),null==l||l()}(t)}},{children:t}),"next-".concat(t)))};for(f=1;f<=p;f++)w(f);return n}(),"months"===w&&(i=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var r=t===v.getMonth();i.push(e("div",m({className:"st-datepicker-month ".concat(r?"selected":""),onClick:function(){return function(e){g(new Date(v.getFullYear(),e,1)),C("days")}(t)}},{children:n}),"month-".concat(t)))})),i),"years"===w&&function(){for(var n=[],t=v.getFullYear(),r=t-6,o=function(r){var o=r===t;n.push(e("div",m({className:"st-datepicker-year ".concat(o?"selected":""),onClick:function(){return function(e){g(new Date(e,v.getMonth(),1)),C("months")}(r)}},{children:r}),"year-".concat(r)))},i=r;i<r+12;i++)o(i);return n}()]})),e("div",m({className:"st-datepicker-footer"},{children:e("button",m({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;g(e),c(e),null==l||l()}},{children:"Today"}))}))]}))},Y=function(n){var t=n.onBlur,o=n.onChange,i=n.open,d=n.setOpen,c=n.value,l=r(function(e){var n=e.split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setUTCFullYear(t),i.setUTCMonth(r-1),i.setUTCDate(o),isNaN(i.getTime())?new Date:i}(c)),s=l[0],u=l[1];a((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var h=function(){t()};return e(P,m({open:i,onClose:h,setOpen:d,width:280},{children:e(j,{value:s,onChange:function(e){u(e),o(e.toISOString()),d(!1),t()},onClose:h})}))},q=function(n){var t=n.onBlur,o=n.onChange,i=n.open,d=n.options,c=n.setOpen,l=n.value,s=r(l||""),u=s[0],h=s[1];a((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);return e(P,m({open:i,onClose:function(){t()},setOpen:c,width:150},{children:e("div",m({className:"st-enum-dropdown-content"},{children:d.map((function(n){return e(F,m({isSelected:u===n,onClick:function(){return h(e=n),o(e),c(!1),void t();var e}},{children:n}),n)}))}))}))},J=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,d=void 0===a?"string":a,c=n.value,l=function(){i(!1)};if("boolean"===d&&"boolean"==typeof c)return e(A,{onBlur:l,onChange:function(e){return o(e)},open:!0,setOpen:i,value:c});if("date"===d)return e(Y,{onBlur:l,onChange:function(e){return o(e)},open:!0,setOpen:i,value:"string"==typeof c?c:""});if("enum"===d)return e(q,{onBlur:l,onChange:function(e){return o(e)},open:!0,options:r,setOpen:i,value:"string"==typeof c?c:""});if("number"===d&&"number"==typeof c)return e(U,{defaultValue:c,onBlur:l,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var s=null==c?"":String(c);return e(z,{defaultValue:s,onBlur:l,onChange:function(e){return o(e)}})},V=0,K=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===V||o-V>=r)&&(V=o,n(t))}},X=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(X);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=X(e[t]));return n},G=Date.now(),$={screenX:0,screenY:0},_=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return w(w([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=_(o.children,n,w(w([],t,!0),[r],!1));if(i)return i}}return null};var Q=function(e){var n,t,r=e.draggedHeaderRef,i=e.headersRef,d=e.hoveredHeaderRef,c=e.onColumnOrderChange,l=e.onTableHeaderDragEnd,s=(n=i.current,t=o(n),a((function(){JSON.stringify(t.current)!==JSON.stringify(n)&&(t.current=n)}),[n]),t.current);return{handleDragStart:function(e){r.current=e,G=Date.now()},handleDragOver:function(e){var n,t,o=e.event,a=e.hoveredHeader;if(o.preventDefault(),i.current){var c=o.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=o.screenX,h=o.screenY,f=Math.sqrt(Math.pow(u-$.screenX,2)+Math.pow(h-$.screenY,2));d.current=a;var v=i.current,m=_(v,(null===(n=r.current)||void 0===n?void 0:n.accessor)||""),g=_(v,a.accessor);if(m&&g){var p=m.length,w=g.length,C=g;if(p!==w){var I=w-p;I>0&&(C=g.slice(0,-I))}var x=function(e,n,t){var r=X(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var d=i(r,n);return a(r,n,i(r,t)),a(r,t,d),{newHeaders:r,emergencyBreak:o}}(v,m,C),y=x.newHeaders,b=x.emergencyBreak;if(!(c||a.accessor===(null===(t=r.current)||void 0===t?void 0:t.accessor)||null===r.current||f<10||0===m.length||0===C.length||JSON.stringify(y)===JSON.stringify(i.current)||b)){var R=Date.now();JSON.stringify(y)===JSON.stringify(s)&&(R-G<1500||f<40)||(G=R,$={screenX:u,screenY:h},l(y))}}}},handleDragEnd:function(){r.current=null,d.current=null,null==c||c(i.current)}}},Z=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},ee=s((function(t,d){var c,l,s=t.borderClass,u=t.colIndex,h=t.header,f=t.isHighlighted,v=t.isInitialFocused,g=t.nestedIndex,p=t.onExpandRowClick,w=t.rowIndex,I=t.visibleRow,y=D(),b=y.cellRegistry,R=y.cellUpdateFlash,M=y.collapseIcon,E=y.draggedHeaderRef,S=y.expandIcon,k=y.handleMouseDown,W=y.handleMouseOver,H=y.headersRef,N=y.hoveredHeaderRef,L=y.onCellEdit,T=y.onTableHeaderDragEnd,B=y.useOddColumnBackground,O=I.depth,P=I.row,F=r(P.rowData[h.accessor]),A=F[0],z=F[1],U=r(!1),j=U[0],Y=U[1],q=r(!1),V=q[0],X=q[1],G=o(null),$=Q({draggedHeaderRef:E,headersRef:H,hoveredHeaderRef:N,onTableHeaderDragEnd:T}).handleDragOver,_=K(),ee="cell-".concat(w,"-").concat(u),ne=x({rowId:P.rowMeta.rowId,accessor:h.accessor});a((function(){if(b){var e="".concat(P.rowMeta.rowId,"-").concat(h.accessor);return b.set(e,{updateContent:function(e){A!==e?(z(e),R&&(X(!0),G.current&&clearTimeout(G.current),G.current=setTimeout((function(){X(!1)}),800))):z(e)}}),function(){b.delete(e),G.current&&clearTimeout(G.current)}}}),[b,R,P.rowMeta.rowId,h.accessor,A]),a((function(){if(V){var e=setTimeout((function(){X(!1)}),850);return function(){return clearTimeout(e)}}}),[V]),a((function(){z(P.rowData[h.accessor])}),[P.rowData,h.accessor]),a((function(){f||Y(!1)}),[f]);var te="boolean"===h.type||"date"===h.type||"enum"===h.type,re=Boolean(null===(l=null===(c=P.rowMeta)||void 0===c?void 0:c.children)||void 0===l?void 0:l.length),oe=Boolean(null==h?void 0:h.isEditable),ie="st-cell ".concat(O>0&&h.expandable?"st-cell-depth-".concat(O):""," ").concat(f?v?"st-cell-selected-first ".concat(s):"st-cell-selected ".concat(s):""," ").concat(oe?"clickable":""," ").concat(V?"st-cell-updating":""," ").concat(B?g%2==0?"even-column":"odd-column":""),ae=i((function(e){z(e),null==L||L({accessor:h.accessor,newValue:e,row:P})}),[h.accessor,L,P]);return j&&!te?e("div",m({className:"st-cell-editing",id:C({accessor:h.accessor,rowIndex:w+1})},{children:e(J,{enumOptions:h.enumOptions,onChange:ae,setIsEditing:Y,type:h.type,value:A})})):n("div",m({className:ie,id:ee,onDoubleClick:function(){return h.isEditable&&Y(!0)},onMouseDown:function(){return k({rowIndex:w,colIndex:u,rowId:P.rowMeta.rowId})},onMouseOver:function(){return W({rowIndex:w,colIndex:u,rowId:P.rowMeta.rowId})},onDragOver:function(e){return _({callback:$,callbackProps:{event:e,hoveredHeader:h},limit:50})},onKeyDown:function(e){"F2"!==e.key&&"Enter"!==e.key||!h.isEditable||j||(e.preventDefault(),Y(!0))},ref:d,"data-row-index":w,"data-col-index":u,"data-row-id":P.rowMeta.rowId,"data-accessor":h.accessor},{children:[h.expandable&&re?P.rowMeta.isExpanded?e("div",m({className:"st-sort-icon-container",onClick:function(){return p(P.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:M})):e("div",m({className:"st-sort-icon-container",onClick:function(){return p(P.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:S})):null,e("span",m({className:"st-cell-content ".concat("right"===h.align?"right-aligned":"center"===h.align?"center-aligned":"left-aligned")},{children:e("span",{children:h.cellRenderer?h.cellRenderer({accessor:h.accessor,colIndex:u,row:P}):Z({content:A,header:h})})})),j&&te&&e(J,{enumOptions:h.enumOptions,onChange:ae,setIsEditing:Y,type:h.type,value:A})]}),ne)})),ne=function(n){var r=n.children,o=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}(n,["children"]);return D().allowAnimations?e(te,m({},o,{children:r})):e(t,{children:r})},te=function(n){var i=n.children,d=n.isBody,c=n.pauseAnimation,l=n.rowIndex,s=o(!1),h=D(),f=h.draggedHeaderRef,v=h.headersRef,m=h.mainBodyRef,g=h.shouldPaginate,p=r({}),w=p[0],I=p[1],x=o({}),y=v.current;return u((function(){if(y){var e=function(e){var n=e.currentHeaders,t=e.draggedHeaderRef,r=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(C({accessor:e.accessor,rowIndex:r}));if(i){var a=i.getAnimations().some((function(e){return"running"===e.playState})),d=i.getBoundingClientRect();a&&(null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=d}}})),o}({currentHeaders:y,draggedHeaderRef:f,rowIndex:l});JSON.stringify(e)!==JSON.stringify(w)&&(x.current=w,I(e))}}),[w,y,f,d,l]),u((function(){var e=m.current,n=function(){s.current=!0},t=function(){s.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",t),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",t)}}),[f,m]),a((function(){c||s.current||Object.keys(x.current).length&&y&&y.forEach((function(e){var n=document.getElementById(C({accessor:e.accessor,rowIndex:l}));if(n){var t=x.current[e.accessor],r=w[e.accessor];if(t&&r){var o=t.left-r.left,i=g?0:t.top-r.top,a=Math.abs(o),d=Math.abs(i);(a>10||d>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(o,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[w,y,d,c,x,l,g]),e(t,{children:i})},re=function(n){var t=n.columnIndexStart,r=n.columnIndices,o=n.headers,i=n.hiddenColumns,a=n.isWidthDragging,d=n.onExpandRowClick,c=n.pinned,l=n.rowIndex,s=n.rowIndices,u=n.visibleRow,h=o.filter((function(e){return I({hiddenColumns:i,header:e,pinned:c})}));return e(ne,m({isBody:!0,pauseAnimation:a,rowIndex:l+1},{children:h.map((function(n,a){return e(oe,{columnIndices:r,header:n,headers:o,hiddenColumns:i,nestedIndex:a+(null!=t?t:0),onExpandRowClick:d,pinned:c,rowIndex:l,rowIndices:s,visibleRow:u},C({accessor:n.accessor,rowIndex:l+1}))}))}))},oe=function(n){var t=n.columnIndices,r=n.header,o=n.headers,i=n.hiddenColumns,a=n.nestedIndex,d=n.onExpandRowClick,c=n.pinned,l=n.rowIndex,s=n.rowIndices,u=n.visibleRow,f=t[r.accessor],v=D(),m=v.getBorderClass,g=v.isSelected,p=v.isInitialFocusedCell;if(r.children){var w=r.children.filter((function(e){return I({hiddenColumns:i,header:e,pinned:c})}));return e(h,{children:w.map((function(n){return e(oe,{columnIndices:t,header:n,headers:o,hiddenColumns:i,nestedIndex:a,onExpandRowClick:d,pinned:c,rowIndex:l,rowIndices:s,visibleRow:u},C({accessor:n.accessor,rowIndex:l+1}))}))})}var x={rowIndex:l,colIndex:f,rowId:u.row.rowMeta.rowId},y=m(x),b=g(x),R=p(x);return e(ee,{borderClass:y,colIndex:f,header:r,isHighlighted:b,isInitialFocused:R,nestedIndex:a,onExpandRowClick:d,rowIndex:l,visibleRow:u},C({accessor:r.accessor,rowIndex:l+1}))},ie=function(n){var t=n.columnIndices,r=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.hiddenColumns,d=n.hoveredIndex,c=n.index,l=n.isWidthDragging,s=n.onExpandRowClick,u=n.pinned,h=n.rowHeight,f=n.rowIndices,v=n.setHoveredIndex,g=n.visibleRow,p=D().useHoverRowBackground,w=g.position;return e("div",m({className:"st-row ".concat(w%2==0?"even":"odd"," ").concat(d===c&&p?"hovered":""),onMouseEnter:function(){v(c)},style:{gridTemplateColumns:o,top:O({position:w,rowHeight:h}),height:"".concat(h,"px")}},{children:e(re,{columnIndexStart:r,columnIndices:t,headers:i,hiddenColumns:a,isWidthDragging:l,onExpandRowClick:s,pinned:u,rowIndex:c,rowIndices:f,visibleRow:g},c)}))},ae=function(n){var t=n.displayStrongBorder,r=n.position,o=n.rowHeight,i=n.templateColumns;return e("div",m({className:"st-row-separator ".concat(t?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:i,position:"absolute",top:B({position:r,rowHeight:o}),minWidth:"100%"}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},de=function(t){var r=t.columnIndexStart,o=t.columnIndices,i=t.headers,a=t.hiddenColumns,d=t.hoveredIndex,c=t.isWidthDragging,l=t.onExpandRowClick,s=t.pinned,u=t.ref,f=t.rowHeight,v=t.rowIndices,g=t.setHoveredIndex,p=t.templateColumns,w=t.totalHeight,C=t.visibleRows,I=t.width,x=s?"st-body-pinned-".concat(s):"st-body-main";return e("div",m({className:x,ref:u,style:m({position:"relative",height:"".concat(w,"px"),width:I},!s&&{flexGrow:1})},{children:C.map((function(t,u){var m,w,I=C[u-1],x=Boolean((null==I?void 0:I.depth)!==(null==t?void 0:t.depth)&&(null===(w=null===(m=null==t?void 0:t.row.rowMeta)||void 0===m?void 0:m.children)||void 0===w?void 0:w.length)&&0===t.depth);return n(h,{children:[0!==u&&e(ae,{displayStrongBorder:x,position:t.position,rowHeight:f,templateColumns:p}),e(ie,{columnIndexStart:r,columnIndices:o,gridTemplateColumns:p,headers:i,hiddenColumns:a,hoveredIndex:d,index:u,isWidthDragging:c,onExpandRowClick:l,pinned:s,rowHeight:f,rowIndices:v,setHoveredIndex:g,visibleRow:t})]},t.position)}))}))};function ce(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,d=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 I({hiddenColumns:t,header:e})})).forEach((function(e,n){d(e,0===n)}))};return r.forEach((function(e,n){d(e,0===n)})),n.current.filter((function(e){return!e.pinned&&I({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;d(e,t)})),o.forEach((function(e){d(e,!1)})),i}var le=function(t){var i=t.flattenedRows,c=t.headerContainerRef,l=t.isWidthDragging,s=t.mainTemplateColumns,u=t.pinnedLeftColumns,h=t.pinnedLeftTemplateColumns,f=t.pinnedLeftWidth,v=t.pinnedRightColumns,g=t.pinnedRightTemplateColumns,p=t.pinnedRightWidth,w=t.setFlattenedRows,C=t.setScrollTop,I=t.visibleRows,x=D(),y=x.headersRef,b=x.hiddenColumns,R=x.mainBodyRef,M=x.rowHeight,E=x.scrollbarWidth,S=x.tableBodyContainerRef,k=r(null),W=k[0],H=k[1];!function(e){var n=e.headerContainerRef,t=e.mainSectionRef,o=e.scrollbarWidth,i=r(!1),d=i[0],c=i[1];a((function(){var e=null==n?void 0:n.current;if(d&&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")}}),[n,d,o]),a((function(){var e=null==n?void 0:n.current,r=null==t?void 0:t.current;if(r&&e){var o=function(){if(r){var e=r.scrollHeight>r.clientHeight;c(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(r),function(){r&&i.unobserve(r)}}}),[n,t])}({headerContainerRef:c,mainSectionRef:S,scrollbarWidth:E});var N,L,T=o(null),B=(N=0,(L=function(e){e.forEach((function(e){N+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&L(e.rowMeta.children)}))})(i),N)*(M+1)-1,O=d((function(){return ce({headersRef:y,hiddenColumns:b,pinnedLeftColumns:u,pinnedRightColumns:v})}),[y,b,u,v]),P=d((function(){var e={};return I.forEach((function(n,t){var r=String(n.row.rowMeta.rowId);e[r]=t})),e}),[I]),F=function(e){var n=function(t){return t.rowMeta.rowId===e&&t.rowMeta.children?m(m({},t),{rowMeta:m(m({},t.rowMeta),{isExpanded:!t.rowMeta.isExpanded})}):t.rowMeta.children?m(m({},t),{rowMeta:m(m({},t.rowMeta),{children:t.rowMeta.children.map(n)})}):t};w((function(e){return e.map(n)}))},A={columnIndices:O,headerContainerRef:c,headers:y.current,hiddenColumns:b,hoveredIndex:W,isWidthDragging:l,rowHeight:M,rowIndices:P,setHoveredIndex:H,visibleRows:I};return n("div",m({className:"st-body-container",onMouseLeave:function(){return H(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;T.current&&cancelAnimationFrame(T.current),T.current=requestAnimationFrame((function(){C(n)}))},ref:S},{children:[u.length>0&&e(de,m({},A,{onExpandRowClick:F,pinned:"left",templateColumns:h,totalHeight:B,width:f})),e(de,m({},A,{columnIndexStart:u.length,onExpandRowClick:F,ref:R,templateColumns:s,totalHeight:B})),v.length>0&&e(de,m({},A,{columnIndexStart:u.length+s.length,onExpandRowClick:F,pinned:"right",templateColumns:g,totalHeight:B,width:p}))]}))},se=function(e,n){a((function(){if(e.current){var t=e.current,r=function(){var e,r=null==t?void 0:t.scrollLeft;void 0!==r&&(null===(e=n.current)||void 0===e||e.scrollTo(r,0))};return t.addEventListener("scroll",r),function(){null==t||t.removeEventListener("scroll",r)}}}),[e,n])},ue=function(e){return void 0===e&&(e=0),e?e+1:0},he=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,d=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:y(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=b(e))})))})),n.pinned?ue(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(d):"right"===n.pinned?a(d):n.pinned||o(d)},fe=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,d=e.setIsWidthDragging,c=e.setMainBodyWidth,l=e.setPinnedLeftWidth,s=e.setPinnedRightWidth,u=e.startWidth;d(!0),n.preventDefault();var h=n.clientX;if(i&&!i.hide){var f=M(i),v=r-o>1,m=v?y(i):[i],g=function(e){var n="right"===i.pinned?h-e.clientX:e.clientX-h;if(v&&m.length>1)ve({delta:n,header:i,headersRef:a,leafHeaders:m,minWidth:f,setMainBodyWidth:c,setPinnedLeftWidth:l,setPinnedRightWidth:s,startWidth:u});else{var r=Math.max(u+n,f);i.width=r,he({header:i,headers:a.current,newWidth:r,setMainBodyWidth:c,setPinnedLeftWidth:l,setPinnedRightWidth:s})}a.current.forEach((function(e){R(e)})),t()},p=function(){document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",p),d(!1)};document.addEventListener("mousemove",g),document.addEventListener("mouseup",p)}},ve=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,d=e.setPinnedLeftWidth,c=e.setPinnedRightWidth,l=e.startWidth,s=o.reduce((function(e,n){return Math.min(e,M(n))}),40),u=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(l+n,s);he({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:d,setPinnedRightWidth:c});var f=h-u;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/u),r=Math.max(n+t,i);e.width=r}))},me=s((function(t,r){var o,i,d=t.colIndex,c=t.forceHeadersUpdate,l=t.gridColumnEnd,s=t.gridColumnStart,u=t.gridRowEnd,h=t.gridRowStart,f=t.header,v=t.reverse,g=t.sort,p=D(),I=p.columnReordering,x=p.columnResizing,y=p.draggedHeaderRef,b=p.forceUpdate,R=p.headersRef,M=p.hoveredHeaderRef,E=p.onColumnOrderChange,S=p.onSort,k=p.onTableHeaderDragEnd,W=p.rowHeight,H=p.selectColumns,N=p.selectableColumns,L=p.setInitialFocusedCell,T=p.setIsWidthDragging,B=p.setMainBodyWidth,O=p.setPinnedLeftWidth,P=p.setPinnedRightWidth,F=p.setSelectedCells,A=p.setSelectedColumns,z=p.sortDownIcon,U=p.sortUpIcon,j=Boolean(null==f?void 0:f.isSortable),Y="st-header-cell ".concat(f.accessor===(null===(o=M.current)||void 0===o?void 0:o.accessor)?"st-hovered":""," ").concat((null===(i=y.current)||void 0===i?void 0:i.accessor)===f.accessor?"st-dragging":""," ").concat(j?"clickable":""," ").concat(I&&!j?"columnReordering":""," ").concat(f.children?"parent":""),q=Q({draggedHeaderRef:y,headersRef:R,hoveredHeaderRef:M,onColumnOrderChange:E,onTableHeaderDragEnd:k}),J=q.handleDragStart,V=q.handleDragEnd,X=q.handleDragOver,G=K(),$=function(e){var n=e.event,t=e.header;if(N){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var d=a[i];o=r(d,o)}return o};return r(e,n),t}(t,d);return n.shiftKey&&H?A((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,d,c,l,s=w(w([],(a=o,d=n,c=Math.min(a,d),l=Math.max(a,d),Array.from({length:l-c+1},(function(e,n){return c+n}))),!0),r,!0);return new Set(w(w([],Array.from(e),!0),s,!0))})):H&&H(r),F(new Set),void L(null)}t.isSortable&&S(d,t.accessor)};if(a((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!f)return null;var _=x&&e("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;G({callback:fe,callbackProps:{event:e.nativeEvent,forceUpdate:b,gridColumnEnd:l,gridColumnStart:s,header:f,headersRef:R,setIsWidthDragging:T,setMainBodyWidth:B,setPinnedLeftWidth:O,setPinnedRightWidth:P,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}}),Z=g&&g.key.accessor===f.accessor&&n("div",m({className:"st-sort-icon-container",onClick:function(e){return $({event:e,header:f})}},{children:["ascending"===g.direction&&U&&U,"descending"===g.direction&&z&&z]}));return n("div",m({className:Y,id:C({accessor:f.accessor,rowIndex:0}),onDragOver:function(e){G({callback:X,callbackProps:{event:e,hoveredHeader:f},limit:50})},ref:r,style:m(m({gridRowStart:h,gridRowEnd:u,gridColumnStart:s,gridColumnEnd:l},l-s>1?{}:{width:f.width}),u-h>1?{}:{height:W})},{children:[v&&_,"right"===f.align&&Z,e("div",m({className:"st-header-label",draggable:I&&!f.disableReorder,onClick:function(e){return $({event:e,header:f})},onDragEnd:function(e){e.preventDefault(),V(),c()},onDragStart:function(e){I&&f&&function(e){J(e)}(f)}},{children:e("span",m({className:"st-header-label-text ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:null==f?void 0:f.label}))})),"right"!==f.align&&Z,!v&&_]}))})),ge=function(n){var t=n.columnIndices,r=n.gridTemplateColumns,o=n.handleScroll,i=n.headersRef,a=n.hiddenColumns,c=n.maxDepth,l=n.pinned,s=n.sectionRef,u=n.sort,h=f((function(e){return e+1}),0)[1],g=d((function(){var e=[],n=1,r=function(o,i,d){var s,u;if(void 0===d&&(d=!1),!I({hiddenColumns:a,header:o,pinned:l}))return 0;d||n++;var h=null!==(u=null===(s=o.children)||void 0===s?void 0:s.filter((function(e){return I({hiddenColumns:a,header:e,pinned:l})})).length)&&void 0!==u?u:0,f=n,v=h>0?f+h:f+1,m=i,g=h>0?i+1:c+1;if(e.push({header:o,gridColumnStart:f,gridColumnEnd:v,gridRowStart:m,gridRowEnd:g,colIndex:t[o.accessor]}),o.children){var p=!0;o.children.forEach((function(e){I({hiddenColumns:a,header:e,pinned:l})&&(r(e,i+1,p),p=!1)}))}return v-f},o=i.current.filter((function(e){return I({hiddenColumns:a,header:e,pinned:l})})),d=!0;return o.forEach((function(e){r(e,1,d),d=!1})),e}),[i,a,c,l,t]);return e("div",m({className:"st-header-".concat(l?"pinned-".concat(l):"main")},o&&{onScroll:o},{ref:s,style:{gridTemplateColumns:r,display:"grid",position:"relative"}},{children:e(ne,m({rowIndex:0},{children:g.map((function(n){return e(me,{colIndex:n.colIndex,forceHeadersUpdate:h,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,ref:v(),reverse:"right"===l,sort:u},n.header.accessor)}))}))}))},pe=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(pe)):1},we=function(t){var r=t.centerHeaderRef,o=t.headerContainerRef,i=t.headersRef,a=t.hiddenColumns,c=t.mainTemplateColumns,l=t.pinnedLeftColumns,s=t.pinnedLeftTemplateColumns,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.sort,g=D(),p=g.mainBodyRef,w=g.pinnedLeftRef,C=g.pinnedRightRef,x=g.setPinnedLeftWidth,y=g.setPinnedRightWidth;se(p,r);var b=d((function(){return ce({headersRef:i,hiddenColumns:a,pinnedLeftColumns:l,pinnedRightColumns:h})}),[i,a,l,h]),R=d((function(){var e=i.current,n=0;return e.forEach((function(e){if(I({hiddenColumns:a,header:e})){var t=pe(e);n=Math.max(n,t)}})),{maxDepth:n}}),[i,a]).maxDepth;return u((function(){var e,n;x(ue(null===(e=w.current)||void 0===e?void 0:e.clientWidth)),y(ue(null===(n=C.current)||void 0===n?void 0:n.clientWidth))}),[w,C,x,y]),n("div",m({className:"st-header-container",ref:o},{children:[l.length>0&&e(ge,{columnIndices:b,gridTemplateColumns:s,handleScroll:void 0,headersRef:i,hiddenColumns:a,maxDepth:R,pinned:"left",sectionRef:w,sort:v}),e(ge,{columnIndices:b,gridTemplateColumns:c,handleScroll:function(e){var n,t,o=null===(n=r.current)||void 0===n?void 0:n.scrollLeft;void 0!==o&&(null===(t=p.current)||void 0===t||t.scrollTo(o,0))},headersRef:i,hiddenColumns:a,maxDepth:R,sectionRef:r,sort:v}),h.length>0&&e(ge,{columnIndices:b,gridTemplateColumns:f,handleScroll:void 0,headersRef:i,hiddenColumns:a,maxDepth:R,pinned:"right",sectionRef:C,sort:v})]}))},Ce=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},Ie=function(t){var r=t.flattenedRows,i=t.isWidthDragging,a=t.pinnedLeftWidth,c=t.pinnedRightWidth,l=t.setFlattenedRows,s=t.setScrollTop,u=t.sort,h=t.visibleRows,f=D(),v=f.columnResizing,g=f.editColumns,p=f.headersRef,w=f.hiddenColumns,C=o(null),I=o(null),x=p.current.filter((function(e){return!e.pinned})),y=p.current.filter((function(e){return"left"===e.pinned})),b=p.current.filter((function(e){return"right"===e.pinned})),R=d((function(){return Ce({headers:y,hiddenColumns:w})}),[y,w]),M=d((function(){return Ce({headers:x,hiddenColumns:w})}),[x,w]),E=d((function(){return Ce({headers:b,hiddenColumns:w})}),[b,w]),S={centerHeaderRef:I,headerContainerRef:C,headersRef:p,hiddenColumns:w,mainTemplateColumns:M,pinnedLeftColumns:y,pinnedLeftTemplateColumns:R,pinnedRightColumns:b,pinnedRightTemplateColumns:E,sort:u},k={flattenedRows:r,headerContainerRef:C,isWidthDragging:i,mainTemplateColumns:M,pinnedLeftColumns:y,pinnedLeftTemplateColumns:R,pinnedLeftWidth:a,pinnedRightColumns:b,pinnedRightTemplateColumns:E,pinnedRightWidth:c,setFlattenedRows:l,setScrollTop:s,visibleRows:h};return n("div",m({className:"st-content ".concat(v?"st-resizeable":"st-not-resizeable"),style:{width:g?"calc(100% - 27.5px)":"100%"}},{children:[e(we,m({},S)),e(le,m({},k))]}))},xe=function(i){var d,c,l=i.mainBodyWidth,s=i.mainBodyRef,u=i.pinnedLeftWidth,h=i.pinnedRightWidth,f=i.setMainBodyWidth,v=i.tableBodyContainerRef,g=D().editColumns,p=r(!1),w=p[0],C=p[1],I=o(null),x=v.current&&v.current.scrollHeight>v.current.clientHeight,y=g?28:0,b=(g?h+1:h)+(v.current&&x?v.current.offsetWidth-v.current.clientWidth:0);return se(s,I),a((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.scrollWidth;f(e)}}()}),1)}),[s,f]),a((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.clientWidth;C(l>e)}}()}),1)}),[s,l,f]),w?n("div",m({className:"st-horizontal-scrollbar-container"},{children:[u>0&&e("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:u,height:null===(d=I.current)||void 0===d?void 0:d.offsetHeight}}),l>0&&e("div",m({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&s.current&&s.current.scrollTo({left:n,behavior:"auto"})},ref:I,style:{flexGrow:1}},{children:e("div",{style:{width:l,height:".3px"}})})),h>0&&e(t,{children:e("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:b,height:null===(c=I.current)||void 0===c?void 0:c.offsetHeight}})}),y>0&&e("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},ye={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return ye.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?ye.string(e,n,t):"number"==typeof e&&"number"==typeof n?ye.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?ye.boolean(e,n,t):ye.string(String(e),String(n),t)}},be=function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return ye.number(i,a,r)}return"date"===t?ye.date(String(e),String(n),r):"boolean"===t?ye.boolean(Boolean(e),Boolean(n),r):"enum"===t?ye.enum(String(e),String(n),r):ye.string(String(e),String(n),r)},Re=function(e,n,t){var r,o=(null===(r=n.key)||void 0===r?void 0:r.type)||"string",i=n.direction,a=new Map,d=new Map,c="";e.forEach((function(e){var t;if(e.rowData&&!0===e.rowMeta.isExpanded&&!0===n.key.expandable){var r=(e.rowData.sector||"group_".concat(a.size)).toString();c=r,d.set(c,e),a.has(c)||a.set(c,[])}else if(c){var o=a.get(c)||[];o.push(e),a.set(c,o)}else{var i="default";a.has(i)||a.set(i,[]),null===(t=a.get(i))||void 0===t||t.push(e)}}));var l=[];return a.forEach((function(e,r){if(d.has(r)){var a=d.get(r);a.rowMeta.children&&a.rowMeta.children.length>0&&(a.rowMeta.children=Me(a.rowMeta.children,n,t)),l.push(a)}var c=w([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,a=e.rowData[r],d=t.rowData[r];return be(a,d,o,i)}));l.push.apply(l,c.map((function(e){var r=m({},e);if(r.rowMeta.children&&r.rowMeta.children.length>0){var o=Me(r.rowMeta.children,n,t);r.rowMeta=m(m({},r.rowMeta),{children:o})}return r})))})),l},Me=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),o=(null==r?void 0:r.type)||"string",i=n.direction;return w([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,a=e.rowData[r],d=t.rowData[r];return be(a,d,o,i)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?m(m({},e),{rowMeta:m(m({},e.rowMeta),{children:Me(e.rowMeta.children,n,t)})}):e}))},Ee=function(e){var n=e.headers,t=e.tableRows,o=r(null),i=o[0],a=o[1],c=d((function(){var e={};return n.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[n]),l=r(c),s=l[0],u=l[1],h=d((function(){if(!i)return t;var e=function(e,n,t){return{sortedData:Re(n,t,e),newSortConfig:t}}(n,t,i).sortedData;return e}),[t,i,n]);return{hiddenColumns:s,setHiddenColumns:u,setSort:a,sort:i,sortedRows:h,updateSort:function(e,t){var r=function(e){for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.accessor===t)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(n);o&&a((function(e){return e&&e.key.accessor===t?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},Se=function(t){var r=t.checked,o=void 0!==r&&r,i=t.children,a=t.onChange;return n("label",m({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e("span",m({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e("span",{className:"st-checkbox-checkmark"})})),i]}))},ke=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var d=a.children.some((function(e){return e.accessor===n})),c=!1;if(!d)for(var l=0,s=a.children;l<s.length;l++){var u=s[l];if(ke([u],n,t,r),!1===t[u.accessor]){c=!0;break}}(d||c)&&(t[a.accessor]=!1)}}},De=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},We=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(We(e.children,n),De(e.children,n)&&(n[e.accessor]=!0))}))},He=function(o){var i=o.allHeaders,a=o.depth,d=void 0===a?0:a,c=o.header,l=o.hiddenColumns,s=o.setHiddenColumns,u=r(!0),h=u[0],f=u[1],v=D(),g=v.expandIcon,p=v.collapseIcon,w=v.headersRef,C=v.setMainBodyWidth,I=v.setPinnedLeftWidth,x=v.setPinnedRightWidth,R="".concat(16*d,"px"),M=c.children&&c.children.length>0,E=l[c.accessor]||M&&c.children&&De(c.children,l);return n(t,{children:[n("div",m({className:"st-header-checkbox-item",style:{paddingLeft:R}},{children:[e("div",m({className:"st-header-icon-container"},{children:M?e("div",m({className:"st-collapsible-header-icon",onClick:function(e){e.stopPropagation(),f(!h)}},{children:h?p:g})):null})),e(Se,m({checked:E,onChange:function(e){var n=m({},l);(n[c.accessor]=e,e)?We(i,n):(ke(i,c.accessor,n),M&&c.children&&c.children.length>0&&c.children.every((function(e){return!0===l[e.accessor]}))&&c.children[0]&&(n[c.children[0].accessor]=!1,ke(i,c.children[0].accessor,n)));s(n),w.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,d=0;n.forEach((function(e){if(!e.hide){var n=y(e).reduce((function(e,n){return e+b(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:d+=n}}));var c=ue(i),l=ue(a);r(c),o(l),t(d)}({headers:w.current,setMainBodyWidth:C,setPinnedLeftWidth:I,setPinnedRightWidth:x})}},{children:c.label}))]})),M&&h&&c.children&&e("div",m({className:"st-nested-headers"},{children:c.children.map((function(n,t){return e(He,{allHeaders:i,depth:d+1,header:n,hiddenColumns:l,setHiddenColumns:s},"".concat(n.accessor,"-").concat(t))}))}))]})},Ne=function(n){var t=n.headers,r=n.open,o=n.position,i=n.setHiddenColumns,a=n.hiddenColumns,d="left"===o?"left":"";return e("div",m({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(d),onClick:function(e){return e.stopPropagation()}},{children:e("div",m({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e(He,{header:n,hiddenColumns:a,setHiddenColumns:i,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},Le=function(t){var o=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,d=t.headers,c=t.hiddenColumns,l=t.position,s=void 0===l?"right":l,u=t.setHiddenColumns,h=r(a),f=h[0],v=h[1];return i?n("div",m({className:"st-column-editor ".concat(f?"open":""," ").concat(s),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e("div",m({className:"st-column-editor-text"},{children:o})),e(Ne,{headers:d,open:f,position:s,setHiddenColumns:u,hiddenColumns:c})]})):null},Te=function(n){var t=r(!1),o=t[0],i=t[1];return a((function(){i(!0)}),[]),o?e(Be,m({},n)):null},Be=function(t){var c=t.allowAnimations,l=void 0!==c&&c,s=t.cellUpdateFlash,h=void 0!==s&&s,v=t.collapseIcon,g=void 0===v?e(T,{className:"st-sort-icon"}):v,p=t.columnEditorPosition,w=void 0===p?"right":p,C=t.columnEditorText,I=void 0===C?"Columns":C,b=t.columnReordering,R=void 0!==b&&b,M=t.columnResizing,S=void 0!==M&&M,D=t.defaultHeaders,B=t.editColumns,O=void 0!==B&&B,P=t.editColumnsInitOpen,F=void 0!==P&&P,A=t.expandIcon,z=void 0===A?e(N,{className:"st-sort-icon"}):A,U=t.height,j=t.hideFooter,Y=void 0!==j&&j,q=t.nextIcon,J=void 0===q?e(N,{className:"st-next-prev-icon"}):q,V=t.onCellEdit,K=t.onColumnOrderChange,X=t.onGridReady,G=t.onNextPage,$=t.prevIcon,_=void 0===$?e(H,{className:"st-next-prev-icon"}):$,Q=t.rowHeight,Z=void 0===Q?40:Q,ee=t.rows,ne=t.rowsPerPage,te=void 0===ne?10:ne,re=t.selectableCells,oe=void 0!==re&&re,ie=t.selectableColumns,ae=void 0!==ie&&ie,de=t.shouldPaginate,ce=void 0!==de&&de,le=t.sortDownIcon,se=void 0===le?e(T,{className:"st-sort-icon"}):le,ue=t.sortUpIcon,he=void 0===ue?e(L,{className:"st-sort-icon"}):ue,fe=t.tableRef,ve=t.theme,me=void 0===ve?"light":ve,ge=t.useHoverRowBackground,pe=void 0===ge||ge,we=t.useOddEvenRowBackground,Ce=void 0===we||we,ye=t.useOddColumnBackground,be=void 0!==ye&&ye;be&&(Ce=!1);var Re=o(null),Me=o(D),Se=o(null),ke=o(null),De=o(null),We=o(null),He=o(null),Ne=r(1),Te=Ne[0],Be=Ne[1],Oe=r(!1),Pe=Oe[0],Fe=Oe[1],Ae=r(0),ze=Ae[0],Ue=Ae[1],je=r(0),Ye=je[0],qe=je[1],Je=r(0),Ve=Je[0],Ke=Je[1],Xe=r(0),Ge=Xe[0],$e=Xe[1],_e=r(0),Qe=_e[0],Ze=_e[1],en=Ee({headers:Me.current,tableRows:ee}),nn=en.sort,tn=en.sortedRows,rn=en.hiddenColumns,on=en.setHiddenColumns,an=en.updateSort;a((function(){null==X||X()}),[X]);var dn=d((function(){if(!ce)return tn;var e=(Te-1)*te,n=e+te;return tn.slice(e,n)}),[Te,te,ce,tn]),cn=r(dn),ln=cn[0],sn=cn[1];a((function(){sn(dn)}),[dn]);var un=d((function(){var e;if(!U)return window.innerHeight-Z;var n=document.querySelector(".simple-table-root"),t=0;if(U.endsWith("px"))t=parseInt(U,10);else if(U.endsWith("vh")){var r=parseInt(U,10);t=window.innerHeight*r/100}else if(U.endsWith("%")){var o=parseInt(U,10);t=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*o/100}else t=window.innerHeight;return Math.max(0,t-Z)}),[U,Z]),hn=d((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.flattenedRows,o=e.rowHeight,i=e.scrollTop,a=o+1,d=[],c=0,l=Math.max(0,i-a*n),s=i+t+a*n,u=function(e,n){for(var t,r=0,o=e;r<o.length;r++){var i=o[r],h=c*a;if(h>=s)break;h+a>l&&d.push({row:i,depth:n,position:c,isLastGroupRow:Boolean(null===(t=i.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),c+=1,i.rowMeta.isExpanded&&i.rowMeta.children&&u(i.rowMeta.children,n+1)}};return u(r,0),d}({bufferRowCount:5,contentHeight:un,flattenedRows:ln,rowHeight:Z,scrollTop:Ge})}),[un,Z,ln,Ge]),fn=f((function(e){return e+1}),0)[1],vn=function(e){var n=e.selectableCells,t=e.headers,c=e.visibleRows,l=r(new Set),s=l[0],u=l[1],h=r(new Set),f=h[0],v=h[1],m=r(null),g=m[0],p=m[1],w=r(null),C=w[0],I=w[1],x=o(!1),b=o(null),R=i((function(){var e=t.flatMap(y).filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var r=Array.from(s).reduce((function(e,t){var r=t.split("-").map(Number),o=r[0],i=r[1];e[o]||(e[o]=[]);var a=n.get(i);return e[o][i]=a?c[o].row.rowData[a]:"",e}),{}),o=Object.values(r).map((function(e){return Object.values(e).join("\t")})).join("\n");s.size>0&&navigator.clipboard.writeText(o)}),[t,s,c]),M=i((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),o=Math.max(e.rowIndex,n.rowIndex),i=Math.min(e.colIndex,n.colIndex),a=Math.max(e.colIndex,n.colIndex),d=r;d<=o;d++)for(var l=i;l<=a;l++)if(d>=0&&d<c.length){var s=c[d].row.rowMeta.rowId;t.add(E({colIndex:l,rowIndex:d,rowId:s}))}v(new Set),p(null),u(t)}),[c,v,p,u]),S=i((function(e){if(e.rowIndex>=0&&e.rowIndex<c.length&&e.colIndex>=0&&e.colIndex<t.length){var n=E(e);v(new Set),p(null),u(new Set([n])),I(e)}}),[t.length,c.length,v,p,u,I]),k=i((function(e,n){void 0===n&&(n=!1),u(new Set),I(null),v((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&p(e[e.length-1])}),[u,I,v,p]);a((function(){var e=function(e){if(n&&C){var r=C.rowIndex,o=C.colIndex,i=C.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(c[r].row.rowMeta.rowId!==i){var a=c.findIndex((function(e){return e.row.rowMeta.rowId===i}));if(-1===a)return;r=a}if("ArrowUp"===e.key){if(e.preventDefault(),r>0){var d={rowIndex:r-1,colIndex:o,rowId:c[r-1].row.rowMeta.rowId};S(d)}}else"ArrowDown"===e.key?(e.preventDefault(),r<c.length-1&&(d={rowIndex:r+1,colIndex:o,rowId:c[r+1].row.rowMeta.rowId},S(d))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),o>0&&(d={rowIndex:r,colIndex:o-1,rowId:c[r].row.rowMeta.rowId},S(d))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),o<t.length-1&&(d={rowIndex:r,colIndex:o+1,rowId:c[r].row.rowMeta.rowId},S(d))):"Escape"===e.key&&(u(new Set),v(new Set),p(null),b.current=null,I(null))}else R()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[R,t.length,C,M,S,n,c]);var D=i((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=E({colIndex:n,rowIndex:t,rowId:r}),i=s.has(o),a=f.has(n);return i||a}),[s,f]),W=i((function(e){var n,t,r,o,i,a,d=e.colIndex,l=e.rowIndex,s=e.rowId,u=[],h=null===(r=null===(t=null===(n=c[l-1])||void 0===n?void 0:n.row)||void 0===t?void 0:t.rowMeta)||void 0===r?void 0:r.rowId,v={colIndex:d,rowIndex:l+1,rowId:null===(a=null===(i=null===(o=c[l+1])||void 0===o?void 0:o.row)||void 0===i?void 0:i.rowMeta)||void 0===a?void 0:a.rowId},m={colIndex:d-1,rowIndex:l,rowId:s},g={colIndex:d+1,rowIndex:l,rowId:s};return(!D({colIndex:d,rowIndex:l-1,rowId:h})||f.has(d)&&0===l)&&u.push("st-selected-top-border"),(!D(v)||f.has(d)&&l===c.length-1)&&u.push("st-selected-bottom-border"),D(m)||u.push("st-selected-left-border"),D(g)||u.push("st-selected-right-border"),u.join(" ")}),[D,c,f]),H=d((function(){return C?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===C.rowIndex&&t===C.colIndex&&r===C.rowId}:function(){return!1}}),[C]);return{getBorderClass:W,handleMouseDown:function(e){var t=e.colIndex,r=e.rowIndex,o=e.rowId;if(n){x.current=!0,b.current={rowIndex:r,colIndex:t,rowId:o},v(new Set),p(null);var i=E({colIndex:t,rowIndex:r,rowId:o});u(new Set([i])),I({rowIndex:r,colIndex:t,rowId:o})}},handleMouseOver:function(e){var t=e.colIndex,r=e.rowIndex;if(e.rowId,n&&x.current&&b.current){for(var o=new Set,i=Math.min(b.current.rowIndex,r),a=Math.max(b.current.rowIndex,r),d=Math.min(b.current.colIndex,t),l=Math.max(b.current.colIndex,t),s=i;s<=a;s++)for(var h=d;h<=l;h++)if(s>=0&&s<c.length){var f=c[s].row.rowMeta.rowId;o.add(E({colIndex:h,rowIndex:s,rowId:f}))}u(o)}},handleMouseUp:function(){x.current=!1},isInitialFocusedCell:H,isSelected:D,lastSelectedColumnIndex:g,selectColumns:k,selectedCells:s,selectedColumns:f,setInitialFocusedCell:I,setSelectedCells:u,setSelectedColumns:v}}({selectableCells:oe,headers:Me.current,visibleRows:hn}),mn=vn.getBorderClass,gn=vn.handleMouseDown,pn=vn.handleMouseOver,wn=vn.handleMouseUp,Cn=vn.isInitialFocusedCell,In=vn.isSelected,xn=vn.selectColumns,yn=vn.selectedCells,bn=vn.selectedColumns,Rn=vn.setInitialFocusedCell,Mn=vn.setSelectedCells,En=vn.setSelectedColumns,Sn=i((function(e,n){an(e,n)}),[an]),kn=i((function(e){Me.current=e,fn()}),[]);a((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||ae&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(yn.size>0&&Mn(new Set),bn.size>0&&En(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[ae,yn,bn,Mn,En]),u((function(){if(He.current){var e=He.current.offsetWidth-He.current.clientWidth;Ze(e)}}),[]),u((function(){var e=function(){if(fn(),He.current){var e=He.current.offsetWidth-He.current.clientWidth;Ze(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var Dn=o(new Map);return a((function(){fe&&(fe.current={updateData:function(e){var n,t,r,o,i=e.accessor,a=e.rowIndex,d=e.newValue,c=null===(t=null===(n=null==ee?void 0:ee[a])||void 0===n?void 0:n.rowMeta)||void 0===t?void 0:t.rowId;if(void 0!==c){var l=x({rowId:c,accessor:i}),s=Dn.current.get(l);s&&s.updateContent(d),void 0!==(null===(o=null===(r=null==ee?void 0:ee[a])||void 0===r?void 0:r.rowData)||void 0===o?void 0:o[i])&&(ee[a].rowData[i]=d)}}})}),[fe,ee]),e(k,m({value:{allowAnimations:l,cellRegistry:Dn.current,cellUpdateFlash:h,collapseIcon:g,columnReordering:R,columnResizing:S,draggedHeaderRef:Re,editColumns:O,expandIcon:z,forceUpdate:fn,getBorderClass:mn,handleMouseDown:gn,handleMouseOver:pn,headersRef:Me,hiddenColumns:rn,hoveredHeaderRef:Se,isInitialFocusedCell:Cn,isSelected:In,mainBodyRef:ke,nextIcon:J,onCellEdit:V,onColumnOrderChange:K,onSort:Sn,onTableHeaderDragEnd:kn,pinnedLeftRef:De,pinnedRightRef:We,prevIcon:_,rowHeight:Z,scrollbarWidth:Qe,selectColumns:xn,selectableColumns:ae,setInitialFocusedCell:Rn,setIsWidthDragging:Fe,setMainBodyWidth:Ue,setPinnedLeftWidth:qe,setPinnedRightWidth:Ke,setSelectedCells:Mn,setSelectedColumns:En,shouldPaginate:ce,sortDownIcon:se,sortUpIcon:he,tableBodyContainerRef:He,useOddColumnBackground:be,useHoverRowBackground:pe,useOddEvenRowBackground:Ce}},{children:e("div",m({className:"simple-table-root st-wrapper theme-".concat(me),style:U?{height:U}:{}},{children:n("div",m({className:"st-wrapper-container"},{children:[n("div",m({className:"st-content-wrapper",onMouseUp:wn,onMouseLeave:wn},{children:[e(Ie,{flattenedRows:ln,isWidthDragging:Pe,pinnedLeftWidth:Ye,pinnedRightWidth:Ve,setFlattenedRows:sn,setScrollTop:$e,sort:nn,visibleRows:hn}),e(Le,{columnEditorText:I,editColumns:O,editColumnsInitOpen:F,headers:Me.current,hiddenColumns:rn,position:w,setHiddenColumns:on})]})),e(xe,{mainBodyRef:ke,mainBodyWidth:ze,pinnedLeftWidth:Ye,pinnedRightWidth:Ve,setMainBodyWidth:Ue,tableBodyContainerRef:He}),e(W,{currentPage:Te,hideFooter:Y,onPageChange:Be,onNextPage:G,shouldPaginate:ce,totalPages:Math.ceil(ee.length/te)})]}))}))}))};export{Te as SimpleTable};
1
+ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as r,useRef as o,useCallback as i,useEffect as a,useMemo as d,createContext as c,useContext as l,forwardRef as s,useLayoutEffect as u,Fragment as h,useReducer as f,createRef as v}from"react";var m=function(){return m=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},m.apply(this,arguments)};function g(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function d(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,d)}c((r=r.apply(e,n||[])).next())}))}function p(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=d(0),a.throw=d(1),a.return=d(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(d){return function(c){return function(d){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&d[0]?r.return:d[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,d[1])).done)return o;switch(r=0,o&&(d=[2&d[0],o.value]),d[0]){case 0:case 1:o=d;break;case 4:return i.label++,{value:d[1],done:!1};case 5:i.label++,r=d[1],d=[0];continue;case 7:d=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==d[0]&&2!==d[0])){i=0;continue}if(3===d[0]&&(!o||d[1]>o[0]&&d[1]<o[3])){i.label=d[1];break}if(6===d[0]&&i.label<o[1]){i.label=o[1],o=d;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(d);break}o[2]&&i.ops.pop(),i.trys.pop();continue}d=n.call(e,i)}catch(e){d=[6,e],r=0}finally{t=o=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([d,c])}}}function w(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var C=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},I=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},x=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},y=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return y(e)})):[e]},b=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(C({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},R=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(C({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){R(e)}))},M=function(e){return"number"==typeof e.minWidth?e.minWidth:40},E=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},S=c(void 0),k=function(n){var t=n.children,r=n.value;return e(S.Provider,m({value:r},{children:t}))},D=function(){var e=l(S);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},W=function(t){var o=t.currentPage,i=t.hideFooter,a=t.onPageChange,d=t.onNextPage,c=t.shouldPaginate,l=t.totalPages,s=D(),u=s.nextIcon,h=s.prevIcon,f=r(!0),v=f[0],w=f[1],C=!(o>1),I=!(o<l)&&!d||!v&&o===l;if(i||!c)return null;var x=function(){if(l<=15)return Array.from({length:l},(function(e,n){return n+1}));var e,n,t=[],r=15;if(o<=Math.ceil(7.5))e=1,n=14;else if(o>=l-Math.floor(7.5))e=Math.max(1,l-r+1),n=l;else{var i=Math.floor(7);e=o-i,n=o+(r-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<l-1&&(t.push(-1),t.push(l)),t}();return n("div",m({className:"st-footer"},{children:[e("button",m({className:"st-next-prev-btn ".concat(C?"disabled":""),onClick:function(){var e=o-1;e>=1&&a(e)},disabled:C},{children:h})),e("button",m({className:"st-next-prev-btn ".concat(I?"disabled":""),onClick:function(){return g(void 0,void 0,void 0,(function(){var e,n;return p(this,(function(t){switch(t.label){case 0:return e=o===l,n=o+1,d&&e?[4,d(o)]:[3,2];case 1:if(!t.sent())return w(!1),[2];t.label=2;case 2:return(n<=l||d)&&a(n),[2]}}))}))},disabled:I},{children:u})),x.map((function(n,t){return n<0?e("span",m({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e("button",m({onClick:function(){return function(e){e>=1&&e<=l&&a(e)}(n)},className:"st-page-btn ".concat(o===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},H=function(n){var t=n.className;return e("svg",m({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},N=function(n){var t=n.className;return e("svg",m({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},L=function(n){var t=n.className;return e("svg",m({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},T=function(e){return e.position*(e.rowHeight+1)-1},B=function(e){return e.position*(e.rowHeight+1)},O=function(n){var t=n.children,i=n.onClose,d=n.open,c=n.setOpen,l=n.width,s=n.containerRef,u=D(),h=null==u?void 0:u.mainBodyRef,f=o(null),v=o(null),g=r("bottom-left"),p=g[0],w=g[1],C=r({}),I=C[0],x=C[1],y=r(!1),b=y[0],R=y[1];return a((function(){d&&f.current?(R(!1),!v.current&&f.current.parentElement&&(v.current=f.current.parentElement),requestAnimationFrame((function(){if(f.current&&v.current){var e,n=f.current,t=v.current.getBoundingClientRect(),r=n.offsetHeight,o=l||n.offsetWidth,i=(e=(null==s?void 0:s.current)?s.current.getBoundingClientRect():(null==h?void 0:h.current)?h.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,d="bottom",c={};(r>i&&r<=a||r>i&&a>i)&&(d="top");var u="left";o>e.right-t.right+t.width&&(u="right"),"bottom"===d?c.top=t.bottom+4:c.bottom=window.innerHeight-t.top+4,"left"===u?c.left=t.left:c.right=window.innerWidth-t.right,w("".concat(d,"-").concat(u)),x(c),R(!0)}}))):d||R(!1)}),[d,l,s,h]),a((function(){var e=function(e){if(d&&f.current){var n=e.target;f.current&&!f.current.contains(n)&&(c(!1),null==i||i())}};return d&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[d,i,c]),a((function(){var e=function(e){f.current&&!f.current.contains(e.target)&&(c(!1),null==i||i())};return d&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,d,c]),a((function(){var e=function(e){"Escape"===e.key&&d&&(c(!1),null==i||i())};return d&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,d,c]),d?e("div",m({ref:f,className:"st-dropdown-content st-dropdown-".concat(p),style:m({width:l?"".concat(l,"px"):"auto",visibility:b?"visible":"hidden"},I)},{children:t})):null},P=function(n){var t=n.children,r=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,d=void 0!==a&&a,c=n.className,l=void 0===c?"":c;return e("div",m({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(d?"disabled":""," ").concat(l),onClick:function(){!d&&r&&r()},role:"option","aria-selected":i,"aria-disabled":d},{children:t}))},F=function(t){var o=t.onBlur,i=t.onChange,d=t.open,c=t.setOpen,l=t.value,s=r(l),u=s[0],h=s[1];a((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var f=function(e){h(e),i(e),c(!1),o()};return n(O,m({open:d,onClose:function(){o()},setOpen:c,width:120},{children:[e(P,m({isSelected:!0===u,onClick:function(){return f(!0)}},{children:"True"})),e(P,m({isSelected:!1===u,onClick:function(){return f(!1)}},{children:"False"}))]}))},A=function(n){var t=n.defaultValue,r=n.onBlur,i=n.onChange,a=o(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(e){var n=e.target.value;i(n)}})},z=function(n){var t=n.defaultValue,r=n.onBlur,i=n.onChange,a=o(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:t.toString(),onBlur:r,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},U=function(o){var i,a,d=o.value,c=o.onChange,l=o.onClose,s=D(),u=s.nextIcon,h=s.prevIcon,f=r(d||new Date),v=f[0],g=f[1],p=r("days"),w=p[0],C=p[1],I=function(e,n){return new Date(e,n+1,0).getDate()};return n("div",m({className:"st-datepicker"},{children:[n("div",m({className:"st-datepicker-header"},{children:["days"===w&&n(t,{children:[e("button",m({onClick:function(){g(new Date(v.getFullYear(),v.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:h})),n("div",m({className:"st-datepicker-header-label",onClick:function(){return C("months")}},{children:[(a=v,a.toLocaleString("default",{month:"long"}))," ",v.getFullYear()]})),e("button",m({onClick:function(){g(new Date(v.getFullYear(),v.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:u}))]}),"months"===w&&e("div",m({className:"st-datepicker-header-label",onClick:function(){return C("years")}},{children:v.getFullYear()})),"years"===w&&e("div",m({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),n("div",m({className:"st-datepicker-grid st-datepicker-".concat(w,"-grid")},{children:["days"===w&&function(){var n=[],t=v.getFullYear(),r=v.getMonth(),o=I(t,r),i=function(e,n){return new Date(e,n,1).getDay()}(t,r),a=I(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e("div",m({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var s=function(t){var r=a-i+t+1;n.push(e("div",m({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()-1,e);g(n),c(n),null==l||l()}(r)}},{children:r}),"prev-".concat(r)))},u=0;u<i;u++)s(u);for(var h=function(o){var i=o===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),a=o===new Date(d).getDate()&&r===new Date(d).getMonth()&&t===new Date(d).getFullYear();n.push(e("div",m({className:"st-datepicker-day ".concat(i?"today":""," ").concat(a?"selected":""),onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth(),e);g(n),c(n),null==l||l()}(o)}},{children:o}),"day-".concat(o)))},f=1;f<=o;f++)h(f);var p=35-(i+o),w=function(t){n.push(e("div",m({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()+1,e);g(n),c(n),null==l||l()}(t)}},{children:t}),"next-".concat(t)))};for(f=1;f<=p;f++)w(f);return n}(),"months"===w&&(i=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var r=t===v.getMonth();i.push(e("div",m({className:"st-datepicker-month ".concat(r?"selected":""),onClick:function(){return function(e){g(new Date(v.getFullYear(),e,1)),C("days")}(t)}},{children:n}),"month-".concat(t)))})),i),"years"===w&&function(){for(var n=[],t=v.getFullYear(),r=t-6,o=function(r){var o=r===t;n.push(e("div",m({className:"st-datepicker-year ".concat(o?"selected":""),onClick:function(){return function(e){g(new Date(e,v.getMonth(),1)),C("months")}(r)}},{children:r}),"year-".concat(r)))},i=r;i<r+12;i++)o(i);return n}()]})),e("div",m({className:"st-datepicker-footer"},{children:e("button",m({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;g(e),c(e),null==l||l()}},{children:"Today"}))}))]}))},j=function(n){var t=n.onBlur,o=n.onChange,i=n.open,d=n.setOpen,c=n.value,l=r(function(e){var n=e.split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setUTCFullYear(t),i.setUTCMonth(r-1),i.setUTCDate(o),isNaN(i.getTime())?new Date:i}(c)),s=l[0],u=l[1];a((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var h=function(){t()};return e(O,m({open:i,onClose:h,setOpen:d,width:280},{children:e(U,{value:s,onChange:function(e){u(e),o(e.toISOString()),d(!1),t()},onClose:h})}))},Y=function(n){var t=n.onBlur,o=n.onChange,i=n.open,d=n.options,c=n.setOpen,l=n.value,s=r(l||""),u=s[0],h=s[1];a((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);return e(O,m({open:i,onClose:function(){t()},setOpen:c,width:150},{children:e("div",m({className:"st-enum-dropdown-content"},{children:d.map((function(n){return e(P,m({isSelected:u===n,onClick:function(){return h(e=n),o(e),c(!1),void t();var e}},{children:n}),n)}))}))}))},q=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,d=void 0===a?"string":a,c=n.value,l=function(){i(!1)};if("boolean"===d&&"boolean"==typeof c)return e(F,{onBlur:l,onChange:function(e){return o(e)},open:!0,setOpen:i,value:c});if("date"===d)return e(j,{onBlur:l,onChange:function(e){return o(e)},open:!0,setOpen:i,value:"string"==typeof c?c:""});if("enum"===d)return e(Y,{onBlur:l,onChange:function(e){return o(e)},open:!0,options:r,setOpen:i,value:"string"==typeof c?c:""});if("number"===d&&"number"==typeof c)return e(z,{defaultValue:c,onBlur:l,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var s=null==c?"":String(c);return e(A,{defaultValue:s,onBlur:l,onChange:function(e){return o(e)}})},J=0,V=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===J||o-J>=r)&&(J=o,n(t))}},K=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(K);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=K(e[t]));return n},X=Date.now(),G={screenX:0,screenY:0},$=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return w(w([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=$(o.children,n,w(w([],t,!0),[r],!1));if(i)return i}}return null};var _=function(e){var n,t,r=e.draggedHeaderRef,i=e.headersRef,d=e.hoveredHeaderRef,c=e.onColumnOrderChange,l=e.onTableHeaderDragEnd,s=(n=i.current,t=o(n),a((function(){JSON.stringify(t.current)!==JSON.stringify(n)&&(t.current=n)}),[n]),t.current);return{handleDragStart:function(e){r.current=e,X=Date.now()},handleDragOver:function(e){var n,t,o=e.event,a=e.hoveredHeader;if(o.preventDefault(),i.current){var c=o.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=o.screenX,h=o.screenY,f=Math.sqrt(Math.pow(u-G.screenX,2)+Math.pow(h-G.screenY,2));d.current=a;var v=i.current,m=$(v,(null===(n=r.current)||void 0===n?void 0:n.accessor)||""),g=$(v,a.accessor);if(m&&g){var p=m.length,w=g.length,C=g;if(p!==w){var I=w-p;I>0&&(C=g.slice(0,-I))}var x=function(e,n,t){var r=K(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var d=i(r,n);return a(r,n,i(r,t)),a(r,t,d),{newHeaders:r,emergencyBreak:o}}(v,m,C),y=x.newHeaders,b=x.emergencyBreak;if(!(c||a.accessor===(null===(t=r.current)||void 0===t?void 0:t.accessor)||null===r.current||f<10||0===m.length||0===C.length||JSON.stringify(y)===JSON.stringify(i.current)||b)){var R=Date.now();JSON.stringify(y)===JSON.stringify(s)&&(R-X<1500||f<40)||(X=R,G={screenX:u,screenY:h},l(y))}}}},handleDragEnd:function(){r.current=null,d.current=null,null==c||c(i.current)}}},Q=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},Z=s((function(t,d){var c,l,s=t.borderClass,u=t.colIndex,h=t.header,f=t.isHighlighted,v=t.isInitialFocused,g=t.nestedIndex,p=t.onExpandRowClick,w=t.rowIndex,I=t.visibleRow,y=D(),b=y.cellRegistry,R=y.cellUpdateFlash,M=y.collapseIcon,E=y.draggedHeaderRef,S=y.expandIcon,k=y.handleMouseDown,W=y.handleMouseOver,H=y.headersRef,N=y.hoveredHeaderRef,L=y.onCellEdit,T=y.onTableHeaderDragEnd,B=y.useOddColumnBackground,O=I.depth,P=I.row,F=r(P.rowData[h.accessor]),A=F[0],z=F[1],U=r(!1),j=U[0],Y=U[1],J=r(!1),K=J[0],X=J[1],G=o(null),$=_({draggedHeaderRef:E,headersRef:H,hoveredHeaderRef:N,onTableHeaderDragEnd:T}).handleDragOver,Z=V(),ee="cell-".concat(w,"-").concat(u),ne=x({rowId:P.rowMeta.rowId,accessor:h.accessor});a((function(){if(b){var e="".concat(P.rowMeta.rowId,"-").concat(h.accessor);return b.set(e,{updateContent:function(e){A!==e?(z(e),R&&(X(!0),G.current&&clearTimeout(G.current),G.current=setTimeout((function(){X(!1)}),800))):z(e)}}),function(){b.delete(e),G.current&&clearTimeout(G.current)}}}),[b,R,P.rowMeta.rowId,h.accessor,A]),a((function(){if(K){var e=setTimeout((function(){X(!1)}),850);return function(){return clearTimeout(e)}}}),[K]),a((function(){z(P.rowData[h.accessor])}),[P.rowData,h.accessor]),a((function(){f||Y(!1)}),[f]);var te="boolean"===h.type||"date"===h.type||"enum"===h.type,re=Boolean(null===(l=null===(c=P.rowMeta)||void 0===c?void 0:c.children)||void 0===l?void 0:l.length),oe=Boolean(null==h?void 0:h.isEditable),ie="st-cell ".concat(O>0&&h.expandable?"st-cell-depth-".concat(O):""," ").concat(f?v?"st-cell-selected-first ".concat(s):"st-cell-selected ".concat(s):""," ").concat(oe?"clickable":""," ").concat(K?"st-cell-updating":""," ").concat(B?g%2==0?"even-column":"odd-column":""),ae=i((function(e){z(e),null==L||L({accessor:h.accessor,newValue:e,row:P})}),[h.accessor,L,P]);return j&&!te?e("div",m({className:"st-cell-editing",id:C({accessor:h.accessor,rowIndex:w+1})},{children:e(q,{enumOptions:h.enumOptions,onChange:ae,setIsEditing:Y,type:h.type,value:A})})):n("div",m({className:ie,id:ee,onDoubleClick:function(){return h.isEditable&&Y(!0)},onMouseDown:function(){return k({rowIndex:w,colIndex:u,rowId:P.rowMeta.rowId})},onMouseOver:function(){return W({rowIndex:w,colIndex:u,rowId:P.rowMeta.rowId})},onDragOver:function(e){return Z({callback:$,callbackProps:{event:e,hoveredHeader:h},limit:50})},onKeyDown:function(e){"F2"!==e.key&&"Enter"!==e.key||!h.isEditable||j||(e.preventDefault(),Y(!0))},ref:d,"data-row-index":w,"data-col-index":u,"data-row-id":P.rowMeta.rowId,"data-accessor":h.accessor},{children:[h.expandable&&re?P.rowMeta.isExpanded?e("div",m({className:"st-sort-icon-container",onClick:function(){return p(P.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:M})):e("div",m({className:"st-sort-icon-container",onClick:function(){return p(P.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:S})):null,e("span",m({className:"st-cell-content ".concat("right"===h.align?"right-aligned":"center"===h.align?"center-aligned":"left-aligned")},{children:e("span",{children:h.cellRenderer?h.cellRenderer({accessor:h.accessor,colIndex:u,row:P}):Q({content:A,header:h})})})),j&&te&&e(q,{enumOptions:h.enumOptions,onChange:ae,setIsEditing:Y,type:h.type,value:A})]}),ne)})),ee=function(n){var r=n.children,o=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}(n,["children"]);return D().allowAnimations?e(ne,m({},o,{children:r})):e(t,{children:r})},ne=function(n){var i=n.children,d=n.isBody,c=n.pauseAnimation,l=n.rowIndex,s=o(!1),h=D(),f=h.draggedHeaderRef,v=h.headersRef,m=h.mainBodyRef,g=h.shouldPaginate,p=r({}),w=p[0],I=p[1],x=o({}),y=v.current;return u((function(){if(y){var e=function(e){var n=e.currentHeaders,t=e.draggedHeaderRef,r=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(C({accessor:e.accessor,rowIndex:r}));if(i){var a=i.getAnimations().some((function(e){return"running"===e.playState})),d=i.getBoundingClientRect();a&&(null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=d}}})),o}({currentHeaders:y,draggedHeaderRef:f,rowIndex:l});JSON.stringify(e)!==JSON.stringify(w)&&(x.current=w,I(e))}}),[w,y,f,d,l]),u((function(){var e=m.current,n=function(){s.current=!0},t=function(){s.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",t),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",t)}}),[f,m]),a((function(){c||s.current||Object.keys(x.current).length&&y&&y.forEach((function(e){var n=document.getElementById(C({accessor:e.accessor,rowIndex:l}));if(n){var t=x.current[e.accessor],r=w[e.accessor];if(t&&r){var o=t.left-r.left,i=g?0:t.top-r.top,a=Math.abs(o),d=Math.abs(i);(a>10||d>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(o,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[w,y,d,c,x,l,g]),e(t,{children:i})},te=function(n){var t=n.columnIndexStart,r=n.columnIndices,o=n.headers,i=n.hiddenColumns,a=n.isWidthDragging,d=n.onExpandRowClick,c=n.pinned,l=n.rowIndex,s=n.rowIndices,u=n.visibleRow,h=o.filter((function(e){return I({hiddenColumns:i,header:e,pinned:c})}));return e(ee,m({isBody:!0,pauseAnimation:a,rowIndex:l+1},{children:h.map((function(n,a){return e(re,{columnIndices:r,header:n,headers:o,hiddenColumns:i,nestedIndex:a+(null!=t?t:0),onExpandRowClick:d,pinned:c,rowIndex:l,rowIndices:s,visibleRow:u},C({accessor:n.accessor,rowIndex:l+1}))}))}))},re=function(n){var t=n.columnIndices,r=n.header,o=n.headers,i=n.hiddenColumns,a=n.nestedIndex,d=n.onExpandRowClick,c=n.pinned,l=n.rowIndex,s=n.rowIndices,u=n.visibleRow,f=t[r.accessor],v=D(),m=v.getBorderClass,g=v.isSelected,p=v.isInitialFocusedCell;if(r.children){var w=r.children.filter((function(e){return I({hiddenColumns:i,header:e,pinned:c})}));return e(h,{children:w.map((function(n){return e(re,{columnIndices:t,header:n,headers:o,hiddenColumns:i,nestedIndex:a,onExpandRowClick:d,pinned:c,rowIndex:l,rowIndices:s,visibleRow:u},C({accessor:n.accessor,rowIndex:l+1}))}))})}var x={rowIndex:l,colIndex:f,rowId:u.row.rowMeta.rowId},y=m(x),b=g(x),R=p(x);return e(Z,{borderClass:y,colIndex:f,header:r,isHighlighted:b,isInitialFocused:R,nestedIndex:a,onExpandRowClick:d,rowIndex:l,visibleRow:u},C({accessor:r.accessor,rowIndex:l+1}))},oe=function(n){var t=n.columnIndices,r=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.hiddenColumns,d=n.hoveredIndex,c=n.index,l=n.isWidthDragging,s=n.onExpandRowClick,u=n.pinned,h=n.rowHeight,f=n.rowIndices,v=n.setHoveredIndex,g=n.visibleRow,p=D().useHoverRowBackground,w=g.position;return e("div",m({className:"st-row ".concat(w%2==0?"even":"odd"," ").concat(d===c&&p?"hovered":""),onMouseEnter:function(){v(c)},style:{gridTemplateColumns:o,top:B({position:w,rowHeight:h}),height:"".concat(h,"px")}},{children:e(te,{columnIndexStart:r,columnIndices:t,headers:i,hiddenColumns:a,isWidthDragging:l,onExpandRowClick:s,pinned:u,rowIndex:c,rowIndices:f,visibleRow:g},c)}))},ie=function(n){var t=n.displayStrongBorder,r=n.position,o=n.rowHeight,i=n.templateColumns;return e("div",m({className:"st-row-separator ".concat(t?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:i,position:"absolute",top:T({position:r,rowHeight:o}),minWidth:"100%"}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},ae=function(t){var r=t.columnIndexStart,o=t.columnIndices,i=t.headers,a=t.hiddenColumns,d=t.hoveredIndex,c=t.isWidthDragging,l=t.onExpandRowClick,s=t.pinned,u=t.ref,f=t.rowHeight,v=t.rowIndices,g=t.setHoveredIndex,p=t.templateColumns,w=t.totalHeight,C=t.visibleRows,I=t.width,x=s?"st-body-pinned-".concat(s):"st-body-main";return e("div",m({className:x,ref:u,style:m({position:"relative",height:"".concat(w,"px"),width:I},!s&&{flexGrow:1})},{children:C.map((function(t,u){var m,w,I=C[u-1],x=Boolean((null==I?void 0:I.depth)!==(null==t?void 0:t.depth)&&(null===(w=null===(m=null==t?void 0:t.row.rowMeta)||void 0===m?void 0:m.children)||void 0===w?void 0:w.length)&&0===t.depth);return n(h,{children:[0!==u&&e(ie,{displayStrongBorder:x,position:t.position,rowHeight:f,templateColumns:p}),e(oe,{columnIndexStart:r,columnIndices:o,gridTemplateColumns:p,headers:i,hiddenColumns:a,hoveredIndex:d,index:u,isWidthDragging:c,onExpandRowClick:l,pinned:s,rowHeight:f,rowIndices:v,setHoveredIndex:g,visibleRow:t})]},t.position)}))}))};function de(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,d=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 I({hiddenColumns:t,header:e})})).forEach((function(e,n){d(e,0===n)}))};return r.forEach((function(e,n){d(e,0===n)})),n.current.filter((function(e){return!e.pinned&&I({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;d(e,t)})),o.forEach((function(e){d(e,!1)})),i}var ce=function(t){var i=t.flattenedRows,c=t.headerContainerRef,l=t.isWidthDragging,s=t.mainTemplateColumns,u=t.pinnedLeftColumns,h=t.pinnedLeftTemplateColumns,f=t.pinnedLeftWidth,v=t.pinnedRightColumns,g=t.pinnedRightTemplateColumns,p=t.pinnedRightWidth,w=t.setFlattenedRows,C=t.setScrollTop,I=t.visibleRows,x=D(),y=x.headersRef,b=x.hiddenColumns,R=x.mainBodyRef,M=x.rowHeight,E=x.scrollbarWidth,S=x.tableBodyContainerRef,k=r(null),W=k[0],H=k[1];!function(e){var n=e.headerContainerRef,t=e.mainSectionRef,o=e.scrollbarWidth,i=r(!1),d=i[0],c=i[1];a((function(){var e=null==n?void 0:n.current;if(d&&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")}}),[n,d,o]),a((function(){var e=null==n?void 0:n.current,r=null==t?void 0:t.current;if(r&&e){var o=function(){if(r){var e=r.scrollHeight>r.clientHeight;c(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(r),function(){r&&i.unobserve(r)}}}),[n,t])}({headerContainerRef:c,mainSectionRef:S,scrollbarWidth:E});var N,L,T=o(null),B=(N=0,(L=function(e){e.forEach((function(e){N+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&L(e.rowMeta.children)}))})(i),N)*(M+1)-1,O=d((function(){return de({headersRef:y,hiddenColumns:b,pinnedLeftColumns:u,pinnedRightColumns:v})}),[y,b,u,v]),P=d((function(){var e={};return I.forEach((function(n,t){var r=String(n.row.rowMeta.rowId);e[r]=t})),e}),[I]),F=function(e){var n=function(t){return t.rowMeta.rowId===e&&t.rowMeta.children?m(m({},t),{rowMeta:m(m({},t.rowMeta),{isExpanded:!t.rowMeta.isExpanded})}):t.rowMeta.children?m(m({},t),{rowMeta:m(m({},t.rowMeta),{children:t.rowMeta.children.map(n)})}):t};w((function(e){return e.map(n)}))},A={columnIndices:O,headerContainerRef:c,headers:y.current,hiddenColumns:b,hoveredIndex:W,isWidthDragging:l,rowHeight:M,rowIndices:P,setHoveredIndex:H,visibleRows:I};return n("div",m({className:"st-body-container",onMouseLeave:function(){return H(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;T.current&&cancelAnimationFrame(T.current),T.current=requestAnimationFrame((function(){C(n)}))},ref:S},{children:[u.length>0&&e(ae,m({},A,{onExpandRowClick:F,pinned:"left",templateColumns:h,totalHeight:B,width:f})),e(ae,m({},A,{columnIndexStart:u.length,onExpandRowClick:F,ref:R,templateColumns:s,totalHeight:B})),v.length>0&&e(ae,m({},A,{columnIndexStart:u.length+s.length,onExpandRowClick:F,pinned:"right",templateColumns:g,totalHeight:B,width:p}))]}))},le=function(e,n){a((function(){if(e.current){var t=e.current,r=function(){var e,r=null==t?void 0:t.scrollLeft;void 0!==r&&(null===(e=n.current)||void 0===e||e.scrollTo(r,0))};return t.addEventListener("scroll",r),function(){null==t||t.removeEventListener("scroll",r)}}}),[e,n])},se=function(e){return void 0===e&&(e=0),e?e+1:0},ue=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,d=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:y(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=b(e))})))})),n.pinned?se(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(d):"right"===n.pinned?a(d):n.pinned||o(d)},he=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,d=e.setIsWidthDragging,c=e.setMainBodyWidth,l=e.setPinnedLeftWidth,s=e.setPinnedRightWidth,u=e.startWidth;d(!0),n.preventDefault();var h=n.clientX;if(i&&!i.hide){var f=M(i),v=r-o>1,m=v?y(i):[i],g=function(e){var n="right"===i.pinned?h-e.clientX:e.clientX-h;if(v&&m.length>1)fe({delta:n,header:i,headersRef:a,leafHeaders:m,minWidth:f,setMainBodyWidth:c,setPinnedLeftWidth:l,setPinnedRightWidth:s,startWidth:u});else{var r=Math.max(u+n,f);i.width=r,ue({header:i,headers:a.current,newWidth:r,setMainBodyWidth:c,setPinnedLeftWidth:l,setPinnedRightWidth:s})}a.current.forEach((function(e){R(e)})),t()},p=function(){document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",p),d(!1)};document.addEventListener("mousemove",g),document.addEventListener("mouseup",p)}},fe=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,d=e.setPinnedLeftWidth,c=e.setPinnedRightWidth,l=e.startWidth,s=o.reduce((function(e,n){return Math.min(e,M(n))}),40),u=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(l+n,s);ue({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:d,setPinnedRightWidth:c});var f=h-u;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/u),r=Math.max(n+t,i);e.width=r}))},ve=s((function(t,r){var o,i,d=t.colIndex,c=t.forceHeadersUpdate,l=t.gridColumnEnd,s=t.gridColumnStart,u=t.gridRowEnd,h=t.gridRowStart,f=t.header,v=t.reverse,g=t.sort,p=D(),I=p.columnReordering,x=p.columnResizing,y=p.draggedHeaderRef,b=p.forceUpdate,R=p.headersRef,M=p.hoveredHeaderRef,E=p.onColumnOrderChange,S=p.onSort,k=p.onTableHeaderDragEnd,W=p.rowHeight,H=p.selectColumns,N=p.selectableColumns,L=p.setInitialFocusedCell,T=p.setIsWidthDragging,B=p.setMainBodyWidth,O=p.setPinnedLeftWidth,P=p.setPinnedRightWidth,F=p.setSelectedCells,A=p.setSelectedColumns,z=p.sortDownIcon,U=p.sortUpIcon,j=Boolean(null==f?void 0:f.isSortable),Y="st-header-cell ".concat(f.accessor===(null===(o=M.current)||void 0===o?void 0:o.accessor)?"st-hovered":""," ").concat((null===(i=y.current)||void 0===i?void 0:i.accessor)===f.accessor?"st-dragging":""," ").concat(j?"clickable":""," ").concat(I&&!j?"columnReordering":""," ").concat(f.children?"parent":""),q=_({draggedHeaderRef:y,headersRef:R,hoveredHeaderRef:M,onColumnOrderChange:E,onTableHeaderDragEnd:k}),J=q.handleDragStart,K=q.handleDragEnd,X=q.handleDragOver,G=V(),$=function(e){var n=e.event,t=e.header;if(N){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var d=a[i];o=r(d,o)}return o};return r(e,n),t}(t,d);return n.shiftKey&&H?A((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,d,c,l,s=w(w([],(a=o,d=n,c=Math.min(a,d),l=Math.max(a,d),Array.from({length:l-c+1},(function(e,n){return c+n}))),!0),r,!0);return new Set(w(w([],Array.from(e),!0),s,!0))})):H&&H(r),F(new Set),void L(null)}t.isSortable&&S(d,t.accessor)};if(a((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!f)return null;var Q=x&&e("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;G({callback:he,callbackProps:{event:e.nativeEvent,forceUpdate:b,gridColumnEnd:l,gridColumnStart:s,header:f,headersRef:R,setIsWidthDragging:T,setMainBodyWidth:B,setPinnedLeftWidth:O,setPinnedRightWidth:P,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}}),Z=g&&g.key.accessor===f.accessor&&n("div",m({className:"st-sort-icon-container",onClick:function(e){return $({event:e,header:f})}},{children:["ascending"===g.direction&&U&&U,"descending"===g.direction&&z&&z]}));return n("div",m({className:Y,id:C({accessor:f.accessor,rowIndex:0}),onDragOver:function(e){G({callback:X,callbackProps:{event:e,hoveredHeader:f},limit:50})},ref:r,style:m(m({gridRowStart:h,gridRowEnd:u,gridColumnStart:s,gridColumnEnd:l},l-s>1?{}:{width:f.width}),u-h>1?{}:{height:W})},{children:[v&&Q,"right"===f.align&&Z,e("div",m({className:"st-header-label",draggable:I&&!f.disableReorder,onClick:function(e){return $({event:e,header:f})},onDragEnd:function(e){e.preventDefault(),K(),c()},onDragStart:function(e){I&&f&&function(e){J(e)}(f)}},{children:e("span",m({className:"st-header-label-text ".concat("right"===f.align?"right-aligned":"center"===f.align?"center-aligned":"left-aligned")},{children:null==f?void 0:f.label}))})),"right"!==f.align&&Z,!v&&Q]}))})),me=function(n){var t=n.columnIndices,r=n.gridTemplateColumns,o=n.handleScroll,i=n.headersRef,a=n.hiddenColumns,c=n.maxDepth,l=n.pinned,s=n.sectionRef,u=n.sort,h=f((function(e){return e+1}),0)[1],g=d((function(){var e=[],n=1,r=function(o,i,d){var s,u;if(void 0===d&&(d=!1),!I({hiddenColumns:a,header:o,pinned:l}))return 0;d||n++;var h=null!==(u=null===(s=o.children)||void 0===s?void 0:s.filter((function(e){return I({hiddenColumns:a,header:e,pinned:l})})).length)&&void 0!==u?u:0,f=n,v=h>0?f+h:f+1,m=i,g=h>0?i+1:c+1;if(e.push({header:o,gridColumnStart:f,gridColumnEnd:v,gridRowStart:m,gridRowEnd:g,colIndex:t[o.accessor]}),o.children){var p=!0;o.children.forEach((function(e){I({hiddenColumns:a,header:e,pinned:l})&&(r(e,i+1,p),p=!1)}))}return v-f},o=i.current.filter((function(e){return I({hiddenColumns:a,header:e,pinned:l})})),d=!0;return o.forEach((function(e){r(e,1,d),d=!1})),e}),[i,a,c,l,t]);return e("div",m({className:"st-header-".concat(l?"pinned-".concat(l):"main")},o&&{onScroll:o},{ref:s,style:{gridTemplateColumns:r,display:"grid",position:"relative"}},{children:e(ee,m({rowIndex:0},{children:g.map((function(n){return e(ve,{colIndex:n.colIndex,forceHeadersUpdate:h,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,ref:v(),reverse:"right"===l,sort:u},n.header.accessor)}))}))}))},ge=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(ge)):1},pe=function(t){var r=t.centerHeaderRef,o=t.headerContainerRef,i=t.headersRef,a=t.hiddenColumns,c=t.mainTemplateColumns,l=t.pinnedLeftColumns,s=t.pinnedLeftTemplateColumns,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.sort,g=D(),p=g.mainBodyRef,w=g.pinnedLeftRef,C=g.pinnedRightRef,x=g.setPinnedLeftWidth,y=g.setPinnedRightWidth;le(p,r);var b=d((function(){return de({headersRef:i,hiddenColumns:a,pinnedLeftColumns:l,pinnedRightColumns:h})}),[i,a,l,h]),R=d((function(){var e=i.current,n=0;return e.forEach((function(e){if(I({hiddenColumns:a,header:e})){var t=ge(e);n=Math.max(n,t)}})),{maxDepth:n}}),[i,a]).maxDepth;return u((function(){var e,n;x(se(null===(e=w.current)||void 0===e?void 0:e.clientWidth)),y(se(null===(n=C.current)||void 0===n?void 0:n.clientWidth))}),[w,C,x,y]),n("div",m({className:"st-header-container",ref:o},{children:[l.length>0&&e(me,{columnIndices:b,gridTemplateColumns:s,handleScroll:void 0,headersRef:i,hiddenColumns:a,maxDepth:R,pinned:"left",sectionRef:w,sort:v}),e(me,{columnIndices:b,gridTemplateColumns:c,handleScroll:function(e){var n,t,o=null===(n=r.current)||void 0===n?void 0:n.scrollLeft;void 0!==o&&(null===(t=p.current)||void 0===t||t.scrollTo(o,0))},headersRef:i,hiddenColumns:a,maxDepth:R,sectionRef:r,sort:v}),h.length>0&&e(me,{columnIndices:b,gridTemplateColumns:f,handleScroll:void 0,headersRef:i,hiddenColumns:a,maxDepth:R,pinned:"right",sectionRef:C,sort:v})]}))},we=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},Ce=function(t){var r=t.flattenedRows,i=t.isWidthDragging,a=t.pinnedLeftWidth,c=t.pinnedRightWidth,l=t.setFlattenedRows,s=t.setScrollTop,u=t.sort,h=t.visibleRows,f=D(),v=f.columnResizing,g=f.editColumns,p=f.headersRef,w=f.hiddenColumns,C=o(null),I=o(null),x=p.current.filter((function(e){return!e.pinned})),y=p.current.filter((function(e){return"left"===e.pinned})),b=p.current.filter((function(e){return"right"===e.pinned})),R=d((function(){return we({headers:y,hiddenColumns:w})}),[y,w]),M=d((function(){return we({headers:x,hiddenColumns:w})}),[x,w]),E=d((function(){return we({headers:b,hiddenColumns:w})}),[b,w]),S={centerHeaderRef:I,headerContainerRef:C,headersRef:p,hiddenColumns:w,mainTemplateColumns:M,pinnedLeftColumns:y,pinnedLeftTemplateColumns:R,pinnedRightColumns:b,pinnedRightTemplateColumns:E,sort:u},k={flattenedRows:r,headerContainerRef:C,isWidthDragging:i,mainTemplateColumns:M,pinnedLeftColumns:y,pinnedLeftTemplateColumns:R,pinnedLeftWidth:a,pinnedRightColumns:b,pinnedRightTemplateColumns:E,pinnedRightWidth:c,setFlattenedRows:l,setScrollTop:s,visibleRows:h};return n("div",m({className:"st-content ".concat(v?"st-resizeable":"st-not-resizeable"),style:{width:g?"calc(100% - 27.5px)":"100%"}},{children:[e(pe,m({},S)),e(ce,m({},k))]}))},Ie=function(i){var d,c,l=i.mainBodyWidth,s=i.mainBodyRef,u=i.pinnedLeftWidth,h=i.pinnedRightWidth,f=i.setMainBodyWidth,v=i.tableBodyContainerRef,g=D().editColumns,p=r(!1),w=p[0],C=p[1],I=o(null),x=v.current&&v.current.scrollHeight>v.current.clientHeight,y=g?28:0,b=(g?h+1:h)+(v.current&&x?v.current.offsetWidth-v.current.clientWidth:0);return le(s,I),a((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.scrollWidth;f(e)}}()}),1)}),[s,f]),a((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.clientWidth;C(l>e)}}()}),1)}),[s,l,f]),w?n("div",m({className:"st-horizontal-scrollbar-container"},{children:[u>0&&e("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:u,height:null===(d=I.current)||void 0===d?void 0:d.offsetHeight}}),l>0&&e("div",m({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&s.current&&s.current.scrollTo({left:n,behavior:"auto"})},ref:I,style:{flexGrow:1}},{children:e("div",{style:{width:l,height:".3px"}})})),h>0&&e(t,{children:e("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:b,height:null===(c=I.current)||void 0===c?void 0:c.offsetHeight}})}),y>0&&e("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},xe={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return xe.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?xe.string(e,n,t):"number"==typeof e&&"number"==typeof n?xe.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?xe.boolean(e,n,t):xe.string(String(e),String(n),t)}},ye=function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return xe.number(i,a,r)}return"date"===t?xe.date(String(e),String(n),r):"boolean"===t?xe.boolean(Boolean(e),Boolean(n),r):"enum"===t?xe.enum(String(e),String(n),r):xe.string(String(e),String(n),r)},be=function(e,n,t){var r,o=(null===(r=n.key)||void 0===r?void 0:r.type)||"string",i=n.direction,a=new Map,d=new Map,c="";e.forEach((function(e){var t;if(e.rowData&&!0===e.rowMeta.isExpanded&&!0===n.key.expandable){var r=(e.rowData.sector||"group_".concat(a.size)).toString();c=r,d.set(c,e),a.has(c)||a.set(c,[])}else if(c){var o=a.get(c)||[];o.push(e),a.set(c,o)}else{var i="default";a.has(i)||a.set(i,[]),null===(t=a.get(i))||void 0===t||t.push(e)}}));var l=[];return a.forEach((function(e,r){if(d.has(r)){var a=d.get(r);a.rowMeta.children&&a.rowMeta.children.length>0&&(a.rowMeta.children=Re(a.rowMeta.children,n,t)),l.push(a)}var c=w([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,a=e.rowData[r],d=t.rowData[r];return ye(a,d,o,i)}));l.push.apply(l,c.map((function(e){var r=m({},e);if(r.rowMeta.children&&r.rowMeta.children.length>0){var o=Re(r.rowMeta.children,n,t);r.rowMeta=m(m({},r.rowMeta),{children:o})}return r})))})),l},Re=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),o=(null==r?void 0:r.type)||"string",i=n.direction;return w([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,a=e.rowData[r],d=t.rowData[r];return ye(a,d,o,i)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?m(m({},e),{rowMeta:m(m({},e.rowMeta),{children:Re(e.rowMeta.children,n,t)})}):e}))},Me=function(e){var n=e.headers,t=e.tableRows,o=r(null),i=o[0],a=o[1],c=d((function(){var e={};return n.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[n]),l=r(c),s=l[0],u=l[1],h=d((function(){if(!i)return t;var e=function(e,n,t){return{sortedData:be(n,t,e),newSortConfig:t}}(n,t,i).sortedData;return e}),[t,i,n]);return{hiddenColumns:s,setHiddenColumns:u,setSort:a,sort:i,sortedRows:h,updateSort:function(e,t){var r=function(e){for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.accessor===t)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(n);o&&a((function(e){return e&&e.key.accessor===t?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},Ee=function(t){var r=t.checked,o=void 0!==r&&r,i=t.children,a=t.onChange;return n("label",m({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e("span",m({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e("span",{className:"st-checkbox-checkmark"})})),i]}))},Se=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var d=a.children.some((function(e){return e.accessor===n})),c=!1;if(!d)for(var l=0,s=a.children;l<s.length;l++){var u=s[l];if(Se([u],n,t,r),!1===t[u.accessor]){c=!0;break}}(d||c)&&(t[a.accessor]=!1)}}},ke=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},De=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(De(e.children,n),ke(e.children,n)&&(n[e.accessor]=!0))}))},We=function(o){var i=o.allHeaders,a=o.depth,d=void 0===a?0:a,c=o.header,l=o.hiddenColumns,s=o.setHiddenColumns,u=r(!0),h=u[0],f=u[1],v=D(),g=v.expandIcon,p=v.collapseIcon,w=v.headersRef,C=v.setMainBodyWidth,I=v.setPinnedLeftWidth,x=v.setPinnedRightWidth,R="".concat(16*d,"px"),M=c.children&&c.children.length>0,E=l[c.accessor]||M&&c.children&&ke(c.children,l);return n(t,{children:[n("div",m({className:"st-header-checkbox-item",style:{paddingLeft:R}},{children:[e("div",m({className:"st-header-icon-container"},{children:M?e("div",m({className:"st-collapsible-header-icon",onClick:function(e){e.stopPropagation(),f(!h)}},{children:h?p:g})):null})),e(Ee,m({checked:E,onChange:function(e){var n=m({},l);(n[c.accessor]=e,e)?De(i,n):(Se(i,c.accessor,n),M&&c.children&&c.children.length>0&&c.children.every((function(e){return!0===l[e.accessor]}))&&c.children[0]&&(n[c.children[0].accessor]=!1,Se(i,c.children[0].accessor,n)));s(n),w.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,d=0;n.forEach((function(e){if(!e.hide){var n=y(e).reduce((function(e,n){return e+b(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:d+=n}}));var c=se(i),l=se(a);r(c),o(l),t(d)}({headers:w.current,setMainBodyWidth:C,setPinnedLeftWidth:I,setPinnedRightWidth:x})}},{children:c.label}))]})),M&&h&&c.children&&e("div",m({className:"st-nested-headers"},{children:c.children.map((function(n,t){return e(We,{allHeaders:i,depth:d+1,header:n,hiddenColumns:l,setHiddenColumns:s},"".concat(n.accessor,"-").concat(t))}))}))]})},He=function(n){var t=n.headers,r=n.open,o=n.position,i=n.setHiddenColumns,a=n.hiddenColumns,d="left"===o?"left":"";return e("div",m({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(d),onClick:function(e){return e.stopPropagation()}},{children:e("div",m({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e(We,{header:n,hiddenColumns:a,setHiddenColumns:i,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},Ne=function(t){var o=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,d=t.headers,c=t.hiddenColumns,l=t.position,s=void 0===l?"right":l,u=t.setHiddenColumns,h=r(a),f=h[0],v=h[1];return i?n("div",m({className:"st-column-editor ".concat(f?"open":""," ").concat(s),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e("div",m({className:"st-column-editor-text"},{children:o})),e(He,{headers:d,open:f,position:s,setHiddenColumns:u,hiddenColumns:c})]})):null},Le=function(n){var t=n.className;return e("svg",m({"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"down-long",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},Te=function(n){var t=n.className;return e("svg",m({"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"up-long",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},Be=function(n){var t=r(!1),o=t[0],i=t[1];return a((function(){i(!0)}),[]),o?e(Oe,m({},n)):null},Oe=function(t){var c=t.allowAnimations,l=void 0!==c&&c,s=t.cellUpdateFlash,h=void 0!==s&&s,v=t.collapseIcon,g=void 0===v?e(L,{className:"st-sort-icon"}):v,p=t.columnEditorPosition,w=void 0===p?"right":p,C=t.columnEditorText,I=void 0===C?"Columns":C,b=t.columnReordering,R=void 0!==b&&b,M=t.columnResizing,S=void 0!==M&&M,D=t.defaultHeaders,T=t.editColumns,B=void 0!==T&&T,O=t.editColumnsInitOpen,P=void 0!==O&&O,F=t.expandIcon,A=void 0===F?e(N,{className:"st-sort-icon"}):F,z=t.height,U=t.hideFooter,j=void 0!==U&&U,Y=t.nextIcon,q=void 0===Y?e(N,{className:"st-next-prev-icon"}):Y,J=t.onCellEdit,V=t.onColumnOrderChange,K=t.onGridReady,X=t.onNextPage,G=t.prevIcon,$=void 0===G?e(H,{className:"st-next-prev-icon"}):G,_=t.rowHeight,Q=void 0===_?40:_,Z=t.rows,ee=t.rowsPerPage,ne=void 0===ee?10:ee,te=t.selectableCells,re=void 0!==te&&te,oe=t.selectableColumns,ie=void 0!==oe&&oe,ae=t.shouldPaginate,de=void 0!==ae&&ae,ce=t.sortDownIcon,le=void 0===ce?e(Le,{className:"st-sort-icon"}):ce,se=t.sortUpIcon,ue=void 0===se?e(Te,{className:"st-sort-icon"}):se,he=t.tableRef,fe=t.theme,ve=void 0===fe?"light":fe,me=t.useHoverRowBackground,ge=void 0===me||me,pe=t.useOddEvenRowBackground,we=void 0===pe||pe,xe=t.useOddColumnBackground,ye=void 0!==xe&&xe;ye&&(we=!1);var be=o(null),Re=o(D),Ee=o(null),Se=o(null),ke=o(null),De=o(null),We=o(null),He=r(1),Be=He[0],Oe=He[1],Pe=r(!1),Fe=Pe[0],Ae=Pe[1],ze=r(0),Ue=ze[0],je=ze[1],Ye=r(0),qe=Ye[0],Je=Ye[1],Ve=r(0),Ke=Ve[0],Xe=Ve[1],Ge=r(0),$e=Ge[0],_e=Ge[1],Qe=r(0),Ze=Qe[0],en=Qe[1],nn=Me({headers:Re.current,tableRows:Z}),tn=nn.sort,rn=nn.sortedRows,on=nn.hiddenColumns,an=nn.setHiddenColumns,dn=nn.updateSort;a((function(){null==K||K()}),[K]);var cn=d((function(){if(!de)return rn;var e=(Be-1)*ne,n=e+ne;return rn.slice(e,n)}),[Be,ne,de,rn]),ln=r(cn),sn=ln[0],un=ln[1];a((function(){un(cn)}),[cn]);var hn=d((function(){var e;if(!z)return window.innerHeight-Q;var n=document.querySelector(".simple-table-root"),t=0;if(z.endsWith("px"))t=parseInt(z,10);else if(z.endsWith("vh")){var r=parseInt(z,10);t=window.innerHeight*r/100}else if(z.endsWith("%")){var o=parseInt(z,10);t=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*o/100}else t=window.innerHeight;return Math.max(0,t-Q)}),[z,Q]),fn=d((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.flattenedRows,o=e.rowHeight,i=e.scrollTop,a=o+1,d=[],c=0,l=Math.max(0,i-a*n),s=i+t+a*n,u=function(e,n){for(var t,r=0,o=e;r<o.length;r++){var i=o[r],h=c*a;if(h>=s)break;h+a>l&&d.push({row:i,depth:n,position:c,isLastGroupRow:Boolean(null===(t=i.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),c+=1,i.rowMeta.isExpanded&&i.rowMeta.children&&u(i.rowMeta.children,n+1)}};return u(r,0),d}({bufferRowCount:5,contentHeight:hn,flattenedRows:sn,rowHeight:Q,scrollTop:$e})}),[hn,Q,sn,$e]),vn=f((function(e){return e+1}),0)[1],mn=function(e){var n=e.selectableCells,t=e.headers,c=e.visibleRows,l=r(new Set),s=l[0],u=l[1],h=r(new Set),f=h[0],v=h[1],m=r(null),g=m[0],p=m[1],w=r(null),C=w[0],I=w[1],x=o(!1),b=o(null),R=i((function(){var e=t.flatMap(y).filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var r=Array.from(s).reduce((function(e,t){var r=t.split("-").map(Number),o=r[0],i=r[1];e[o]||(e[o]=[]);var a=n.get(i);return e[o][i]=a?c[o].row.rowData[a]:"",e}),{}),o=Object.values(r).map((function(e){return Object.values(e).join("\t")})).join("\n");s.size>0&&navigator.clipboard.writeText(o)}),[t,s,c]),M=i((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),o=Math.max(e.rowIndex,n.rowIndex),i=Math.min(e.colIndex,n.colIndex),a=Math.max(e.colIndex,n.colIndex),d=r;d<=o;d++)for(var l=i;l<=a;l++)if(d>=0&&d<c.length){var s=c[d].row.rowMeta.rowId;t.add(E({colIndex:l,rowIndex:d,rowId:s}))}v(new Set),p(null),u(t)}),[c,v,p,u]),S=i((function(e){if(e.rowIndex>=0&&e.rowIndex<c.length&&e.colIndex>=0&&e.colIndex<t.length){var n=E(e);v(new Set),p(null),u(new Set([n])),I(e)}}),[t.length,c.length,v,p,u,I]),k=i((function(e,n){void 0===n&&(n=!1),u(new Set),I(null),v((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&p(e[e.length-1])}),[u,I,v,p]);a((function(){var e=function(e){if(n&&C){var r=C.rowIndex,o=C.colIndex,i=C.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(c[r].row.rowMeta.rowId!==i){var a=c.findIndex((function(e){return e.row.rowMeta.rowId===i}));if(-1===a)return;r=a}if("ArrowUp"===e.key){if(e.preventDefault(),r>0){var d={rowIndex:r-1,colIndex:o,rowId:c[r-1].row.rowMeta.rowId};S(d)}}else"ArrowDown"===e.key?(e.preventDefault(),r<c.length-1&&(d={rowIndex:r+1,colIndex:o,rowId:c[r+1].row.rowMeta.rowId},S(d))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),o>0&&(d={rowIndex:r,colIndex:o-1,rowId:c[r].row.rowMeta.rowId},S(d))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),o<t.length-1&&(d={rowIndex:r,colIndex:o+1,rowId:c[r].row.rowMeta.rowId},S(d))):"Escape"===e.key&&(u(new Set),v(new Set),p(null),b.current=null,I(null))}else R()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[R,t.length,C,M,S,n,c]);var D=i((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=E({colIndex:n,rowIndex:t,rowId:r}),i=s.has(o),a=f.has(n);return i||a}),[s,f]),W=i((function(e){var n,t,r,o,i,a,d=e.colIndex,l=e.rowIndex,s=e.rowId,u=[],h=null===(r=null===(t=null===(n=c[l-1])||void 0===n?void 0:n.row)||void 0===t?void 0:t.rowMeta)||void 0===r?void 0:r.rowId,v={colIndex:d,rowIndex:l+1,rowId:null===(a=null===(i=null===(o=c[l+1])||void 0===o?void 0:o.row)||void 0===i?void 0:i.rowMeta)||void 0===a?void 0:a.rowId},m={colIndex:d-1,rowIndex:l,rowId:s},g={colIndex:d+1,rowIndex:l,rowId:s};return(!D({colIndex:d,rowIndex:l-1,rowId:h})||f.has(d)&&0===l)&&u.push("st-selected-top-border"),(!D(v)||f.has(d)&&l===c.length-1)&&u.push("st-selected-bottom-border"),D(m)||u.push("st-selected-left-border"),D(g)||u.push("st-selected-right-border"),u.join(" ")}),[D,c,f]),H=d((function(){return C?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===C.rowIndex&&t===C.colIndex&&r===C.rowId}:function(){return!1}}),[C]);return{getBorderClass:W,handleMouseDown:function(e){var t=e.colIndex,r=e.rowIndex,o=e.rowId;if(n){x.current=!0,b.current={rowIndex:r,colIndex:t,rowId:o},v(new Set),p(null);var i=E({colIndex:t,rowIndex:r,rowId:o});u(new Set([i])),I({rowIndex:r,colIndex:t,rowId:o})}},handleMouseOver:function(e){var t=e.colIndex,r=e.rowIndex;if(e.rowId,n&&x.current&&b.current){for(var o=new Set,i=Math.min(b.current.rowIndex,r),a=Math.max(b.current.rowIndex,r),d=Math.min(b.current.colIndex,t),l=Math.max(b.current.colIndex,t),s=i;s<=a;s++)for(var h=d;h<=l;h++)if(s>=0&&s<c.length){var f=c[s].row.rowMeta.rowId;o.add(E({colIndex:h,rowIndex:s,rowId:f}))}u(o)}},handleMouseUp:function(){x.current=!1},isInitialFocusedCell:H,isSelected:D,lastSelectedColumnIndex:g,selectColumns:k,selectedCells:s,selectedColumns:f,setInitialFocusedCell:I,setSelectedCells:u,setSelectedColumns:v}}({selectableCells:re,headers:Re.current,visibleRows:fn}),gn=mn.getBorderClass,pn=mn.handleMouseDown,wn=mn.handleMouseOver,Cn=mn.handleMouseUp,In=mn.isInitialFocusedCell,xn=mn.isSelected,yn=mn.selectColumns,bn=mn.selectedCells,Rn=mn.selectedColumns,Mn=mn.setInitialFocusedCell,En=mn.setSelectedCells,Sn=mn.setSelectedColumns,kn=i((function(e,n){dn(e,n)}),[dn]),Dn=i((function(e){Re.current=e,vn()}),[]);a((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||ie&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(bn.size>0&&En(new Set),Rn.size>0&&Sn(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[ie,bn,Rn,En,Sn]),u((function(){if(We.current){var e=We.current.offsetWidth-We.current.clientWidth;en(e)}}),[]),u((function(){var e=function(){if(vn(),We.current){var e=We.current.offsetWidth-We.current.clientWidth;en(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var Wn=o(new Map);return a((function(){he&&(he.current={updateData:function(e){var n,t,r,o,i=e.accessor,a=e.rowIndex,d=e.newValue,c=null===(t=null===(n=null==Z?void 0:Z[a])||void 0===n?void 0:n.rowMeta)||void 0===t?void 0:t.rowId;if(void 0!==c){var l=x({rowId:c,accessor:i}),s=Wn.current.get(l);s&&s.updateContent(d),void 0!==(null===(o=null===(r=null==Z?void 0:Z[a])||void 0===r?void 0:r.rowData)||void 0===o?void 0:o[i])&&(Z[a].rowData[i]=d)}}})}),[he,Z]),e(k,m({value:{allowAnimations:l,cellRegistry:Wn.current,cellUpdateFlash:h,collapseIcon:g,columnReordering:R,columnResizing:S,draggedHeaderRef:be,editColumns:B,expandIcon:A,forceUpdate:vn,getBorderClass:gn,handleMouseDown:pn,handleMouseOver:wn,headersRef:Re,hiddenColumns:on,hoveredHeaderRef:Ee,isInitialFocusedCell:In,isSelected:xn,mainBodyRef:Se,nextIcon:q,onCellEdit:J,onColumnOrderChange:V,onSort:kn,onTableHeaderDragEnd:Dn,pinnedLeftRef:ke,pinnedRightRef:De,prevIcon:$,rowHeight:Q,scrollbarWidth:Ze,selectColumns:yn,selectableColumns:ie,setInitialFocusedCell:Mn,setIsWidthDragging:Ae,setMainBodyWidth:je,setPinnedLeftWidth:Je,setPinnedRightWidth:Xe,setSelectedCells:En,setSelectedColumns:Sn,shouldPaginate:de,sortDownIcon:le,sortUpIcon:ue,tableBodyContainerRef:We,useOddColumnBackground:ye,useHoverRowBackground:ge,useOddEvenRowBackground:we}},{children:e("div",m({className:"simple-table-root st-wrapper theme-".concat(ve),style:z?{height:z}:{}},{children:n("div",m({className:"st-wrapper-container"},{children:[n("div",m({className:"st-content-wrapper",onMouseUp:Cn,onMouseLeave:Cn},{children:[e(Ce,{flattenedRows:sn,isWidthDragging:Fe,pinnedLeftWidth:qe,pinnedRightWidth:Ke,setFlattenedRows:un,setScrollTop:_e,sort:tn,visibleRows:fn}),e(Ne,{columnEditorText:I,editColumns:B,editColumnsInitOpen:P,headers:Re.current,hiddenColumns:on,position:w,setHiddenColumns:an})]})),e(Ie,{mainBodyRef:Se,mainBodyWidth:Ue,pinnedLeftWidth:qe,pinnedRightWidth:Ke,setMainBodyWidth:je,tableBodyContainerRef:We}),e(W,{currentPage:Be,hideFooter:j,onPageChange:Oe,onNextPage:X,shouldPaginate:de,totalPages:Math.ceil(Z.length/ne)})]}))}))}))};export{Be as SimpleTable};
2
2
  //# sourceMappingURL=index.es.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};function r(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{d(r.next(e))}catch(e){i(e)}}function c(e){try{d(r.throw(e))}catch(e){i(e)}}function d(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}d((r=r.apply(e,n||[])).next())}))}function o(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(d){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,d])}}}function i(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var a=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},c=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},d=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},s=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return s(e)})):[e]},l=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(a({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},u=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(a({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){u(e)}))},h=function(e){return"number"==typeof e.minWidth?e.minWidth:40},f=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},v=n.createContext(void 0),m=function(n){var r=n.children,o=n.value;return e.jsx(v.Provider,t({value:o},{children:r}))},g=function(){var e=n.useContext(v);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},p=function(i){var a=i.currentPage,c=i.hideFooter,d=i.onPageChange,s=i.onNextPage,l=i.shouldPaginate,u=i.totalPages,h=g(),f=h.nextIcon,v=h.prevIcon,m=n.useState(!0),p=m[0],w=m[1],x=!(a>1),C=!(a<u)&&!s||!p&&a===u;if(c||!l)return null;var I=function(){if(u<=15)return Array.from({length:u},(function(e,n){return n+1}));var e,n,t=[],r=15;if(a<=Math.ceil(7.5))e=1,n=14;else if(a>=u-Math.floor(7.5))e=Math.max(1,u-r+1),n=u;else{var o=Math.floor(7);e=a-o,n=a+(r-o-1)}for(var i=e;i<=n;i++)t.push(i);return n<u-1&&(t.push(-1),t.push(u)),t}();return e.jsxs("div",t({className:"st-footer"},{children:[e.jsx("button",t({className:"st-next-prev-btn ".concat(x?"disabled":""),onClick:function(){var e=a-1;e>=1&&d(e)},disabled:x},{children:v})),e.jsx("button",t({className:"st-next-prev-btn ".concat(C?"disabled":""),onClick:function(){return r(void 0,void 0,void 0,(function(){var e,n;return o(this,(function(t){switch(t.label){case 0:return e=a===u,n=a+1,s&&e?[4,s(a)]:[3,2];case 1:if(!t.sent())return w(!1),[2];t.label=2;case 2:return(n<=u||s)&&d(n),[2]}}))}))},disabled:C},{children:f})),I.map((function(n,r){return n<0?e.jsx("span",t({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e.jsx("button",t({onClick:function(){return function(e){e>=1&&e<=u&&d(e)}(n)},className:"st-page-btn ".concat(a===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},w=function(n){var r=n.className;return e.jsx("svg",t({className:r,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"})}))},x=function(n){var r=n.className;return e.jsx("svg",t({className:r,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"})}))},C=function(n){var r=n.className;return e.jsx("svg",t({className:r,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"})}))},I=function(n){var r=n.className;return e.jsx("svg",t({className:r,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"})}))},y=function(e){return e.position*(e.rowHeight+1)-1},b=function(e){return e.position*(e.rowHeight+1)},R=function(r){var o=r.children,i=r.onClose,a=r.open,c=r.setOpen,d=r.width,s=r.containerRef,l=g(),u=null==l?void 0:l.mainBodyRef,h=n.useRef(null),f=n.useRef(null),v=n.useState("bottom-left"),m=v[0],p=v[1],w=n.useState({}),x=w[0],C=w[1],I=n.useState(!1),y=I[0],b=I[1];return n.useEffect((function(){a&&h.current?(b(!1),!f.current&&h.current.parentElement&&(f.current=h.current.parentElement),requestAnimationFrame((function(){if(h.current&&f.current){var e,n=h.current,t=f.current.getBoundingClientRect(),r=n.offsetHeight,o=d||n.offsetWidth,i=(e=(null==s?void 0:s.current)?s.current.getBoundingClientRect():(null==u?void 0:u.current)?u.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,c="bottom",l={};(r>i&&r<=a||r>i&&a>i)&&(c="top");var v="left";o>e.right-t.right+t.width&&(v="right"),"bottom"===c?l.top=t.bottom+4:l.bottom=window.innerHeight-t.top+4,"left"===v?l.left=t.left:l.right=window.innerWidth-t.right,p("".concat(c,"-").concat(v)),C(l),b(!0)}}))):a||b(!1)}),[a,d,s,u]),n.useEffect((function(){var e=function(e){if(a&&h.current){var n=e.target;h.current&&!h.current.contains(n)&&(c(!1),null==i||i())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,i,c]),n.useEffect((function(){var e=function(e){h.current&&!h.current.contains(e.target)&&(c(!1),null==i||i())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,a,c]),n.useEffect((function(){var e=function(e){"Escape"===e.key&&a&&(c(!1),null==i||i())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,a,c]),a?e.jsx("div",t({ref:h,className:"st-dropdown-content st-dropdown-".concat(m),style:t({width:d?"".concat(d,"px"):"auto",visibility:y?"visible":"hidden"},x)},{children:o})):null},M=function(n){var r=n.children,o=n.onClick,i=n.isSelected,a=void 0!==i&&i,c=n.disabled,d=void 0!==c&&c,s=n.className,l=void 0===s?"":s;return e.jsx("div",t({className:"st-dropdown-item ".concat(a?"selected":""," ").concat(d?"disabled":""," ").concat(l),onClick:function(){!d&&o&&o()},role:"option","aria-selected":a,"aria-disabled":d},{children:r}))},S=function(r){var o=r.onBlur,i=r.onChange,a=r.open,c=r.setOpen,d=r.value,s=n.useState(d),l=s[0],u=s[1];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 h=function(e){u(e),i(e),c(!1),o()};return e.jsxs(R,t({open:a,onClose:function(){o()},setOpen:c,width:120},{children:[e.jsx(M,t({isSelected:!0===l,onClick:function(){return h(!0)}},{children:"True"})),e.jsx(M,t({isSelected:!1===l,onClick:function(){return h(!1)}},{children:"False"}))]}))},E=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;i(n)}})},j=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},k=function(r){var o,i,a=r.value,c=r.onChange,d=r.onClose,s=g(),l=s.nextIcon,u=s.prevIcon,h=n.useState(a||new Date),f=h[0],v=h[1],m=n.useState("days"),p=m[0],w=m[1],x=function(e,n){return new Date(e,n+1,0).getDate()};return e.jsxs("div",t({className:"st-datepicker"},{children:[e.jsxs("div",t({className:"st-datepicker-header"},{children:["days"===p&&e.jsxs(e.Fragment,{children:[e.jsx("button",t({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:u})),e.jsxs("div",t({className:"st-datepicker-header-label",onClick:function(){return w("months")}},{children:[(i=f,i.toLocaleString("default",{month:"long"}))," ",f.getFullYear()]})),e.jsx("button",t({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:l}))]}),"months"===p&&e.jsx("div",t({className:"st-datepicker-header-label",onClick:function(){return w("years")}},{children:f.getFullYear()})),"years"===p&&e.jsx("div",t({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),e.jsxs("div",t({className:"st-datepicker-grid st-datepicker-".concat(p,"-grid")},{children:["days"===p&&function(){var n=[],r=f.getFullYear(),o=f.getMonth(),i=x(r,o),s=function(e,n){return new Date(e,n,1).getDay()}(r,o),l=x(r,o-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(r,o){n.push(e.jsx("div",t({className:"st-datepicker-weekday"},{children:r}),"header-".concat(o)))}));for(var u=function(r){var o=l-s+r+1;n.push(e.jsx("div",t({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()-1,e);v(n),c(n),null==d||d()}(o)}},{children:o}),"prev-".concat(o)))},h=0;h<s;h++)u(h);for(var m=function(i){var s=i===(new Date).getDate()&&o===(new Date).getMonth()&&r===(new Date).getFullYear(),l=i===new Date(a).getDate()&&o===new Date(a).getMonth()&&r===new Date(a).getFullYear();n.push(e.jsx("div",t({className:"st-datepicker-day ".concat(s?"today":""," ").concat(l?"selected":""),onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth(),e);v(n),c(n),null==d||d()}(i)}},{children:i}),"day-".concat(i)))},g=1;g<=i;g++)m(g);var p=35-(s+i),w=function(r){n.push(e.jsx("div",t({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()+1,e);v(n),c(n),null==d||d()}(r)}},{children:r}),"next-".concat(r)))};for(g=1;g<=p;g++)w(g);return n}(),"months"===p&&(o=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,r){var i=r===f.getMonth();o.push(e.jsx("div",t({className:"st-datepicker-month ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(f.getFullYear(),e,1)),w("days")}(r)}},{children:n}),"month-".concat(r)))})),o),"years"===p&&function(){for(var n=[],r=f.getFullYear(),o=r-6,i=function(o){var i=o===r;n.push(e.jsx("div",t({className:"st-datepicker-year ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(e,f.getMonth(),1)),w("months")}(o)}},{children:o}),"year-".concat(o)))},a=o;a<o+12;a++)i(a);return n}()]})),e.jsx("div",t({className:"st-datepicker-footer"},{children:e.jsx("button",t({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;v(e),c(e),null==d||d()}},{children:"Today"}))}))]}))},D=function(r){var o=r.onBlur,i=r.onChange,a=r.open,c=r.setOpen,d=r.value,s=n.useState(function(e){var n=e.split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setUTCFullYear(t),i.setUTCMonth(r-1),i.setUTCDate(o),isNaN(i.getTime())?new Date:i}(d)),l=s[0],u=s[1];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 h=function(){o()};return e.jsx(R,t({open:a,onClose:h,setOpen:c,width:280},{children:e.jsx(k,{value:l,onChange:function(e){u(e),i(e.toISOString()),c(!1),o()},onClose:h})}))},W=function(r){var o=r.onBlur,i=r.onChange,a=r.open,c=r.options,d=r.setOpen,s=r.value,l=n.useState(s||""),u=l[0],h=l[1];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)}}),[]);return e.jsx(R,t({open:a,onClose:function(){o()},setOpen:d,width:150},{children:e.jsx("div",t({className:"st-enum-dropdown-content"},{children:c.map((function(n){return e.jsx(M,t({isSelected:u===n,onClick:function(){return h(e=n),i(e),d(!1),void o();var e}},{children:n}),n)}))}))}))},H=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,c=void 0===a?"string":a,d=n.value,s=function(){i(!1)};if("boolean"===c&&"boolean"==typeof d)return e.jsx(S,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:d});if("date"===c){var l="string"==typeof d?d:"";return e.jsx(D,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l})}if("enum"===c){var u="string"==typeof d?d:"";return e.jsx(W,{onBlur:s,onChange:function(e){return o(e)},open:!0,options:r,setOpen:i,value:u})}if("number"===c&&"number"==typeof d)return e.jsx(j,{defaultValue:d,onBlur:s,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var h=null==d?"":String(d);return e.jsx(E,{defaultValue:h,onBlur:s,onChange:function(e){return o(e)}})},N=0,L=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===N||o-N>=r)&&(N=o,n(t))}},T=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(T);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=T(e[t]));return n},B=Date.now(),O={screenX:0,screenY:0},P=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return i(i([],t,!0),[r],!1);if(o.children&&o.children.length>0){var a=P(o.children,n,i(i([],t,!0),[r],!1));if(a)return a}}return null};var F=function(e){var t,r,o=e.draggedHeaderRef,i=e.headersRef,a=e.hoveredHeaderRef,c=e.onColumnOrderChange,d=e.onTableHeaderDragEnd,s=(t=i.current,r=n.useRef(t),n.useEffect((function(){JSON.stringify(r.current)!==JSON.stringify(t)&&(r.current=t)}),[t]),r.current);return{handleDragStart:function(e){o.current=e,B=Date.now()},handleDragOver:function(e){var n,t,r=e.event,c=e.hoveredHeader;if(r.preventDefault(),i.current){var l=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=r.screenX,h=r.screenY,f=Math.sqrt(Math.pow(u-O.screenX,2)+Math.pow(h-O.screenY,2));a.current=c;var v=i.current,m=P(v,(null===(n=o.current)||void 0===n?void 0:n.accessor)||""),g=P(v,c.accessor);if(m&&g){var p=m.length,w=g.length,x=g;if(p!==w){var C=w-p;C>0&&(x=g.slice(0,-C))}var I=function(e,n,t){var r=T(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var c=i(r,n);return a(r,n,i(r,t)),a(r,t,c),{newHeaders:r,emergencyBreak:o}}(v,m,x),y=I.newHeaders,b=I.emergencyBreak;if(!(l||c.accessor===(null===(t=o.current)||void 0===t?void 0:t.accessor)||null===o.current||f<10||0===m.length||0===x.length||JSON.stringify(y)===JSON.stringify(i.current)||b)){var R=Date.now();JSON.stringify(y)===JSON.stringify(s)&&(R-B<1500||f<40)||(B=R,O={screenX:u,screenY:h},d(y))}}}},handleDragEnd:function(){o.current=null,a.current=null,null==c||c(i.current)}}},A=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},z=n.forwardRef((function(r,o){var i,c,s=r.borderClass,l=r.colIndex,u=r.header,h=r.isHighlighted,f=r.isInitialFocused,v=r.nestedIndex,m=r.onExpandRowClick,p=r.rowIndex,w=r.visibleRow,x=g(),C=x.cellRegistry,I=x.cellUpdateFlash,y=x.collapseIcon,b=x.draggedHeaderRef,R=x.expandIcon,M=x.handleMouseDown,S=x.handleMouseOver,E=x.headersRef,j=x.hoveredHeaderRef,k=x.onCellEdit,D=x.onTableHeaderDragEnd,W=x.useOddColumnBackground,N=w.depth,T=w.row,B=n.useState(T.rowData[u.accessor]),O=B[0],P=B[1],z=n.useState(!1),U=z[0],Y=z[1],q=n.useState(!1),J=q[0],V=q[1],K=n.useRef(null),X=F({draggedHeaderRef:b,headersRef:E,hoveredHeaderRef:j,onTableHeaderDragEnd:D}).handleDragOver,G=L(),_="cell-".concat(p,"-").concat(l),$=d({rowId:T.rowMeta.rowId,accessor:u.accessor});n.useEffect((function(){if(C){var e="".concat(T.rowMeta.rowId,"-").concat(u.accessor);return C.set(e,{updateContent:function(e){O!==e?(P(e),I&&(V(!0),K.current&&clearTimeout(K.current),K.current=setTimeout((function(){V(!1)}),800))):P(e)}}),function(){C.delete(e),K.current&&clearTimeout(K.current)}}}),[C,I,T.rowMeta.rowId,u.accessor,O]),n.useEffect((function(){if(J){var e=setTimeout((function(){V(!1)}),850);return function(){return clearTimeout(e)}}}),[J]),n.useEffect((function(){P(T.rowData[u.accessor])}),[T.rowData,u.accessor]),n.useEffect((function(){h||Y(!1)}),[h]);var Q="boolean"===u.type||"date"===u.type||"enum"===u.type,Z=Boolean(null===(c=null===(i=T.rowMeta)||void 0===i?void 0:i.children)||void 0===c?void 0:c.length),ee=Boolean(null==u?void 0:u.isEditable),ne="st-cell ".concat(N>0&&u.expandable?"st-cell-depth-".concat(N):""," ").concat(h?f?"st-cell-selected-first ".concat(s):"st-cell-selected ".concat(s):""," ").concat(ee?"clickable":""," ").concat(J?"st-cell-updating":""," ").concat(W?v%2==0?"even-column":"odd-column":""),te=n.useCallback((function(e){P(e),null==k||k({accessor:u.accessor,newValue:e,row:T})}),[u.accessor,k,T]);return U&&!Q?e.jsx("div",t({className:"st-cell-editing",id:a({accessor:u.accessor,rowIndex:p+1})},{children:e.jsx(H,{enumOptions:u.enumOptions,onChange:te,setIsEditing:Y,type:u.type,value:O})})):e.jsxs("div",t({className:ne,id:_,onDoubleClick:function(){return u.isEditable&&Y(!0)},onMouseDown:function(){return M({rowIndex:p,colIndex:l,rowId:T.rowMeta.rowId})},onMouseOver:function(){return S({rowIndex:p,colIndex:l,rowId:T.rowMeta.rowId})},onDragOver:function(e){return G({callback:X,callbackProps:{event:e,hoveredHeader:u},limit:50})},onKeyDown:function(e){"F2"!==e.key&&"Enter"!==e.key||!u.isEditable||U||(e.preventDefault(),Y(!0))},ref:o,"data-row-index":p,"data-col-index":l,"data-row-id":T.rowMeta.rowId,"data-accessor":u.accessor},{children:[u.expandable&&Z?T.rowMeta.isExpanded?e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return m(T.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:y})):e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return m(T.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:R})):null,e.jsx("span",t({className:"st-cell-content ".concat("right"===u.align?"right-aligned":"center"===u.align?"center-aligned":"left-aligned")},{children:e.jsx("span",{children:u.cellRenderer?u.cellRenderer({accessor:u.accessor,colIndex:l,row:T}):A({content:O,header:u})})})),U&&Q&&e.jsx(H,{enumOptions:u.enumOptions,onChange:te,setIsEditing:Y,type:u.type,value:O})]}),$)})),U=function(n){var r=n.children,o=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}(n,["children"]);return g().allowAnimations?e.jsx(Y,t({},o,{children:r})):e.jsx(e.Fragment,{children:r})},Y=function(t){var r=t.children,o=t.isBody,i=t.pauseAnimation,c=t.rowIndex,d=n.useRef(!1),s=g(),l=s.draggedHeaderRef,u=s.headersRef,h=s.mainBodyRef,f=s.shouldPaginate,v=n.useState({}),m=v[0],p=v[1],w=n.useRef({}),x=u.current;return n.useLayoutEffect((function(){if(x){var e=function(e){var n=e.currentHeaders,t=e.draggedHeaderRef,r=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(a({accessor:e.accessor,rowIndex:r}));if(i){var c=i.getAnimations().some((function(e){return"running"===e.playState})),d=i.getBoundingClientRect();c&&(null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=d}}})),o}({currentHeaders:x,draggedHeaderRef:l,rowIndex:c});JSON.stringify(e)!==JSON.stringify(m)&&(w.current=m,p(e))}}),[m,x,l,o,c]),n.useLayoutEffect((function(){var e=h.current,n=function(){d.current=!0},t=function(){d.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",t),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",t)}}),[l,h]),n.useEffect((function(){i||d.current||Object.keys(w.current).length&&x&&x.forEach((function(e){var n=document.getElementById(a({accessor:e.accessor,rowIndex:c}));if(n){var t=w.current[e.accessor],r=m[e.accessor];if(t&&r){var o=t.left-r.left,i=f?0:t.top-r.top,d=Math.abs(o),s=Math.abs(i);(d>10||s>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(o,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[m,x,o,i,w,c,f]),e.jsx(e.Fragment,{children:r})},q=function(n){var r=n.columnIndexStart,o=n.columnIndices,i=n.headers,d=n.hiddenColumns,s=n.isWidthDragging,l=n.onExpandRowClick,u=n.pinned,h=n.rowIndex,f=n.rowIndices,v=n.visibleRow,m=i.filter((function(e){return c({hiddenColumns:d,header:e,pinned:u})}));return e.jsx(U,t({isBody:!0,pauseAnimation:s,rowIndex:h+1},{children:m.map((function(n,t){return e.jsx(J,{columnIndices:o,header:n,headers:i,hiddenColumns:d,nestedIndex:t+(null!=r?r:0),onExpandRowClick:l,pinned:u,rowIndex:h,rowIndices:f,visibleRow:v},a({accessor:n.accessor,rowIndex:h+1}))}))}))},J=function(t){var r=t.columnIndices,o=t.header,i=t.headers,d=t.hiddenColumns,s=t.nestedIndex,l=t.onExpandRowClick,u=t.pinned,h=t.rowIndex,f=t.rowIndices,v=t.visibleRow,m=r[o.accessor],p=g(),w=p.getBorderClass,x=p.isSelected,C=p.isInitialFocusedCell;if(o.children){var I=o.children.filter((function(e){return c({hiddenColumns:d,header:e,pinned:u})}));return e.jsx(n.Fragment,{children:I.map((function(n){return e.jsx(J,{columnIndices:r,header:n,headers:i,hiddenColumns:d,nestedIndex:s,onExpandRowClick:l,pinned:u,rowIndex:h,rowIndices:f,visibleRow:v},a({accessor:n.accessor,rowIndex:h+1}))}))})}var y={rowIndex:h,colIndex:m,rowId:v.row.rowMeta.rowId},b=w(y),R=x(y),M=C(y);return e.jsx(z,{borderClass:b,colIndex:m,header:o,isHighlighted:R,isInitialFocused:M,nestedIndex:s,onExpandRowClick:l,rowIndex:h,visibleRow:v},a({accessor:o.accessor,rowIndex:h+1}))},V=function(n){var r=n.columnIndices,o=n.columnIndexStart,i=n.gridTemplateColumns,a=n.headers,c=n.hiddenColumns,d=n.hoveredIndex,s=n.index,l=n.isWidthDragging,u=n.onExpandRowClick,h=n.pinned,f=n.rowHeight,v=n.rowIndices,m=n.setHoveredIndex,p=n.visibleRow,w=g().useHoverRowBackground,x=p.position,C=x%2==0;return e.jsx("div",t({className:"st-row ".concat(C?"even":"odd"," ").concat(d===s&&w?"hovered":""),onMouseEnter:function(){m(s)},style:{gridTemplateColumns:i,top:b({position:x,rowHeight:f}),height:"".concat(f,"px")}},{children:e.jsx(q,{columnIndexStart:o,columnIndices:r,headers:a,hiddenColumns:c,isWidthDragging:l,onExpandRowClick:u,pinned:h,rowIndex:s,rowIndices:v,visibleRow:p},s)}))},K=function(n){var r=n.displayStrongBorder,o=n.position,i=n.rowHeight,a=n.templateColumns;return e.jsx("div",t({className:"st-row-separator ".concat(r?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:a,position:"absolute",top:y({position:o,rowHeight:i}),minWidth:"100%"}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},X=function(r){var o=r.columnIndexStart,i=r.columnIndices,a=r.headers,c=r.hiddenColumns,d=r.hoveredIndex,s=r.isWidthDragging,l=r.onExpandRowClick,u=r.pinned,h=r.ref,f=r.rowHeight,v=r.rowIndices,m=r.setHoveredIndex,g=r.templateColumns,p=r.totalHeight,w=r.visibleRows,x=r.width,C=u?"st-body-pinned-".concat(u):"st-body-main";return e.jsx("div",t({className:C,ref:h,style:t({position:"relative",height:"".concat(p,"px"),width:x},!u&&{flexGrow:1})},{children:w.map((function(t,r){var h,p,x=w[r-1],C=Boolean((null==x?void 0:x.depth)!==(null==t?void 0:t.depth)&&(null===(p=null===(h=null==t?void 0:t.row.rowMeta)||void 0===h?void 0:h.children)||void 0===p?void 0:p.length)&&0===t.depth);return e.jsxs(n.Fragment,{children:[0!==r&&e.jsx(K,{displayStrongBorder:C,position:t.position,rowHeight:f,templateColumns:g}),e.jsx(V,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:g,headers:a,hiddenColumns:c,hoveredIndex:d,index:r,isWidthDragging:s,onExpandRowClick:l,pinned:u,rowHeight:f,rowIndices:v,setHoveredIndex:m,visibleRow:t})]},t.position)}))}))};function G(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,d=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 c({hiddenColumns:t,header:e})})).forEach((function(e,n){d(e,0===n)}))};return r.forEach((function(e,n){d(e,0===n)})),n.current.filter((function(e){return!e.pinned&&c({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;d(e,t)})),o.forEach((function(e){d(e,!1)})),i}var _=function(r){var o=r.flattenedRows,i=r.headerContainerRef,a=r.isWidthDragging,c=r.mainTemplateColumns,d=r.pinnedLeftColumns,s=r.pinnedLeftTemplateColumns,l=r.pinnedLeftWidth,u=r.pinnedRightColumns,h=r.pinnedRightTemplateColumns,f=r.pinnedRightWidth,v=r.setFlattenedRows,m=r.setScrollTop,p=r.visibleRows,w=g(),x=w.headersRef,C=w.hiddenColumns,I=w.mainBodyRef,y=w.rowHeight,b=w.scrollbarWidth,R=w.tableBodyContainerRef,M=n.useState(null),S=M[0],E=M[1];!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],c=i[1];n.useEffect((function(){var e=null==t?void 0:t.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")}}),[t,a,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;c(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(n),function(){n&&i.unobserve(n)}}}),[t,r])}({headerContainerRef:i,mainSectionRef:R,scrollbarWidth:b});var j,k,D=n.useRef(null),W=(j=0,(k=function(e){e.forEach((function(e){j+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&k(e.rowMeta.children)}))})(o),j)*(y+1)-1,H=n.useMemo((function(){return G({headersRef:x,hiddenColumns:C,pinnedLeftColumns:d,pinnedRightColumns:u})}),[x,C,d,u]),N=n.useMemo((function(){var e={};return p.forEach((function(n,t){var r=String(n.row.rowMeta.rowId);e[r]=t})),e}),[p]),L=function(e){var n=function(r){return r.rowMeta.rowId===e&&r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{isExpanded:!r.rowMeta.isExpanded})}):r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{children:r.rowMeta.children.map(n)})}):r};v((function(e){return e.map(n)}))},T={columnIndices:H,headerContainerRef:i,headers:x.current,hiddenColumns:C,hoveredIndex:S,isWidthDragging:a,rowHeight:y,rowIndices:N,setHoveredIndex:E,visibleRows:p};return e.jsxs("div",t({className:"st-body-container",onMouseLeave:function(){return E(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame((function(){m(n)}))},ref:R},{children:[d.length>0&&e.jsx(X,t({},T,{onExpandRowClick:L,pinned:"left",templateColumns:s,totalHeight:W,width:l})),e.jsx(X,t({},T,{columnIndexStart:d.length,onExpandRowClick:L,ref:I,templateColumns:c,totalHeight:W})),u.length>0&&e.jsx(X,t({},T,{columnIndexStart:d.length+c.length,onExpandRowClick:L,pinned:"right",templateColumns:h,totalHeight:W,width:f}))]}))},$=function(e,t){n.useEffect((function(){if(e.current){var n=e.current,r=function(){var e,r=null==n?void 0:n.scrollLeft;void 0!==r&&(null===(e=t.current)||void 0===e||e.scrollTo(r,0))};return n.addEventListener("scroll",r),function(){null==n||n.removeEventListener("scroll",r)}}}),[e,t])},Q=function(e){return void 0===e&&(e=0),e?e+1:0},Z=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,c=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:s(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=l(e))})))})),n.pinned?Q(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(c):"right"===n.pinned?a(c):n.pinned||o(c)},ee=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,c=e.setIsWidthDragging,d=e.setMainBodyWidth,l=e.setPinnedLeftWidth,f=e.setPinnedRightWidth,v=e.startWidth;c(!0),n.preventDefault();var m=n.clientX;if(i&&!i.hide){var g=h(i),p=r-o>1,w=p?s(i):[i],x=function(e){var n="right"===i.pinned?m-e.clientX:e.clientX-m;if(p&&w.length>1)ne({delta:n,header:i,headersRef:a,leafHeaders:w,minWidth:g,setMainBodyWidth:d,setPinnedLeftWidth:l,setPinnedRightWidth:f,startWidth:v});else{var r=Math.max(v+n,g);i.width=r,Z({header:i,headers:a.current,newWidth:r,setMainBodyWidth:d,setPinnedLeftWidth:l,setPinnedRightWidth:f})}a.current.forEach((function(e){u(e)})),t()},C=function(){document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",C),c(!1)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",C)}},ne=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,c=e.setPinnedLeftWidth,d=e.setPinnedRightWidth,s=e.startWidth,l=o.reduce((function(e,n){return Math.min(e,h(n))}),40),u=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),f=Math.max(s+n,l);Z({header:t,headers:r.current,newWidth:f,setMainBodyWidth:a,setPinnedLeftWidth:c,setPinnedRightWidth:d});var v=f-u;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=v*(n/u),r=Math.max(n+t,i);e.width=r}))},te=n.forwardRef((function(r,o){var c,d,s=r.colIndex,l=r.forceHeadersUpdate,u=r.gridColumnEnd,h=r.gridColumnStart,f=r.gridRowEnd,v=r.gridRowStart,m=r.header,p=r.reverse,w=r.sort,x=g(),C=x.columnReordering,I=x.columnResizing,y=x.draggedHeaderRef,b=x.forceUpdate,R=x.headersRef,M=x.hoveredHeaderRef,S=x.onColumnOrderChange,E=x.onSort,j=x.onTableHeaderDragEnd,k=x.rowHeight,D=x.selectColumns,W=x.selectableColumns,H=x.setInitialFocusedCell,N=x.setIsWidthDragging,T=x.setMainBodyWidth,B=x.setPinnedLeftWidth,O=x.setPinnedRightWidth,P=x.setSelectedCells,A=x.setSelectedColumns,z=x.sortDownIcon,U=x.sortUpIcon,Y=Boolean(null==m?void 0:m.isSortable),q="st-header-cell ".concat(m.accessor===(null===(c=M.current)||void 0===c?void 0:c.accessor)?"st-hovered":""," ").concat((null===(d=y.current)||void 0===d?void 0:d.accessor)===m.accessor?"st-dragging":""," ").concat(Y?"clickable":""," ").concat(C&&!Y?"columnReordering":""," ").concat(m.children?"parent":""),J=F({draggedHeaderRef:y,headersRef:R,hoveredHeaderRef:M,onColumnOrderChange:S,onTableHeaderDragEnd:j}),V=J.handleDragStart,K=J.handleDragEnd,X=J.handleDragOver,G=L(),_=function(e){var n=e.event,t=e.header;if(W){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var c=a[i];o=r(c,o)}return o};return r(e,n),t}(t,s);return n.shiftKey&&D?A((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],a=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<a&&(a=t,o=e)}));var c,d,s,l,u=i(i([],(c=o,d=n,s=Math.min(c,d),l=Math.max(c,d),Array.from({length:l-s+1},(function(e,n){return s+n}))),!0),r,!0);return new Set(i(i([],Array.from(e),!0),u,!0))})):D&&D(r),P(new Set),void H(null)}t.isSortable&&E(s,t.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)}}),[]),!m)return null;var $=I&&e.jsx("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;G({callback:ee,callbackProps:{event:e.nativeEvent,forceUpdate:b,gridColumnEnd:u,gridColumnStart:h,header:m,headersRef:R,setIsWidthDragging:N,setMainBodyWidth:T,setPinnedLeftWidth:B,setPinnedRightWidth:O,startWidth:"object"==typeof o&&null!==o&&"current"in o?null===(n=o.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}}),Q=w&&w.key.accessor===m.accessor&&e.jsxs("div",t({className:"st-sort-icon-container",onClick:function(e){return _({event:e,header:m})}},{children:["ascending"===w.direction&&U&&U,"descending"===w.direction&&z&&z]}));return e.jsxs("div",t({className:q,id:a({accessor:m.accessor,rowIndex:0}),onDragOver:function(e){G({callback:X,callbackProps:{event:e,hoveredHeader:m},limit:50})},ref:o,style:t(t({gridRowStart:v,gridRowEnd:f,gridColumnStart:h,gridColumnEnd:u},u-h>1?{}:{width:m.width}),f-v>1?{}:{height:k})},{children:[p&&$,"right"===m.align&&Q,e.jsx("div",t({className:"st-header-label",draggable:C&&!m.disableReorder,onClick:function(e){return _({event:e,header:m})},onDragEnd:function(e){e.preventDefault(),K(),l()},onDragStart:function(e){C&&m&&function(e){V(e)}(m)}},{children:e.jsx("span",t({className:"st-header-label-text ".concat("right"===m.align?"right-aligned":"center"===m.align?"center-aligned":"left-aligned")},{children:null==m?void 0:m.label}))})),"right"!==m.align&&Q,!p&&$]}))})),re=function(r){var o=r.columnIndices,i=r.gridTemplateColumns,a=r.handleScroll,d=r.headersRef,s=r.hiddenColumns,l=r.maxDepth,u=r.pinned,h=r.sectionRef,f=r.sort,v=n.useReducer((function(e){return e+1}),0)[1],m=n.useMemo((function(){var e=[],n=1,t=function(r,i,a){var d,h;if(void 0===a&&(a=!1),!c({hiddenColumns:s,header:r,pinned:u}))return 0;a||n++;var f=null!==(h=null===(d=r.children)||void 0===d?void 0:d.filter((function(e){return c({hiddenColumns:s,header:e,pinned:u})})).length)&&void 0!==h?h:0,v=n,m=f>0?v+f:v+1,g=i,p=f>0?i+1:l+1;if(e.push({header:r,gridColumnStart:v,gridColumnEnd:m,gridRowStart:g,gridRowEnd:p,colIndex:o[r.accessor]}),r.children){var w=!0;r.children.forEach((function(e){c({hiddenColumns:s,header:e,pinned:u})&&(t(e,i+1,w),w=!1)}))}return m-v},r=d.current.filter((function(e){return c({hiddenColumns:s,header:e,pinned:u})})),i=!0;return r.forEach((function(e){t(e,1,i),i=!1})),e}),[d,s,l,u,o]);return e.jsx("div",t({className:"st-header-".concat(u?"pinned-".concat(u):"main")},a&&{onScroll:a},{ref:h,style:{gridTemplateColumns:i,display:"grid",position:"relative"}},{children:e.jsx(U,t({rowIndex:0},{children:m.map((function(t){return e.jsx(te,{colIndex:t.colIndex,forceHeadersUpdate:v,gridColumnEnd:t.gridColumnEnd,gridColumnStart:t.gridColumnStart,gridRowEnd:t.gridRowEnd,gridRowStart:t.gridRowStart,header:t.header,ref:n.createRef(),reverse:"right"===u,sort:f},t.header.accessor)}))}))}))},oe=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(oe)):1},ie=function(r){var o=r.centerHeaderRef,i=r.headerContainerRef,a=r.headersRef,d=r.hiddenColumns,s=r.mainTemplateColumns,l=r.pinnedLeftColumns,u=r.pinnedLeftTemplateColumns,h=r.pinnedRightColumns,f=r.pinnedRightTemplateColumns,v=r.sort,m=g(),p=m.mainBodyRef,w=m.pinnedLeftRef,x=m.pinnedRightRef,C=m.setPinnedLeftWidth,I=m.setPinnedRightWidth;$(p,o);var y=n.useMemo((function(){return G({headersRef:a,hiddenColumns:d,pinnedLeftColumns:l,pinnedRightColumns:h})}),[a,d,l,h]),b=n.useMemo((function(){var e=a.current,n=0;return e.forEach((function(e){if(c({hiddenColumns:d,header:e})){var t=oe(e);n=Math.max(n,t)}})),{maxDepth:n}}),[a,d]).maxDepth;return n.useLayoutEffect((function(){var e,n;C(Q(null===(e=w.current)||void 0===e?void 0:e.clientWidth)),I(Q(null===(n=x.current)||void 0===n?void 0:n.clientWidth))}),[w,x,C,I]),e.jsxs("div",t({className:"st-header-container",ref:i},{children:[l.length>0&&e.jsx(re,{columnIndices:y,gridTemplateColumns:u,handleScroll:void 0,headersRef:a,hiddenColumns:d,maxDepth:b,pinned:"left",sectionRef:w,sort:v}),e.jsx(re,{columnIndices:y,gridTemplateColumns:s,handleScroll:function(e){var n,t,r=null===(n=o.current)||void 0===n?void 0:n.scrollLeft;void 0!==r&&(null===(t=p.current)||void 0===t||t.scrollTo(r,0))},headersRef:a,hiddenColumns:d,maxDepth:b,sectionRef:o,sort:v}),h.length>0&&e.jsx(re,{columnIndices:y,gridTemplateColumns:f,handleScroll:void 0,headersRef:a,hiddenColumns:d,maxDepth:b,pinned:"right",sectionRef:x,sort:v})]}))},ae=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},ce=function(r){var o=r.flattenedRows,i=r.isWidthDragging,a=r.pinnedLeftWidth,c=r.pinnedRightWidth,d=r.setFlattenedRows,s=r.setScrollTop,l=r.sort,u=r.visibleRows,h=g(),f=h.columnResizing,v=h.editColumns,m=h.headersRef,p=h.hiddenColumns,w=n.useRef(null),x=n.useRef(null),C=m.current.filter((function(e){return!e.pinned})),I=m.current.filter((function(e){return"left"===e.pinned})),y=m.current.filter((function(e){return"right"===e.pinned})),b=n.useMemo((function(){return ae({headers:I,hiddenColumns:p})}),[I,p]),R=n.useMemo((function(){return ae({headers:C,hiddenColumns:p})}),[C,p]),M=n.useMemo((function(){return ae({headers:y,hiddenColumns:p})}),[y,p]),S={centerHeaderRef:x,headerContainerRef:w,headersRef:m,hiddenColumns:p,mainTemplateColumns:R,pinnedLeftColumns:I,pinnedLeftTemplateColumns:b,pinnedRightColumns:y,pinnedRightTemplateColumns:M,sort:l},E={flattenedRows:o,headerContainerRef:w,isWidthDragging:i,mainTemplateColumns:R,pinnedLeftColumns:I,pinnedLeftTemplateColumns:b,pinnedLeftWidth:a,pinnedRightColumns:y,pinnedRightTemplateColumns:M,pinnedRightWidth:c,setFlattenedRows:d,setScrollTop:s,visibleRows:u};return e.jsxs("div",t({className:"st-content ".concat(f?"st-resizeable":"st-not-resizeable"),style:{width:v?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(ie,t({},S)),e.jsx(_,t({},E))]}))},de=function(r){var o,i,a=r.mainBodyWidth,c=r.mainBodyRef,d=r.pinnedLeftWidth,s=r.pinnedRightWidth,l=r.setMainBodyWidth,u=r.tableBodyContainerRef,h=g().editColumns,f=n.useState(!1),v=f[0],m=f[1],p=n.useRef(null),w=u.current&&u.current.scrollHeight>u.current.clientHeight,x=h?28:0,C=(h?s+1:s)+(u.current&&w?u.current.offsetWidth-u.current.clientWidth:0);return $(c,p),n.useEffect((function(){setTimeout((function(){!function(){if(c.current){var e=c.current.scrollWidth;l(e)}}()}),1)}),[c,l]),n.useEffect((function(){setTimeout((function(){!function(){if(c.current){var e=c.current.clientWidth;m(a>e)}}()}),1)}),[c,a,l]),v?e.jsxs("div",t({className:"st-horizontal-scrollbar-container"},{children:[d>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:d,height:null===(o=p.current)||void 0===o?void 0:o.offsetHeight}}),a>0&&e.jsx("div",t({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&c.current&&c.current.scrollTo({left:n,behavior:"auto"})},ref:p,style:{flexGrow:1}},{children:e.jsx("div",{style:{width:a,height:".3px"}})})),s>0&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:C,height:null===(i=p.current)||void 0===i?void 0:i.offsetHeight}})}),x>0&&e.jsx("div",{style:{width:x-1.5,height:"100%",flexShrink:0}})]})):null},se={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return se.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?se.string(e,n,t):"number"==typeof e&&"number"==typeof n?se.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?se.boolean(e,n,t):se.string(String(e),String(n),t)}},le=function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return se.number(i,a,r)}return"date"===t?se.date(String(e),String(n),r):"boolean"===t?se.boolean(Boolean(e),Boolean(n),r):"enum"===t?se.enum(String(e),String(n),r):se.string(String(e),String(n),r)},ue=function(e,n,r){var o,a=(null===(o=n.key)||void 0===o?void 0:o.type)||"string",c=n.direction,d=new Map,s=new Map,l="";e.forEach((function(e){var t;if(e.rowData&&!0===e.rowMeta.isExpanded&&!0===n.key.expandable){var r=(e.rowData.sector||"group_".concat(d.size)).toString();l=r,s.set(l,e),d.has(l)||d.set(l,[])}else if(l){var o=d.get(l)||[];o.push(e),d.set(l,o)}else{var i="default";d.has(i)||d.set(i,[]),null===(t=d.get(i))||void 0===t||t.push(e)}}));var u=[];return d.forEach((function(e,o){if(s.has(o)){var d=s.get(o);d.rowMeta.children&&d.rowMeta.children.length>0&&(d.rowMeta.children=he(d.rowMeta.children,n,r)),u.push(d)}var l=i([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],i=t.rowData[r];return le(o,i,a,c)}));u.push.apply(u,l.map((function(e){var o=t({},e);if(o.rowMeta.children&&o.rowMeta.children.length>0){var i=he(o.rowMeta.children,n,r);o.rowMeta=t(t({},o.rowMeta),{children:i})}return o})))})),u},he=function(e,n,r){var o=r.find((function(e){return e.accessor===n.key.accessor})),a=(null==o?void 0:o.type)||"string",c=n.direction;return i([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],i=t.rowData[r];return le(o,i,a,c)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?t(t({},e),{rowMeta:t(t({},e.rowMeta),{children:he(e.rowMeta.children,n,r)})}):e}))},fe=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),i=o[0],a=o[1],c=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),d=n.useState(c),s=d[0],l=d[1],u=n.useMemo((function(){if(!i)return r;var e=function(e,n,t){return{sortedData:ue(n,t,e),newSortConfig:t}}(t,r,i).sortedData;return e}),[r,i,t]);return{hiddenColumns:s,setHiddenColumns:l,setSort:a,sort:i,sortedRows:u,updateSort:function(e,n){var r=function(e){for(var t=0,o=e;t<o.length;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}}},o=r(t);o&&a((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},ve=function(n){var r=n.checked,o=void 0!==r&&r,i=n.children,a=n.onChange;return e.jsxs("label",t({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e.jsx("span",t({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e.jsx("span",{className:"st-checkbox-checkmark"})})),i]}))},me=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var c=a.children.some((function(e){return e.accessor===n})),d=!1;if(!c)for(var s=0,l=a.children;s<l.length;s++){var u=l[s];if(me([u],n,t,r),!1===t[u.accessor]){d=!0;break}}(c||d)&&(t[a.accessor]=!1)}}},ge=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},pe=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(pe(e.children,n),ge(e.children,n)&&(n[e.accessor]=!0))}))},we=function(r){var o=r.allHeaders,i=r.depth,a=void 0===i?0:i,c=r.header,d=r.hiddenColumns,u=r.setHiddenColumns,h=n.useState(!0),f=h[0],v=h[1],m=g(),p=m.expandIcon,w=m.collapseIcon,x=m.headersRef,C=m.setMainBodyWidth,I=m.setPinnedLeftWidth,y=m.setPinnedRightWidth,b="".concat(16*a,"px"),R=c.children&&c.children.length>0,M=d[c.accessor]||R&&c.children&&ge(c.children,d);return e.jsxs(e.Fragment,{children:[e.jsxs("div",t({className:"st-header-checkbox-item",style:{paddingLeft:b}},{children:[e.jsx("div",t({className:"st-header-icon-container"},{children:R?e.jsx("div",t({className:"st-collapsible-header-icon",onClick:function(e){e.stopPropagation(),v(!f)}},{children:f?w:p})):null})),e.jsx(ve,t({checked:M,onChange:function(e){var n=t({},d);(n[c.accessor]=e,e)?pe(o,n):(me(o,c.accessor,n),R&&c.children&&c.children.length>0&&c.children.every((function(e){return!0===d[e.accessor]}))&&c.children[0]&&(n[c.children[0].accessor]=!1,me(o,c.children[0].accessor,n)));u(n),x.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,c=0;n.forEach((function(e){if(!e.hide){var n=s(e).reduce((function(e,n){return e+l(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:c+=n}}));var d=Q(i),u=Q(a);r(d),o(u),t(c)}({headers:x.current,setMainBodyWidth:C,setPinnedLeftWidth:I,setPinnedRightWidth:y})}},{children:c.label}))]})),R&&f&&c.children&&e.jsx("div",t({className:"st-nested-headers"},{children:c.children.map((function(n,t){return e.jsx(we,{allHeaders:o,depth:a+1,header:n,hiddenColumns:d,setHiddenColumns:u},"".concat(n.accessor,"-").concat(t))}))}))]})},xe=function(n){var r=n.headers,o=n.open,i=n.position,a=n.setHiddenColumns,c=n.hiddenColumns,d="left"===i?"left":"";return e.jsx("div",t({className:"st-column-editor-popout ".concat(o?"open":""," ").concat(d),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",t({className:"st-column-editor-popout-content"},{children:r.map((function(n,t){return e.jsx(we,{header:n,hiddenColumns:c,setHiddenColumns:a,allHeaders:r},"".concat(n.accessor,"-").concat(t))}))}))}))},Ce=function(r){var o=r.columnEditorText,i=r.editColumns,a=r.editColumnsInitOpen,c=r.headers,d=r.hiddenColumns,s=r.position,l=void 0===s?"right":s,u=r.setHiddenColumns,h=n.useState(a),f=h[0],v=h[1];return i?e.jsxs("div",t({className:"st-column-editor ".concat(f?"open":""," ").concat(l),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e.jsx("div",t({className:"st-column-editor-text"},{children:o})),e.jsx(xe,{headers:c,open:f,position:l,setHiddenColumns:u,hiddenColumns:d})]})):null},Ie=function(r){var o=r.allowAnimations,i=void 0!==o&&o,a=r.cellUpdateFlash,c=void 0!==a&&a,l=r.collapseIcon,u=void 0===l?e.jsx(I,{className:"st-sort-icon"}):l,h=r.columnEditorPosition,v=void 0===h?"right":h,g=r.columnEditorText,y=void 0===g?"Columns":g,b=r.columnReordering,R=void 0!==b&&b,M=r.columnResizing,S=void 0!==M&&M,E=r.defaultHeaders,j=r.editColumns,k=void 0!==j&&j,D=r.editColumnsInitOpen,W=void 0!==D&&D,H=r.expandIcon,N=void 0===H?e.jsx(x,{className:"st-sort-icon"}):H,L=r.height,T=r.hideFooter,B=void 0!==T&&T,O=r.nextIcon,P=void 0===O?e.jsx(x,{className:"st-next-prev-icon"}):O,F=r.onCellEdit,A=r.onColumnOrderChange,z=r.onGridReady,U=r.onNextPage,Y=r.prevIcon,q=void 0===Y?e.jsx(w,{className:"st-next-prev-icon"}):Y,J=r.rowHeight,V=void 0===J?40:J,K=r.rows,X=r.rowsPerPage,G=void 0===X?10:X,_=r.selectableCells,$=void 0!==_&&_,Q=r.selectableColumns,Z=void 0!==Q&&Q,ee=r.shouldPaginate,ne=void 0!==ee&&ee,te=r.sortDownIcon,re=void 0===te?e.jsx(I,{className:"st-sort-icon"}):te,oe=r.sortUpIcon,ie=void 0===oe?e.jsx(C,{className:"st-sort-icon"}):oe,ae=r.tableRef,se=r.theme,le=void 0===se?"light":se,ue=r.useHoverRowBackground,he=void 0===ue||ue,ve=r.useOddEvenRowBackground,me=void 0===ve||ve,ge=r.useOddColumnBackground,pe=void 0!==ge&&ge;pe&&(me=!1);var we=n.useRef(null),xe=n.useRef(E),Ie=n.useRef(null),ye=n.useRef(null),be=n.useRef(null),Re=n.useRef(null),Me=n.useRef(null),Se=n.useState(1),Ee=Se[0],je=Se[1],ke=n.useState(!1),De=ke[0],We=ke[1],He=n.useState(0),Ne=He[0],Le=He[1],Te=n.useState(0),Be=Te[0],Oe=Te[1],Pe=n.useState(0),Fe=Pe[0],Ae=Pe[1],ze=n.useState(0),Ue=ze[0],Ye=ze[1],qe=n.useState(0),Je=qe[0],Ve=qe[1],Ke=fe({headers:xe.current,tableRows:K}),Xe=Ke.sort,Ge=Ke.sortedRows,_e=Ke.hiddenColumns,$e=Ke.setHiddenColumns,Qe=Ke.updateSort;n.useEffect((function(){null==z||z()}),[z]);var Ze=n.useMemo((function(){if(!ne)return Ge;var e=(Ee-1)*G,n=e+G;return Ge.slice(e,n)}),[Ee,G,ne,Ge]),en=n.useState(Ze),nn=en[0],tn=en[1];n.useEffect((function(){tn(Ze)}),[Ze]);var rn=n.useMemo((function(){var e;if(!L)return window.innerHeight-V;var n=document.querySelector(".simple-table-root"),t=0;if(L.endsWith("px"))t=parseInt(L,10);else if(L.endsWith("vh")){var r=parseInt(L,10);t=window.innerHeight*r/100}else if(L.endsWith("%")){var o=parseInt(L,10);t=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*o/100}else t=window.innerHeight;return Math.max(0,t-V)}),[L,V]),on=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.flattenedRows,o=e.rowHeight,i=e.scrollTop,a=o+1,c=[],d=0,s=Math.max(0,i-a*n),l=i+t+a*n,u=function(e,n){for(var t,r=0,o=e;r<o.length;r++){var i=o[r],h=d*a;if(h>=l)break;h+a>s&&c.push({row:i,depth:n,position:d,isLastGroupRow:Boolean(null===(t=i.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),d+=1,i.rowMeta.isExpanded&&i.rowMeta.children&&u(i.rowMeta.children,n+1)}};return u(r,0),c}({bufferRowCount:5,contentHeight:rn,flattenedRows:nn,rowHeight:V,scrollTop:Ue})}),[rn,V,nn,Ue]),an=n.useReducer((function(e){return e+1}),0)[1],cn=function(e){var t=e.selectableCells,r=e.headers,o=e.visibleRows,i=n.useState(new Set),a=i[0],c=i[1],d=n.useState(new Set),l=d[0],u=d[1],h=n.useState(null),v=h[0],m=h[1],g=n.useState(null),p=g[0],w=g[1],x=n.useRef(!1),C=n.useRef(null),I=n.useCallback((function(){var e=r.flatMap(s).filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(a).reduce((function(e,t){var r=t.split("-").map(Number),i=r[0],a=r[1];e[i]||(e[i]=[]);var c=n.get(a);return e[i][a]=c?o[i].row.rowData[c]:"",e}),{}),i=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");a.size>0&&navigator.clipboard.writeText(i)}),[r,a,o]),y=n.useCallback((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),d=Math.max(e.colIndex,n.colIndex),s=r;s<=i;s++)for(var l=a;l<=d;l++)if(s>=0&&s<o.length){var h=o[s].row.rowMeta.rowId;t.add(f({colIndex:l,rowIndex:s,rowId:h}))}u(new Set),m(null),c(t)}),[o,u,m,c]),b=n.useCallback((function(e){if(e.rowIndex>=0&&e.rowIndex<o.length&&e.colIndex>=0&&e.colIndex<r.length){var n=f(e);u(new Set),m(null),c(new Set([n])),w(e)}}),[r.length,o.length,u,m,c,w]),R=n.useCallback((function(e,n){void 0===n&&(n=!1),c(new Set),w(null),u((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&m(e[e.length-1])}),[c,w,u,m]);n.useEffect((function(){var e=function(e){if(t&&p){var n=p.rowIndex,i=p.colIndex,a=p.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(o[n].row.rowMeta.rowId!==a){var d=o.findIndex((function(e){return e.row.rowMeta.rowId===a}));if(-1===d)return;n=d}if("ArrowUp"===e.key){if(e.preventDefault(),n>0){var s={rowIndex:n-1,colIndex:i,rowId:o[n-1].row.rowMeta.rowId};b(s)}}else"ArrowDown"===e.key?(e.preventDefault(),n<o.length-1&&(s={rowIndex:n+1,colIndex:i,rowId:o[n+1].row.rowMeta.rowId},b(s))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),i>0&&(s={rowIndex:n,colIndex:i-1,rowId:o[n].row.rowMeta.rowId},b(s))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),i<r.length-1&&(s={rowIndex:n,colIndex:i+1,rowId:o[n].row.rowMeta.rowId},b(s))):"Escape"===e.key&&(c(new Set),u(new Set),m(null),C.current=null,w(null))}else I()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[I,r.length,p,y,b,t,o]);var M=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=f({colIndex:n,rowIndex:t,rowId:r}),i=a.has(o),c=l.has(n);return i||c}),[a,l]),S=n.useCallback((function(e){var n,t,r,i,a,c,d=e.colIndex,s=e.rowIndex,u=e.rowId,h=[],f=null===(r=null===(t=null===(n=o[s-1])||void 0===n?void 0:n.row)||void 0===t?void 0:t.rowMeta)||void 0===r?void 0:r.rowId,v={colIndex:d,rowIndex:s+1,rowId:null===(c=null===(a=null===(i=o[s+1])||void 0===i?void 0:i.row)||void 0===a?void 0:a.rowMeta)||void 0===c?void 0:c.rowId},m={colIndex:d-1,rowIndex:s,rowId:u},g={colIndex:d+1,rowIndex:s,rowId:u};return(!M({colIndex:d,rowIndex:s-1,rowId:f})||l.has(d)&&0===s)&&h.push("st-selected-top-border"),(!M(v)||l.has(d)&&s===o.length-1)&&h.push("st-selected-bottom-border"),M(m)||h.push("st-selected-left-border"),M(g)||h.push("st-selected-right-border"),h.join(" ")}),[M,o,l]),E=n.useMemo((function(){return p?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===p.rowIndex&&t===p.colIndex&&r===p.rowId}:function(){return!1}}),[p]);return{getBorderClass:S,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;if(t){x.current=!0,C.current={rowIndex:r,colIndex:n,rowId:o},u(new Set),m(null);var i=f({colIndex:n,rowIndex:r,rowId:o});c(new Set([i])),w({rowIndex:r,colIndex:n,rowId:o})}},handleMouseOver:function(e){var n=e.colIndex,r=e.rowIndex;if(e.rowId,t&&x.current&&C.current){for(var i=new Set,a=Math.min(C.current.rowIndex,r),d=Math.max(C.current.rowIndex,r),s=Math.min(C.current.colIndex,n),l=Math.max(C.current.colIndex,n),u=a;u<=d;u++)for(var h=s;h<=l;h++)if(u>=0&&u<o.length){var v=o[u].row.rowMeta.rowId;i.add(f({colIndex:h,rowIndex:u,rowId:v}))}c(i)}},handleMouseUp:function(){x.current=!1},isInitialFocusedCell:E,isSelected:M,lastSelectedColumnIndex:v,selectColumns:R,selectedCells:a,selectedColumns:l,setInitialFocusedCell:w,setSelectedCells:c,setSelectedColumns:u}}({selectableCells:$,headers:xe.current,visibleRows:on}),dn=cn.getBorderClass,sn=cn.handleMouseDown,ln=cn.handleMouseOver,un=cn.handleMouseUp,hn=cn.isInitialFocusedCell,fn=cn.isSelected,vn=cn.selectColumns,mn=cn.selectedCells,gn=cn.selectedColumns,pn=cn.setInitialFocusedCell,wn=cn.setSelectedCells,xn=cn.setSelectedColumns,Cn=n.useCallback((function(e,n){Qe(e,n)}),[Qe]),In=n.useCallback((function(e){xe.current=e,an()}),[]);n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||Z&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(mn.size>0&&wn(new Set),gn.size>0&&xn(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[Z,mn,gn,wn,xn]),n.useLayoutEffect((function(){if(Me.current){var e=Me.current.offsetWidth-Me.current.clientWidth;Ve(e)}}),[]),n.useLayoutEffect((function(){var e=function(){if(an(),Me.current){var e=Me.current.offsetWidth-Me.current.clientWidth;Ve(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var yn=n.useRef(new Map);return n.useEffect((function(){ae&&(ae.current={updateData:function(e){var n,t,r,o,i=e.accessor,a=e.rowIndex,c=e.newValue,s=null===(t=null===(n=null==K?void 0:K[a])||void 0===n?void 0:n.rowMeta)||void 0===t?void 0:t.rowId;if(void 0!==s){var l=d({rowId:s,accessor:i}),u=yn.current.get(l);u&&u.updateContent(c),void 0!==(null===(o=null===(r=null==K?void 0:K[a])||void 0===r?void 0:r.rowData)||void 0===o?void 0:o[i])&&(K[a].rowData[i]=c)}}})}),[ae,K]),e.jsx(m,t({value:{allowAnimations:i,cellRegistry:yn.current,cellUpdateFlash:c,collapseIcon:u,columnReordering:R,columnResizing:S,draggedHeaderRef:we,editColumns:k,expandIcon:N,forceUpdate:an,getBorderClass:dn,handleMouseDown:sn,handleMouseOver:ln,headersRef:xe,hiddenColumns:_e,hoveredHeaderRef:Ie,isInitialFocusedCell:hn,isSelected:fn,mainBodyRef:ye,nextIcon:P,onCellEdit:F,onColumnOrderChange:A,onSort:Cn,onTableHeaderDragEnd:In,pinnedLeftRef:be,pinnedRightRef:Re,prevIcon:q,rowHeight:V,scrollbarWidth:Je,selectColumns:vn,selectableColumns:Z,setInitialFocusedCell:pn,setIsWidthDragging:We,setMainBodyWidth:Le,setPinnedLeftWidth:Oe,setPinnedRightWidth:Ae,setSelectedCells:wn,setSelectedColumns:xn,shouldPaginate:ne,sortDownIcon:re,sortUpIcon:ie,tableBodyContainerRef:Me,useOddColumnBackground:pe,useHoverRowBackground:he,useOddEvenRowBackground:me}},{children:e.jsx("div",t({className:"simple-table-root st-wrapper theme-".concat(le),style:L?{height:L}:{}},{children:e.jsxs("div",t({className:"st-wrapper-container"},{children:[e.jsxs("div",t({className:"st-content-wrapper",onMouseUp:un,onMouseLeave:un},{children:[e.jsx(ce,{flattenedRows:nn,isWidthDragging:De,pinnedLeftWidth:Be,pinnedRightWidth:Fe,setFlattenedRows:tn,setScrollTop:Ye,sort:Xe,visibleRows:on}),e.jsx(Ce,{columnEditorText:y,editColumns:k,editColumnsInitOpen:W,headers:xe.current,hiddenColumns:_e,position:v,setHiddenColumns:$e})]})),e.jsx(de,{mainBodyRef:ye,mainBodyWidth:Ne,pinnedLeftWidth:Be,pinnedRightWidth:Fe,setMainBodyWidth:Le,tableBodyContainerRef:Me}),e.jsx(p,{currentPage:Ee,hideFooter:B,onPageChange:je,onNextPage:U,shouldPaginate:ne,totalPages:Math.ceil(K.length/G)})]}))}))}))};exports.SimpleTable=function(r){var o=n.useState(!1),i=o[0],a=o[1];return n.useEffect((function(){a(!0)}),[]),i?e.jsx(Ie,t({},r)):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};function r(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{d(r.next(e))}catch(e){i(e)}}function c(e){try{d(r.throw(e))}catch(e){i(e)}}function d(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}d((r=r.apply(e,n||[])).next())}))}function o(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(d){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,d])}}}function i(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var a=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},c=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},d=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},s=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return s(e)})):[e]},l=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(a({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},u=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(a({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){u(e)}))},h=function(e){return"number"==typeof e.minWidth?e.minWidth:40},f=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},v=n.createContext(void 0),m=function(n){var r=n.children,o=n.value;return e.jsx(v.Provider,t({value:o},{children:r}))},g=function(){var e=n.useContext(v);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},p=function(i){var a=i.currentPage,c=i.hideFooter,d=i.onPageChange,s=i.onNextPage,l=i.shouldPaginate,u=i.totalPages,h=g(),f=h.nextIcon,v=h.prevIcon,m=n.useState(!0),p=m[0],w=m[1],x=!(a>1),C=!(a<u)&&!s||!p&&a===u;if(c||!l)return null;var I=function(){if(u<=15)return Array.from({length:u},(function(e,n){return n+1}));var e,n,t=[],r=15;if(a<=Math.ceil(7.5))e=1,n=14;else if(a>=u-Math.floor(7.5))e=Math.max(1,u-r+1),n=u;else{var o=Math.floor(7);e=a-o,n=a+(r-o-1)}for(var i=e;i<=n;i++)t.push(i);return n<u-1&&(t.push(-1),t.push(u)),t}();return e.jsxs("div",t({className:"st-footer"},{children:[e.jsx("button",t({className:"st-next-prev-btn ".concat(x?"disabled":""),onClick:function(){var e=a-1;e>=1&&d(e)},disabled:x},{children:v})),e.jsx("button",t({className:"st-next-prev-btn ".concat(C?"disabled":""),onClick:function(){return r(void 0,void 0,void 0,(function(){var e,n;return o(this,(function(t){switch(t.label){case 0:return e=a===u,n=a+1,s&&e?[4,s(a)]:[3,2];case 1:if(!t.sent())return w(!1),[2];t.label=2;case 2:return(n<=u||s)&&d(n),[2]}}))}))},disabled:C},{children:f})),I.map((function(n,r){return n<0?e.jsx("span",t({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e.jsx("button",t({onClick:function(){return function(e){e>=1&&e<=u&&d(e)}(n)},className:"st-page-btn ".concat(a===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},w=function(n){var r=n.className;return e.jsx("svg",t({className:r,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"})}))},x=function(n){var r=n.className;return e.jsx("svg",t({className:r,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"})}))},C=function(n){var r=n.className;return e.jsx("svg",t({className:r,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"})}))},I=function(e){return e.position*(e.rowHeight+1)-1},y=function(e){return e.position*(e.rowHeight+1)},b=function(r){var o=r.children,i=r.onClose,a=r.open,c=r.setOpen,d=r.width,s=r.containerRef,l=g(),u=null==l?void 0:l.mainBodyRef,h=n.useRef(null),f=n.useRef(null),v=n.useState("bottom-left"),m=v[0],p=v[1],w=n.useState({}),x=w[0],C=w[1],I=n.useState(!1),y=I[0],b=I[1];return n.useEffect((function(){a&&h.current?(b(!1),!f.current&&h.current.parentElement&&(f.current=h.current.parentElement),requestAnimationFrame((function(){if(h.current&&f.current){var e,n=h.current,t=f.current.getBoundingClientRect(),r=n.offsetHeight,o=d||n.offsetWidth,i=(e=(null==s?void 0:s.current)?s.current.getBoundingClientRect():(null==u?void 0:u.current)?u.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,c="bottom",l={};(r>i&&r<=a||r>i&&a>i)&&(c="top");var v="left";o>e.right-t.right+t.width&&(v="right"),"bottom"===c?l.top=t.bottom+4:l.bottom=window.innerHeight-t.top+4,"left"===v?l.left=t.left:l.right=window.innerWidth-t.right,p("".concat(c,"-").concat(v)),C(l),b(!0)}}))):a||b(!1)}),[a,d,s,u]),n.useEffect((function(){var e=function(e){if(a&&h.current){var n=e.target;h.current&&!h.current.contains(n)&&(c(!1),null==i||i())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,i,c]),n.useEffect((function(){var e=function(e){h.current&&!h.current.contains(e.target)&&(c(!1),null==i||i())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,a,c]),n.useEffect((function(){var e=function(e){"Escape"===e.key&&a&&(c(!1),null==i||i())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,a,c]),a?e.jsx("div",t({ref:h,className:"st-dropdown-content st-dropdown-".concat(m),style:t({width:d?"".concat(d,"px"):"auto",visibility:y?"visible":"hidden"},x)},{children:o})):null},R=function(n){var r=n.children,o=n.onClick,i=n.isSelected,a=void 0!==i&&i,c=n.disabled,d=void 0!==c&&c,s=n.className,l=void 0===s?"":s;return e.jsx("div",t({className:"st-dropdown-item ".concat(a?"selected":""," ").concat(d?"disabled":""," ").concat(l),onClick:function(){!d&&o&&o()},role:"option","aria-selected":a,"aria-disabled":d},{children:r}))},M=function(r){var o=r.onBlur,i=r.onChange,a=r.open,c=r.setOpen,d=r.value,s=n.useState(d),l=s[0],u=s[1];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 h=function(e){u(e),i(e),c(!1),o()};return e.jsxs(b,t({open:a,onClose:function(){o()},setOpen:c,width:120},{children:[e.jsx(R,t({isSelected:!0===l,onClick:function(){return h(!0)}},{children:"True"})),e.jsx(R,t({isSelected:!1===l,onClick:function(){return h(!1)}},{children:"False"}))]}))},S=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;i(n)}})},E=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},j=function(r){var o,i,a=r.value,c=r.onChange,d=r.onClose,s=g(),l=s.nextIcon,u=s.prevIcon,h=n.useState(a||new Date),f=h[0],v=h[1],m=n.useState("days"),p=m[0],w=m[1],x=function(e,n){return new Date(e,n+1,0).getDate()};return e.jsxs("div",t({className:"st-datepicker"},{children:[e.jsxs("div",t({className:"st-datepicker-header"},{children:["days"===p&&e.jsxs(e.Fragment,{children:[e.jsx("button",t({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:u})),e.jsxs("div",t({className:"st-datepicker-header-label",onClick:function(){return w("months")}},{children:[(i=f,i.toLocaleString("default",{month:"long"}))," ",f.getFullYear()]})),e.jsx("button",t({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:l}))]}),"months"===p&&e.jsx("div",t({className:"st-datepicker-header-label",onClick:function(){return w("years")}},{children:f.getFullYear()})),"years"===p&&e.jsx("div",t({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),e.jsxs("div",t({className:"st-datepicker-grid st-datepicker-".concat(p,"-grid")},{children:["days"===p&&function(){var n=[],r=f.getFullYear(),o=f.getMonth(),i=x(r,o),s=function(e,n){return new Date(e,n,1).getDay()}(r,o),l=x(r,o-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(r,o){n.push(e.jsx("div",t({className:"st-datepicker-weekday"},{children:r}),"header-".concat(o)))}));for(var u=function(r){var o=l-s+r+1;n.push(e.jsx("div",t({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()-1,e);v(n),c(n),null==d||d()}(o)}},{children:o}),"prev-".concat(o)))},h=0;h<s;h++)u(h);for(var m=function(i){var s=i===(new Date).getDate()&&o===(new Date).getMonth()&&r===(new Date).getFullYear(),l=i===new Date(a).getDate()&&o===new Date(a).getMonth()&&r===new Date(a).getFullYear();n.push(e.jsx("div",t({className:"st-datepicker-day ".concat(s?"today":""," ").concat(l?"selected":""),onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth(),e);v(n),c(n),null==d||d()}(i)}},{children:i}),"day-".concat(i)))},g=1;g<=i;g++)m(g);var p=35-(s+i),w=function(r){n.push(e.jsx("div",t({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()+1,e);v(n),c(n),null==d||d()}(r)}},{children:r}),"next-".concat(r)))};for(g=1;g<=p;g++)w(g);return n}(),"months"===p&&(o=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,r){var i=r===f.getMonth();o.push(e.jsx("div",t({className:"st-datepicker-month ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(f.getFullYear(),e,1)),w("days")}(r)}},{children:n}),"month-".concat(r)))})),o),"years"===p&&function(){for(var n=[],r=f.getFullYear(),o=r-6,i=function(o){var i=o===r;n.push(e.jsx("div",t({className:"st-datepicker-year ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(e,f.getMonth(),1)),w("months")}(o)}},{children:o}),"year-".concat(o)))},a=o;a<o+12;a++)i(a);return n}()]})),e.jsx("div",t({className:"st-datepicker-footer"},{children:e.jsx("button",t({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;v(e),c(e),null==d||d()}},{children:"Today"}))}))]}))},k=function(r){var o=r.onBlur,i=r.onChange,a=r.open,c=r.setOpen,d=r.value,s=n.useState(function(e){var n=e.split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setUTCFullYear(t),i.setUTCMonth(r-1),i.setUTCDate(o),isNaN(i.getTime())?new Date:i}(d)),l=s[0],u=s[1];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 h=function(){o()};return e.jsx(b,t({open:a,onClose:h,setOpen:c,width:280},{children:e.jsx(j,{value:l,onChange:function(e){u(e),i(e.toISOString()),c(!1),o()},onClose:h})}))},D=function(r){var o=r.onBlur,i=r.onChange,a=r.open,c=r.options,d=r.setOpen,s=r.value,l=n.useState(s||""),u=l[0],h=l[1];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)}}),[]);return e.jsx(b,t({open:a,onClose:function(){o()},setOpen:d,width:150},{children:e.jsx("div",t({className:"st-enum-dropdown-content"},{children:c.map((function(n){return e.jsx(R,t({isSelected:u===n,onClick:function(){return h(e=n),i(e),d(!1),void o();var e}},{children:n}),n)}))}))}))},W=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,c=void 0===a?"string":a,d=n.value,s=function(){i(!1)};if("boolean"===c&&"boolean"==typeof d)return e.jsx(M,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:d});if("date"===c){var l="string"==typeof d?d:"";return e.jsx(k,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l})}if("enum"===c){var u="string"==typeof d?d:"";return e.jsx(D,{onBlur:s,onChange:function(e){return o(e)},open:!0,options:r,setOpen:i,value:u})}if("number"===c&&"number"==typeof d)return e.jsx(E,{defaultValue:d,onBlur:s,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var h=null==d?"":String(d);return e.jsx(S,{defaultValue:h,onBlur:s,onChange:function(e){return o(e)}})},H=0,N=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===H||o-H>=r)&&(H=o,n(t))}},L=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(L);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=L(e[t]));return n},T=Date.now(),B={screenX:0,screenY:0},O=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return i(i([],t,!0),[r],!1);if(o.children&&o.children.length>0){var a=O(o.children,n,i(i([],t,!0),[r],!1));if(a)return a}}return null};var P=function(e){var t,r,o=e.draggedHeaderRef,i=e.headersRef,a=e.hoveredHeaderRef,c=e.onColumnOrderChange,d=e.onTableHeaderDragEnd,s=(t=i.current,r=n.useRef(t),n.useEffect((function(){JSON.stringify(r.current)!==JSON.stringify(t)&&(r.current=t)}),[t]),r.current);return{handleDragStart:function(e){o.current=e,T=Date.now()},handleDragOver:function(e){var n,t,r=e.event,c=e.hoveredHeader;if(r.preventDefault(),i.current){var l=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=r.screenX,h=r.screenY,f=Math.sqrt(Math.pow(u-B.screenX,2)+Math.pow(h-B.screenY,2));a.current=c;var v=i.current,m=O(v,(null===(n=o.current)||void 0===n?void 0:n.accessor)||""),g=O(v,c.accessor);if(m&&g){var p=m.length,w=g.length,x=g;if(p!==w){var C=w-p;C>0&&(x=g.slice(0,-C))}var I=function(e,n,t){var r=L(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var c=i(r,n);return a(r,n,i(r,t)),a(r,t,c),{newHeaders:r,emergencyBreak:o}}(v,m,x),y=I.newHeaders,b=I.emergencyBreak;if(!(l||c.accessor===(null===(t=o.current)||void 0===t?void 0:t.accessor)||null===o.current||f<10||0===m.length||0===x.length||JSON.stringify(y)===JSON.stringify(i.current)||b)){var R=Date.now();JSON.stringify(y)===JSON.stringify(s)&&(R-T<1500||f<40)||(T=R,B={screenX:u,screenY:h},d(y))}}}},handleDragEnd:function(){o.current=null,a.current=null,null==c||c(i.current)}}},F=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},A=n.forwardRef((function(r,o){var i,c,s=r.borderClass,l=r.colIndex,u=r.header,h=r.isHighlighted,f=r.isInitialFocused,v=r.nestedIndex,m=r.onExpandRowClick,p=r.rowIndex,w=r.visibleRow,x=g(),C=x.cellRegistry,I=x.cellUpdateFlash,y=x.collapseIcon,b=x.draggedHeaderRef,R=x.expandIcon,M=x.handleMouseDown,S=x.handleMouseOver,E=x.headersRef,j=x.hoveredHeaderRef,k=x.onCellEdit,D=x.onTableHeaderDragEnd,H=x.useOddColumnBackground,L=w.depth,T=w.row,B=n.useState(T.rowData[u.accessor]),O=B[0],A=B[1],z=n.useState(!1),U=z[0],Y=z[1],q=n.useState(!1),J=q[0],V=q[1],K=n.useRef(null),X=P({draggedHeaderRef:b,headersRef:E,hoveredHeaderRef:j,onTableHeaderDragEnd:D}).handleDragOver,G=N(),_="cell-".concat(p,"-").concat(l),$=d({rowId:T.rowMeta.rowId,accessor:u.accessor});n.useEffect((function(){if(C){var e="".concat(T.rowMeta.rowId,"-").concat(u.accessor);return C.set(e,{updateContent:function(e){O!==e?(A(e),I&&(V(!0),K.current&&clearTimeout(K.current),K.current=setTimeout((function(){V(!1)}),800))):A(e)}}),function(){C.delete(e),K.current&&clearTimeout(K.current)}}}),[C,I,T.rowMeta.rowId,u.accessor,O]),n.useEffect((function(){if(J){var e=setTimeout((function(){V(!1)}),850);return function(){return clearTimeout(e)}}}),[J]),n.useEffect((function(){A(T.rowData[u.accessor])}),[T.rowData,u.accessor]),n.useEffect((function(){h||Y(!1)}),[h]);var Q="boolean"===u.type||"date"===u.type||"enum"===u.type,Z=Boolean(null===(c=null===(i=T.rowMeta)||void 0===i?void 0:i.children)||void 0===c?void 0:c.length),ee=Boolean(null==u?void 0:u.isEditable),ne="st-cell ".concat(L>0&&u.expandable?"st-cell-depth-".concat(L):""," ").concat(h?f?"st-cell-selected-first ".concat(s):"st-cell-selected ".concat(s):""," ").concat(ee?"clickable":""," ").concat(J?"st-cell-updating":""," ").concat(H?v%2==0?"even-column":"odd-column":""),te=n.useCallback((function(e){A(e),null==k||k({accessor:u.accessor,newValue:e,row:T})}),[u.accessor,k,T]);return U&&!Q?e.jsx("div",t({className:"st-cell-editing",id:a({accessor:u.accessor,rowIndex:p+1})},{children:e.jsx(W,{enumOptions:u.enumOptions,onChange:te,setIsEditing:Y,type:u.type,value:O})})):e.jsxs("div",t({className:ne,id:_,onDoubleClick:function(){return u.isEditable&&Y(!0)},onMouseDown:function(){return M({rowIndex:p,colIndex:l,rowId:T.rowMeta.rowId})},onMouseOver:function(){return S({rowIndex:p,colIndex:l,rowId:T.rowMeta.rowId})},onDragOver:function(e){return G({callback:X,callbackProps:{event:e,hoveredHeader:u},limit:50})},onKeyDown:function(e){"F2"!==e.key&&"Enter"!==e.key||!u.isEditable||U||(e.preventDefault(),Y(!0))},ref:o,"data-row-index":p,"data-col-index":l,"data-row-id":T.rowMeta.rowId,"data-accessor":u.accessor},{children:[u.expandable&&Z?T.rowMeta.isExpanded?e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return m(T.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:y})):e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return m(T.rowMeta.rowId)},onMouseDown:function(e){e.stopPropagation()}},{children:R})):null,e.jsx("span",t({className:"st-cell-content ".concat("right"===u.align?"right-aligned":"center"===u.align?"center-aligned":"left-aligned")},{children:e.jsx("span",{children:u.cellRenderer?u.cellRenderer({accessor:u.accessor,colIndex:l,row:T}):F({content:O,header:u})})})),U&&Q&&e.jsx(W,{enumOptions:u.enumOptions,onChange:te,setIsEditing:Y,type:u.type,value:O})]}),$)})),z=function(n){var r=n.children,o=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}(n,["children"]);return g().allowAnimations?e.jsx(U,t({},o,{children:r})):e.jsx(e.Fragment,{children:r})},U=function(t){var r=t.children,o=t.isBody,i=t.pauseAnimation,c=t.rowIndex,d=n.useRef(!1),s=g(),l=s.draggedHeaderRef,u=s.headersRef,h=s.mainBodyRef,f=s.shouldPaginate,v=n.useState({}),m=v[0],p=v[1],w=n.useRef({}),x=u.current;return n.useLayoutEffect((function(){if(x){var e=function(e){var n=e.currentHeaders,t=e.draggedHeaderRef,r=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(a({accessor:e.accessor,rowIndex:r}));if(i){var c=i.getAnimations().some((function(e){return"running"===e.playState})),d=i.getBoundingClientRect();c&&(null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=d}}})),o}({currentHeaders:x,draggedHeaderRef:l,rowIndex:c});JSON.stringify(e)!==JSON.stringify(m)&&(w.current=m,p(e))}}),[m,x,l,o,c]),n.useLayoutEffect((function(){var e=h.current,n=function(){d.current=!0},t=function(){d.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",t),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",t)}}),[l,h]),n.useEffect((function(){i||d.current||Object.keys(w.current).length&&x&&x.forEach((function(e){var n=document.getElementById(a({accessor:e.accessor,rowIndex:c}));if(n){var t=w.current[e.accessor],r=m[e.accessor];if(t&&r){var o=t.left-r.left,i=f?0:t.top-r.top,d=Math.abs(o),s=Math.abs(i);(d>10||s>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(o,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[m,x,o,i,w,c,f]),e.jsx(e.Fragment,{children:r})},Y=function(n){var r=n.columnIndexStart,o=n.columnIndices,i=n.headers,d=n.hiddenColumns,s=n.isWidthDragging,l=n.onExpandRowClick,u=n.pinned,h=n.rowIndex,f=n.rowIndices,v=n.visibleRow,m=i.filter((function(e){return c({hiddenColumns:d,header:e,pinned:u})}));return e.jsx(z,t({isBody:!0,pauseAnimation:s,rowIndex:h+1},{children:m.map((function(n,t){return e.jsx(q,{columnIndices:o,header:n,headers:i,hiddenColumns:d,nestedIndex:t+(null!=r?r:0),onExpandRowClick:l,pinned:u,rowIndex:h,rowIndices:f,visibleRow:v},a({accessor:n.accessor,rowIndex:h+1}))}))}))},q=function(t){var r=t.columnIndices,o=t.header,i=t.headers,d=t.hiddenColumns,s=t.nestedIndex,l=t.onExpandRowClick,u=t.pinned,h=t.rowIndex,f=t.rowIndices,v=t.visibleRow,m=r[o.accessor],p=g(),w=p.getBorderClass,x=p.isSelected,C=p.isInitialFocusedCell;if(o.children){var I=o.children.filter((function(e){return c({hiddenColumns:d,header:e,pinned:u})}));return e.jsx(n.Fragment,{children:I.map((function(n){return e.jsx(q,{columnIndices:r,header:n,headers:i,hiddenColumns:d,nestedIndex:s,onExpandRowClick:l,pinned:u,rowIndex:h,rowIndices:f,visibleRow:v},a({accessor:n.accessor,rowIndex:h+1}))}))})}var y={rowIndex:h,colIndex:m,rowId:v.row.rowMeta.rowId},b=w(y),R=x(y),M=C(y);return e.jsx(A,{borderClass:b,colIndex:m,header:o,isHighlighted:R,isInitialFocused:M,nestedIndex:s,onExpandRowClick:l,rowIndex:h,visibleRow:v},a({accessor:o.accessor,rowIndex:h+1}))},J=function(n){var r=n.columnIndices,o=n.columnIndexStart,i=n.gridTemplateColumns,a=n.headers,c=n.hiddenColumns,d=n.hoveredIndex,s=n.index,l=n.isWidthDragging,u=n.onExpandRowClick,h=n.pinned,f=n.rowHeight,v=n.rowIndices,m=n.setHoveredIndex,p=n.visibleRow,w=g().useHoverRowBackground,x=p.position,C=x%2==0;return e.jsx("div",t({className:"st-row ".concat(C?"even":"odd"," ").concat(d===s&&w?"hovered":""),onMouseEnter:function(){m(s)},style:{gridTemplateColumns:i,top:y({position:x,rowHeight:f}),height:"".concat(f,"px")}},{children:e.jsx(Y,{columnIndexStart:o,columnIndices:r,headers:a,hiddenColumns:c,isWidthDragging:l,onExpandRowClick:u,pinned:h,rowIndex:s,rowIndices:v,visibleRow:p},s)}))},V=function(n){var r=n.displayStrongBorder,o=n.position,i=n.rowHeight,a=n.templateColumns;return e.jsx("div",t({className:"st-row-separator ".concat(r?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:a,position:"absolute",top:I({position:o,rowHeight:i}),minWidth:"100%"}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},K=function(r){var o=r.columnIndexStart,i=r.columnIndices,a=r.headers,c=r.hiddenColumns,d=r.hoveredIndex,s=r.isWidthDragging,l=r.onExpandRowClick,u=r.pinned,h=r.ref,f=r.rowHeight,v=r.rowIndices,m=r.setHoveredIndex,g=r.templateColumns,p=r.totalHeight,w=r.visibleRows,x=r.width,C=u?"st-body-pinned-".concat(u):"st-body-main";return e.jsx("div",t({className:C,ref:h,style:t({position:"relative",height:"".concat(p,"px"),width:x},!u&&{flexGrow:1})},{children:w.map((function(t,r){var h,p,x=w[r-1],C=Boolean((null==x?void 0:x.depth)!==(null==t?void 0:t.depth)&&(null===(p=null===(h=null==t?void 0:t.row.rowMeta)||void 0===h?void 0:h.children)||void 0===p?void 0:p.length)&&0===t.depth);return e.jsxs(n.Fragment,{children:[0!==r&&e.jsx(V,{displayStrongBorder:C,position:t.position,rowHeight:f,templateColumns:g}),e.jsx(J,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:g,headers:a,hiddenColumns:c,hoveredIndex:d,index:r,isWidthDragging:s,onExpandRowClick:l,pinned:u,rowHeight:f,rowIndices:v,setHoveredIndex:m,visibleRow:t})]},t.position)}))}))};function X(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,d=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 c({hiddenColumns:t,header:e})})).forEach((function(e,n){d(e,0===n)}))};return r.forEach((function(e,n){d(e,0===n)})),n.current.filter((function(e){return!e.pinned&&c({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;d(e,t)})),o.forEach((function(e){d(e,!1)})),i}var G=function(r){var o=r.flattenedRows,i=r.headerContainerRef,a=r.isWidthDragging,c=r.mainTemplateColumns,d=r.pinnedLeftColumns,s=r.pinnedLeftTemplateColumns,l=r.pinnedLeftWidth,u=r.pinnedRightColumns,h=r.pinnedRightTemplateColumns,f=r.pinnedRightWidth,v=r.setFlattenedRows,m=r.setScrollTop,p=r.visibleRows,w=g(),x=w.headersRef,C=w.hiddenColumns,I=w.mainBodyRef,y=w.rowHeight,b=w.scrollbarWidth,R=w.tableBodyContainerRef,M=n.useState(null),S=M[0],E=M[1];!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],c=i[1];n.useEffect((function(){var e=null==t?void 0:t.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")}}),[t,a,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;c(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(n),function(){n&&i.unobserve(n)}}}),[t,r])}({headerContainerRef:i,mainSectionRef:R,scrollbarWidth:b});var j,k,D=n.useRef(null),W=(j=0,(k=function(e){e.forEach((function(e){j+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&k(e.rowMeta.children)}))})(o),j)*(y+1)-1,H=n.useMemo((function(){return X({headersRef:x,hiddenColumns:C,pinnedLeftColumns:d,pinnedRightColumns:u})}),[x,C,d,u]),N=n.useMemo((function(){var e={};return p.forEach((function(n,t){var r=String(n.row.rowMeta.rowId);e[r]=t})),e}),[p]),L=function(e){var n=function(r){return r.rowMeta.rowId===e&&r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{isExpanded:!r.rowMeta.isExpanded})}):r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{children:r.rowMeta.children.map(n)})}):r};v((function(e){return e.map(n)}))},T={columnIndices:H,headerContainerRef:i,headers:x.current,hiddenColumns:C,hoveredIndex:S,isWidthDragging:a,rowHeight:y,rowIndices:N,setHoveredIndex:E,visibleRows:p};return e.jsxs("div",t({className:"st-body-container",onMouseLeave:function(){return E(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame((function(){m(n)}))},ref:R},{children:[d.length>0&&e.jsx(K,t({},T,{onExpandRowClick:L,pinned:"left",templateColumns:s,totalHeight:W,width:l})),e.jsx(K,t({},T,{columnIndexStart:d.length,onExpandRowClick:L,ref:I,templateColumns:c,totalHeight:W})),u.length>0&&e.jsx(K,t({},T,{columnIndexStart:d.length+c.length,onExpandRowClick:L,pinned:"right",templateColumns:h,totalHeight:W,width:f}))]}))},_=function(e,t){n.useEffect((function(){if(e.current){var n=e.current,r=function(){var e,r=null==n?void 0:n.scrollLeft;void 0!==r&&(null===(e=t.current)||void 0===e||e.scrollTo(r,0))};return n.addEventListener("scroll",r),function(){null==n||n.removeEventListener("scroll",r)}}}),[e,t])},$=function(e){return void 0===e&&(e=0),e?e+1:0},Q=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,c=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:s(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=l(e))})))})),n.pinned?$(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(c):"right"===n.pinned?a(c):n.pinned||o(c)},Z=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,c=e.setIsWidthDragging,d=e.setMainBodyWidth,l=e.setPinnedLeftWidth,f=e.setPinnedRightWidth,v=e.startWidth;c(!0),n.preventDefault();var m=n.clientX;if(i&&!i.hide){var g=h(i),p=r-o>1,w=p?s(i):[i],x=function(e){var n="right"===i.pinned?m-e.clientX:e.clientX-m;if(p&&w.length>1)ee({delta:n,header:i,headersRef:a,leafHeaders:w,minWidth:g,setMainBodyWidth:d,setPinnedLeftWidth:l,setPinnedRightWidth:f,startWidth:v});else{var r=Math.max(v+n,g);i.width=r,Q({header:i,headers:a.current,newWidth:r,setMainBodyWidth:d,setPinnedLeftWidth:l,setPinnedRightWidth:f})}a.current.forEach((function(e){u(e)})),t()},C=function(){document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",C),c(!1)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",C)}},ee=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,c=e.setPinnedLeftWidth,d=e.setPinnedRightWidth,s=e.startWidth,l=o.reduce((function(e,n){return Math.min(e,h(n))}),40),u=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),f=Math.max(s+n,l);Q({header:t,headers:r.current,newWidth:f,setMainBodyWidth:a,setPinnedLeftWidth:c,setPinnedRightWidth:d});var v=f-u;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=v*(n/u),r=Math.max(n+t,i);e.width=r}))},ne=n.forwardRef((function(r,o){var c,d,s=r.colIndex,l=r.forceHeadersUpdate,u=r.gridColumnEnd,h=r.gridColumnStart,f=r.gridRowEnd,v=r.gridRowStart,m=r.header,p=r.reverse,w=r.sort,x=g(),C=x.columnReordering,I=x.columnResizing,y=x.draggedHeaderRef,b=x.forceUpdate,R=x.headersRef,M=x.hoveredHeaderRef,S=x.onColumnOrderChange,E=x.onSort,j=x.onTableHeaderDragEnd,k=x.rowHeight,D=x.selectColumns,W=x.selectableColumns,H=x.setInitialFocusedCell,L=x.setIsWidthDragging,T=x.setMainBodyWidth,B=x.setPinnedLeftWidth,O=x.setPinnedRightWidth,F=x.setSelectedCells,A=x.setSelectedColumns,z=x.sortDownIcon,U=x.sortUpIcon,Y=Boolean(null==m?void 0:m.isSortable),q="st-header-cell ".concat(m.accessor===(null===(c=M.current)||void 0===c?void 0:c.accessor)?"st-hovered":""," ").concat((null===(d=y.current)||void 0===d?void 0:d.accessor)===m.accessor?"st-dragging":""," ").concat(Y?"clickable":""," ").concat(C&&!Y?"columnReordering":""," ").concat(m.children?"parent":""),J=P({draggedHeaderRef:y,headersRef:R,hoveredHeaderRef:M,onColumnOrderChange:S,onTableHeaderDragEnd:j}),V=J.handleDragStart,K=J.handleDragEnd,X=J.handleDragOver,G=N(),_=function(e){var n=e.event,t=e.header;if(W){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var c=a[i];o=r(c,o)}return o};return r(e,n),t}(t,s);return n.shiftKey&&D?A((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],a=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<a&&(a=t,o=e)}));var c,d,s,l,u=i(i([],(c=o,d=n,s=Math.min(c,d),l=Math.max(c,d),Array.from({length:l-s+1},(function(e,n){return s+n}))),!0),r,!0);return new Set(i(i([],Array.from(e),!0),u,!0))})):D&&D(r),F(new Set),void H(null)}t.isSortable&&E(s,t.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)}}),[]),!m)return null;var $=I&&e.jsx("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;G({callback:Z,callbackProps:{event:e.nativeEvent,forceUpdate:b,gridColumnEnd:u,gridColumnStart:h,header:m,headersRef:R,setIsWidthDragging:L,setMainBodyWidth:T,setPinnedLeftWidth:B,setPinnedRightWidth:O,startWidth:"object"==typeof o&&null!==o&&"current"in o?null===(n=o.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}}),Q=w&&w.key.accessor===m.accessor&&e.jsxs("div",t({className:"st-sort-icon-container",onClick:function(e){return _({event:e,header:m})}},{children:["ascending"===w.direction&&U&&U,"descending"===w.direction&&z&&z]}));return e.jsxs("div",t({className:q,id:a({accessor:m.accessor,rowIndex:0}),onDragOver:function(e){G({callback:X,callbackProps:{event:e,hoveredHeader:m},limit:50})},ref:o,style:t(t({gridRowStart:v,gridRowEnd:f,gridColumnStart:h,gridColumnEnd:u},u-h>1?{}:{width:m.width}),f-v>1?{}:{height:k})},{children:[p&&$,"right"===m.align&&Q,e.jsx("div",t({className:"st-header-label",draggable:C&&!m.disableReorder,onClick:function(e){return _({event:e,header:m})},onDragEnd:function(e){e.preventDefault(),K(),l()},onDragStart:function(e){C&&m&&function(e){V(e)}(m)}},{children:e.jsx("span",t({className:"st-header-label-text ".concat("right"===m.align?"right-aligned":"center"===m.align?"center-aligned":"left-aligned")},{children:null==m?void 0:m.label}))})),"right"!==m.align&&Q,!p&&$]}))})),te=function(r){var o=r.columnIndices,i=r.gridTemplateColumns,a=r.handleScroll,d=r.headersRef,s=r.hiddenColumns,l=r.maxDepth,u=r.pinned,h=r.sectionRef,f=r.sort,v=n.useReducer((function(e){return e+1}),0)[1],m=n.useMemo((function(){var e=[],n=1,t=function(r,i,a){var d,h;if(void 0===a&&(a=!1),!c({hiddenColumns:s,header:r,pinned:u}))return 0;a||n++;var f=null!==(h=null===(d=r.children)||void 0===d?void 0:d.filter((function(e){return c({hiddenColumns:s,header:e,pinned:u})})).length)&&void 0!==h?h:0,v=n,m=f>0?v+f:v+1,g=i,p=f>0?i+1:l+1;if(e.push({header:r,gridColumnStart:v,gridColumnEnd:m,gridRowStart:g,gridRowEnd:p,colIndex:o[r.accessor]}),r.children){var w=!0;r.children.forEach((function(e){c({hiddenColumns:s,header:e,pinned:u})&&(t(e,i+1,w),w=!1)}))}return m-v},r=d.current.filter((function(e){return c({hiddenColumns:s,header:e,pinned:u})})),i=!0;return r.forEach((function(e){t(e,1,i),i=!1})),e}),[d,s,l,u,o]);return e.jsx("div",t({className:"st-header-".concat(u?"pinned-".concat(u):"main")},a&&{onScroll:a},{ref:h,style:{gridTemplateColumns:i,display:"grid",position:"relative"}},{children:e.jsx(z,t({rowIndex:0},{children:m.map((function(t){return e.jsx(ne,{colIndex:t.colIndex,forceHeadersUpdate:v,gridColumnEnd:t.gridColumnEnd,gridColumnStart:t.gridColumnStart,gridRowEnd:t.gridRowEnd,gridRowStart:t.gridRowStart,header:t.header,ref:n.createRef(),reverse:"right"===u,sort:f},t.header.accessor)}))}))}))},re=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(re)):1},oe=function(r){var o=r.centerHeaderRef,i=r.headerContainerRef,a=r.headersRef,d=r.hiddenColumns,s=r.mainTemplateColumns,l=r.pinnedLeftColumns,u=r.pinnedLeftTemplateColumns,h=r.pinnedRightColumns,f=r.pinnedRightTemplateColumns,v=r.sort,m=g(),p=m.mainBodyRef,w=m.pinnedLeftRef,x=m.pinnedRightRef,C=m.setPinnedLeftWidth,I=m.setPinnedRightWidth;_(p,o);var y=n.useMemo((function(){return X({headersRef:a,hiddenColumns:d,pinnedLeftColumns:l,pinnedRightColumns:h})}),[a,d,l,h]),b=n.useMemo((function(){var e=a.current,n=0;return e.forEach((function(e){if(c({hiddenColumns:d,header:e})){var t=re(e);n=Math.max(n,t)}})),{maxDepth:n}}),[a,d]).maxDepth;return n.useLayoutEffect((function(){var e,n;C($(null===(e=w.current)||void 0===e?void 0:e.clientWidth)),I($(null===(n=x.current)||void 0===n?void 0:n.clientWidth))}),[w,x,C,I]),e.jsxs("div",t({className:"st-header-container",ref:i},{children:[l.length>0&&e.jsx(te,{columnIndices:y,gridTemplateColumns:u,handleScroll:void 0,headersRef:a,hiddenColumns:d,maxDepth:b,pinned:"left",sectionRef:w,sort:v}),e.jsx(te,{columnIndices:y,gridTemplateColumns:s,handleScroll:function(e){var n,t,r=null===(n=o.current)||void 0===n?void 0:n.scrollLeft;void 0!==r&&(null===(t=p.current)||void 0===t||t.scrollTo(r,0))},headersRef:a,hiddenColumns:d,maxDepth:b,sectionRef:o,sort:v}),h.length>0&&e.jsx(te,{columnIndices:y,gridTemplateColumns:f,handleScroll:void 0,headersRef:a,hiddenColumns:d,maxDepth:b,pinned:"right",sectionRef:x,sort:v})]}))},ie=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},ae=function(r){var o=r.flattenedRows,i=r.isWidthDragging,a=r.pinnedLeftWidth,c=r.pinnedRightWidth,d=r.setFlattenedRows,s=r.setScrollTop,l=r.sort,u=r.visibleRows,h=g(),f=h.columnResizing,v=h.editColumns,m=h.headersRef,p=h.hiddenColumns,w=n.useRef(null),x=n.useRef(null),C=m.current.filter((function(e){return!e.pinned})),I=m.current.filter((function(e){return"left"===e.pinned})),y=m.current.filter((function(e){return"right"===e.pinned})),b=n.useMemo((function(){return ie({headers:I,hiddenColumns:p})}),[I,p]),R=n.useMemo((function(){return ie({headers:C,hiddenColumns:p})}),[C,p]),M=n.useMemo((function(){return ie({headers:y,hiddenColumns:p})}),[y,p]),S={centerHeaderRef:x,headerContainerRef:w,headersRef:m,hiddenColumns:p,mainTemplateColumns:R,pinnedLeftColumns:I,pinnedLeftTemplateColumns:b,pinnedRightColumns:y,pinnedRightTemplateColumns:M,sort:l},E={flattenedRows:o,headerContainerRef:w,isWidthDragging:i,mainTemplateColumns:R,pinnedLeftColumns:I,pinnedLeftTemplateColumns:b,pinnedLeftWidth:a,pinnedRightColumns:y,pinnedRightTemplateColumns:M,pinnedRightWidth:c,setFlattenedRows:d,setScrollTop:s,visibleRows:u};return e.jsxs("div",t({className:"st-content ".concat(f?"st-resizeable":"st-not-resizeable"),style:{width:v?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(oe,t({},S)),e.jsx(G,t({},E))]}))},ce=function(r){var o,i,a=r.mainBodyWidth,c=r.mainBodyRef,d=r.pinnedLeftWidth,s=r.pinnedRightWidth,l=r.setMainBodyWidth,u=r.tableBodyContainerRef,h=g().editColumns,f=n.useState(!1),v=f[0],m=f[1],p=n.useRef(null),w=u.current&&u.current.scrollHeight>u.current.clientHeight,x=h?28:0,C=(h?s+1:s)+(u.current&&w?u.current.offsetWidth-u.current.clientWidth:0);return _(c,p),n.useEffect((function(){setTimeout((function(){!function(){if(c.current){var e=c.current.scrollWidth;l(e)}}()}),1)}),[c,l]),n.useEffect((function(){setTimeout((function(){!function(){if(c.current){var e=c.current.clientWidth;m(a>e)}}()}),1)}),[c,a,l]),v?e.jsxs("div",t({className:"st-horizontal-scrollbar-container"},{children:[d>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:d,height:null===(o=p.current)||void 0===o?void 0:o.offsetHeight}}),a>0&&e.jsx("div",t({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&c.current&&c.current.scrollTo({left:n,behavior:"auto"})},ref:p,style:{flexGrow:1}},{children:e.jsx("div",{style:{width:a,height:".3px"}})})),s>0&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:C,height:null===(i=p.current)||void 0===i?void 0:i.offsetHeight}})}),x>0&&e.jsx("div",{style:{width:x-1.5,height:"100%",flexShrink:0}})]})):null},de={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return de.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?de.string(e,n,t):"number"==typeof e&&"number"==typeof n?de.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?de.boolean(e,n,t):de.string(String(e),String(n),t)}},se=function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return de.number(i,a,r)}return"date"===t?de.date(String(e),String(n),r):"boolean"===t?de.boolean(Boolean(e),Boolean(n),r):"enum"===t?de.enum(String(e),String(n),r):de.string(String(e),String(n),r)},le=function(e,n,r){var o,a=(null===(o=n.key)||void 0===o?void 0:o.type)||"string",c=n.direction,d=new Map,s=new Map,l="";e.forEach((function(e){var t;if(e.rowData&&!0===e.rowMeta.isExpanded&&!0===n.key.expandable){var r=(e.rowData.sector||"group_".concat(d.size)).toString();l=r,s.set(l,e),d.has(l)||d.set(l,[])}else if(l){var o=d.get(l)||[];o.push(e),d.set(l,o)}else{var i="default";d.has(i)||d.set(i,[]),null===(t=d.get(i))||void 0===t||t.push(e)}}));var u=[];return d.forEach((function(e,o){if(s.has(o)){var d=s.get(o);d.rowMeta.children&&d.rowMeta.children.length>0&&(d.rowMeta.children=ue(d.rowMeta.children,n,r)),u.push(d)}var l=i([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],i=t.rowData[r];return se(o,i,a,c)}));u.push.apply(u,l.map((function(e){var o=t({},e);if(o.rowMeta.children&&o.rowMeta.children.length>0){var i=ue(o.rowMeta.children,n,r);o.rowMeta=t(t({},o.rowMeta),{children:i})}return o})))})),u},ue=function(e,n,r){var o=r.find((function(e){return e.accessor===n.key.accessor})),a=(null==o?void 0:o.type)||"string",c=n.direction;return i([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],i=t.rowData[r];return se(o,i,a,c)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?t(t({},e),{rowMeta:t(t({},e.rowMeta),{children:ue(e.rowMeta.children,n,r)})}):e}))},he=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),i=o[0],a=o[1],c=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),d=n.useState(c),s=d[0],l=d[1],u=n.useMemo((function(){if(!i)return r;var e=function(e,n,t){return{sortedData:le(n,t,e),newSortConfig:t}}(t,r,i).sortedData;return e}),[r,i,t]);return{hiddenColumns:s,setHiddenColumns:l,setSort:a,sort:i,sortedRows:u,updateSort:function(e,n){var r=function(e){for(var t=0,o=e;t<o.length;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}}},o=r(t);o&&a((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},fe=function(n){var r=n.checked,o=void 0!==r&&r,i=n.children,a=n.onChange;return e.jsxs("label",t({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e.jsx("span",t({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e.jsx("span",{className:"st-checkbox-checkmark"})})),i]}))},ve=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var c=a.children.some((function(e){return e.accessor===n})),d=!1;if(!c)for(var s=0,l=a.children;s<l.length;s++){var u=l[s];if(ve([u],n,t,r),!1===t[u.accessor]){d=!0;break}}(c||d)&&(t[a.accessor]=!1)}}},me=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},ge=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(ge(e.children,n),me(e.children,n)&&(n[e.accessor]=!0))}))},pe=function(r){var o=r.allHeaders,i=r.depth,a=void 0===i?0:i,c=r.header,d=r.hiddenColumns,u=r.setHiddenColumns,h=n.useState(!0),f=h[0],v=h[1],m=g(),p=m.expandIcon,w=m.collapseIcon,x=m.headersRef,C=m.setMainBodyWidth,I=m.setPinnedLeftWidth,y=m.setPinnedRightWidth,b="".concat(16*a,"px"),R=c.children&&c.children.length>0,M=d[c.accessor]||R&&c.children&&me(c.children,d);return e.jsxs(e.Fragment,{children:[e.jsxs("div",t({className:"st-header-checkbox-item",style:{paddingLeft:b}},{children:[e.jsx("div",t({className:"st-header-icon-container"},{children:R?e.jsx("div",t({className:"st-collapsible-header-icon",onClick:function(e){e.stopPropagation(),v(!f)}},{children:f?w:p})):null})),e.jsx(fe,t({checked:M,onChange:function(e){var n=t({},d);(n[c.accessor]=e,e)?ge(o,n):(ve(o,c.accessor,n),R&&c.children&&c.children.length>0&&c.children.every((function(e){return!0===d[e.accessor]}))&&c.children[0]&&(n[c.children[0].accessor]=!1,ve(o,c.children[0].accessor,n)));u(n),x.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,c=0;n.forEach((function(e){if(!e.hide){var n=s(e).reduce((function(e,n){return e+l(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:c+=n}}));var d=$(i),u=$(a);r(d),o(u),t(c)}({headers:x.current,setMainBodyWidth:C,setPinnedLeftWidth:I,setPinnedRightWidth:y})}},{children:c.label}))]})),R&&f&&c.children&&e.jsx("div",t({className:"st-nested-headers"},{children:c.children.map((function(n,t){return e.jsx(pe,{allHeaders:o,depth:a+1,header:n,hiddenColumns:d,setHiddenColumns:u},"".concat(n.accessor,"-").concat(t))}))}))]})},we=function(n){var r=n.headers,o=n.open,i=n.position,a=n.setHiddenColumns,c=n.hiddenColumns,d="left"===i?"left":"";return e.jsx("div",t({className:"st-column-editor-popout ".concat(o?"open":""," ").concat(d),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",t({className:"st-column-editor-popout-content"},{children:r.map((function(n,t){return e.jsx(pe,{header:n,hiddenColumns:c,setHiddenColumns:a,allHeaders:r},"".concat(n.accessor,"-").concat(t))}))}))}))},xe=function(r){var o=r.columnEditorText,i=r.editColumns,a=r.editColumnsInitOpen,c=r.headers,d=r.hiddenColumns,s=r.position,l=void 0===s?"right":s,u=r.setHiddenColumns,h=n.useState(a),f=h[0],v=h[1];return i?e.jsxs("div",t({className:"st-column-editor ".concat(f?"open":""," ").concat(l),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e.jsx("div",t({className:"st-column-editor-text"},{children:o})),e.jsx(we,{headers:c,open:f,position:l,setHiddenColumns:u,hiddenColumns:d})]})):null},Ce=function(n){var r=n.className;return e.jsx("svg",t({"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"down-long",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:r,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"})}))},Ie=function(n){var r=n.className;return e.jsx("svg",t({"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"up-long",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:r,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"})}))},ye=function(r){var o=r.allowAnimations,i=void 0!==o&&o,a=r.cellUpdateFlash,c=void 0!==a&&a,l=r.collapseIcon,u=void 0===l?e.jsx(C,{className:"st-sort-icon"}):l,h=r.columnEditorPosition,v=void 0===h?"right":h,g=r.columnEditorText,I=void 0===g?"Columns":g,y=r.columnReordering,b=void 0!==y&&y,R=r.columnResizing,M=void 0!==R&&R,S=r.defaultHeaders,E=r.editColumns,j=void 0!==E&&E,k=r.editColumnsInitOpen,D=void 0!==k&&k,W=r.expandIcon,H=void 0===W?e.jsx(x,{className:"st-sort-icon"}):W,N=r.height,L=r.hideFooter,T=void 0!==L&&L,B=r.nextIcon,O=void 0===B?e.jsx(x,{className:"st-next-prev-icon"}):B,P=r.onCellEdit,F=r.onColumnOrderChange,A=r.onGridReady,z=r.onNextPage,U=r.prevIcon,Y=void 0===U?e.jsx(w,{className:"st-next-prev-icon"}):U,q=r.rowHeight,J=void 0===q?40:q,V=r.rows,K=r.rowsPerPage,X=void 0===K?10:K,G=r.selectableCells,_=void 0!==G&&G,$=r.selectableColumns,Q=void 0!==$&&$,Z=r.shouldPaginate,ee=void 0!==Z&&Z,ne=r.sortDownIcon,te=void 0===ne?e.jsx(Ce,{className:"st-sort-icon"}):ne,re=r.sortUpIcon,oe=void 0===re?e.jsx(Ie,{className:"st-sort-icon"}):re,ie=r.tableRef,de=r.theme,se=void 0===de?"light":de,le=r.useHoverRowBackground,ue=void 0===le||le,fe=r.useOddEvenRowBackground,ve=void 0===fe||fe,me=r.useOddColumnBackground,ge=void 0!==me&&me;ge&&(ve=!1);var pe=n.useRef(null),we=n.useRef(S),ye=n.useRef(null),be=n.useRef(null),Re=n.useRef(null),Me=n.useRef(null),Se=n.useRef(null),Ee=n.useState(1),je=Ee[0],ke=Ee[1],De=n.useState(!1),We=De[0],He=De[1],Ne=n.useState(0),Le=Ne[0],Te=Ne[1],Be=n.useState(0),Oe=Be[0],Pe=Be[1],Fe=n.useState(0),Ae=Fe[0],ze=Fe[1],Ue=n.useState(0),Ye=Ue[0],qe=Ue[1],Je=n.useState(0),Ve=Je[0],Ke=Je[1],Xe=he({headers:we.current,tableRows:V}),Ge=Xe.sort,_e=Xe.sortedRows,$e=Xe.hiddenColumns,Qe=Xe.setHiddenColumns,Ze=Xe.updateSort;n.useEffect((function(){null==A||A()}),[A]);var en=n.useMemo((function(){if(!ee)return _e;var e=(je-1)*X,n=e+X;return _e.slice(e,n)}),[je,X,ee,_e]),nn=n.useState(en),tn=nn[0],rn=nn[1];n.useEffect((function(){rn(en)}),[en]);var on=n.useMemo((function(){var e;if(!N)return window.innerHeight-J;var n=document.querySelector(".simple-table-root"),t=0;if(N.endsWith("px"))t=parseInt(N,10);else if(N.endsWith("vh")){var r=parseInt(N,10);t=window.innerHeight*r/100}else if(N.endsWith("%")){var o=parseInt(N,10);t=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*o/100}else t=window.innerHeight;return Math.max(0,t-J)}),[N,J]),an=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.flattenedRows,o=e.rowHeight,i=e.scrollTop,a=o+1,c=[],d=0,s=Math.max(0,i-a*n),l=i+t+a*n,u=function(e,n){for(var t,r=0,o=e;r<o.length;r++){var i=o[r],h=d*a;if(h>=l)break;h+a>s&&c.push({row:i,depth:n,position:d,isLastGroupRow:Boolean(null===(t=i.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),d+=1,i.rowMeta.isExpanded&&i.rowMeta.children&&u(i.rowMeta.children,n+1)}};return u(r,0),c}({bufferRowCount:5,contentHeight:on,flattenedRows:tn,rowHeight:J,scrollTop:Ye})}),[on,J,tn,Ye]),cn=n.useReducer((function(e){return e+1}),0)[1],dn=function(e){var t=e.selectableCells,r=e.headers,o=e.visibleRows,i=n.useState(new Set),a=i[0],c=i[1],d=n.useState(new Set),l=d[0],u=d[1],h=n.useState(null),v=h[0],m=h[1],g=n.useState(null),p=g[0],w=g[1],x=n.useRef(!1),C=n.useRef(null),I=n.useCallback((function(){var e=r.flatMap(s).filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(a).reduce((function(e,t){var r=t.split("-").map(Number),i=r[0],a=r[1];e[i]||(e[i]=[]);var c=n.get(a);return e[i][a]=c?o[i].row.rowData[c]:"",e}),{}),i=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");a.size>0&&navigator.clipboard.writeText(i)}),[r,a,o]),y=n.useCallback((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),d=Math.max(e.colIndex,n.colIndex),s=r;s<=i;s++)for(var l=a;l<=d;l++)if(s>=0&&s<o.length){var h=o[s].row.rowMeta.rowId;t.add(f({colIndex:l,rowIndex:s,rowId:h}))}u(new Set),m(null),c(t)}),[o,u,m,c]),b=n.useCallback((function(e){if(e.rowIndex>=0&&e.rowIndex<o.length&&e.colIndex>=0&&e.colIndex<r.length){var n=f(e);u(new Set),m(null),c(new Set([n])),w(e)}}),[r.length,o.length,u,m,c,w]),R=n.useCallback((function(e,n){void 0===n&&(n=!1),c(new Set),w(null),u((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&m(e[e.length-1])}),[c,w,u,m]);n.useEffect((function(){var e=function(e){if(t&&p){var n=p.rowIndex,i=p.colIndex,a=p.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(o[n].row.rowMeta.rowId!==a){var d=o.findIndex((function(e){return e.row.rowMeta.rowId===a}));if(-1===d)return;n=d}if("ArrowUp"===e.key){if(e.preventDefault(),n>0){var s={rowIndex:n-1,colIndex:i,rowId:o[n-1].row.rowMeta.rowId};b(s)}}else"ArrowDown"===e.key?(e.preventDefault(),n<o.length-1&&(s={rowIndex:n+1,colIndex:i,rowId:o[n+1].row.rowMeta.rowId},b(s))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),i>0&&(s={rowIndex:n,colIndex:i-1,rowId:o[n].row.rowMeta.rowId},b(s))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),i<r.length-1&&(s={rowIndex:n,colIndex:i+1,rowId:o[n].row.rowMeta.rowId},b(s))):"Escape"===e.key&&(c(new Set),u(new Set),m(null),C.current=null,w(null))}else I()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[I,r.length,p,y,b,t,o]);var M=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=f({colIndex:n,rowIndex:t,rowId:r}),i=a.has(o),c=l.has(n);return i||c}),[a,l]),S=n.useCallback((function(e){var n,t,r,i,a,c,d=e.colIndex,s=e.rowIndex,u=e.rowId,h=[],f=null===(r=null===(t=null===(n=o[s-1])||void 0===n?void 0:n.row)||void 0===t?void 0:t.rowMeta)||void 0===r?void 0:r.rowId,v={colIndex:d,rowIndex:s+1,rowId:null===(c=null===(a=null===(i=o[s+1])||void 0===i?void 0:i.row)||void 0===a?void 0:a.rowMeta)||void 0===c?void 0:c.rowId},m={colIndex:d-1,rowIndex:s,rowId:u},g={colIndex:d+1,rowIndex:s,rowId:u};return(!M({colIndex:d,rowIndex:s-1,rowId:f})||l.has(d)&&0===s)&&h.push("st-selected-top-border"),(!M(v)||l.has(d)&&s===o.length-1)&&h.push("st-selected-bottom-border"),M(m)||h.push("st-selected-left-border"),M(g)||h.push("st-selected-right-border"),h.join(" ")}),[M,o,l]),E=n.useMemo((function(){return p?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===p.rowIndex&&t===p.colIndex&&r===p.rowId}:function(){return!1}}),[p]);return{getBorderClass:S,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;if(t){x.current=!0,C.current={rowIndex:r,colIndex:n,rowId:o},u(new Set),m(null);var i=f({colIndex:n,rowIndex:r,rowId:o});c(new Set([i])),w({rowIndex:r,colIndex:n,rowId:o})}},handleMouseOver:function(e){var n=e.colIndex,r=e.rowIndex;if(e.rowId,t&&x.current&&C.current){for(var i=new Set,a=Math.min(C.current.rowIndex,r),d=Math.max(C.current.rowIndex,r),s=Math.min(C.current.colIndex,n),l=Math.max(C.current.colIndex,n),u=a;u<=d;u++)for(var h=s;h<=l;h++)if(u>=0&&u<o.length){var v=o[u].row.rowMeta.rowId;i.add(f({colIndex:h,rowIndex:u,rowId:v}))}c(i)}},handleMouseUp:function(){x.current=!1},isInitialFocusedCell:E,isSelected:M,lastSelectedColumnIndex:v,selectColumns:R,selectedCells:a,selectedColumns:l,setInitialFocusedCell:w,setSelectedCells:c,setSelectedColumns:u}}({selectableCells:_,headers:we.current,visibleRows:an}),sn=dn.getBorderClass,ln=dn.handleMouseDown,un=dn.handleMouseOver,hn=dn.handleMouseUp,fn=dn.isInitialFocusedCell,vn=dn.isSelected,mn=dn.selectColumns,gn=dn.selectedCells,pn=dn.selectedColumns,wn=dn.setInitialFocusedCell,xn=dn.setSelectedCells,Cn=dn.setSelectedColumns,In=n.useCallback((function(e,n){Ze(e,n)}),[Ze]),yn=n.useCallback((function(e){we.current=e,cn()}),[]);n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||Q&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(gn.size>0&&xn(new Set),pn.size>0&&Cn(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[Q,gn,pn,xn,Cn]),n.useLayoutEffect((function(){if(Se.current){var e=Se.current.offsetWidth-Se.current.clientWidth;Ke(e)}}),[]),n.useLayoutEffect((function(){var e=function(){if(cn(),Se.current){var e=Se.current.offsetWidth-Se.current.clientWidth;Ke(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var bn=n.useRef(new Map);return n.useEffect((function(){ie&&(ie.current={updateData:function(e){var n,t,r,o,i=e.accessor,a=e.rowIndex,c=e.newValue,s=null===(t=null===(n=null==V?void 0:V[a])||void 0===n?void 0:n.rowMeta)||void 0===t?void 0:t.rowId;if(void 0!==s){var l=d({rowId:s,accessor:i}),u=bn.current.get(l);u&&u.updateContent(c),void 0!==(null===(o=null===(r=null==V?void 0:V[a])||void 0===r?void 0:r.rowData)||void 0===o?void 0:o[i])&&(V[a].rowData[i]=c)}}})}),[ie,V]),e.jsx(m,t({value:{allowAnimations:i,cellRegistry:bn.current,cellUpdateFlash:c,collapseIcon:u,columnReordering:b,columnResizing:M,draggedHeaderRef:pe,editColumns:j,expandIcon:H,forceUpdate:cn,getBorderClass:sn,handleMouseDown:ln,handleMouseOver:un,headersRef:we,hiddenColumns:$e,hoveredHeaderRef:ye,isInitialFocusedCell:fn,isSelected:vn,mainBodyRef:be,nextIcon:O,onCellEdit:P,onColumnOrderChange:F,onSort:In,onTableHeaderDragEnd:yn,pinnedLeftRef:Re,pinnedRightRef:Me,prevIcon:Y,rowHeight:J,scrollbarWidth:Ve,selectColumns:mn,selectableColumns:Q,setInitialFocusedCell:wn,setIsWidthDragging:He,setMainBodyWidth:Te,setPinnedLeftWidth:Pe,setPinnedRightWidth:ze,setSelectedCells:xn,setSelectedColumns:Cn,shouldPaginate:ee,sortDownIcon:te,sortUpIcon:oe,tableBodyContainerRef:Se,useOddColumnBackground:ge,useHoverRowBackground:ue,useOddEvenRowBackground:ve}},{children:e.jsx("div",t({className:"simple-table-root st-wrapper theme-".concat(se),style:N?{height:N}:{}},{children:e.jsxs("div",t({className:"st-wrapper-container"},{children:[e.jsxs("div",t({className:"st-content-wrapper",onMouseUp:hn,onMouseLeave:hn},{children:[e.jsx(ae,{flattenedRows:tn,isWidthDragging:We,pinnedLeftWidth:Oe,pinnedRightWidth:Ae,setFlattenedRows:rn,setScrollTop:qe,sort:Ge,visibleRows:an}),e.jsx(xe,{columnEditorText:I,editColumns:j,editColumnsInitOpen:D,headers:we.current,hiddenColumns:$e,position:v,setHiddenColumns:Qe})]})),e.jsx(ce,{mainBodyRef:be,mainBodyWidth:Le,pinnedLeftWidth:Oe,pinnedRightWidth:Ae,setMainBodyWidth:Te,tableBodyContainerRef:Se}),e.jsx(p,{currentPage:je,hideFooter:T,onPageChange:ke,onNextPage:z,shouldPaginate:ee,totalPages:Math.ceil(V.length/X)})]}))}))}))};exports.SimpleTable=function(r){var o=n.useState(!1),i=o[0],a=o[1];return n.useEffect((function(){a(!0)}),[]),i?e.jsx(ye,t({},r)):null};
2
2
  //# sourceMappingURL=index.js.map
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-resize-handle-margin-right:2px;--st-border-width:1px;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-slate-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-slate-50);--st-odd-column-background-color:var(--st-slate-50);--st-even-column-background-color:var(--st-white);--st-hover-row-background-color:var(--st-slate-100);--st-header-background-color:var(--st-slate-100);--st-header-label-color:var(--st-slate-900);--st-dragging-background-color:var(--st-slate-200);--st-selected-cell-background-color:var(--st-blue-100);--st-selected-first-cell-background-color:var(--st-blue-50);--st-footer-background-color:var(--st-slate-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-slate-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-400);--st-selected-border-color:var(--st-blue-500);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-slate-100);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-slate-200)}.theme-dark{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-gray-900);--st-scrollbar-thumb-color:var(--st-gray-600);--st-border-color:var(--st-gray-700);--st-odd-row-background-color:var(--st-gray-800);--st-even-row-background-color:var(--st-gray-900);--st-odd-column-background-color:var(--st-gray-800);--st-even-column-background-color:var(--st-gray-900);--st-hover-row-background-color:var(--st-gray-700);--st-header-background-color:var(--st-gray-800);--st-header-label-color:var(--st-gray-100);--st-dragging-background-color:var(--st-gray-600);--st-selected-cell-background-color:var(--st-blue-900);--st-selected-first-cell-background-color:var(--st-blue-800);--st-footer-background-color:var(--st-gray-900);--st-cell-color:var(--st-gray-100);--st-cell-odd-row-color:var(--st-gray-200);--st-edit-cell-shadow:0 1px 3px 0 #ffffff1a;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-gray-500);--st-separator-border-color:var(--st-gray-600);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-color:var(--st-blue-400);--st-editable-cell-focus-border-color:var(--st-blue-400);--st-checkbox-checked-background-color:var(--st-blue-500);--st-checkbox-checked-border-color:var(--st-blue-500);--st-column-editor-background-color:var(--st-gray-800);--st-column-editor-popout-background-color:var(--st-gray-800);--st-button-hover-background-color:var(--st-gray-700);--st-button-active-background-color:var(--st-blue-500);--st-cell-flash-color:var(--st-gray-600)}.theme-neutral{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-neutral-100);--st-scrollbar-thumb-color:var(--st-neutral-400);--st-border-color:var(--st-neutral-300);--st-odd-row-background-color:var(--st-neutral-50);--st-even-row-background-color:var(--st-neutral-100);--st-odd-column-background-color:var(--st-neutral-50);--st-even-column-background-color:var(--st-neutral-100);--st-hover-row-background-color:var(--st-neutral-200);--st-header-background-color:var(--st-neutral-200);--st-header-label-color:var(--st-neutral-900);--st-dragging-background-color:var(--st-neutral-300);--st-selected-cell-background-color:var(--st-neutral-400);--st-selected-first-cell-background-color:var(--st-neutral-300);--st-footer-background-color:var(--st-neutral-50);--st-cell-color:var(--st-neutral-900);--st-cell-odd-row-color:var(--st-neutral-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-neutral-900);--st-selected-first-cell-color:var(--st-neutral-900);--st-resize-handle-color:var(--st-neutral-400);--st-separator-border-color:var(--st-neutral-200);--st-last-group-row-separator-border-color:var(--st-neutral-400);--st-selected-border-color:var(--st-neutral-600);--st-editable-cell-focus-border-color:var(--st-neutral-500);--st-checkbox-checked-background-color:var(--st-neutral-600);--st-checkbox-checked-border-color:var(--st-neutral-600);--st-column-editor-background-color:var(--st-neutral-50);--st-column-editor-popout-background-color:var(--st-neutral-50);--st-button-hover-background-color:var(--st-neutral-200);--st-button-active-background-color:var(--st-neutral-600);--st-cell-flash-color:var(--st-neutral-400)}.theme-sky{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-blue-50);--st-scrollbar-thumb-color:var(--st-blue-300);--st-border-color:var(--st-blue-300);--st-odd-row-background-color:var(--st-blue-50);--st-even-row-background-color:var(--st-blue-100);--st-odd-column-background-color:var(--st-blue-50);--st-even-column-background-color:var(--st-blue-100);--st-hover-row-background-color:var(--st-blue-200);--st-header-background-color:var(--st-blue-200);--st-header-label-color:var(--st-blue-900);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-blue-300);--st-footer-background-color:var(--st-blue-50);--st-cell-color:var(--st-blue-900);--st-cell-odd-row-color:var(--st-blue-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-blue-900);--st-selected-first-cell-color:var(--st-blue-900);--st-resize-handle-color:var(--st-blue-400);--st-separator-border-color:var(--st-blue-200);--st-last-group-row-separator-border-color:var(--st-blue-400);--st-selected-border-color:var(--st-blue-600);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-blue-50);--st-column-editor-popout-background-color:var(--st-blue-50);--st-button-hover-background-color:var(--st-blue-200);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-blue-300)}.theme-funky{--st-border-radius:8px;--st-cell-padding:12px;--st-spacing-small:6px;--st-spacing-medium:10px;--st-scrollbar-bg-color:var(--st-stone-100);--st-scrollbar-thumb-color:var(--st-violet-500);--st-border-color:var(--st-stone-200);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-odd-column-background-color:var(--st-violet-50);--st-even-column-background-color:var(--st-amber-50);--st-hover-row-background-color:var(--st-amber-200);--st-header-background-color:var(--st-violet-600);--st-header-label-color:var(--st-white);--st-dragging-background-color:var(--st-violet-50);--st-selected-cell-background-color:var(--st-violet-50);--st-selected-first-cell-background-color:var(--st-violet-100);--st-footer-background-color:var(--st-stone-100);--st-cell-color:var(--st-stone-700);--st-cell-odd-row-color:var(--st-stone-700);--st-edit-cell-shadow:0 4px 6px -1px #7c3aed1a,0 2px 4px -1px #7c3aed0f;--st-selected-cell-color:var(--st-violet-800);--st-selected-first-cell-color:var(--st-violet-800);--st-resize-handle-color:var(--st-violet-400);--st-separator-border-color:var(--st-stone-200);--st-last-group-row-separator-border-color:var(--st-stone-300);--st-selected-border-color:var(--st-violet-500);--st-editable-cell-focus-border-color:var(--st-violet-500);--st-checkbox-checked-background-color:var(--st-violet-500);--st-checkbox-checked-border-color:var(--st-violet-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-violet-50);--st-button-active-background-color:var(--st-violet-600);--st-cell-flash-color:var(--st-violet-200)}.simple-table-root *{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.st-wrapper{-webkit-box-flex:1;-ms-flex-positive:1;border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);flex-grow:1;max-height:100dvh;overflow:hidden;position:relative}.st-wrapper-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.st-content-wrapper,.st-wrapper-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;width:100%}.st-content-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:0}.st-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.st-content,.st-header-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-container{background-color:var(--st-header-background-color)}.st-header-container.st-header-scroll-padding:after{-ms-flex-negative:0;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:default-width;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{border-bottom:var(--st-border-width) solid var(--st-border-color);display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:auto;scrollbar-width:none}.st-header-main::-webkit-scrollbar{display:none}.st-body-container{-webkit-box-flex:1;-ms-flex-positive:1;background-color:var(--st-even-row-background-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:-webkit-max-content;height:-moz-max-content;height:max-content;overflow:auto;width:100%}.st-body-main,.st-body-pinned-left,.st-body-pinned-right{display:grid;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-height:100%}.st-body-pinned-left{-ms-flex-negative:0;border-right:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-body-main{overflow:auto;scrollbar-width:none}.st-body-main::-webkit-scrollbar{display:none}.st-body-pinned-right{-ms-flex-negative:0;border-left:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-row{display:grid;min-width:100%;position:absolute;-webkit-transition:background .2s ease;transition:background .2s ease}.st-row.hovered .st-cell:not(.st-cell-selected){background-color:var(--st-hover-row-background-color)}.st-row.even{background-color:var(--st-even-row-background-color)}.st-row.odd{background-color:var(--st-odd-row-background-color)}.st-row.odd .st-cell-content{color:var(--st-cell-odd-row-color)}.st-row.even .st-cell-content{color:var(--st-cell-color)}.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-top:var(--st-border-width) solid #0000;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0;z-index:1}.st-header-cell.parent{border-bottom:var(--st-border-width) solid var(--st-border-color)}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:-webkit-grab;cursor:grab}.st-cell,.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--st-slate-800);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-small);overflow:hidden;position:relative}.st-cell.left-aligned,.st-header-cell.left-aligned{padding-left:var(--st-cell-padding);text-align:left}.st-cell.center-aligned,.st-header-cell.center-aligned{text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width) + var(--st-resize-handle-margin-right))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label-text{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-header-label{-webkit-box-flex:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;height:100%;width:100%}.st-cell-content,.st-header-label-text{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.st-header-label-text{color:var(--st-header-label-color);padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-cell-content.left-aligned,.st-header-label-text.left-aligned{text-align:left}.st-cell-content.center-aligned,.st-header-label-text.center-aligned{text-align:center}.st-cell-content.right-aligned,.st-header-label-text.right-aligned{text-align:right}.st-not-resizeable .st-cell-content{padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-resizeable .st-body-pinned-right .st-cell-content{padding-left:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width) + var(--st-resize-handle-margin-right));padding-right:var(--st-cell-padding)}.st-resizeable .st-body-main .st-cell-content,.st-resizeable .st-body-pinned-left .st-cell-content{padding-left:var(--st-cell-padding);padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width) + var(--st-resize-handle-margin-right))}.st-cell{border:var(--st-border-width) solid #0000}.st-cell.even-column:not(.st-cell-selected){background-color:var(--st-even-column-background-color)}.st-cell.odd-column:not(.st-cell-selected){background-color:var(--st-odd-column-background-color)}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-sort-icon-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;margin-left:4px}.st-sort-icon{fill:var(--st-slate-500)}.st-header-resize-handle{-ms-flex-negative:0;background-color:var(--st-resize-handle-color);cursor:col-resize;flex-shrink:0;height:calc(100% - 20px);margin-right:var(--st-resize-handle-margin-right);right:0;top:0;width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);grid-column:1/-1;height:1px}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color)}.st-cell-selected .st-cell-content{color:var(--st-selected-cell-color)!important}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color)!important;border:var(--st-border-width) solid var(--st-selected-border-color)}.st-cell-selected-first .st-cell-content{color:var(--st-selected-first-cell-color)!important}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-color)}.st-horizontal-scrollbar-container{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-scrollbar-bg-color);border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:12px;width:100%}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{height:100%}.st-horizontal-scrollbar-middle{min-height:11px;overflow:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{-ms-flex-negative:0;background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);flex-shrink:0;padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-next-prev-btn{-webkit-box-pack:center;-ms-flex-pack:center;fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.st-page-ellipsis{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;color:var(--st-cell-color);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-weight:700;justify-content:center;margin:0 var(--st-spacing-small);padding:var(--st-spacing-small)}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow-color);box-shadow:var(--st-edit-cell-shadow-color);font-size:.875rem;height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{-ms-flex-negative:0;background:var(--st-column-editor-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;-webkit-transition:width var(--st-transition-duration) var(--st-transition-ease);transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;border-left:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small)}.st-header-checkbox-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.st-header-checkbox-item,.st-header-icon-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-icon-container{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:24px}.st-collapsible-header-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.st-collapsible-header-icon,.st-nested-headers{display:-webkit-box;display:-ms-flexbox;display:flex}.st-nested-headers{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-column-editor-popout.open{min-width:200px;width:auto}.st-column-editor-popout.left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.st-column-editor-popout.open.left{-webkit-transform:translateX(0);transform:translateX(0)}.st-checkbox-label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.st-checkbox-input{display:none}.st-checkbox-custom{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:24px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{border:solid #fff;border-width:0 2px 2px 0;height:11px;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:6px}@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.st-group-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);height:40px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{gap:var(--st-spacing-medium)}.st-group-header-content,.st-group-toggle-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-group-toggle-icon{-webkit-box-pack:center;-ms-flex-pack:center;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.st-group-header.collapsed .st-group-toggle-icon,.st-group-header.expanded .st-group-toggle-icon{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@-webkit-keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}@keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}.st-cell-updating{-webkit-animation:cell-flash .6s ease-in-out;animation:cell-flash .6s ease-in-out}.st-dropdown-content{background-color:var(--st-odd-row-background-color);border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow);box-shadow:var(--st-edit-cell-shadow);max-height:400px;min-width:120px;overflow:auto;position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);will-change:transform;z-index:100}.st-dropdown-bottom-left,.st-dropdown-bottom-right{margin-top:4px}.st-dropdown-top-left,.st-dropdown-top-right{margin-bottom:4px}.st-dropdown-item{cursor:pointer;padding:8px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-dropdown-item:hover{background-color:var(--st-button-hover-background-color)}.st-dropdown-item.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-dropdown-group-label{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 12px}.st-dropdown-divider{background-color:var(--st-border-color);height:1px;margin:4px 0}.st-datepicker{background-color:var(--st-odd-row-background-color);font-family:inherit}.st-datepicker-header{-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between;padding:10px}.st-datepicker-header-label{-webkit-box-flex:1;cursor:pointer;-ms-flex:1;flex:1;font-weight:600;text-align:center}.st-datepicker-nav-btn{background:#0000;border:none;border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;font-size:1.2em;padding:0 8px}.st-datepicker-nav-btn:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-grid{display:grid;padding:10px}.st-datepicker-days-grid{gap:4px;grid-template-columns:repeat(7,1fr)}.st-datepicker-months-grid,.st-datepicker-years-grid{gap:8px;grid-template-columns:repeat(3,1fr)}.st-datepicker-weekday{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 0;text-align:center}.st-datepicker-day{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-day.empty{cursor:default}.st-datepicker-day:not(.empty):hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-day.today{color:var(--st-button-active-background-color);font-weight:600}.st-datepicker-day.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-day.other-month{color:var(--st-slate-400)}.st-datepicker-month,.st-datepicker-year{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:var(--st-border-radius);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;padding:12px 8px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-month:hover,.st-datepicker-year:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-month.selected,.st-datepicker-year.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-footer{-webkit-box-pack:end;-ms-flex-pack:end;border-top:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;padding:10px}.st-datepicker-today-btn{background-color:initial;border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;padding:6px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-today-btn:hover{background-color:var(--st-button-hover-background-color)}
1
+ @import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-resize-handle-margin-right:2px;--st-border-width:1px;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-slate-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-slate-50);--st-odd-column-background-color:var(--st-slate-50);--st-even-column-background-color:var(--st-white);--st-hover-row-background-color:var(--st-slate-100);--st-header-background-color:var(--st-slate-100);--st-header-label-color:var(--st-slate-900);--st-dragging-background-color:var(--st-slate-200);--st-selected-cell-background-color:var(--st-blue-100);--st-selected-first-cell-background-color:var(--st-blue-50);--st-footer-background-color:var(--st-slate-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-slate-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-400);--st-selected-border-color:var(--st-blue-500);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-slate-100);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-slate-200)}.theme-dark{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-gray-900);--st-scrollbar-thumb-color:var(--st-gray-600);--st-border-color:var(--st-gray-700);--st-odd-row-background-color:var(--st-gray-800);--st-even-row-background-color:var(--st-gray-900);--st-odd-column-background-color:var(--st-gray-800);--st-even-column-background-color:var(--st-gray-900);--st-hover-row-background-color:var(--st-gray-700);--st-header-background-color:var(--st-gray-800);--st-header-label-color:var(--st-gray-100);--st-dragging-background-color:var(--st-gray-600);--st-selected-cell-background-color:var(--st-blue-900);--st-selected-first-cell-background-color:var(--st-blue-800);--st-footer-background-color:var(--st-gray-900);--st-cell-color:var(--st-gray-100);--st-cell-odd-row-color:var(--st-gray-200);--st-edit-cell-shadow:0 1px 3px 0 #ffffff1a;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-gray-500);--st-separator-border-color:var(--st-gray-600);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-color:var(--st-blue-400);--st-editable-cell-focus-border-color:var(--st-blue-400);--st-checkbox-checked-background-color:var(--st-blue-500);--st-checkbox-checked-border-color:var(--st-blue-500);--st-column-editor-background-color:var(--st-gray-800);--st-column-editor-popout-background-color:var(--st-gray-800);--st-button-hover-background-color:var(--st-gray-700);--st-button-active-background-color:var(--st-blue-500);--st-cell-flash-color:var(--st-gray-600)}.theme-neutral{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-neutral-100);--st-scrollbar-thumb-color:var(--st-neutral-400);--st-border-color:var(--st-neutral-300);--st-odd-row-background-color:var(--st-neutral-50);--st-even-row-background-color:var(--st-neutral-100);--st-odd-column-background-color:var(--st-neutral-50);--st-even-column-background-color:var(--st-neutral-100);--st-hover-row-background-color:var(--st-neutral-200);--st-header-background-color:var(--st-neutral-200);--st-header-label-color:var(--st-neutral-900);--st-dragging-background-color:var(--st-neutral-300);--st-selected-cell-background-color:var(--st-neutral-400);--st-selected-first-cell-background-color:var(--st-neutral-300);--st-footer-background-color:var(--st-neutral-50);--st-cell-color:var(--st-neutral-900);--st-cell-odd-row-color:var(--st-neutral-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-neutral-900);--st-selected-first-cell-color:var(--st-neutral-900);--st-resize-handle-color:var(--st-neutral-400);--st-separator-border-color:var(--st-neutral-200);--st-last-group-row-separator-border-color:var(--st-neutral-400);--st-selected-border-color:var(--st-neutral-600);--st-editable-cell-focus-border-color:var(--st-neutral-500);--st-checkbox-checked-background-color:var(--st-neutral-600);--st-checkbox-checked-border-color:var(--st-neutral-600);--st-column-editor-background-color:var(--st-neutral-50);--st-column-editor-popout-background-color:var(--st-neutral-50);--st-button-hover-background-color:var(--st-neutral-200);--st-button-active-background-color:var(--st-neutral-600);--st-cell-flash-color:var(--st-neutral-400)}.theme-sky{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-blue-50);--st-scrollbar-thumb-color:var(--st-blue-300);--st-border-color:var(--st-blue-300);--st-odd-row-background-color:var(--st-blue-50);--st-even-row-background-color:var(--st-blue-100);--st-odd-column-background-color:var(--st-blue-50);--st-even-column-background-color:var(--st-blue-100);--st-hover-row-background-color:var(--st-blue-200);--st-header-background-color:var(--st-blue-200);--st-header-label-color:var(--st-blue-900);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-blue-300);--st-footer-background-color:var(--st-blue-50);--st-cell-color:var(--st-blue-900);--st-cell-odd-row-color:var(--st-blue-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-blue-900);--st-selected-first-cell-color:var(--st-blue-900);--st-resize-handle-color:var(--st-blue-400);--st-separator-border-color:var(--st-blue-200);--st-last-group-row-separator-border-color:var(--st-blue-400);--st-selected-border-color:var(--st-blue-600);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-blue-50);--st-column-editor-popout-background-color:var(--st-blue-50);--st-button-hover-background-color:var(--st-blue-200);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-blue-300)}.theme-funky{--st-border-radius:8px;--st-cell-padding:12px;--st-spacing-small:6px;--st-spacing-medium:10px;--st-scrollbar-bg-color:var(--st-stone-100);--st-scrollbar-thumb-color:var(--st-violet-500);--st-border-color:var(--st-stone-200);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-odd-column-background-color:var(--st-violet-50);--st-even-column-background-color:var(--st-amber-50);--st-hover-row-background-color:var(--st-amber-200);--st-header-background-color:var(--st-violet-600);--st-header-label-color:var(--st-white);--st-dragging-background-color:var(--st-violet-50);--st-selected-cell-background-color:var(--st-violet-50);--st-selected-first-cell-background-color:var(--st-violet-100);--st-footer-background-color:var(--st-stone-100);--st-cell-color:var(--st-stone-700);--st-cell-odd-row-color:var(--st-stone-700);--st-edit-cell-shadow:0 4px 6px -1px #7c3aed1a,0 2px 4px -1px #7c3aed0f;--st-selected-cell-color:var(--st-violet-800);--st-selected-first-cell-color:var(--st-violet-800);--st-resize-handle-color:var(--st-violet-400);--st-separator-border-color:var(--st-stone-200);--st-last-group-row-separator-border-color:var(--st-stone-300);--st-selected-border-color:var(--st-violet-500);--st-editable-cell-focus-border-color:var(--st-violet-500);--st-checkbox-checked-background-color:var(--st-violet-500);--st-checkbox-checked-border-color:var(--st-violet-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-violet-50);--st-button-active-background-color:var(--st-violet-600);--st-cell-flash-color:var(--st-violet-200)}.simple-table-root *{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.st-wrapper{-webkit-box-flex:1;-ms-flex-positive:1;border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);flex-grow:1;max-height:100dvh;overflow:hidden;position:relative}.st-wrapper-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.st-content-wrapper,.st-wrapper-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;width:100%}.st-content-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:0}.st-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.st-content,.st-header-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-container{background-color:var(--st-header-background-color)}.st-header-container.st-header-scroll-padding:after{-ms-flex-negative:0;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:default-width;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{border-bottom:var(--st-border-width) solid var(--st-border-color);display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:auto;scrollbar-width:none}.st-header-main::-webkit-scrollbar{display:none}.st-body-container{-webkit-box-flex:1;-ms-flex-positive:1;background-color:var(--st-even-row-background-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:-webkit-max-content;height:-moz-max-content;height:max-content;overflow:auto;width:100%}.st-body-main,.st-body-pinned-left,.st-body-pinned-right{display:grid;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-height:100%}.st-body-pinned-left{-ms-flex-negative:0;border-right:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-body-main{overflow:auto;scrollbar-width:none}.st-body-main::-webkit-scrollbar{display:none}.st-body-pinned-right{-ms-flex-negative:0;border-left:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-row{display:grid;min-width:100%;position:absolute;-webkit-transition:background .2s ease;transition:background .2s ease}.st-row.hovered .st-cell:not(.st-cell-selected){background-color:var(--st-hover-row-background-color)}.st-row.even{background-color:var(--st-even-row-background-color)}.st-row.odd{background-color:var(--st-odd-row-background-color)}.st-row.odd .st-cell-content{color:var(--st-cell-odd-row-color)}.st-row.even .st-cell-content{color:var(--st-cell-color)}.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-top:var(--st-border-width) solid #0000;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0;z-index:1}.st-header-cell.parent{border-bottom:var(--st-border-width) solid var(--st-border-color)}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:-webkit-grab;cursor:grab}.st-cell,.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--st-slate-800);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-small);overflow:hidden;position:relative}.st-cell.left-aligned,.st-header-cell.left-aligned{padding-left:var(--st-cell-padding);text-align:left}.st-cell.center-aligned,.st-header-cell.center-aligned{text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width) + var(--st-resize-handle-margin-right))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label-text{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-header-label{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:100%;min-width:0}.st-cell-content,.st-header-label-text{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.st-header-label-text{color:var(--st-header-label-color);padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-cell-content.left-aligned,.st-header-label-text.left-aligned{text-align:left}.st-cell-content.center-aligned,.st-header-label-text.center-aligned{text-align:center}.st-cell-content.right-aligned,.st-header-label-text.right-aligned{text-align:right}.st-not-resizeable .st-cell-content{padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-resizeable .st-body-pinned-right .st-cell-content{padding-left:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width) + var(--st-resize-handle-margin-right));padding-right:var(--st-cell-padding)}.st-resizeable .st-body-main .st-cell-content,.st-resizeable .st-body-pinned-left .st-cell-content{padding-left:var(--st-cell-padding);padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width) + var(--st-resize-handle-margin-right))}.st-cell{border:var(--st-border-width) solid #0000}.st-cell.even-column:not(.st-cell-selected){background-color:var(--st-even-column-background-color)}.st-cell.odd-column:not(.st-cell-selected){background-color:var(--st-odd-column-background-color)}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-sort-icon-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;margin-left:4px}.st-sort-icon{fill:var(--st-slate-500)}.st-header-resize-handle{-ms-flex-negative:0;background-color:var(--st-resize-handle-color);cursor:col-resize;flex-shrink:0;height:calc(100% - 20px);margin-right:var(--st-resize-handle-margin-right);right:0;top:0;width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);grid-column:1/-1;height:1px}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color)}.st-cell-selected .st-cell-content{color:var(--st-selected-cell-color)!important}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color)!important;border:var(--st-border-width) solid var(--st-selected-border-color)}.st-cell-selected-first .st-cell-content{color:var(--st-selected-first-cell-color)!important}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-color)}.st-horizontal-scrollbar-container{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-scrollbar-bg-color);border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:12px;width:100%}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{height:100%}.st-horizontal-scrollbar-middle{min-height:11px;overflow:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{-ms-flex-negative:0;background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);flex-shrink:0;padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-next-prev-btn{-webkit-box-pack:center;-ms-flex-pack:center;fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.st-page-ellipsis{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;color:var(--st-cell-color);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-weight:700;justify-content:center;margin:0 var(--st-spacing-small);padding:var(--st-spacing-small)}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow-color);box-shadow:var(--st-edit-cell-shadow-color);font-size:.875rem;height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{-ms-flex-negative:0;background:var(--st-column-editor-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;-webkit-transition:width var(--st-transition-duration) var(--st-transition-ease);transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;border-left:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small)}.st-header-checkbox-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.st-header-checkbox-item,.st-header-icon-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-icon-container{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:24px}.st-collapsible-header-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.st-collapsible-header-icon,.st-nested-headers{display:-webkit-box;display:-ms-flexbox;display:flex}.st-nested-headers{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-column-editor-popout.open{min-width:200px;width:auto}.st-column-editor-popout.left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.st-column-editor-popout.open.left{-webkit-transform:translateX(0);transform:translateX(0)}.st-checkbox-label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.st-checkbox-input{display:none}.st-checkbox-custom{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:24px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{border:solid #fff;border-width:0 2px 2px 0;height:11px;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:6px}@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.st-group-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);height:40px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{gap:var(--st-spacing-medium)}.st-group-header-content,.st-group-toggle-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-group-toggle-icon{-webkit-box-pack:center;-ms-flex-pack:center;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.st-group-header.collapsed .st-group-toggle-icon,.st-group-header.expanded .st-group-toggle-icon{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@-webkit-keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}@keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}.st-cell-updating{-webkit-animation:cell-flash .6s ease-in-out;animation:cell-flash .6s ease-in-out}.st-dropdown-content{background-color:var(--st-odd-row-background-color);border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow);box-shadow:var(--st-edit-cell-shadow);max-height:400px;min-width:120px;overflow:auto;position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);will-change:transform;z-index:100}.st-dropdown-bottom-left,.st-dropdown-bottom-right{margin-top:4px}.st-dropdown-top-left,.st-dropdown-top-right{margin-bottom:4px}.st-dropdown-item{cursor:pointer;padding:8px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-dropdown-item:hover{background-color:var(--st-button-hover-background-color)}.st-dropdown-item.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-dropdown-group-label{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 12px}.st-dropdown-divider{background-color:var(--st-border-color);height:1px;margin:4px 0}.st-datepicker{background-color:var(--st-odd-row-background-color);font-family:inherit}.st-datepicker-header{-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between;padding:10px}.st-datepicker-header-label{-webkit-box-flex:1;cursor:pointer;-ms-flex:1;flex:1;font-weight:600;text-align:center}.st-datepicker-nav-btn{background:#0000;border:none;border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;font-size:1.2em;padding:0 8px}.st-datepicker-nav-btn:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-grid{display:grid;padding:10px}.st-datepicker-days-grid{gap:4px;grid-template-columns:repeat(7,1fr)}.st-datepicker-months-grid,.st-datepicker-years-grid{gap:8px;grid-template-columns:repeat(3,1fr)}.st-datepicker-weekday{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 0;text-align:center}.st-datepicker-day{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-day.empty{cursor:default}.st-datepicker-day:not(.empty):hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-day.today{color:var(--st-button-active-background-color);font-weight:600}.st-datepicker-day.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-day.other-month{color:var(--st-slate-400)}.st-datepicker-month,.st-datepicker-year{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:var(--st-border-radius);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;padding:12px 8px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-month:hover,.st-datepicker-year:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-month.selected,.st-datepicker-year.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-footer{-webkit-box-pack:end;-ms-flex-pack:end;border-top:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;padding:10px}.st-datepicker-today-btn{background-color:initial;border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;padding:6px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-today-btn:hover{background-color:var(--st-button-hover-background-color)}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.8.21",
2
+ "version": "0.8.24",
3
3
  "main": "dist/index.js",
4
4
  "module": "dist/index.es.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
7
- "publish": "git add . && git commit -m \"$npm_config_message\" && git push && npm run build && npm publish",
7
+ "publish-fast": "git add . && git commit -m \"$npm_config_message\" && git push && npm run build && npm publish",
8
8
  "build": "rollup -c",
9
9
  "start": "storybook dev -p 6006",
10
10
  "build-storybook": "storybook build",