=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}(),KB=function(){return"undefined"!==typeof window&&window.chrome?16777100:15e5},XB=function(){function e(t){var n=t.maxScrollSize,r=void 0===n?KB():n,o=p(t,["maxScrollSize"]);pi(this,e),f(this,"_cellSizeAndPositionManager",void 0),f(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new YB(o),this._maxScrollSize=r}return hi(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(o-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;o=this._safeOffsetToOffset({containerSize:r,offset:o});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:o,targetIndex:i});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(i*(o-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(r-t))}}]),e}();function JB(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,o=n.indices,i=Object.keys(o),a=!e||i.every((function(e){var t=o[e];return Array.isArray(t)?t.length>0:t>=0})),l=i.length!==Object.keys(t).length||i.some((function(e){var n=t[e],r=o[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r}));t=o,a&&l&&r(o)}}var ZB=1;function eV(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,o=e.previousCellSize,i=e.previousScrollToAlignment,a=e.previousScrollToIndex,l=e.previousSize,u=e.scrollOffset,s=e.scrollToAlignment,c=e.scrollToIndex,f=e.size,d=e.sizeJustIncreasedFromZero,h=e.updateScrollIndexCallback,p=n.getCellCount(),v=c>=0&&c0&&(fn.getTotalSize()-f&&h(p-1)}var tV,nV,rV=!("undefined"===typeof window||!window.document||!window.document.createElement);function oV(e){if((!tV&&0!==tV||e)&&rV){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),tV=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return tV}var iV,aV,lV=(nV="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||nV.webkitRequestAnimationFrame||nV.mozRequestAnimationFrame||nV.oRequestAnimationFrame||nV.msRequestAnimationFrame||function(e){return nV.setTimeout(e,1e3/60)},uV=nV.cancelAnimationFrame||nV.webkitCancelAnimationFrame||nV.mozCancelAnimationFrame||nV.oCancelAnimationFrame||nV.msCancelAnimationFrame||function(e){nV.clearTimeout(e)},sV=lV,cV=uV,fV=function(e){return cV(e.id)},dV=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var r={id:sV((function o(){Date.now()-n>=t?e.call():r.id=sV(o)}))};return r};function hV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pV(e){for(var t=1;t0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return St(t,e),hi(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,o=void 0===r?this.props.scrollToColumn:r,i=e.rowIndex,a=void 0===i?this.props.scrollToRow:i,l=pV({},this.props,{scrollToAlignment:n,scrollToColumn:o,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,o=void 0===r?0:r;if(!(o<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,l=i.autoWidth,u=i.height,s=i.width,c=this.state.instanceProps,f=c.scrollbarSize,d=c.rowSizeAndPositionManager.getTotalSize(),h=c.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,h-s+f),n),v=Math.min(Math.max(0,d-u+f),o);if(this.state.scrollLeft!==p||this.state.scrollTop!==v){var m={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?ZB:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:v!==this.state.scrollTop?v>this.state.scrollTop?ZB:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:vV};a||(m.scrollTop=v),l||(m.scrollLeft=p),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:v,totalColumnsWidth:h,totalRowsHeight:d})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.scrollToColumn,l=i.scrollToRow,u=this.state.instanceProps;u.columnSizeAndPositionManager.resetCell(n),u.rowSizeAndPositionManager.resetCell(o),this._recomputeScrollLeftFlag=a>=0&&(this.state.scrollDirectionHorizontal===ZB?n<=a:n>=a),this._recomputeScrollTopFlag=l>=0&&(this.state.scrollDirectionVertical===ZB?o<=l:o>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,o=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(pV({},o,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(pV({},o,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,o=e.scrollLeft,i=e.scrollToColumn,a=e.scrollTop,l=e.scrollToRow,u=e.width,s=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),s.scrollbarSizeMeasured||this.setState((function(e){var t=pV({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"===typeof o&&o>=0||"number"===typeof a&&a>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:a});c&&(c.needToResetStyleCache=!1,this.setState(c))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var f=r>0&&u>0;i>=0&&f&&this._updateScrollLeftForScrollToColumn(),l>=0&&f&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:a||0,totalColumnsWidth:s.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:s.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,o=r.autoHeight,i=r.autoWidth,a=r.columnCount,l=r.height,u=r.rowCount,s=r.scrollToAlignment,c=r.scrollToColumn,f=r.scrollToRow,d=r.width,h=this.state,p=h.scrollLeft,v=h.scrollPositionChangeReason,m=h.scrollTop,g=h.instanceProps;this._handleInvalidatedGridSize();var y=a>0&&0===e.columnCount||u>0&&0===e.rowCount;v===mV&&(!i&&p>=0&&(p!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=p),!o&&m>=0&&(m!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=m));var b=(0===e.width||0===e.height)&&l>0&&d>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):eV({cellSizeAndPositionManager:g.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:p,scrollToAlignment:s,scrollToIndex:c,size:d,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):eV({cellSizeAndPositionManager:g.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:m,scrollToAlignment:s,scrollToIndex:f,size:l,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),p!==t.scrollLeft||m!==t.scrollTop){var x=g.rowSizeAndPositionManager.getTotalSize(),w=g.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:m,totalColumnsWidth:w,totalRowsHeight:x})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&fV(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,o=e.className,i=e.containerProps,l=e.containerRole,u=e.containerStyle,s=e.height,c=e.id,f=e.noContentRenderer,d=e.role,h=e.style,p=e.tabIndex,v=e.width,m=this.state,g=m.instanceProps,y=m.needToResetStyleCache,b=this._isScrolling(),x={boxSizing:"border-box",direction:"ltr",height:n?"auto":s,position:"relative",width:r?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};y&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=g.columnSizeAndPositionManager.getTotalSize(),S=g.rowSizeAndPositionManager.getTotalSize(),_=S>s?g.scrollbarSize:0,k=w>v?g.scrollbarSize:0;k===this._horizontalScrollBarSize&&_===this._verticalScrollBarSize||(this._horizontalScrollBarSize=k,this._verticalScrollBarSize=_,this._scrollbarPresenceChanged=!0),x.overflowX=w+_<=v?"hidden":"auto",x.overflowY=S+k<=s?"hidden":"auto";var T=this._childrenToDisplay,C=0===T.length&&s>0&&v>0;return a.createElement("div",ye({ref:this._setScrollingContainerRef},i,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:QB("ReactVirtualized__Grid",o),id:c,onScroll:this._onScroll,role:d,style:pV({},x,{},h),tabIndex:p}),T.length>0&&a.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:l,style:pV({width:t?"auto":w,height:S,maxWidth:w,maxHeight:S,overflow:"hidden",pointerEvents:b?"none":"",position:"relative"},u)},T),C&&f())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,o=e.columnCount,i=e.deferredMeasurementCache,a=e.height,l=e.overscanColumnCount,u=e.overscanIndicesGetter,s=e.overscanRowCount,c=e.rowCount,f=e.width,d=e.isScrollingOptOut,h=t.scrollDirectionHorizontal,p=t.scrollDirectionVertical,v=t.instanceProps,m=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,g=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&f>0){var b=v.columnSizeAndPositionManager.getVisibleCellRange({containerSize:f,offset:g}),x=v.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:m}),w=v.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:f,offset:g}),S=v.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:m});this._renderedColumnStartIndex=b.start,this._renderedColumnStopIndex=b.stop,this._renderedRowStartIndex=x.start,this._renderedRowStopIndex=x.stop;var _=u({direction:"horizontal",cellCount:o,overscanCellsCount:l,scrollDirection:h,startIndex:"number"===typeof b.start?b.start:0,stopIndex:"number"===typeof b.stop?b.stop:-1}),k=u({direction:"vertical",cellCount:c,overscanCellsCount:s,scrollDirection:p,startIndex:"number"===typeof x.start?x.start:0,stopIndex:"number"===typeof x.stop?x.stop:-1}),T=_.overscanStartIndex,C=_.overscanStopIndex,E=k.overscanStartIndex,O=k.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var j=E;j<=O;j++)if(!i.has(j,0)){T=0,C=o-1;break}if(!i.hasFixedWidth())for(var P=T;P<=C;P++)if(!i.has(0,P)){E=0,O=c-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:v.columnSizeAndPositionManager,columnStartIndex:T,columnStopIndex:C,deferredMeasurementCache:i,horizontalOffsetAdjustment:w,isScrolling:y,isScrollingOptOut:d,parent:this,rowSizeAndPositionManager:v.rowSizeAndPositionManager,rowStartIndex:E,rowStopIndex:O,scrollLeft:g,scrollTop:m,styleCache:this._styleCache,verticalOffsetAdjustment:S,visibleColumnIndices:b,visibleRowIndices:x}),this._columnStartIndex=T,this._columnStopIndex=C,this._rowStartIndex=E,this._rowStopIndex=O}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&fV(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=dV(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var o=this._columnStartIndex;o<=this._columnStopIndex;o++){var i="".concat(r,"-").concat(o);this._styleCache[i]=e[i],n&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var o,i,a=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),$B({cellCount:a.prevColumnCount,cellSize:"number"===typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"===typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),$B({cellCount:a.prevRowCount,cellSize:"number"===typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"===typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,pV({},r,{},o,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"===typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"===typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,o={scrollPositionChangeReason:mV};return"number"===typeof n&&n>=0&&(o.scrollDirectionHorizontal=n>t.scrollLeft?ZB:-1,o.scrollLeft=n),"number"===typeof r&&r>=0&&(o.scrollDirectionVertical=r>t.scrollTop?ZB:-1,o.scrollTop=r),"number"===typeof n&&n>=0&&n!==t.scrollLeft||"number"===typeof r&&r>=0&&r!==t.scrollTop?o:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"===typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,o=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,l=t.scrollLeft,u=t.instanceProps;if(n>0){var s=n-1,c=i<0?s:Math.min(s,i),f=u.rowSizeAndPositionManager.getTotalSize(),d=u.scrollbarSizeMeasured&&f>r?u.scrollbarSize:0;return u.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:a-d,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,o=t._getCalculatedScrollLeft(e,n);return"number"===typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:o,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,o=e.scrollToAlignment,i=e.scrollToRow,a=e.width,l=t.scrollTop,u=t.instanceProps;if(r>0){var s=r-1,c=i<0?s:Math.min(s,i),f=u.columnSizeAndPositionManager.getTotalSize(),d=u.scrollbarSizeMeasured&&f>a?u.scrollbarSize:0;return u.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:n-d,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,o=t._getCalculatedScrollTop(e,n);return"number"===typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:o}):{}}}]),t}(a.PureComponent),f(iV,"propTypes",null),aV);f(gV,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,r=e.columnSizeAndPositionManager,o=e.columnStartIndex,i=e.columnStopIndex,a=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,u=e.isScrolling,s=e.isScrollingOptOut,c=e.parent,f=e.rowSizeAndPositionManager,d=e.rowStartIndex,h=e.rowStopIndex,p=e.styleCache,v=e.verticalOffsetAdjustment,m=e.visibleColumnIndices,g=e.visibleRowIndices,y=[],b=r.areOffsetsAdjusted()||f.areOffsetsAdjusted(),x=!u&&!b,w=d;w<=h;w++)for(var S=f.getSizeAndPositionOfCell(w),_=o;_<=i;_++){var k=r.getSizeAndPositionOfCell(_),T=_>=m.start&&_<=m.stop&&w>=g.start&&w<=g.stop,C="".concat(w,"-").concat(_),E=void 0;x&&p[C]?E=p[C]:a&&!a.has(w,_)?E={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(E={height:S.size,left:k.offset+l,position:"absolute",top:S.offset+v,width:k.size},p[C]=E);var O={columnIndex:_,isScrolling:u,isVisible:T,key:C,parent:c,rowIndex:w,style:E},j=void 0;!s&&!u||l||v?j=n(O):(t[C]||(t[C]=n(O)),j=t[C]),null!=j&&!1!==j&&y.push(j)}return y},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:oV,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return r===ZB?{overscanStartIndex:Math.max(0,o),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),(0,GB.polyfill)(gV);var yV=gV,bV=1;function xV(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return n=Math.max(1,n),r===bV?{overscanStartIndex:Math.max(0,o-1),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i+1)}}var wV,SV;function _V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var kV=(SV=wV=function(e){function t(){var e,n;pi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],o=t.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(t.createTextNode(n)),r.appendChild(o)}}(i),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var s='';if(window.trustedTypes){var c=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return s}});t.__resizeTriggers__.innerHTML=c.createHTML("")}else t.__resizeTriggers__.innerHTML=s;t.appendChild(t.__resizeTriggers__),l(t),t.addEventListener("scroll",u,!0),f&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==m&&l(t)},t.__resizeTriggers__.addEventListener(f,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(n)}},removeResizeListener:function(e,t){if(o)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",u,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(f,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}function OV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jV(e){for(var t=1;t=0){var c=t.getScrollPositionForCell({align:o,cellIndex:i,height:r,scrollLeft:u,scrollTop:s,width:a});c.scrollLeft===u&&c.scrollTop===s||n._setScrollPosition(c)}})),f(gi(n),"_onScroll",(function(e){if(e.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var t=n.props,r=t.cellLayoutManager,o=t.height,i=t.isScrollingChange,a=t.width,l=n._scrollbarSize,u=r.getTotalSize(),s=u.height,c=u.width,f=Math.max(0,Math.min(c-a+l,e.target.scrollLeft)),d=Math.max(0,Math.min(s-o+l,e.target.scrollTop));if(n.state.scrollLeft!==f||n.state.scrollTop!==d){var h=e.cancelable?DV.OBSERVED:DV.REQUESTED;n.state.isScrolling||i(!0),n.setState({isScrolling:!0,scrollLeft:f,scrollPositionChangeReason:h,scrollTop:d})}n._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:d,totalWidth:c,totalHeight:s})}})),n._scrollbarSize=oV(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return St(t,e),hi(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,o=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=oV(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||o>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:o}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),a=i.height,l=i.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:o||0,totalHeight:a,totalWidth:l})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,o=n.scrollToAlignment,i=n.scrollToCell,a=n.width,l=this.state,u=l.scrollLeft,s=l.scrollPositionChangeReason,c=l.scrollTop;s===DV.REQUESTED&&(u>=0&&u!==t.scrollLeft&&u!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=u),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),r===e.height&&o===e.scrollToAlignment&&i===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,o=e.className,i=e.height,l=e.horizontalOverscanSize,u=e.id,s=e.noContentRenderer,c=e.style,f=e.verticalOverscanSize,d=e.width,h=this.state,p=h.isScrolling,v=h.scrollLeft,m=h.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var g=r.getTotalSize(),y=g.height,b=g.width,x=Math.max(0,v-l),w=Math.max(0,m-f),S=Math.min(b,v+d+l),_=Math.min(y,m+i+f),k=i>0&&d>0?r.cellRenderers({height:_-w,isScrolling:p,width:S-x,x:x,y:w}):[],T={boxSizing:"border-box",direction:"ltr",height:t?"auto":i,position:"relative",WebkitOverflowScrolling:"touch",width:d,willChange:"transform"},C=y>i?this._scrollbarSize:0,E=b>d?this._scrollbarSize:0;return T.overflowX=b+C<=d?"hidden":"auto",T.overflowY=y+E<=i?"hidden":"auto",a.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:QB("ReactVirtualized__Collection",o),id:u,onScroll:this._onScroll,role:"grid",style:NV({},T,{},c),tabIndex:0},n>0&&a.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:y,maxHeight:y,maxWidth:b,overflow:"hidden",pointerEvents:p?"none":"",width:b}},k),0===n&&s())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:o,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:DV.REQUESTED};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:DV.REQUESTED}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:DV.REQUESTED}}}]),t}(a.PureComponent);f(LV,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),LV.propTypes={},(0,GB.polyfill)(LV);var FV=LV,zV=function(){function e(t){var n=t.height,r=t.width,o=t.x,i=t.y;pi(this,e),this.height=n,this.width=r,this.x=o,this.y=i,this._indexMap={},this._indices=[]}return hi(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),BV=100,VV=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:BV;pi(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return hi(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,r=e.x,o=e.y,i={};return this.getSections({height:t,width:n,x:r,y:o}).forEach((function(e){return e.getCellIndices().forEach((function(e){i[e]=e}))})),Object.keys(i).map((function(e){return i[e]}))}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,r=e.x,o=e.y,i=Math.floor(r/this._sectionSize),a=Math.floor((r+n-1)/this._sectionSize),l=Math.floor(o/this._sectionSize),u=Math.floor((o+t-1)/this._sectionSize),s=[],c=i;c<=a;c++)for(var f=l;f<=u;f++){var d="".concat(c,".").concat(f);this._sections[d]||(this._sections[d]=new zV({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:f*this._sectionSize})),s.push(this._sections[d])}return s}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map((function(t){return e._sections[t].toString()}))}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach((function(e){return e.addCellIndex({index:n})}))}}]),e}();function HV(e){var t=e.align,n=void 0===t?"auto":t,r=e.cellOffset,o=e.cellSize,i=e.containerSize,a=e.currentOffset,l=r,u=l-i+o;switch(n){case"start":return l;case"end":return u;case"center":return l-(i-o)/2;default:return Math.max(u,Math.min(l,a))}}var UV=function(e){function t(e,n){var r;return pi(this,t),(r=yi(this,vi(t).call(this,e,n)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(gi(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(gi(r)),r}return St(t,e),hi(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=ye({},this.props);return a.createElement(FV,ye({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,r=e.sectionSize,o=[],i=new VV(r),a=0,l=0,u=0;u=0&&nn||o1&&void 0!==arguments[1]?arguments[1]:0,n="function"===typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,o=this.props,i=o.isRowLoaded,a=o.minimumBatchSize,l=o.rowCount,u=o.threshold,s=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,r=e.rowCount,o=e.startIndex,i=e.stopIndex,a=[],l=null,u=null,s=o;s<=i;s++){t({index:s})?null!==u&&(a.push({startIndex:l,stopIndex:u}),l=u=null):(u=s,null===l&&(l=s))}if(null!==u){for(var c=Math.min(Math.max(u,l+n-1),r-1),f=u+1;f<=c&&!t({index:f});f++)u=f;a.push({startIndex:l,stopIndex:u})}if(a.length)for(var d=a[0];d.stopIndex-d.startIndex+10;){var h=d.startIndex-1;if(t({index:h}))break;d.startIndex=h}return a}({isRowLoaded:i,minimumBatchSize:a,rowCount:l,startIndex:Math.max(0,e-u),stopIndex:Math.min(l-1,t+u)}),c=(n=[]).concat.apply(n,bt(s.map((function(e){return[e.startIndex,e.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(s)},indices:{squashedUnloadedRanges:c}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(a.PureComponent);f(WV,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),WV.propTypes={};var GV,qV,QV=(qV=GV=function(e){function t(){var e,n;pi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,o=e.width,i=QB("ReactVirtualized__List",t);return a.createElement(yV,ye({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:i,columnWidth:o,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(a.PureComponent),f(GV,"propTypes",null),qV);f(QV,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:xV,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});var $V={ge:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=n+1;t<=n;){var a=t+n>>>1;o(e[a],r)>=0?(i=a,n=a-1):t=a+1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=n+1;t<=n;){var i=t+n>>>1;e[i]>=r?(o=i,n=i-1):t=i+1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},gt:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=n+1;t<=n;){var a=t+n>>>1;o(e[a],r)>0?(i=a,n=a-1):t=a+1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=n+1;t<=n;){var i=t+n>>>1;e[i]>r?(o=i,n=i-1):t=i+1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},lt:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=t-1;t<=n;){var a=t+n>>>1;o(e[a],r)<0?(i=a,t=a+1):n=a-1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=t-1;t<=n;){var i=t+n>>>1;e[i]>>1;o(e[a],r)<=0?(i=a,t=a+1):n=a-1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=t-1;t<=n;){var i=t+n>>>1;e[i]<=r?(o=i,t=i+1):n=i-1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},eq:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(;t<=n;){var i=t+n>>>1,a=o(e[i],r);if(0===a)return i;a<=0?t=i+1:n=i-1}return-1}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(;t<=n;){var o=t+n>>>1,i=e[o];if(i===r)return o;i<=r?t=o+1:n=o-1}return-1}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)}},YV=0,KV=1;function XV(e,t,n,r,o){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=o,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var JV=XV.prototype;function ZV(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function eH(e,t){var n=sH(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function tH(e,t){var n=e.intervals([]);n.push(t),eH(e,n)}function nH(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?YV:(n.splice(r,1),eH(e,n),KV)}function rH(e,t,n){for(var r=0;r=0&&e[r][1]>=t;--r){var o=n(e[r]);if(o)return o}}function iH(e,t){for(var n=0;n>1],o=[],i=[],a=[];for(n=0;n3*(t+1)?tH(this,e):this.left.insert(e):this.left=sH([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?tH(this,e):this.right.insert(e):this.right=sH([e]);else{var n=$V.ge(this.leftPoints,e,lH),r=$V.ge(this.rightPoints,e,uH);this.leftPoints.splice(n,0,e),this.rightPoints.splice(r,0,e)}},JV.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?nH(this,e):2===(i=this.left.remove(e))?(this.left=null,this.count-=1,KV):(i===KV&&(this.count-=1),i):YV;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?nH(this,e):2===(i=this.right.remove(e))?(this.right=null,this.count-=1,KV):(i===KV&&(this.count-=1),i):YV;if(1===this.count)return this.leftPoints[0]===e?2:YV;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var o=this.left,i=this.right;n.count-=r.count,n.right=r.left,r.left=o,r.right=i}ZV(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?ZV(this,this.left):ZV(this,this.right);return KV}for(o=$V.ge(this.leftPoints,e,lH);othis.mid){var n;if(this.right)if(n=this.right.queryPoint(e,t))return n;return oH(this.rightPoints,e,t)}return iH(this.leftPoints,t)},JV.queryInterval=function(e,t,n){var r;if(ethis.mid&&this.right&&(r=this.right.queryInterval(e,t,n)))return r;return tthis.mid?oH(this.rightPoints,e,n):iH(this.leftPoints,n)};var fH=cH.prototype;fH.insert=function(e){this.root?this.root.insert(e):this.root=new XV(e[0],null,null,[e],[e])},fH.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),t!==YV}return!1},fH.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},fH.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(fH,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(fH,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var dH,hH,pH=function(){function e(){var t;pi(this,e),f(this,"_columnSizeMap",{}),f(this,"_intervalTree",t&&0!==t.length?new cH(sH(t)):new cH(null)),f(this,"_leftMap",{})}return hi(e,[{key:"estimateTotalHeight",value:function(e,t,n){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*n}},{key:"range",value:function(e,t,n){var r=this;this._intervalTree.queryInterval(e,e+t,(function(e){var t=ut(e,3),o=t[0],i=(t[1],t[2]);return n(i,r._leftMap[i],o)}))}},{key:"setPosition",value:function(e,t,n,r){this._intervalTree.insert([n,n+r,e]),this._leftMap[e]=t;var o=this._columnSizeMap,i=o[t];o[t]=void 0===i?n+r:Math.max(i,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=Math.max(t,r)}return t}}]),e}();function vH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mH(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};pi(this,e),f(this,"_cellMeasurerCache",void 0),f(this,"_columnIndexOffset",void 0),f(this,"_rowIndexOffset",void 0),f(this,"columnWidth",(function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})})),f(this,"rowHeight",(function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})}));var r=n.cellMeasurerCache,o=n.columnIndexOffset,i=void 0===o?0:o,a=n.rowIndexOffset,l=void 0===a?0:a;this._cellMeasurerCache=r,this._columnIndexOffset=i,this._rowIndexOffset=l}return hi(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function xH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wH(e){for(var t=1;t0?new bH({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:l}):o,r._deferredMeasurementCacheBottomRightGrid=i>0||l>0?new bH({cellMeasurerCache:o,columnIndexOffset:i,rowIndexOffset:l}):o,r._deferredMeasurementCacheTopRightGrid=i>0?new bH({cellMeasurerCache:o,columnIndexOffset:i,rowIndexOffset:0}):o),r}return St(t,e),hi(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.fixedColumnCount,l=i.fixedRowCount,u=Math.max(0,n-a),s=Math.max(0,o-l);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:s}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:u,rowIndex:s}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:o}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:u,rowIndex:o}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),o=(e.scrollTop,e.scrollToRow),i=p(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var l=this.state,u=l.scrollLeft,s=l.scrollTop;return a.createElement("div",{style:this._containerOuterStyle},a.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(i),this._renderTopRightGrid(wH({},i,{onScroll:t,scrollLeft:u}))),a.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(wH({},i,{onScroll:t,scrollTop:s})),this._renderBottomRightGrid(wH({},i,{onScroll:t,onSectionRendered:n,scrollLeft:u,scrollToColumn:r,scrollToRow:o,scrollTop:s}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"===typeof n){for(var r=0,o=0;o=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(a.PureComponent);f(_H,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),_H.propTypes={},(0,GB.polyfill)(_H);var kH=function(e){function t(e,n){var r;return pi(this,t),(r=yi(this,vi(t).call(this,e,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(gi(r)),r}return St(t,e),hi(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,o=t.scrollHeight,i=t.scrollLeft,a=t.scrollTop,l=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:o,scrollLeft:i,scrollTop:a,scrollWidth:l})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,o=e.scrollLeft,i=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:o,scrollTop:i,scrollWidth:a})}}]),t}(a.PureComponent);kH.propTypes={};function TH(e){var t=e.className,n=e.columns,r=e.style;return a.createElement("div",{className:t,role:"row",style:r},n)}TH.propTypes=null;var CH={ASC:"ASC",DESC:"DESC"};function EH(e){var t=e.sortDirection,n=QB("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===CH.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===CH.DESC});return a.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===CH.ASC?a.createElement("path",{d:"M7 14l5-5 5 5z"}):a.createElement("path",{d:"M7 10l5 5 5-5z"}),a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function OH(e){var t=e.dataKey,n=e.label,r=e.sortBy,o=e.sortDirection,i=r===t,l=[a.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof n?n:null},n)];return i&&l.push(a.createElement(EH,{key:"SortIndicator",sortDirection:o})),l}function jH(e){var t=e.className,n=e.columns,r=e.index,o=e.key,i=e.onRowClick,l=e.onRowDoubleClick,u=e.onRowMouseOut,s=e.onRowMouseOver,c=e.onRowRightClick,f=e.rowData,d=e.style,h={"aria-rowindex":r+1};return(i||l||u||s||c)&&(h["aria-label"]="row",h.tabIndex=0,i&&(h.onClick=function(e){return i({event:e,index:r,rowData:f})}),l&&(h.onDoubleClick=function(e){return l({event:e,index:r,rowData:f})}),u&&(h.onMouseOut=function(e){return u({event:e,index:r,rowData:f})}),s&&(h.onMouseOver=function(e){return s({event:e,index:r,rowData:f})}),c&&(h.onContextMenu=function(e){return c({event:e,index:r,rowData:f})})),a.createElement("div",ye({},h,{className:t,key:o,role:"row",style:d}),n)}EH.propTypes={},OH.propTypes=null,jH.propTypes=null;var PH=function(e){function t(){return pi(this,t),yi(this,vi(t).apply(this,arguments))}return St(t,e),t}(a.Component);function AH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RH(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=(0,Kx.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,o=t.disableHeader,i=t.gridClassName,l=t.gridStyle,u=t.headerHeight,s=t.headerRowRenderer,c=t.height,f=t.id,d=t.noRowsRenderer,h=t.rowClassName,p=t.rowStyle,v=t.scrollToIndex,m=t.style,g=t.width,y=this.state.scrollbarWidth,b=o?c:c-u,x="function"===typeof h?h({index:-1}):h,w="function"===typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],a.Children.toArray(n).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=RH({overflow:"hidden"},r)})),a.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":a.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:QB("ReactVirtualized__Table",r),id:f,role:"grid",style:m},!o&&s({className:QB("ReactVirtualized__Table__headerRow",x),columns:this._getHeaderColumns(),style:RH({height:u,overflow:"hidden",paddingRight:y,width:g},w)}),a.createElement(yV,ye({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:QB("ReactVirtualized__Table__Grid",i),cellRenderer:this._createRow,columnWidth:g,columnCount:1,height:b,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:y,scrollToRow:v,style:RH({},l,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,o=e.parent,i=e.rowData,l=e.rowIndex,u=this.props.onColumnClick,s=t.props,c=s.cellDataGetter,f=s.cellRenderer,d=s.className,h=s.columnData,p=s.dataKey,v=s.id,m=f({cellData:c({columnData:h,dataKey:p,rowData:i}),columnData:h,columnIndex:n,dataKey:p,isScrolling:r,parent:o,rowData:i,rowIndex:l}),g=this._cachedColumnStyles[n],y="string"===typeof m?m:null;return a.createElement("div",{"aria-colindex":n+1,"aria-describedby":v,className:QB("ReactVirtualized__Table__rowColumn",d),key:"Row"+l+"-Col"+n,onClick:function(e){u&&u({columnData:h,dataKey:p,event:e})},role:"gridcell",style:g,title:y},m)}},{key:"_createHeader",value:function(e){var t,n,r,o,i,l=e.column,u=e.index,s=this.props,c=s.headerClassName,f=s.headerStyle,d=s.onHeaderClick,h=s.sort,p=s.sortBy,v=s.sortDirection,m=l.props,g=m.columnData,y=m.dataKey,b=m.defaultSortDirection,x=m.disableSort,w=m.headerRenderer,S=m.id,_=m.label,k=!x&&h,T=QB("ReactVirtualized__Table__headerColumn",c,l.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:k}),C=this._getFlexStyleForColumn(l,RH({},f,{},l.props.headerStyle)),E=w({columnData:g,dataKey:y,disableSort:x,label:_,sortBy:p,sortDirection:v});if(k||d){var O=p!==y?b:v===CH.DESC?CH.ASC:CH.DESC,j=function(e){k&&h({defaultSortDirection:b,event:e,sortBy:y,sortDirection:O}),d&&d({columnData:g,dataKey:y,event:e})};i=l.props["aria-label"]||_||y,o="none",r=0,t=j,n=function(e){"Enter"!==e.key&&" "!==e.key||j(e)}}return p===y&&(o=v===CH.ASC?"ascending":"descending"),a.createElement("div",{"aria-label":i,"aria-sort":o,className:T,id:S,key:"Header-Col"+u,onClick:t,onKeyDown:n,role:"columnheader",style:C,tabIndex:r},E)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,o=e.key,i=e.parent,l=e.style,u=this.props,s=u.children,c=u.onRowClick,f=u.onRowDoubleClick,d=u.onRowRightClick,h=u.onRowMouseOver,p=u.onRowMouseOut,v=u.rowClassName,m=u.rowGetter,g=u.rowRenderer,y=u.rowStyle,b=this.state.scrollbarWidth,x="function"===typeof v?v({index:n}):v,w="function"===typeof y?y({index:n}):y,S=m({index:n}),_=a.Children.toArray(s).map((function(e,o){return t._createColumn({column:e,columnIndex:o,isScrolling:r,parent:i,rowData:S,rowIndex:n,scrollbarWidth:b})})),k=QB("ReactVirtualized__Table__row",x),T=RH({},l,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:b},w);return g({className:k,columns:_,index:n,isScrolling:r,key:o,onRowClick:c,onRowDoubleClick:f,onRowRightClick:d,onRowMouseOver:h,onRowMouseOut:p,rowData:S,style:T})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=RH({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:a.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"===typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,o=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:o})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(a.PureComponent);f(IH,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:xV,overscanRowCount:10,rowRenderer:jH,headerRowRenderer:TH,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),IH.propTypes={};var MH=[],NH=null,DH=null;function LH(){DH&&(DH=null,document.body&&null!=NH&&(document.body.style.pointerEvents=NH),NH=null)}function FH(){LH(),MH.forEach((function(e){return e.__resetIsScrolling()}))}function zH(e){e.currentTarget===window&&null==NH&&document.body&&(NH=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){DH&&fV(DH);var e=0;MH.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),DH=dV(FH,e)}(),MH.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}function BH(e,t){MH.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",zH),MH.push(e)}function VH(e,t){(MH=MH.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",zH),DH&&(fV(DH),LH()))}var HH,UH,WH=function(e){return e===window},GH=function(e){return e.getBoundingClientRect()};function qH(e,t){if(e){if(WH(e)){var n=window,r=n.innerHeight,o=n.innerWidth;return{height:"number"===typeof r?r:0,width:"number"===typeof o?o:0}}return GH(e)}return{height:t.serverHeight,width:t.serverWidth}}function QH(e){return WH(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function $H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var YH=function(){return"undefined"!==typeof window?window:void 0},KH=(UH=HH=function(e){function t(){var e,n;pi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,o=n.width,i=this._child||Kx.findDOMNode(this);if(i instanceof Element&&e){var a=function(e,t){if(WH(t)&&document.documentElement){var n=document.documentElement,r=GH(e),o=GH(n);return{top:r.top-o.top,left:r.left-o.left}}var i=QH(t),a=GH(e),l=GH(t);return{top:a.top+i.top-l.top,left:a.left+i.left-l.left}}(i,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var l=qH(e,this.props);r===l.height&&o===l.width||(this.setState({height:l.height,width:l.width}),t({height:l.height,width:l.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=EV(),this.updatePosition(e),e&&(BH(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),VH(this,r),BH(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(VH(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,o=t.scrollLeft,i=t.height,a=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:n,scrollLeft:o,scrollTop:r,width:a})}}]),t}(a.PureComponent),f(HH,"propTypes",null),UH);f(KH,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:YH(),serverHeight:0,serverWidth:0});var XH=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];Math.min,Math.max;var JH=["top","right","bottom","left"];JH.reduce((function(e,t){return e.concat(t,t+"-start",t+"-end")}),[]);function ZH(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eU(e){return ZH(e).getComputedStyle(e)}Math.min,Math.max;var tU,nU=Math.round;function rU(e){var t=eU(e),n=parseFloat(t.width),r=parseFloat(t.height),o=e.offsetWidth,i=e.offsetHeight,a=nU(n)!==o||nU(r)!==i;return a&&(n=o,r=i),{width:n,height:r,fallback:a}}function oU(e){return uU(e)?(e.nodeName||"").toLowerCase():""}function iU(){if(tU)return tU;var e=navigator.userAgentData;return e&&Array.isArray(e.brands)?tU=e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function aU(e){return e instanceof ZH(e).HTMLElement}function lU(e){return e instanceof ZH(e).Element}function uU(e){return e instanceof ZH(e).Node}function sU(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ZH(e).ShadowRoot||e instanceof ShadowRoot)}function cU(e){var t=eU(e),n=t.overflow,r=t.overflowX,o=t.overflowY,i=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!["inline","contents"].includes(i)}function fU(){return/^((?!chrome|android).)*safari/i.test(iU())}function dU(e){return["html","body","#document"].includes(oU(e))}function hU(e){return lU(e)?e:e.contextElement}var pU={x:1,y:1};function vU(e){var t=hU(e);if(!aU(t))return pU;var n=t.getBoundingClientRect(),r=rU(t),o=r.width,i=r.height,a=r.fallback,l=(a?nU(n.width):n.width)/o,u=(a?nU(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}function mU(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);var a=e.getBoundingClientRect(),l=hU(e),u=pU;t&&(r?lU(r)&&(u=vU(r)):u=vU(e));var s=l?ZH(l):window,c=fU()&&n,f=(a.left+(c&&(null==(o=s.visualViewport)?void 0:o.offsetLeft)||0))/u.x,d=(a.top+(c&&(null==(i=s.visualViewport)?void 0:i.offsetTop)||0))/u.y,h=a.width/u.x,p=a.height/u.y;if(l)for(var v=ZH(l),m=r&&lU(r)?ZH(r):r,g=v.frameElement;g&&r&&m!==v;){var y=vU(g),b=g.getBoundingClientRect(),x=getComputedStyle(g);b.x+=(g.clientLeft+parseFloat(x.paddingLeft))*y.x,b.y+=(g.clientTop+parseFloat(x.paddingTop))*y.y,f*=y.x,d*=y.y,h*=y.x,p*=y.y,f+=b.x,d+=b.y,g=ZH(g).frameElement}return{width:h,height:p,top:d,right:f+h,bottom:d+p,left:f,x:f,y:d}}function gU(e){return((uU(e)?e.ownerDocument:e.document)||window.document).documentElement}function yU(e){if("html"===oU(e))return e;var t=e.assignedSlot||e.parentNode||sU(e)&&e.host||gU(e);return sU(t)?t.host:t}function bU(e){var t=yU(e);return dU(t)?t.ownerDocument.body:aU(t)&&cU(t)?t:bU(t)}function xU(e,t){var n;void 0===t&&(t=[]);var r=bU(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=ZH(r);return o?t.concat(i,i.visualViewport||[],cU(r)?r:[]):t.concat(r,xU(r))}var wU=a.useLayoutEffect,SU=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],_U=function(){};function kU(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function TU(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function PU(e){return jU(e)?window.pageYOffset:e.scrollTop}function AU(e,t){jU(e)?window.scrollTo(0,t):e.scrollTop=t}function RU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_U,o=PU(e),i=t-o,a=10,l=0;!function t(){var u=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(l+=a,o,i,n);AU(e,u),ln.bottom?AU(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o1?t-1:0),r=1;r=p)return{placement:"bottom",maxHeight:t};if(k>=p&&!a)return i&&RU(u,T,E),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&S>=r)return i&&RU(u,T,E),{placement:"bottom",maxHeight:a?S-b:k-b};if("auto"===o||a){var O=t,j=a?w:_;return j>=r&&(O=Math.min(j-b-l,t)),{placement:"top",maxHeight:O}}if("bottom"===o)return i&&AU(u,T),{placement:"bottom",maxHeight:t};break;case"top":if(w>=p)return{placement:"top",maxHeight:t};if(_>=p&&!a)return i&&RU(u,C,E),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&w>=r){var P=t;return(!a&&_>=r||a&&w>=r)&&(P=a?w-x:_-x),i&&RU(u,C,E),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return s}var UU=function(e){return"auto"===e?"bottom":e},WU=(0,a.createContext)(null),GU=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,l=e.menuShouldScrollIntoView,u=e.theme,s=((0,a.useContext)(WU)||{}).setPortalPlacement,c=(0,a.useRef)(null),f=ut((0,a.useState)(r),2),d=f[0],p=f[1],v=ut((0,a.useState)(null),2),m=v[0],g=v[1],y=u.spacing.controlHeight;return wU((function(){var e=c.current;if(e){var t="fixed"===i,a=HU({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:l&&!t,isFixedPosition:t,controlHeight:y});p(a.maxHeight),g(a.placement),null===s||void 0===s||s(a.placement)}}),[r,o,i,l,n,s,y]),t({ref:c,placerProps:h(h({},e),{},{placement:m||UU(o),maxHeight:d})})},qU=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return h({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},QU=qU,$U=qU,YU=function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},OU(e,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),t)};YU.defaultProps={children:"No options"};var KU=function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},OU(e,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),t)};KU.defaultProps={children:"Loading..."};var XU,JU=["size"];var ZU={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},eW=function(e){var t=e.size,n=p(e,JU);return Xe("svg",ye({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ZU},n))},tW=function(e){return Xe(eW,ye({size:20},e),Xe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},nW=function(e){return Xe(eW,ye({size:20},e),Xe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},rW=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return h({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},oW=rW,iW=rW,aW=et(XU||(XU=qC(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),lW=function(e){var t=e.delay,n=e.offset;return Xe("span",{css:Ze({animation:"".concat(aW," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},uW=function(e){var t=e.innerProps,n=e.isRtl;return Xe("div",ye({},OU(e,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xe(lW,{delay:0,offset:n}),Xe(lW,{delay:160,offset:!0}),Xe(lW,{delay:320,offset:!n}))};uW.defaultProps={size:4};var sW=["data"],cW=["innerRef","isDisabled","isHidden","inputClassName"],fW={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},dW={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":h({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},fW)},hW=function(e){return h({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},fW)},pW=function(e){var t=e.children,n=e.innerProps;return Xe("div",n,t)};var vW={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},OU(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xe(tW,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xe("div",ye({ref:o},OU(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},OU(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xe(nW,null))},DownChevron:nW,CrossIcon:tW,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,u=e.label,s=e.theme,c=e.selectProps;return Xe("div",ye({},OU(e,"group",{group:!0}),l),Xe(i,ye({},a,{selectProps:c,theme:s,getStyles:r,getClassNames:o,cx:n}),u),Xe("div",null,t))},GroupHeading:function(e){var t=EU(e);t.data;var n=p(t,sW);return Xe("div",ye({},OU(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},OU(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xe("span",ye({},t,OU(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=EU(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,u=p(r,cW);return Xe("div",ye({},OU(e,"input",{"input-container":!0}),{"data-value":n||""}),Xe("input",ye({className:t({input:!0},l),ref:o,style:hW(a),disabled:i},u)))},LoadingIndicator:uW,Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Xe("div",ye({},OU(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Xe("div",ye({},OU(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,l=e.menuPosition,u=(0,a.useRef)(null),s=(0,a.useRef)(null),c=ut((0,a.useState)(UU(i)),2),f=c[0],d=c[1],p=(0,a.useMemo)((function(){return{setPortalPlacement:d}}),[]),v=ut((0,a.useState)(null),2),m=v[0],g=v[1],y=(0,a.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===l?0:window.pageYOffset,n=e[f]+t;n===(null===m||void 0===m?void 0:m.offset)&&e.left===(null===m||void 0===m?void 0:m.rect.left)&&e.width===(null===m||void 0===m?void 0:m.rect.width)||g({offset:n,rect:e})}}),[r,l,f,null===m||void 0===m?void 0:m.offset,null===m||void 0===m?void 0:m.rect.left,null===m||void 0===m?void 0:m.rect.width]);wU((function(){y()}),[y]);var b=(0,a.useCallback)((function(){"function"===typeof s.current&&(s.current(),s.current=null),r&&u.current&&(s.current=function(e,t,n,r){void 0===r&&(r={});var o=r,i=o.ancestorScroll,a=void 0===i||i,l=o.ancestorResize,u=void 0===l||l,s=o.elementResize,c=void 0===s||s,f=o.animationFrame,d=void 0!==f&&f,h=a&&!d,p=h||u?[].concat(bt(lU(e)?xU(e):e.contextElement?xU(e.contextElement):[]),bt(xU(t))):[];p.forEach((function(e){h&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)}));var v,m=null;if(c){var g=!0;m=new ResizeObserver((function(){g||n(),g=!1})),lU(e)&&!d&&m.observe(e),lU(e)||!e.contextElement||d||m.observe(e.contextElement),m.observe(t)}var y=d?mU(e):null;return d&&function t(){var r=mU(e);!y||r.x===y.x&&r.y===y.y&&r.width===y.width&&r.height===y.height||n(),y=r,v=requestAnimationFrame(t)}(),n(),function(){var e;p.forEach((function(e){h&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)})),null==(e=m)||e.disconnect(),m=null,d&&cancelAnimationFrame(v)}}(r,u.current,y,{elementResize:"ResizeObserver"in window}))}),[r,y]);wU((function(){b()}),[b]);var x=(0,a.useCallback)((function(e){u.current=e,b()}),[b]);if(!t&&"fixed"!==l||!m)return null;var w=Xe("div",ye({ref:x},OU(h(h({},e),{},{offset:m.offset,position:l,rect:m.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Xe(WU.Provider,{value:p},t?(0,Kx.createPortal)(w,t):w)},LoadingMessage:KU,NoOptionsMessage:YU,MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,u=n.Container,s=n.Label,c=n.Remove;return Xe(u,{data:r,innerProps:h(h({},OU(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Xe(s,{data:r,innerProps:h({},OU(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Xe(c,{data:r,innerProps:h(h({},OU(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},MultiValueContainer:pW,MultiValueLabel:pW,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({role:"button"},n),t||Xe(tW,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Xe("div",ye({},OU(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},OU(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Xe("div",ye({},OU(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Xe("div",ye({},OU(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Xe("div",ye({},OU(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},mW=function(e){return h(h({},vW),e.components)},gW=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function yW(e,t){return e===t||!(!gW(e)||!gW(t))}function bW(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,l=e.isDisabled,u=e.isSelected,s=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(s(a,n),".");if("menu"===t){var c=l?" disabled":"",f="".concat(u?"selected":"focused").concat(c);return"option ".concat(i," ").concat(f,", ").concat(s(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},_W=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,l=e.selectValue,u=e.selectProps,s=e.id,c=u.ariaLiveMessages,f=u.getOptionLabel,d=u.inputValue,p=u.isMulti,v=u.isOptionDisabled,m=u.isSearchable,g=u.menuIsOpen,y=u.options,b=u.screenReaderStatus,x=u.tabSelectsValue,w=u["aria-label"],S=u["aria-live"],_=(0,a.useMemo)((function(){return h(h({},SW),c||{})}),[c]),k=(0,a.useMemo)((function(){var e,n="";if(t&&_.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,u=t.value,s=i||r||(e=u,Array.isArray(e)?null:e),c=s?f(s):"",d=o||a||void 0,p=d?d.map(f):[],m=h({isDisabled:s&&v(s,l),label:c,labels:p},t);n=_.onChange(m)}return n}),[t,_,v,l,f]),T=(0,a.useMemo)((function(){var e="",t=n||r,i=!!(n&&l&&l.includes(n));if(t&&_.onFocus){var a={focused:t,label:f(t),isDisabled:v(t,l),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:l};e=_.onFocus(a)}return e}),[n,r,f,v,_,o,l]),C=(0,a.useMemo)((function(){var e="";if(g&&y.length&&_.onFilter){var t=b({count:o.length});e=_.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,g,_,y,b]),E=(0,a.useMemo)((function(){var e="";if(_.guidance){var t=r?"value":g?"menu":"input";e=_.guidance({"aria-label":w,context:t,isDisabled:n&&v(n,l),isMulti:p,isSearchable:m,tabSelectsValue:x})}return e}),[w,n,r,p,v,m,g,_,l,x]),O="".concat(T," ").concat(C," ").concat(E),j=Xe(a.Fragment,null,Xe("span",{id:"aria-selection"},k),Xe("span",{id:"aria-context"},O)),P="initial-input-focus"===(null===t||void 0===t?void 0:t.action);return Xe(a.Fragment,null,Xe(wW,{id:s},P&&j),Xe(wW,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text"},i&&!P&&j))},kW=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],TW=new RegExp("["+kW.map((function(e){return e.letters})).join("")+"]","g"),CW={},EW=0;EW-1}},NW=["innerRef"];function DW(e){var t=e.innerRef,n=p(e,NW),r=VU(n,"onExited","in","enter","exit","appear");return Xe("input",ye({ref:t},r,{css:Ze({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var LW=function(e){e.preventDefault(),e.stopPropagation()};var FW=["boxSizing","height","overflow","paddingRight","position"],zW={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function BW(e){e.preventDefault()}function VW(e){e.stopPropagation()}function HW(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function UW(){return"ontouchstart"in window||navigator.maxTouchPoints}var WW=!("undefined"===typeof window||!window.document||!window.document.createElement),GW=0,qW={capture:!1,passive:!1};var QW=function(){return document.activeElement&&document.activeElement.blur()},$W={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function YW(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,l=(0,a.useRef)(!1),u=(0,a.useRef)(!1),s=(0,a.useRef)(0),c=(0,a.useRef)(null),f=(0,a.useCallback)((function(e,t){if(null!==c.current){var a=c.current,s=a.scrollTop,f=a.scrollHeight,d=a.clientHeight,h=c.current,p=t>0,v=f-d-s,m=!1;v>t&&l.current&&(r&&r(e),l.current=!1),p&&u.current&&(i&&i(e),u.current=!1),p&&t>v?(n&&!l.current&&n(e),h.scrollTop=f,m=!0,l.current=!0):!p&&-t>s&&(o&&!u.current&&o(e),h.scrollTop=0,m=!0,u.current=!0),m&&LW(e)}}),[n,r,o,i]),d=(0,a.useCallback)((function(e){f(e,e.deltaY)}),[f]),h=(0,a.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),p=(0,a.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;f(e,t)}),[f]),v=(0,a.useCallback)((function(e){if(e){var t=!!FU&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",p,t)}}),[p,h,d]),m=(0,a.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",p,!1))}),[p,h,d]);return(0,a.useEffect)((function(){if(t){var e=c.current;return v(e),function(){m(e)}}}),[t,v,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,a.useRef)({}),i=(0,a.useRef)(null),l=(0,a.useCallback)((function(e){if(WW){var t=document.body,n=t&&t.style;if(r&&FW.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&GW<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+i||0;Object.keys(zW).forEach((function(e){var t=zW[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&UW()&&(t.addEventListener("touchmove",BW,qW),e&&(e.addEventListener("touchstart",HW,qW),e.addEventListener("touchmove",VW,qW))),GW+=1}}),[r]),u=(0,a.useCallback)((function(e){if(WW){var t=document.body,n=t&&t.style;GW=Math.max(GW-1,0),r&&GW<1&&FW.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&UW()&&(t.removeEventListener("touchmove",BW,qW),e&&(e.removeEventListener("touchstart",HW,qW),e.removeEventListener("touchmove",VW,qW)))}}),[r]);return(0,a.useEffect)((function(){if(t){var e=i.current;return l(e),function(){u(e)}}}),[t,l,u]),function(e){i.current=e}}({isEnabled:n});return Xe(a.Fragment,null,n&&Xe("div",{onClick:QW,css:$W}),t((function(e){o(e),i(e)})))}var KW={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},XW=function(e){var t=e.name,n=e.onFocus;return Xe("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:KW,value:"",onChange:function(){}})},JW={clearIndicator:iW,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return h({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:oW,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return h({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return h({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return h(h({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},dW),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return h({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:$U,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,l=o.colors;return h((f(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),f(n,"position","absolute"),f(n,"width","100%"),f(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return h({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return h({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return h({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return h({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:QU,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return h({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return h({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return h({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return h({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var ZW={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},eG={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:MU(),captureMenuScroll:!MU(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:MW(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function tG(e,t,n,r){return{type:"option",data:t,isDisabled:lG(e,t,n),isSelected:uG(e,t,n),label:iG(e,t),value:aG(e,t),index:r}}function nG(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return tG(e,n,t,r)})).filter((function(t){return oG(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=tG(e,n,t,r);return oG(e,i)?i:void 0})).filter(zU)}function rG(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,bt(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function oG(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!cG(e)||!i)&&sG(e,{label:a,value:l,data:o},r)}var iG=function(e,t){return e.getOptionLabel(t)},aG=function(e,t){return e.getOptionValue(t)};function lG(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function uG(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=aG(e,t);return n.some((function(t){return aG(e,t)===r}))}function sG(e,t,n){return!e.filterOption||e.filterOption(t,n)}var cG=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},fG=1,dG=function(e){St(n,e);var t=bi(n);function n(e){var r;if(pi(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,l=o&&r.isOptionSelected(e,a),u=r.isOptionDisabled(e,a);if(l){var s=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==s})),"deselect-option",e)}else{if(u)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(bt(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=BU(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(BU(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=BU(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return cG(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,l=t.isClearable,u=t.isDisabled,s=t.menuIsOpen,c=t.onKeyDown,f=t.tabSelectsValue,d=t.openMenuOnFocus,h=r.state,p=h.focusedOption,v=h.focusedValue,m=h.selectValue;if(!u&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)r.removeValue(v);else{if(!o)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!s||!f||!p||d&&r.isOptionSelected(p,m))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(s){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":s?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):l&&i&&r.clearValue();break;case" ":if(a)return;if(!s){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":s?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":s?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!s)return;r.focusOption("pageup");break;case"PageDown":if(!s)return;r.focusOption("pagedown");break;case"Home":if(!s)return;r.focusOption("first");break;case"End":if(!s)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++fG),r.state.selectValue=CU(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.buildFocusableOptions(),i=o.indexOf(r.state.selectValue[0]);r.state.focusedOption=o[i]}return r}return hi(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&IU(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(IU(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var l=i.indexOf(r[0]);l>-1&&(a=l)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(ZW):h(h({},ZW),this.props.theme):ZW}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,l=this.props,u=l.isMulti,s=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:u,isRtl:s,options:c,selectOption:i,selectProps:l,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return lG(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return uG(this.props,e,t)}},{key:"filterOption",value:function(e,t){return sG(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,l=e.form,u=e.menuIsOpen,s=e.required,c=this.getComponents().Input,f=this.state,d=f.inputIsHidden,p=f.ariaSelection,v=this.commonProps,m=r||this.getElementId("input"),g=h(h(h({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":s,role:"combobox"},u&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===p||void 0===p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?a.createElement(c,ye({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:l,type:"text",value:o},g)):a.createElement(DW,ye({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_U,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:l,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,l=t.SingleValue,u=t.Placeholder,s=this.commonProps,c=this.props,f=c.controlShouldRenderValue,d=c.isDisabled,h=c.isMulti,p=c.inputValue,v=c.placeholder,m=this.state,g=m.selectValue,y=m.focusedValue,b=m.isFocused;if(!this.hasValue()||!f)return p?null:a.createElement(u,ye({},s,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),v);if(h)return g.map((function(t,l){var u=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return a.createElement(n,ye({},s,{components:{Container:r,Label:o,Remove:i},isFocused:u,isDisabled:d,key:c,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(p)return null;var x=g[0];return a.createElement(l,ye({},s,{data:x,isDisabled:d}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(e,ye({},t,{innerProps:l,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return a.createElement(e,ye({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return a.createElement(n,ye({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(e,ye({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,l=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,c=t.Option,f=this.commonProps,d=this.state.focusedOption,h=this.props,p=h.captureMenuScroll,v=h.inputValue,m=h.isLoading,g=h.loadingMessage,y=h.minMenuHeight,b=h.maxMenuHeight,x=h.menuIsOpen,w=h.menuPlacement,S=h.menuPosition,_=h.menuPortalTarget,k=h.menuShouldBlockScroll,T=h.menuShouldScrollIntoView,C=h.noOptionsMessage,E=h.onMenuScrollToTop,O=h.onMenuScrollToBottom;if(!x)return null;var j,P=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,l=t.isSelected,u=t.label,s=t.value,h=d===o,p=i?void 0:function(){return e.onOptionHover(o)},v=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:v,onMouseMove:p,onMouseOver:p,tabIndex:-1};return a.createElement(c,ye({},f,{innerProps:g,data:o,isDisabled:i,isSelected:l,key:m,label:u,type:r,value:s,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())j=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,l=t.index,u="".concat(e.getElementId("group"),"-").concat(l),s="".concat(u,"-heading");return a.createElement(n,ye({},f,{key:u,data:o,options:i,Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(m){var A=g({inputValue:v});if(null===A)return null;j=a.createElement(u,f,A)}else{var R=C({inputValue:v});if(null===R)return null;j=a.createElement(s,f,R)}var I={minMenuHeight:y,maxMenuHeight:b,menuPlacement:w,menuPosition:S,menuShouldScrollIntoView:T},M=a.createElement(GU,ye({},f,I),(function(t){var n=t.ref,r=t.placerProps,l=r.placement,u=r.maxHeight;return a.createElement(o,ye({},f,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:l}),a.createElement(YW,{captureEnabled:p,onTopArrive:E,onBottomArrive:O,lockEnabled:k},(function(t){return a.createElement(i,ye({},f,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:u,focusedOption:d}),j)})))}));return _||"fixed"===S?a.createElement(l,ye({},f,{appendTo:_,controlElement:this.controlRef,menuPlacement:w,menuPosition:S}),M):M}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,l=t.required,u=this.state.selectValue;if(i&&!r){if(l&&!this.hasValue())return a.createElement(XW,{name:i,onFocus:this.onValueInputFocus});if(o){if(n){var s=u.map((function(t){return e.getOptionValue(t)})).join(n);return a.createElement("input",{name:i,type:"hidden",value:s})}var c=u.length>0?u.map((function(t,n){return a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):a.createElement("input",{name:i,type:"hidden",value:""});return a.createElement("div",null,c)}var f=u[0]?this.getOptionValue(u[0]):"";return a.createElement("input",{name:i,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,l=t.selectValue,u=this.getFocusableOptions();return a.createElement(_W,ye({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:l,focusableOptions:u}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,l=i.className,u=i.id,s=i.isDisabled,c=i.menuIsOpen,f=this.state.isFocused,d=this.commonProps=this.getCommonProps();return a.createElement(r,ye({},d,{className:l,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:f}),this.renderLiveRegion(),a.createElement(t,ye({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:f,menuIsOpen:c}),a.createElement(o,ye({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),a.createElement(n,ye({},d,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,l=t.prevWasFocused,u=e.options,s=e.value,c=e.menuIsOpen,f=e.inputValue,d=e.isMulti,p=CU(s),v={};if(n&&(s!==n.value||u!==n.options||c!==n.menuIsOpen||f!==n.inputValue)){var m=c?function(e,t){return rG(nG(e,t))}(e,p):[],g=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,m);v={selectValue:p,focusedOption:y,focusedValue:g,clearFocusValueOnUpdate:!1}}var b=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,w=a&&l;return a&&!w&&(x={value:BU(d,p,p[0]||null),options:p,action:"initial-input-focus"},w=!l),"initial-input-focus"===(null===i||void 0===i?void 0:i.action)&&(x=null),h(h(h({},v),b),{},{prevProps:e,ariaSelection:x,prevWasFocused:w})}}]),n}(a.Component);dG.defaultProps=eG;var hG,pG=(0,a.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,l=void 0===i?null:i,u=e.inputValue,s=e.menuIsOpen,c=e.onChange,f=e.onInputChange,d=e.onMenuClose,v=e.onMenuOpen,m=e.value,g=p(e,XH),y=ut((0,a.useState)(void 0!==u?u:n),2),b=y[0],x=y[1],w=ut((0,a.useState)(void 0!==s?s:o),2),S=w[0],_=w[1],k=ut((0,a.useState)(void 0!==m?m:l),2),T=k[0],C=k[1],E=(0,a.useCallback)((function(e,t){"function"===typeof c&&c(e,t),C(e)}),[c]),O=(0,a.useCallback)((function(e,t){var n;"function"===typeof f&&(n=f(e,t)),x(void 0!==n?n:e)}),[f]),j=(0,a.useCallback)((function(){"function"===typeof v&&v(),_(!0)}),[v]),P=(0,a.useCallback)((function(){"function"===typeof d&&d(),_(!1)}),[d]),A=void 0!==u?u:b,R=void 0!==s?s:S,I=void 0!==m?m:T;return h(h({},g),{},{inputValue:A,menuIsOpen:R,onChange:E,onInputChange:O,onMenuClose:P,onMenuOpen:j,value:I})}(e);return a.createElement(dG,ye({ref:t},n))})),vG=pG,mG=function(e){var n=e.setFiltersSelected,r=e.beacons,o=e.groups,i=e.services,a=e.hosts,l=e.filtersSelected,u=Object.values(HC);return(0,t.jsxs)("div",{children:[(0,t.jsx)(tN,{size:"sm",mb:2,children:" Filter by platform, service, group, hosts, and beacon"}),(0,t.jsx)(vG,{isSearchable:!0,isMulti:!0,options:function(e,t,n,r){return[{label:"Platform",options:u.map((function(e){return{name:e,value:e,label:e,kind:"platform"}}))},{label:"Service",options:n.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:null===e||void 0===e?void 0:e.kind})}))},{label:"Group",options:t.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:null===e||void 0===e?void 0:e.kind})}))},{label:"Host",options:r.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:"host"})}))},{label:"Beacon",options:e.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:"beacon"})}))}]}(r,o,i,a),onChange:n,filterOption:MW({matchFrom:"any",stringify:function(e){return"".concat(e.label)}}),value:l||void 0})]})},gG=ut(mt({name:"".concat(hG="Card","StylesContext"),errorMessage:'useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<'.concat(hG,' />" ')}),2),yG=gG[0],bG=gG[1],xG=["className","children","direction","justify","align"],wG=fx((function(e,n){var r=Sr(e),o=r.className,i=r.children,a=r.direction,l=void 0===a?"column":a,u=r.justify,s=r.align,c=p(r,xG),f=yx("Card",e);return(0,t.jsx)(lx.div,h(h({ref:n,className:kt("chakra-card",o),__css:h({display:"flex",flexDirection:l,justifyContent:u,alignItems:s,position:"relative",minWidth:0,wordWrap:"break-word"},f.container)},c),{},{children:(0,t.jsx)(yG,{value:f,children:i})}))})),SG=["className"],_G=fx((function(e,n){var r=e.className,o=p(e,SG),i=bG();return(0,t.jsx)(lx.div,h({ref:n,className:kt("chakra-card__body",r),__css:i.body},o))})),kG=ut(st({name:"CheckboxGroupContext",strict:!1}),2),TG=(kG[0],kG[1]),CG=["isIndeterminate","isChecked"];function EG(e){return(0,t.jsx)(lx.svg,h(h({width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},e),{},{children:(0,t.jsx)("polyline",{points:"1.5 6 4.5 9 10.5 1"})}))}function OG(e){return(0,t.jsx)(lx.svg,h(h({width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4}},e),{},{children:(0,t.jsx)("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}))}function jG(e){var n=e.isIndeterminate,r=e.isChecked,o=p(e,CG),i=n?OG:EG;return r||n?(0,t.jsx)(lx.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(i,h({},o))}):null}var PG=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],AG={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},RG={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},IG=et({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),MG=et({from:{opacity:0},to:{opacity:1}}),NG=et({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),DG=fx((function(e,n){var r=TG(),o=yx("Checkbox",h(h({},r),e)),i=Sr(e),l=i.spacing,u=void 0===l?"0.5rem":l,s=i.className,c=i.children,f=i.iconColor,d=i.iconSize,v=i.icon,m=void 0===v?(0,t.jsx)(jG,{}):v,g=i.isChecked,y=i.isDisabled,b=void 0===y?null==r?void 0:r.isDisabled:y,x=i.onChange,w=i.inputProps,S=p(i,PG),_=g;(null==r?void 0:r.value)&&i.value&&(_=r.value.includes(i.value));var k=x;(null==r?void 0:r.onChange)&&i.value&&(k=function(){for(var e=arguments.length,t=new Array(e),n=0;n0){if(!(t.beacon.indexOf(e.id)>-1))return!1;u=!0}if(t.host.length>0){var s;if(!(t.host.indexOf(null===e||void 0===e||null===(s=e.host)||void 0===s?void 0:s.id)>-1))return!1;u=!0}if(t.service.length>0){if(!(l&&t.service.indexOf(null===l||void 0===l?void 0:l.id)>-1))return!1;u=!0}if(t.group.length>0){if(!(a&&t.group.indexOf(null===a||void 0===a?void 0:a.id)>-1))return!1;u=!0}if(t.platform.length>0){var c;if(!(t.platform.indexOf(null===e||void 0===e||null===(c=e.host)||void 0===c?void 0:c.platform)>-1))return!1;u=!0}return u}))}),[l]),m=(0,a.useCallback)((function(e,t){return c?e.filter((function(e){return t[null===e||void 0===e?void 0:e.id]})):e}),[c]),g=(0,a.useCallback)((function(e){if(h){var t=Object.values(WC),n={};for(var r in e){var o=e[r].host.id;o in n?-1===t.indexOf(n[o].principal)&&-1!==t.indexOf(e[r].principal)&&(n[o]=e[r]):n[o]=e[r]}return Object.values(n)}return e}),[h]);return(0,a.useEffect)((function(){var n=m(e,t);n=g(n),n=v(n),o(n)}),[e,t,l,c,h]),{filteredBeacons:r,setTypeFilters:u,viewOnlySelected:c,setViewOnlySelected:f,setViewOnlyOnePerHost:p}}(n,l),c=s.filteredBeacons,f=s.setTypeFilters,d=s.setViewOnlySelected,p=s.setViewOnlyOnePerHost,v=(0,a.useCallback)((function(e){u((function(t){var n=h({},t);return n[e]=!t[e],n}))}),[u]),m=(0,a.useCallback)((function(){u((function(e){var t=h({},e);return c.map((function(e){t[e.id]=!0})),t}))}),[c,u]),g=(0,a.useCallback)((function(){u((function(e){var t=h({},e);return c.map((function(e){t[e.id]=!1})),t}))}),[c,u]);var y=function(){var e=0;for(var t in l)!0===l[t]&&(e+=1);return e}();return(0,t.jsx)("div",{className:"flex flex-col gap-4",children:(0,t.jsxs)(cB,{direction:"column",gap:"4",children:[(0,t.jsx)(aB,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsx)("div",{className:"col-span-1 md:col-span-2",children:(0,t.jsx)(mG,{setFiltersSelected:f,groups:r,services:o,beacons:n,hosts:i})}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-row-reverse md:flex-row gap-1 justify-end",children:[(0,t.jsx)(eB,{htmlFor:"isSelected",className:"mt-1",children:(0,t.jsx)(tN,{size:"sm",children:"View only selected beacons"})}),(0,t.jsx)(AB,{id:"isSelected",className:"pt-1",colorScheme:"purple",onChange:function(){return d((function(e){return!e}))}})]}),(0,t.jsxs)("div",{className:"flex flex-row-reverse md:flex-row gap-1 justify-end",children:[(0,t.jsx)(eB,{htmlFor:"isSelected",className:"mt-1",children:(0,t.jsx)(tN,{size:"sm",children:"View one beacon per host"})}),(0,t.jsx)(AB,{id:"isOnePerHost",className:"pt-1",colorScheme:"purple",onChange:function(){return p((function(e){return!e}))}})]})]})]})}),(0,t.jsx)(aB,{children:(0,t.jsx)(rL,{p:2,className:"option-container",borderRadius:"md",children:(0,t.jsxs)(cB,{direction:"column",gap:2,width:"full",height:"full",children:[(0,t.jsxs)(aB,{children:[(0,t.jsx)(aB,{children:(0,t.jsxs)(zB,{leftIcon:(0,t.jsx)(UB,{className:"h-4 w-4"}),size:"sm",onClick:function(){return m()},children:["Select all (",c.length,")"]})}),(0,t.jsx)(aB,{children:(0,t.jsx)(zB,{leftIcon:(0,t.jsx)(WB,{className:" h-4 w-4"}),size:"sm",onClick:function(){return g()},children:"Clear selected"})})]}),0===c.length&&(0,t.jsx)(aB,{children:(0,t.jsxs)(HB,{fontSize:"sm",p:2,textAlign:"center",children:[c.length!==n.length&&"Try adjusting filter. ","No results found."]})}),(0,t.jsx)(aB,{className:"md-scroll-container",children:(0,t.jsx)(YG,{disableHeight:!0,children:function(e){var n=e.width;return(0,t.jsx)($G,{cellRenderer:function(e){return function(e,n){var r=e.columnIndex,o=e.key,i=e.rowIndex,a=e.style,u=1*i+r;return(0,t.jsx)("div",{style:a,children:(0,t.jsx)(QG,{index:u,style:{width:n,height:100},beaconsToDisplay:c,toggleCheck:v,beaconsSelected:l})},o)}(e,n)},columnCount:1,columnWidth:n,height:100*c.length,rowCount:c.length,rowHeight:100,width:n})}})})]})})}),(0,t.jsx)(aB,{className:"flex flex-row items-end justify-end w-full",children:(0,t.jsxs)(tN,{size:"sm",mb:2,className:" self-end text-right",children:["Total beacons selected (",y,")"]})})]})})},XG=function(e){var n=e.setCurrStep,r=e.formik,o=ut((0,a.useState)({}),2),i=o[0],l=o[1],u=(0,a.useContext)(Aj),s=u.data,c=u.isLoading,f=function(e){var t=new Date;return e.filter((function(e){return TN(new Date(e.lastSeenAt),{seconds:e.interval,minutes:1})>=t}))}((null===s||void 0===s?void 0:s.beacons)||[]),d=function(e){for(var t in e)if(!0===e[t])return!0;return!1}(i);return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Select agent beacons"}),(0,t.jsx)("p",{className:"text-sm text-gray-700 italic",children:"Only active beacons are available for selection"})]}),c||void 0===s?(0,t.jsx)(kj,{type:_j.loading,label:"Loading beacons..."}):(0,t.jsx)(KG,{beacons:f,groups:(null===s||void 0===s?void 0:s.groupTags)||[],services:(null===s||void 0===s?void 0:s.serviceTags)||[],hosts:(null===s||void 0===s?void 0:s.hosts)||[],selectedBeacons:i,setSelectedBeacons:l}),(0,t.jsx)("div",{className:"flex flex-row gap-2",children:(0,t.jsx)("button",{className:"btn-primary",onClick:function(){return function(e){var t=[];for(var o in e)!0===e[o]&&t.push(o);r.setFieldValue("beacons",t),n(1)}(i)},disabled:!d,children:"Continue"})})]})};function JG(e,t){var n=ij(null===t||void 0===t?void 0:t.client);oj(e,JO.Mutation);var r=(0,a.useState)({called:!1,loading:!1,client:n}),o=r[0],i=r[1],l=(0,a.useRef)({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(l.current,{client:n,options:t,mutation:e});var u=(0,a.useCallback)((function(e){void 0===e&&(e={});var t=l.current,n=t.options,r=t.mutation,o=Nf(Nf({},n),{mutation:r}),a=e.client||l.current.client;l.current.result.loading||o.ignoreResults||!l.current.isMounted||i(l.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:a});var u=++l.current.mutationId,s=qO(o,e);return a.mutate(s).then((function(t){var n,r=t.data,o=t.errors,c=o&&o.length>0?new ej({graphQLErrors:o}):void 0;if(u===l.current.mutationId&&!s.ignoreResults){var f={called:!0,loading:!1,data:r,error:c,client:a};l.current.isMounted&&!zO(l.current.result,f)&&i(l.current.result=f)}var d=e.onCompleted||(null===(n=l.current.options)||void 0===n?void 0:n.onCompleted);return null===d||void 0===d||d(t.data,s),t})).catch((function(t){var n;if(u===l.current.mutationId&&l.current.isMounted){var r={loading:!1,error:t,data:void 0,called:!0,client:a};zO(l.current.result,r)||i(l.current.result=r)}var o=e.onError||(null===(n=l.current.options)||void 0===n?void 0:n.onError);if(o)return o(t,s),{data:void 0,errors:t};throw t}))}),[]),s=(0,a.useCallback)((function(){l.current.isMounted&&i({called:!1,loading:!1,client:n})}),[]);return(0,a.useEffect)((function(){return l.current.isMounted=!0,function(){l.current.isMounted=!1}}),[]),[u,Nf({reset:s},o)]}var ZG,eq=eO(FG||(FG=qC(["\n query GetHosts($where: HostWhereInput) {\n hosts(where: $where){\n id\n name\n primaryIP\n platform\n lastSeenAt\n tags{\n name\n id\n kind\n }\n beacons{\n id\n name\n principal\n interval\n lastSeenAt\n }\n }\n}"]))),tq=eO(zG||(zG=qC(["\n query GetTomes($where: TomeWhereInput) {\n tomes(where: $where){\n id\n name\n paramDefs\n tactic\n eldritch\n supportModel\n description\n uploader{\n id\n name\n photoURL\n }\n }\n}"]))),nq=eO(BG||(BG=qC(["\n query GetRepository($orderBy: [RepositoryOrder!]){\n repositories(orderBy: $orderBy){\n edges{\n node{\n id\n lastModifiedAt\n url\n publicKey\n tomes{\n id\n name\n paramDefs\n tactic\n eldritch\n supportModel\n }\n owner{\n id\n name\n photoURL\n }\n }\n }\n }\n}"]))),rq=eO(VG||(VG=qC(["\n query GetTasks($where: TaskWhereInput) {\n tasks(where: $where){\n \t totalCount\n edges{\n node{\n execFinishedAt\n outputSize\n }\n }\n }\n }\n"]))),oq=eO(HG||(HG=qC(["\n query GetQuests(\n $where: QuestWhereInput,\n $whereFinishedTask: TaskWhereInput,\n $whereOutputTask: TaskWhereInput,\n $whereErrorTask: TaskWhereInput,\n $firstTask: Int,\n $orderByTask: [TaskOrder!],\n $first: Int,\n $last:Int,\n $after: Cursor,\n $before:Cursor,\n $orderBy: [QuestOrder!]\n ) {\n quests(where: $where, first: $first, last: $last, after: $after, before:$before, orderBy: $orderBy){\n totalCount\n pageInfo{\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n edges{\n node{\n id\n name\n lastUpdatedTask:tasks(first: $firstTask, orderBy: $orderByTask){\n edges{\n node{\n lastModifiedAt\n }\n }\n }\n tasksTotal:tasks{\n totalCount\n }\n tasksOutput:tasks(where: $whereOutputTask){\n totalCount\n }\n tasksError:tasks(where: $whereErrorTask){\n totalCount\n }\n tasksFinished:tasks(where: $whereFinishedTask){\n totalCount\n }\n tome{\n id\n name\n description\n eldritch\n tactic\n paramDefs\n supportModel\n }\n creator {\n id\n name\n photoURL\n isActivated\n isAdmin\n }\n }\n }\n }\n }\n"]))),iq=eO(UG||(UG=qC(["\n query GetTasks($where: TaskWhereInput, $first: Int, $last:Int, $after: Cursor, $before:Cursor, $orderBy: [TaskOrder!]) {\n tasks(where: $where, first: $first, last: $last, after: $after, before:$before, orderBy: $orderBy){\n pageInfo{\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n \t totalCount\n edges{\n node{\n id\n lastModifiedAt\n outputSize\n execStartedAt\n execFinishedAt\n createdAt\n claimedAt\n error\n quest{\n id\n name\n creator{\n id\n name\n photoURL\n }\n tome{\n id\n name\n description\n eldritch\n tactic\n paramDefs\n supportModel\n }\n parameters\n }\n beacon {\n id\n name\n principal\n lastSeenAt\n interval\n host{\n id\n name\n primaryIP\n platform\n tags {\n id\n name\n kind\n }\n }\n }\n }\n }\n }\n }\n"]))),aq=eO(WG||(WG=qC(["\n query GetOutputForTask($where: TaskWhereInput) {\n tasks(where: $where, ){\n \t\t\t\tedges{\n node{\n id\n output\n }\n }\n }\n}"]))),lq=(eO(GG||(GG=qC(["\n query GetSearchFilters($groupTag: TagWhereInput, $serviceTag: TagWhereInput){\n groupTags:tags(where: $groupTag) {\n label:name\n value:id\n id\n name\n kind\n },\n serviceTags:tags(where: $serviceTag) {\n label:name\n value:id\n id\n name\n kind\n },\n beacons{\n label:name\n value:id\n id\n name\n }\n hosts{\n label:name\n value:id\n }\n }\n"]))),["The Lost Tome of Eldoria","Shadows Over Brimstone Village","The Crimson Ritual","Secrets of the Sunken Temple","The Dragon's Hoard Heist","The Cursed Crown of King Maldor","The Whispering Woods Mystery","The Goblins' Hidden Fortress","The Labyrinth of Eternal Echoes","The Ghost Ship of Captain Redbeard","The Siege of Castle Blackthorn","The Enigma of the Arcane Tower","The Plague of Ironvale","The Forgotten Crypt of the Ancient Kings","The Elemental Fury","The Sapphire Phoenix Rebirth","The Ice Queen's Winter Curse","The Siege of the Sky Fortress","The Secret of the Leviathan's Depths","The Necromancer's Dark Army","The Blood Moon Prophecy","The Lost City of Gold","The Revenge of the Fire Witch","The Forbidden Spellbook","The Werewolf's Last Stand","The Treasure of the Sunken Galleon","The Missing Merchant of Silverport","The Haunted Halls of Greyhaven","The Wrath of the Forest Spirits","The Sands of Time Artifact","The Siege of the Undead Citadel","The Pirate King's Hidden Cove","The Cult of the Eclipse","The Guardian of the Crystal Cave","The Ancient Druid's Riddle","The Sorcerer's Stone Legacy","The Beast of the Bitter Peaks","The Relic of the Fallen Paladin","The Enchanted Maze of Mirrors","The Assault on Ogre's Keep","The Demon Lord's Infernal Game","The Mystic Oracle's Vision","The Quest for the Celestial Staff","The Dragonkin Uprising","The Elixir of Eternal Youth","The Conquest of the Shadow Fortress","The Vampire Lord's Masquerade","The Titan's Lost Treasure","The Siege of the Elemental Gates","The Rise of the Lich Emperor","The Orb of Planar Dissonance","The Lost Fleet of the Abyssal Deep","The Shattered Amulet of Prophecy","The Ruins of Skyreach Castle","The Starfallen Meteorite","The Midnight Heist in Shadowgrove","The Banished Warlock's Revenge","The Flames of the Phoenix Forge","The Mirror of Forgotten Dreams","The Serpent's Lair in the Twisted Jungle","The Festival of the Golden Harvest","The Howling Caverns of the Wind Spirits","The Tower of the Timeless Mage","The Eternal Flame of the Fire Temple","The Secret of the Moonstone Monolith","The Unseen Invasion of the Dream Realm","The Siege of the Crystal Spire","The Fallen Star of Eldritch Power","The Hunt for the Dire Wolf Alpha","The Underworld's Dark Bargain","The Trial of the Elemental Champions","The Lost Expedition to the Frozen Wastes","The Enchanted Forest of Eternal Autumn","The Rebellion of the Stone Golems","The Awakening of the Ancient Leviathan","The Curse of the Blood Ruby","The Riddle of the Sphinx Gate","The Wrath of the Storm King","The Sacred Grove of the Moon Druids","The Disappearance of the Silver Swan","The Legend of the Sunken Kingdom","The Quest for the Arcane Codex","The Plight of the Thornwood Dryads","The Invasion of the Shadow Fey","The Secret of the Alchemist's Stone","The Festival of the Lunar Eclipse","The Crypt of the Forgotten Pharaoh","The Siege of the Demon's Bastion","The Battle for the Astral Fortress","The Pursuit of the Chaos Sorcerer","The Hunt for the Sacred Golden Stag","The Return of the Ice Sorceress","The Lost Scrolls of the Celestial Monks","The Nightmare in the Haunted Manor","The Expedition to the Molten Core","The Labyrinth of the Shadow Queen","The Assault on the Goblin King's Lair","The Mystery of the Vanishing Village","The Rise of the Phoenix Cult","The Challenge of the Elemental Lords","The Enigma of the Ebon Orb","The Guardian's Gauntlet","The Gilded Labyrinth","The Forbidden Forest's Heart","The Lost Fleet of the Damned","The Caverns of Echoing Madness","The Siege of the Sunken City","The Ghosts of the Crimson Coast","The Fire Giant's Forge","The Curse of the Blackened Sun","The Rite of the Winter's Warden","The Lost Shrine of the Sea Serpent","The Hidden Temple of the Sky Gods","The Crypts of the Cursed Kings","The Tower of the Mad Alchemist","The Phantom Caravan","The Sunken Ruins of Atlantis","The Desert of Shifting Sands","The Ice Castle of the Frozen King","The Valley of the Lost Titans","The Maze of the Mind Flayer","The Haunting of the Amber Keep","The Wrath of the Red Dragon","The Heist of the Celestial Jewels","The Tomb of the Shadow Pharaoh","The Beast in the Black Bog","The Secret of the Iron Golem","The Siege of the Wraith's Tower","The Lair of the Basilisk","The Festival of the Burning Skies","The Night of the Blood Moon","The Hunt for the Hydra","The Oracle's Prophecy","The Lost City of the Desert Dunes","The Nightmare of the Netherworld","The Forbidden Isle of the Storm Giant","The Treachery of the Dwarven Mines","The Enchantment of the Silver Lake","The War of the Elemental Princes","The Ghost Fleet of the Abyss","The Sorcerer's Secret Sanctum","The Peril of the Poisoned Chalice","The Quest for the Dragon's Heart","The Omen of the Obsidian Tower","The Wrath of the Eldritch Horror","The Harvest of the Haunted Orchard","The Lich's Last Stand","The Awakening of the Sleeping Mountain","The Plague of the Shadowfell","The Jewel of the Jungle King","The Invasion of the Iron Legion","The Mystery of the Moonlit Grove","The Dark Ritual of the Necropolis","The Conclave of the Arcane Order","The Mirage of the Desert Oasis","The Guardian of the Golden Fleece","The Siege of the Celestial Citadel","The Quest for the Crystal Skull","The Rebellion of the Fire Elementals","The Voyage to the Edge of the World","The Return of the Ancient Dragon","The Theft of the Sacred Scepter","The Trial of the Champions","The Pact of the Demon Prince","The Lost Legend of the Silver Sword","The Hunt for the Vampire's Crypt","The Battle of the Sky Pirates","The Ghostly Gallows of the Damned","The Oracle of the Starry Skies","The Awakening of the Stone Giants","The Secret of the Shadowy Depths","The Betrayal of the Royal Court","The Expedition to the Hollow Earth","The Wrath of the Winter Witch","The Curse of the Emerald Eye","The Siege of the Underdark","The Hunt for the Kraken's Lair","The Rescue from the Goblin's Dungeon","The Labyrinth of the Lost Souls","The Disappearance of the Arcane Academy","The Trial by Fire and Ice","The Riddle of the Sphinx's Tomb","The Terror of the Troll King","The Escape from the Enchanted Tower","The Quest for the Phoenix Feather","The Shadow Over the Silver City","The Nightmare of the Nocturnal Forest","The Secret of the Sphinx's Riddle","The Enigma of the Elemental Eye","The Haunting of the Haunted Mansion","The Journey to the Center of the Earth","The Curse of the Crystal Cavern","The Quest for the Golden Dragon","The Secret of the Starlight Grotto","The Plague of the Dark Druids","The Hunt for the Lost Paladin","The Siege of the Serpent's Spire","The Lost Treasures of the Sunken Ship","The Awakening of the Forgotten Gods","The Battle for the Throne of Bones","The Secret of the Sunken Pyramid","The Festival of the Fire Spirits","The Enigma of the Emerald Enclave","The Hunt for the Horned Serpent","The Lost Labyrinth of the Lich Lord","The Ruins of the Ravenous Sphinx","The Ghosts of the Gilded Graveyard","The Curse of the Crystal Dragon","The Siege of the Sapphire City","The Riddle of the Ruby Rose","The Trial of the Thunder Titan","The Wrath of the Winter Wyrm","The Vault of the Voidwalker","The Plague of the Petrified Forest","The Haunting of the Harpy's Haven","The Lair of the Leviathan","The Oracle of the Obsidian Obelisk","The Treasure of the Tidal Temple","The Enchantment of the Eternal Elixir","The Challenge of the Chained Chimeras","The Rebellion of the Runebound Realm","The Nightmare of the Naga Nests","The Secret of the Silver Sarcophagus","The Lost Legacy of the Lunar Lich","The Siege of the Storm Sorcerer's Sanctum","The Quest for the Quicksilver Quill","The Festival of the Frozen Flame","The Awakening of the Ancient Archmage","The Riddle of the Radiant Relic","The Caverns of the Chaos Cult","The Terror of the Twilight Tower","The Hunt for the Hydra's Heart","The Crypt of the Crimson Crown","The Mirage of the Moonlit Mesa","The Enigma of the Enchanted Estate","The Plague of the Primeval Plains","The Mystery of the Mystic Maelstrom","The Rebellion of the Rock Ridge Raiders","The Secret of the Sunfire Sanctuary","The Trial of the Tempest Titan","The Heist of the Heavenly Harp","The Curse of the Celestial Chalice","The Labyrinth of the Lightning Lord","The Assault on the Abyssal Altar","The Quest for the Queen's Quartz","The Wrath of the Warlock's Wraiths","The Enchantment of the Eternal Ember","The Nightmare of the Necromancer's Nook","The Siege of the Sapphire Spire","The Riddle of the Rose Quartz","The Trial of the Twilight Tribunal","The Hunt for the Hollow Hydra","The Crypt of the Crystal Centaur","The Mirage of the Moonstone Monastery","The Enigma of the Enchanted Emerald","The Plague of the Petrified Palace","The Mystery of the Mystic Mirage","The Rebellion of the Rune Raiders","The Secret of the Sunken Sarcophagus","The Trial of the Thunder Throne","The Heist of the Heavenly Horizon","The Curse of the Celestial Comet","The Labyrinth of the Lunar Leviathan","The Assault on the Abyssal Aerie","The Quest for the Queen's Quiver","The Wrath of the Warlock's Wyvern","The Enchantment of the Emerald Eye","The Nightmare of the Netherworld Nexus","The Siege of the Starlight Spire","The Riddle of the Ruby Ring","The Trial of the Tempest Temple","The Hunt for the Haunted Hydra","The Crypt of the Crimson Chimera","The Mirage of the Moonlit Mountain","The Enigma of the Eternal Echelon","The Plague of the Primeval Pyramid","The Mystery of the Mystic Mace","The Rebellion of the Runic Raptor","The Secret of the Sunken Sphinx","The Trial of the Thunder Typhoon","The Heist of the Heavenly Haven","The Curse of the Cosmic Crown","The Labyrinth of the Lunar Lagoon","The Assault on the Arcane Archipelago","The Quest for the Queen's Quasar","The Wrath of the Warlock's Whirlwind","The Enchantment of the Ethereal Eye","The Nightmare of the Netherworld Nymph","The Siege of the Starfall Sanctuary","The Riddle of the Rosewood Relic","The Trial of the Tempest Tyrant","The Hunt for the Helios Hydra","The Crypt of the Celestial Centaur","The Mirage of the Misty Mesa","The Enigma of the Enchanted Elixir","The Plague of the Perilous Pyramid","The Mystery of the Mystic Meteor","The Rebellion of the Rune Revenant","The Secret of the Sunken Statue","The Trial of the Thunderous Titan","The Enigma of the Eternal Eclipse","The Guardian's Gambit","The Gilded Gargoyle's Gauntlet","The Forbidden Fortress's Feud","The Lost Library of the Luminous Lord","The Caverns of the Crimson Cult","The Siege of the Sapphire Sanctum","The Ghosts of the Gloomwood Grove","The Fire Fiend's Folly","The Curse of the Celestial Cyclops","The Rite of the Raging Revenant","The Lost Lagoon of the Leviathan","The Hidden Havens of the Hollow Hills","The Crypts of the Cursed Conclave","The Tower of the Twilight Tyrant","The Phantom Phoenix's Plight","The Sunken Spires of the Silent Sea","The Desert of the Dwindling Dream","The Ice Imp's Icy Incursion","The Valley of the Vanishing Vortex","The Maze of the Mystic Minotaur","The Haunting of the Hollowed Halls","The Wrath of the Withered Wraith","The Heist of the Hallowed Helm","The Tomb of the Twisted Tempest","The Beast in the Blackened Brine","The Secret of the Stone Sentinel","The Siege of the Shadowed Spires","The Lair of the Lurking Lycanthrope","The Festival of the Fiery Fates","The Night of the Nefarious Necromancer","The Hunt for the Hidden Hydra","The Oracle's Ominous Offering","The Lost Legend of the Luminous Lagoon","The Nightmare of the Nether Naiad","The Forbidden Fountain of the Forsaken Forest","The Treachery of the Tumultuous Tides","The Enchantment of the Enshrouded Enclave","The War of the Wandering Warlocks","The Ghostly Gale of the Grim Galleon","The Sorcerer's Secret Sanctum","The Peril of the Prismatic Prism","The Quest for the Quivering Quasar","The Omen of the Opaque Oracle","The Wrath of the Wicked Warlord","The Harvest of the Haunting Harbinger","The Lich's Lurid Legacy","The Awakening of the Abyssal Archon","The Plague of the Petrifying Plague","The Jewel of the Jaded Juggernaut","The Invasion of the Ironclad Imposters","The Mystery of the Moonlit Mirages","The Dark Ritual of the Drowned Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Monolith","The Guardian of the Glowing Grotto","The Siege of the Shimmering Shrine","The Quest for the Quantum Quill","The Rebellion of the Radiant Raiders","The Voyage to the Veiled Vortex","The Return of the Risen Reaver","The Theft of the Timeless Tome","The Trial of the Tempestuous Titans","The Pact of the Perfidious Prince","The Lost Lore of the Languishing Land","The Hunt for the Harrowing Haunt","The Battle of the Baleful Brigands","The Ghostly Guise of the Ghastly Ghouls","The Oracle of the Ominous Oasis","The Awakening of the Ancient Anomaly","The Secret of the Sunken Shadows","The Betrayal of the Blazing Bastion","The Expedition to the Ethereal Expanse","The Wrath of the Withering Witch","The Curse of the Crimson Comet","The Siege of the Subterranean Stronghold","The Hunt for the Horrid Hydra","The Rescue from the Ravenous Raptor","The Labyrinth of the Lost Legion","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resonating Rune","The Terror of the Tyrannical Titan","The Escape from the Ensnaring Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Seraphim","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hallows","The Journey to the Juxtaposed Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctum","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tumultuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Eclipsed Empyrean","The Guardian's Gruesome Game","The Gilded Grotto's Gambit","The Forbidden Fortress's Fable","The Lost Legacy of the Lurid Lich","The Caverns of the Creeping Chimaera","The Siege of the Shrouded Sanctum","The Ghosts of the Grieving Grove","The Fire Fiend's Fable","The Curse of the Cosmic Cyclops","The Rite of the Raging Revenant","The Lost Lighthouse of the Leviathan","The Hidden Havens of the Haunted Hills","The Crypts of the Cursed Cabal","The Tower of the Tenebrous Tyrant","The Phantom Phoenix's Plight","The Sunken Spires of the Silent Sea","The Desert of the Dwindling Dream","The Ice Imp's Icy Incursion","The Valley of the Vanishing Vortex","The Maze of the Mystic Minotaur","The Haunting of the Hollowed Halls","The Wrath of the Withered Wraith","The Heist of the Hallowed Helm","The Tomb of the Twisted Tempest","The Beast in the Blackened Brine","The Secret of the Stone Sentinel","The Siege of the Shadowed Spires","The Lair of the Lurking Lycanthrope","The Festival of the Fiery Fates","The Night of the Nefarious Necromancer","The Hunt for the Hidden Hydra","The Oracle's Ominous Offering","The Lost Legend of the Luminous Lagoon","The Nightmare of the Nether Naiad","The Forbidden Fountain of the Forsaken Forest","The Treachery of the Tumultuous Tides","The Enchantment of the Enshrouded Enclave","The War of the Wandering Warlocks","The Ghostly Gale of the Grim Galleon","The Sorcerer's Secret Sanctum","The Peril of the Prismatic Prism","The Quest for the Quivering Quasar","The Omen of the Opaque Oracle","The Wrath of the Wicked Warlord","The Harvest of the Haunting Harbinger","The Lich's Lurid Legacy","The Awakening of the Abyssal Archon","The Plague of the Petrifying Plague","The Jewel of the Jaded Juggernaut","The Invasion of the Ironclad Imposters","The Mystery of the Moonlit Mirages","The Dark Ritual of the Drowned Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Monolith","The Guardian of the Glowing Grotto","The Siege of the Shimmering Shrine","The Quest for the Quantum Quill","The Rebellion of the Radiant Raiders","The Voyage to the Veiled Vortex","The Return of the Risen Reaver","The Theft of the Timeless Tome","The Trial of the Tempestuous Titans","The Pact of the Perfidious Prince","The Lost Lore of the Languishing Land","The Hunt for the Harrowing Haunt","The Battle of the Baleful Brigands","The Ghostly Guise of the Ghastly Ghouls","The Oracle of the Ominous Oasis","The Awakening of the Ancient Anomaly","The Secret of the Sunken Shadows","The Betrayal of the Blazing Bastion","The Expedition to the Ethereal Expanse","The Wrath of the Withering Witch","The Curse of the Crimson Comet","The Siege of the Subterranean Stronghold","The Hunt for the Horrid Hydra","The Rescue from the Ravenous Raptor","The Labyrinth of the Lost Legion","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resonating Rune","The Terror of the Tyrannical Titan","The Escape from the Ensnaring Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Seraphim","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hallows","The Journey to the Juxtaposed Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctum","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tumultuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Eclipse of the Enchanted Emissary","The Guardian's Grimoire","The Gilded Griffin's Gambit","The Forbidden Fountain's Fury","The Lost Labyrinth of the Lunar Lynx","The Caverns of the Crimson Crown","The Siege of the Starlight Shrine","The Ghosts of the Glistening Glade","The Fire Fissure's Fortune","The Curse of the Crystal Chimera","The Rite of the Roaring Rampart","The Lost Lake of the Luminous Leviathan","The Hidden Haven of the Hallowed Hills","The Crypts of the Cursed Cavalry","The Tower of the Tumultuous Tempest","The Phantom Phoenix's Parade","The Sunken Stones of the Silent Sea","The Desert of the Dancing Dunes","The Ice Idol's Intrigue","The Valley of the Vanquished Vampires","The Maze of the Moonlight Minotaur","The Haunting of the Hollowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Eclipse of the Enchanted Emissary","The Guardian's Grimoire","The Gilded Griffin's Gambit","The Forbidden Fountain's Fury","The Lost Labyrinth of the Lunar Lynx","The Caverns of the Crimson Crown","The Siege of the Starlight Shrine","The Ghosts of the Glistening Glade","The Fire Fissure's Fortune","The Curse of the Crystal Chimera","The Rite of the Roaring Rampart","The Lost Lake of the Luminous Leviathan","The Hidden Haven of the Hallowed Hills","The Crypts of the Cursed Cavalry","The Tower of the Tumultuous Tempest","The Phantom Phoenix's Parade","The Sunken Stones of the Silent Sea","The Desert of the Dancing Dunes","The Ice Idol's Intrigue","The Valley of the Vanquished Vampires","The Maze of the Moonlight Minotaur","The Haunting of the Hollowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Emerald Eye","The Guardian's Glade","The Gilded Golem's Gambit","The Forbidden Forest's Foe","The Lost Legacy of the Labyrinthine Lord","The Caverns of the Crystal Chalice","The Siege of the Sunken Sanctuary","The Ghosts of the Grimwood Grove","The Fire Forge's Folly","The Curse of the Crowned Cobra","The Rite of the Ravenous Rift","The Lost Lighthouse of the Leviathan","The Hidden Hamlet of the Hallowed Hills","The Crypts of the Condemned Cavalry","The Tower of the Tenebrous Tempest","The Phantom Parade of the Phoenix","The Sunken Spires of the Silent Sea","The Desert of the Dreaming Dunes","The Ice Imp's Intrigue","The Valley of the Vanished Vampires","The Maze of the Mystic Minotaur","The Haunting of the Hallowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Emerald Eye","The Guardian's Glade","The Gilded Golem's Gambit","The Forbidden Forest's Foe","The Lost Legacy of the Labyrinthine Lord","The Caverns of the Crystal Chalice","The Siege of the Sunken Sanctuary","The Ghosts of the Grimwood Grove","The Fire Forge's Folly","The Curse of the Crowned Cobra","The Rite of the Ravenous Rift","The Lost Lighthouse of the Leviathan","The Hidden Hamlet of the Hallowed Hills","The Crypts of the Condemned Cavalry","The Tower of the Tenebrous Tempest","The Phantom Parade of the Phoenix","The Sunken Spires of the Silent Sea","The Desert of the Dreaming Dunes","The Ice Idol's Intrigue","The Valley of the Vanished Vampires","The Maze of the Mystic Minotaur","The Haunting of the Hallowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Emerald Eye","The Guardian's Glade","The Gilded Golem's Gambit","The Forbidden Forest's Foe","The Lost Legacy of the Labyrinthine Lord","The Caverns of the Crystal Chalice","The Siege of the Sunken Sanctuary","The Ghosts of the Grimwood Grove","The Fire Forge's Folly","The Curse of the Crowned Cobra","The Rite of the Ravenous Rift","The Lost Lighthouse of the Leviathan","The Hidden Hamlet of the Hallowed Hills","The Crypts of the Condemned Cavalry","The Tower of the Tenebrous Tempest","The Phantom Parade of the Phoenix","The Sunken Spires of the Silent Sea","The Desert of the Dreaming Dunes","The Ice Idol's Intrigue","The Valley of the Vanished Vampires","The Maze of the Mystic Minotaur","The Haunting of the Hallowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Mystery of the Mystic Monolith","The Gloom of the Ghostly Galleon","The Secret of the Sunken Sphinx","The Quest for the Quicksilver Queen","The Wrath of the Wicked Warlock","The Plague of the Petrified Palace","The Rebellion of the Runic Revenant","The Enigma of the Ethereal Emissary","The Siege of the Sunfire Sanctum","The Labyrinth of the Lost Leviathan","The Heist of the Heavenly Horizon","The Omen of the Obsidian Obelisk","The Riddle of the Radiant Relic","The Curse of the Celestial Chalice","The Haunting of the Harpy's Haven","The Guardian of the Golden Grotto","The Voyage to the Vanishing Vortex","The Awakening of the Ancient Archon","The Crypt of the Crimson Crown","The Hunt for the Hydra's Heart","The Trial of the Tempest Tower","The Festival of the Frozen Flame","The Nightmare in the Netherworld","The Treasure of the Tidal Temple","The Enchantment of the Emerald Eye","The Secret of the Silver Sarcophagus","The Challenge of the Chained Chimeras","The Siege of the Serpent's Spire","The Rite of the Radiant Rune","The Plight of the Phantom Phoenix"]);var uq=function(){var e=f_().state,n=ut((0,a.useState)((null===e||void 0===e?void 0:e.step)||0),2),r=n[0],o=n[1],i=function(){var e=ut((0,a.useState)(!1),2),t=e[0],n=e[1],r=d_(),o=JG(eO(ZG||(ZG=qC(["\n mutation CreateQuest ($IDs: [ID!]!, $input: CreateQuestInput!) {\n createQuest(beaconIDs: $IDs, input: $input) {\n id\n }\n }\n "]))),{onCompleted:function(e){var t;r("/tasks/".concat(null===e||void 0===e||null===(t=e.createQuest)||void 0===t?void 0:t.id))},onError:function(e){e&&n(!0)},refetchQueries:[oq,"GetQuests"]}),i=ut(o,2),l=i[0],u=i[1];return{submitQuest:function(e){var t,n,r={},o=gt(e.params);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=h(h({},f({},i.name,i.value)),r)}}catch(u){o.e(u)}finally{o.f()}var a={variables:{IDs:e.beacons,input:{name:null===e||void 0===e?void 0:e.name,tomeID:null===(t=e.tome)||void 0===t?void 0:t.id,parameters:JSON.stringify(r)}}};l(a)},loading:u.loading,error:t,reset:u.reset}}(),l=i.submitQuest,u=function(){var e=lq;return e[Math.floor(Math.random()*e.length)]}(),s=BM({initialValues:{name:(null===e||void 0===e?void 0:e.name)||u,tome:(null===e||void 0===e?void 0:e.tome)||null,params:(null===e||void 0===e?void 0:e.params)||[],beacons:(null===e||void 0===e?void 0:e.beacons)||[]},onSubmit:function(e){return l(e)}});return(0,t.jsx)("form",{id:"create-quest-form",className:"py-6",children:(0,t.jsxs)("div",{className:"grid grid-cols-12",children:[(0,t.jsx)("div",{className:"hidden md:flex col-span-3",children:(0,t.jsx)(ZM,{currStep:r,steps:[{name:"Select agent beacons",description:"Step 1",href:"#",step:0},{name:"Select a tome",description:"Step 2",href:"#",step:1},{name:"Confirm quest details",description:"Step 3",href:"#",step:2}]})}),(0,t.jsx)("div",{className:"col-span-12 md:col-span-9",children:function(e){switch(e){case 0:return(0,t.jsx)(XG,{setCurrStep:o,formik:s});case 1:return(0,t.jsx)(Yz,{setCurrStep:o,formik:s});case 2:return(0,t.jsx)(iB,{setCurrStep:o,formik:s});default:return(0,t.jsx)("div",{children:"An error has occured"})}}(r)})]})})},sq=function(){return(0,t.jsx)(kj,{type:_j.noData,label:"No beacons found",details:"Get started by deploying an imix agent on your target system.",children:(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",onClick:function(){return window.open("https://docs.realm.pub/user-guide/getting-started#start-the-agent","_blank")},children:"See imix docs"})})},cq=function(){var e,n=(0,a.useContext)(Aj),r=n.data,o=n.isLoading,i=n.error;return(0,t.jsxs)(jj,{currNavItem:VC.createQuest,children:[(0,t.jsx)("div",{className:"border-b border-gray-200 pb-6 sm:flex sm:items-center sm:justify-between",children:(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Create new quest"})}),o?(0,t.jsx)(kj,{type:_j.loading,label:"loading beacon info..."}):i?(0,t.jsx)(kj,{type:_j.error,label:"Error loading beacon info"}):null!==r&&void 0!==r&&r.beacons&&(null===r||void 0===r||null===(e=r.beacons)||void 0===e?void 0:e.length)>0?(0,t.jsx)(uq,{}):(0,t.jsx)(sq,{})]})},fq=Uz({displayName:"RepeatClockIcon",path:(0,t.jsxs)("g",{fill:"currentColor",children:[(0,t.jsx)("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),(0,t.jsx)("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})}),dq=Uz({displayName:"TimeIcon",path:(0,t.jsxs)("g",{fill:"currentColor",children:[(0,t.jsx)("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),(0,t.jsx)("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})}),hq=n(2980),pq=n(1774),vq=function(e){var n=e.task;return n.error.length>0?(0,t.jsx)("div",{children:(0,t.jsx)(Xz,{fontSize:"0.8em",size:"large",colorScheme:"red",variant:"solid",children:(0,t.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,t.jsx)(hq,{className:"w-5",color:"white"}),(0,t.jsx)("div",{children:"Error"})]})})}):n.execFinishedAt?(0,t.jsx)("div",{children:(0,t.jsx)(Xz,{fontSize:"0.8em",size:"large",colorScheme:"green",variant:"solid",children:(0,t.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,t.jsx)(pq,{className:"w-5",color:"white"}),(0,t.jsx)("div",{children:"Finished"})]})})}):n.execStartedAt?(0,t.jsx)("div",{children:(0,t.jsx)(Xz,{fontSize:"0.8em",size:"large",colorScheme:"gray",variant:"outline",children:(0,t.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,t.jsx)(fq,{w:4,h:4,color:"gray"}),(0,t.jsx)("div",{children:"In-Progress"})]})})}):(0,t.jsx)("div",{children:(0,t.jsx)(Xz,{fontSize:"0.8em",size:"large",colorScheme:"gray",variant:"outline",children:(0,t.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,t.jsx)(dq,{w:4,h:4,color:"gray"}),(0,t.jsx)("div",{children:"Queued"})]})})})},mq=["htmlWidth","htmlHeight","alt"],gq=fx((function(e,n){var r=e.htmlWidth,o=e.htmlHeight,i=e.alt,a=p(e,mq);return(0,t.jsx)("img",h({width:r,height:o,ref:n,alt:i},a))}));gq.displayName="NativeImage";var yq=["fallbackSrc","fallback","src","srcSet","align","fit","loading","ignoreFallback","crossOrigin","fallbackStrategy","referrerPolicy"];var bq=fx((function(e,n){var r=e.fallbackSrc,o=e.fallback,i=e.src,l=e.srcSet,u=e.align,s=e.fit,c=e.loading,f=e.ignoreFallback,d=e.crossOrigin,v=e.fallbackStrategy,m=void 0===v?"beforeLoadOrError":v,g=e.referrerPolicy,y=p(e,yq),b=null!=c||f||!(void 0!==r||void 0!==o),x=function(e){var t=e.loading,n=e.src,r=e.srcSet,o=e.onLoad,i=e.onError,l=e.crossOrigin,u=e.sizes,s=e.ignoreFallback,c=ut((0,a.useState)("pending"),2),f=c[0],d=c[1];(0,a.useEffect)((function(){d(n?"loading":"pending")}),[n]);var h=(0,a.useRef)(),p=(0,a.useCallback)((function(){if(n){v();var e=new Image;e.src=n,l&&(e.crossOrigin=l),r&&(e.srcset=r),u&&(e.sizes=u),t&&(e.loading=t),e.onload=function(e){v(),d("loaded"),null==o||o(e)},e.onerror=function(e){v(),d("failed"),null==i||i(e)},h.current=e}}),[n,l,r,u,o,i,t]),v=function(){h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return Lr((function(){if(!s)return"loading"===f&&p(),function(){v()}}),[f,p,s]),s?"loaded":f}(h(h({},e),{},{ignoreFallback:b})),w=function(e,t){return"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t}(x,m),S=h({ref:n,objectFit:s,objectPosition:u},b?y:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=gt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(y,["onError","onLoad"]));return w?o||(0,t.jsx)(lx.img,h({as:gq,className:"chakra-image__placeholder",src:r},S)):(0,t.jsx)(lx.img,h({as:gq,src:i,srcSet:l,crossOrigin:d,loading:c,referrerPolicy:g,className:"chakra-image"},S))}));bq.displayName="Image";var xq=function(e){var n,r,o,i,a,l,u,s,c=e.id,f=cj(aq,{variables:{where:{id:c}}}),d=f.loading,h=f.error,p=f.data,v=(null===p||void 0===p||null===(n=p.tasks)||void 0===n||null===(r=n.edges)||void 0===r?void 0:r.length)>0&&null!==p&&void 0!==p&&null!==(o=p.tasks)&&void 0!==o&&null!==(i=o.edges[0])&&void 0!==i&&null!==(a=i.node)&&void 0!==a&&a.output?null===p||void 0===p||null===(l=p.tasks)||void 0===l||null===(u=l.edges[0])||void 0===u||null===(s=u.node)||void 0===s?void 0:s.output:"No output available";return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Output"}),d?(0,t.jsx)(kj,{type:_j.loading,label:"Loading tasks..."}):h?(0,t.jsx)(kj,{type:_j.error,label:"Error loading tasks..."}):(0,t.jsx)("div",{className:"bg-gray-200 rounded-md p-0.5 ",children:(0,t.jsx)(Vz,{text:v,language:"",showLineNumbers:!1,theme:Hz,codeBlock:!0})})]})},wq=function(e){var n=e.error;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Error"}),(0,t.jsx)("div",{className:"bg-gray-200 rounded-md p-0.5 ",children:(0,t.jsx)(Tz,{text:n,language:"",showLineNumbers:!1,theme:Hz,codeBlock:!0})})]})},Sq=function(e){var n=e.isOpen,r=e.setOpen,o=e.children;return(0,t.jsx)(Bk.Root,{show:n,as:a.Fragment,children:(0,t.jsxs)(OC,{as:"div",className:"relative z-10",onClose:r,children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,t.jsx)("div",{className:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-4 ",children:(0,t.jsx)(Bk.Child,{as:a.Fragment,enter:"transform transition ease-in-out duration-500 sm:duration-700",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:(0,t.jsx)(OC.Panel,{className:"pointer-events-auto w-screen max-w-xs md:max-w-md lg:max-w-4xl",children:(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-y-scroll bg-white py-6 shadow-xl",children:[(0,t.jsx)("div",{className:"px-4 sm:px-6",children:(0,t.jsx)("div",{className:"flex w-full justify-end",children:(0,t.jsx)("div",{className:"ml-3 flex h-7 items-center",children:(0,t.jsxs)("button",{type:"button",className:"relative rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:function(){return r(!1)},children:[(0,t.jsx)("span",{className:"absolute -inset-2.5"}),(0,t.jsx)("span",{className:"sr-only",children:"Close panel"}),(0,t.jsx)(LC,{className:"h-6 w-6","aria-hidden":"true"})]})})})}),(0,t.jsx)("div",{className:"relative mt-6 flex-1 px-4 sm:px-6 flex flex-col gap-4",children:o})]})})})})})})]})})},_q=function(e){var n,r,o,i,l,u,s,c,f,d,h,p,v=e.isOpen,m=e.setOpen,g=e.selectedTask,y=d_(),b=new Date((null===g||void 0===g?void 0:g.createdAt)||""),x=new Date((null===g||void 0===g?void 0:g.execFinishedAt)||""),w=new Date((null===g||void 0===g?void 0:g.execStartedAt)||""),S=AN(null===g||void 0===g||null===(n=g.quest)||void 0===n?void 0:n.parameters,null===g||void 0===g||null===(r=g.quest)||void 0===r||null===(o=r.tome)||void 0===o?void 0:o.paramDefs),_=jN(null===g||void 0===g?void 0:g.beacon),k=(0,a.useCallback)((function(){var e,t,n,r=null===g||void 0===g||null===(e=g.beacon)||void 0===e?void 0:e.id,o=null===g||void 0===g||null===(t=g.quest)||void 0===t?void 0:t.tome;y("/createQuest",{state:{step:2,beacons:[r],tome:o,params:S,name:null===g||void 0===g||null===(n=g.quest)||void 0===n?void 0:n.name}})}),[g,y,S]);return(0,t.jsx)(Sq,{isOpen:v,setOpen:m,children:(0,t.jsxs)("div",{className:"relative flex-1 flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-row gap-4 items-center",children:[(0,t.jsx)("h2",{className:"text-3xl font-semibold text-gray-900",children:null===g||void 0===g||null===(i=g.quest)||void 0===i?void 0:i.name}),(0,t.jsx)(vq,{task:g})]}),!_&&(0,t.jsx)("div",{children:(0,t.jsx)(zB,{size:"sm",onClick:function(){return k()},disabled:_,title:"Beacon must be online to rerun",children:"Re-run task"})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl",children:"Status"}),(0,t.jsxs)("div",{className:"flex flex-row gap-4 sm:gap-12 text-sm mx-4",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Created"}),(0,t.jsx)("span",{children:"".concat(b.toLocaleTimeString())}),(0,t.jsx)("span",{children:"on ".concat(b.toDateString())})]}),(null===g||void 0===g?void 0:g.execStartedAt)&&(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Started"}),(0,t.jsx)("span",{children:"".concat(w.toLocaleTimeString())}),(0,t.jsx)("span",{children:"on ".concat(w.toDateString())})]}),(null===g||void 0===g?void 0:g.execFinishedAt)&&(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Finished"}),(0,t.jsx)("span",{children:"".concat(x.toLocaleTimeString())}),(0,t.jsx)("span",{children:"on ".concat(x.toDateString())})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Beacon"}),(0,t.jsx)("div",{className:"mx-4",children:(0,t.jsx)(Jz,{beaconData:null===g||void 0===g?void 0:g.beacon})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Tome"}),(0,t.jsx)(oB,{tome:null===g||void 0===g||null===(l=g.quest)||void 0===l?void 0:l.tome,params:S})]}),(null===g||void 0===g||null===(u=g.quest)||void 0===u?void 0:u.creator)&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Creator"}),(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center mx-4",children:[(0,t.jsx)(bq,{borderRadius:"full",boxSize:"20px",src:null===g||void 0===g||null===(s=g.quest)||void 0===s||null===(c=s.creator)||void 0===c?void 0:c.photoURL,alt:"Profile of ".concat(null===g||void 0===g||null===(f=g.quest)||void 0===f||null===(d=f.creator)||void 0===d?void 0:d.name)}),(0,t.jsx)("div",{className:"text-sm flex flex-row gap-1 items-center text-gray-600",children:null===g||void 0===g||null===(h=g.quest)||void 0===h||null===(p=h.creator)||void 0===p?void 0:p.name})]})]}),g&&g.error.length>0&&(0,t.jsx)(wq,{error:g.error}),g&&(null===g||void 0===g?void 0:g.id)&&(0,t.jsx)(xq,{id:g.id})]})})},kq={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function Tq(e,t,n,r){var o=kf(n);return(0,a.useEffect)((function(){var i="function"===typeof e?e():null!=e?e:document;if(n&&i)return i.addEventListener(t,o,r),function(){i.removeEventListener(t,o,r)}}),[t,e,r,o,n]),function(){var n="function"===typeof e?e():null!=e?e:document;null==n||n.removeEventListener(t,o,r)}}var Cq=function(e,t){return{var:e,varRef:t?"var(".concat(e,", ").concat(t,")"):"var(".concat(e,")")}},Eq={arrowShadowColor:Cq("--popper-arrow-shadow-color"),arrowSize:Cq("--popper-arrow-size","8px"),arrowSizeHalf:Cq("--popper-arrow-size-half"),arrowBg:Cq("--popper-arrow-bg"),transformOrigin:Cq("--popper-transform-origin"),arrowOffset:Cq("--popper-arrow-offset")};var Oq={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},jq={scroll:!0,resize:!0};function Pq(e){return"object"===typeof e?{enabled:!0,options:h(h({},jq),e)}:{enabled:e,options:jq}}var Aq={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;t.styles.popper.width="".concat(t.rects.reference.width,"px")},effect:function(e){var t=e.state;return function(){var e=t.elements.reference;t.elements.popper.style.width="".concat(e.offsetWidth,"px")}}},Rq={name:"transformOrigin",enabled:!0,phase:"write",fn:function(e){var t=e.state;Iq(t)},effect:function(e){var t=e.state;return function(){Iq(t)}}},Iq=function(e){var t;e.elements.popper.style.setProperty(Eq.transformOrigin.var,(t=e.placement,Oq[t]))},Mq={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:function(e){var t=e.state;Nq(t)}},Nq=function(e){var t;if(e.placement){var n=Dq(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&n){var r,o;Object.assign(e.elements.arrow.style,(f(r={},n.property,n.value),f(r,"width",Eq.arrowSize.varRef),f(r,"height",Eq.arrowSize.varRef),f(r,"zIndex",-1),r));var i=(f(o={},Eq.arrowSizeHalf.var,"calc(".concat(Eq.arrowSize.varRef," / 2)")),f(o,Eq.arrowOffset.var,"calc(".concat(Eq.arrowSizeHalf.varRef," * -1)")),o);for(var a in i)e.elements.arrow.style.setProperty(a,i[a])}}},Dq=function(e){return e.startsWith("top")?{property:"bottom",value:Eq.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:Eq.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:Eq.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:Eq.arrowOffset.varRef}:void 0},Lq={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:function(e){var t=e.state;Fq(t)},effect:function(e){var t=e.state;return function(){Fq(t)}}},Fq=function(e){if(e.elements.arrow){var t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(t){var n,r=(n=e.placement).includes("top")?"1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("bottom")?"-1px -1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("right")?"-1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("left")?"1px -1px 1px 0 var(--popper-arrow-shadow-color)":void 0;r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:Eq.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})}}},zq={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Bq={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Vq(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Hq(e){return e instanceof Vq(e).Element||e instanceof Element}function Uq(e){return e instanceof Vq(e).HTMLElement||e instanceof HTMLElement}function Wq(e){return"undefined"!==typeof ShadowRoot&&(e instanceof Vq(e).ShadowRoot||e instanceof ShadowRoot)}var Gq=Math.max,qq=Math.min,Qq=Math.round;function $q(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Yq(){return!/^((?!chrome|android).)*safari/i.test($q())}function Kq(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Uq(e)&&(o=e.offsetWidth>0&&Qq(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Qq(r.height)/e.offsetHeight||1);var a=(Hq(e)?Vq(e):window).visualViewport,l=!Yq()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,s=(r.top+(l&&a?a.offsetTop:0))/i,c=r.width/o,f=r.height/i;return{width:c,height:f,top:s,right:u+c,bottom:s+f,left:u,x:u,y:s}}function Xq(e){var t=Vq(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Jq(e){return e?(e.nodeName||"").toLowerCase():null}function Zq(e){return((Hq(e)?e.ownerDocument:e.document)||window.document).documentElement}function eQ(e){return Kq(Zq(e)).left+Xq(e).scrollLeft}function tQ(e){return Vq(e).getComputedStyle(e)}function nQ(e){var t=tQ(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function rQ(e,t,n){void 0===n&&(n=!1);var r=Uq(t),o=Uq(t)&&function(e){var t=e.getBoundingClientRect(),n=Qq(t.width)/e.offsetWidth||1,r=Qq(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Zq(t),a=Kq(e,o,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==Jq(t)||nQ(i))&&(l=function(e){return e!==Vq(e)&&Uq(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Xq(e);var t}(t)),Uq(t)?((u=Kq(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=eQ(i))),{x:a.left+l.scrollLeft-u.x,y:a.top+l.scrollTop-u.y,width:a.width,height:a.height}}function oQ(e){var t=Kq(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function iQ(e){return"html"===Jq(e)?e:e.assignedSlot||e.parentNode||(Wq(e)?e.host:null)||Zq(e)}function aQ(e){return["html","body","#document"].indexOf(Jq(e))>=0?e.ownerDocument.body:Uq(e)&&nQ(e)?e:aQ(iQ(e))}function lQ(e,t){var n;void 0===t&&(t=[]);var r=aQ(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Vq(r),a=o?[i].concat(i.visualViewport||[],nQ(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(lQ(iQ(a)))}function uQ(e){return["table","td","th"].indexOf(Jq(e))>=0}function sQ(e){return Uq(e)&&"fixed"!==tQ(e).position?e.offsetParent:null}function cQ(e){for(var t=Vq(e),n=sQ(e);n&&uQ(n)&&"static"===tQ(n).position;)n=sQ(n);return n&&("html"===Jq(n)||"body"===Jq(n)&&"static"===tQ(n).position)?t:n||function(e){var t=/firefox/i.test($q());if(/Trident/i.test($q())&&Uq(e)&&"fixed"===tQ(e).position)return null;var n=iQ(e);for(Wq(n)&&(n=n.host);Uq(n)&&["html","body"].indexOf(Jq(n))<0;){var r=tQ(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var fQ="top",dQ="bottom",hQ="right",pQ="left",vQ="auto",mQ=[fQ,dQ,hQ,pQ],gQ="start",yQ="end",bQ="clippingParents",xQ="viewport",wQ="popper",SQ="reference",_Q=mQ.reduce((function(e,t){return e.concat([t+"-"+gQ,t+"-"+yQ])}),[]),kQ=[].concat(mQ,[vQ]).reduce((function(e,t){return e.concat([t,t+"-"+gQ,t+"-"+yQ])}),[]),TQ=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function CQ(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function EQ(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var OQ={placement:"bottom",modifiers:[],strategy:"absolute"};function jQ(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function DQ(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?IQ(o):null,a=o?MQ(o):null,l=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case fQ:t={x:l,y:n.y-r.height};break;case dQ:t={x:l,y:n.y+n.height};break;case hQ:t={x:n.x+n.width,y:u};break;case pQ:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=i?NQ(i):null;if(null!=s){var c="y"===s?"height":"width";switch(a){case gQ:t[s]=t[s]-(n[c]/2-r[c]/2);break;case yQ:t[s]=t[s]+(n[c]/2-r[c]/2)}}return t}var LQ={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=DQ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},FQ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zQ(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,s=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=a.x,h=void 0===d?0:d,p=a.y,v=void 0===p?0:p,m="function"===typeof c?c({x:h,y:v}):{x:h,y:v};h=m.x,v=m.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=pQ,x=fQ,w=window;if(s){var S=cQ(n),_="clientHeight",k="clientWidth";if(S===Vq(n)&&"static"!==tQ(S=Zq(n)).position&&"absolute"===l&&(_="scrollHeight",k="scrollWidth"),o===fQ||(o===pQ||o===hQ)&&i===yQ)x=dQ,v-=(f&&S===w&&w.visualViewport?w.visualViewport.height:S[_])-r.height,v*=u?1:-1;if(o===pQ||(o===fQ||o===dQ)&&i===yQ)b=hQ,h-=(f&&S===w&&w.visualViewport?w.visualViewport.width:S[k])-r.width,h*=u?1:-1}var T,C=Object.assign({position:l},s&&FQ),E=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:Qq(t*r)/r||0,y:Qq(n*r)/r||0}}({x:h,y:v}):{x:h,y:v};return h=E.x,v=E.y,u?Object.assign({},C,((T={})[x]=y?"0":"",T[b]=g?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",T)):Object.assign({},C,((t={})[x]=y?v+"px":"",t[b]=g?h+"px":"",t.transform="",t))}var BQ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,l=n.roundOffsets,u=void 0===l||l,s={placement:IQ(t.placement),variation:MQ(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,zQ(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,zQ(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var VQ={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Uq(o)&&Jq(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Uq(r)&&Jq(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var HQ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=kQ.reduce((function(e,n){return e[n]=function(e,t,n){var r=IQ(e),o=[pQ,fQ].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*o,[pQ,hQ].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}(n,t.rects,i),e}),{}),l=a[t.placement],u=l.x,s=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=s),t.modifiersData[r]=a}},UQ={left:"right",right:"left",bottom:"top",top:"bottom"};function WQ(e){return e.replace(/left|right|bottom|top/g,(function(e){return UQ[e]}))}var GQ={start:"end",end:"start"};function qQ(e){return e.replace(/start|end/g,(function(e){return GQ[e]}))}function QQ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Wq(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $Q(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function YQ(e,t,n){return t===xQ?$Q(function(e,t){var n=Vq(e),r=Zq(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;var s=Yq();(s||!s&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l+eQ(e),y:u}}(e,n)):Hq(t)?function(e,t){var n=Kq(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):$Q(function(e){var t,n=Zq(e),r=Xq(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Gq(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Gq(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+eQ(e),u=-r.scrollTop;return"rtl"===tQ(o||n).direction&&(l+=Gq(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:u}}(Zq(e)))}function KQ(e,t,n,r){var o="clippingParents"===t?function(e){var t=lQ(iQ(e)),n=["absolute","fixed"].indexOf(tQ(e).position)>=0&&Uq(e)?cQ(e):e;return Hq(n)?t.filter((function(e){return Hq(e)&&QQ(e,n)&&"body"!==Jq(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce((function(t,n){var o=YQ(e,n,r);return t.top=Gq(o.top,t.top),t.right=qq(o.right,t.right),t.bottom=qq(o.bottom,t.bottom),t.left=Gq(o.left,t.left),t}),YQ(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function XQ(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function JQ(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ZQ(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,l=n.boundary,u=void 0===l?bQ:l,s=n.rootBoundary,c=void 0===s?xQ:s,f=n.elementContext,d=void 0===f?wQ:f,h=n.altBoundary,p=void 0!==h&&h,v=n.padding,m=void 0===v?0:v,g=XQ("number"!==typeof m?m:JQ(m,mQ)),y=d===wQ?SQ:wQ,b=e.rects.popper,x=e.elements[p?y:d],w=KQ(Hq(x)?x:x.contextElement||Zq(e.elements.popper),u,c,a),S=Kq(e.elements.reference),_=DQ({reference:S,element:b,strategy:"absolute",placement:o}),k=$Q(Object.assign({},b,_)),T=d===wQ?k:S,C={top:w.top-T.top+g.top,bottom:T.bottom-w.bottom+g.bottom,left:w.left-T.left+g.left,right:T.right-w.right+g.right},E=e.modifiersData.offset;if(d===wQ&&E){var O=E[o];Object.keys(C).forEach((function(e){var t=[hQ,dQ].indexOf(e)>=0?1:-1,n=[fQ,dQ].indexOf(e)>=0?"y":"x";C[e]+=O[n]*t}))}return C}var e$={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0===a||a,u=n.fallbackPlacements,s=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,v=n.allowedAutoPlacements,m=t.options.placement,g=IQ(m),y=u||(g===m||!p?[WQ(m)]:function(e){if(IQ(e)===vQ)return[];var t=WQ(e);return[qQ(e),t,qQ(t)]}(m)),b=[m].concat(y).reduce((function(e,n){return e.concat(IQ(n)===vQ?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,s=void 0===u?kQ:u,c=MQ(r),f=c?l?_Q:_Q.filter((function(e){return MQ(e)===c})):mQ,d=f.filter((function(e){return s.indexOf(e)>=0}));0===d.length&&(d=f);var h=d.reduce((function(t,n){return t[n]=ZQ(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[IQ(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:c,rootBoundary:f,padding:s,flipVariations:p,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,w=t.rects.popper,S=new Map,_=!0,k=b[0],T=0;T=0,P=j?"width":"height",A=ZQ(t,{placement:C,boundary:c,rootBoundary:f,altBoundary:d,padding:s}),R=j?O?hQ:pQ:O?dQ:fQ;x[P]>w[P]&&(R=WQ(R));var I=WQ(R),M=[];if(i&&M.push(A[E]<=0),l&&M.push(A[R]<=0,A[I]<=0),M.every((function(e){return e}))){k=C,_=!1;break}S.set(C,M)}if(_)for(var N=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},D=p?3:1;D>0;D--){if("break"===N(D))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function t$(e,t,n){return Gq(e,qq(t,n))}var n$={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0!==a&&a,u=n.boundary,s=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,h=void 0===d||d,p=n.tetherOffset,v=void 0===p?0:p,m=ZQ(t,{boundary:u,rootBoundary:s,padding:f,altBoundary:c}),g=IQ(t.placement),y=MQ(t.placement),b=!y,x=NQ(g),w="x"===x?"y":"x",S=t.modifiersData.popperOffsets,_=t.rects.reference,k=t.rects.popper,T="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,C="number"===typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(i){var j,P="y"===x?fQ:pQ,A="y"===x?dQ:hQ,R="y"===x?"height":"width",I=S[x],M=I+m[P],N=I-m[A],D=h?-k[R]/2:0,L=y===gQ?_[R]:k[R],F=y===gQ?-k[R]:-_[R],z=t.elements.arrow,B=h&&z?oQ(z):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[P],U=V[A],W=t$(0,_[R],B[R]),G=b?_[R]/2-D-W-H-C.mainAxis:L-W-H-C.mainAxis,q=b?-_[R]/2+D+W+U+C.mainAxis:F+W+U+C.mainAxis,Q=t.elements.arrow&&cQ(t.elements.arrow),$=Q?"y"===x?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(j=null==E?void 0:E[x])?j:0,K=I+q-Y,X=t$(h?qq(M,I+G-Y-$):M,I,h?Gq(N,K):N);S[x]=X,O[x]=X-I}if(l){var J,Z="x"===x?fQ:pQ,ee="x"===x?dQ:hQ,te=S[w],ne="y"===w?"height":"width",re=te+m[Z],oe=te-m[ee],ie=-1!==[fQ,pQ].indexOf(g),ae=null!=(J=null==E?void 0:E[w])?J:0,le=ie?re:te-_[ne]-k[ne]-ae+C.altAxis,ue=ie?te+_[ne]+k[ne]-ae-C.altAxis:oe,se=h&&ie?function(e,t,n){var r=t$(e,t,n);return r>n?n:r}(le,te,ue):t$(h?le:re,te,h?ue:oe);S[w]=se,O[w]=se-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]},r$=function(e,t){return XQ("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:JQ(e,mQ))};var o$={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=IQ(n.placement),u=NQ(l),s=[pQ,hQ].indexOf(l)>=0?"height":"width";if(i&&a){var c=r$(o.padding,n),f=oQ(i),d="y"===u?fQ:pQ,h="y"===u?dQ:hQ,p=n.rects.reference[s]+n.rects.reference[u]-a[u]-n.rects.popper[s],v=a[u]-n.rects.reference[u],m=cQ(i),g=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=p/2-v/2,b=c[d],x=g-f[s]-c[h],w=g/2-f[s]/2+y,S=t$(b,w,x),_=u;n.modifiersData[r]=((t={})[_]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&QQ(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function i$(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function a$(e){return[fQ,hQ,dQ,pQ].some((function(t){return e[t]>=0}))}var l$={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ZQ(t,{elementContext:"reference"}),l=ZQ(t,{altBoundary:!0}),u=i$(a,r),s=i$(l,o,i),c=a$(u),f=a$(s);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}},u$=PQ({defaultModifiers:[RQ,LQ,BQ,VQ,HQ,e$,n$,o$,l$]}),s$=["size","shadowColor","bg","style"];function c$(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,r=e.modifiers,o=e.placement,i=void 0===o?"bottom":o,l=e.strategy,u=void 0===l?"absolute":l,s=e.arrowPadding,c=void 0===s?8:s,f=e.eventListeners,d=void 0===f||f,v=e.offset,m=e.gutter,g=void 0===m?8:m,y=e.flip,b=void 0===y||y,x=e.boundary,w=void 0===x?"clippingParents":x,S=e.preventOverflow,_=void 0===S||S,k=e.matchWidth,T=e.direction,C=void 0===T?"ltr":T,E=(0,a.useRef)(null),O=(0,a.useRef)(null),j=(0,a.useRef)(null),P=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr",o=(null==(t=zq[e])?void 0:t[r])||e;return"ltr"===r?o:null!=(n=Bq[e])?n:o}(i,C),A=(0,a.useRef)((function(){})),R=(0,a.useCallback)((function(){var e;n&&E.current&&O.current&&(null==(e=A.current)||e.call(A),j.current=u$(E.current,O.current,{placement:P,modifiers:[Lq,Mq,Rq,h(h({},Aq),{},{enabled:!!k}),h({name:"eventListeners"},Pq(d)),{name:"arrow",options:{padding:c}},{name:"offset",options:{offset:null!=v?v:[0,g]}},{name:"flip",enabled:!!b,options:{padding:8}},{name:"preventOverflow",enabled:!!_,options:{boundary:w}}].concat(bt(null!=r?r:[])),strategy:u}),j.current.forceUpdate(),A.current=j.current.destroy)}),[P,n,r,k,d,c,v,g,b,_,w,u]);(0,a.useEffect)((function(){return function(){var e;E.current||O.current||(null==(e=j.current)||e.destroy(),j.current=null)}}),[]);var I=(0,a.useCallback)((function(e){E.current=e,R()}),[R]),M=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:nN(I,e)})}),[I]),N=(0,a.useCallback)((function(e){O.current=e,R()}),[R]),D=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:nN(N,t),style:h(h({},e.style),{},{position:u,minWidth:k?void 0:"max-content",inset:"0 auto auto 0"})})}),[u,N,k]),L=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.size,e.shadowColor,e.bg,e.style;return h(h({},p(e,s$)),{},{ref:t,"data-popper-arrow":"",style:f$(e)})}),[]),F=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:e,"data-popper-arrow-inner":""})}),[]);return{update:function(){var e;null==(e=j.current)||e.update()},forceUpdate:function(){var e;null==(e=j.current)||e.forceUpdate()},transformOrigin:Eq.transformOrigin.varRef,referenceRef:I,popperRef:N,getPopperProps:D,getArrowProps:L,getArrowInnerProps:F,getReferenceProps:M}}function f$(e){var t=e.size,n=e.shadowColor,r=e.bg,o=h(h({},e.style),{},{position:"absolute"});return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}var d$=["openDelay","closeDelay","closeOnClick","closeOnMouseDown","closeOnScroll","closeOnPointerDown","closeOnEsc","onOpen","onClose","placement","id","isOpen","defaultIsOpen","arrowSize","arrowShadowColor","arrowPadding","modifiers","isDisabled","gutter","offset","direction"],h$=function(e){var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},p$=function(e){var t,n;return(null==(n=null==(t=e.current)?void 0:t.ownerDocument)?void 0:n.defaultView)||window};function v$(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.openDelay,n=void 0===t?0:t,r=e.closeDelay,o=void 0===r?0:r,i=e.closeOnClick,l=void 0===i||i,u=e.closeOnMouseDown,s=e.closeOnScroll,c=e.closeOnPointerDown,d=void 0===c?u:c,v=e.closeOnEsc,m=void 0===v||v,g=e.onOpen,y=e.onClose,b=e.placement,x=e.id,w=e.isOpen,S=e.defaultIsOpen,_=e.arrowSize,k=void 0===_?10:_,T=e.arrowShadowColor,C=e.arrowPadding,E=e.modifiers,O=e.isDisabled,j=e.gutter,P=e.offset,A=e.direction,R=p(e,d$),I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClose,n=e.onOpen,r=e.isOpen,o=e.id,i=kf(n),l=kf(t),u=ut((0,a.useState)(e.defaultIsOpen||!1),2),s=u[0],c=u[1],f=void 0!==r?r:s,d=void 0!==r,p=(0,a.useId)(),v=null!=o?o:"disclosure-".concat(p),m=(0,a.useCallback)((function(){d||c(!1),null==l||l()}),[d,l]),g=(0,a.useCallback)((function(){d||c(!0),null==i||i()}),[d,i]),y=(0,a.useCallback)((function(){f?m():g()}),[f,g,m]);return{isOpen:f,onOpen:g,onClose:m,onToggle:y,isControlled:d,getButtonProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(h({},e),{},{"aria-expanded":f,"aria-controls":v,onClick:function(t){var n;null==(n=e.onClick)||n.call(e,t),y()}})},getDisclosureProps:function(){return h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{hidden:!f,id:v})}}}({isOpen:w,defaultIsOpen:S,onOpen:g,onClose:y}),M=I.isOpen,N=I.onOpen,D=I.onClose,L=c$({enabled:M,placement:b,arrowPadding:C,modifiers:E,gutter:j,offset:P,direction:A}),F=L.referenceRef,z=L.getPopperProps,B=L.getArrowInnerProps,V=L.getArrowProps,H=(0,a.useId)(),U="tooltip-".concat(null!=x?x:H),W=(0,a.useRef)(null),G=(0,a.useRef)(),q=(0,a.useCallback)((function(){G.current&&(clearTimeout(G.current),G.current=void 0)}),[]),Q=(0,a.useRef)(),$=(0,a.useCallback)((function(){Q.current&&(clearTimeout(Q.current),Q.current=void 0)}),[]),Y=(0,a.useCallback)((function(){$(),D()}),[D,$]),K=function(e,t){return(0,a.useEffect)((function(){var n=h$(e);return n.addEventListener(m$,t),function(){return n.removeEventListener(m$,t)}}),[t,e]),function(){var t=h$(e),n=p$(e);t.dispatchEvent(new n.CustomEvent(m$))}}(W,Y),X=(0,a.useCallback)((function(){if(!O&&!G.current){K();var e=p$(W);G.current=e.setTimeout(N,n)}}),[K,O,N,n]),J=(0,a.useCallback)((function(){q();var e=p$(W);Q.current=e.setTimeout(Y,o)}),[o,Y,q]),Z=(0,a.useCallback)((function(){M&&l&&J()}),[l,J,M]),ee=(0,a.useCallback)((function(){M&&d&&J()}),[d,J,M]),te=(0,a.useCallback)((function(e){M&&"Escape"===e.key&&J()}),[M,J]);Tq((function(){return h$(W)}),"keydown",m?te:void 0),Tq((function(){return h$(W)}),"scroll",(function(){M&&s&&Y()})),(0,a.useEffect)((function(){O&&(q(),M&&D())}),[O,M,D,q]),(0,a.useEffect)((function(){return function(){q(),$()}}),[q,$]),Tq((function(){return W.current}),"pointerleave",J);var ne=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:nN(W,t,F),onPointerEnter:At(e.onPointerEnter,(function(e){"touch"!==e.pointerType&&X()})),onClick:At(e.onClick,Z),onPointerDown:At(e.onPointerDown,ee),onFocus:At(e.onFocus,X),onBlur:At(e.onBlur,J),"aria-describedby":M?U:void 0})}),[X,J,ee,M,U,Z,F]),re=(0,a.useCallback)((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return z(h(h({},t),{},{style:h(h({},t.style),{},(e={},f(e,Eq.arrowSize.var,k?"".concat(k,"px"):void 0),f(e,Eq.arrowShadowColor.var,T),e))}),n)}),[z,k,T]),oe=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=h(h({},e.style),{},{position:"relative",transformOrigin:Eq.transformOrigin.varRef});return h(h(h({ref:t},R),e),{},{id:U,role:"tooltip",style:n})}),[R,U]);return{isOpen:M,show:X,hide:J,getTriggerProps:ne,getTooltipProps:oe,getTooltipPositionerProps:re,getArrowProps:V,getArrowInnerProps:B}}var m$="chakra-ui:close-tooltip";var g$=["children","label","shouldWrapChildren","aria-label","hasArrow","bg","portalProps","background","backgroundColor","bgColor","motionProps"];var y$=lx(Bb.div),b$=fx((function(e,n){var r,o,i=gx("Tooltip",e),l=Sr(e),u=dx(),s=l.children,c=l.label,f=l.shouldWrapChildren,d=l["aria-label"],v=l.hasArrow,m=l.bg,g=l.portalProps,y=l.background,b=l.backgroundColor,x=l.bgColor,w=l.motionProps,S=p(l,g$),_=null!=(o=null!=(r=null!=y?y:b)?r:m)?o:x;if(_){i.bg=_;var k=function(e,t,n){var r,o,i;return null!=(i=null==(o=null==(r=e.__cssMap)?void 0:r["".concat(t,".").concat(n)])?void 0:o.varRef)?i:n}(u,"colors",_);i[Eq.arrowBg.var]=k}var T,C=v$(h(h({},S),{},{direction:u.direction}));if("string"===typeof s||f)T=(0,t.jsx)(lx.span,h(h({display:"inline-block",tabIndex:0},C.getTriggerProps()),{},{children:s}));else{var E=a.Children.only(s);T=(0,a.cloneElement)(E,C.getTriggerProps(E.props,E.ref))}var O=!!d,j=C.getTooltipProps({},n),P=O?function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=gt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(j,["role","id"]):j,A=function(e,t){var n,r={},o=gt(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;i in e&&(r[i]=e[i])}}catch(a){o.e(a)}finally{o.f()}return r}(j,["role","id"]);return c?(0,t.jsxs)(t.Fragment,{children:[T,(0,t.jsx)(Yx,{children:C.isOpen&&(0,t.jsx)(iw,h(h({},g),{},{children:(0,t.jsx)(lx.div,h(h({},C.getTooltipPositionerProps()),{},{__css:{zIndex:i.zIndex,pointerEvents:"none"},children:(0,t.jsxs)(y$,h(h(h({variants:kq,initial:"exit",animate:"enter",exit:"exit"},w),P),{},{__css:i,children:[c,O&&(0,t.jsx)(lx.span,h(h({srOnly:!0},A),{},{children:d})),v&&(0,t.jsx)(lx.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,t.jsx)(lx.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]}))}))}))})]}):(0,t.jsx)(t.Fragment,{children:s})}));function x$(e,t){return"function"===typeof e?e(t):e}function w$(e,t){return function(n){t.setState((function(t){return h(h({},t),{},f({},e,x$(n,t[e])))}))}}function S$(e){return e instanceof Function}function _$(e,t){var n=[];return function e(r){r.forEach((function(r){n.push(r);var o=t(r);null!=o&&o.length&&e(o)}))}(e),n}function k$(e,t,n){var r,o=[];return function(){var i;n.key&&n.debug&&(i=Date.now());var a,l=e(),u=l.length!==o.length||l.some((function(e,t){return o[t]!==e}));if(!u)return r;if(o=l,n.key&&n.debug&&(a=Date.now()),r=t.apply(void 0,bt(l)),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){var s=Math.round(100*(Date.now()-i))/100,c=Math.round(100*(Date.now()-a))/100,f=c/16,d=function(e,t){for(e=String(e);e.length0&&e(a,o-1)}(u,a-1),l.reverse();return function e(t){return t.filter((function(e){return e.column.getIsVisible()})).map((function(t){var n=0,r=0,o=[0];return t.subHeaders&&t.subHeaders.length?(o=[],e(t.subHeaders).forEach((function(e){var t=e.colSpan,r=e.rowSpan;n+=t,o.push(r)}))):n=1,r+=Math.min.apply(Math,bt(o)),t.colSpan=n,t.rowSpan=r,{colSpan:n,rowSpan:r}}))}(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}var O$={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},j$={getDefaultColumnDef:function(){return O$},getInitialState:function(e){return h({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}},e)},getDefaultOptions:function(e){return{columnResizeMode:"onEnd",onColumnSizingChange:w$("columnSizing",e),onColumnSizingInfoChange:w$("columnSizingInfo",e)}},createColumn:function(e,t){return{getSize:function(){var n,r,o,i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:O$.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:O$.size),null!=(o=e.columnDef.maxSize)?o:O$.maxSize)},getStart:function(n){var r=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=r.findIndex((function(t){return t.id===e.id}));if(o>0){var i=r[o-1];return i.getStart(n)+i.getSize()}return 0},resetSize:function(){t.setColumnSizing((function(t){var n=e.id;t[n];return p(t,[n].map(c))}))},getCanResize:function(){var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},getIsResizing:function(){return t.getState().columnSizingInfo.isResizingColumn===e.id}}},createHeader:function(e,t){return{getSize:function(){var t=0;return function e(n){var r;n.subHeaders.length?n.subHeaders.forEach(e):t+=null!=(r=n.column.getSize())?r:0}(e),t},getStart:function(){if(e.index>0){var t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:function(){var n=t.getColumn(e.column.id),r=null==n?void 0:n.getCanResize();return function(o){if(n&&r&&(null==o.persist||o.persist(),!(A$(o)&&o.touches&&o.touches.length>1))){var i=e.getSize(),a=e?e.getLeafHeaders().map((function(e){return[e.column.id,e.column.getSize()]})):[[n.id,n.getSize()]],l=A$(o)?Math.round(o.touches[0].clientX):o.clientX,u={},s=function(e,n){"number"===typeof n&&(t.setColumnSizingInfo((function(e){var t,r,o=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(o/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((function(e){var t=ut(e,2),n=t[0],r=t[1];u[n]=Math.round(100*Math.max(r+r*i,0))/100})),h(h({},e),{},{deltaOffset:o,deltaPercentage:i})})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((function(e){return h(h({},e),u)})))},c=function(e){return s("move",e)},f=function(e){s("end",e),t.setColumnSizingInfo((function(e){return h(h({},e),{},{isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})}))},d={moveHandler:function(e){return c(e.clientX)},upHandler:function(e){document.removeEventListener("mousemove",d.moveHandler),document.removeEventListener("mouseup",d.upHandler),f(e.clientX)}},p={moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1},upHandler:function(e){var t;document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},v=!!function(){if("boolean"===typeof P$)return P$;var e=!1;try{var t={get passive(){return e=!0,!1}},n=function(){};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(r){e=!1}return P$=e}()&&{passive:!1};A$(o)?(document.addEventListener("touchmove",p.moveHandler,v),document.addEventListener("touchend",p.upHandler,v)):(document.addEventListener("mousemove",d.moveHandler,v),document.addEventListener("mouseup",d.upHandler,v)),t.setColumnSizingInfo((function(e){return h(h({},e),{},{startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:n.id})}))}}}}},createTable:function(e){return{setColumnSizing:function(t){return null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t)},setColumnSizingInfo:function(t){return null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t)},resetColumnSizing:function(t){var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:function(t){var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:function(){var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getLeftTotalSize:function(){var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getCenterTotalSize:function(){var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getRightTotalSize:function(){var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0}}}},P$=null;function A$(e){return"touchstart"===e.type}var R$={getInitialState:function(e){return h({expanded:{}},e)},getDefaultOptions:function(e){return{onExpandedChange:w$("expanded",e),paginateExpandedRows:!0}},createTable:function(e){var t=!1,n=!1;return{_autoResetExpanded:function(){var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((function(){e.resetExpanded(),n=!1}))}}else e._queue((function(){t=!0}))},setExpanded:function(t){return null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t)},toggleAllRowsExpanded:function(t){(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:function(t){var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},getCanSomeRowsExpand:function(){return e.getPrePaginationRowModel().flatRows.some((function(e){return e.getCanExpand()}))},getToggleAllRowsExpandedHandler:function(){return function(t){null==t.persist||t.persist(),e.toggleAllRowsExpanded()}},getIsSomeRowsExpanded:function(){var t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:function(){var t=e.getState().expanded;return"boolean"===typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((function(e){return!e.getIsExpanded()}))},getExpandedDepth:function(){var t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((function(e){var n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:function(){return e.getSortedRowModel()},getExpandedRowModel:function(){return!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel()}}},createRow:function(e,t){return{toggleExpanded:function(n){t.setExpanded((function(r){var o,i=!0===r||!(null==r||!r[e.id]),a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((function(e){a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return h(h({},a),{},f({},e.id,!0));if(i&&!n){var l=a,u=e.id;l[u];return p(l,[u].map(c))}return r}))},getIsExpanded:function(){var n,r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},getCanExpand:function(){var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:function(){var t=e.getCanExpand();return function(){t&&e.toggleExpanded()}}}}},I$=function(e,t,n){var r,o,i,a=n.toLowerCase();return Boolean(null==(r=e.getValue(t))||null==(o=r.toString())||null==(i=o.toLowerCase())?void 0:i.includes(a))};I$.autoRemove=function(e){return U$(e)};var M$=function(e,t,n){var r,o;return Boolean(null==(r=e.getValue(t))||null==(o=r.toString())?void 0:o.includes(n))};M$.autoRemove=function(e){return U$(e)};var N$=function(e,t,n){var r,o;return(null==(r=e.getValue(t))||null==(o=r.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};N$.autoRemove=function(e){return U$(e)};var D$=function(e,t,n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};D$.autoRemove=function(e){return U$(e)||!(null!=e&&e.length)};var L$=function(e,t,n){return!n.some((function(n){var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}))};L$.autoRemove=function(e){return U$(e)||!(null!=e&&e.length)};var F$=function(e,t,n){return n.some((function(n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}))};F$.autoRemove=function(e){return U$(e)||!(null!=e&&e.length)};var z$=function(e,t,n){return e.getValue(t)===n};z$.autoRemove=function(e){return U$(e)};var B$=function(e,t,n){return e.getValue(t)==n};B$.autoRemove=function(e){return U$(e)};var V$=function(e,t,n){var r=ut(n,2),o=r[0],i=r[1],a=e.getValue(t);return a>=o&&a<=i};V$.resolveFilterValue=function(e){var t=ut(e,2),n=t[0],r=t[1],o="number"!==typeof n?parseFloat(n):n,i="number"!==typeof r?parseFloat(r):r,a=null===n||Number.isNaN(o)?-1/0:o,l=null===r||Number.isNaN(i)?1/0:i;if(a>l){var u=a;a=l,l=u}return[a,l]},V$.autoRemove=function(e){return U$(e)||U$(e[0])&&U$(e[1])};var H$={includesString:I$,includesStringSensitive:M$,equalsString:N$,arrIncludes:D$,arrIncludesAll:L$,arrIncludesSome:F$,equals:z$,weakEquals:B$,inNumberRange:V$};function U$(e){return void 0===e||null===e||""===e}var W$={getDefaultColumnDef:function(){return{filterFn:"auto"}},getInitialState:function(e){return h({columnFilters:[],globalFilter:void 0},e)},getDefaultOptions:function(e){return{onColumnFiltersChange:w$("columnFilters",e),onGlobalFilterChange:w$("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:function(t){var n,r,o=null==(n=e.getCoreRowModel().flatRows[0])||null==(r=n._getAllCellsByColumnId()[t.id])?void 0:r.getValue();return"string"===typeof o||"number"===typeof o}}},createColumn:function(e,t){return{getAutoFilterFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"===typeof r?H$.includesString:"number"===typeof r?H$.inNumberRange:"boolean"===typeof r||null!==r&&"object"===typeof r?H$.equals:Array.isArray(r)?H$.arrIncludes:H$.weakEquals},getFilterFn:function(){var n,r;return S$(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:H$[e.columnDef.filterFn]},getCanFilter:function(){var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:function(){var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},getIsFiltered:function(){return e.getFilterIndex()>-1},getFilterValue:function(){var n,r;return null==(n=t.getState().columnFilters)||null==(r=n.find((function(t){return t.id===e.id})))?void 0:r.value},getFilterIndex:function(){var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},setFilterValue:function(n){t.setColumnFilters((function(t){var r,o=e.getFilterFn(),i=null==t?void 0:t.find((function(t){return t.id===e.id})),a=x$(n,i?i.value:void 0);if(G$(o,a,e))return null!=(r=null==t?void 0:t.filter((function(t){return t.id!==e.id})))?r:[];var l,u={id:e.id,value:a};return i?null!=(l=null==t?void 0:t.map((function(t){return t.id===e.id?u:t})))?l:[]:null!=t&&t.length?[].concat(bt(t),[u]):[u]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:function(){return e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel()},_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:function(){return e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map},_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:function(){if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},createRow:function(e,t){return{columnFilters:{},columnFiltersMeta:{}}},createTable:function(e){return{getGlobalAutoFilterFn:function(){return H$.includesString},getGlobalFilterFn:function(){var t,n,r=e.options.globalFilterFn;return S$(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:H$[r]},setColumnFilters:function(t){var n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((function(e){var r;return null==(r=x$(t,e))?void 0:r.filter((function(e){var t=n.find((function(t){return t.id===e.id}));if(t&&G$(t.getFilterFn(),e.value,t))return!1;return!0}))}))},setGlobalFilter:function(t){null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:function(t){e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:function(t){var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},getPreFilteredRowModel:function(){return e.getCoreRowModel()},getFilteredRowModel:function(){return!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()},_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:function(){return e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel()},_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:function(){return e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map},_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:function(){if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}}};function G$(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||"undefined"===typeof t||"string"===typeof t&&!t}var q$={sum:function(e,t,n){return n.reduce((function(t,n){var r=n.getValue(e);return t+("number"===typeof r?r:0)}),0)},min:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:function(e,t,n){var r,o;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o=o&&(++n,r+=o)})),n)return r/n},median:function(e,t){if(t.length){var n=t.map((function(t){return t.getValue(e)}));if(function(e){return Array.isArray(e)&&e.every((function(e){return"number"===typeof e}))}(n)){if(1===n.length)return n[0];var r=Math.floor(n.length/2),o=n.sort((function(e,t){return e-t}));return n.length%2!==0?o[r]:(o[r-1]+o[r])/2}}},unique:function(e,t){return Array.from(new Set(t.map((function(t){return t.getValue(e)}))).values())},uniqueCount:function(e,t){return new Set(t.map((function(t){return t.getValue(e)}))).size},count:function(e,t){return t.length}},Q$={getDefaultColumnDef:function(){return{aggregatedCell:function(e){var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}},getInitialState:function(e){return h({grouping:[]},e)},getDefaultOptions:function(e){return{onGroupingChange:w$("grouping",e),groupedColumnMode:"reorder"}},createColumn:function(e,t){return{toggleGrouping:function(){t.setGrouping((function(t){return null!=t&&t.includes(e.id)?t.filter((function(t){return t!==e.id})):[].concat(bt(null!=t?t:[]),[e.id])}))},getCanGroup:function(){var n,r,o,i;return null!=(n=null==(r=null!=(o=null==(i=e.columnDef.enableGrouping)||i)?o:t.options.enableGrouping)||r)?n:!!e.accessorFn},getIsGrouped:function(){var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:function(){var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:function(){var t=e.getCanGroup();return function(){t&&e.toggleGrouping()}},getAutoAggregationFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"===typeof r?q$.sum:"[object Date]"===Object.prototype.toString.call(r)?q$.extent:void 0},getAggregationFn:function(){var n,r;if(!e)throw new Error;return S$(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:q$[e.columnDef.aggregationFn]}}},createTable:function(e){return{setGrouping:function(t){return null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t)},resetGrouping:function(t){var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},getPreGroupedRowModel:function(){return e.getFilteredRowModel()},getGroupedRowModel:function(){return!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel()}}},createRow:function(e,t){return{getIsGrouped:function(){return!!e.groupingColumnId},getGroupingValue:function(n){if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];var r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},_groupingValuesCache:{}}},createCell:function(e,t,n,r){return{getIsGrouped:function(){return t.getIsGrouped()&&t.id===n.groupingColumnId},getIsPlaceholder:function(){return!e.getIsGrouped()&&t.getIsGrouped()},getIsAggregated:function(){var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}}};var $$={getInitialState:function(e){return h({columnOrder:[]},e)},getDefaultOptions:function(e){return{onColumnOrderChange:w$("columnOrder",e)}},createTable:function(e){return{setColumnOrder:function(t){return null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t)},resetColumnOrder:function(t){var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:k$((function(){return[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]}),(function(e,t,n){return function(r){var o=[];if(null!=e&&e.length){for(var i=bt(e),a=bt(r),l=function(){var e=i.shift(),t=a.findIndex((function(t){return t.id===e}));t>-1&&o.push(a.splice(t,1)[0])};a.length&&i.length;)l();o=[].concat(bt(o),bt(a))}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;var r=e.filter((function(e){return!t.includes(e.id)}));if("remove"===n)return r;var o=t.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean);return[].concat(bt(o),bt(r))}(o,t,n)}}),{key:!1})}}},Y$={getInitialState:function(e){return h(h({},e),{},{pagination:h(h({},{pageIndex:0,pageSize:10}),null==e?void 0:e.pagination)})},getDefaultOptions:function(e){return{onPaginationChange:w$("pagination",e)}},createTable:function(e){var t=!1,n=!1;return{_autoResetPageIndex:function(){var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((function(){e.resetPageIndex(),n=!1}))}}else e._queue((function(){t=!0}))},setPagination:function(t){return null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((function(e){return x$(t,e)}))},resetPagination:function(t){var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:function(t){e.setPagination((function(n){var r=x$(t,n.pageIndex),o="undefined"===typeof e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),h(h({},n),{},{pageIndex:r})}))},resetPageIndex:function(t){var n,r,o;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(o=r.pagination)?void 0:o.pageIndex)?n:0)},resetPageSize:function(t){var n,r,o;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(o=r.pagination)?void 0:o.pageSize)?n:10)},setPageSize:function(t){e.setPagination((function(e){var n=Math.max(1,x$(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return h(h({},e),{},{pageIndex:o,pageSize:n})}))},setPageCount:function(t){return e.setPagination((function(n){var r,o=x$(t,null!=(r=e.options.pageCount)?r:-1);return"number"===typeof o&&(o=Math.max(-1,o)),h(h({},n),{},{pageCount:o})}))},getPageOptions:k$((function(){return[e.getPageCount()]}),(function(e){var t=[];return e&&e>0&&(t=bt(new Array(e)).fill(null).map((function(e,t){return t}))),t}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:function(){return e.getState().pagination.pageIndex>0},getCanNextPage:function(){var t=e.getState().pagination.pageIndex,n=e.getPageCount();return-1===n||0!==n&&t0&&nt?1:-1}function oY(e){return"number"===typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"===typeof e?e:""}function iY(e,t){for(var n=e.split(nY).filter(Boolean),r=t.split(nY).filter(Boolean);n.length&&r.length;){var o=n.shift(),i=r.shift(),a=parseInt(o,10),l=parseInt(i,10),u=[a,l].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1}else{if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}}return n.length-r.length}var aY={alphanumeric:function(e,t,n){return iY(oY(e.getValue(n)).toLowerCase(),oY(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return iY(oY(e.getValue(n)),oY(t.getValue(n)))},text:function(e,t,n){return rY(oY(e.getValue(n)).toLowerCase(),oY(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return rY(oY(e.getValue(n)),oY(t.getValue(n)))},datetime:function(e,t,n){var r=e.getValue(n),o=t.getValue(n);return r>o?1:r1))return aY.alphanumeric}}catch(l){o.e(l)}finally{o.f()}return r?aY.text:aY.basic},getAutoSortDir:function(){var n=t.getFilteredRowModel().flatRows[0];return"string"===typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:function(){var n,r;if(!e)throw new Error;return S$(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:aY[e.columnDef.sortingFn]},toggleSorting:function(n,r){var o=e.getNextSortingOrder(),i="undefined"!==typeof n&&null!==n;t.setSorting((function(a){var l,u,s=null==a?void 0:a.find((function(t){return t.id===e.id})),c=null==a?void 0:a.findIndex((function(t){return t.id===e.id})),f=[],d=i?n:"desc"===o;("toggle"===(l=null!=a&&a.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=a&&a.length&&c!==a.length-1?"replace":s?"toggle":"replace")&&(i||o||(l="remove")),"add"===l)?(f=[].concat(bt(a),[{id:e.id,desc:d}])).splice(0,f.length-(null!=(u=t.options.maxMultiSortColCount)?u:Number.MAX_SAFE_INTEGER)):f="toggle"===l?a.map((function(t){return t.id===e.id?h(h({},t),{},{desc:d}):t})):"remove"===l?a.filter((function(t){return t.id!==e.id})):[{id:e.id,desc:d}];return f}))},getFirstSortDir:function(){var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},getNextSortingOrder:function(n){var r,o,i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},getCanSort:function(){var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},getCanMultiSort:function(){var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:function(){var n,r=null==(n=t.getState().sorting)?void 0:n.find((function(t){return t.id===e.id}));return!!r&&(r.desc?"desc":"asc")},getSortIndex:function(){var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},clearSorting:function(){t.setSorting((function(t){return null!=t&&t.length?t.filter((function(t){return t.id!==e.id})):[]}))},getToggleSortingHandler:function(){var n=e.getCanSort();return function(r){n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}}},createTable:function(e){return{setSorting:function(t){return null==e.options.onSortingChange?void 0:e.options.onSortingChange(t)},resetSorting:function(t){var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},getPreSortedRowModel:function(){return e.getGroupedRowModel()},getSortedRowModel:function(){return!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel()}}}},uY={getInitialState:function(e){return h({columnVisibility:{}},e)},getDefaultOptions:function(e){return{onColumnVisibilityChange:w$("columnVisibility",e)}},createColumn:function(e,t){return{toggleVisibility:function(n){e.getCanHide()&&t.setColumnVisibility((function(t){return h(h({},t),{},f({},e.id,null!=n?n:!e.getIsVisible()))}))},getIsVisible:function(){var n,r;return null==(n=null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},getCanHide:function(){var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},getToggleVisibilityHandler:function(){return function(t){null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}}},createRow:function(e,t){return{_getAllVisibleCells:k$((function(){return[e.getAllCells(),t.getState().columnVisibility]}),(function(e){return e.filter((function(e){return e.column.getIsVisible()}))}),{key:"row._getAllVisibleCells",debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:k$((function(){return[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]}),(function(e,t,n){return[].concat(bt(e),bt(t),bt(n))}),{key:!1,debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}},createTable:function(e){var t=function(t,n){return k$((function(){return[n(),n().filter((function(e){return e.getIsVisible()})).map((function(e){return e.id})).join("_")]}),(function(e){return e.filter((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))}),{key:t,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return{getVisibleFlatColumns:t("getVisibleFlatColumns",(function(){return e.getAllFlatColumns()})),getVisibleLeafColumns:t("getVisibleLeafColumns",(function(){return e.getAllLeafColumns()})),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(function(){return e.getLeftLeafColumns()})),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(function(){return e.getRightLeafColumns()})),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(function(){return e.getCenterLeafColumns()})),setColumnVisibility:function(t){return null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t)},resetColumnVisibility:function(t){var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:function(t){var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((function(e,n){return h(h({},e),{},f({},n.id,t||!(null!=n.getCanHide&&n.getCanHide())))}),{}))},getIsAllColumnsVisible:function(){return!e.getAllLeafColumns().some((function(e){return!(null!=e.getIsVisible&&e.getIsVisible())}))},getIsSomeColumnsVisible:function(){return e.getAllLeafColumns().some((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))},getToggleAllColumnsVisibilityHandler:function(){return function(t){var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}}},sY=[C$,uY,$$,K$,W$,lY,Q$,R$,Y$,X$,j$];function cY(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");var n={_features:sY},r=n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))}),{}),o=h(h({},{}),null!=(t=e.initialState)?t:{});n._features.forEach((function(e){var t;o=null!=(t=null==e.getInitialState?void 0:e.getInitialState(o))?t:o}));var i=[],a=!1,l={_features:sY,options:h(h({},r),e),initialState:o,_queue:function(e){i.push(e),a||(a=!0,Promise.resolve().then((function(){for(;i.length;)i.shift()();a=!1})).catch((function(e){return setTimeout((function(){throw e}))})))},reset:function(){n.setState(n.initialState)},setOptions:function(e){var t=x$(e,n.options);n.options=function(e){return n.options.mergeOptions?n.options.mergeOptions(r,e):h(h({},r),e)}(t)},getState:function(){return n.options.state},setState:function(e){null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:function(e,t,r){var o;return null!=(o=null==n.options.getRowId?void 0:n.options.getRowId(e,t,r))?o:"".concat(r?[r.id,t].join("."):t)},getCoreRowModel:function(){return n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()},getRowModel:function(){return n.getPaginationRowModel()},getRow:function(e){var t=n.getRowModel().rowsById[e];if(!t)throw new Error;return t},_getDefaultColumnDef:k$((function(){return[n.options.defaultColumn]}),(function(e){var t;return e=null!=(t=e)?t:{},h(h({header:function(e){var t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:function(e){var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null}},n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())}),{})),e)}),{debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:!1}),_getColumnDefs:function(){return n.options.columns},getAllColumns:k$((function(){return[n._getColumnDefs()]}),(function(e){return function e(t,r,o){return void 0===o&&(o=0),t.map((function(t){var i=function(e,t,n,r){var o,i,a,l=h(h({},e._getDefaultColumnDef()),t),u=l.accessorKey,s=null!=(o=null!=(i=l.id)?i:u?u.replace(".","_"):void 0)?o:"string"===typeof l.header?l.header:void 0;if(l.accessorFn?a=l.accessorFn:u&&(a=u.includes(".")?function(e){var t,n=e,r=gt(u.split("."));try{for(r.s();!(t=r.n()).done;){var o,i=t.value;n=null==(o=n)?void 0:o[i]}}catch(a){r.e(a)}finally{r.f()}return n}:function(e){return e[l.accessorKey]}),!s)throw new Error;var c={id:"".concat(String(s)),accessorFn:a,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:k$((function(){return[!0]}),(function(){var e;return[c].concat(bt(null==(e=c.columns)?void 0:e.flatMap((function(e){return e.getFlatColumns()}))))}),{key:"column.getFlatColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:k$((function(){return[e._getOrderColumnsFn()]}),(function(e){var t;if(null!=(t=c.columns)&&t.length){var n=c.columns.flatMap((function(e){return e.getLeafColumns()}));return e(n)}return[c]}),{key:"column.getLeafColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return c=e._features.reduce((function(t,n){return Object.assign(t,null==n.createColumn?void 0:n.createColumn(c,e))}),c)}(n,t,o,r),a=t;return i.columns=a.columns?e(a.columns,i,o+1):[],i}))}(e)}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:k$((function(){return[n.getAllColumns()]}),(function(e){return e.flatMap((function(e){return e.getFlatColumns()}))}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:k$((function(){return[n.getAllFlatColumns()]}),(function(e){return e.reduce((function(e,t){return e[t.id]=t,e}),{})}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:k$((function(){return[n.getAllColumns(),n._getOrderColumnsFn()]}),(function(e,t){var n=e.flatMap((function(e){return e.getLeafColumns()}));return t(n)}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:function(e){return n._getAllFlatColumnsById()[e]}};return Object.assign(n,l),n._features.forEach((function(e){return Object.assign(n,null==e.createTable?void 0:e.createTable(n))})),n}var fY=function(e,t,n,r,o,i,a){for(var l={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:function(t){if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,r),l._valuesCache[t]):void 0},getUniqueValues:function(t){if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:function(t){var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=i?i:[],getLeafRows:function(){return _$(l.subRows,(function(e){return e.subRows}))},getParentRow:function(){return l.parentId?e.getRow(l.parentId):void 0},getParentRows:function(){for(var e=[],t=l;;){var n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:k$((function(){return[e.getAllLeafColumns()]}),(function(t){return t.map((function(t){return function(e,t,n,r){var o={id:"".concat(t.id,"_").concat(n.id),row:t,column:n,getValue:function(){return t.getValue(r)},renderValue:function(){var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:k$((function(){return[e,n,t,o]}),(function(e,t,n,r){return{table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}}),{key:!1,debug:function(){return e.options.debugAll}})};return e._features.forEach((function(r){Object.assign(o,null==r.createCell?void 0:r.createCell(o,n,t,e))}),{}),o}(e,l,t,t.id)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:k$((function(){return[l.getAllCells()]}),(function(e){return e.reduce((function(e,t){return e[t.column.id]=t,e}),{})}),{key:"row.getAllCellsByColumnId",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},u=0;u0?1:o}function xY(e){_N(1,arguments);var t=kN(e);return function(e){_N(1,arguments);var t=kN(e);return t.setHours(23,59,59,999),t}(t).getTime()===function(e){_N(1,arguments);var t=kN(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t).getTime()}function wY(e,t){_N(2,arguments);var n,r=kN(e),o=kN(t),i=bY(r,o),a=Math.abs(function(e,t){_N(2,arguments);var n=kN(e),r=kN(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,o));if(a<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var l=bY(r,o)===-i;xY(kN(e))&&1===a&&1===bY(e,o)&&(l=!1),n=i*(a-Number(l))}return 0===n?0:n}function SY(e,t){return _N(2,arguments),kN(e).getTime()-kN(t).getTime()}var _Y={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},kY="trunc";function TY(e){return e?_Y[e]:_Y[kY]}var CY={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},EY=function(e,t,n){var r,o=CY[e];return r="string"===typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function OY(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var jY={date:OY({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:OY({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:OY({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},PY={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AY=function(e,t,n,r){return PY[e]};function RY(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!==n&&void 0!==n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var IY={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:RY({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:RY({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:RY({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:RY({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:RY({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function MY(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,l=i[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(NY.matchPattern);if(!n)return null;var r=n[0],o=e.match(NY.parsePattern);if(!o)return null;var i=NY.valueCallback?NY.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:MY({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:MY({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:MY({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:MY({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:MY({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},LY={code:"en-US",formatDistance:EY,formatLong:jY,formatRelative:AY,localize:IY,match:DY,options:{weekStartsOn:0,firstWeekContainsDate:1}};function FY(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function zY(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var BY=1440,VY=2520,HY=43200,UY=86400;function WY(e,t,n){var r,o;_N(2,arguments);var i=yY(),a=null!==(r=null!==(o=null===n||void 0===n?void 0:n.locale)&&void 0!==o?o:i.locale)&&void 0!==r?r:LY;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=bY(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var u,s,c=FY(function(e){return FY({},e)}(n),{addSuffix:Boolean(null===n||void 0===n?void 0:n.addSuffix),comparison:l});l>0?(u=kN(t),s=kN(e)):(u=kN(e),s=kN(t));var f,d=function(e,t,n){_N(2,arguments);var r=SY(e,t)/1e3;return TY(null===n||void 0===n?void 0:n.roundingMethod)(r)}(s,u),h=(zY(s)-zY(u))/1e3,p=Math.round((d-h)/60);if(p<2)return null!==n&&void 0!==n&&n.includeSeconds?d<5?a.formatDistance("lessThanXSeconds",5,c):d<10?a.formatDistance("lessThanXSeconds",10,c):d<20?a.formatDistance("lessThanXSeconds",20,c):d<40?a.formatDistance("halfAMinute",0,c):d<60?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",1,c):0===p?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",p,c);if(p<45)return a.formatDistance("xMinutes",p,c);if(p<90)return a.formatDistance("aboutXHours",1,c);if(p0,a=(null===n||void 0===n?void 0:n.outputSize)>0?"Click to view (".concat(n.outputSize," characters of output)"):"Click to view";return(0,t.jsx)(b$,{label:a,"aria-label":"Task output",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-row gap-2 flex-wrap",children:[(0,t.jsx)(vq,{task:n}),i&&(0,t.jsx)("div",{children:(0,t.jsx)(Xz,{fontSize:"0.8em",size:"large",colorScheme:"purple",children:(0,t.jsx)("div",{className:"p-1",children:"Has Output"})})})]}),(0,t.jsxs)("div",{className:"text-sm text-gray-500 flex flex-row flex-wrap",children:["last updated ",WY(r,o)]})]})})},footer:function(e){return e.column.id}}];return(0,t.jsx)(mY,{data:n,columns:i,onRowClick:r})};function qY(e){var n=e.totalCount,r=e.pageInfo,o=e.refetchTable,i=e.page,a=e.setPage,l=e.rowLimit;return(0,t.jsxs)("nav",{className:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6","aria-label":"Pagination",children:[(0,t.jsx)("div",{className:"hidden sm:block",children:(0,t.jsxs)("p",{className:"text-sm text-gray-800",children:["Page ",(0,t.jsx)("span",{className:"font-semibold",children:i})," of ",(0,t.jsx)("span",{className:"font-semibold",children:Math.ceil(n/l)})," ","(".concat(n," results)")]})}),(0,t.jsxs)("div",{className:"flex flex-1 justify-between sm:justify-end",children:[(0,t.jsx)("button",{disabled:!r.hasPreviousPage,onClick:function(){o&&r.hasPreviousPage&&(a((function(e){return e-1})),o(void 0,r.startCursor))},className:"relative inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus-visible:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{disabled:!r.hasNextPage,onClick:function(){o&&r.hasNextPage&&(a((function(e){return e+1})),o(r.endCursor,void 0))},className:"relative ml-3 inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus-visible:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})}var QY=n(763),$Y=function(e){var n=h_(),r=n.placeholder,o=n.questId,i=r||(o?"Search by output":"Search by tome name, quest name, or output"),l=e.setSearch,u=(0,a.useRef)((0,QY.debounce)(function(){var e=mw(pw().mark((function e(t){return pw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),300)).current;function s(){return(s=mw(pw().mark((function e(t){return pw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u(t.target.value);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,a.useEffect)((function(){return function(){u.cancel()}}),[u]),(0,t.jsxs)("div",{className:"flex-1 gap-1",children:[(0,t.jsxs)(tN,{size:"sm",mb:2,children:[" ",i]}),(0,t.jsxs)(cD,{className:" border-gray-300",children:[(0,t.jsx)(mD,{pointerEvents:"none",children:(0,t.jsx)(Gz,{color:"gray.300"})}),(0,t.jsx)(bD,{type:"text",placeholder:i,onChange:function(e){return s.apply(this,arguments)}})]})]})},YY=function(e){var n=e.setSearch,r=e.setFiltersSelected,o=e.filtersSelected,i=(0,a.useContext)(Aj),l=i.data,u=i.isLoading,s=i.error;return(0,t.jsx)("div",{children:!u&&!s&&l&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsx)($Y,{setSearch:n}),(0,t.jsx)(mG,{beacons:(null===l||void 0===l?void 0:l.beacons)||[],groups:(null===l||void 0===l?void 0:l.groupTags)||[],services:(null===l||void 0===l?void 0:l.serviceTags)||[],hosts:(null===l||void 0===l?void 0:l.hosts)||[],setFiltersSelected:r,filtersSelected:o})]})})},KY=Uz({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});var XY=function(e){return e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e}(XY||{});function JY(e,t){var n=t.resolveItems();if(n.length<=0)return null;var r=t.resolveActiveIndex(),o=null!=r?r:-1,i=function(){switch(e.focus){case 0:return n.findIndex((function(e){return!t.resolveDisabled(e)}));case 1:var r=n.slice().reverse().findIndex((function(e,n,r){return!(-1!==o&&r.length-n-1>=o)&&!t.resolveDisabled(e)}));return-1===r?r:n.length-1-r;case 2:return n.findIndex((function(e,n){return!(n<=o)&&!t.resolveDisabled(e)}));case 3:var i=n.slice().reverse().findIndex((function(e){return!t.resolveDisabled(e)}));return-1===i?i:n.length-1-i;case 4:return n.findIndex((function(n){return t.resolveId(n)===e.id}));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}();return-1===i?r:i}function ZY(e){var t;if(e.type)return e.type;var n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function eK(e,t){var n=ut((0,a.useState)((function(){return ZY(e)})),2),r=n[0],o=n[1];return lk((function(){o(ZY(e))}),[e.type,e.as]),lk((function(){r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&o("button")}),[r,t]),r}function tK(e){return[e.screenX,e.screenY]}var nK,rK=["id"],oK=["id"],iK=["id","disabled"],aK=function(e){return e[e.Open=0]="Open",e[e.Closed=1]="Closed",e}(aK||{}),lK=function(e){return e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e}(lK||{}),uK=function(e){return e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e}(uK||{});function sK(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=iT(t(e.items.slice()),(function(e){return e.dataRef.current.domRef.current})),o=n?r.indexOf(n):null;return-1===o&&(o=null),{items:r,activeItemIndex:o}}var cK=(f(nK={},1,(function(e){return 1===e.menuState?e:h(h({},e),{},{activeItemIndex:null,menuState:1})})),f(nK,0,(function(e){return 0===e.menuState?e:h(h({},e),{},{menuState:0})})),f(nK,2,(function(e,t){var n,r=sK(e),o=JY(t,{resolveItems:function(){return r.items},resolveActiveIndex:function(){return r.activeItemIndex},resolveId:function(e){return e.id},resolveDisabled:function(e){return e.dataRef.current.disabled}});return h(h(h({},e),r),{},{searchQuery:"",activeItemIndex:o,activationTrigger:null!=(n=t.trigger)?n:1})})),f(nK,3,(function(e,t){var n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find((function(e){var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled})),i=o?e.items.indexOf(o):-1;return-1===i||i===e.activeItemIndex?h(h({},e),{},{searchQuery:r}):h(h({},e),{},{searchQuery:r,activeItemIndex:i,activationTrigger:1})})),f(nK,4,(function(e){return""===e.searchQuery?e:h(h({},e),{},{searchQuery:"",searchActiveItemIndex:null})})),f(nK,5,(function(e,t){var n=sK(e,(function(e){return[].concat(bt(e),[{id:t.id,dataRef:t.dataRef}])}));return h(h({},e),n)})),f(nK,6,(function(e,t){var n=sK(e,(function(e){var n=e.findIndex((function(e){return e.id===t.id}));return-1!==n&&e.splice(n,1),e}));return h(h(h({},e),n),{},{activationTrigger:1})})),nK),fK=(0,a.createContext)(null);function dK(e){var t=(0,a.useContext)(fK);if(null===t){var n=new Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,dK),n}return t}function hK(e,t){return H_(t.type,cK,e,t)}fK.displayName="MenuContext";var pK=a.Fragment;var vK="button";var mK="div",gK=q_.RenderStrategy|q_.Static;var yK=a.Fragment;var bK,xK=X_((function(e,t){var n,r=(0,a.useReducer)(hK,{menuState:1,buttonRef:(0,a.createRef)(),itemsRef:(0,a.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),o=ut(r,2),i=o[0],l=i.menuState,u=i.itemsRef,s=i.buttonRef,c=o[1],d=pk(t);UT([s,u],(function(e,t){var n;c({type:1}),tT(t,eT.Loose)||(e.preventDefault(),null==(n=s.current)||n.focus())}),0===l);var h=fk((function(){c({type:1})})),p=(0,a.useMemo)((function(){return{open:0===l,close:h}}),[l,h]),v=e,m={ref:d};return a.createElement(fK.Provider,{value:r},a.createElement(rk,{value:H_(l,(n={},f(n,0,tk.Open),f(n,1,tk.Closed),n))},$_({ourProps:m,theirProps:v,slot:p,defaultTag:pK,name:"Menu"})))})),wK=X_((function(e,t){var n,r=Uk(),o=e.id,i=void 0===o?"headlessui-menu-button-".concat(r):o,l=p(e,rK),u=ut(dK("Menu.Button"),2),s=u[0],c=u[1],f=pk(s.buttonRef,t),d=xk(),h=fk((function(e){switch(e.key){case Vk.Space:case Vk.Enter:case Vk.ArrowDown:e.preventDefault(),e.stopPropagation(),c({type:0}),d.nextFrame((function(){return c({type:2,focus:XY.First})}));break;case Vk.ArrowUp:e.preventDefault(),e.stopPropagation(),c({type:0}),d.nextFrame((function(){return c({type:2,focus:XY.Last})}))}})),v=fk((function(e){if(e.key===Vk.Space)e.preventDefault()})),m=fk((function(t){if(Hk(t.currentTarget))return t.preventDefault();e.disabled||(0===s.menuState?(c({type:1}),d.nextFrame((function(){var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),c({type:0})))})),g=(0,a.useMemo)((function(){return{open:0===s.menuState}}),[s]);return $_({ourProps:{ref:f,id:i,type:eK(e,s.buttonRef),"aria-haspopup":"menu","aria-controls":null==(n=s.itemsRef.current)?void 0:n.id,"aria-expanded":e.disabled?void 0:0===s.menuState,onKeyDown:h,onKeyUp:v,onClick:m},theirProps:l,slot:g,defaultTag:vK,name:"Menu.Button"})})),SK=X_((function(e,t){var n,r,o=Uk(),i=e.id,l=void 0===i?"headlessui-menu-items-".concat(o):i,u=p(e,oK),s=ut(dK("Menu.Items"),2),c=s[0],f=s[1],d=pk(c.itemsRef,t),h=cT(c.itemsRef),v=xk(),m=nk(),g=null!==m?(m&tk.Open)===tk.Open:0===c.menuState;(0,a.useEffect)((function(){var e=c.itemsRef.current;e&&0===c.menuState&&e!==(null==h?void 0:h.activeElement)&&e.focus({preventScroll:!0})}),[c.menuState,c.itemsRef,h]),zN({container:c.itemsRef.current,enabled:0===c.menuState,accept:function(e){return"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var y=fk((function(e){var t,n;switch(v.dispose(),e.key){case Vk.Space:if(""!==c.searchQuery)return e.preventDefault(),e.stopPropagation(),f({type:3,value:e.key});case Vk.Enter:if(e.preventDefault(),e.stopPropagation(),f({type:1}),null!==c.activeItemIndex)null==(n=null==(t=c.items[c.activeItemIndex].dataRef.current)?void 0:t.domRef.current)||n.click();nT(c.buttonRef.current);break;case Vk.ArrowDown:return e.preventDefault(),e.stopPropagation(),f({type:2,focus:XY.Next});case Vk.ArrowUp:return e.preventDefault(),e.stopPropagation(),f({type:2,focus:XY.Previous});case Vk.Home:case Vk.PageUp:return e.preventDefault(),e.stopPropagation(),f({type:2,focus:XY.First});case Vk.End:case Vk.PageDown:return e.preventDefault(),e.stopPropagation(),f({type:2,focus:XY.Last});case Vk.Escape:e.preventDefault(),e.stopPropagation(),f({type:1}),mk().nextFrame((function(){var e;return null==(e=c.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case Vk.Tab:e.preventDefault(),e.stopPropagation(),f({type:1}),mk().nextFrame((function(){aT(c.buttonRef.current,e.shiftKey?Kk.Previous:Kk.Next)}));break;default:1===e.key.length&&(f({type:3,value:e.key}),v.setTimeout((function(){return f({type:4})}),350))}})),b=fk((function(e){if(e.key===Vk.Space)e.preventDefault()})),x=(0,a.useMemo)((function(){return{open:0===c.menuState}}),[c]);return $_({ourProps:{"aria-activedescendant":null===c.activeItemIndex||null==(n=c.items[c.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=c.buttonRef.current)?void 0:r.id,id:l,onKeyDown:y,onKeyUp:b,role:"menu",tabIndex:0,ref:d},theirProps:u,slot:x,defaultTag:mK,features:gK,visible:g,name:"Menu.Items"})})),_K=X_((function(e,t){var n=Uk(),r=e.id,o=void 0===r?"headlessui-menu-item-".concat(n):r,i=e.disabled,l=void 0!==i&&i,u=p(e,iK),s=ut(dK("Menu.Item"),2),c=s[0],f=s[1],d=null!==c.activeItemIndex&&c.items[c.activeItemIndex].id===o,h=(0,a.useRef)(null),v=pk(t,h);lk((function(){if(0===c.menuState&&d&&0!==c.activationTrigger){var e=mk();return e.requestAnimationFrame((function(){var e,t;null==(t=null==(e=h.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}}),[h,d,c.menuState,c.activationTrigger,c.activeItemIndex]);var m=(0,a.useRef)({disabled:l,domRef:h});lk((function(){m.current.disabled=l}),[m,l]),lk((function(){var e,t;m.current.textValue=null==(t=null==(e=h.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[m,h]),lk((function(){return f({type:5,id:o,dataRef:m}),function(){return f({type:6,id:o})}}),[m,o]);var g=fk((function(){f({type:1})})),y=fk((function(e){if(l)return e.preventDefault();f({type:1}),nT(c.buttonRef.current)})),b=fk((function(){if(l)return f({type:2,focus:XY.Nothing});f({type:2,focus:XY.Specific,id:o})})),x=function(){var e=(0,a.useRef)([-1,-1]);return{wasMoved:function(t){var n=tK(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update:function(t){e.current=tK(t)}}}(),w=fk((function(e){return x.update(e)})),S=fk((function(e){x.wasMoved(e)&&(l||d||f({type:2,focus:XY.Specific,id:o,trigger:0}))})),_=fk((function(e){x.wasMoved(e)&&(l||d&&f({type:2,focus:XY.Nothing}))})),k=(0,a.useMemo)((function(){return{active:d,disabled:l,close:g}}),[d,l,g]);return $_({ourProps:{id:o,ref:v,role:"menuitem",tabIndex:!0===l?void 0:-1,"aria-disabled":!0===l||void 0,disabled:void 0,onClick:y,onFocus:b,onPointerEnter:w,onMouseEnter:w,onPointerMove:S,onMouseMove:S,onPointerLeave:_,onMouseLeave:_},theirProps:u,slot:k,defaultTag:yK,name:"Menu.Item"})})),kK=Object.assign(xK,{Button:wK,Items:SK,Item:_K}),TK=n(180),CK=n(9642),EK=function(e){var n=e.showLabel,r=e.name,o=e.originalParms,i=e.tome,l=e.tasks,u=function(){var e=d_(),t=function(e){var t=[],n={};for(var r in null===e||void 0===e?void 0:e.edges){var o,i,a=null===e||void 0===e||null===(o=e.edges[r])||void 0===o||null===(i=o.node)||void 0===i?void 0:i.beacon.id;if(!(a in n)){var l,u,s=jN(null===e||void 0===e||null===(l=e.edges[r])||void 0===l||null===(u=l.node)||void 0===u?void 0:u.beacon);n[a]=!s}}for(var c in n)n[c]&&t.push(c);return t};return{handleCreateQuestWithNewTome:function(n,r){var o=t(r);e("/createQuest",{state:{step:1,beacons:o,name:n}})},handleCreateQuestWithSameTome:function(n,r,o,i){var a=t(i),l=AN(r,null===o||void 0===o?void 0:o.paramDefs);e("/createQuest",{state:{step:2,beacons:a,tome:o,params:l,name:n}})}}}(),s=u.handleCreateQuestWithNewTome,c=u.handleCreateQuestWithSameTome;return(0,t.jsxs)(kK,{as:"div",children:[(0,t.jsx)("div",{children:(0,t.jsx)(kK.Button,{className:"inline-flex w-full justify-center",children:n?(0,t.jsx)(zB,{size:"sm",rightIcon:(0,t.jsx)(TK,{className:"h-5 w-5","aria-hidden":"true"}),children:"Re-run quest"}):(0,t.jsx)(zB,{size:"sm",leftIcon:(0,t.jsx)(CK,{className:"h-5 w-5","aria-hidden":"true"})})})}),(0,t.jsx)(Bk,{as:a.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,t.jsx)(kK.Items,{className:"absolute right-8 mt-2 w-72 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black/5 focus:outline-none z-10",children:(0,t.jsxs)("div",{className:"px-1 py-1 ",children:[(0,t.jsx)(kK.Item,{children:function(e){var n=e.active;return(0,t.jsx)("button",{onClick:function(){return c(r,o,i,l)},className:"".concat(n?"bg-purple-700 text-white":"text-gray-900"," group flex w-full items-center rounded-md px-2 py-2 text-sm"),children:"Re-run with online beacons"})}}),(0,t.jsx)(kK.Item,{children:function(e){var n=e.active;return(0,t.jsx)("button",{onClick:function(){return s(r,l)},className:"".concat(n?"bg-purple-700 text-white":"text-gray-900"," group flex w-full items-center rounded-md px-2 py-2 text-sm"),children:"Re-run with new tome"})}})]})})})]})},OK=function(){var e,n,r,o,i,a,l,u,s,c,f,d,h,p,v,m,g,y,b,x,w,S,_,k=h_().questId,T=cj(eO(bK||(bK=qC(["\n query GetQuests($where: QuestWhereInput) {\n quests(where: $where){\n edges{\n node{\n id\n name\n parameters\n tome{\n id\n name\n description\n eldritch\n tactic\n paramDefs\n }\n tasks{\n edges{\n node{\n beacon{\n id\n lastSeenAt\n interval\n }\n }\n }\n }\n }\n }\n }\n }"]))),{variables:{where:{id:k}}}),C=T.loading,E=T.data,O=T.error;return(0,t.jsxs)("div",{className:"flex flex-row justify-between w-full",children:[(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Quest tasks for"}),(null===E||void 0===E||null===(e=E.quests)||void 0===e||null===(n=e.edges[0])||void 0===n||null===(r=n.node)||void 0===r?void 0:r.name)&&(0,t.jsx)(F_,{to:"/quests",children:(0,t.jsx)(zB,{rightIcon:(0,t.jsx)(KY,{}),colorScheme:"purple",variant:"outline",size:"xs",children:null===E||void 0===E||null===(o=E.quests)||void 0===o||null===(i=o.edges[0])||void 0===i||null===(a=i.node)||void 0===a?void 0:a.name})}),(O||!(null!==E&&void 0!==E&&null!==(l=E.quests)&&void 0!==l&&null!==(u=l.edges[0])&&void 0!==u&&null!==(s=u.node)&&void 0!==s&&s.name)&&!C)&&(0,t.jsx)(F_,{to:"/quests",children:(0,t.jsx)(zB,{rightIcon:(0,t.jsx)(KY,{}),colorScheme:"purple",variant:"outline",size:"xs",children:k})})]}),k&&(null===E||void 0===E||null===(c=E.quests)||void 0===c?void 0:c.edges)&&(null===(f=E.quests)||void 0===f?void 0:f.edges.length)>0&&(0,t.jsx)(EK,{showLabel:!0,name:null===E||void 0===E||null===(d=E.quests)||void 0===d||null===(h=d.edges[0])||void 0===h||null===(p=h.node)||void 0===p?void 0:p.name,originalParms:null===E||void 0===E||null===(v=E.quests)||void 0===v||null===(m=v.edges[0])||void 0===m||null===(g=m.node)||void 0===g?void 0:g.parameters,tome:null===E||void 0===E||null===(y=E.quests)||void 0===y||null===(b=y.edges[0])||void 0===b||null===(x=b.node)||void 0===x?void 0:x.tome,tasks:null===E||void 0===E||null===(w=E.quests)||void 0===w||null===(S=w.edges[0])||void 0===S||null===(_=S.node)||void 0===_?void 0:_.tasks})]})},jK=function(){return h_().questId?(0,t.jsx)(OK,{}):(0,t.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Tasks"}),(0,t.jsx)("div",{className:"max-w-2xl text-sm",children:"A task is a single instance of a tome plus its parameters executed against a single beacon."})]})},PK=function(e){return e.hostIDQuery="HOST_ID_QUERY",e.questIdQuery="QUEST_ID_QUERY",e.questDetailsQuery="QUEST_DETAILS_QUERY",e}({}),AK=function(e,t){var n=f_().state,r=ut((0,a.useState)(1),2),o=r[0],i=r[1],l=ut((0,a.useState)(""),2),u=l[0],s=l[1],c=(0,a.useMemo)((function(){return n&&Array.isArray(n)&&n.every((function(e){return"kind"in e&&"value"in e&&"name"in e}))?n:[]}),[n]),f=ut((0,a.useState)(c),2),d=f[0],h=f[1],p=(0,a.useCallback)((function(n,r,o){var i=UC.TaskRowLimit,a={where:{and:[]},first:o?null:i,last:o?i:null,after:r||null,before:o||null,orderBy:[{direction:"DESC",field:"LAST_MODIFIED_AT"}]};switch(e){case PK.hostIDQuery:var l=[{hasBeaconWith:{hasHostWith:{id:t}}}];n&&l.push({or:[{outputContains:n},{hasQuestWith:{nameContains:n}},{hasQuestWith:{hasTomeWith:{nameContains:n}}}]}),a.where.and=l;break;case PK.questIdQuery:var u=[{hasQuestWith:{id:t}}];n&&u.push({outputContains:n}),a.where.and=u;break;case PK.questDetailsQuery:default:var s=n||"";a.where.and=[{or:[{outputContains:s},{hasQuestWith:{nameContains:s}},{hasQuestWith:{hasTomeWith:{nameContains:s}}}]}]}return a}),[e,t]),v=(0,a.useCallback)((function(e,t){var n=t,r=e.reduce((function(e,t){return"beacon"===t.kind?e.beacon.push(t.name):"platform"===t.kind?e.platform.push(t.name):"service"===t.kind?e.service.push(t.name):"group"===t.kind?e.group.push(t.name):"host"===t.kind&&e.host.push(t.name),e}),{beacon:[],service:[],group:[],host:[],platform:[]}),o=r.beacon,i=r.group,a=r.service,l=r.platform,u=r.hosts,s=void 0===u?[]:u;return o.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{nameIn:o}})),i.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{hasTagsWith:{and:[{kind:"group"},{nameIn:i}]}}}})),a.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{hasTagsWith:{and:[{kind:"service"},{nameIn:a}]}}}})),s.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{nameIn:s}}})),l.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{platformIn:l}}})),n}),[]),m=cj(iq,{variables:p(),notifyOnNetworkStatusChange:!0}),g=m.loading,y=m.error,b=m.data,x=m.refetch,w=(0,a.useCallback)((function(e,t){var n=p(u,e,t),r=v(d,n);x(r)}),[u,d,p,v,x]);return(0,a.useEffect)((function(){w()}),[w]),{data:b,loading:g,error:y,page:o,filtersSelected:d,setPage:i,setSearch:function(e){i(1),s(e)},setFiltersSelected:function(e){i(1),h(e)},updateTaskList:w}},RK=function(){var e,n,r,o,i=h_().questId,l=i?PK.questIdQuery:PK.questDetailsQuery,u=AK(l,i),s=u.data,c=u.loading,f=u.error,d=u.setSearch,h=u.setFiltersSelected,p=u.filtersSelected,v=u.updateTaskList,m=u.page,g=u.setPage,y=ut((0,a.useState)(!1),2),b=y[0],x=y[1],w=ut((0,a.useState)(null),2),S=w[0],_=w[1];return(0,t.jsxs)(jj,{currNavItem:VC.tasks,children:[(0,t.jsx)("div",{className:"border-b border-gray-200 pb-5 sm:flex sm:items-center sm:justify-between",children:(0,t.jsx)(jK,{})}),(0,t.jsx)("div",{className:"p-4 bg-white rounded-lg shadow-lg mt-2",children:(0,t.jsx)(YY,{setSearch:d,setFiltersSelected:h,filtersSelected:p})}),c?(0,t.jsx)(kj,{type:_j.loading,label:"Loading quest tasks..."}):f?(0,t.jsx)(kj,{type:_j.error,label:"Error loading tasks..."}):(0,t.jsx)("div",{children:(null===s||void 0===s||null===(e=s.tasks)||void 0===e?void 0:e.edges.length)>0?(0,t.jsxs)("div",{className:"py-4 bg-white rounded-lg shadow-lg mt-2 flex flex-col gap-1",children:[(0,t.jsx)(GY,{tasks:null===s||void 0===s||null===(n=s.tasks)||void 0===n?void 0:n.edges,onToggle:function(e){var t,n=null===e||void 0===e||null===(t=e.original)||void 0===t?void 0:t.node;_(n),x((function(e){return!e}))}}),(0,t.jsx)(qY,{totalCount:null===s||void 0===s||null===(r=s.tasks)||void 0===r?void 0:r.totalCount,pageInfo:null===s||void 0===s||null===(o=s.tasks)||void 0===o?void 0:o.pageInfo,refetchTable:v,page:m,setPage:g,rowLimit:UC.TaskRowLimit})]}):(0,t.jsx)(kj,{label:"No data found",details:"Try creating a new quest or adjusting filters.",type:_j.noData,children:(0,t.jsx)(F_,{to:"/createQuest",children:(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",children:"Create new quest"})})})}),b&&(0,t.jsx)(_q,{isOpen:b,setOpen:x,selectedTask:S})]})},IK=function(e){var n=e.setFiltersSelected,r=e.typeFilters,o=(0,a.useContext)(Aj),i=o.data,l=o.isLoading,u=o.error;return(0,t.jsx)("div",{children:!l&&!u&&i&&(0,t.jsx)("div",{className:"p-4 bg-white rounded-lg shadow-lg mt-2",children:(0,t.jsx)(mG,{beacons:(null===i||void 0===i?void 0:i.beacons)||[],groups:(null===i||void 0===i?void 0:i.groupTags)||[],services:(null===i||void 0===i?void 0:i.serviceTags)||[],hosts:(null===i||void 0===i?void 0:i.hosts)||[],setFiltersSelected:n,filtersSelected:r})})})},MK=function(e){var n=e.data;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{children:n.name}),(0,t.jsxs)("div",{className:"flex flex-row flex-wrap gap-1",children:[(0,t.jsx)(Xz,{children:null===n||void 0===n?void 0:n.primaryIP}),(0,t.jsx)(Xz,{children:null===n||void 0===n?void 0:n.platform}),n.tags&&(null===n||void 0===n?void 0:n.tags.map((function(e){return(0,t.jsx)(Xz,{children:e.name},e.id)})))]})]})},NK=function(e){var n=e.data,r=new Date,o=d_(),i=Object.values(WC),a=[{id:"name",header:"Host details",accessorFn:function(e){return e},footer:function(e){return e.column.id},enableSorting:!1,cell:function(e){var n=e.getValue();return(0,t.jsx)(MK,{data:n})}},{id:"beaconStatus",header:"Online beacons",accessorFn:function(e){return e.beaconStatus},footer:function(e){return e.column.id},maxSize:100,sortingFn:function(e,t){var n,r,o,i,a,l,u=(null===e||void 0===e||null===(n=e.original)||void 0===n?void 0:n.beaconStatus.online)/((null===e||void 0===e||null===(r=e.original)||void 0===r?void 0:r.beaconStatus.offline)+(null===e||void 0===e||null===(o=e.original)||void 0===o?void 0:o.beaconStatus.online)),s=(null===t||void 0===t||null===(i=t.original)||void 0===i?void 0:i.beaconStatus.online)/((null===t||void 0===t||null===(a=t.original)||void 0===a?void 0:a.beaconStatus.offline)+(null===t||void 0===t||null===(l=t.original)||void 0===l?void 0:l.beaconStatus.online));return us?-1:0},cell:function(e){var n=e.getValue(),r=0===n.online?"red":"gray";return(0,t.jsxs)(Xz,{ml:"1",px:"4",colorScheme:r,fontSize:"font-base",children:[n.online,"/",n.offline+n.online]})}},{id:"beaconPrincipals",header:"Beacon principals",accessorFn:function(e){return e.beaconPrincipals},footer:function(e){return e.column.id},sortingFn:function(e,t){var n,r,o,a,l=null!==e&&void 0!==e&&null!==(n=e.original)&&void 0!==n&&n.beaconPrincipals?null===e||void 0===e||null===(r=e.original)||void 0===r?void 0:r.beaconPrincipals.filter((function(e){return-1!==i.indexOf(e)})).length:0,u=null!==e&&void 0!==e&&null!==(o=e.original)&&void 0!==o&&o.beaconPrincipals?null===t||void 0===t||null===(a=t.original)||void 0===a?void 0:a.beaconPrincipals.filter((function(e){return-1!==i.indexOf(e)})).length:0;return l