1 line
68 KiB
JavaScript
1 line
68 KiB
JavaScript
import{r as ue,R as Pe,c as Ge,a as ro,M as Tn,j as $,b as ye,p as Rn,m as bn,d as oo,B as Cn,e as io,f as so,g as uo,u as ao,C as lo,F as co,I as fo,h as po,S as go}from"./index-3e6aad90.js";import{u as vo}from"./useRemainingViewPortHeight-175c2a6c.js";import{C as mo}from"./chevron-down-fcc32a65.js";import{f as ho}from"./index-2a3ca6b4.js";import{F as yo,p as wo,A as Ro}from"./Fab-169bb281.js";import{P as bo,a as Co}from"./play-30aef65c.js";function It(y){return F=>!!F.type&&F.type.tabsRole===y}const dt=It("Tab"),Et=It("TabList"),Tt=It("TabPanel");function So(y){return dt(y)||Et(y)||Tt(y)}function Bt(y,F){return ue.Children.map(y,p=>p===null?null:So(p)?F(p):p.props&&p.props.children&&typeof p.props.children=="object"?ue.cloneElement(p,{...p.props,children:Bt(p.props.children,F)}):p)}function Fn(y,F){return ue.Children.forEach(y,p=>{p!==null&&(dt(p)||Tt(p)?F(p):p.props&&p.props.children&&typeof p.props.children=="object"&&(Et(p)&&F(p),Fn(p.props.children,F)))})}function An(y){let F=0;return Fn(y,p=>{dt(p)&&F++}),F}function kn(y){return y&&"getAttribute"in y}function Sn(y){return kn(y)&&y.getAttribute("data-rttab")}function ke(y){return kn(y)&&y.getAttribute("aria-disabled")==="true"}let at;function Po(y){const F=y||(typeof window<"u"?window:void 0);try{at=!!(typeof F<"u"&&F.document&&F.document.activeElement)}catch{at=!1}}const xo={className:"react-tabs",focus:!1},Ft=y=>{let F=ue.useRef([]),p=ue.useRef([]);const g=ue.useRef();function X(x,H){if(x<0||x>=u())return;const{onSelect:Z,selectedIndex:Be}=y;Z(x,Be,H)}function Q(x){const H=u();for(let Z=x+1;Z<H;Z++)if(!ke(K(Z)))return Z;for(let Z=0;Z<x;Z++)if(!ke(K(Z)))return Z;return x}function c(x){let H=x;for(;H--;)if(!ke(K(H)))return H;for(H=u();H-- >x;)if(!ke(K(H)))return H;return x}function V(){const x=u();for(let H=0;H<x;H++)if(!ke(K(H)))return H;return null}function oe(){let x=u();for(;x--;)if(!ke(K(x)))return x;return null}function u(){const{children:x}=y;return An(x)}function K(x){return F.current[`tabs-${x}`]}function ce(){let x=0;const{children:H,disabledTabClassName:Z,focus:Be,forceRenderTabPanel:ae,selectedIndex:de,selectedTabClassName:ve,selectedTabPanelClassName:Ae,environment:Oe}=y;p.current=p.current||[];let gt=p.current.length-u();const vt=ue.useId();for(;gt++<0;)p.current.push(`${vt}${p.current.length}`);return Bt(H,Ie=>{let _e=Ie;if(Et(Ie)){let Se=0,Xe=!1;at==null&&Po(Oe);const Qe=Oe||(typeof window<"u"?window:void 0);at&&Qe&&(Xe=Pe.Children.toArray(Ie.props.children).filter(dt).some((Je,ze)=>Qe.document.activeElement===K(ze))),_e=ue.cloneElement(Ie,{children:Bt(Ie.props.children,Je=>{const ze=`tabs-${Se}`,Ye=de===Se,Me={tabRef:Ze=>{F.current[ze]=Ze},id:p.current[Se],selected:Ye,focus:Ye&&(Be||Xe)};return ve&&(Me.selectedClassName=ve),Z&&(Me.disabledClassName=Z),Se++,ue.cloneElement(Je,Me)})})}else if(Tt(Ie)){const Se={id:p.current[x],selected:de===x};ae&&(Se.forceRender=ae),Ae&&(Se.selectedClassName=Ae),x++,_e=ue.cloneElement(Ie,Se)}return _e})}function Y(x){const{direction:H,disableUpDownKeys:Z,disableLeftRightKeys:Be}=y;if(D(x.target)){let{selectedIndex:ae}=y,de=!1,ve=!1;(x.code==="Space"||x.keyCode===32||x.code==="Enter"||x.keyCode===13)&&(de=!0,ve=!1,ie(x)),!Be&&(x.keyCode===37||x.code==="ArrowLeft")||!Z&&(x.keyCode===38||x.code==="ArrowUp")?(H==="rtl"?ae=Q(ae):ae=c(ae),de=!0,ve=!0):!Be&&(x.keyCode===39||x.code==="ArrowRight")||!Z&&(x.keyCode===40||x.code==="ArrowDown")?(H==="rtl"?ae=c(ae):ae=Q(ae),de=!0,ve=!0):x.keyCode===35||x.code==="End"?(ae=oe(),de=!0,ve=!0):(x.keyCode===36||x.code==="Home")&&(ae=V(),de=!0,ve=!0),de&&x.preventDefault(),ve&&X(ae,x)}}function ie(x){let H=x.target;do if(D(H)){if(ke(H))return;const Z=[].slice.call(H.parentNode.children).filter(Sn).indexOf(H);X(Z,x);return}while((H=H.parentNode)!=null)}function D(x){if(!Sn(x))return!1;let H=x.parentElement;do{if(H===g.current)return!0;if(H.getAttribute("data-rttabs"))break;H=H.parentElement}while(H);return!1}const{children:J,className:me,disabledTabClassName:ge,domRef:le,focus:M,forceRenderTabPanel:Re,onSelect:te,selectedIndex:we,selectedTabClassName:xe,selectedTabPanelClassName:We,environment:Ne,disableUpDownKeys:be,disableLeftRightKeys:He,...Ce}=y;return Pe.createElement("div",Object.assign({},Ce,{className:Ge(me),onClick:ie,onKeyDown:Y,ref:x=>{g.current=x,le&&le(x)},"data-rttabs":!0}),ce())};Ft.defaultProps=xo;Ft.propTypes={};const Bo=0,ut=1,Io={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},Eo=y=>y.selectedIndex===null?ut:Bo,ft=y=>{const{children:F,defaultFocus:p,defaultIndex:g,focusTabOnClick:X,onSelect:Q}=y,[c,V]=ue.useState(p),[oe]=ue.useState(Eo(y)),[u,K]=ue.useState(oe===ut?g||0:null);if(ue.useEffect(()=>{V(!1)},[]),oe===ut){const ie=An(F);ue.useEffect(()=>{if(u!=null){const D=Math.max(0,ie-1);K(Math.min(u,D))}},[ie])}const ce=(ie,D,J)=>{typeof Q=="function"&&Q(ie,D,J)===!1||(X&&V(!0),oe===ut&&K(ie))};let Y={...y};return Y.focus=c,Y.onSelect=ce,u!=null&&(Y.selectedIndex=u),delete Y.defaultFocus,delete Y.defaultIndex,delete Y.focusTabOnClick,Pe.createElement(Ft,Y,F)};ft.propTypes={};ft.defaultProps=Io;ft.tabsRole="Tabs";const To={className:"react-tabs__tab-list"},pt=y=>{const{children:F,className:p,...g}=y;return Pe.createElement("ul",Object.assign({},g,{className:Ge(p),role:"tablist"}),F)};pt.tabsRole="TabList";pt.propTypes={};pt.defaultProps=To;const xt="react-tabs__tab",Fo={className:xt,disabledClassName:`${xt}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${xt}--selected`},Ke=y=>{let F=ue.useRef();const{children:p,className:g,disabled:X,disabledClassName:Q,focus:c,id:V,selected:oe,selectedClassName:u,tabIndex:K,tabRef:ce,...Y}=y;return ue.useEffect(()=>{oe&&c&&F.current.focus()},[oe,c]),Pe.createElement("li",Object.assign({},Y,{className:Ge(g,{[u]:oe,[Q]:X}),ref:ie=>{F.current=ie,ce&&ce(ie)},role:"tab",id:`tab${V}`,"aria-selected":oe?"true":"false","aria-disabled":X?"true":"false","aria-controls":`panel${V}`,tabIndex:K||(oe?"0":null),"data-rttab":!0}),p)};Ke.propTypes={};Ke.tabsRole="Tab";Ke.defaultProps=Fo;const Pn="react-tabs__tab-panel",Ao={className:Pn,forceRender:!1,selectedClassName:`${Pn}--selected`},Ue=y=>{const{children:F,className:p,forceRender:g,id:X,selected:Q,selectedClassName:c,...V}=y;return Pe.createElement("div",Object.assign({},V,{className:Ge(p,{[c]:Q}),role:"tabpanel",id:`panel${X}`,"aria-labelledby":`tab${X}`}),g||Q?F:null)};Ue.tabsRole="TabPanel";Ue.propTypes={};Ue.defaultProps=Ao;const ko="_placeHolder_12xws_1",Go="_connQty_12xws_10",Ho="_inputWrapper_12xws_22",Oo="_input_12xws_22",qe={placeHolder:ko,connQty:Go,inputWrapper:Ho,input:Oo};var lt={},Wo={get exports(){return lt},set exports(y){lt=y}},ct={},No={get exports(){return ct},set exports(y){ct=y}};(function(y,F){(function(p,g){g(F,ue)})(ro,function(p,g){function X(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(d){return void n(d)}a.done?t(l):Promise.resolve(l).then(r,i)}function Q(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(l){X(o,r,i,s,a,"next",l)}function a(l){X(o,r,i,s,a,"throw",l)}s(void 0)})}}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function V(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function oe(e){var t=function(n,r){if(typeof n!="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g;var u={init:"init"},K=function(e){var t=e.value;return t===void 0?"":t},ce=function(){return g.createElement(g.Fragment,null," ")},Y={Cell:K,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function ie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(r,i){var o=i.style,s=i.className;return r=c({},r,{},V(i,["style","className"])),o&&(r.style=r.style?c({},r.style||{},{},o||{}):o),s&&(r.className=r.className?r.className+" "+s:s),r.className===""&&delete r.className,r},{})}var D=function(e,t){return t===void 0&&(t={}),function(n){return n===void 0&&(n={}),[].concat(e,[n]).reduce(function(r,i){return function o(s,a,l){return typeof a=="function"?o({},a(s,l)):Array.isArray(a)?ie.apply(void 0,[s].concat(a)):ie(s,a)}(r,i,c({},t,{userProps:n}))},{})}},J=function(e,t,n,r){return n===void 0&&(n={}),e.reduce(function(i,o){return o(i,n)},t)},me=function(e,t,n){return n===void 0&&(n={}),e.forEach(function(r){r(t,n)})};function ge(e,t,n,r){e.findIndex(function(i){return i.pluginName===n}),t.forEach(function(i){e.findIndex(function(o){return o.pluginName===i})})}function le(e,t){return typeof e=="function"?e(t):e}function M(e){var t=g.useRef();return t.current=e,g.useCallback(function(){return t.current},[])}var Re=typeof document<"u"?g.useLayoutEffect:g.useEffect;function te(e,t){var n=g.useRef(!1);Re(function(){n.current&&e(),n.current=!0},t)}function we(e,t,n){return n===void 0&&(n={}),function(r,i){i===void 0&&(i={});var o=typeof r=="string"?t[r]:r;if(o===void 0)throw console.info(t),new Error("Renderer Error ☝️");return xe(o,c({},e,{column:t},n,{},i))}}function xe(e,t){return function(r){return typeof r=="function"&&(i=Object.getPrototypeOf(r)).prototype&&i.prototype.isReactComponent;var i}(n=e)||typeof n=="function"||function(r){return typeof r=="object"&&typeof r.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(r.$$typeof.description)}(n)?g.createElement(e,t):e;var n}function We(e,t,n){return n===void 0&&(n=0),e.map(function(r){return be(r=c({},r,{parent:t,depth:n})),r.columns&&(r.columns=We(r.columns,r,n+1)),r})}function Ne(e){return Be(e,"columns")}function be(e){var t=e.id,n=e.accessor,r=e.Header;if(typeof n=="string"){t=t||n;var i=n.split(".");n=function(o){return function(s,a,l){if(!a)return s;var d,w=typeof a=="function"?a:JSON.stringify(a),v=x.get(w)||function(){var m=function(f){return function h(b,C){if(C===void 0&&(C=[]),Array.isArray(b))for(var B=0;B<b.length;B+=1)h(b[B],C);else C.push(b);return C}(f).map(function(h){return String(h).replace(".","_")}).join(".").replace(gt,".").replace(vt,"").split(".")}(a);return x.set(w,m),m}();try{d=v.reduce(function(m,f){return m[f]},s)}catch{}return d!==void 0?d:l}(o,i)}}if(!t&&typeof r=="string"&&r&&(t=r),!t&&e.columns)throw console.error(e),new Error('A column ID (or unique "Header" value) is required!');if(!t)throw console.error(e),new Error("A column ID (or string accessor) is required!");return Object.assign(e,{id:t,accessor:n}),e}function He(e,t){if(!t)throw new Error;return Object.assign(e,c({Header:ce,Footer:ce},Y,{},t,{},e)),Object.assign(e,{originalWidth:e.width}),e}function Ce(e,t,n){n===void 0&&(n=function(){return{}});for(var r=[],i=e,o=0,s=function(){return o++},a=function(){var l={headers:[]},d=[],w=i.some(function(v){return v.parent});i.forEach(function(v){var m,f=[].concat(d).reverse()[0];w&&(v.parent?m=c({},v.parent,{originalId:v.parent.id,id:v.parent.id+"_"+s(),headers:[v]},n(v)):m=He(c({originalId:v.id+"_placeholder",id:v.id+"_placeholder_"+s(),placeholderOf:v,headers:[v]},n(v)),t),f&&f.originalId===m.originalId?f.headers.push(v):d.push(m)),l.headers.push(v)}),r.push(l),i=d};i.length;)a();return r.reverse()}var x=new Map;function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r+=1)if(t[r]!==void 0)return t[r]}function Z(e){if(typeof e=="function")return e}function Be(e,t){var n=[];return function r(i){i.forEach(function(o){o[t]?r(o[t]):n.push(o)})}(e),n}function ae(e,t){var n=t.manualExpandedKey,r=t.expanded,i=t.expandSubRows,o=i===void 0||i,s=[];return e.forEach(function(a){return function l(d,w){w===void 0&&(w=!0),d.isExpanded=d.original&&d.original[n]||r[d.id],d.canExpand=d.subRows&&!!d.subRows.length,w&&s.push(d),d.subRows&&d.subRows.length&&d.isExpanded&&d.subRows.forEach(function(v){return l(v,o)})}(a)}),s}function de(e,t,n){return Z(e)||t[e]||n[e]||n.text}function ve(e,t,n){return e?e(t,n):t===void 0}function Ae(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var Oe=null,gt=/\[/g,vt=/\]/g,Ie=function(e){return c({role:"table"},e)},_e=function(e){return c({role:"rowgroup"},e)},Se=function(e,t){var n=t.column;return c({key:"header_"+n.id,colSpan:n.totalVisibleHeaderCount,role:"columnheader"},e)},Xe=function(e,t){var n=t.column;return c({key:"footer_"+n.id,colSpan:n.totalVisibleHeaderCount},e)},Qe=function(e,t){return c({key:"headerGroup_"+t.index,role:"row"},e)},Je=function(e,t){return c({key:"footerGroup_"+t.index},e)},ze=function(e,t){return c({key:"row_"+t.row.id,role:"row"},e)},Ye=function(e,t){var n=t.cell;return c({key:"cell_"+n.row.id+"_"+n.column.id,role:"cell"},e)};function Me(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[Ie],getTableBodyProps:[_e],getHeaderGroupProps:[Qe],getFooterGroupProps:[Je],getHeaderProps:[Se],getFooterProps:[Xe],getRowProps:[ze],getCellProps:[Ye],useFinalInstance:[]}}u.resetHiddenColumns="resetHiddenColumns",u.toggleHideColumn="toggleHideColumn",u.setHiddenColumns="setHiddenColumns",u.toggleHideAllColumns="toggleHideAllColumns";var Ze=function(e){e.getToggleHiddenProps=[Hn],e.getToggleHideAllColumnsProps=[On],e.stateReducers.push(Wn),e.useInstanceBeforeDimensions.push(Nn),e.headerGroupsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.hiddenColumns])}),e.useInstance.push(_n)};Ze.pluginName="useColumnVisibility";var Hn=function(e,t){var n=t.column;return[e,{onChange:function(r){n.toggleHidden(!r.target.checked)},style:{cursor:"pointer"},checked:n.isVisible,title:"Toggle Column Visible"}]},On=function(e,t){var n=t.instance;return[e,{onChange:function(r){n.toggleHideAllColumns(!r.target.checked)},style:{cursor:"pointer"},checked:!n.allColumnsHidden&&!n.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!n.allColumnsHidden&&n.state.hiddenColumns.length}]};function Wn(e,t,n,r){if(t.type===u.init)return c({hiddenColumns:[]},e);if(t.type===u.resetHiddenColumns)return c({},e,{hiddenColumns:r.initialState.hiddenColumns||[]});if(t.type===u.toggleHideColumn){var i=(t.value!==void 0?t.value:!e.hiddenColumns.includes(t.columnId))?[].concat(e.hiddenColumns,[t.columnId]):e.hiddenColumns.filter(function(o){return o!==t.columnId});return c({},e,{hiddenColumns:i})}return t.type===u.setHiddenColumns?c({},e,{hiddenColumns:le(t.value,e.hiddenColumns)}):t.type===u.toggleHideAllColumns?c({},e,{hiddenColumns:(t.value!==void 0?t.value:!e.hiddenColumns.length)?r.allColumns.map(function(o){return o.id}):[]}):void 0}function Nn(e){var t=e.headers,n=e.state.hiddenColumns;g.useRef(!1).current;var r=0;t.forEach(function(i){return r+=function o(s,a){s.isVisible=a&&!n.includes(s.id);var l=0;return s.headers&&s.headers.length?s.headers.forEach(function(d){return l+=o(d,s.isVisible)}):l=s.isVisible?1:0,s.totalVisibleHeaderCount=l,l}(i,!0)})}function _n(e){var t=e.columns,n=e.flatHeaders,r=e.dispatch,i=e.allColumns,o=e.getHooks,s=e.state.hiddenColumns,a=e.autoResetHiddenColumns,l=a===void 0||a,d=M(e),w=i.length===s.length,v=g.useCallback(function(C,B){return r({type:u.toggleHideColumn,columnId:C,value:B})},[r]),m=g.useCallback(function(C){return r({type:u.setHiddenColumns,value:C})},[r]),f=g.useCallback(function(C){return r({type:u.toggleHideAllColumns,value:C})},[r]),h=D(o().getToggleHideAllColumnsProps,{instance:d()});n.forEach(function(C){C.toggleHidden=function(B){r({type:u.toggleHideColumn,columnId:C.id,value:B})},C.getToggleHiddenProps=D(o().getToggleHiddenProps,{instance:d(),column:C})});var b=M(l);te(function(){b()&&r({type:u.resetHiddenColumns})},[r,t]),Object.assign(e,{allColumnsHidden:w,toggleHideColumn:v,setHiddenColumns:m,toggleHideAllColumns:f,getToggleHideAllColumnsProps:h})}var zn={},Mn={},Ln=function(e,t,n){return e},Dn=function(e,t){return e.subRows||[]},jn=function(e,t,n){return""+(n?[n.id,t].join("."):t)},Vn=function(e){return e};function At(e){var t=e.initialState,n=t===void 0?zn:t,r=e.defaultColumn,i=r===void 0?Mn:r,o=e.getSubRows,s=o===void 0?Dn:o,a=e.getRowId,l=a===void 0?jn:a,d=e.stateReducer,w=d===void 0?Ln:d,v=e.useControlledState,m=v===void 0?Vn:v;return c({},V(e,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:n,defaultColumn:i,getSubRows:s,getRowId:l,stateReducer:w,useControlledState:m})}function kt(e,t){t===void 0&&(t=0);var n=0,r=0,i=0,o=0;return e.forEach(function(s){var a=s.headers;if(s.totalLeft=t,a&&a.length){var l=kt(a,t),d=l[0],w=l[1],v=l[2],m=l[3];s.totalMinWidth=d,s.totalWidth=w,s.totalMaxWidth=v,s.totalFlexWidth=m}else s.totalMinWidth=s.minWidth,s.totalWidth=Math.min(Math.max(s.minWidth,s.width),s.maxWidth),s.totalMaxWidth=s.maxWidth,s.totalFlexWidth=s.canResize?s.totalWidth:0;s.isVisible&&(t+=s.totalWidth,n+=s.totalMinWidth,r+=s.totalWidth,i+=s.totalMaxWidth,o+=s.totalFlexWidth)}),[n,r,i,o]}function $n(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.column,s=e.getRowId,a=e.getSubRows,l=e.accessValueHooks,d=e.getInstance;t.forEach(function(w,v){return function m(f,h,b,C,B){b===void 0&&(b=0);var W=f,P=s(f,h,C),R=i[P];if(R)R.subRows&&R.originalSubRows.forEach(function(S,k){return m(S,k,b+1,R)});else if((R={id:P,original:W,index:h,depth:b,cells:[{}]}).cells.map=Ae,R.cells.filter=Ae,R.cells.forEach=Ae,R.cells[0].getCellProps=Ae,R.values={},B.push(R),r.push(R),i[P]=R,R.originalSubRows=a(f,h),R.originalSubRows){var O=[];R.originalSubRows.forEach(function(S,k){return m(S,k,b+1,R,O)}),R.subRows=O}o.accessor&&(R.values[o.id]=o.accessor(f,h,R,B,t)),R.values[o.id]=J(l,R.values[o.id],{row:R,column:o,instance:d()})}(w,v,0,void 0,n)})}u.resetExpanded="resetExpanded",u.toggleRowExpanded="toggleRowExpanded",u.toggleAllRowsExpanded="toggleAllRowsExpanded";var Gt=function(e){e.getToggleAllRowsExpandedProps=[qn],e.getToggleRowExpandedProps=[Kn],e.stateReducers.push(Un),e.useInstance.push(Xn),e.prepareRow.push(Qn)};Gt.pluginName="useExpanded";var qn=function(e,t){var n=t.instance;return[e,{onClick:function(r){n.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},Kn=function(e,t){var n=t.row;return[e,{onClick:function(){n.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function Un(e,t,n,r){if(t.type===u.init)return c({expanded:{}},e);if(t.type===u.resetExpanded)return c({},e,{expanded:r.initialState.expanded||{}});if(t.type===u.toggleAllRowsExpanded){var i=t.value,o=r.rowsById,s=Object.keys(o).length===Object.keys(e.expanded).length;if(i!==void 0?i:!s){var a={};return Object.keys(o).forEach(function(h){a[h]=!0}),c({},e,{expanded:a})}return c({},e,{expanded:{}})}if(t.type===u.toggleRowExpanded){var l,d=t.id,w=t.value,v=e.expanded[d],m=w!==void 0?w:!v;if(!v&&m)return c({},e,{expanded:c({},e.expanded,(l={},l[d]=!0,l))});if(v&&!m){var f=e.expanded;return f[d],c({},e,{expanded:V(f,[d].map(oe))})}return e}}function Xn(e){var t=e.data,n=e.rows,r=e.rowsById,i=e.manualExpandedKey,o=i===void 0?"expanded":i,s=e.paginateExpandedRows,a=s===void 0||s,l=e.expandSubRows,d=l===void 0||l,w=e.autoResetExpanded,v=w===void 0||w,m=e.getHooks,f=e.plugins,h=e.state.expanded,b=e.dispatch;ge(f,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var C=M(v),B=Boolean(Object.keys(r).length&&Object.keys(h).length);B&&Object.keys(r).some(function(N){return!h[N]})&&(B=!1),te(function(){C()&&b({type:u.resetExpanded})},[b,t]);var W=g.useCallback(function(N,E){b({type:u.toggleRowExpanded,id:N,value:E})},[b]),P=g.useCallback(function(N){return b({type:u.toggleAllRowsExpanded,value:N})},[b]),R=g.useMemo(function(){return a?ae(n,{manualExpandedKey:o,expanded:h,expandSubRows:d}):n},[a,n,o,h,d]),O=g.useMemo(function(){return function(N){var E=0;return Object.keys(N).forEach(function(A){var j=A.split(".");E=Math.max(E,j.length)}),E}(h)},[h]),S=M(e),k=D(m().getToggleAllRowsExpandedProps,{instance:S()});Object.assign(e,{preExpandedRows:n,expandedRows:R,rows:R,expandedDepth:O,isAllRowsExpanded:B,toggleRowExpanded:W,toggleAllRowsExpanded:P,getToggleAllRowsExpandedProps:k})}function Qn(e,t){var n=t.instance.getHooks,r=t.instance;e.toggleRowExpanded=function(i){return r.toggleRowExpanded(e.id,i)},e.getToggleRowExpandedProps=D(n().getToggleRowExpandedProps,{instance:r,row:e})}var Ht=function(e,t,n){return e=e.filter(function(r){return t.some(function(i){var o=r.values[i];return String(o).toLowerCase().includes(String(n).toLowerCase())})})};Ht.autoRemove=function(e){return!e};var Ot=function(e,t,n){return e.filter(function(r){return t.some(function(i){var o=r.values[i];return o===void 0||String(o).toLowerCase()===String(n).toLowerCase()})})};Ot.autoRemove=function(e){return!e};var Wt=function(e,t,n){return e.filter(function(r){return t.some(function(i){var o=r.values[i];return o===void 0||String(o)===String(n)})})};Wt.autoRemove=function(e){return!e};var Nt=function(e,t,n){return e.filter(function(r){return t.some(function(i){return r.values[i].includes(n)})})};Nt.autoRemove=function(e){return!e||!e.length};var _t=function(e,t,n){return e.filter(function(r){return t.some(function(i){var o=r.values[i];return o&&o.length&&n.every(function(s){return o.includes(s)})})})};_t.autoRemove=function(e){return!e||!e.length};var zt=function(e,t,n){return e.filter(function(r){return t.some(function(i){var o=r.values[i];return o&&o.length&&n.some(function(s){return o.includes(s)})})})};zt.autoRemove=function(e){return!e||!e.length};var Mt=function(e,t,n){return e.filter(function(r){return t.some(function(i){var o=r.values[i];return n.includes(o)})})};Mt.autoRemove=function(e){return!e||!e.length};var Lt=function(e,t,n){return e.filter(function(r){return t.some(function(i){return r.values[i]===n})})};Lt.autoRemove=function(e){return e===void 0};var Dt=function(e,t,n){return e.filter(function(r){return t.some(function(i){return r.values[i]==n})})};Dt.autoRemove=function(e){return e==null};var jt=function(e,t,n){var r=n||[],i=r[0],o=r[1];if((i=typeof i=="number"?i:-1/0)>(o=typeof o=="number"?o:1/0)){var s=i;i=o,o=s}return e.filter(function(a){return t.some(function(l){var d=a.values[l];return d>=i&&d<=o})})};jt.autoRemove=function(e){return!e||typeof e[0]!="number"&&typeof e[1]!="number"};var Le=Object.freeze({__proto__:null,text:Ht,exactText:Ot,exactTextCase:Wt,includes:Nt,includesAll:_t,includesSome:zt,includesValue:Mt,exact:Lt,equals:Dt,between:jt});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var Vt=function(e){e.stateReducers.push(Jn),e.useInstance.push(Yn)};function Jn(e,t,n,r){if(t.type===u.init)return c({filters:[]},e);if(t.type===u.resetFilters)return c({},e,{filters:r.initialState.filters||[]});if(t.type===u.setFilter){var i=t.columnId,o=t.filterValue,s=r.allColumns,a=r.filterTypes,l=s.find(function(b){return b.id===i});if(!l)throw new Error("React-Table: Could not find a column with id: "+i);var d=de(l.filter,a||{},Le),w=e.filters.find(function(b){return b.id===i}),v=le(o,w&&w.value);return ve(d.autoRemove,v,l)?c({},e,{filters:e.filters.filter(function(b){return b.id!==i})}):c({},e,w?{filters:e.filters.map(function(b){return b.id===i?{id:i,value:v}:b})}:{filters:[].concat(e.filters,[{id:i,value:v}])})}if(t.type===u.setAllFilters){var m=t.filters,f=r.allColumns,h=r.filterTypes;return c({},e,{filters:le(m,e.filters).filter(function(b){var C=f.find(function(B){return B.id===b.id});return!ve(de(C.filter,h||{},Le).autoRemove,b.value,C)})})}}function Yn(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,s=e.filterTypes,a=e.manualFilters,l=e.defaultCanFilter,d=l!==void 0&&l,w=e.disableFilters,v=e.state.filters,m=e.dispatch,f=e.autoResetFilters,h=f===void 0||f,b=g.useCallback(function(S,k){m({type:u.setFilter,columnId:S,filterValue:k})},[m]),C=g.useCallback(function(S){m({type:u.setAllFilters,filters:S})},[m]);o.forEach(function(S){var k=S.id,N=S.accessor,E=S.defaultCanFilter,A=S.disableFilters;S.canFilter=N?H(A!==!0&&void 0,w!==!0&&void 0,!0):H(E,d,!1),S.setFilter=function(G){return b(S.id,G)};var j=v.find(function(G){return G.id===k});S.filterValue=j&&j.value});var B=g.useMemo(function(){if(a||!v.length)return[n,r,i];var S=[],k={};return[function N(E,A){A===void 0&&(A=0);var j=E;return(j=v.reduce(function(G,L){var z=L.id,q=L.value,I=o.find(function(ee){return ee.id===z});if(!I)return G;A===0&&(I.preFilteredRows=G);var _=de(I.filter,s||{},Le);return _?(I.filteredRows=_(G,[z],q),I.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+I.id+"."),G)},E)).forEach(function(G){S.push(G),k[G.id]=G,G.subRows&&(G.subRows=G.subRows&&G.subRows.length>0?N(G.subRows,A+1):G.subRows)}),j}(n),S,k]},[a,v,n,r,i,o,s]),W=B[0],P=B[1],R=B[2];g.useMemo(function(){o.filter(function(S){return!v.find(function(k){return k.id===S.id})}).forEach(function(S){S.preFilteredRows=W,S.filteredRows=W})},[W,v,o]);var O=M(h);te(function(){O()&&m({type:u.resetFilters})},[m,a?null:t]),Object.assign(e,{preFilteredRows:n,preFilteredFlatRows:r,preFilteredRowsById:i,filteredRows:W,filteredFlatRows:P,filteredRowsById:R,rows:W,flatRows:P,rowsById:R,setFilter:b,setAllFilters:C})}Vt.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var $t=function(e){e.stateReducers.push(Zn),e.useInstance.push(er)};function Zn(e,t,n,r){if(t.type===u.resetGlobalFilter)return c({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===u.setGlobalFilter){var i=t.filterValue,o=r.userFilterTypes,s=de(r.globalFilter,o||{},Le),a=le(i,e.globalFilter);return ve(s.autoRemove,a)?(e.globalFilter,V(e,["globalFilter"])):c({},e,{globalFilter:a})}}function er(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,s=e.filterTypes,a=e.globalFilter,l=e.manualGlobalFilter,d=e.state.globalFilter,w=e.dispatch,v=e.autoResetGlobalFilter,m=v===void 0||v,f=e.disableGlobalFilter,h=g.useCallback(function(R){w({type:u.setGlobalFilter,filterValue:R})},[w]),b=g.useMemo(function(){if(l||d===void 0)return[n,r,i];var R=[],O={},S=de(a,s||{},Le);if(!S)return console.warn("Could not find a valid 'globalFilter' option."),n;o.forEach(function(N){var E=N.disableGlobalFilter;N.canFilter=H(E!==!0&&void 0,f!==!0&&void 0,!0)});var k=o.filter(function(N){return N.canFilter===!0});return[function N(E){return(E=S(E,k.map(function(A){return A.id}),d)).forEach(function(A){R.push(A),O[A.id]=A,A.subRows=A.subRows&&A.subRows.length?N(A.subRows):A.subRows}),E}(n),R,O]},[l,d,a,s,o,n,r,i,f]),C=b[0],B=b[1],W=b[2],P=M(m);te(function(){P()&&w({type:u.resetGlobalFilter})},[w,l?null:t]),Object.assign(e,{preGlobalFilteredRows:n,preGlobalFilteredFlatRows:r,preGlobalFilteredRowsById:i,globalFilteredRows:C,globalFilteredFlatRows:B,globalFilteredRowsById:W,rows:C,flatRows:B,rowsById:W,setGlobalFilter:h,disableGlobalFilter:f})}function qt(e,t){return t.reduce(function(n,r){return n+(typeof r=="number"?r:0)},0)}$t.pluginName="useGlobalFilter";var Kt=Object.freeze({__proto__:null,sum:qt,min:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.min(t,n))}),t},max:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.max(t,n))}),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach(function(r){typeof r=="number"&&(t=Math.min(t,r),n=Math.max(n,r))}),t+".."+n},average:function(e){return qt(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort(function(r,i){return r-i});return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),tr=[],nr={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var Ut=function(e){e.getGroupByToggleProps=[rr],e.stateReducers.push(or),e.visibleColumnsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.groupBy])}),e.visibleColumns.push(ir),e.useInstance.push(ur),e.prepareRow.push(ar)};Ut.pluginName="useGroupBy";var rr=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(r){r.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function or(e,t,n,r){if(t.type===u.init)return c({groupBy:[]},e);if(t.type===u.resetGroupBy)return c({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===u.setGroupBy)return c({},e,{groupBy:t.value});if(t.type===u.toggleGroupBy){var i=t.columnId,o=t.value,s=o!==void 0?o:!e.groupBy.includes(i);return c({},e,s?{groupBy:[].concat(e.groupBy,[i])}:{groupBy:e.groupBy.filter(function(a){return a!==i})})}}function ir(e,t){var n=t.instance.state.groupBy,r=n.map(function(o){return e.find(function(s){return s.id===o})}).filter(Boolean),i=e.filter(function(o){return!n.includes(o.id)});return(e=[].concat(r,i)).forEach(function(o){o.isGrouped=n.includes(o.id),o.groupedIndex=n.indexOf(o.id)}),e}var sr={};function ur(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.rowsById,o=e.allColumns,s=e.flatHeaders,a=e.groupByFn,l=a===void 0?Xt:a,d=e.manualGroupBy,w=e.aggregations,v=w===void 0?sr:w,m=e.plugins,f=e.state.groupBy,h=e.dispatch,b=e.autoResetGroupBy,C=b===void 0||b,B=e.disableGroupBy,W=e.defaultCanGroupBy,P=e.getHooks;ge(m,["useColumnOrder","useFilters"],"useGroupBy");var R=M(e);o.forEach(function(I){var _=I.accessor,ee=I.defaultGroupBy,fe=I.disableGroupBy;I.canGroupBy=_?H(I.canGroupBy,fe!==!0&&void 0,B!==!0&&void 0,!0):H(I.canGroupBy,ee,W,!1),I.canGroupBy&&(I.toggleGroupBy=function(){return e.toggleGroupBy(I.id)}),I.Aggregated=I.Aggregated||I.Cell});var O=g.useCallback(function(I,_){h({type:u.toggleGroupBy,columnId:I,value:_})},[h]),S=g.useCallback(function(I){h({type:u.setGroupBy,value:I})},[h]);s.forEach(function(I){I.getGroupByToggleProps=D(P().getGroupByToggleProps,{instance:R(),header:I})});var k=g.useMemo(function(){if(d||!f.length)return[n,r,i,tr,nr,r,i];var I=f.filter(function(se){return o.find(function(Te){return Te.id===se})}),_=[],ee={},fe=[],T={},U=[],ne={},pe=function se(Te,Ee,gn){if(Ee===void 0&&(Ee=0),Ee===I.length)return Te.map(function(tt){return c({},tt,{depth:Ee})});var Ct=I[Ee],Qr=l(Te,Ct);return Object.entries(Qr).map(function(tt,Jr){var vn=tt[0],nt=tt[1],rt=Ct+":"+vn,mn=se(nt,Ee+1,rt=gn?gn+">"+rt:rt),hn=Ee?Be(nt,"leafRows"):nt,Yr=function(he,St,eo){var ot={};return o.forEach(function(re){if(I.includes(re.id))ot[re.id]=St[0]?St[0].values[re.id]:null;else{var yn=typeof re.aggregate=="function"?re.aggregate:v[re.aggregate]||Kt[re.aggregate];if(yn){var to=St.map(function(it){return it.values[re.id]}),no=he.map(function(it){var Pt=it.values[re.id];if(!eo&&re.aggregateValue){var wn=typeof re.aggregateValue=="function"?re.aggregateValue:v[re.aggregateValue]||Kt[re.aggregateValue];if(!wn)throw console.info({column:re}),new Error("React Table: Invalid column.aggregateValue option for column listed above");Pt=wn(Pt,it,re)}return Pt});ot[re.id]=yn(no,to)}else{if(re.aggregate)throw console.info({column:re}),new Error("React Table: Invalid column.aggregate option for column listed above");ot[re.id]=null}}}),ot}(hn,nt,Ee),Zr={id:rt,isGrouped:!0,groupByID:Ct,groupByVal:vn,values:Yr,subRows:mn,leafRows:hn,depth:Ee,index:Jr};return mn.forEach(function(he){_.push(he),ee[he.id]=he,he.isGrouped?(fe.push(he),T[he.id]=he):(U.push(he),ne[he.id]=he)}),Zr})}(n);return pe.forEach(function(se){_.push(se),ee[se.id]=se,se.isGrouped?(fe.push(se),T[se.id]=se):(U.push(se),ne[se.id]=se)}),[pe,_,ee,fe,T,U,ne]},[d,f,n,r,i,o,v,l]),N=k[0],E=k[1],A=k[2],j=k[3],G=k[4],L=k[5],z=k[6],q=M(C);te(function(){q()&&h({type:u.resetGroupBy})},[h,d?null:t]),Object.assign(e,{preGroupedRows:n,preGroupedFlatRow:r,preGroupedRowsById:i,groupedRows:N,groupedFlatRows:E,groupedRowsById:A,onlyGroupedFlatRows:j,onlyGroupedRowsById:G,nonGroupedFlatRows:L,nonGroupedRowsById:z,rows:N,flatRows:E,rowsById:A,toggleGroupBy:O,setGroupBy:S})}function ar(e){e.allCells.forEach(function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&((n=e.subRows)==null?void 0:n.length)})}function Xt(e,t){return e.reduce(function(n,r,i){var o=""+r.values[t];return n[o]=Array.isArray(n[o])?n[o]:[],n[o].push(r),n},{})}var Qt=/([0-9]+)/gm;function mt(e,t){return e===t?0:e>t?1:-1}function De(e,t,n){return[e.values[n],t.values[n]]}function Jt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}var lr=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=De(e,t,n),i=r[0],o=r[1];for(i=Jt(i),o=Jt(o),i=i.split(Qt).filter(Boolean),o=o.split(Qt).filter(Boolean);i.length&&o.length;){var s=i.shift(),a=o.shift(),l=parseInt(s,10),d=parseInt(a,10),w=[l,d].sort();if(isNaN(w[0])){if(s>a)return 1;if(a>s)return-1}else{if(isNaN(w[1]))return isNaN(l)?-1:1;if(l>d)return 1;if(d>l)return-1}}return i.length-o.length},datetime:function(e,t,n){var r=De(e,t,n),i=r[0],o=r[1];return mt(i=i.getTime(),o=o.getTime())},basic:function(e,t,n){var r=De(e,t,n);return mt(r[0],r[1])},string:function(e,t,n){var r=De(e,t,n),i=r[0],o=r[1];for(i=i.split("").filter(Boolean),o=o.split("").filter(Boolean);i.length&&o.length;){var s=i.shift(),a=o.shift(),l=s.toLowerCase(),d=a.toLowerCase();if(l>d)return 1;if(d>l)return-1;if(s>a)return 1;if(a>s)return-1}return i.length-o.length},number:function(e,t,n){var r=De(e,t,n),i=r[0],o=r[1],s=/[^0-9.]/gi;return mt(i=Number(String(i).replace(s,"")),o=Number(String(o).replace(s,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",Y.sortType="alphanumeric",Y.sortDescFirst=!1;var Yt=function(e){e.getSortByToggleProps=[cr],e.stateReducers.push(dr),e.useInstance.push(fr)};Yt.pluginName="useSortBy";var cr=function(e,t){var n=t.instance,r=t.column,i=n.isMultiSortEvent,o=i===void 0?function(s){return s.shiftKey}:i;return[e,{onClick:r.canSort?function(s){s.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&o(s))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function dr(e,t,n,r){if(t.type===u.init)return c({sortBy:[]},e);if(t.type===u.resetSortBy)return c({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===u.clearSortBy)return c({},e,{sortBy:e.sortBy.filter(function(R){return R.id!==t.columnId})});if(t.type===u.setSortBy)return c({},e,{sortBy:t.sortBy});if(t.type===u.toggleSortBy){var i,o=t.columnId,s=t.desc,a=t.multi,l=r.allColumns,d=r.disableMultiSort,w=r.disableSortRemove,v=r.disableMultiRemove,m=r.maxMultiSortColCount,f=m===void 0?Number.MAX_SAFE_INTEGER:m,h=e.sortBy,b=l.find(function(R){return R.id===o}).sortDescFirst,C=h.find(function(R){return R.id===o}),B=h.findIndex(function(R){return R.id===o}),W=s!=null,P=[];return(i=!d&&a?C?"toggle":"add":B!==h.length-1||h.length!==1?"replace":C?"toggle":"replace")!="toggle"||w||W||a&&v||!(C&&C.desc&&!b||!C.desc&&b)||(i="remove"),i==="replace"?P=[{id:o,desc:W?s:b}]:i==="add"?(P=[].concat(h,[{id:o,desc:W?s:b}])).splice(0,P.length-f):i==="toggle"?P=h.map(function(R){return R.id===o?c({},R,{desc:W?s:!C.desc}):R}):i==="remove"&&(P=h.filter(function(R){return R.id!==o})),c({},e,{sortBy:P})}}function fr(e){var t=e.data,n=e.rows,r=e.flatRows,i=e.allColumns,o=e.orderByFn,s=o===void 0?Zt:o,a=e.sortTypes,l=e.manualSortBy,d=e.defaultCanSort,w=e.disableSortBy,v=e.flatHeaders,m=e.state.sortBy,f=e.dispatch,h=e.plugins,b=e.getHooks,C=e.autoResetSortBy,B=C===void 0||C;ge(h,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var W=g.useCallback(function(E){f({type:u.setSortBy,sortBy:E})},[f]),P=g.useCallback(function(E,A,j){f({type:u.toggleSortBy,columnId:E,desc:A,multi:j})},[f]),R=M(e);v.forEach(function(E){var A=E.accessor,j=E.canSort,G=E.disableSortBy,L=E.id,z=A?H(G!==!0&&void 0,w!==!0&&void 0,!0):H(d,j,!1);E.canSort=z,E.canSort&&(E.toggleSortBy=function(I,_){return P(E.id,I,_)},E.clearSortBy=function(){f({type:u.clearSortBy,columnId:E.id})}),E.getSortByToggleProps=D(b().getSortByToggleProps,{instance:R(),column:E});var q=m.find(function(I){return I.id===L});E.isSorted=!!q,E.sortedIndex=m.findIndex(function(I){return I.id===L}),E.isSortedDesc=E.isSorted?q.desc:void 0});var O=g.useMemo(function(){if(l||!m.length)return[n,r];var E=[],A=m.filter(function(j){return i.find(function(G){return G.id===j.id})});return[function j(G){var L=s(G,A.map(function(z){var q=i.find(function(ee){return ee.id===z.id});if(!q)throw new Error("React-Table: Could not find a column with id: "+z.id+" while sorting");var I=q.sortType,_=Z(I)||(a||{})[I]||lr[I];if(!_)throw new Error("React-Table: Could not find a valid sortType of '"+I+"' for column '"+z.id+"'.");return function(ee,fe){return _(ee,fe,z.id,z.desc)}}),A.map(function(z){var q=i.find(function(I){return I.id===z.id});return q&&q.sortInverted?z.desc:!z.desc}));return L.forEach(function(z){E.push(z),z.subRows&&z.subRows.length!==0&&(z.subRows=j(z.subRows))}),L}(n),E]},[l,m,n,r,i,s,a]),S=O[0],k=O[1],N=M(B);te(function(){N()&&f({type:u.resetSortBy})},[l?null:t]),Object.assign(e,{preSortedRows:n,preSortedFlatRows:r,sortedRows:S,sortedFlatRows:k,rows:S,flatRows:k,setSortBy:W,toggleSortBy:P})}function Zt(e,t,n){return[].concat(e).sort(function(r,i){for(var o=0;o<t.length;o+=1){var s=t[o],a=n[o]===!1||n[o]==="desc",l=s(r,i);if(l!==0)return a?-l:l}return n[0]?r.index-i.index:i.index-r.index})}u.resetPage="resetPage",u.gotoPage="gotoPage",u.setPageSize="setPageSize";var en=function(e){e.stateReducers.push(pr),e.useInstance.push(gr)};function pr(e,t,n,r){if(t.type===u.init)return c({pageSize:10,pageIndex:0},e);if(t.type===u.resetPage)return c({},e,{pageIndex:r.initialState.pageIndex||0});if(t.type===u.gotoPage){var i=r.pageCount,o=r.page,s=le(t.pageIndex,e.pageIndex),a=!1;return s>e.pageIndex?a=i===-1?o.length>=e.pageSize:s<i:s<e.pageIndex&&(a=s>-1),a?c({},e,{pageIndex:s}):e}if(t.type===u.setPageSize){var l=t.pageSize,d=e.pageSize*e.pageIndex;return c({},e,{pageIndex:Math.floor(d/l),pageSize:l})}}function gr(e){var t=e.rows,n=e.autoResetPage,r=n===void 0||n,i=e.manualExpandedKey,o=i===void 0?"expanded":i,s=e.plugins,a=e.pageCount,l=e.paginateExpandedRows,d=l===void 0||l,w=e.expandSubRows,v=w===void 0||w,m=e.state,f=m.pageSize,h=m.pageIndex,b=m.expanded,C=m.globalFilter,B=m.filters,W=m.groupBy,P=m.sortBy,R=e.dispatch,O=e.data,S=e.manualPagination;ge(s,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var k=M(r);te(function(){k()&&R({type:u.resetPage})},[R,S?null:O,C,B,W,P]);var N=S?a:Math.ceil(t.length/f),E=g.useMemo(function(){return N>0?[].concat(new Array(N)).fill(null).map(function(_,ee){return ee}):[]},[N]),A=g.useMemo(function(){var _;if(S)_=t;else{var ee=f*h,fe=ee+f;_=t.slice(ee,fe)}return d?_:ae(_,{manualExpandedKey:o,expanded:b,expandSubRows:v})},[v,b,o,S,h,f,d,t]),j=h>0,G=N===-1?A.length>=f:h<N-1,L=g.useCallback(function(_){R({type:u.gotoPage,pageIndex:_})},[R]),z=g.useCallback(function(){return L(function(_){return _-1})},[L]),q=g.useCallback(function(){return L(function(_){return _+1})},[L]),I=g.useCallback(function(_){R({type:u.setPageSize,pageSize:_})},[R]);Object.assign(e,{pageOptions:E,pageCount:N,page:A,canPreviousPage:j,canNextPage:G,gotoPage:L,previousPage:z,nextPage:q,setPageSize:I})}en.pluginName="usePagination",u.resetPivot="resetPivot",u.togglePivot="togglePivot";var tn=function(e){e.getPivotToggleProps=[vr],e.stateReducers.push(mr),e.useInstanceAfterData.push(hr),e.allColumns.push(yr),e.accessValue.push(wr),e.materializedColumns.push(Rr),e.materializedColumnsDeps.push(br),e.visibleColumns.push(Cr),e.visibleColumnsDeps.push(Sr),e.useInstance.push(Pr),e.prepareRow.push(xr)};tn.pluginName="usePivotColumns";var nn=[],vr=function(e,t){var n=t.header;return[e,{onClick:n.canPivot?function(r){r.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function mr(e,t,n,r){if(t.type===u.init)return c({pivotColumns:nn},e);if(t.type===u.resetPivot)return c({},e,{pivotColumns:r.initialState.pivotColumns||nn});if(t.type===u.togglePivot){var i=t.columnId,o=t.value,s=o!==void 0?o:!e.pivotColumns.includes(i);return c({},e,s?{pivotColumns:[].concat(e.pivotColumns,[i])}:{pivotColumns:e.pivotColumns.filter(function(a){return a!==i})})}}function hr(e){e.allColumns.forEach(function(t){t.isPivotSource=e.state.pivotColumns.includes(t.id)})}function yr(e,t){var n=t.instance;return e.forEach(function(r){r.isPivotSource=n.state.pivotColumns.includes(r.id),r.uniqueValues=new Set}),e}function wr(e,t){var n=t.column;return n.uniqueValues&&e!==void 0&&n.uniqueValues.add(e),e}function Rr(e,t){var n=t.instance,r=n.allColumns,i=n.state;if(!i.pivotColumns.length||!i.groupBy||!i.groupBy.length)return e;var o=i.pivotColumns.map(function(l){return r.find(function(d){return d.id===l})}).filter(Boolean),s=r.filter(function(l){return!l.isPivotSource&&!i.groupBy.includes(l.id)&&!i.pivotColumns.includes(l.id)}),a=Ne(function l(d,w,v){d===void 0&&(d=0),v===void 0&&(v=[]);var m=o[d];return m?Array.from(m.uniqueValues).sort().map(function(f){var h=c({},m,{Header:m.PivotHeader||typeof m.header=="string"?m.Header+": "+f:f,isPivotGroup:!0,parent:w,depth:d,id:w?w.id+"."+m.id+"."+f:m.id+"."+f,pivotValue:f});return h.columns=l(d+1,h,[].concat(v,[function(b){return b.values[m.id]===f}])),h}):s.map(function(f){return c({},f,{canPivot:!1,isPivoted:!0,parent:w,depth:d,id:""+(w?w.id+"."+f.id:f.id),accessor:function(h,b,C){if(v.every(function(B){return B(C)}))return C.values[f.id]}})})}());return[].concat(e,a)}function br(e,t){var n=t.instance.state,r=n.pivotColumns,i=n.groupBy;return[].concat(e,[r,i])}function Cr(e,t){var n=t.instance.state;return e=e.filter(function(r){return!r.isPivotSource}),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(e=e.filter(function(r){return r.isGrouped||r.isPivoted})),e}function Sr(e,t){var n=t.instance;return[].concat(e,[n.state.pivotColumns,n.state.groupBy])}function Pr(e){var t=e.columns,n=e.allColumns,r=e.flatHeaders,i=e.getHooks,o=e.plugins,s=e.dispatch,a=e.autoResetPivot,l=a===void 0||a,d=e.manaulPivot,w=e.disablePivot,v=e.defaultCanPivot;ge(o,["useGroupBy"],"usePivotColumns");var m=M(e);n.forEach(function(h){var b=h.accessor,C=h.defaultPivot,B=h.disablePivot;h.canPivot=b?H(h.canPivot,B!==!0&&void 0,w!==!0&&void 0,!0):H(h.canPivot,C,v,!1),h.canPivot&&(h.togglePivot=function(){return e.togglePivot(h.id)}),h.Aggregated=h.Aggregated||h.Cell}),r.forEach(function(h){h.getPivotToggleProps=D(i().getPivotToggleProps,{instance:m(),header:h})});var f=M(l);te(function(){f()&&s({type:u.resetPivot})},[s,d?null:t]),Object.assign(e,{togglePivot:function(h,b){s({type:u.togglePivot,columnId:h,value:b})}})}function xr(e){e.allCells.forEach(function(t){t.isPivoted=t.column.isPivoted})}u.resetSelectedRows="resetSelectedRows",u.toggleAllRowsSelected="toggleAllRowsSelected",u.toggleRowSelected="toggleRowSelected",u.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var rn=function(e){e.getToggleRowSelectedProps=[Br],e.getToggleAllRowsSelectedProps=[Ir],e.getToggleAllPageRowsSelectedProps=[Er],e.stateReducers.push(Tr),e.useInstance.push(Fr),e.prepareRow.push(Ar)};rn.pluginName="useRowSelect";var Br=function(e,t){var n=t.instance,r=t.row,i=n.manualRowSelectedKey,o=i===void 0?"isSelected":i;return[e,{onChange:function(s){r.toggleRowSelected(s.target.checked)},style:{cursor:"pointer"},checked:!(!r.original||!r.original[o])||r.isSelected,title:"Toggle Row Selected",indeterminate:r.isSomeSelected}]},Ir=function(e,t){var n=t.instance;return[e,{onChange:function(r){n.toggleAllRowsSelected(r.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},Er=function(e,t){var n=t.instance;return[e,{onChange:function(r){n.toggleAllPageRowsSelected(r.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some(function(r){var i=r.id;return n.state.selectedRowIds[i]}))}]};function Tr(e,t,n,r){if(t.type===u.init)return c({selectedRowIds:{}},e);if(t.type===u.resetSelectedRows)return c({},e,{selectedRowIds:r.initialState.selectedRowIds||{}});if(t.type===u.toggleAllRowsSelected){var i=t.value,o=r.isAllRowsSelected,s=r.rowsById,a=r.nonGroupedRowsById,l=a===void 0?s:a,d=i!==void 0?i:!o,w=Object.assign({},e.selectedRowIds);return d?Object.keys(l).forEach(function(L){w[L]=!0}):Object.keys(l).forEach(function(L){delete w[L]}),c({},e,{selectedRowIds:w})}if(t.type===u.toggleRowSelected){var v=t.id,m=t.value,f=r.rowsById,h=r.selectSubRows,b=h===void 0||h,C=r.getSubRows,B=e.selectedRowIds[v],W=m!==void 0?m:!B;if(B===W)return e;var P=c({},e.selectedRowIds);return function L(z){var q=f[z];if(q&&(q.isGrouped||(W?P[z]=!0:delete P[z]),b&&C(q)))return C(q).forEach(function(I){return L(I.id)})}(v),c({},e,{selectedRowIds:P})}if(t.type===u.toggleAllPageRowsSelected){var R=t.value,O=r.page,S=r.rowsById,k=r.selectSubRows,N=k===void 0||k,E=r.isAllPageRowsSelected,A=r.getSubRows,j=R!==void 0?R:!E,G=c({},e.selectedRowIds);return O.forEach(function(L){return function z(q){var I=S[q];if(I.isGrouped||(j?G[q]=!0:delete G[q]),N&&A(I))return A(I).forEach(function(_){return z(_.id)})}(L.id)}),c({},e,{selectedRowIds:G})}return e}function Fr(e){var t=e.data,n=e.rows,r=e.getHooks,i=e.plugins,o=e.rowsById,s=e.nonGroupedRowsById,a=s===void 0?o:s,l=e.autoResetSelectedRows,d=l===void 0||l,w=e.state.selectedRowIds,v=e.selectSubRows,m=v===void 0||v,f=e.dispatch,h=e.page,b=e.getSubRows;ge(i,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var C=g.useMemo(function(){var A=[];return n.forEach(function(j){var G=m?function L(z,q,I){if(q[z.id])return!0;var _=I(z);if(_&&_.length){var ee=!0,fe=!1;return _.forEach(function(T){fe&&!ee||(L(T,q,I)?fe=!0:ee=!1)}),!!ee||!!fe&&null}return!1}(j,w,b):!!w[j.id];j.isSelected=!!G,j.isSomeSelected=G===null,G&&A.push(j)}),A},[n,m,w,b]),B=Boolean(Object.keys(a).length&&Object.keys(w).length),W=B;B&&Object.keys(a).some(function(A){return!w[A]})&&(B=!1),B||h&&h.length&&h.some(function(A){var j=A.id;return!w[j]})&&(W=!1);var P=M(d);te(function(){P()&&f({type:u.resetSelectedRows})},[f,t]);var R=g.useCallback(function(A){return f({type:u.toggleAllRowsSelected,value:A})},[f]),O=g.useCallback(function(A){return f({type:u.toggleAllPageRowsSelected,value:A})},[f]),S=g.useCallback(function(A,j){return f({type:u.toggleRowSelected,id:A,value:j})},[f]),k=M(e),N=D(r().getToggleAllRowsSelectedProps,{instance:k()}),E=D(r().getToggleAllPageRowsSelectedProps,{instance:k()});Object.assign(e,{selectedFlatRows:C,isAllRowsSelected:B,isAllPageRowsSelected:W,toggleRowSelected:S,toggleAllRowsSelected:R,getToggleAllRowsSelectedProps:N,getToggleAllPageRowsSelectedProps:E,toggleAllPageRowsSelected:O})}function Ar(e,t){var n=t.instance;e.toggleRowSelected=function(r){return n.toggleRowSelected(e.id,r)},e.getToggleRowSelectedProps=D(n.getHooks().getToggleRowSelectedProps,{instance:n,row:e})}var on=function(e){return{}},sn=function(e){return{}};u.setRowState="setRowState",u.setCellState="setCellState",u.resetRowState="resetRowState";var un=function(e){e.stateReducers.push(kr),e.useInstance.push(Gr),e.prepareRow.push(Hr)};function kr(e,t,n,r){var i=r.initialRowStateAccessor,o=i===void 0?on:i,s=r.initialCellStateAccessor,a=s===void 0?sn:s,l=r.rowsById;if(t.type===u.init)return c({rowState:{}},e);if(t.type===u.resetRowState)return c({},e,{rowState:r.initialState.rowState||{}});if(t.type===u.setRowState){var d,w=t.rowId,v=t.value,m=e.rowState[w]!==void 0?e.rowState[w]:o(l[w]);return c({},e,{rowState:c({},e.rowState,(d={},d[w]=le(v,m),d))})}if(t.type===u.setCellState){var f,h,b,C,B,W=t.rowId,P=t.columnId,R=t.value,O=e.rowState[W]!==void 0?e.rowState[W]:o(l[W]),S=(O==null||(f=O.cellState)==null?void 0:f[P])!==void 0?O.cellState[P]:a((h=l[W])==null||(b=h.cells)==null?void 0:b.find(function(k){return k.column.id===P}));return c({},e,{rowState:c({},e.rowState,(B={},B[W]=c({},O,{cellState:c({},O.cellState||{},(C={},C[P]=le(R,S),C))}),B))})}}function Gr(e){var t=e.autoResetRowState,n=t===void 0||t,r=e.data,i=e.dispatch,o=g.useCallback(function(l,d){return i({type:u.setRowState,rowId:l,value:d})},[i]),s=g.useCallback(function(l,d,w){return i({type:u.setCellState,rowId:l,columnId:d,value:w})},[i]),a=M(n);te(function(){a()&&i({type:u.resetRowState})},[r]),Object.assign(e,{setRowState:o,setCellState:s})}function Hr(e,t){var n=t.instance,r=n.initialRowStateAccessor,i=r===void 0?on:r,o=n.initialCellStateAccessor,s=o===void 0?sn:o,a=n.state.rowState;e&&(e.state=a[e.id]!==void 0?a[e.id]:i(e),e.setState=function(l){return n.setRowState(e.id,l)},e.cells.forEach(function(l){e.state.cellState||(e.state.cellState={}),l.state=e.state.cellState[l.column.id]!==void 0?e.state.cellState[l.column.id]:s(l),l.setState=function(d){return n.setCellState(e.id,l.column.id,d)}}))}un.pluginName="useRowState",u.resetColumnOrder="resetColumnOrder",u.setColumnOrder="setColumnOrder";var an=function(e){e.stateReducers.push(Or),e.visibleColumnsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.columnOrder])}),e.visibleColumns.push(Wr),e.useInstance.push(Nr)};function Or(e,t,n,r){return t.type===u.init?c({columnOrder:[]},e):t.type===u.resetColumnOrder?c({},e,{columnOrder:r.initialState.columnOrder||[]}):t.type===u.setColumnOrder?c({},e,{columnOrder:le(t.columnOrder,e.columnOrder)}):void 0}function Wr(e,t){var n=t.instance.state.columnOrder;if(!n||!n.length)return e;for(var r=[].concat(n),i=[].concat(e),o=[],s=function(){var a=r.shift(),l=i.findIndex(function(d){return d.id===a});l>-1&&o.push(i.splice(l,1)[0])};i.length&&r.length;)s();return[].concat(o,i)}function Nr(e){var t=e.dispatch;e.setColumnOrder=g.useCallback(function(n){return t({type:u.setColumnOrder,columnOrder:n})},[t])}an.pluginName="useColumnOrder",Y.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var ln=function(e){e.getResizerProps=[_r],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(zr),e.useInstance.push(Lr),e.useInstanceBeforeDimensions.push(Mr)},_r=function(e,t){var n=t.instance,r=t.header,i=n.dispatch,o=function(s,a){var l=!1;if(s.type==="touchstart"){if(s.touches&&s.touches.length>1)return;l=!0}var d,w,v=function(P){var R=[];return function O(S){S.columns&&S.columns.length&&S.columns.map(O),R.push(S)}(P),R}(a).map(function(P){return[P.id,P.totalWidth]}),m=l?Math.round(s.touches[0].clientX):s.clientX,f=function(){window.cancelAnimationFrame(d),d=null,i({type:u.columnDoneResizing})},h=function(){window.cancelAnimationFrame(d),d=null,i({type:u.columnResizing,clientX:w})},b=function(P){w=P,d||(d=window.requestAnimationFrame(h))},C={mouse:{moveEvent:"mousemove",moveHandler:function(P){return b(P.clientX)},upEvent:"mouseup",upHandler:function(P){document.removeEventListener("mousemove",C.mouse.moveHandler),document.removeEventListener("mouseup",C.mouse.upHandler),f()}},touch:{moveEvent:"touchmove",moveHandler:function(P){return P.cancelable&&(P.preventDefault(),P.stopPropagation()),b(P.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(P){document.removeEventListener(C.touch.moveEvent,C.touch.moveHandler),document.removeEventListener(C.touch.upEvent,C.touch.moveHandler),f()}}},B=l?C.touch:C.mouse,W=!!function(){if(typeof Oe=="boolean")return Oe;var P=!1;try{var R={get passive(){return P=!0,!1}};window.addEventListener("test",null,R),window.removeEventListener("test",null,R)}catch{P=!1}return Oe=P}()&&{passive:!1};document.addEventListener(B.moveEvent,B.moveHandler,W),document.addEventListener(B.upEvent,B.upHandler,W),i({type:u.columnStartResizing,columnId:a.id,columnWidth:a.totalWidth,headerIdWidths:v,clientX:m})};return[e,{onMouseDown:function(s){return s.persist()||o(s,r)},onTouchStart:function(s){return s.persist()||o(s,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function zr(e,t){if(t.type===u.init)return c({columnResizing:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{columnResizing:{columnWidths:{}}});if(t.type===u.columnStartResizing){var n=t.clientX,r=t.columnId,i=t.columnWidth,o=t.headerIdWidths;return c({},e,{columnResizing:c({},e.columnResizing,{startX:n,headerIdWidths:o,columnWidth:i,isResizingColumn:r})})}if(t.type===u.columnResizing){var s=t.clientX,a=e.columnResizing,l=a.startX,d=a.columnWidth,w=a.headerIdWidths,v=(s-l)/d,m={};return(w===void 0?[]:w).forEach(function(f){var h=f[0],b=f[1];m[h]=Math.max(b+b*v,0)}),c({},e,{columnResizing:c({},e.columnResizing,{columnWidths:c({},e.columnResizing.columnWidths,{},m)})})}return t.type===u.columnDoneResizing?c({},e,{columnResizing:c({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}ln.pluginName="useResizeColumns";var Mr=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,i=e.state.columnResizing,o=M(e);t.forEach(function(s){var a=H(s.disableResizing!==!0&&void 0,n!==!0&&void 0,!0);s.canResize=a,s.width=i.columnWidths[s.id]||s.originalWidth||s.width,s.isResizing=i.isResizingColumn===s.id,a&&(s.getResizerProps=D(r().getResizerProps,{instance:o(),header:s}))})};function Lr(e){var t=e.plugins,n=e.dispatch,r=e.autoResetResize,i=r===void 0||r,o=e.columns;ge(t,["useAbsoluteLayout"],"useResizeColumns");var s=M(i);te(function(){s()&&n({type:u.resetResize})},[o]);var a=g.useCallback(function(){return n({type:u.resetResize})},[n]);Object.assign(e,{resetResizing:a})}var ht={position:"absolute",top:0},cn=function(e){e.getTableBodyProps.push(et),e.getRowProps.push(et),e.getHeaderGroupProps.push(et),e.getFooterGroupProps.push(et),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},ht,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},ht,{left:r.column.totalLeft+"px",width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},ht,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]})};cn.pluginName="useAbsoluteLayout";var et=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},yt={display:"inline-block",boxSizing:"border-box"},wt=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},dn=function(e){e.getRowProps.push(wt),e.getHeaderGroupProps.push(wt),e.getFooterGroupProps.push(wt),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},yt,{width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},yt,{width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},yt,{width:r.totalWidth+"px"})}]})};function fn(e){e.getTableProps.push(Dr),e.getRowProps.push(Rt),e.getHeaderGroupProps.push(Rt),e.getFooterGroupProps.push(Rt),e.getHeaderProps.push(jr),e.getCellProps.push(Vr),e.getFooterProps.push($r)}dn.pluginName="useBlockLayout",fn.pluginName="useFlexLayout";var Dr=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Rt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},jr=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},Vr=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},$r=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function pn(e){e.stateReducers.push(Xr),e.getTableProps.push(qr),e.getHeaderProps.push(Kr),e.getRowProps.push(Ur)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",pn.pluginName="useGridLayout";var qr=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map(function(r){var i;return n.state.gridLayout.columnWidths[r.id]?n.state.gridLayout.columnWidths[r.id]+"px":(i=n.state.columnResizing)!=null&&i.isResizingColumn?n.state.gridLayout.startWidths[r.id]+"px":typeof r.width=="number"?r.width+"px":r.width}).join(" ")}}]},Kr=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},Ur=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function Xr(e,t,n,r){if(t.type===u.init)return c({gridLayout:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{gridLayout:{columnWidths:{}}});if(t.type===u.columnStartResizing){var i=t.columnId,o=t.headerIdWidths,s=bt(i);if(s!==void 0){var a=r.visibleColumns.reduce(function(R,O){var S;return c({},R,((S={})[O.id]=bt(O.id),S))},{}),l=r.visibleColumns.reduce(function(R,O){var S;return c({},R,((S={})[O.id]=O.minWidth,S))},{}),d=r.visibleColumns.reduce(function(R,O){var S;return c({},R,((S={})[O.id]=O.maxWidth,S))},{}),w=o.map(function(R){var O=R[0];return[O,bt(O)]});return c({},e,{gridLayout:c({},e.gridLayout,{startWidths:a,minWidths:l,maxWidths:d,headerIdGridWidths:w,columnWidth:s})})}return e}if(t.type===u.columnResizing){var v=t.clientX,m=e.columnResizing.startX,f=e.gridLayout,h=f.columnWidth,b=f.minWidths,C=f.maxWidths,B=f.headerIdGridWidths,W=(v-m)/h,P={};return(B===void 0?[]:B).forEach(function(R){var O=R[0],S=R[1];P[O]=Math.min(Math.max(b[O],S+S*W),C[O])}),c({},e,{gridLayout:c({},e.gridLayout,{columnWidths:c({},e.gridLayout.columnWidths,{},P)})})}return t.type===u.columnDoneResizing?c({},e,{gridLayout:c({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function bt(e){var t,n=(t=document.getElementById("header-cell-"+e))==null?void 0:t.offsetWidth;if(n!==void 0)return n}p._UNSTABLE_usePivotColumns=tn,p.actions=u,p.defaultColumn=Y,p.defaultGroupByFn=Xt,p.defaultOrderByFn=Zt,p.defaultRenderer=K,p.emptyRenderer=ce,p.ensurePluginOrder=ge,p.flexRender=xe,p.functionalUpdate=le,p.loopHooks=me,p.makePropGetter=D,p.makeRenderer=we,p.reduceHooks=J,p.safeUseLayoutEffect=Re,p.useAbsoluteLayout=cn,p.useAsyncDebounce=function(e,t){t===void 0&&(t=0);var n=g.useRef({}),r=M(e),i=M(t);return g.useCallback(function(){var o=Q(regeneratorRuntime.mark(function s(){var a,l,d,w=arguments;return regeneratorRuntime.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:for(a=w.length,l=new Array(a),d=0;d<a;d++)l[d]=w[d];return n.current.promise||(n.current.promise=new Promise(function(m,f){n.current.resolve=m,n.current.reject=f})),n.current.timeout&&clearTimeout(n.current.timeout),n.current.timeout=setTimeout(Q(regeneratorRuntime.mark(function m(){return regeneratorRuntime.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return delete n.current.timeout,f.prev=1,f.t0=n.current,f.next=5,r().apply(void 0,l);case 5:f.t1=f.sent,f.t0.resolve.call(f.t0,f.t1),f.next=12;break;case 9:f.prev=9,f.t2=f.catch(1),n.current.reject(f.t2);case 12:return f.prev=12,delete n.current.promise,f.finish(12);case 15:case"end":return f.stop()}},m,null,[[1,9,12,15]])})),i()),v.abrupt("return",n.current.promise);case 5:case"end":return v.stop()}},s)}));return function(){return o.apply(this,arguments)}}(),[r,i])},p.useBlockLayout=dn,p.useColumnOrder=an,p.useExpanded=Gt,p.useFilters=Vt,p.useFlexLayout=fn,p.useGetLatest=M,p.useGlobalFilter=$t,p.useGridLayout=pn,p.useGroupBy=Ut,p.useMountedLayoutEffect=te,p.usePagination=en,p.useResizeColumns=ln,p.useRowSelect=rn,p.useRowState=un,p.useSortBy=Yt,p.useTable=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e=At(e),n=[Ze].concat(n);var i=g.useRef({}),o=M(i.current);Object.assign(o(),c({},e,{plugins:n,hooks:Me()})),n.filter(Boolean).forEach(function(T){T(o().hooks)});var s=M(o().hooks);o().getHooks=s,delete o().hooks,Object.assign(o(),J(s().useOptions,At(e)));var a=o(),l=a.data,d=a.columns,w=a.initialState,v=a.defaultColumn,m=a.getSubRows,f=a.getRowId,h=a.stateReducer,b=a.useControlledState,C=M(h),B=g.useCallback(function(T,U){if(!U.type)throw console.info({action:U}),new Error("Unknown Action 👆");return[].concat(s().stateReducers,Array.isArray(C())?C():[C()]).reduce(function(ne,pe){return pe(ne,U,T,o())||ne},T)},[s,C,o]),W=g.useReducer(B,void 0,function(){return B(w,{type:u.init})}),P=W[0],R=W[1],O=J([].concat(s().useControlledState,[b]),P,{instance:o()});Object.assign(o(),{state:O,dispatch:R});var S=g.useMemo(function(){return We(J(s().columns,d,{instance:o()}))},[s,o,d].concat(J(s().columnsDeps,[],{instance:o()})));o().columns=S;var k=g.useMemo(function(){return J(s().allColumns,Ne(S),{instance:o()}).map(be)},[S,s,o].concat(J(s().allColumnsDeps,[],{instance:o()})));o().allColumns=k;var N=g.useMemo(function(){for(var T=[],U=[],ne={},pe=[].concat(k);pe.length;){var se=pe.shift();$n({data:l,rows:T,flatRows:U,rowsById:ne,column:se,getRowId:f,getSubRows:m,accessValueHooks:s().accessValue,getInstance:o})}return[T,U,ne]},[k,l,f,m,s,o]),E=N[0],A=N[1],j=N[2];Object.assign(o(),{rows:E,initialRows:[].concat(E),flatRows:A,rowsById:j}),me(s().useInstanceAfterData,o());var G=g.useMemo(function(){return J(s().visibleColumns,k,{instance:o()}).map(function(T){return He(T,v)})},[s,k,o,v].concat(J(s().visibleColumnsDeps,[],{instance:o()})));k=g.useMemo(function(){var T=[].concat(G);return k.forEach(function(U){T.find(function(ne){return ne.id===U.id})||T.push(U)}),T},[k,G]),o().allColumns=k;var L=g.useMemo(function(){return J(s().headerGroups,Ce(G,v),o())},[s,G,v,o].concat(J(s().headerGroupsDeps,[],{instance:o()})));o().headerGroups=L;var z=g.useMemo(function(){return L.length?L[0].headers:[]},[L]);o().headers=z,o().flatHeaders=L.reduce(function(T,U){return[].concat(T,U.headers)},[]),me(s().useInstanceBeforeDimensions,o());var q=G.filter(function(T){return T.isVisible}).map(function(T){return T.id}).sort().join("_");G=g.useMemo(function(){return G.filter(function(T){return T.isVisible})},[G,q]),o().visibleColumns=G;var I=kt(z),_=I[0],ee=I[1],fe=I[2];return o().totalColumnsMinWidth=_,o().totalColumnsWidth=ee,o().totalColumnsMaxWidth=fe,me(s().useInstance,o()),[].concat(o().flatHeaders,o().allColumns).forEach(function(T){T.render=we(o(),T),T.getHeaderProps=D(s().getHeaderProps,{instance:o(),column:T}),T.getFooterProps=D(s().getFooterProps,{instance:o(),column:T})}),o().headerGroups=g.useMemo(function(){return L.filter(function(T,U){return T.headers=T.headers.filter(function(ne){return ne.headers?function pe(se){return se.filter(function(Te){return Te.headers?pe(Te.headers):Te.isVisible}).length}(ne.headers):ne.isVisible}),!!T.headers.length&&(T.getHeaderGroupProps=D(s().getHeaderGroupProps,{instance:o(),headerGroup:T,index:U}),T.getFooterGroupProps=D(s().getFooterGroupProps,{instance:o(),headerGroup:T,index:U}),!0)})},[L,o,s]),o().footerGroups=[].concat(o().headerGroups).reverse(),o().prepareRow=g.useCallback(function(T){T.getRowProps=D(s().getRowProps,{instance:o(),row:T}),T.allCells=k.map(function(U){var ne=T.values[U.id],pe={column:U,row:T,value:ne};return pe.getCellProps=D(s().getCellProps,{instance:o(),cell:pe}),pe.render=we(o(),U,{row:T,cell:pe,value:ne}),pe}),T.cells=G.map(function(U){return T.allCells.find(function(ne){return ne.column.id===U.id})}),me(s().prepareRow,T,{instance:o()})},[s,o,k,G]),o().getTableProps=D(s().getTableProps,{instance:o()}),o().getTableBodyProps=D(s().getTableBodyProps,{instance:o()}),me(s().useFinalInstance,o()),o()},Object.defineProperty(p,"__esModule",{value:!0})})})(No,ct);(function(y){y.exports=ct})(Wo);const _o="_tr_daq0k_1",zo="_th_daq0k_6",Mo="_td_daq0k_23",Lo="_odd_daq0k_29",Do="_du_daq0k_34",jo="_sortIconContainer_daq0k_38",Vo="_rotate180_daq0k_45",Fe={tr:_o,th:zo,td:Mo,odd:Lo,du:Do,sortIconContainer:jo,rotate180:Vo},je=!0,Gn=[{accessor:"id",show:!1},{Header:"Host",accessor:"host"},{Header:"Process",accessor:"process"},{Header:"DL",accessor:"download",sortDescFirst:je},{Header:"UL",accessor:"upload",sortDescFirst:je},{Header:"DL Speed",accessor:"downloadSpeedCurr",sortDescFirst:je},{Header:"UL Speed",accessor:"uploadSpeedCurr",sortDescFirst:je},{Header:"Chains",accessor:"chains"},{Header:"Rule",accessor:"rule"},{Header:"Time",accessor:"start",sortDescFirst:je},{Header:"Source",accessor:"source"},{Header:"Destination IP",accessor:"destinationIP"},{Header:"Type",accessor:"type"}],$o=Gn,qo=Gn.filter(y=>y.accessor!=="process");function Ko(y){switch(y.column.id){case"start":return ho(y.value,0);case"download":case"upload":return Rn(y.value);case"downloadSpeedCurr":case"uploadSpeedCurr":return Rn(y.value)+"/s";default:return y.value}}const Uo={id:"id",desc:!0},Xo={sortBy:[Uo],hiddenColumns:["id"]};function Qo({data:y}){const F=Pe.useContext(Tn),{getTableProps:p,headerGroups:g,rows:X,prepareRow:Q}=lt.useTable({columns:F.hasProcessPath?$o:qo,data:y,initialState:Xo,autoResetSortBy:!1},lt.useSortBy);return $("div",{...p(),style:{"--col-count":F.hasProcessPath?"12":"11"},children:g.map(c=>ye("div",{...c.getHeaderGroupProps(),className:Fe.tr,children:[c.headers.map(V=>ye("div",{...V.getHeaderProps(V.getSortByToggleProps()),className:Fe.th,children:[$("span",{children:V.render("Header")}),$("span",{className:Fe.sortIconContainer,children:V.isSorted?$("span",{className:V.isSortedDesc?"":Fe.rotate180,children:$(mo,{size:16})}):null})]})),X.map((V,oe)=>(Q(V),V.cells.map((u,K)=>$("div",{...u.getCellProps(),className:Ge(Fe.td,oe%2===0?Fe.odd:!1,F.hasProcessPath?K>=2&&K<=5?Fe.du:!1:K>=1&&K<=4?Fe.du:!1),children:Ko(u)}))))]}))})}const Jo="_overlay_148w6_1",Yo="_cnt_148w6_5",Zo="_afterOpen_148w6_15",ei="_btngrp_148w6_20",st={overlay:Jo,cnt:Yo,afterOpen:Zo,btngrp:ei},{useRef:ti,useCallback:ni,useMemo:ri}=Pe;function oi({isOpen:y,onRequestClose:F,primaryButtonOnTap:p}){const g=ti(null),X=ni(()=>{g.current.focus()},[]),Q=ri(()=>({base:Ge(bn.content,st.cnt),afterOpen:st.afterOpen,beforeClose:""}),[]);return ye(oo,{isOpen:y,onRequestClose:F,onAfterOpen:X,className:Q,overlayClassName:Ge(bn.overlay,st.overlay),children:[$("p",{children:"Are you sure you want to close all connections?"}),ye("div",{className:st.btngrp,children:[$(Cn,{onClick:p,ref:g,children:"I'm sure"}),$("div",{style:{width:20}}),$(Cn,{onClick:F,children:"No"})]})]})}const{useEffect:ii,useState:Ve,useRef:si,useCallback:$e}=Pe,xn=30;function ui(y){const F={};for(let p=0;p<y.length;p++){const g=y[p];F[g.id]=g}return F}function ai(y){return y==null?void 0:y.replace(/.*[/\\]/,"")}function li(y,F){return y.toLowerCase().includes(F.toLowerCase())}function Bn(y,F){return F?y.filter(p=>[p.host,p.sourceIP,p.sourcePort,p.destinationIP,p.chains,p.rule,p.type,p.network,p.processPath].some(g=>li(g,F))):y}function ci(y,F,p,g){const{id:X,metadata:Q,upload:c,download:V,start:oe,chains:u,rule:K,rulePayload:ce}=y,{host:Y,destinationPort:ie,destinationIP:D,network:J,type:me,sourceIP:ge,sourcePort:le}=Q,M=Q.processPath;g.hasProcessPath===!1&&typeof M<"u"&&(g.hasProcessPath=!0);let Re=Y;Re===""&&(Re=D);const te=F[X];return{id:X,upload:c,download:V,start:p-new Date(oe).valueOf(),chains:u.reverse().join(" / "),rule:ce?`${K}(${ce})`:K,...Q,host:`${Re}:${ie}`,type:`${me}(${J})`,source:`${ge}:${le}`,downloadSpeedCurr:V-(te?te.download:0),uploadSpeedCurr:c-(te?te.upload:0),process:ai(M)}}function In(y){return y.length>0?$(Qo,{data:y}):$("div",{className:qe.placeHolder,children:$(go,{width:200,height:200,c1:"var(--color-text)"})})}function En({qty:y}){return y<100?""+y:"99+"}function di({apiConfig:y}){const[F,p]=vo(),[g,X]=Ve([]),[Q,c]=Ve([]),[V,oe]=Ve(""),u=Bn(g,V),K=Bn(Q,V),[ce,Y]=Ve(!1),ie=$e(()=>Y(!0),[]),D=$e(()=>Y(!1),[]),[J,me]=Ve(!1),ge=$e(()=>me(xe=>!xe),[]),le=$e(()=>{so(y),D()},[y,D]),M=si(g),Re=Pe.useContext(Tn),te=$e(({connections:xe})=>{const We=ui(M.current),Ne=Date.now(),be=xe.map(Ce=>ci(Ce,We,Ne,Re)),He=[];for(const Ce of M.current)be.findIndex(H=>H.id===Ce.id)<0&&He.push(Ce);c(Ce=>[...He,...Ce].slice(0,101)),be&&(be.length!==0||M.current.length!==0)&&!J?(M.current=be,X(be)):M.current=be},[X,J,Re]);ii(()=>uo(y,te),[y,te]);const{t:we}=ao();return ye("div",{children:[$(lo,{title:we("Connections")}),ye(ft,{children:[ye("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"},children:[ye(pt,{children:[ye(Ke,{children:[$("span",{children:we("Active")}),$("span",{className:qe.connQty,children:En({qty:u.length})})]}),ye(Ke,{children:[$("span",{children:we("Closed")}),$("span",{className:qe.connQty,children:En({qty:K.length})})]})]}),$("div",{className:qe.inputWrapper,children:$("input",{type:"text",name:"filter",autoComplete:"off",className:qe.input,placeholder:"Filter",onChange:xe=>oe(xe.target.value)})})]}),$("div",{ref:F,style:{padding:30,paddingBottom:xn,paddingTop:0},children:ye("div",{style:{height:p-xn,overflow:"auto"},children:[ye(Ue,{children:[$(co,{children:In(u)}),$(yo,{icon:J?$(bo,{size:16}):$(Co,{size:16}),mainButtonStyles:J?{background:"#e74c3c"}:{},style:wo,text:we(J?"Resume Refresh":"Pause Refresh"),onClick:ge,children:$(Ro,{text:"Close All Connections",onClick:ie,children:$(fo,{size:10})})})]}),$(Ue,{children:In(K)})]})}),$(oi,{isOpen:ce,primaryButtonOnTap:le,onRequestClose:D})]})]})}const fi=y=>({apiConfig:po(y)}),wi=io(fi)(di);export{wi as default};
|