import{r as requireLazysizes}from"./lazysizes-B7xYodB-.js";import{jsx,Fragment,jsxs}from"react/jsx-runtime";import*as React from"react";import React__default,{useEffect,createContext,useContext,useState,useCallback,createElement,useRef,forwardRef,useImperativeHandle,Fragment as Fragment$1,useReducer,useMemo,useLayoutEffect,isValidElement}from"react";import{h as buildAriaProps,i as buildDataProps,j as buildHtmlProps,k as classnames,l as globalProps,m as buildCss,F as Flex,I as Icon,n as FlexItem,o as Body$1,p as Caption,A as Avatar,q as domSafeProps,r as Title,s as getAllIcons,S as SectionSeparator,t as Draggable,u as TextInput,v as PropTypes,w as Card,x as noop$3,y as PbReactPopover,z as CircleIconButton,E as Button,H as HighchartsReact,J as Badge,K as joinPresent,N as titleize,O as IconCircle,Q as Image,U as Checkbox,V as Radio}from"./_typeahead-BAFhtQtP.js";import{g as PbTable,D as DateTime$1,a as datePickerHelper,u as useDropdown,o as omitBy,i as isEmpty,m as map,p as partial,j as find$1,k as commonjsGlobal,l as getDefaultExportFromCjs,n as highchartsDarkTheme,q as highchartsTheme,r as noop$4,s as colors,h as PbTextarea}from"./lib--ErPKv63.js";import*as ReactDOM from"react-dom";import ReactDOM__default,{createPortal}from"react-dom";var ls_attrchange={exports:{}};(function(module){(function(window2,factory){if(!window2){return}var globalInstall=function(){factory(window2.lazySizes);window2.removeEventListener("lazyunveilread",globalInstall,true)};factory=factory.bind(null,window2,window2.document);if(module.exports){factory(requireLazysizes())}else if(window2.lazySizes){globalInstall()}else{window2.addEventListener("lazyunveilread",globalInstall,true)}})(typeof window!="undefined"?window:0,(function(window2,document2,lazySizes){var addObserver=function(){var connect,disconnect,observer,connected;var lsCfg=lazySizes.cfg;var attributes={"data-bgset":1,"data-include":1,"data-poster":1,"data-bg":1,"data-script":1};var regClassTest="(\\s|^)("+lsCfg.loadedClass;var docElem=document2.documentElement;var setClass=function(target){lazySizes.rAF((function(){lazySizes.rC(target,lsCfg.loadedClass);if(lsCfg.unloadedClass){lazySizes.rC(target,lsCfg.unloadedClass)}lazySizes.aC(target,lsCfg.lazyClass);if(target.style.display=="none"||target.parentNode&&target.parentNode.style.display=="none"){setTimeout((function(){lazySizes.loader.unveil(target)}),0)}}))};var onMutation=function(mutations){var i,len,mutation,target;for(i=0,len=mutations.length;i{instance.setState((old=>({...old,[key]:functionalUpdate(updater,old[key])})))}}function isFunction$3(d){return d instanceof Function}function isNumberArray(d){return Array.isArray(d)&&d.every((val=>typeof val==="number"))}function flattenBy(arr,getChildren){const flat=[];const recurse=subArr=>{subArr.forEach((item=>{flat.push(item);const children=getChildren(item);if(children!=null&&children.length){recurse(children)}}))};recurse(arr);return flat}function memo(getDeps,fn,opts){let deps=[];let result;return()=>{let depTime;if(opts.key&&opts.debug)depTime=Date.now();const newDeps=getDeps();const depsChanged=newDeps.length!==deps.length||newDeps.some(((dep,index)=>deps[index]!==dep));if(!depsChanged){return result}deps=newDeps;let resultTime;if(opts.key&&opts.debug)resultTime=Date.now();result=fn(...newDeps);opts==null?void 0:opts.onChange==null?void 0:opts.onChange(result);if(opts.key&&opts.debug){if(opts!=null&&opts.debug()){const depEndTime=Math.round((Date.now()-depTime)*100)/100;const resultEndTime=Math.round((Date.now()-resultTime)*100)/100;const resultFpsPercentage=resultEndTime/16;const pad=(str,num)=>{str=String(str);while(str.length{let result=originalRow;for(const key of accessorKey.split(".")){var _result;result=(_result=result)==null?void 0:_result[key]}return result}}else{accessorFn=originalRow=>originalRow[resolvedColumnDef.accessorKey]}}if(!id){throw new Error}let column={id:`${String(id)}`,accessorFn:accessorFn,parent:parent,depth:depth,columnDef:resolvedColumnDef,columns:[],getFlatColumns:memo((()=>[true]),(()=>{var _column$columns;return[column,...(_column$columns=column.columns)==null?void 0:_column$columns.flatMap((d=>d.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugColumns}}),getLeafColumns:memo((()=>[table._getOrderColumnsFn()]),(orderColumns2=>{var _column$columns2;if((_column$columns2=column.columns)!=null&&_column$columns2.length){let leafColumns=column.columns.flatMap((column2=>column2.getLeafColumns()));return orderColumns2(leafColumns)}return[column]}),{key:"column.getLeafColumns",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugColumns}})};column=table._features.reduce(((obj,feature)=>Object.assign(obj,feature.createColumn==null?void 0:feature.createColumn(column,table))),column);return column}function createHeader(table,column,options){var _options$id;const id=(_options$id=options.id)!=null?_options$id:column.id;let header={id:id,column:column,index:options.index,isPlaceholder:!!options.isPlaceholder,placeholderId:options.placeholderId,depth:options.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const leafHeaders=[];const recurseHeader=h=>{if(h.subHeaders&&h.subHeaders.length){h.subHeaders.map(recurseHeader)}leafHeaders.push(h)};recurseHeader(header);return leafHeaders},getContext:()=>({table:table,header:header,column:column})};table._features.forEach((feature=>{Object.assign(header,feature.createHeader==null?void 0:feature.createHeader(header,table))}));return header}const Headers={createTable:table=>({getHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allColumns,leafColumns,left,right)=>{var _left$map$filter,_right$map$filter;const leftColumns=(_left$map$filter=left==null?void 0:left.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_left$map$filter:[];const rightColumns=(_right$map$filter=right==null?void 0:right.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_right$map$filter:[];const centerColumns=leafColumns.filter((column=>!(left!=null&&left.includes(column.id))&&!(right!=null&&right.includes(column.id))));const headerGroups=buildHeaderGroups(allColumns,[...leftColumns,...centerColumns,...rightColumns],table);return headerGroups}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugHeaders}}),getCenterHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allColumns,leafColumns,left,right)=>{leafColumns=leafColumns.filter((column=>!(left!=null&&left.includes(column.id))&&!(right!=null&&right.includes(column.id))));return buildHeaderGroups(allColumns,leafColumns,table,"center")}),{key:false,debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugHeaders}}),getLeftHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.left]),((allColumns,leafColumns,left)=>{var _left$map$filter2;const orderedLeafColumns=(_left$map$filter2=left==null?void 0:left.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_left$map$filter2:[];return buildHeaderGroups(allColumns,orderedLeafColumns,table,"left")}),{key:false,debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugHeaders}}),getRightHeaderGroups:memo((()=>[table.getAllColumns(),table.getVisibleLeafColumns(),table.getState().columnPinning.right]),((allColumns,leafColumns,right)=>{var _right$map$filter2;const orderedLeafColumns=(_right$map$filter2=right==null?void 0:right.map((columnId=>leafColumns.find((d=>d.id===columnId)))).filter(Boolean))!=null?_right$map$filter2:[];return buildHeaderGroups(allColumns,orderedLeafColumns,table,"right")}),{key:false,debug:()=>{var _table$options$debugA4;return(_table$options$debugA4=table.options.debugAll)!=null?_table$options$debugA4:table.options.debugHeaders}}),getFooterGroups:memo((()=>[table.getHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA5;return(_table$options$debugA5=table.options.debugAll)!=null?_table$options$debugA5:table.options.debugHeaders}}),getLeftFooterGroups:memo((()=>[table.getLeftHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA6;return(_table$options$debugA6=table.options.debugAll)!=null?_table$options$debugA6:table.options.debugHeaders}}),getCenterFooterGroups:memo((()=>[table.getCenterHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA7;return(_table$options$debugA7=table.options.debugAll)!=null?_table$options$debugA7:table.options.debugHeaders}}),getRightFooterGroups:memo((()=>[table.getRightHeaderGroups()]),(headerGroups=>[...headerGroups].reverse()),{key:false,debug:()=>{var _table$options$debugA8;return(_table$options$debugA8=table.options.debugAll)!=null?_table$options$debugA8:table.options.debugHeaders}}),getFlatHeaders:memo((()=>[table.getHeaderGroups()]),(headerGroups=>headerGroups.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA9;return(_table$options$debugA9=table.options.debugAll)!=null?_table$options$debugA9:table.options.debugHeaders}}),getLeftFlatHeaders:memo((()=>[table.getLeftHeaderGroups()]),(left=>left.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA10;return(_table$options$debugA10=table.options.debugAll)!=null?_table$options$debugA10:table.options.debugHeaders}}),getCenterFlatHeaders:memo((()=>[table.getCenterHeaderGroups()]),(left=>left.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA11;return(_table$options$debugA11=table.options.debugAll)!=null?_table$options$debugA11:table.options.debugHeaders}}),getRightFlatHeaders:memo((()=>[table.getRightHeaderGroups()]),(left=>left.map((headerGroup=>headerGroup.headers)).flat()),{key:false,debug:()=>{var _table$options$debugA12;return(_table$options$debugA12=table.options.debugAll)!=null?_table$options$debugA12:table.options.debugHeaders}}),getCenterLeafHeaders:memo((()=>[table.getCenterFlatHeaders()]),(flatHeaders=>flatHeaders.filter((header=>{var _header$subHeaders;return!((_header$subHeaders=header.subHeaders)!=null&&_header$subHeaders.length)}))),{key:false,debug:()=>{var _table$options$debugA13;return(_table$options$debugA13=table.options.debugAll)!=null?_table$options$debugA13:table.options.debugHeaders}}),getLeftLeafHeaders:memo((()=>[table.getLeftFlatHeaders()]),(flatHeaders=>flatHeaders.filter((header=>{var _header$subHeaders2;return!((_header$subHeaders2=header.subHeaders)!=null&&_header$subHeaders2.length)}))),{key:false,debug:()=>{var _table$options$debugA14;return(_table$options$debugA14=table.options.debugAll)!=null?_table$options$debugA14:table.options.debugHeaders}}),getRightLeafHeaders:memo((()=>[table.getRightFlatHeaders()]),(flatHeaders=>flatHeaders.filter((header=>{var _header$subHeaders3;return!((_header$subHeaders3=header.subHeaders)!=null&&_header$subHeaders3.length)}))),{key:false,debug:()=>{var _table$options$debugA15;return(_table$options$debugA15=table.options.debugAll)!=null?_table$options$debugA15:table.options.debugHeaders}}),getLeafHeaders:memo((()=>[table.getLeftHeaderGroups(),table.getCenterHeaderGroups(),table.getRightHeaderGroups()]),((left,center,right)=>{var _left$0$headers,_left$,_center$0$headers,_center$,_right$0$headers,_right$;return[...(_left$0$headers=(_left$=left[0])==null?void 0:_left$.headers)!=null?_left$0$headers:[],...(_center$0$headers=(_center$=center[0])==null?void 0:_center$.headers)!=null?_center$0$headers:[],...(_right$0$headers=(_right$=right[0])==null?void 0:_right$.headers)!=null?_right$0$headers:[]].map((header=>header.getLeafHeaders())).flat()}),{key:false,debug:()=>{var _table$options$debugA16;return(_table$options$debugA16=table.options.debugAll)!=null?_table$options$debugA16:table.options.debugHeaders}})})};function buildHeaderGroups(allColumns,columnsToGroup,table,headerFamily){var _headerGroups$0$heade,_headerGroups$;let maxDepth=0;const findMaxDepth=function(columns,depth){if(depth===void 0){depth=1}maxDepth=Math.max(maxDepth,depth);columns.filter((column=>column.getIsVisible())).forEach((column=>{var _column$columns;if((_column$columns=column.columns)!=null&&_column$columns.length){findMaxDepth(column.columns,depth+1)}}),0)};findMaxDepth(allColumns);let headerGroups=[];const createHeaderGroup=(headersToGroup,depth)=>{const headerGroup={depth:depth,id:[headerFamily,`${depth}`].filter(Boolean).join("_"),headers:[]};const pendingParentHeaders=[];headersToGroup.forEach((headerToGroup=>{const latestPendingParentHeader=[...pendingParentHeaders].reverse()[0];const isLeafHeader=headerToGroup.column.depth===headerGroup.depth;let column;let isPlaceholder=false;if(isLeafHeader&&headerToGroup.column.parent){column=headerToGroup.column.parent}else{column=headerToGroup.column;isPlaceholder=true}if(latestPendingParentHeader&&(latestPendingParentHeader==null?void 0:latestPendingParentHeader.column)===column){latestPendingParentHeader.subHeaders.push(headerToGroup)}else{const header=createHeader(table,column,{id:[headerFamily,depth,column.id,headerToGroup==null?void 0:headerToGroup.id].filter(Boolean).join("_"),isPlaceholder:isPlaceholder,placeholderId:isPlaceholder?`${pendingParentHeaders.filter((d=>d.column===column)).length}`:void 0,depth:depth,index:pendingParentHeaders.length});header.subHeaders.push(headerToGroup);pendingParentHeaders.push(header)}headerGroup.headers.push(headerToGroup);headerToGroup.headerGroup=headerGroup}));headerGroups.push(headerGroup);if(depth>0){createHeaderGroup(pendingParentHeaders,depth-1)}};const bottomHeaders=columnsToGroup.map(((column,index)=>createHeader(table,column,{depth:maxDepth,index:index})));createHeaderGroup(bottomHeaders,maxDepth-1);headerGroups.reverse();const recurseHeadersForSpans=headers=>{const filteredHeaders=headers.filter((header=>header.column.getIsVisible()));return filteredHeaders.map((header=>{let colSpan=0;let rowSpan=0;let childRowSpans=[0];if(header.subHeaders&&header.subHeaders.length){childRowSpans=[];recurseHeadersForSpans(header.subHeaders).forEach((_ref=>{let{colSpan:childColSpan,rowSpan:childRowSpan}=_ref;colSpan+=childColSpan;childRowSpans.push(childRowSpan)}))}else{colSpan=1}const minChildRowSpan=Math.min(...childRowSpans);rowSpan=rowSpan+minChildRowSpan;header.colSpan=colSpan;header.rowSpan=rowSpan;return{colSpan:colSpan,rowSpan:rowSpan}}))};recurseHeadersForSpans((_headerGroups$0$heade=(_headerGroups$=headerGroups[0])==null?void 0:_headerGroups$.headers)!=null?_headerGroups$0$heade:[]);return headerGroups}const defaultColumnSizing={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER};const getDefaultColumnSizingInfoState=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:false,columnSizingStart:[]});const ColumnSizing={getDefaultColumnDef:()=>defaultColumnSizing,getInitialState:state=>({columnSizing:{},columnSizingInfo:getDefaultColumnSizingInfoState(),...state}),getDefaultOptions:table=>({columnResizeMode:"onEnd",onColumnSizingChange:makeStateUpdater("columnSizing",table),onColumnSizingInfoChange:makeStateUpdater("columnSizingInfo",table)}),createColumn:(column,table)=>({getSize:()=>{var _column$columnDef$min,_ref,_column$columnDef$max;const columnSize=table.getState().columnSizing[column.id];return Math.min(Math.max((_column$columnDef$min=column.columnDef.minSize)!=null?_column$columnDef$min:defaultColumnSizing.minSize,(_ref=columnSize!=null?columnSize:column.columnDef.size)!=null?_ref:defaultColumnSizing.size),(_column$columnDef$max=column.columnDef.maxSize)!=null?_column$columnDef$max:defaultColumnSizing.maxSize)},getStart:position=>{const columns=!position?table.getVisibleLeafColumns():position==="left"?table.getLeftVisibleLeafColumns():table.getRightVisibleLeafColumns();const index=columns.findIndex((d=>d.id===column.id));if(index>0){const prevSiblingColumn=columns[index-1];return prevSiblingColumn.getStart(position)+prevSiblingColumn.getSize()}return 0},resetSize:()=>{table.setColumnSizing((_ref2=>{let{[column.id]:_,...rest}=_ref2;return rest}))},getCanResize:()=>{var _column$columnDef$ena,_table$options$enable;return((_column$columnDef$ena=column.columnDef.enableResizing)!=null?_column$columnDef$ena:true)&&((_table$options$enable=table.options.enableColumnResizing)!=null?_table$options$enable:true)},getIsResizing:()=>table.getState().columnSizingInfo.isResizingColumn===column.id}),createHeader:(header,table)=>({getSize:()=>{let sum2=0;const recurse=header2=>{if(header2.subHeaders.length){header2.subHeaders.forEach(recurse)}else{var _header$column$getSiz;sum2+=(_header$column$getSiz=header2.column.getSize())!=null?_header$column$getSiz:0}};recurse(header);return sum2},getStart:()=>{if(header.index>0){const prevSiblingHeader=header.headerGroup.headers[header.index-1];return prevSiblingHeader.getStart()+prevSiblingHeader.getSize()}return 0},getResizeHandler:()=>{const column=table.getColumn(header.column.id);const canResize=column==null?void 0:column.getCanResize();return e=>{if(!column||!canResize){return}e.persist==null?void 0:e.persist();if(isTouchStartEvent(e)){if(e.touches&&e.touches.length>1){return}}const startSize=header.getSize();const columnSizingStart=header?header.getLeafHeaders().map((d=>[d.column.id,d.column.getSize()])):[[column.id,column.getSize()]];const clientX=isTouchStartEvent(e)?Math.round(e.touches[0].clientX):e.clientX;const newColumnSizing={};const updateOffset=(eventType,clientXPos)=>{if(typeof clientXPos!=="number"){return}table.setColumnSizingInfo((old=>{var _old$startOffset,_old$startSize;const deltaOffset=clientXPos-((_old$startOffset=old==null?void 0:old.startOffset)!=null?_old$startOffset:0);const deltaPercentage=Math.max(deltaOffset/((_old$startSize=old==null?void 0:old.startSize)!=null?_old$startSize:0),-.999999);old.columnSizingStart.forEach((_ref3=>{let[columnId,headerSize]=_ref3;newColumnSizing[columnId]=Math.round(Math.max(headerSize+headerSize*deltaPercentage,0)*100)/100}));return{...old,deltaOffset:deltaOffset,deltaPercentage:deltaPercentage}}));if(table.options.columnResizeMode==="onChange"||eventType==="end"){table.setColumnSizing((old=>({...old,...newColumnSizing})))}};const onMove=clientXPos=>updateOffset("move",clientXPos);const onEnd=clientXPos=>{updateOffset("end",clientXPos);table.setColumnSizingInfo((old=>({...old,isResizingColumn:false,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))};const mouseEvents={moveHandler:e2=>onMove(e2.clientX),upHandler:e2=>{document.removeEventListener("mousemove",mouseEvents.moveHandler);document.removeEventListener("mouseup",mouseEvents.upHandler);onEnd(e2.clientX)}};const touchEvents={moveHandler:e2=>{if(e2.cancelable){e2.preventDefault();e2.stopPropagation()}onMove(e2.touches[0].clientX);return false},upHandler:e2=>{var _e$touches$;document.removeEventListener("touchmove",touchEvents.moveHandler);document.removeEventListener("touchend",touchEvents.upHandler);if(e2.cancelable){e2.preventDefault();e2.stopPropagation()}onEnd((_e$touches$=e2.touches[0])==null?void 0:_e$touches$.clientX)}};const passiveIfSupported=passiveEventSupported()?{passive:false}:false;if(isTouchStartEvent(e)){document.addEventListener("touchmove",touchEvents.moveHandler,passiveIfSupported);document.addEventListener("touchend",touchEvents.upHandler,passiveIfSupported)}else{document.addEventListener("mousemove",mouseEvents.moveHandler,passiveIfSupported);document.addEventListener("mouseup",mouseEvents.upHandler,passiveIfSupported)}table.setColumnSizingInfo((old=>({...old,startOffset:clientX,startSize:startSize,deltaOffset:0,deltaPercentage:0,columnSizingStart:columnSizingStart,isResizingColumn:column.id})))}}}),createTable:table=>({setColumnSizing:updater=>table.options.onColumnSizingChange==null?void 0:table.options.onColumnSizingChange(updater),setColumnSizingInfo:updater=>table.options.onColumnSizingInfoChange==null?void 0:table.options.onColumnSizingInfoChange(updater),resetColumnSizing:defaultState2=>{var _table$initialState$c;table.setColumnSizing(defaultState2?{}:(_table$initialState$c=table.initialState.columnSizing)!=null?_table$initialState$c:{})},resetHeaderSizeInfo:defaultState2=>{var _table$initialState$c2;table.setColumnSizingInfo(defaultState2?getDefaultColumnSizingInfoState():(_table$initialState$c2=table.initialState.columnSizingInfo)!=null?_table$initialState$c2:getDefaultColumnSizingInfoState())},getTotalSize:()=>{var _table$getHeaderGroup,_table$getHeaderGroup2;return(_table$getHeaderGroup=(_table$getHeaderGroup2=table.getHeaderGroups()[0])==null?void 0:_table$getHeaderGroup2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getHeaderGroup:0},getLeftTotalSize:()=>{var _table$getLeftHeaderG,_table$getLeftHeaderG2;return(_table$getLeftHeaderG=(_table$getLeftHeaderG2=table.getLeftHeaderGroups()[0])==null?void 0:_table$getLeftHeaderG2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getLeftHeaderG:0},getCenterTotalSize:()=>{var _table$getCenterHeade,_table$getCenterHeade2;return(_table$getCenterHeade=(_table$getCenterHeade2=table.getCenterHeaderGroups()[0])==null?void 0:_table$getCenterHeade2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getCenterHeade:0},getRightTotalSize:()=>{var _table$getRightHeader,_table$getRightHeader2;return(_table$getRightHeader=(_table$getRightHeader2=table.getRightHeaderGroups()[0])==null?void 0:_table$getRightHeader2.headers.reduce(((sum2,header)=>sum2+header.getSize()),0))!=null?_table$getRightHeader:0}})};let passiveSupported$1=null;function passiveEventSupported(){if(typeof passiveSupported$1==="boolean")return passiveSupported$1;let supported=false;try{const options={get passive(){supported=true;return false}};const noop2=()=>{};window.addEventListener("test",noop2,options);window.removeEventListener("test",noop2)}catch(err){supported=false}passiveSupported$1=supported;return passiveSupported$1}function isTouchStartEvent(e){return e.type==="touchstart"}const Expanding={getInitialState:state=>({expanded:{},...state}),getDefaultOptions:table=>({onExpandedChange:makeStateUpdater("expanded",table),paginateExpandedRows:true}),createTable:table=>{let registered=false;let queued=false;return{_autoResetExpanded:()=>{var _ref,_table$options$autoRe;if(!registered){table._queue((()=>{registered=true}));return}if((_ref=(_table$options$autoRe=table.options.autoResetAll)!=null?_table$options$autoRe:table.options.autoResetExpanded)!=null?_ref:!table.options.manualExpanding){if(queued)return;queued=true;table._queue((()=>{table.resetExpanded();queued=false}))}},setExpanded:updater=>table.options.onExpandedChange==null?void 0:table.options.onExpandedChange(updater),toggleAllRowsExpanded:expanded=>{if(expanded!=null?expanded:!table.getIsAllRowsExpanded()){table.setExpanded(true)}else{table.setExpanded({})}},resetExpanded:defaultState2=>{var _table$initialState$e,_table$initialState;table.setExpanded(defaultState2?{}:(_table$initialState$e=(_table$initialState=table.initialState)==null?void 0:_table$initialState.expanded)!=null?_table$initialState$e:{})},getCanSomeRowsExpand:()=>table.getPrePaginationRowModel().flatRows.some((row=>row.getCanExpand())),getToggleAllRowsExpandedHandler:()=>e=>{e.persist==null?void 0:e.persist();table.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const expanded=table.getState().expanded;return expanded===true||Object.values(expanded).some(Boolean)},getIsAllRowsExpanded:()=>{const expanded=table.getState().expanded;if(typeof expanded==="boolean"){return expanded===true}if(!Object.keys(expanded).length){return false}if(table.getRowModel().flatRows.some((row=>!row.getIsExpanded()))){return false}return true},getExpandedDepth:()=>{let maxDepth=0;const rowIds=table.getState().expanded===true?Object.keys(table.getRowModel().rowsById):Object.keys(table.getState().expanded);rowIds.forEach((id=>{const splitId=id.split(".");maxDepth=Math.max(maxDepth,splitId.length)}));return maxDepth},getPreExpandedRowModel:()=>table.getSortedRowModel(),getExpandedRowModel:()=>{if(!table._getExpandedRowModel&&table.options.getExpandedRowModel){table._getExpandedRowModel=table.options.getExpandedRowModel(table)}if(table.options.manualExpanding||!table._getExpandedRowModel){return table.getPreExpandedRowModel()}return table._getExpandedRowModel()}}},createRow:(row,table)=>({toggleExpanded:expanded=>{table.setExpanded((old=>{var _expanded;const exists=old===true?true:!!(old!=null&&old[row.id]);let oldExpanded={};if(old===true){Object.keys(table.getRowModel().rowsById).forEach((rowId=>{oldExpanded[rowId]=true}))}else{oldExpanded=old}expanded=(_expanded=expanded)!=null?_expanded:!exists;if(!exists&&expanded){return{...oldExpanded,[row.id]:true}}if(exists&&!expanded){const{[row.id]:_,...rest}=oldExpanded;return rest}return old}))},getIsExpanded:()=>{var _table$options$getIsR;const expanded=table.getState().expanded;return!!((_table$options$getIsR=table.options.getIsRowExpanded==null?void 0:table.options.getIsRowExpanded(row))!=null?_table$options$getIsR:expanded===true||(expanded==null?void 0:expanded[row.id]))},getCanExpand:()=>{var _table$options$getRow,_table$options$enable,_row$subRows;return(_table$options$getRow=table.options.getRowCanExpand==null?void 0:table.options.getRowCanExpand(row))!=null?_table$options$getRow:((_table$options$enable=table.options.enableExpanding)!=null?_table$options$enable:true)&&!!((_row$subRows=row.subRows)!=null&&_row$subRows.length)},getToggleExpandedHandler:()=>{const canExpand=row.getCanExpand();return()=>{if(!canExpand)return;row.toggleExpanded()}}})};const includesString=(row,columnId,filterValue)=>{var _row$getValue,_row$getValue$toStrin,_row$getValue$toStrin2;const search=filterValue.toLowerCase();return Boolean((_row$getValue=row.getValue(columnId))==null?void 0:(_row$getValue$toStrin=_row$getValue.toString())==null?void 0:(_row$getValue$toStrin2=_row$getValue$toStrin.toLowerCase())==null?void 0:_row$getValue$toStrin2.includes(search))};includesString.autoRemove=val=>testFalsey(val);const includesStringSensitive=(row,columnId,filterValue)=>{var _row$getValue2,_row$getValue2$toStri;return Boolean((_row$getValue2=row.getValue(columnId))==null?void 0:(_row$getValue2$toStri=_row$getValue2.toString())==null?void 0:_row$getValue2$toStri.includes(filterValue))};includesStringSensitive.autoRemove=val=>testFalsey(val);const equalsString=(row,columnId,filterValue)=>{var _row$getValue3,_row$getValue3$toStri;return((_row$getValue3=row.getValue(columnId))==null?void 0:(_row$getValue3$toStri=_row$getValue3.toString())==null?void 0:_row$getValue3$toStri.toLowerCase())===(filterValue==null?void 0:filterValue.toLowerCase())};equalsString.autoRemove=val=>testFalsey(val);const arrIncludes=(row,columnId,filterValue)=>{var _row$getValue4;return(_row$getValue4=row.getValue(columnId))==null?void 0:_row$getValue4.includes(filterValue)};arrIncludes.autoRemove=val=>testFalsey(val)||!(val!=null&&val.length);const arrIncludesAll=(row,columnId,filterValue)=>!filterValue.some((val=>{var _row$getValue5;return!((_row$getValue5=row.getValue(columnId))!=null&&_row$getValue5.includes(val))}));arrIncludesAll.autoRemove=val=>testFalsey(val)||!(val!=null&&val.length);const arrIncludesSome=(row,columnId,filterValue)=>filterValue.some((val=>{var _row$getValue6;return(_row$getValue6=row.getValue(columnId))==null?void 0:_row$getValue6.includes(val)}));arrIncludesSome.autoRemove=val=>testFalsey(val)||!(val!=null&&val.length);const equals=(row,columnId,filterValue)=>row.getValue(columnId)===filterValue;equals.autoRemove=val=>testFalsey(val);const weakEquals=(row,columnId,filterValue)=>row.getValue(columnId)==filterValue;weakEquals.autoRemove=val=>testFalsey(val);const inNumberRange=(row,columnId,filterValue)=>{let[min2,max2]=filterValue;const rowValue=row.getValue(columnId);return rowValue>=min2&&rowValue<=max2};inNumberRange.resolveFilterValue=val=>{let[unsafeMin,unsafeMax]=val;let parsedMin=typeof unsafeMin!=="number"?parseFloat(unsafeMin):unsafeMin;let parsedMax=typeof unsafeMax!=="number"?parseFloat(unsafeMax):unsafeMax;let min2=unsafeMin===null||Number.isNaN(parsedMin)?-Infinity:parsedMin;let max2=unsafeMax===null||Number.isNaN(parsedMax)?Infinity:parsedMax;if(min2>max2){const temp=min2;min2=max2;max2=temp}return[min2,max2]};inNumberRange.autoRemove=val=>testFalsey(val)||testFalsey(val[0])&&testFalsey(val[1]);const filterFns={includesString:includesString,includesStringSensitive:includesStringSensitive,equalsString:equalsString,arrIncludes:arrIncludes,arrIncludesAll:arrIncludesAll,arrIncludesSome:arrIncludesSome,equals:equals,weakEquals:weakEquals,inNumberRange:inNumberRange};function testFalsey(val){return val===void 0||val===null||val===""}const Filters={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:state=>({columnFilters:[],globalFilter:void 0,...state}),getDefaultOptions:table=>({onColumnFiltersChange:makeStateUpdater("columnFilters",table),onGlobalFilterChange:makeStateUpdater("globalFilter",table),filterFromLeafRows:false,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:column=>{var _table$getCoreRowMode,_table$getCoreRowMode2;const value=(_table$getCoreRowMode=table.getCoreRowModel().flatRows[0])==null?void 0:(_table$getCoreRowMode2=_table$getCoreRowMode._getAllCellsByColumnId()[column.id])==null?void 0:_table$getCoreRowMode2.getValue();return typeof value==="string"||typeof value==="number"}}),createColumn:(column,table)=>({getAutoFilterFn:()=>{const firstRow=table.getCoreRowModel().flatRows[0];const value=firstRow==null?void 0:firstRow.getValue(column.id);if(typeof value==="string"){return filterFns.includesString}if(typeof value==="number"){return filterFns.inNumberRange}if(typeof value==="boolean"){return filterFns.equals}if(value!==null&&typeof value==="object"){return filterFns.equals}if(Array.isArray(value)){return filterFns.arrIncludes}return filterFns.weakEquals},getFilterFn:()=>{var _table$options$filter,_table$options$filter2;return isFunction$3(column.columnDef.filterFn)?column.columnDef.filterFn:column.columnDef.filterFn==="auto"?column.getAutoFilterFn():(_table$options$filter=(_table$options$filter2=table.options.filterFns)==null?void 0:_table$options$filter2[column.columnDef.filterFn])!=null?_table$options$filter:filterFns[column.columnDef.filterFn]},getCanFilter:()=>{var _column$columnDef$ena,_table$options$enable,_table$options$enable2;return((_column$columnDef$ena=column.columnDef.enableColumnFilter)!=null?_column$columnDef$ena:true)&&((_table$options$enable=table.options.enableColumnFilters)!=null?_table$options$enable:true)&&((_table$options$enable2=table.options.enableFilters)!=null?_table$options$enable2:true)&&!!column.accessorFn},getCanGlobalFilter:()=>{var _column$columnDef$ena2,_table$options$enable3,_table$options$enable4,_table$options$getCol;return((_column$columnDef$ena2=column.columnDef.enableGlobalFilter)!=null?_column$columnDef$ena2:true)&&((_table$options$enable3=table.options.enableGlobalFilter)!=null?_table$options$enable3:true)&&((_table$options$enable4=table.options.enableFilters)!=null?_table$options$enable4:true)&&((_table$options$getCol=table.options.getColumnCanGlobalFilter==null?void 0:table.options.getColumnCanGlobalFilter(column))!=null?_table$options$getCol:true)&&!!column.accessorFn},getIsFiltered:()=>column.getFilterIndex()>-1,getFilterValue:()=>{var _table$getState$colum,_table$getState$colum2;return(_table$getState$colum=table.getState().columnFilters)==null?void 0:(_table$getState$colum2=_table$getState$colum.find((d=>d.id===column.id)))==null?void 0:_table$getState$colum2.value},getFilterIndex:()=>{var _table$getState$colum3,_table$getState$colum4;return(_table$getState$colum3=(_table$getState$colum4=table.getState().columnFilters)==null?void 0:_table$getState$colum4.findIndex((d=>d.id===column.id)))!=null?_table$getState$colum3:-1},setFilterValue:value=>{table.setColumnFilters((old=>{const filterFn=column.getFilterFn();const previousfilter=old==null?void 0:old.find((d=>d.id===column.id));const newFilter=functionalUpdate(value,previousfilter?previousfilter.value:void 0);if(shouldAutoRemoveFilter(filterFn,newFilter,column)){var _old$filter;return(_old$filter=old==null?void 0:old.filter((d=>d.id!==column.id)))!=null?_old$filter:[]}const newFilterObj={id:column.id,value:newFilter};if(previousfilter){var _old$map;return(_old$map=old==null?void 0:old.map((d=>{if(d.id===column.id){return newFilterObj}return d})))!=null?_old$map:[]}if(old!=null&&old.length){return[...old,newFilterObj]}return[newFilterObj]}))},_getFacetedRowModel:table.options.getFacetedRowModel&&table.options.getFacetedRowModel(table,column.id),getFacetedRowModel:()=>{if(!column._getFacetedRowModel){return table.getPreFilteredRowModel()}return column._getFacetedRowModel()},_getFacetedUniqueValues:table.options.getFacetedUniqueValues&&table.options.getFacetedUniqueValues(table,column.id),getFacetedUniqueValues:()=>{if(!column._getFacetedUniqueValues){return new Map}return column._getFacetedUniqueValues()},_getFacetedMinMaxValues:table.options.getFacetedMinMaxValues&&table.options.getFacetedMinMaxValues(table,column.id),getFacetedMinMaxValues:()=>{if(!column._getFacetedMinMaxValues){return void 0}return column._getFacetedMinMaxValues()}}),createRow:(row,table)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:table=>({getGlobalAutoFilterFn:()=>filterFns.includesString,getGlobalFilterFn:()=>{var _table$options$filter3,_table$options$filter4;const{globalFilterFn:globalFilterFn}=table.options;return isFunction$3(globalFilterFn)?globalFilterFn:globalFilterFn==="auto"?table.getGlobalAutoFilterFn():(_table$options$filter3=(_table$options$filter4=table.options.filterFns)==null?void 0:_table$options$filter4[globalFilterFn])!=null?_table$options$filter3:filterFns[globalFilterFn]},setColumnFilters:updater=>{const leafColumns=table.getAllLeafColumns();const updateFn=old=>{var _functionalUpdate;return(_functionalUpdate=functionalUpdate(updater,old))==null?void 0:_functionalUpdate.filter((filter=>{const column=leafColumns.find((d=>d.id===filter.id));if(column){const filterFn=column.getFilterFn();if(shouldAutoRemoveFilter(filterFn,filter.value,column)){return false}}return true}))};table.options.onColumnFiltersChange==null?void 0:table.options.onColumnFiltersChange(updateFn)},setGlobalFilter:updater=>{table.options.onGlobalFilterChange==null?void 0:table.options.onGlobalFilterChange(updater)},resetGlobalFilter:defaultState2=>{table.setGlobalFilter(defaultState2?void 0:table.initialState.globalFilter)},resetColumnFilters:defaultState2=>{var _table$initialState$c,_table$initialState;table.setColumnFilters(defaultState2?[]:(_table$initialState$c=(_table$initialState=table.initialState)==null?void 0:_table$initialState.columnFilters)!=null?_table$initialState$c:[])},getPreFilteredRowModel:()=>table.getCoreRowModel(),getFilteredRowModel:()=>{if(!table._getFilteredRowModel&&table.options.getFilteredRowModel){table._getFilteredRowModel=table.options.getFilteredRowModel(table)}if(table.options.manualFiltering||!table._getFilteredRowModel){return table.getPreFilteredRowModel()}return table._getFilteredRowModel()},_getGlobalFacetedRowModel:table.options.getFacetedRowModel&&table.options.getFacetedRowModel(table,"__global__"),getGlobalFacetedRowModel:()=>{if(table.options.manualFiltering||!table._getGlobalFacetedRowModel){return table.getPreFilteredRowModel()}return table._getGlobalFacetedRowModel()},_getGlobalFacetedUniqueValues:table.options.getFacetedUniqueValues&&table.options.getFacetedUniqueValues(table,"__global__"),getGlobalFacetedUniqueValues:()=>{if(!table._getGlobalFacetedUniqueValues){return new Map}return table._getGlobalFacetedUniqueValues()},_getGlobalFacetedMinMaxValues:table.options.getFacetedMinMaxValues&&table.options.getFacetedMinMaxValues(table,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(!table._getGlobalFacetedMinMaxValues){return}return table._getGlobalFacetedMinMaxValues()}})};function shouldAutoRemoveFilter(filterFn,value,column){return(filterFn&&filterFn.autoRemove?filterFn.autoRemove(value,column):false)||typeof value==="undefined"||typeof value==="string"&&!value}const sum=(columnId,_leafRows,childRows)=>childRows.reduce(((sum2,next)=>{const nextValue2=next.getValue(columnId);return sum2+(typeof nextValue2==="number"?nextValue2:0)}),0);const min$1=(columnId,_leafRows,childRows)=>{let min2;childRows.forEach((row=>{const value=row.getValue(columnId);if(value!=null&&(min2>value||min2===void 0&&value>=value)){min2=value}}));return min2};const max=(columnId,_leafRows,childRows)=>{let max2;childRows.forEach((row=>{const value=row.getValue(columnId);if(value!=null&&(max2=value)){max2=value}}));return max2};const extent=(columnId,_leafRows,childRows)=>{let min2;let max2;childRows.forEach((row=>{const value=row.getValue(columnId);if(value!=null){if(min2===void 0){if(value>=value)min2=max2=value}else{if(min2>value)min2=value;if(max2{let count2=0;let sum2=0;leafRows.forEach((row=>{let value=row.getValue(columnId);if(value!=null&&(value=+value)>=value){++count2,sum2+=value}}));if(count2)return sum2/count2;return};const median=(columnId,leafRows)=>{if(!leafRows.length){return}const values=leafRows.map((row=>row.getValue(columnId)));if(!isNumberArray(values)){return}if(values.length===1){return values[0]}const mid=Math.floor(values.length/2);const nums=values.sort(((a,b)=>a-b));return values.length%2!==0?nums[mid]:(nums[mid-1]+nums[mid])/2};const unique=(columnId,leafRows)=>Array.from(new Set(leafRows.map((d=>d.getValue(columnId)))).values());const uniqueCount=(columnId,leafRows)=>new Set(leafRows.map((d=>d.getValue(columnId)))).size;const count=(_columnId,leafRows)=>leafRows.length;const aggregationFns={sum:sum,min:min$1,max:max,extent:extent,mean:mean,median:median,unique:unique,uniqueCount:uniqueCount,count:count};const Grouping={getDefaultColumnDef:()=>({aggregatedCell:props=>{var _toString,_props$getValue;return(_toString=(_props$getValue=props.getValue())==null?void 0:_props$getValue.toString==null?void 0:_props$getValue.toString())!=null?_toString:null},aggregationFn:"auto"}),getInitialState:state=>({grouping:[],...state}),getDefaultOptions:table=>({onGroupingChange:makeStateUpdater("grouping",table),groupedColumnMode:"reorder"}),createColumn:(column,table)=>({toggleGrouping:()=>{table.setGrouping((old=>{if(old!=null&&old.includes(column.id)){return old.filter((d=>d!==column.id))}return[...old!=null?old:[],column.id]}))},getCanGroup:()=>{var _ref,_ref2,_ref3,_column$columnDef$ena;return(_ref=(_ref2=(_ref3=(_column$columnDef$ena=column.columnDef.enableGrouping)!=null?_column$columnDef$ena:true)!=null?_ref3:table.options.enableGrouping)!=null?_ref2:true)!=null?_ref:!!column.accessorFn},getIsGrouped:()=>{var _table$getState$group;return(_table$getState$group=table.getState().grouping)==null?void 0:_table$getState$group.includes(column.id)},getGroupedIndex:()=>{var _table$getState$group2;return(_table$getState$group2=table.getState().grouping)==null?void 0:_table$getState$group2.indexOf(column.id)},getToggleGroupingHandler:()=>{const canGroup=column.getCanGroup();return()=>{if(!canGroup)return;column.toggleGrouping()}},getAutoAggregationFn:()=>{const firstRow=table.getCoreRowModel().flatRows[0];const value=firstRow==null?void 0:firstRow.getValue(column.id);if(typeof value==="number"){return aggregationFns.sum}if(Object.prototype.toString.call(value)==="[object Date]"){return aggregationFns.extent}},getAggregationFn:()=>{var _table$options$aggreg,_table$options$aggreg2;if(!column){throw new Error}return isFunction$3(column.columnDef.aggregationFn)?column.columnDef.aggregationFn:column.columnDef.aggregationFn==="auto"?column.getAutoAggregationFn():(_table$options$aggreg=(_table$options$aggreg2=table.options.aggregationFns)==null?void 0:_table$options$aggreg2[column.columnDef.aggregationFn])!=null?_table$options$aggreg:aggregationFns[column.columnDef.aggregationFn]}}),createTable:table=>({setGrouping:updater=>table.options.onGroupingChange==null?void 0:table.options.onGroupingChange(updater),resetGrouping:defaultState2=>{var _table$initialState$g,_table$initialState;table.setGrouping(defaultState2?[]:(_table$initialState$g=(_table$initialState=table.initialState)==null?void 0:_table$initialState.grouping)!=null?_table$initialState$g:[])},getPreGroupedRowModel:()=>table.getFilteredRowModel(),getGroupedRowModel:()=>{if(!table._getGroupedRowModel&&table.options.getGroupedRowModel){table._getGroupedRowModel=table.options.getGroupedRowModel(table)}if(table.options.manualGrouping||!table._getGroupedRowModel){return table.getPreGroupedRowModel()}return table._getGroupedRowModel()}}),createRow:(row,table)=>({getIsGrouped:()=>!!row.groupingColumnId,getGroupingValue:columnId=>{if(row._groupingValuesCache.hasOwnProperty(columnId)){return row._groupingValuesCache[columnId]}const column=table.getColumn(columnId);if(!(column!=null&&column.columnDef.getGroupingValue)){return row.getValue(columnId)}row._groupingValuesCache[columnId]=column.columnDef.getGroupingValue(row.original);return row._groupingValuesCache[columnId]},_groupingValuesCache:{}}),createCell:(cell,column,row,table)=>({getIsGrouped:()=>column.getIsGrouped()&&column.id===row.groupingColumnId,getIsPlaceholder:()=>!cell.getIsGrouped()&&column.getIsGrouped(),getIsAggregated:()=>{var _row$subRows;return!cell.getIsGrouped()&&!cell.getIsPlaceholder()&&!!((_row$subRows=row.subRows)!=null&&_row$subRows.length)}})};function orderColumns(leafColumns,grouping,groupedColumnMode){if(!(grouping!=null&&grouping.length)||!groupedColumnMode){return leafColumns}const nonGroupingColumns=leafColumns.filter((col=>!grouping.includes(col.id)));if(groupedColumnMode==="remove"){return nonGroupingColumns}const groupingColumns=grouping.map((g=>leafColumns.find((col=>col.id===g)))).filter(Boolean);return[...groupingColumns,...nonGroupingColumns]}const Ordering={getInitialState:state=>({columnOrder:[],...state}),getDefaultOptions:table=>({onColumnOrderChange:makeStateUpdater("columnOrder",table)}),createTable:table=>({setColumnOrder:updater=>table.options.onColumnOrderChange==null?void 0:table.options.onColumnOrderChange(updater),resetColumnOrder:defaultState2=>{var _table$initialState$c;table.setColumnOrder(defaultState2?[]:(_table$initialState$c=table.initialState.columnOrder)!=null?_table$initialState$c:[])},_getOrderColumnsFn:memo((()=>[table.getState().columnOrder,table.getState().grouping,table.options.groupedColumnMode]),((columnOrder,grouping,groupedColumnMode)=>columns=>{let orderedColumns=[];if(!(columnOrder!=null&&columnOrder.length)){orderedColumns=columns}else{const columnOrderCopy=[...columnOrder];const columnsCopy=[...columns];while(columnsCopy.length&&columnOrderCopy.length){const targetColumnId=columnOrderCopy.shift();const foundIndex=columnsCopy.findIndex((d=>d.id===targetColumnId));if(foundIndex>-1){orderedColumns.push(columnsCopy.splice(foundIndex,1)[0])}}orderedColumns=[...orderedColumns,...columnsCopy]}return orderColumns(orderedColumns,grouping,groupedColumnMode)}),{key:false})})};const defaultPageIndex=0;const defaultPageSize=10;const getDefaultPaginationState=()=>({pageIndex:defaultPageIndex,pageSize:defaultPageSize});const Pagination$1={getInitialState:state=>({...state,pagination:{...getDefaultPaginationState(),...state==null?void 0:state.pagination}}),getDefaultOptions:table=>({onPaginationChange:makeStateUpdater("pagination",table)}),createTable:table=>{let registered=false;let queued=false;return{_autoResetPageIndex:()=>{var _ref,_table$options$autoRe;if(!registered){table._queue((()=>{registered=true}));return}if((_ref=(_table$options$autoRe=table.options.autoResetAll)!=null?_table$options$autoRe:table.options.autoResetPageIndex)!=null?_ref:!table.options.manualPagination){if(queued)return;queued=true;table._queue((()=>{table.resetPageIndex();queued=false}))}},setPagination:updater=>{const safeUpdater=old=>{let newState=functionalUpdate(updater,old);return newState};return table.options.onPaginationChange==null?void 0:table.options.onPaginationChange(safeUpdater)},resetPagination:defaultState2=>{var _table$initialState$p;table.setPagination(defaultState2?getDefaultPaginationState():(_table$initialState$p=table.initialState.pagination)!=null?_table$initialState$p:getDefaultPaginationState())},setPageIndex:updater=>{table.setPagination((old=>{let pageIndex=functionalUpdate(updater,old.pageIndex);const maxPageIndex=typeof table.options.pageCount==="undefined"||table.options.pageCount===-1?Number.MAX_SAFE_INTEGER:table.options.pageCount-1;pageIndex=Math.max(0,Math.min(pageIndex,maxPageIndex));return{...old,pageIndex:pageIndex}}))},resetPageIndex:defaultState2=>{var _table$initialState$p2,_table$initialState,_table$initialState$p3;table.setPageIndex(defaultState2?defaultPageIndex:(_table$initialState$p2=(_table$initialState=table.initialState)==null?void 0:(_table$initialState$p3=_table$initialState.pagination)==null?void 0:_table$initialState$p3.pageIndex)!=null?_table$initialState$p2:defaultPageIndex)},resetPageSize:defaultState2=>{var _table$initialState$p4,_table$initialState2,_table$initialState2$;table.setPageSize(defaultState2?defaultPageSize:(_table$initialState$p4=(_table$initialState2=table.initialState)==null?void 0:(_table$initialState2$=_table$initialState2.pagination)==null?void 0:_table$initialState2$.pageSize)!=null?_table$initialState$p4:defaultPageSize)},setPageSize:updater=>{table.setPagination((old=>{const pageSize=Math.max(1,functionalUpdate(updater,old.pageSize));const topRowIndex=old.pageSize*old.pageIndex;const pageIndex=Math.floor(topRowIndex/pageSize);return{...old,pageIndex:pageIndex,pageSize:pageSize}}))},setPageCount:updater=>table.setPagination((old=>{var _table$options$pageCo;let newPageCount=functionalUpdate(updater,(_table$options$pageCo=table.options.pageCount)!=null?_table$options$pageCo:-1);if(typeof newPageCount==="number"){newPageCount=Math.max(-1,newPageCount)}return{...old,pageCount:newPageCount}})),getPageOptions:memo((()=>[table.getPageCount()]),(pageCount=>{let pageOptions=[];if(pageCount&&pageCount>0){pageOptions=[...new Array(pageCount)].fill(null).map(((_,i)=>i))}return pageOptions}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable}}),getCanPreviousPage:()=>table.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:pageIndex}=table.getState().pagination;const pageCount=table.getPageCount();if(pageCount===-1){return true}if(pageCount===0){return false}return pageIndextable.setPageIndex((old=>old-1)),nextPage:()=>table.setPageIndex((old=>old+1)),getPrePaginationRowModel:()=>table.getExpandedRowModel(),getPaginationRowModel:()=>{if(!table._getPaginationRowModel&&table.options.getPaginationRowModel){table._getPaginationRowModel=table.options.getPaginationRowModel(table)}if(table.options.manualPagination||!table._getPaginationRowModel){return table.getPrePaginationRowModel()}return table._getPaginationRowModel()},getPageCount:()=>{var _table$options$pageCo2;return(_table$options$pageCo2=table.options.pageCount)!=null?_table$options$pageCo2:Math.ceil(table.getPrePaginationRowModel().rows.length/table.getState().pagination.pageSize)}}}};const getDefaultPinningState=()=>({left:[],right:[]});const Pinning={getInitialState:state=>({columnPinning:getDefaultPinningState(),...state}),getDefaultOptions:table=>({onColumnPinningChange:makeStateUpdater("columnPinning",table)}),createColumn:(column,table)=>({pin:position=>{const columnIds=column.getLeafColumns().map((d=>d.id)).filter(Boolean);table.setColumnPinning((old=>{var _old$left3,_old$right3;if(position==="right"){var _old$left,_old$right;return{left:((_old$left=old==null?void 0:old.left)!=null?_old$left:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),right:[...((_old$right=old==null?void 0:old.right)!=null?_old$right:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),...columnIds]}}if(position==="left"){var _old$left2,_old$right2;return{left:[...((_old$left2=old==null?void 0:old.left)!=null?_old$left2:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),...columnIds],right:((_old$right2=old==null?void 0:old.right)!=null?_old$right2:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d))))}}return{left:((_old$left3=old==null?void 0:old.left)!=null?_old$left3:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d)))),right:((_old$right3=old==null?void 0:old.right)!=null?_old$right3:[]).filter((d=>!(columnIds!=null&&columnIds.includes(d))))}}))},getCanPin:()=>{const leafColumns=column.getLeafColumns();return leafColumns.some((d=>{var _d$columnDef$enablePi,_table$options$enable;return((_d$columnDef$enablePi=d.columnDef.enablePinning)!=null?_d$columnDef$enablePi:true)&&((_table$options$enable=table.options.enablePinning)!=null?_table$options$enable:true)}))},getIsPinned:()=>{const leafColumnIds=column.getLeafColumns().map((d=>d.id));const{left:left,right:right}=table.getState().columnPinning;const isLeft=leafColumnIds.some((d=>left==null?void 0:left.includes(d)));const isRight=leafColumnIds.some((d=>right==null?void 0:right.includes(d)));return isLeft?"left":isRight?"right":false},getPinnedIndex:()=>{var _table$getState$colum,_table$getState$colum2,_table$getState$colum3;const position=column.getIsPinned();return position?(_table$getState$colum=(_table$getState$colum2=table.getState().columnPinning)==null?void 0:(_table$getState$colum3=_table$getState$colum2[position])==null?void 0:_table$getState$colum3.indexOf(column.id))!=null?_table$getState$colum:-1:0}}),createRow:(row,table)=>({getCenterVisibleCells:memo((()=>[row._getAllVisibleCells(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allCells,left,right)=>{const leftAndRight=[...left!=null?left:[],...right!=null?right:[]];return allCells.filter((d=>!leftAndRight.includes(d.column.id)))}),{key:"row.getCenterVisibleCells",debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugRows}}),getLeftVisibleCells:memo((()=>[row._getAllVisibleCells(),table.getState().columnPinning.left,,]),((allCells,left)=>{const cells=(left!=null?left:[]).map((columnId=>allCells.find((cell=>cell.column.id===columnId)))).filter(Boolean).map((d=>({...d,position:"left"})));return cells}),{key:"row.getLeftVisibleCells",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugRows}}),getRightVisibleCells:memo((()=>[row._getAllVisibleCells(),table.getState().columnPinning.right]),((allCells,right)=>{const cells=(right!=null?right:[]).map((columnId=>allCells.find((cell=>cell.column.id===columnId)))).filter(Boolean).map((d=>({...d,position:"right"})));return cells}),{key:"row.getRightVisibleCells",debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugRows}})}),createTable:table=>({setColumnPinning:updater=>table.options.onColumnPinningChange==null?void 0:table.options.onColumnPinningChange(updater),resetColumnPinning:defaultState2=>{var _table$initialState$c,_table$initialState;return table.setColumnPinning(defaultState2?getDefaultPinningState():(_table$initialState$c=(_table$initialState=table.initialState)==null?void 0:_table$initialState.columnPinning)!=null?_table$initialState$c:getDefaultPinningState())},getIsSomeColumnsPinned:position=>{var _pinningState$positio;const pinningState=table.getState().columnPinning;if(!position){var _pinningState$left,_pinningState$right;return Boolean(((_pinningState$left=pinningState.left)==null?void 0:_pinningState$left.length)||((_pinningState$right=pinningState.right)==null?void 0:_pinningState$right.length))}return Boolean((_pinningState$positio=pinningState[position])==null?void 0:_pinningState$positio.length)},getLeftLeafColumns:memo((()=>[table.getAllLeafColumns(),table.getState().columnPinning.left]),((allColumns,left)=>(left!=null?left:[]).map((columnId=>allColumns.find((column=>column.id===columnId)))).filter(Boolean)),{key:false,debug:()=>{var _table$options$debugA4;return(_table$options$debugA4=table.options.debugAll)!=null?_table$options$debugA4:table.options.debugColumns}}),getRightLeafColumns:memo((()=>[table.getAllLeafColumns(),table.getState().columnPinning.right]),((allColumns,right)=>(right!=null?right:[]).map((columnId=>allColumns.find((column=>column.id===columnId)))).filter(Boolean)),{key:false,debug:()=>{var _table$options$debugA5;return(_table$options$debugA5=table.options.debugAll)!=null?_table$options$debugA5:table.options.debugColumns}}),getCenterLeafColumns:memo((()=>[table.getAllLeafColumns(),table.getState().columnPinning.left,table.getState().columnPinning.right]),((allColumns,left,right)=>{const leftAndRight=[...left!=null?left:[],...right!=null?right:[]];return allColumns.filter((d=>!leftAndRight.includes(d.id)))}),{key:false,debug:()=>{var _table$options$debugA6;return(_table$options$debugA6=table.options.debugAll)!=null?_table$options$debugA6:table.options.debugColumns}})})};const RowSelection={getInitialState:state=>({rowSelection:{},...state}),getDefaultOptions:table=>({onRowSelectionChange:makeStateUpdater("rowSelection",table),enableRowSelection:true,enableMultiRowSelection:true,enableSubRowSelection:true}),createTable:table=>({setRowSelection:updater=>table.options.onRowSelectionChange==null?void 0:table.options.onRowSelectionChange(updater),resetRowSelection:defaultState2=>{var _table$initialState$r;return table.setRowSelection(defaultState2?{}:(_table$initialState$r=table.initialState.rowSelection)!=null?_table$initialState$r:{})},toggleAllRowsSelected:value=>{table.setRowSelection((old=>{value=typeof value!=="undefined"?value:!table.getIsAllRowsSelected();const rowSelection={...old};const preGroupedFlatRows=table.getPreGroupedRowModel().flatRows;if(value){preGroupedFlatRows.forEach((row=>{if(!row.getCanSelect()){return}rowSelection[row.id]=true}))}else{preGroupedFlatRows.forEach((row=>{delete rowSelection[row.id]}))}return rowSelection}))},toggleAllPageRowsSelected:value=>table.setRowSelection((old=>{const resolvedValue=typeof value!=="undefined"?value:!table.getIsAllPageRowsSelected();const rowSelection={...old};table.getRowModel().rows.forEach((row=>{mutateRowIsSelected(rowSelection,row.id,resolvedValue,table)}));return rowSelection})),getPreSelectedRowModel:()=>table.getCoreRowModel(),getSelectedRowModel:memo((()=>[table.getState().rowSelection,table.getCoreRowModel()]),((rowSelection,rowModel)=>{if(!Object.keys(rowSelection).length){return{rows:[],flatRows:[],rowsById:{}}}return selectRowsFn(table,rowModel)}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable}}),getFilteredSelectedRowModel:memo((()=>[table.getState().rowSelection,table.getFilteredRowModel()]),((rowSelection,rowModel)=>{if(!Object.keys(rowSelection).length){return{rows:[],flatRows:[],rowsById:{}}}return selectRowsFn(table,rowModel)}),{key:"getFilteredSelectedRowModel",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugTable}}),getGroupedSelectedRowModel:memo((()=>[table.getState().rowSelection,table.getSortedRowModel()]),((rowSelection,rowModel)=>{if(!Object.keys(rowSelection).length){return{rows:[],flatRows:[],rowsById:{}}}return selectRowsFn(table,rowModel)}),{key:"getGroupedSelectedRowModel",debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugTable}}),getIsAllRowsSelected:()=>{const preGroupedFlatRows=table.getFilteredRowModel().flatRows;const{rowSelection:rowSelection}=table.getState();let isAllRowsSelected=Boolean(preGroupedFlatRows.length&&Object.keys(rowSelection).length);if(isAllRowsSelected){if(preGroupedFlatRows.some((row=>row.getCanSelect()&&!rowSelection[row.id]))){isAllRowsSelected=false}}return isAllRowsSelected},getIsAllPageRowsSelected:()=>{const paginationFlatRows=table.getPaginationRowModel().flatRows.filter((row=>row.getCanSelect()));const{rowSelection:rowSelection}=table.getState();let isAllPageRowsSelected=!!paginationFlatRows.length;if(isAllPageRowsSelected&&paginationFlatRows.some((row=>!rowSelection[row.id]))){isAllPageRowsSelected=false}return isAllPageRowsSelected},getIsSomeRowsSelected:()=>{var _table$getState$rowSe;const totalSelected=Object.keys((_table$getState$rowSe=table.getState().rowSelection)!=null?_table$getState$rowSe:{}).length;return totalSelected>0&&totalSelected{const paginationFlatRows=table.getPaginationRowModel().flatRows;return table.getIsAllPageRowsSelected()?false:paginationFlatRows.filter((row=>row.getCanSelect())).some((d=>d.getIsSelected()||d.getIsSomeSelected()))},getToggleAllRowsSelectedHandler:()=>e=>{table.toggleAllRowsSelected(e.target.checked)},getToggleAllPageRowsSelectedHandler:()=>e=>{table.toggleAllPageRowsSelected(e.target.checked)}}),createRow:(row,table)=>({toggleSelected:value=>{const isSelected=row.getIsSelected();table.setRowSelection((old=>{value=typeof value!=="undefined"?value:!isSelected;if(isSelected===value){return old}const selectedRowIds={...old};mutateRowIsSelected(selectedRowIds,row.id,value,table);return selectedRowIds}))},getIsSelected:()=>{const{rowSelection:rowSelection}=table.getState();return isRowSelected(row,rowSelection)},getIsSomeSelected:()=>{const{rowSelection:rowSelection}=table.getState();return isSubRowSelected(row,rowSelection)==="some"},getIsAllSubRowsSelected:()=>{const{rowSelection:rowSelection}=table.getState();return isSubRowSelected(row,rowSelection)==="all"},getCanSelect:()=>{var _table$options$enable;if(typeof table.options.enableRowSelection==="function"){return table.options.enableRowSelection(row)}return(_table$options$enable=table.options.enableRowSelection)!=null?_table$options$enable:true},getCanSelectSubRows:()=>{var _table$options$enable2;if(typeof table.options.enableSubRowSelection==="function"){return table.options.enableSubRowSelection(row)}return(_table$options$enable2=table.options.enableSubRowSelection)!=null?_table$options$enable2:true},getCanMultiSelect:()=>{var _table$options$enable3;if(typeof table.options.enableMultiRowSelection==="function"){return table.options.enableMultiRowSelection(row)}return(_table$options$enable3=table.options.enableMultiRowSelection)!=null?_table$options$enable3:true},getToggleSelectedHandler:()=>{const canSelect=row.getCanSelect();return e=>{var _target;if(!canSelect)return;row.toggleSelected((_target=e.target)==null?void 0:_target.checked)}}})};const mutateRowIsSelected=(selectedRowIds,id,value,table)=>{var _row$subRows;const row=table.getRow(id);if(value){if(!row.getCanMultiSelect()){Object.keys(selectedRowIds).forEach((key=>delete selectedRowIds[key]))}if(row.getCanSelect()){selectedRowIds[id]=true}}else{delete selectedRowIds[id]}if((_row$subRows=row.subRows)!=null&&_row$subRows.length&&row.getCanSelectSubRows()){row.subRows.forEach((row2=>mutateRowIsSelected(selectedRowIds,row2.id,value,table)))}};function selectRowsFn(table,rowModel){const rowSelection=table.getState().rowSelection;const newSelectedFlatRows=[];const newSelectedRowsById={};const recurseRows=function(rows,depth){return rows.map((row=>{var _row$subRows2;const isSelected=isRowSelected(row,rowSelection);if(isSelected){newSelectedFlatRows.push(row);newSelectedRowsById[row.id]=row}if((_row$subRows2=row.subRows)!=null&&_row$subRows2.length){row={...row,subRows:recurseRows(row.subRows)}}if(isSelected){return row}})).filter(Boolean)};return{rows:recurseRows(rowModel.rows),flatRows:newSelectedFlatRows,rowsById:newSelectedRowsById}}function isRowSelected(row,selection){var _selection$row$id;return(_selection$row$id=selection[row.id])!=null?_selection$row$id:false}function isSubRowSelected(row,selection,table){if(row.subRows&&row.subRows.length){let allChildrenSelected=true;let someSelected=false;row.subRows.forEach((subRow=>{if(someSelected&&!allChildrenSelected){return}if(isRowSelected(subRow,selection)){someSelected=true}else{allChildrenSelected=false}}));return allChildrenSelected?"all":someSelected?"some":false}return false}const reSplitAlphaNumeric=/([0-9]+)/gm;const alphanumeric=(rowA,rowB,columnId)=>compareAlphanumeric(toString(rowA.getValue(columnId)).toLowerCase(),toString(rowB.getValue(columnId)).toLowerCase());const alphanumericCaseSensitive=(rowA,rowB,columnId)=>compareAlphanumeric(toString(rowA.getValue(columnId)),toString(rowB.getValue(columnId)));const text=(rowA,rowB,columnId)=>compareBasic(toString(rowA.getValue(columnId)).toLowerCase(),toString(rowB.getValue(columnId)).toLowerCase());const textCaseSensitive=(rowA,rowB,columnId)=>compareBasic(toString(rowA.getValue(columnId)),toString(rowB.getValue(columnId)));const datetime=(rowA,rowB,columnId)=>{const a=rowA.getValue(columnId);const b=rowB.getValue(columnId);return a>b?1:acompareBasic(rowA.getValue(columnId),rowB.getValue(columnId));function compareBasic(a,b){return a===b?0:a>b?1:-1}function toString(a){if(typeof a==="number"){if(isNaN(a)||a===Infinity||a===-Infinity){return""}return String(a)}if(typeof a==="string"){return a}return""}function compareAlphanumeric(aStr,bStr){const a=aStr.split(reSplitAlphaNumeric).filter(Boolean);const b=bStr.split(reSplitAlphaNumeric).filter(Boolean);while(a.length&&b.length){const aa=a.shift();const bb=b.shift();const an=parseInt(aa,10);const bn=parseInt(bb,10);const combo=[an,bn].sort();if(isNaN(combo[0])){if(aa>bb){return 1}if(bb>aa){return-1}continue}if(isNaN(combo[1])){return isNaN(an)?-1:1}if(an>bn){return 1}if(bn>an){return-1}}return a.length-b.length}const sortingFns={alphanumeric:alphanumeric,alphanumericCaseSensitive:alphanumericCaseSensitive,text:text,textCaseSensitive:textCaseSensitive,datetime:datetime,basic:basic};const Sorting={getInitialState:state=>({sorting:[],...state}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:table=>({onSortingChange:makeStateUpdater("sorting",table),isMultiSortEvent:e=>e.shiftKey}),createColumn:(column,table)=>({getAutoSortingFn:()=>{const firstRows=table.getFilteredRowModel().flatRows.slice(10);let isString=false;for(const row of firstRows){const value=row==null?void 0:row.getValue(column.id);if(Object.prototype.toString.call(value)==="[object Date]"){return sortingFns.datetime}if(typeof value==="string"){isString=true;if(value.split(reSplitAlphaNumeric).length>1){return sortingFns.alphanumeric}}}if(isString){return sortingFns.text}return sortingFns.basic},getAutoSortDir:()=>{const firstRow=table.getFilteredRowModel().flatRows[0];const value=firstRow==null?void 0:firstRow.getValue(column.id);if(typeof value==="string"){return"asc"}return"desc"},getSortingFn:()=>{var _table$options$sortin,_table$options$sortin2;if(!column){throw new Error}return isFunction$3(column.columnDef.sortingFn)?column.columnDef.sortingFn:column.columnDef.sortingFn==="auto"?column.getAutoSortingFn():(_table$options$sortin=(_table$options$sortin2=table.options.sortingFns)==null?void 0:_table$options$sortin2[column.columnDef.sortingFn])!=null?_table$options$sortin:sortingFns[column.columnDef.sortingFn]},toggleSorting:(desc,multi)=>{const nextSortingOrder=column.getNextSortingOrder();const hasManualValue=typeof desc!=="undefined"&&desc!==null;table.setSorting((old=>{const existingSorting=old==null?void 0:old.find((d=>d.id===column.id));const existingIndex=old==null?void 0:old.findIndex((d=>d.id===column.id));let newSorting=[];let sortAction;let nextDesc=hasManualValue?desc:nextSortingOrder==="desc";if(old!=null&&old.length&&column.getCanMultiSort()&&multi){if(existingSorting){sortAction="toggle"}else{sortAction="add"}}else{if(old!=null&&old.length&&existingIndex!==old.length-1){sortAction="replace"}else if(existingSorting){sortAction="toggle"}else{sortAction="replace"}}if(sortAction==="toggle"){if(!hasManualValue){if(!nextSortingOrder){sortAction="remove"}}}if(sortAction==="add"){var _table$options$maxMul;newSorting=[...old,{id:column.id,desc:nextDesc}];newSorting.splice(0,newSorting.length-((_table$options$maxMul=table.options.maxMultiSortColCount)!=null?_table$options$maxMul:Number.MAX_SAFE_INTEGER))}else if(sortAction==="toggle"){newSorting=old.map((d=>{if(d.id===column.id){return{...d,desc:nextDesc}}return d}))}else if(sortAction==="remove"){newSorting=old.filter((d=>d.id!==column.id))}else{newSorting=[{id:column.id,desc:nextDesc}]}return newSorting}))},getFirstSortDir:()=>{var _ref,_column$columnDef$sor;const sortDescFirst=(_ref=(_column$columnDef$sor=column.columnDef.sortDescFirst)!=null?_column$columnDef$sor:table.options.sortDescFirst)!=null?_ref:column.getAutoSortDir()==="desc";return sortDescFirst?"desc":"asc"},getNextSortingOrder:multi=>{var _table$options$enable,_table$options$enable2;const firstSortDirection=column.getFirstSortDir();const isSorted=column.getIsSorted();if(!isSorted){return firstSortDirection}if(isSorted!==firstSortDirection&&((_table$options$enable=table.options.enableSortingRemoval)!=null?_table$options$enable:true)&&(multi?(_table$options$enable2=table.options.enableMultiRemove)!=null?_table$options$enable2:true:true)){return false}return isSorted==="desc"?"asc":"desc"},getCanSort:()=>{var _column$columnDef$ena,_table$options$enable3;return((_column$columnDef$ena=column.columnDef.enableSorting)!=null?_column$columnDef$ena:true)&&((_table$options$enable3=table.options.enableSorting)!=null?_table$options$enable3:true)&&!!column.accessorFn},getCanMultiSort:()=>{var _ref2,_column$columnDef$ena2;return(_ref2=(_column$columnDef$ena2=column.columnDef.enableMultiSort)!=null?_column$columnDef$ena2:table.options.enableMultiSort)!=null?_ref2:!!column.accessorFn},getIsSorted:()=>{var _table$getState$sorti;const columnSort=(_table$getState$sorti=table.getState().sorting)==null?void 0:_table$getState$sorti.find((d=>d.id===column.id));return!columnSort?false:columnSort.desc?"desc":"asc"},getSortIndex:()=>{var _table$getState$sorti2,_table$getState$sorti3;return(_table$getState$sorti2=(_table$getState$sorti3=table.getState().sorting)==null?void 0:_table$getState$sorti3.findIndex((d=>d.id===column.id)))!=null?_table$getState$sorti2:-1},clearSorting:()=>{table.setSorting((old=>old!=null&&old.length?old.filter((d=>d.id!==column.id)):[]))},getToggleSortingHandler:()=>{const canSort=column.getCanSort();return e=>{if(!canSort)return;e.persist==null?void 0:e.persist();column.toggleSorting==null?void 0:column.toggleSorting(void 0,column.getCanMultiSort()?table.options.isMultiSortEvent==null?void 0:table.options.isMultiSortEvent(e):false)}}}),createTable:table=>({setSorting:updater=>table.options.onSortingChange==null?void 0:table.options.onSortingChange(updater),resetSorting:defaultState2=>{var _table$initialState$s,_table$initialState;table.setSorting(defaultState2?[]:(_table$initialState$s=(_table$initialState=table.initialState)==null?void 0:_table$initialState.sorting)!=null?_table$initialState$s:[])},getPreSortedRowModel:()=>table.getGroupedRowModel(),getSortedRowModel:()=>{if(!table._getSortedRowModel&&table.options.getSortedRowModel){table._getSortedRowModel=table.options.getSortedRowModel(table)}if(table.options.manualSorting||!table._getSortedRowModel){return table.getPreSortedRowModel()}return table._getSortedRowModel()}})};const Visibility={getInitialState:state=>({columnVisibility:{},...state}),getDefaultOptions:table=>({onColumnVisibilityChange:makeStateUpdater("columnVisibility",table)}),createColumn:(column,table)=>({toggleVisibility:value=>{if(column.getCanHide()){table.setColumnVisibility((old=>({...old,[column.id]:value!=null?value:!column.getIsVisible()})))}},getIsVisible:()=>{var _table$getState$colum,_table$getState$colum2;return(_table$getState$colum=(_table$getState$colum2=table.getState().columnVisibility)==null?void 0:_table$getState$colum2[column.id])!=null?_table$getState$colum:true},getCanHide:()=>{var _column$columnDef$ena,_table$options$enable;return((_column$columnDef$ena=column.columnDef.enableHiding)!=null?_column$columnDef$ena:true)&&((_table$options$enable=table.options.enableHiding)!=null?_table$options$enable:true)},getToggleVisibilityHandler:()=>e=>{column.toggleVisibility==null?void 0:column.toggleVisibility(e.target.checked)}}),createRow:(row,table)=>({_getAllVisibleCells:memo((()=>[row.getAllCells(),table.getState().columnVisibility]),(cells=>cells.filter((cell=>cell.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugRows}}),getVisibleCells:memo((()=>[row.getLeftVisibleCells(),row.getCenterVisibleCells(),row.getRightVisibleCells()]),((left,center,right)=>[...left,...center,...right]),{key:false,debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugRows}})}),createTable:table=>{const makeVisibleColumnsMethod=(key,getColumns)=>memo((()=>[getColumns(),getColumns().filter((d=>d.getIsVisible())).map((d=>d.id)).join("_")]),(columns=>columns.filter((d=>d.getIsVisible==null?void 0:d.getIsVisible()))),{key:key,debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugColumns}});return{getVisibleFlatColumns:makeVisibleColumnsMethod("getVisibleFlatColumns",(()=>table.getAllFlatColumns())),getVisibleLeafColumns:makeVisibleColumnsMethod("getVisibleLeafColumns",(()=>table.getAllLeafColumns())),getLeftVisibleLeafColumns:makeVisibleColumnsMethod("getLeftVisibleLeafColumns",(()=>table.getLeftLeafColumns())),getRightVisibleLeafColumns:makeVisibleColumnsMethod("getRightVisibleLeafColumns",(()=>table.getRightLeafColumns())),getCenterVisibleLeafColumns:makeVisibleColumnsMethod("getCenterVisibleLeafColumns",(()=>table.getCenterLeafColumns())),setColumnVisibility:updater=>table.options.onColumnVisibilityChange==null?void 0:table.options.onColumnVisibilityChange(updater),resetColumnVisibility:defaultState2=>{var _table$initialState$c;table.setColumnVisibility(defaultState2?{}:(_table$initialState$c=table.initialState.columnVisibility)!=null?_table$initialState$c:{})},toggleAllColumnsVisible:value=>{var _value;value=(_value=value)!=null?_value:!table.getIsAllColumnsVisible();table.setColumnVisibility(table.getAllLeafColumns().reduce(((obj,column)=>({...obj,[column.id]:!value?!(column.getCanHide!=null&&column.getCanHide()):value})),{}))},getIsAllColumnsVisible:()=>!table.getAllLeafColumns().some((column=>!(column.getIsVisible!=null&&column.getIsVisible()))),getIsSomeColumnsVisible:()=>table.getAllLeafColumns().some((column=>column.getIsVisible==null?void 0:column.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>e=>{var _target;table.toggleAllColumnsVisible((_target=e.target)==null?void 0:_target.checked)}}}};const features=[Headers,Visibility,Ordering,Pinning,Filters,Sorting,Grouping,Expanding,Pagination$1,RowSelection,ColumnSizing];function createTable(options){var _options$initialState;if(options.debugAll||options.debugTable){console.info("Creating Table Instance...")}let table={_features:features};const defaultOptions2=table._features.reduce(((obj,feature)=>Object.assign(obj,feature.getDefaultOptions==null?void 0:feature.getDefaultOptions(table))),{});const mergeOptions=options2=>{if(table.options.mergeOptions){return table.options.mergeOptions(defaultOptions2,options2)}return{...defaultOptions2,...options2}};const coreInitialState={};let initialState2={...coreInitialState,...(_options$initialState=options.initialState)!=null?_options$initialState:{}};table._features.forEach((feature=>{var _feature$getInitialSt;initialState2=(_feature$getInitialSt=feature.getInitialState==null?void 0:feature.getInitialState(initialState2))!=null?_feature$getInitialSt:initialState2}));const queued=[];let queuedTimeout=false;const coreInstance={_features:features,options:{...defaultOptions2,...options},initialState:initialState2,_queue:cb=>{queued.push(cb);if(!queuedTimeout){queuedTimeout=true;Promise.resolve().then((()=>{while(queued.length){queued.shift()()}queuedTimeout=false})).catch((error=>setTimeout((()=>{throw error}))))}},reset:()=>{table.setState(table.initialState)},setOptions:updater=>{const newOptions=functionalUpdate(updater,table.options);table.options=mergeOptions(newOptions)},getState:()=>table.options.state,setState:updater=>{table.options.onStateChange==null?void 0:table.options.onStateChange(updater)},_getRowId:(row,index,parent)=>{var _table$options$getRow;return(_table$options$getRow=table.options.getRowId==null?void 0:table.options.getRowId(row,index,parent))!=null?_table$options$getRow:`${parent?[parent.id,index].join("."):index}`},getCoreRowModel:()=>{if(!table._getCoreRowModel){table._getCoreRowModel=table.options.getCoreRowModel(table)}return table._getCoreRowModel()},getRowModel:()=>table.getPaginationRowModel(),getRow:id=>{const row=table.getRowModel().rowsById[id];if(!row){throw new Error}return row},_getDefaultColumnDef:memo((()=>[table.options.defaultColumn]),(defaultColumn=>{var _defaultColumn;defaultColumn=(_defaultColumn=defaultColumn)!=null?_defaultColumn:{};return{header:props=>{const resolvedColumnDef=props.header.column.columnDef;if(resolvedColumnDef.accessorKey){return resolvedColumnDef.accessorKey}if(resolvedColumnDef.accessorFn){return resolvedColumnDef.id}return null},cell:props=>{var _props$renderValue$to,_props$renderValue;return(_props$renderValue$to=(_props$renderValue=props.renderValue())==null?void 0:_props$renderValue.toString==null?void 0:_props$renderValue.toString())!=null?_props$renderValue$to:null},...table._features.reduce(((obj,feature)=>Object.assign(obj,feature.getDefaultColumnDef==null?void 0:feature.getDefaultColumnDef())),{}),...defaultColumn}}),{debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugColumns},key:false}),_getColumnDefs:()=>table.options.columns,getAllColumns:memo((()=>[table._getColumnDefs()]),(columnDefs=>{const recurseColumns=function(columnDefs2,parent,depth){if(depth===void 0){depth=0}return columnDefs2.map((columnDef=>{const column=createColumn(table,columnDef,depth,parent);const groupingColumnDef=columnDef;column.columns=groupingColumnDef.columns?recurseColumns(groupingColumnDef.columns,column,depth+1):[];return column}))};return recurseColumns(columnDefs)}),{key:false,debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugColumns}}),getAllFlatColumns:memo((()=>[table.getAllColumns()]),(allColumns=>allColumns.flatMap((column=>column.getFlatColumns()))),{key:false,debug:()=>{var _table$options$debugA3;return(_table$options$debugA3=table.options.debugAll)!=null?_table$options$debugA3:table.options.debugColumns}}),_getAllFlatColumnsById:memo((()=>[table.getAllFlatColumns()]),(flatColumns=>flatColumns.reduce(((acc,column)=>{acc[column.id]=column;return acc}),{})),{key:false,debug:()=>{var _table$options$debugA4;return(_table$options$debugA4=table.options.debugAll)!=null?_table$options$debugA4:table.options.debugColumns}}),getAllLeafColumns:memo((()=>[table.getAllColumns(),table._getOrderColumnsFn()]),((allColumns,orderColumns2)=>{let leafColumns=allColumns.flatMap((column=>column.getLeafColumns()));return orderColumns2(leafColumns)}),{key:false,debug:()=>{var _table$options$debugA5;return(_table$options$debugA5=table.options.debugAll)!=null?_table$options$debugA5:table.options.debugColumns}}),getColumn:columnId=>{const column=table._getAllFlatColumnsById()[columnId];return column}};Object.assign(table,coreInstance);table._features.forEach((feature=>Object.assign(table,feature.createTable==null?void 0:feature.createTable(table))));return table}function createCell(table,row,column,columnId){const getRenderValue=()=>{var _cell$getValue;return(_cell$getValue=cell.getValue())!=null?_cell$getValue:table.options.renderFallbackValue};const cell={id:`${row.id}_${column.id}`,row:row,column:column,getValue:()=>row.getValue(columnId),renderValue:getRenderValue,getContext:memo((()=>[table,column,row,cell]),((table2,column2,row2,cell2)=>({table:table2,column:column2,row:row2,cell:cell2,getValue:cell2.getValue,renderValue:cell2.renderValue})),{key:false,debug:()=>table.options.debugAll})};table._features.forEach((feature=>{Object.assign(cell,feature.createCell==null?void 0:feature.createCell(cell,column,row,table))}),{});return cell}const createRow=(table,id,original,rowIndex,depth,subRows,parentId)=>{let row={id:id,index:rowIndex,original:original,depth:depth,parentId:parentId,_valuesCache:{},_uniqueValuesCache:{},getValue:columnId=>{if(row._valuesCache.hasOwnProperty(columnId)){return row._valuesCache[columnId]}const column=table.getColumn(columnId);if(!(column!=null&&column.accessorFn)){return void 0}row._valuesCache[columnId]=column.accessorFn(row.original,rowIndex);return row._valuesCache[columnId]},getUniqueValues:columnId=>{if(row._uniqueValuesCache.hasOwnProperty(columnId)){return row._uniqueValuesCache[columnId]}const column=table.getColumn(columnId);if(!(column!=null&&column.accessorFn)){return void 0}if(!column.columnDef.getUniqueValues){row._uniqueValuesCache[columnId]=[row.getValue(columnId)];return row._uniqueValuesCache[columnId]}row._uniqueValuesCache[columnId]=column.columnDef.getUniqueValues(row.original,rowIndex);return row._uniqueValuesCache[columnId]},renderValue:columnId=>{var _row$getValue;return(_row$getValue=row.getValue(columnId))!=null?_row$getValue:table.options.renderFallbackValue},subRows:[],getLeafRows:()=>flattenBy(row.subRows,(d=>d.subRows)),getParentRow:()=>row.parentId?table.getRow(row.parentId):void 0,getParentRows:()=>{let parentRows=[];let currentRow=row;while(true){const parentRow=currentRow.getParentRow();if(!parentRow)break;parentRows.push(parentRow);currentRow=parentRow}return parentRows.reverse()},getAllCells:memo((()=>[table.getAllLeafColumns()]),(leafColumns=>leafColumns.map((column=>createCell(table,row,column,column.id)))),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugRows}}),_getAllCellsByColumnId:memo((()=>[row.getAllCells()]),(allCells=>allCells.reduce(((acc,cell)=>{acc[cell.column.id]=cell;return acc}),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var _table$options$debugA2;return(_table$options$debugA2=table.options.debugAll)!=null?_table$options$debugA2:table.options.debugRows}})};for(let i=0;itypeof accessor==="function"?{...column,accessorFn:accessor}:{...column,accessorKey:accessor},display:column=>column,group:column=>column}}function getCoreRowModel(){return table=>memo((()=>[table.options.data]),(data=>{const rowModel={rows:[],flatRows:[],rowsById:{}};const accessRows=function(originalRows,depth,parentRow){if(depth===void 0){depth=0}const rows=[];for(let i=0;i{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable},onChange:()=>{table._autoResetPageIndex()}})}function getSortedRowModel(){return table=>memo((()=>[table.getState().sorting,table.getPreSortedRowModel()]),((sorting,rowModel)=>{if(!rowModel.rows.length||!(sorting!=null&&sorting.length)){return rowModel}const sortingState=table.getState().sorting;const sortedFlatRows=[];const availableSorting=sortingState.filter((sort=>{var _table$getColumn;return(_table$getColumn=table.getColumn(sort.id))==null?void 0:_table$getColumn.getCanSort()}));const columnInfoById={};availableSorting.forEach((sortEntry=>{const column=table.getColumn(sortEntry.id);if(!column)return;columnInfoById[sortEntry.id]={sortUndefined:column.columnDef.sortUndefined,invertSorting:column.columnDef.invertSorting,sortingFn:column.getSortingFn()}}));const sortData=rows=>{const sortedData=[...rows];sortedData.sort(((rowA,rowB)=>{for(let i=0;i{var _row$subRows;sortedFlatRows.push(row);if((_row$subRows=row.subRows)!=null&&_row$subRows.length){row.subRows=sortData(row.subRows)}}));return sortedData};return{rows:sortData(rowModel.rows),flatRows:sortedFlatRows,rowsById:rowModel.rowsById}}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable},onChange:()=>{table._autoResetPageIndex()}})}function getExpandedRowModel(){return table=>memo((()=>[table.getState().expanded,table.getPreExpandedRowModel(),table.options.paginateExpandedRows]),((expanded,rowModel,paginateExpandedRows)=>{if(!rowModel.rows.length||expanded!==true&&!Object.keys(expanded!=null?expanded:{}).length){return rowModel}if(!paginateExpandedRows){return rowModel}return expandRows(rowModel)}),{key:false,debug:()=>{var _table$options$debugA;return(_table$options$debugA=table.options.debugAll)!=null?_table$options$debugA:table.options.debugTable}})}function expandRows(rowModel){const expandedRows=[];const handleRow=row=>{var _row$subRows;expandedRows.push(row);if((_row$subRows=row.subRows)!=null&&_row$subRows.length&&row.getIsExpanded()){row.subRows.forEach(handleRow)}};rowModel.rows.forEach(handleRow);return{rows:expandedRows,flatRows:rowModel.flatRows,rowsById:rowModel.rowsById}} /** * react-table * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function flexRender(Comp,props){return!Comp?null:isReactComponent(Comp)?React.createElement(Comp,props):Comp}function isReactComponent(component){return isClassComponent(component)||typeof component==="function"||isExoticComponent(component)}function isClassComponent(component){return typeof component==="function"&&(()=>{const proto=Object.getPrototypeOf(component);return proto.prototype&&proto.prototype.isReactComponent})()}function isExoticComponent(component){return typeof component==="object"&&typeof component.$$typeof==="symbol"&&["react.memo","react.forward_ref"].includes(component.$$typeof.description)}function useReactTable(options){const resolvedOptions={state:{},onStateChange:()=>{},renderFallbackValue:null,...options};const[tableRef]=React.useState((()=>({current:createTable(resolvedOptions)})));const[state,setState]=React.useState((()=>tableRef.current.initialState));tableRef.current.setOptions((prev=>({...prev,...options,state:{...state,...options.state},onStateChange:updater=>{setState(updater);options.onStateChange==null?void 0:options.onStateChange(updater)}})));return tableRef.current}const TableHead=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_thead",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("thead",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableHeader$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_th",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("th",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const TableBody$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_tbody",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("tbody",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableRow=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,sideHighlightColor:sideHighlightColor="none",tag:tag="table"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const sideHighlightClass=sideHighlightColor!=""?`side_highlight_${sideHighlightColor}`:null;const classes=classnames(buildCss("pb_table_row_kit",sideHighlightClass),"pb_table_tr",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("tr",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})})};const TableCell=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,tag:tag="table",text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames("pb_table_td",globalProps(props),className);const isTableTag=tag==="table";return jsx(Fragment,{children:isTableTag?jsx("td",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})})};const Table=props=>{const{aria:aria={},children:children,className:className,collapse:collapse="sm",container:container=true,dark:dark,data:data={},dataTable:dataTable=false,disableHover:disableHover=false,htmlOptions:htmlOptions={},id:id,outerPadding:outerPadding="",responsive:responsive="collapse",singleLine:singleLine=false,size:size="sm",sticky:sticky=false,striped:striped=false,tag:tag="table",verticalBorder:verticalBorder=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const tableCollapseCss=responsive!=="none"?`table-collapse-${collapse}`:"";const verticalBorderCss=verticalBorder?"vertical-border":"";const spaceCssName=outerPadding!=="none"?"space_":"";const outerPaddingCss=outerPadding?`outer_padding_${spaceCssName}${outerPadding}`:"";const isTableTag=tag==="table";const classNames=classnames("pb_table",`table-${size}`,`table-responsive-${responsive}`,{"table-card":container,"table-dark":dark,data_table:dataTable,"single-line":singleLine,"no-hover":disableHover,"sticky-header":sticky,striped:striped,[outerPaddingCss]:outerPadding!==""},globalProps(props),tableCollapseCss,verticalBorderCss,className);useEffect((()=>{const instance=new PbTable;instance.connect()}),[]);return jsx(Fragment,{children:isTableTag?jsx("table",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,children:children}):jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classNames,id:id,children:children})})};Table.Head=TableHead;Table.Header=TableHeader$1;Table.Body=TableBody$1;Table.Row=TableRow;Table.Cell=TableCell;const AdvancedTableContext=createContext({});const filterExpandableRows=expandedState=>{for(const expandedRow in expandedState){if(expandedState[expandedRow]===false){delete expandedState[expandedRow]}}return expandedState};const updateExpandAndCollapseState=(tableRows,expanded,targetParent)=>{const updateExpandedRows={};const rows=tableRows.rows;let isExpansionConsistent=true;const areRowsExpanded=new Set;for(const row of rows){const shouldBeUpdated=targetParent===void 0?row.depth===0:targetParent===row.parentId;if(shouldBeUpdated){const isExpanded=row.getIsExpanded();areRowsExpanded.add(isExpanded);updateExpandedRows[row.id]=!isExpansionConsistent?true:!isExpanded;if(areRowsExpanded.size>1){isExpansionConsistent=false;for(const key in updateExpandedRows){updateExpandedRows[key]=true}}}}return filterExpandableRows({...expanded,...updateExpandedRows})};const CustomCell=({getValue:getValue,onRowToggleClick:onRowToggleClick,row:row,value:value})=>{const{setExpanded:setExpanded,expanded:expanded,expandedControl:expandedControl,inlineRowLoading:inlineRowLoading}=useContext(AdvancedTableContext);const handleOnExpand=row2=>{onRowToggleClick&&onRowToggleClick(row2);if(!expandedControl){setExpanded({...expanded,[row2.id]:!row2.getIsExpanded()})}};const RowHasChildren=row.original.children?true:false;const renderButton=inlineRowLoading?RowHasChildren:row.getCanExpand();return jsx("div",{style:{paddingLeft:`${row.depth*1.25}em`},children:jsxs(Flex,{alignItems:"center",columnGap:"xs",orientation:"row",children:[renderButton?jsx("button",{className:"gray-icon expand-toggle-icon",onClick:()=>handleOnExpand(row),children:row.getIsExpanded()?jsx(Icon,{cursor:"pointer",icon:"circle-play",rotation:90}):jsx(Icon,{cursor:"pointer",icon:"circle-play"})}):null,jsx(FlexItem,{paddingLeft:renderButton?"none":"xs",children:row.depth===0?getValue():value})]})})};const displayIcon=icon=>{if(typeof icon==="string"){return[icon,icon]}return icon};const SortIconButton=({header:header,sortIcon:sortIcon})=>jsx(Fragment,{children:header.column.getIsSorted()==="desc"?jsx("div",{className:"sort-button-icon",children:jsx(Icon,{icon:displayIcon(sortIcon)[0]})},displayIcon(sortIcon)[0]):jsx("div",{className:"sort-button-icon",children:jsx(Icon,{icon:displayIcon(sortIcon)[1]})},displayIcon(sortIcon)[1])});const ToggleIconButton=({row:row,onClick:onClick})=>{const{toggleExpansionIcon:toggleExpansionIcon}=useContext(AdvancedTableContext);return jsx("button",{className:"gray-icon toggle-all-icon",onClick:()=>onClick(row),children:jsx(Icon,{cursor:"pointer",fixedWidth:true,icon:displayIcon(toggleExpansionIcon)[0]})},displayIcon(toggleExpansionIcon)[0])};const isChrome=()=>{const userAgent=navigator.userAgent.toLowerCase();return userAgent.includes("chrome")&&!userAgent.includes("edg")};const TableHeaderCell=({enableSorting:enableSorting,enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,header:header,headerChildren:headerChildren,isPinnedLeft:isPinnedLeft=false,loading:loading,sortIcon:sortIcon})=>{const{sortControl:sortControl,responsive:responsive}=useContext(AdvancedTableContext);const toggleSortButton=event=>{if(sortControl){const sortIsDesc=header.column.getIsSorted()==="desc";sortIsDesc?sortControl.onChange({desc:true}):sortControl.onChange({desc:false})}else{header.column.getToggleSortingHandler()(event)}};const cellClassName=classnames("table-header-cells",`${isChrome()?"chrome-styles":""}`,`${enableSorting?"table-header-cells-active":""}`,{"pinned-left":responsive==="scroll"&&isPinnedLeft});const cellId=`${loading?`loading-${header.id}`:`${header.id}`}`;const isToggleExpansionEnabledLoading=header.index===0&&loading&&(enableToggleExpansion==="all"||"header")&&enableToggleExpansion!=="none";const isToggleExpansionEnabled=header.index===0&&!loading&&(enableToggleExpansion==="all"||"header")&&enableToggleExpansion!=="none";return jsx("th",{align:"right",className:cellClassName,id:cellId,children:header.isPlaceholder?null:headerChildren&&header.index===0?jsxs(Flex,{alignItems:"center",children:[headerChildren,jsx("div",{children:flexRender(header.column.columnDef.header,header.getContext())})]}):jsxs(Flex,{alignItems:"center",justify:header.index===0&&enableSorting?"between":header.index===0&&!enableSorting?"start":"end",children:[isToggleExpansionEnabled&&jsx(ToggleIconButton,{onClick:handleExpandOrCollapse}),isToggleExpansionEnabledLoading&&jsx("div",{className:"loading-toggle-icon header-toggle-icon"}),jsxs(Flex,{className:`${header.index===0&&enableSorting&&"header-sort-button pb_th_link"}`,cursor:header.index===0&&enableSorting?"pointer":"default",...header.index===0&&enableSorting&&{htmlOptions:{onClick:event=>toggleSortButton(event),onKeyDown:event=>{if(event.key==="Enter"){toggleSortButton(event)}},tabIndex:0}},justify:header.index===0&&enableSorting?"between":"none",paddingLeft:enableSorting?"xxs":"xs",children:[jsx("div",{children:flexRender(header.column.columnDef.header,header.getContext())}),header.index===0&&header.column.getCanSort()&&enableSorting&&(loading?jsx("div",{className:"loading-toggle-icon"}):jsx(SortIconButton,{header:header,sortIcon:sortIcon}))]})]})},`${header.id}-header`)};const TableHeader=({children:children,className:className,dark:dark=false,enableSorting:enableSorting=false,id:id,sortIcon:sortIcon=["arrow-up-short-wide","arrow-down-short-wide"],...props})=>{const{enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,loading:loading,table:table}=useContext(AdvancedTableContext);const classes=classnames(buildCss("pb_advanced_table_header"),globalProps(props),className);const columnPinning=table.getState().columnPinning;return jsx(Fragment,{children:jsx("thead",{className:classes,id:id,children:table.getHeaderGroups().map((headerGroup=>jsx("tr",{children:headerGroup.headers.map((header=>{const isPinnedLeft=columnPinning.left.includes(header.id);return jsx(TableHeaderCell,{enableSorting:enableSorting,enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,header:header,headerChildren:children,isPinnedLeft:isPinnedLeft,loading:loading,sortIcon:sortIcon},`${header.id}-header`)}))},`${headerGroup.id}-headerGroup`)))})})};const LoadingInline=props=>{const{align:align="left",aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,text:text2=" Loading"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss(`pb_loading_inline_kit_${align}`),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Body$1,{color:"light",children:[jsx(Icon,{aria:{label:"loading icon"},fixedWidth:true,icon:"spinner",pulse:true}),text2]})})};const CollapsibleTrail=({leftOffset:leftOffset})=>{const style={position:"absolute",left:`${leftOffset}em`,top:0,bottom:0,width:"2px",backgroundColor:"#E4E8F0"};return jsx("div",{className:"collapsible-trail",style:style})};const renderCollapsibleTrail=currentDepth=>{const lines=[];for(let i=1;i<=currentDepth;i++){const additionalOffset=i>1?(i-1)*.25:0;const leftOffset=i*1+additionalOffset;lines.push(jsx(CollapsibleTrail,{leftOffset:leftOffset},i))}return lines};const SubRowHeaderRow=({collapsibleTrail:collapsibleTrail,enableToggleExpansion:enableToggleExpansion,onClick:onClick,row:row,subRowHeaders:subRowHeaders,table:table})=>{const{inlineRowLoading:inlineRowLoading}=useContext(AdvancedTableContext);const numberOfColumns=table.getAllFlatColumns().length;const rowHasChildren=row.original.children?true:false;const canExpand=inlineRowLoading?rowHasChildren:row.getCanExpand();return jsxs("tr",{className:"custom-row bg-silver",children:[jsxs("td",{className:`custom-row-first-column ${isChrome()?"chrome-styles":""}`,colSpan:1,children:[collapsibleTrail&&row.depth>0&&renderCollapsibleTrail(row.depth),jsx("div",{style:{paddingLeft:`${row.depth*1.25}em`},children:jsxs(Flex,{align:"center",columnGap:"xs",children:[enableToggleExpansion==="all"&&canExpand?jsx(ToggleIconButton,{onClick:onClick,row:row}):null,jsx(Caption,{marginLeft:canExpand?"none":"xs",text:subRowHeaders[row.depth-1]})]})})]}),jsx("td",{colSpan:numberOfColumns-1})]})};const LoadingCell=()=>jsx("div",{className:"loading-cell"});const TableBody=({className:className,collapsibleTrail:collapsibleTrail=true,dark:dark=false,id:id,subRowHeaders:subRowHeaders,...props})=>{const{columnDefinitions:columnDefinitions,enableToggleExpansion:enableToggleExpansion,handleExpandOrCollapse:handleExpandOrCollapse,isPinnedLeft:isPinnedLeft=false,inlineRowLoading:inlineRowLoading,loading:loading,responsive:responsive,table:table}=useContext(AdvancedTableContext);const classes=classnames(buildCss("pb_advanced_table_body"),{"pinned-left":responsive==="scroll"&&isPinnedLeft},globalProps(props),className);const columnPinning=table.getState().columnPinning;return jsx(Fragment,{children:jsx("tbody",{className:classes,id:id,children:table.getRowModel().rows.map((row=>{var _a;const isExpandable=row.getIsExpanded();const isFirstChildofSubrow=row.depth>0&&row.index===0;const rowHasNoChildren=row.original.children&&!row.original.children.length?true:false;const numberOfColumns=table.getAllFlatColumns().length;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<((_a=columnDefinitions[0].cellAccessors)==null?void 0:_a.length);const rowBackground=isExpandable&&(!inlineRowLoading&&row.getCanExpand()||inlineRowLoading&&rowHasNoChildren);return jsxs(React__default.Fragment,{children:[isFirstChildofSubrow&&subRowHeaders&&jsx(SubRowHeaderRow,{collapsibleTrail:collapsibleTrail,enableToggleExpansion:enableToggleExpansion,onClick:handleExpandOrCollapse,row:row,subRowHeaders:subRowHeaders,table:table}),jsx("tr",{className:`${rowBackground?"bg-silver":"bg-white"} ${row.depth>0?`depth-sub-row-${row.depth}`:""}`,id:`${row.index}-${row.id}-${row.depth}-row`,children:row.getVisibleCells().map(((cell,i)=>{const isPinnedLeft2=columnPinning.left.includes(cell.column.id);return jsxs("td",{align:"right",className:classnames(`${cell.id}-cell position_relative`,isChrome()?"chrome-styles":"",isPinnedLeft2&&"pinned-left"),children:[collapsibleTrail&&i===0&&row.depth>0&&renderCollapsibleTrail(row.depth),jsx("span",{id:`${cell.id}-span`,children:loading?jsx(LoadingCell,{}):flexRender(cell.column.columnDef.cell,cell.getContext())})]},`${cell.id}-data`)}))}),isDataLoading?jsx("tr",{children:jsx("td",{colSpan:numberOfColumns,style:{paddingLeft:`${row.depth===0?.5:row.depth*2}em`},children:jsx(LoadingInline,{})})},`${row.id}-row`):null]},`${row.index}-${row.id}-${row.depth}-row`)}))})})};const AdvancedTable=props=>{const{aria:aria={},children:children,className:className,columnDefinitions:columnDefinitions,dark:dark=false,data:data={},enableToggleExpansion:enableToggleExpansion="header",expandedControl:expandedControl,htmlOptions:htmlOptions={},id:id,initialLoadingRowsCount:initialLoadingRowsCount=10,inlineRowLoading:inlineRowLoading=false,loading:loading,onRowToggleClick:onRowToggleClick,onToggleExpansionClick:onToggleExpansionClick,responsive:responsive="scroll",sortControl:sortControl,tableData:tableData,tableOptions:tableOptions,tableProps:tableProps,toggleExpansionIcon:toggleExpansionIcon="arrows-from-line"}=props;const[loadingStateRowCount,setLoadingStateRowCount]=useState(initialLoadingRowsCount);const[localExpanded,setLocalExpanded]=useState({});const expanded=expandedControl?expandedControl.value:localExpanded;const setExpanded=expandedControl?expandedControl.onChange:setLocalExpanded;const columnHelper=createColumnHelper();const createCellFunction=cellAccessors=>{const columnCells=({row:row,getValue:getValue})=>{const rowData=row.original;switch(row.depth){case 0:{return jsx(CustomCell,{getValue:getValue,onRowToggleClick:onRowToggleClick,row:row})}default:{const depthAccessor=cellAccessors[row.depth-1];const accessorValue=rowData[depthAccessor];return accessorValue?jsx(CustomCell,{onRowToggleClick:onRowToggleClick,row:row,value:accessorValue}):"N/A"}}};return columnCells};const columns=columnDefinitions&&columnDefinitions.map((column=>{const columnStructure={...columnHelper.accessor(column.accessor,{header:column.label})};if(column.cellAccessors){columnStructure.cell=createCellFunction(column.cellAccessors)}return columnStructure}));const sorting=[{id:columnDefinitions[0].accessor,desc:sortControl&&sortControl.value!==null?!sortControl.value.desc:false}];const expandAndSortState=()=>{if(sortControl){return{state:{expanded:expanded,sorting:sorting}}}else{return{state:{expanded:expanded}}}};const table=useReactTable({data:loading?Array(loadingStateRowCount).fill({}):tableData,columns:columns,onExpandedChange:setExpanded,getSubRows:row=>row.children,getCoreRowModel:getCoreRowModel(),getExpandedRowModel:getExpandedRowModel(),getSortedRowModel:getSortedRowModel(),enableSortingRemoval:false,sortDescFirst:true,...expandAndSortState(),...tableOptions});const tableRows=table.getRowModel();const updateLoadingStateRowCount=useCallback((()=>{const rowsCount=table.getRowModel().rows.length;if(rowsCount!==loadingStateRowCount&&rowsCount!==0){setLoadingStateRowCount(rowsCount)}}),[tableData,loadingStateRowCount]);useEffect((()=>{if(!loading){updateLoadingStateRowCount()}}),[loading,updateLoadingStateRowCount]);const handleExpandOrCollapse=async row=>{onToggleExpansionClick&&onToggleExpansionClick(row);const expandedState=expanded;const targetParent=row==null?void 0:row.parentId;const updatedRows=await updateExpandAndCollapseState(tableRows,expandedState,targetParent);setExpanded(updatedRows)};const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_advanced_table"),`table-responsive-${responsive}`,globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(AdvancedTableContext.Provider,{value:{columnDefinitions:columnDefinitions,enableToggleExpansion:enableToggleExpansion,expanded:expanded,expandedControl:expandedControl,handleExpandOrCollapse:handleExpandOrCollapse,inlineRowLoading:inlineRowLoading,loading:loading,responsive:responsive,setExpanded:setExpanded,sortControl:sortControl,table:table,toggleExpansionIcon:toggleExpansionIcon},children:jsx(Table,{className:`${loading?"content-loading":""}`,dark:dark,dataTable:true,numberSpacing:"tabular",responsive:"none",...tableProps,children:children?children:jsxs(Fragment,{children:[jsx(TableHeader,{}),jsx(TableBody,{})]})})})})};AdvancedTable.Header=TableHeader;AdvancedTable.Body=TableBody;const AvatarActionButton=props=>{const{action:action="add",aria:aria={},linkAriaLabel:linkAriaLabel,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,imageAlt:imageAlt="",imageUrl:imageUrl,linkUrl:linkUrl,name:name,onClick:onClick,placement:placement="bottom left",size:size="md"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_avatar_action_button_kit",action,placement,size),globalProps(props),className);const icons={add:"plus-circle",remove:"times-circle"};return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs("a",{"aria-label":linkAriaLabel,href:linkUrl,onClick:onClick,children:[jsx(Avatar,{imageAlt:imageAlt,imageUrl:imageUrl,name:name,size:size}),jsx("div",{className:`icon ${dark?"dark":""}`,children:jsx(Icon,{dark:dark,icon:icons[action]})})]})})};const BreadCrumbItem=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,component:component="a",...rest}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const Component=component||"span";const css=classnames(buildCss("pb_bread_crumb_item_kit"),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:jsx(Component,{className:"pb_bread_crumb_item",...domSafeProps(rest)})})};const BreadCrumbs=props=>{const{aria:aria={label:"Breadcrumb Navigation"},className:className,data:data={},htmlOptions:htmlOptions={},id:id,children:children}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames(buildCss("pb_bread_crumbs_kit"),globalProps(props),className);return jsx("nav",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:children})};const ButtonToolbar=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,orientation:orientation="horizontal",text:text2,variant:variant="primary"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_button_toolbar_kit",orientation,variant),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children||text2})};const contactTypeMap={cell:"mobile",email:"envelope",extension:"phone-plus",home:"phone",work:"phone-office","work-cell":"phone-laptop","wrong-phone":"phone-slash"};const formatContact=(contactString,contactType)=>{if(contactType==="email")return contactString;const cleaned=contactString.replace(/\D/g,"");const phoneNumber=cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);if(contactType==="extension"){return cleaned.match(/^\d{4}$/)}if(phoneNumber){const intlCode=phoneNumber[1]?"+1 ":"";return[intlCode,"(",phoneNumber[2],") ",phoneNumber[3],"-",phoneNumber[4]].join("")}return null};const Contact=props=>{const{aria:aria={},className:className,contactDetail:contactDetail,contactType:contactType,contactValue:contactValue,data:data={},dark:dark=false,htmlOptions:htmlOptions={},id:id}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_contact_kit"),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Body$1,{className:"pb_contact_kit",color:"light",dark:dark,tag:"span",children:[jsx(Icon,{dark:dark,fixedWidth:true,icon:contactTypeMap[contactType]||"phone"}),` ${formatContact(contactValue,contactType)} `,contactDetail&&jsx(Caption,{dark:dark,size:"xs",tag:"span",text:contactDetail})]})})};const sizes$1={lg:1,md:3,sm:4};const Currency=props=>{const{abbreviate:abbreviate=false,align:align="left",aria:aria={},amount:amount,data:data={},decimals:decimals="default",emphasized:emphasized=true,htmlOptions:htmlOptions={},id:id,unit:unit,className:className,label:label="",size:size="sm",symbol:symbol="$",variant:variant="default",dark:dark=false,unstyled:unstyled=false}=props;const emphasizedClass=emphasized?"":"_deemphasized";let variantClass;if(variant==="light"){variantClass="_light"}else if(variant==="bold"){variantClass="_bold"}const[whole,decimal="00"]=amount.split(".");const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_currency_kit",align,size),globalProps(props),className);const getFormattedNumber=input=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(input);const getAbbreviatedValue=abbrType=>{const num=`${getFormattedNumber(whole.split(",").join(""))}`,isAmount=abbrType==="amount",isUnit=abbrType==="unit";return isAmount?num.slice(0,-1):isUnit?num.slice(-1):""};const getMatchingDecimalAmount=decimals==="matching"?amount:whole,getMatchingDecimalValue=decimals==="matching"?"":`.${decimal}`;const getAmount=abbreviate?getAbbreviatedValue("amount"):getMatchingDecimalAmount,getAbbreviation=abbreviate?getAbbreviatedValue("unit"):null,getDecimalValue=abbreviate?"":getMatchingDecimalValue;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Caption,{dark:dark,children:label}),jsx("div",{className:`pb_currency_wrapper${variantClass||emphasizedClass}`,children:unstyled?jsxs(Fragment,{children:[jsx("div",{children:symbol}),jsx("div",{children:getAmount}),jsxs("div",{children:[getAbbreviation,unit?unit:getDecimalValue]})]}):jsxs(Fragment,{children:[jsx(Body$1,{className:"dollar_sign",color:"light",dark:dark,children:symbol}),jsx(Title,{className:"pb_currency_value",dark:dark,size:sizes$1[size],children:getAmount}),jsxs(Body$1,{className:"unit",color:"light",dark:dark,children:[getAbbreviation,unit?unit:getDecimalValue]})]})})]})};const statusMap={increase:"positive",decrease:"negative",neutral:"neutral"};const iconMap$1={increase:"arrow-up",decrease:"arrow-down"};const StatChange=props=>{const{change:change="neutral",className:className,htmlOptions:htmlOptions={},icon:icon,id:id,value:value}=props;const status=statusMap[change];let returnedIcon=iconMap$1[change];if(icon){returnedIcon=icon}const htmlProps=buildHtmlProps(htmlOptions);return jsx(Fragment,{children:value&&jsx("div",{className:classnames(buildCss("pb_stat_change_kit",status),globalProps(props),className),id:id,...htmlProps,children:jsxs(Body$1,{status:status,children:[returnedIcon&&jsxs(Fragment,{children:[jsx(Icon,{fixed_width:true,icon:returnedIcon})," "]}),`${value}%`]})})})};const StatValue=props=>{const{className:className,htmlOptions:htmlOptions={},id:id,unit:unit,value:value=0}=props;const htmlProps=buildHtmlProps(htmlOptions);const displayValue=function(value2){if(value2||value2===0){return jsx(Title,{size:1,tag:"span",text:`${value2}`})}};const displayUnit=function(unit2){if(unit2){return jsx(Title,{size:3,tag:"span",text:unit2})}};return jsx("div",{className:classnames("pb_stat_value_kit",globalProps(props),className),id:id,...htmlProps,children:jsxs("div",{className:"pb_stat_value_wrapper",children:[displayValue(value)," ",displayUnit(unit)]})})};const DashboardValue=props=>{const{align:align="left",aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,statChange:statChange={},statLabel:statLabel,statValue:statValue={}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dashboard_value_kit",align),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[statLabel&&jsx(Body$1,{color:"light",children:statLabel}),statValue&&jsx(StatValue,{unit:statValue.unit,value:statValue.value}),statChange&&jsx(StatChange,{change:statChange.change,value:statChange.value})]})};const PbDate=props=>{const{aria:aria={},alignment:alignment="left",className:className,data:data={},htmlOptions:htmlOptions={},id:id,showDayOfWeek:showDayOfWeek=false,showIcon:showIcon=false,size:size="md",unstyled:unstyled=false,value:value}=props;const weekday=DateTime$1.toWeekday(value);const month=DateTime$1.toMonth(value);const day=DateTime$1.toDay(value);const year=DateTime$1.toYear(value);const currentYear=(new Date).getFullYear();const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_date_kit",alignment),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:unstyled?jsxs(Fragment,{children:[showIcon&&jsx("div",{children:jsx(Icon,{fixedWidth:true,icon:"calendar-alt"})}),showDayOfWeek&&jsxs(Fragment,{children:[jsx("div",{children:weekday}),jsx("div",{children:"•"})]}),jsxs("span",{children:[jsxs("span",{children:[month," ",day]}),currentYear!=year&&jsx("span",{children:`, ${year}`})]})]}):size=="md"||size=="lg"?jsxs(Title,{size:4,tag:"h4",children:[showIcon&&jsx(Body$1,{className:"pb_icon_kit_container",color:"light",tag:"span",children:jsx(Icon,{fixedWidth:true,icon:"calendar-alt"})}),showDayOfWeek&&jsxs(Fragment,{children:[weekday,jsx(Body$1,{color:"light",tag:"span",text:" • "})]}),jsxs("span",{children:[month," ",day]}),currentYear!=year&&jsx("span",{children:`, ${year}`})]}):jsxs(Fragment,{children:[showIcon&&jsx(Caption,{className:"pb_icon_kit_container",tag:"span",children:jsx(Icon,{fixedWidth:true,icon:"calendar-alt",size:"sm"})}),showDayOfWeek&&jsxs(Fragment,{children:[jsx(Caption,{tag:"div",children:weekday}),jsx(Caption,{color:"light",tag:"div",text:" • "})]}),jsxs(Caption,{tag:"span",children:[month," ",day,currentYear!=year&&jsx(Fragment,{children:`, ${year}`})]})]})})};const DatePicker=props=>{if(props.plugins);const{allowInput:allowInput=false,aria:aria={},className:className,customQuickPickDates:customQuickPickDates,dark:dark=false,data:data={},defaultDate:defaultDate="",disableDate:disableDate=null,disableInput:disableInput,disableRange:disableRange=null,disableWeekdays:disableWeekdays=null,enableTime:enableTime=false,error:error,format:format="m/d/Y",hideIcon:hideIcon=false,hideLabel:hideLabel=false,htmlOptions:htmlOptions={},id:id,inLine:inLine=false,inputAria:inputAria={},inputData:inputData={},inputOnChange:inputOnChange,inputValue:inputValue,label:label="Date Picker",maxDate:maxDate,minDate:minDate,mode:mode="single",name:name,onChange:onChange=()=>{},onClose:onClose,pickerId:pickerId,placeholder:placeholder="Select Date",plugins:plugins=false,position:position,positionElement:positionElement,scrollContainer:scrollContainer,selectionType:selectionType="",showTimezone:showTimezone=false,staticPosition:staticPosition=true,thisRangesEndToday:thisRangesEndToday=false,yearRange:yearRange=[1900,2100]}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const inputAriaProps=buildAriaProps(inputAria);const inputDataProps=buildDataProps(inputData);useEffect((()=>{datePickerHelper({allowInput:allowInput,customQuickPickDates:customQuickPickDates,defaultDate:defaultDate,disableDate:disableDate,disableRange:disableRange,disableWeekdays:disableWeekdays,enableTime:enableTime,format:format,hideIcon:hideIcon,inLine:inLine,maxDate:maxDate,minDate:minDate,mode:mode,onChange:onChange,onClose:onClose,pickerId:pickerId,plugins:plugins,position:position,positionElement:positionElement,selectionType:selectionType,showTimezone:showTimezone,staticPosition:staticPosition,thisRangesEndToday:thisRangesEndToday,yearRange:yearRange,required:false},scrollContainer)}));const filteredProps={...props};if(filteredProps.marginBottom===void 0){filteredProps.marginBottom="sm"}filteredProps==null?true:delete filteredProps.position;const classes=classnames(buildCss("pb_date_picker_kit"),globalProps(filteredProps),error?"error":null,className);const iconWrapperClass=()=>{let base="cal_icon_wrapper";if(dark){base+=" dark"}if(hideLabel){base+=" no_label_shift"}if(error){base+=" error"}return base};return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs("div",{...inputAriaProps,...inputDataProps,className:"input_wrapper",children:[jsx(Caption,{className:"pb_date_picker_kit_label",text:hideLabel?null:label}),jsxs(Fragment,{children:[jsxs("div",{className:"date_picker_input_wrapper",children:[jsx("input",{autoComplete:"off",className:"date_picker_input",disabled:disableInput,id:pickerId,name:name,onChange:inputOnChange,placeholder:placeholder,value:inputValue}),error&&jsx(Body$1,{status:"negative",text:error,variant:null})]}),!hideIcon&&jsx("div",{className:iconWrapperClass(),id:`cal-icon-${pickerId}`,children:jsx(Icon,{className:"cal_icon",icon:"calendar-alt"})}),hideIcon&&inLine?jsxs("div",{children:[jsx("div",{className:iconWrapperClass(),id:`${pickerId}-icon-plus`,children:jsx(Icon,{className:"date-picker-plus-icon",icon:"plus"})}),jsx("div",{className:iconWrapperClass(),id:`${pickerId}-angle-down`,children:jsx(Icon,{className:"angle_down_icon",icon:"angle-down"})})]}):null]})]})})};const dateTimestamp$1=(dateValue,includeYear)=>{if(includeYear){return`${DateTime$1.toMonth(dateValue)} ${DateTime$1.toDay(dateValue)}, ${DateTime$1.toYear(dateValue)}`}else{return`${DateTime$1.toMonth(dateValue)} ${DateTime$1.toDay(dateValue)}`}};const dateTimeIso$1=dateValue=>DateTime$1.toIso(dateValue);const DateRangeInline=props=>{const{align:align="left",className:className,dark:dark=false,data:data={},endDate:endDate,htmlOptions:htmlOptions={},icon:icon=false,size:size="sm",startDate:startDate}=props;const dateInCurrentYear=()=>{const currentDate=new Date;return(startDate==null?void 0:startDate.getFullYear())===(endDate==null?void 0:endDate.getFullYear())&&(startDate==null?void 0:startDate.getFullYear())===currentDate.getFullYear()};const dateRangeClasses=buildCss("pb_date_range_inline_kit",align);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const renderTime=date=>jsx("time",{dateTime:dateTimeIso$1(date),children:dateInCurrentYear()?` ${dateTimestamp$1(date,false)} `:` ${dateTimestamp$1(date,true)} `});return jsx("div",{...dataProps,...htmlProps,className:classnames(dateRangeClasses,globalProps(props),className),children:jsxs("div",{className:"pb_date_range_inline_wrapper",children:[size==="xs"&&jsxs(Fragment,{children:[icon&&jsx(Caption,{dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_icon",dark:dark,fixedWidth:true,icon:"calendar-alt",size:size,tag:"span"})}),jsx(Caption,{dark:dark,tag:"span",children:renderTime(startDate)}),jsx(Caption,{dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_arrow",dark:dark,fixedWidth:true,icon:"long-arrow-right",tag:"span"})}),jsx(Caption,{dark:dark,tag:"span",children:renderTime(endDate)})]}),size==="sm"&&jsxs(Fragment,{children:[icon&&jsx(Body$1,{color:"light",dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_icon",dark:dark,fixedWidth:true,icon:"calendar-alt",size:size,tag:"span"})}),jsx(Body$1,{dark:dark,tag:"span",children:renderTime(startDate)}),jsx(Body$1,{color:"light",dark:dark,tag:"span",children:jsx(Icon,{className:"pb_date_range_inline_arrow",dark:dark,fixedWidth:true,icon:"long-arrow-right",tag:"span"})}),jsx(Body$1,{dark:dark,tag:"span",children:renderTime(endDate)})]})]})})};const DateYearStacked=props=>{const{align:align="left",className:className,dark:dark=false,date:date,data:data={},htmlOptions:htmlOptions={}}=props;const css=classnames(buildCss("pb_date_year_stacked",align),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsxs("div",{...dataProps,...htmlProps,className:css,children:[jsx(Title,{dark:dark,size:4,text:`${DateTime$1.toDay(date)} ${DateTime$1.toMonth(date).toUpperCase()}`}),jsx(Body$1,{color:"light",children:DateTime$1.toYear(date)})]})};const DateRangeStacked=props=>{const{className:className,dark:dark=false,endDate:endDate,htmlOptions:htmlOptions={},startDate:startDate,data:data={}}=props;const css=classnames(buildCss("pb_date_range_stacked"),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx("div",{...dataProps,...htmlProps,className:css,children:jsxs(Flex,{vertical:"center",children:[jsx(FlexItem,{children:jsx(DateYearStacked,{align:"right",dark:dark,date:startDate})}),jsx(FlexItem,{children:jsx("div",{children:jsx(Body$1,{color:"light",tag:"span",children:jsx(Icon,{className:"pb_date_range_stacked_arrow",fixedWidth:true,icon:"long-arrow-right"})})})}),jsx(FlexItem,{children:jsx(DateYearStacked,{dark:dark,date:endDate})})]})})};const sizes={sm:4,md:3};const DateStacked=props=>{const{align:align="left",bold:bold=false,reverse:reverse=false,className:className,dark:dark=false,date:date,data:data={},htmlOptions:htmlOptions={},size:size="sm"}=props;const classes=classnames(buildCss("pb_date_stacked_kit",align,size,{dark:dark,reverse:reverse}),globalProps(props),className);const currentYear=(new Date).getFullYear();const inputYear=DateTime$1.toYear(date);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx(Fragment,{children:bold==false?jsxs("div",{...dataProps,...htmlProps,className:classes,children:[jsxs("div",{className:"pb_date_stacked_day_month",children:[jsx(Caption,{text:DateTime$1.toMonth(date).toUpperCase()}),jsx(Title,{dark:dark,size:sizes[size],text:DateTime$1.toDay(date).toString()})]}),currentYear!=inputYear&&jsx(Caption,{size:"xs",children:inputYear})]}):jsx("div",{...dataProps,...htmlProps,className:classes,children:jsxs("div",{className:"pb_date_stacked_day_month",children:[jsx(Title,{bold:true,dark:dark,size:"4",text:DateTime$1.toMonth(date)}),jsx(Title,{bold:true,dark:dark,size:"4",text:DateTime$1.toDay(date).toString()}),currentYear!=inputYear&&jsx(Title,{size:"4",children:inputYear})]})})})};const Time=props=>{const{align:align,className:className,date:date,htmlOptions:htmlOptions={},showIcon:showIcon,size:size,timeZone:timeZone,unstyled:unstyled=false,showTimezone:showTimezone=true}=props;const classes=classnames(buildCss("pb_time_kit",align,size),globalProps(props),className);const clockIcon=getAllIcons()["clock"];const htmlProps=buildHtmlProps(htmlOptions);return jsxs("div",{...htmlProps,className:classes,children:[showIcon&&(unstyled?jsxs("span",{children:[jsx(Icon,{className:"svg-inline--fa clock",customIcon:clockIcon.icon})," "]}):jsx(Fragment,{children:jsxs(Body$1,{color:"light",tag:"span",children:[jsx(Icon,{className:"svg-inline--fa clock",customIcon:clockIcon.icon,fixedWidth:true,size:size==="md"?"":"sm"})," "]})})),jsx("time",{dateTime:date.toLocaleString(),children:jsx("span",{children:unstyled?jsxs(Fragment,{children:[jsx("span",{children:DateTime$1.toTimeWithMeridiem(date,timeZone)})," ",showTimezone&&jsx("span",{children:DateTime$1.toTimeZone(date,timeZone)})]}):size==="md"?jsxs(Fragment,{children:[jsx(Body$1,{className:"pb_time",tag:"span",text:DateTime$1.toTimeWithMeridiem(date,timeZone)})," ",showTimezone&&jsx(Body$1,{color:"light",tag:"span",text:DateTime$1.toTimeZone(date,timeZone)})]}):jsxs(Fragment,{children:[jsx(Caption,{color:"light",tag:"span",text:DateTime$1.toTimeWithMeridiem(date,timeZone)})," ",showTimezone&&jsx(Caption,{color:"light",tag:"span",text:DateTime$1.toTimeZone(date,timeZone)})]})})})]})};const DateTime=props=>{const{align:align="left",aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},showDayOfWeek:showDayOfWeek=false,datetime:datetime2,id:id,showIcon:showIcon=false,size:size="md",timeZone:timeZone="America/New_York"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_date_time",size),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Flex,{horizontal:align,vertical:"baseline",children:[jsx(PbDate,{showDayOfWeek:showDayOfWeek,size:size,value:datetime2}),jsx(Time,{date:datetime2,marginLeft:"sm",showIcon:showIcon,size:size,timeZone:timeZone})]})})};const TimeStackedDefault=props=>{if(props.date);const{align:align="left",className:className,dark:dark,data:data={},date:date,htmlOptions:htmlOptions={},time:time,timeZone:timeZone}=props;const classes=classnames(buildCss("pb_time_stacked_kit",align),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx("div",{className:classes,...dataProps,...htmlProps,children:jsx(Body$1,{className:classnames("pb_time_stacked","time-spacing"),color:"light",dark:dark,children:jsxs("time",{children:[DateTime$1.toTimeWithMeridiem(date?date:new Date(time),timeZone),jsx(Caption,{className:"pb_time_stacked",color:"light",dark:dark,tag:"span",text:DateTime$1.toTimeZone(date?date:new Date(time),timeZone)})]})})})};const DateTimeStacked=props=>{if(props.date);const{date:date,datetime:datetime2,dark:dark,htmlOptions:htmlOptions={},timeZone:timeZone="America/New_York"}=props;const classes=buildCss("pb_date_time_stacked_kit",globalProps(props));const htmlProps=buildHtmlProps(htmlOptions);return jsxs(Flex,{inline:false,vertical:"stretch",...htmlProps,...props,children:[jsx(FlexItem,{children:jsx(DateStacked,{align:"right",bold:true,dark:dark,date:date||datetime2})}),jsx(SectionSeparator,{className:"date-time-padding",orientation:"vertical"}),jsx(FlexItem,{children:jsx(TimeStackedDefault,{className:classes,dark:dark,date:date||datetime2,timeZone:timeZone})})]})};const Detail=props=>{const{aria:aria={},bold:bold=false,children:children,className:className,color:color="light",data:data={},htmlOptions:htmlOptions={},id:id="",tag:tag="div",text:text2=""}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const isBold=bold?"bold":null;const classes=classnames(buildCss("pb_detail_kit",`color`,color),isBold,globalProps(props),className);const Tag=`${tag}`;return jsx(Tag,{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:text2||children})};const DropdownContext=createContext({});const List=props=>{const{aria:aria={},borderless:borderless=false,children:children,className:className,dark:dark=false,data:data={},enableDrag:enableDrag=false,htmlOptions:htmlOptions={},id:id,layout:layout="",ordered:ordered=false,role:role,size:size="",tabIndex:tabIndex,xpadding:xpadding=false,variant:variant,text:text2}=props;const layoutClass={left:"layout_left",right:"layout_right",default:""};const childrenWithProps=React__default.Children.map(children,(child=>React__default.cloneElement(child,{text:text2,variant:variant,enableDrag:enableDrag})));const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_list_kit",layoutClass[layout],size,{dark:dark,borderless:borderless,ordered:ordered,xpadding:xpadding}),globalProps(props),className);return jsx(Fragment,{children:enableDrag?jsx(Draggable.Container,{children:jsx("div",Object.assign({className:classes},{children:ordered?jsx("ol",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0):jsx("ul",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0)}),void 0)},void 0):jsx("div",Object.assign({className:classes},{children:ordered?jsx("ol",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0):jsx("ul",Object.assign({},ariaProps,dataProps,htmlProps,{className:className,id:id,role:role,tabIndex:tabIndex},{children:childrenWithProps}),void 0)}),void 0)},void 0)};const ListItem=props=>{const{aria:aria={},children:children,className:className,data:data={},enableDrag:enableDrag,dragId:dragId,dragHandle:dragHandle=true,htmlOptions:htmlOptions={},id:id,tabIndex:tabIndex}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_item_kit"),globalProps(props),className);return jsx(Fragment,{children:enableDrag?jsx(Draggable.Item,Object.assign({dragId:dragId},{children:jsxs("li",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id,tabIndex:tabIndex},{children:[dragHandle&&jsx("span",Object.assign({style:{verticalAlign:"middle"}},{children:jsx(Body$1,Object.assign({color:"light"},{children:jsx(Icon,{icon:"grip-dots-vertical",verticalAlign:"middle"},void 0)}),void 0)}),void 0),children]}),void 0)}),void 0):jsx("li",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id,tabIndex:tabIndex},{children:children}),void 0)},void 0)};const DropdownContainer=props=>{const{aria:aria={},children:children,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,searchbar:searchbar=false}=props;const{dropdownContainerRef:dropdownContainerRef,filteredOptions:filteredOptions,filterItem:filterItem,handleChange:handleChange,inputRef:inputRef,isDropDownClosed:isDropDownClosed,setFocusedOptionIndex:setFocusedOptionIndex,triggerRef:triggerRef}=useContext(DropdownContext);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown_container"),`${isDropDownClosed?"close":"open"}`,globalProps(props),className);return jsxs("div",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id,onMouseEnter:()=>setFocusedOptionIndex(-1),ref:dropdownContainerRef,style:triggerRef?{}:{position:"absolute"}},{children:[searchbar&&jsx(TextInput,Object.assign({dark:dark,paddingTop:"xs",paddingX:"xs"},{children:jsx("input",{onChange:handleChange,placeholder:"Select...",ref:inputRef,value:filterItem},void 0)}),void 0),jsx(List,Object.assign({dark:dark},{children:(filteredOptions===null||filteredOptions===void 0?void 0:filteredOptions.length)===0?jsx(ListItem,Object.assign({dark:dark,display:"flex",justifyContent:"center",padding:"xs"},{children:jsx(Body$1,{color:"light",dark:dark,text:"no option"},void 0)}),void 0):children}),void 0)]}),void 0)};const DropdownOption=props=>{const{aria:aria={},children:children,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,key:key,option:option}=props;const{filteredOptions:filteredOptions,filterItem:filterItem,focusedOptionIndex:focusedOptionIndex,handleOptionClick:handleOptionClick,selected:selected}=useContext(DropdownContext);const isItemMatchingFilter=option2=>{const label=typeof option2.label==="string"?option2.label.toLowerCase():option2.label;return String(label).toLowerCase().includes(filterItem.toLowerCase())};if(!isItemMatchingFilter(option)){return null}const isFocused=focusedOptionIndex>=0&&filteredOptions[focusedOptionIndex].label===option.label;const focusedClass=isFocused&&"focused";const selectedClass=`${selected.label===option.label?"selected":"list"}`;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown_option",selectedClass,focusedClass),globalProps(props),className);return createElement("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,key:key,onClick:()=>handleOptionClick(option)},jsx(ListItem,{cursor:"pointer",dark:dark,"data-name":option.value,padding:"none",children:children?jsx("div",{className:"dropdown_option_wrapper",children:children}):jsx(Body$1,{dark:dark,text:option.label})},option.label))};const useHandleOnKeyDown=()=>{const{autocomplete:autocomplete,filteredOptions:filteredOptions,focusedOptionIndex:focusedOptionIndex,handleBackspace:handleBackspace,handleOptionClick:handleOptionClick,selected:selected,setFocusedOptionIndex:setFocusedOptionIndex,setIsDropDownClosed:setIsDropDownClosed}=useContext(DropdownContext);return e=>{if(e.key!=="Tab"&&autocomplete&&selected&&selected.label){handleBackspace()}switch(e.key){case"Backspace":case"Delete":if(autocomplete){handleBackspace()}break;case"ArrowDown":{e.preventDefault();setIsDropDownClosed(false);const nextIndex=(focusedOptionIndex+1)%filteredOptions.length;setFocusedOptionIndex(nextIndex);break}case"ArrowUp":{e.preventDefault();const nextIndexUp=(focusedOptionIndex-1+filteredOptions.length)%filteredOptions.length;setFocusedOptionIndex(nextIndexUp);break}case"Enter":if(focusedOptionIndex!==-1){e.preventDefault();handleOptionClick(filteredOptions[focusedOptionIndex]);setFocusedOptionIndex(-1)}else if(focusedOptionIndex===-1){setIsDropDownClosed(false)}break;case"Tab":setIsDropDownClosed(true);setFocusedOptionIndex(-1);break}}};const DropdownTrigger=props=>{const{aria:aria={},children:children,className:className,customDisplay:customDisplay,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,placeholder:placeholder}=props;const{autocomplete:autocomplete,filterItem:filterItem,handleChange:handleChange,handleWrapperClick:handleWrapperClick,inputRef:inputRef,inputWrapperRef:inputWrapperRef,isDropDownClosed:isDropDownClosed,isInputFocused:isInputFocused,selected:selected,setIsInputFocused:setIsInputFocused,toggleDropdown:toggleDropdown,triggerRef:triggerRef}=useContext(DropdownContext);const handleKeyDown=useHandleOnKeyDown();const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown_trigger"),globalProps(props),className);const triggerWrapperClasses=buildCss("dropdown_trigger_wrapper",isInputFocused&&"focus",!autocomplete&&"select_only");const customDisplayPlaceholder=selected.label?jsx("b",{children:selected.label},void 0):autocomplete?"":placeholder?placeholder:"Select...";const defaultDisplayPlaceholder=selected.label?selected.label:autocomplete?"":placeholder?placeholder:"Select...";return jsx("div",Object.assign({},ariaProps,dataProps,htmlProps,{className:classes,id:id},{children:!triggerRef&&(children?jsx("div",Object.assign({onClick:()=>toggleDropdown(),onKeyDown:handleKeyDown,ref:inputWrapperRef,style:{display:"inline-block"},tabIndex:0},{children:children}),void 0):jsx(Fragment,{children:jsxs(Flex,Object.assign({align:"center",borderRadius:"lg",className:triggerWrapperClasses,cursor:`${autocomplete?"text":"pointer"}`,htmlOptions:{onClick:()=>handleWrapperClick(),onKeyDown:handleKeyDown,tabIndex:"0",ref:inputWrapperRef},justify:"between",paddingX:"sm",paddingY:"xs"},{children:[jsx(FlexItem,{children:jsxs(Flex,Object.assign({align:"center"},{children:[customDisplay?jsxs(Flex,Object.assign({align:"center"},{children:[customDisplay,jsx(Body$1,Object.assign({dark:dark,paddingLeft:`${selected.label?"xs":"none"}`},{children:customDisplayPlaceholder}),void 0)]}),void 0):jsx(Body$1,{dark:dark,text:defaultDisplayPlaceholder},void 0),autocomplete&&jsx("input",{className:"dropdown_input",onChange:handleChange,onClick:()=>toggleDropdown(),onFocus:()=>setIsInputFocused(true),onKeyDown:handleKeyDown,placeholder:selected.label?"":placeholder?placeholder:"Select...",ref:inputRef,value:filterItem},void 0)]}),void 0)},void 0),jsx(Body$1,Object.assign({dark:dark,display:"flex",htmlOptions:{onClick:e=>{e.stopPropagation();handleWrapperClick()}}},{children:jsx(Icon,{cursor:"pointer",dark:dark,icon:`${isDropDownClosed?"chevron-down":"chevron-up"}`,size:"sm"},void 0)}),`${isDropDownClosed?"chevron-down":"chevron-up"}`)]}),void 0)},void 0))}),void 0)};const separateChildComponents=children=>{let trigger=null;let container=null;const otherChildren=[];React__default.Children.forEach(children,(child=>{if(child&&child.type===DropdownTrigger){trigger=child}else if(child&&child.type===DropdownContainer){container=child}else{otherChildren.push(child)}}));return{trigger:trigger,container:container,otherChildren:otherChildren}};const prepareSubcomponents=({children:children,hasTriggerSubcomponent:hasTriggerSubcomponent,hasContainerSubcomponent:hasContainerSubcomponent,trigger:trigger,container:container,otherChildren:otherChildren,dark:dark})=>{const componentsToRender=[];if(!hasTriggerSubcomponent&&!hasContainerSubcomponent){componentsToRender.push(jsx(DropdownTrigger,{dark:dark},void 0));componentsToRender.push(jsx(DropdownContainer,Object.assign({dark:dark},{children:children}),void 0))}else if(!hasTriggerSubcomponent&&hasContainerSubcomponent){componentsToRender.push(jsx(DropdownTrigger,{dark:dark},void 0));componentsToRender.push(children)}else if(hasTriggerSubcomponent&&!hasContainerSubcomponent){componentsToRender.push(trigger);componentsToRender.push(jsx(DropdownContainer,Object.assign({dark:dark},{children:otherChildren}),void 0))}else{componentsToRender.push(trigger);componentsToRender.push(container)}return componentsToRender};const handleClickOutside=({inputWrapperRef:inputWrapperRef,dropdownContainerRef:dropdownContainerRef,setIsDropDownClosed:setIsDropDownClosed,setFocusedOptionIndex:setFocusedOptionIndex,setIsInputFocused:setIsInputFocused})=>e=>{let targetElement=e.target;let shouldClose=true;while(targetElement&&shouldClose){if(targetElement.getAttribute("data-dropdown")==="pb-dropdown-trigger"){shouldClose=false}targetElement=targetElement.parentElement}if(inputWrapperRef.current&&!inputWrapperRef.current.contains(e.target)&&dropdownContainerRef.current&&!dropdownContainerRef.current.contains(e.target)&&shouldClose){setIsDropDownClosed(true);setFocusedOptionIndex(-1);setIsInputFocused(false)}};const Dropdown=props=>{const{aria:aria={},autocomplete:autocomplete=false,blankSelection:blankSelection="",children:children,className:className,dark:dark=false,data:data={},defaultValue:defaultValue={},error:error,htmlOptions:htmlOptions={},id:id,isClosed:isClosed=true,label:label,onSelect:onSelect,options:options,triggerRef:triggerRef}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_dropdown"),globalProps(props),className);const[isDropDownClosed,setIsDropDownClosed,toggleDropdown]=useDropdown(isClosed);const[filterItem,setFilterItem]=useState("");const[selected,setSelected]=useState(defaultValue);const[isInputFocused,setIsInputFocused]=useState(false);const[hasTriggerSubcomponent,setHasTriggerSubcomponent]=useState(true);const[hasContainerSubcomponent,setHasContainerSubcomponent]=useState(true);const[focusedOptionIndex,setFocusedOptionIndex]=useState(-1);const dropdownRef=useRef(null);const inputRef=useRef(null);const inputWrapperRef=useRef(null);const dropdownContainerRef=useRef(null);const{trigger:trigger,container:container,otherChildren:otherChildren}=separateChildComponents(children);useEffect((()=>{if(triggerRef==null?void 0:triggerRef.current){const parentElement=triggerRef.current.parentNode;if(parentElement){parentElement.style.position="relative"}}const handleClick=handleClickOutside({inputWrapperRef:inputWrapperRef,dropdownContainerRef:dropdownContainerRef,setIsDropDownClosed:setIsDropDownClosed,setFocusedOptionIndex:setFocusedOptionIndex,setIsInputFocused:setIsInputFocused});window.addEventListener("click",handleClick);return()=>{window.removeEventListener("click",handleClick)}}),[]);useEffect((()=>{setHasTriggerSubcomponent(!!trigger);setHasContainerSubcomponent(!!container)}),[]);useEffect((()=>{setIsDropDownClosed(isClosed)}),[isClosed]);const blankSelectionOption=blankSelection?[{label:blankSelection,value:""}]:[];const optionsWithBlankSelection=blankSelectionOption.concat(options);const filteredOptions=optionsWithBlankSelection==null?void 0:optionsWithBlankSelection.filter((option=>{const label2=typeof option.label==="string"?option.label.toLowerCase():option.label;return String(label2).toLowerCase().includes(filterItem.toLowerCase())}));useEffect((()=>{if(!isDropDownClosed){let newIndex=0;if(selected&&(selected==null?void 0:selected.label)){const selectedIndex=filteredOptions.findIndex((option=>option.label===selected.label));if(selectedIndex>=0){newIndex=selectedIndex}}setFocusedOptionIndex(newIndex)}}),[isDropDownClosed]);const handleChange=e=>{setFilterItem(e.target.value);setIsDropDownClosed(false)};const handleOptionClick=selectedItem=>{setSelected(selectedItem);setFilterItem("");setIsDropDownClosed(true);onSelect&&onSelect(selectedItem)};const handleWrapperClick=()=>{autocomplete&&inputRef.current.focus();toggleDropdown()};const handleBackspace=()=>{setSelected({});onSelect&&onSelect(null);setFocusedOptionIndex(-1)};const componentsToRender=prepareSubcomponents({children:children,hasTriggerSubcomponent:hasTriggerSubcomponent,hasContainerSubcomponent:hasContainerSubcomponent,trigger:trigger,container:container,otherChildren:otherChildren,dark:dark});return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,style:triggerRef?{position:"absolute"}:{position:"relative"},children:jsxs(DropdownContext.Provider,{value:{autocomplete:autocomplete,dropdownContainerRef:dropdownContainerRef,filteredOptions:filteredOptions,filterItem:filterItem,focusedOptionIndex:focusedOptionIndex,handleBackspace:handleBackspace,handleChange:handleChange,handleOptionClick:handleOptionClick,handleWrapperClick:handleWrapperClick,inputRef:inputRef,inputWrapperRef:inputWrapperRef,isDropDownClosed:isDropDownClosed,isInputFocused:isInputFocused,optionsWithBlankSelection:optionsWithBlankSelection,selected:selected,setFocusedOptionIndex:setFocusedOptionIndex,setIsDropDownClosed:setIsDropDownClosed,setIsInputFocused:setIsInputFocused,setSelected:setSelected,toggleDropdown:toggleDropdown,triggerRef:triggerRef},children:[label&&jsx(Caption,{dark:dark,marginBottom:"xs",text:label}),jsxs("div",{className:`dropdown_wrapper ${error?"error":""}`,onBlur:()=>{setTimeout((()=>{if(!dropdownRef.current.contains(document.activeElement)){setIsInputFocused(false)}}),0)},onFocus:()=>setIsInputFocused(true),ref:dropdownRef,children:[children?jsx(Fragment,{children:componentsToRender.map(((component,index)=>jsx(React__default.Fragment,{children:component},index)))}):jsxs(Fragment,{children:[jsx(DropdownTrigger,{}),jsx(DropdownContainer,{children:optionsWithBlankSelection&&(optionsWithBlankSelection==null?void 0:optionsWithBlankSelection.map((option=>jsx(Dropdown.Option,{option:option},option.id))))})]}),error&&jsx(Body$1,{status:"negative",text:error})]})]})})};Dropdown.Option=DropdownOption;Dropdown.Trigger=DropdownTrigger;Dropdown.Container=DropdownContainer;function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,[])).next())}))}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(g&&(g=0,op[0]&&(_=0)),_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0)&&!(r=i.next()).done)ar.push(r.value)}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i)}finally{if(e)throw e.error}}return ar}function __spread(){for(var ar=[],i=0;i0?webkitRelativePath:file.name,writable:false,configurable:false,enumerable:true})}return f}function withMimeType(file){var name=file.name;var hasExtension=name&&name.lastIndexOf(".")!==-1;if(hasExtension&&!file.type){var ext=name.split(".").pop().toLowerCase();var type=COMMON_MIME_TYPES.get(ext);if(type){Object.defineProperty(file,"type",{value:type,writable:false,configurable:false,enumerable:true})}}return file}var FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];function fromEvent(evt){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(_a){return[2,isDragEvt(evt)&&evt.dataTransfer?getDataTransferFiles(evt.dataTransfer,evt.type):getInputFiles(evt)]}))}))}function isDragEvt(value){return!!value.dataTransfer}function getInputFiles(evt){var files=isInput(evt.target)?evt.target.files?fromList(evt.target.files):[]:[];return files.map((function(file){return toFileWithPath(file)}))}function isInput(value){return value!==null}function getDataTransferFiles(dt,type){return __awaiter(this,void 0,void 0,(function(){var items,files;return __generator(this,(function(_a){switch(_a.label){case 0:if(!dt.items)return[3,2];items=fromList(dt.items).filter((function(item){return item.kind==="file"}));if(type!=="drop"){return[2,items]}return[4,Promise.all(items.map(toFilePromises))];case 1:files=_a.sent();return[2,noIgnoredFiles(flatten(files))];case 2:return[2,noIgnoredFiles(fromList(dt.files).map((function(file){return toFileWithPath(file)})))]}}))}))}function noIgnoredFiles(files){return files.filter((function(file){return FILES_TO_IGNORE.indexOf(file.name)===-1}))}function fromList(items){var files=[];for(var i=0;i=minSize&&file.size<=maxSize;else if(isDefined(minSize))return file.size>=minSize;else if(isDefined(maxSize))return file.size<=maxSize}return true}function isDefined(value){return value!==void 0&&value!==null}function allFilesAccepted(_ref){var files=_ref.files,accept=_ref.accept,minSize=_ref.minSize,maxSize=_ref.maxSize,multiple=_ref.multiple;if(!multiple&&files.length>1){return false}return files.every((function(file){return fileAccepted(file,accept)&&fileMatchSize(file,minSize,maxSize)}))}function isPropagationStopped(event){if(typeof event.isPropagationStopped==="function"){return event.isPropagationStopped()}else if(typeof event.cancelBubble!=="undefined"){return event.cancelBubble}return false}function isEvtWithFiles(event){if(!event.dataTransfer){return!!event.target&&!!event.target.files}return Array.prototype.some.call(event.dataTransfer.types,(function(type){return type==="Files"||type==="application/x-moz-file"}))}function onDocumentDragOver(event){event.preventDefault()}function isIe(userAgent){return userAgent.indexOf("MSIE")!==-1||userAgent.indexOf("Trident/")!==-1}function isEdge(userAgent){return userAgent.indexOf("Edge/")!==-1}function isIeOrEdge(){var userAgent=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return isIe(userAgent)||isEdge(userAgent)}function composeEventHandlers(){for(var _len=arguments.length,fns=new Array(_len),_key=0;_key<_len;_key++){fns[_key]=arguments[_key]}return function(event){for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2]}return fns.some((function(fn){if(!isPropagationStopped(event)&&fn){fn.apply(void 0,[event].concat(args))}return isPropagationStopped(event)}))}}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _objectWithoutPropertiesLoose$1(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i=0)continue;target[key]=source[key]}return target}var Dropzone=forwardRef((function(_ref,ref){var children=_ref.children,params=_objectWithoutProperties$1(_ref,["children"]);var _useDropzone=useDropzone(params),open=_useDropzone.open,props=_objectWithoutProperties$1(_useDropzone,["open"]);useImperativeHandle(ref,(function(){return{open:open}}),[open]);return React__default.createElement(Fragment$1,null,children(_objectSpread({},props,{open:open})))}));Dropzone.displayName="Dropzone";Dropzone.propTypes={children:PropTypes.func,accept:PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.string)]),multiple:PropTypes.bool,preventDropOnDocument:PropTypes.bool,noClick:PropTypes.bool,noKeyboard:PropTypes.bool,noDrag:PropTypes.bool,noDragEventsBubbling:PropTypes.bool,minSize:PropTypes.number,maxSize:PropTypes.number,disabled:PropTypes.bool,getFilesFromEvent:PropTypes.func,onFileDialogCancel:PropTypes.func,onDragEnter:PropTypes.func,onDragLeave:PropTypes.func,onDragOver:PropTypes.func,onDrop:PropTypes.func,onDropAccepted:PropTypes.func,onDropRejected:PropTypes.func};var initialState$1={isFocused:false,isFileDialogActive:false,isDragActive:false,isDragAccept:false,isDragReject:false,draggedFiles:[],acceptedFiles:[],rejectedFiles:[]};function useDropzone(){var _ref2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},accept=_ref2.accept,_ref2$disabled=_ref2.disabled,disabled=_ref2$disabled===void 0?false:_ref2$disabled,_ref2$getFilesFromEve=_ref2.getFilesFromEvent,getFilesFromEvent=_ref2$getFilesFromEve===void 0?fromEvent:_ref2$getFilesFromEve,_ref2$maxSize=_ref2.maxSize,maxSize=_ref2$maxSize===void 0?Infinity:_ref2$maxSize,_ref2$minSize=_ref2.minSize,minSize=_ref2$minSize===void 0?0:_ref2$minSize,_ref2$multiple=_ref2.multiple,multiple=_ref2$multiple===void 0?true:_ref2$multiple,onDragEnter=_ref2.onDragEnter,onDragLeave=_ref2.onDragLeave,onDragOver=_ref2.onDragOver,onDrop=_ref2.onDrop,onDropAccepted=_ref2.onDropAccepted,onDropRejected=_ref2.onDropRejected,onFileDialogCancel=_ref2.onFileDialogCancel,_ref2$preventDropOnDo=_ref2.preventDropOnDocument,preventDropOnDocument=_ref2$preventDropOnDo===void 0?true:_ref2$preventDropOnDo,_ref2$noClick=_ref2.noClick,noClick=_ref2$noClick===void 0?false:_ref2$noClick,_ref2$noKeyboard=_ref2.noKeyboard,noKeyboard=_ref2$noKeyboard===void 0?false:_ref2$noKeyboard,_ref2$noDrag=_ref2.noDrag,noDrag=_ref2$noDrag===void 0?false:_ref2$noDrag,_ref2$noDragEventsBub=_ref2.noDragEventsBubbling,noDragEventsBubbling=_ref2$noDragEventsBub===void 0?false:_ref2$noDragEventsBub;var rootRef=useRef(null);var inputRef=useRef(null);var _useReducer=useReducer(reducer,initialState$1),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var isFocused=state.isFocused,isFileDialogActive=state.isFileDialogActive,draggedFiles=state.draggedFiles;var openFileDialog=useCallback((function(){if(inputRef.current){dispatch({type:"openDialog"});inputRef.current.value=null;inputRef.current.click()}}),[dispatch]);var onWindowFocus=function onWindowFocus2(){if(isFileDialogActive){setTimeout((function(){if(inputRef.current){var files=inputRef.current.files;if(!files.length){dispatch({type:"closeDialog"});if(typeof onFileDialogCancel==="function"){onFileDialogCancel()}}}}),300)}};useEffect((function(){window.addEventListener("focus",onWindowFocus,false);return function(){window.removeEventListener("focus",onWindowFocus,false)}}),[inputRef,isFileDialogActive,onFileDialogCancel]);var onKeyDownCb=useCallback((function(event){if(!rootRef.current||!rootRef.current.isEqualNode(event.target)){return}if(event.keyCode===32||event.keyCode===13){event.preventDefault();openFileDialog()}}),[rootRef,inputRef]);var onFocusCb=useCallback((function(){dispatch({type:"focus"})}),[]);var onBlurCb=useCallback((function(){dispatch({type:"blur"})}),[]);var onClickCb=useCallback((function(){if(noClick){return}if(isIeOrEdge()){setTimeout(openFileDialog,0)}else{openFileDialog()}}),[inputRef,noClick]);var dragTargetsRef=useRef([]);var onDocumentDrop=function onDocumentDrop2(event){if(rootRef.current&&rootRef.current.contains(event.target)){return}event.preventDefault();dragTargetsRef.current=[]};useEffect((function(){if(preventDropOnDocument){document.addEventListener("dragover",onDocumentDragOver,false);document.addEventListener("drop",onDocumentDrop,false)}return function(){if(preventDropOnDocument){document.removeEventListener("dragover",onDocumentDragOver);document.removeEventListener("drop",onDocumentDrop)}}}),[rootRef,preventDropOnDocument]);var onDragEnterCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);if(dragTargetsRef.current.indexOf(event.target)===-1){dragTargetsRef.current=[].concat(_toConsumableArray(dragTargetsRef.current),[event.target])}if(isEvtWithFiles(event)){Promise.resolve(getFilesFromEvent(event)).then((function(draggedFiles2){if(isPropagationStopped(event)&&!noDragEventsBubbling){return}dispatch({draggedFiles:draggedFiles2,isDragActive:true,type:"setDraggedFiles"});if(onDragEnter){onDragEnter(event)}}))}}),[getFilesFromEvent,onDragEnter,noDragEventsBubbling]);var onDragOverCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);if(event.dataTransfer){try{event.dataTransfer.dropEffect="copy"}catch(_unused){}}if(isEvtWithFiles(event)&&onDragOver){onDragOver(event)}return false}),[onDragOver,noDragEventsBubbling]);var onDragLeaveCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);var targets=dragTargetsRef.current.filter((function(target){return target!==event.target&&rootRef.current&&rootRef.current.contains(target)}));dragTargetsRef.current=targets;if(targets.length>0){return}dispatch({isDragActive:false,type:"setDraggedFiles",draggedFiles:[]});if(isEvtWithFiles(event)&&onDragLeave){onDragLeave(event)}}),[rootRef,onDragLeave,noDragEventsBubbling]);var onDropCb=useCallback((function(event){event.preventDefault();event.persist();stopPropagation(event);dragTargetsRef.current=[];if(isEvtWithFiles(event)){Promise.resolve(getFilesFromEvent(event)).then((function(files){if(isPropagationStopped(event)&&!noDragEventsBubbling){return}var acceptedFiles=[];var rejectedFiles=[];files.forEach((function(file){if(fileAccepted(file,accept)&&fileMatchSize(file,minSize,maxSize)){acceptedFiles.push(file)}else{rejectedFiles.push(file)}}));if(!multiple&&acceptedFiles.length>1){rejectedFiles.push.apply(rejectedFiles,_toConsumableArray(acceptedFiles.splice(0)))}dispatch({acceptedFiles:acceptedFiles,rejectedFiles:rejectedFiles,type:"setFiles"});if(onDrop){onDrop(acceptedFiles,rejectedFiles,event)}if(rejectedFiles.length>0&&onDropRejected){onDropRejected(rejectedFiles,event)}if(acceptedFiles.length>0&&onDropAccepted){onDropAccepted(acceptedFiles,event)}}))}dispatch({type:"reset"})}),[multiple,accept,minSize,maxSize,getFilesFromEvent,onDrop,onDropAccepted,onDropRejected,noDragEventsBubbling]);var composeHandler=function composeHandler2(fn){return disabled?null:fn};var composeKeyboardHandler=function composeKeyboardHandler2(fn){return noKeyboard?null:composeHandler(fn)};var composeDragHandler=function composeDragHandler2(fn){return noDrag?null:composeHandler(fn)};var stopPropagation=function stopPropagation2(event){if(noDragEventsBubbling){event.stopPropagation()}};var getRootProps=useMemo((function(){return function(){var _ref3=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_ref3$refKey=_ref3.refKey,refKey=_ref3$refKey===void 0?"ref":_ref3$refKey,onKeyDown=_ref3.onKeyDown,onFocus=_ref3.onFocus,onBlur=_ref3.onBlur,onClick=_ref3.onClick,onDragEnter2=_ref3.onDragEnter,onDragOver2=_ref3.onDragOver,onDragLeave2=_ref3.onDragLeave,onDrop2=_ref3.onDrop,rest=_objectWithoutProperties$1(_ref3,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return _objectSpread(_defineProperty$1({onKeyDown:composeKeyboardHandler(composeEventHandlers(onKeyDown,onKeyDownCb)),onFocus:composeKeyboardHandler(composeEventHandlers(onFocus,onFocusCb)),onBlur:composeKeyboardHandler(composeEventHandlers(onBlur,onBlurCb)),onClick:composeHandler(composeEventHandlers(onClick,onClickCb)),onDragEnter:composeDragHandler(composeEventHandlers(onDragEnter2,onDragEnterCb)),onDragOver:composeDragHandler(composeEventHandlers(onDragOver2,onDragOverCb)),onDragLeave:composeDragHandler(composeEventHandlers(onDragLeave2,onDragLeaveCb)),onDrop:composeDragHandler(composeEventHandlers(onDrop2,onDropCb))},refKey,rootRef),!disabled&&!noKeyboard?{tabIndex:0}:{},{},rest)}}),[rootRef,onKeyDownCb,onFocusCb,onBlurCb,onClickCb,onDragEnterCb,onDragOverCb,onDragLeaveCb,onDropCb,noKeyboard,noDrag,disabled]);var onInputElementClick=useCallback((function(event){event.stopPropagation()}),[]);var getInputProps=useMemo((function(){return function(){var _ref4=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_ref4$refKey=_ref4.refKey,refKey=_ref4$refKey===void 0?"ref":_ref4$refKey,onChange=_ref4.onChange,onClick=_ref4.onClick,rest=_objectWithoutProperties$1(_ref4,["refKey","onChange","onClick"]);var inputProps=_defineProperty$1({accept:accept,multiple:multiple,type:"file",style:{display:"none"},onChange:composeHandler(composeEventHandlers(onChange,onDropCb)),onClick:composeHandler(composeEventHandlers(onClick,onInputElementClick)),autoComplete:"off",tabIndex:-1},refKey,inputRef);return _objectSpread({},inputProps,{},rest)}}),[inputRef,accept,multiple,onDropCb,disabled]);var fileCount=draggedFiles.length;var isDragAccept=fileCount>0&&allFilesAccepted({files:draggedFiles,accept:accept,minSize:minSize,maxSize:maxSize,multiple:multiple});var isDragReject=fileCount>0&&!isDragAccept;return _objectSpread({},state,{isDragAccept:isDragAccept,isDragReject:isDragReject,isFocused:isFocused&&!disabled,getRootProps:getRootProps,getInputProps:getInputProps,rootRef:rootRef,inputRef:inputRef,open:composeHandler(openFileDialog)})}function reducer(state,action){switch(action.type){case"focus":return _objectSpread({},state,{isFocused:true});case"blur":return _objectSpread({},state,{isFocused:false});case"openDialog":return _objectSpread({},state,{isFileDialogActive:true});case"closeDialog":return _objectSpread({},state,{isFileDialogActive:false});case"setDraggedFiles":var isDragActive=action.isDragActive,draggedFiles=action.draggedFiles;return _objectSpread({},state,{draggedFiles:draggedFiles,isDragActive:isDragActive});case"setFiles":return _objectSpread({},state,{acceptedFiles:action.acceptedFiles,rejectedFiles:action.rejectedFiles});case"reset":return _objectSpread({},state,{isFileDialogActive:false,isDragActive:false,draggedFiles:[],acceptedFiles:[],rejectedFiles:[]});default:return state}}const getFormattedFileSize=fileSize=>`${fileSize/1e6} MB`;const FileUpload=props=>{const{accept:accept=null,acceptedFilesDescription:acceptedFilesDescription="",className:className,customMessage:customMessage,data:data={},htmlOptions:htmlOptions={},maxSize:maxSize,onFilesAccepted:onFilesAccepted=noop$3,onFilesRejected:onFilesRejected=noop$3}=props;const onDrop=useCallback((files=>{onFilesAccepted(files)}),[onFilesAccepted]);const{getRootProps:getRootProps,getInputProps:getInputProps,isDragActive:isDragActive,rejectedFiles:rejectedFiles}=useDropzone({accept:accept,maxSize:maxSize,onDrop:onDrop});const prevRejected=useRef(null);const maxFileSizeText=`Max file size is ${getFormattedFileSize(maxSize)}.`;useEffect((()=>{if(rejectedFiles===prevRejected.current)return;const isFileTooLarge=maxSize&&rejectedFiles.length>0&&rejectedFiles[0].size>maxSize;if(isFileTooLarge){onFilesRejected(`File size is too large! ${maxFileSizeText}`,rejectedFiles)}prevRejected.current=rejectedFiles}),[maxFileSizeText,maxSize,onFilesRejected,rejectedFiles]);const acceptedFileTypes=()=>accept.map((fileType=>{if(fileType.startsWith("image/")){return fileType.replace("image/"," ")}else{return fileType}}));const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const getDescription=()=>customMessage?customMessage:`Choose a file or drag it here.${accept===null?"":` The accepted file types are: ${acceptedFilesDescription||acceptedFileTypes()}.`}${maxSize?` ${maxFileSizeText}`:""}`;return jsx("div",{className:classnames(buildCss("pb_file_upload_kit"),globalProps(props),className),...dataProps,...htmlProps,...getRootProps(),children:jsxs(Card,{children:[jsx("input",{...getInputProps()}),jsx(Body$1,{color:"light",children:isDragActive?jsx("p",{children:"Drop the files here ..."}):jsx("p",{children:getDescription()})})]})})};const hiddenFilters=value=>isEmpty(value)&&value!==true;const CurrentFilters=({dark:dark,filters:filters})=>{const displayableFilters=omitBy(filters,hiddenFilters);return jsxs("div",{className:"maskContainer",children:[isEmpty(filters)&&jsx("div",{className:"filters",children:jsx(Body$1,{color:"light",paddingLeft:"xs",size:4,tag:"span",text:"No Filter Selected"})}),!isEmpty(filters)&&jsxs("div",{className:"filters",children:[jsx("div",{className:"left_gradient"}),map(displayableFilters,((value,name)=>jsx("div",{className:"filter",children:value===true?jsx(Title,{dark:dark,size:4,tag:"h4",text:name}):jsxs("div",{children:[jsx(Caption,{dark:dark,text:name}),jsx(Title,{dark:dark,size:4,tag:"h4",text:value})]})},`filter-${name}`))),jsx("div",{className:"right_gradient"})]})]})};const FilterBackground=props=>{const{background:background=true,className:className,children:children,dark:dark}=props;return jsx("div",{className:classnames(`pb_filter_kit ${className}`,globalProps(props)),children:background?jsx(Card,{dark:dark,padding:"none",children:children}):jsx(Fragment,{children:children})})};const FiltersPopover=({children:children,dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement="bottom-start"})=>{const[hide2,updateHide]=useState(true);const toggle=()=>updateHide(!hide2);const filterButton=jsx(CircleIconButton,{dark:dark,icon:"filter",id:"filter",onClick:toggle,variant:"secondary"});return jsx(PbReactPopover,{closeOnClick:"outside",maxHeight:maxHeight,minWidth:minWidth,placement:placement,reference:filterButton,shouldClosePopover:updateHide,show:!hide2,children:jsx("div",{className:"pb-form",children:typeof children==="function"?children({closePopover:()=>updateHide(true)}):children})})};const TitleCount=props=>{const{align:align="left",aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},count:count2,id:id,title:title,size:size="sm"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames(buildCss("pb_title_count_kit",align,size),globalProps(props),className);const formatCount=count2.toLocaleString();return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:[jsx(Title,{className:title!==void 0?"pb_title_count_text":"",dark:dark,size:size==="lg"?3:4,text:title}),jsx(Body$1,{color:"light",dark:dark,children:count2&&formatCount})]})};const resultsText=results=>results==1?"Result":"Results";const ResultsCount=({dark:dark,results:results,title:title})=>{const resultTitle=()=>jsx(TitleCount,{align:"center",count:results,dark:dark,title:`${resultsText(results)}:`});const justResults=()=>jsx(Caption,{className:"filter-results",dark:dark,size:"xs",text:`${results} ${resultsText(results)}`});const displayResultsCount=()=>{if(results&&title){return jsx(Fragment,{children:resultTitle()})}else if(results){return jsx(Fragment,{children:justResults()})}else{return jsx("div",{})}};return jsx(Fragment,{children:displayResultsCount()})};const nextValue=(value,name)=>{const current=find$1(value,{name:name});return{name:name,dir:current&¤t.dir=="asc"?"desc":"asc"}};const directionIcon=dir=>dir=="asc"?"sort-amount-up":"sort-amount-down";const renderOptions=(options,value,handleChange)=>map(options,((label,name)=>{const next=nextValue(value,name);return jsx(ListItem,{children:jsx(Button,{htmlType:void 0,onClick:partial(handleChange,next),text:` ${label}`,variant:"link"})},`option-${next.name}-${next.dir}`)}));const SortMenu=({dark:dark,options:options,value:value,onChange:onChange})=>{const[hide2,updateHide]=useState(true);const toggle=()=>updateHide(!hide2);const handleChange=value2=>{updateHide(true);onChange([value2])};const sortButton=jsx(Button,{dark:dark,htmlType:void 0,id:"sort-button",onClick:toggle,paddingRight:"none",variant:"link",children:map(value,(({dir:dir,name:name})=>jsxs("span",{children:[` ${options[name]}`,jsx(Icon,{dark:dark,icon:directionIcon(dir)})]},`current-sort-${name}-${dir}`)))});return jsx(PbReactPopover,{className:"pb_filter_sort_menu",closeOnClick:"outside",padding:"none",placement:"bottom",reference:sortButton,shouldClosePopover:updateHide,show:!hide2,children:jsx(List,{children:renderOptions(options,value,handleChange)})})};const FilterSingle=({onSortChange:onSortChange,sortOptions:sortOptions,sortValue:sortValue,filters:filters,results:results,children:children,dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,...bgProps})=>jsx(FilterBackground,{dark:dark,...bgProps,children:jsxs(Flex,{orientation:"row",paddingRight:"lg",vertical:"center",children:[children&&jsxs(Fragment,{children:[jsx(FiltersPopover,{dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,children:children}),jsx(CurrentFilters,{dark:dark,filters:filters})]}),jsx(ResultsCount,{dark:dark,results:results}),!isEmpty(sortOptions)&&jsx(SortMenu,{dark:dark,onChange:onSortChange,options:sortOptions,value:sortValue})]})});const FilterDouble=({onSortChange:onSortChange,sortOptions:sortOptions,sortValue:sortValue,filters:filters,results:results,children:children,dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,...bgProps})=>jsxs(FilterBackground,{dark:dark,...bgProps,children:[jsxs(Flex,{orientation:"row",vertical:"center",children:[jsx(FiltersPopover,{dark:dark,maxHeight:maxHeight,minWidth:minWidth,placement:placement,children:children}),jsx(CurrentFilters,{dark:dark,filters:filters})]}),jsx(SectionSeparator,{dark:dark}),jsxs(Flex,{className:"filter-bottom",orientation:"row",spacing:"between",vertical:"center",children:[jsx(ResultsCount,{dark:dark,results:results,title:true}),jsxs(Flex,{orientation:"row",vertical:"center",children:[jsx(Caption,{dark:dark,text:"sort by:"}),jsx(SortMenu,{dark:dark,onChange:onSortChange,options:sortOptions,value:sortValue})]})]})]});const Filter=({double:double=false,...templateProps})=>{const displayFilter=()=>{if(double===true){return jsx(FilterDouble,{...templateProps})}else{return jsx(FilterSingle,{...templateProps})}};return jsx(Fragment,{children:displayFilter()})};const iconMap={success:"check",error:"exclamation-triangle",neutral:"info-circle",tip:"info-circle"};const FixedConfirmationToast=props=>{const[showToast,toggleToast]=useState(true);const{autoClose:autoClose=0,children:children,className:className,closeable:closeable=false,horizontal:horizontal,htmlOptions:htmlOptions={},icon:icon,multiLine:multiLine=false,onClose:onClose=()=>void 0,open:open=true,status:status="neutral",text:text2,vertical:vertical}=props;const returnedIcon=icon||iconMap[status];const iconClass=icon?"custom_icon":"";const css=classnames(`pb_fixed_confirmation_toast_kit_${status}`,{_multi_line:multiLine},{[`positioned_toast ${vertical} ${horizontal}`]:vertical&&horizontal},`${iconClass}`,globalProps(props),className);const htmlProps=buildHtmlProps(htmlOptions);const autoCloseToast=()=>{if(autoClose&&open){setTimeout((()=>{toggleToast(false);onClose()}),autoClose)}};useEffect((()=>{toggleToast(open);autoCloseToast()}),[open]);const handleClick=()=>{toggleToast(!closeable);onClose()};return jsx(Fragment,{children:showToast&&jsxs("div",{className:css,onClick:handleClick,...htmlProps,children:[returnedIcon&&jsx(Icon,{className:"pb_icon",fixedWidth:true,icon:returnedIcon}),children&&children||text2&&jsx(Title,{className:"pb_fixed_confirmation_toast_text",flex:"1",size:4,text:text2}),closeable&&jsx(Icon,{className:"pb_icon",cursor:"pointer",fixedWidth:false,icon:"times"})]})})};const FormGroup=props=>{const{aria:aria={},className:className,data:data={},fullWidth:fullWidth=false,htmlOptions:htmlOptions={},id:id,children:children}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_form_group_kit",{full:fullWidth}),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})};var highchartsGantt={exports:{}};(function(module){(function(W,I){module.exports?(I["default"]=I,module.exports=W.document?I(W):I):(W.Highcharts&&W.Highcharts.error(16,true),W.Highcharts=I(W))})("undefined"!==typeof window?window:commonjsGlobal,(function(W){function I(c,g2,y,A){c.hasOwnProperty(g2)||(c[g2]=A.apply(null,y),"function"===typeof CustomEvent&&W.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:g2,module:c[g2]}})))}var g={};I(g,"Core/Globals.js",[],(function(){var c;(function(c2){c2.SVG_NS="http://www.w3.org/2000/svg";c2.product="Highcharts";c2.version="10.3.3";c2.win="undefined"!==typeof W?W:{};c2.doc=c2.win.document;c2.svg=c2.doc&&c2.doc.createElementNS&&!!c2.doc.createElementNS(c2.SVG_NS,"svg").createSVGRect;c2.userAgent=c2.win.navigator&&c2.win.navigator.userAgent||"";c2.isChrome=-1!==c2.userAgent.indexOf("Chrome");c2.isFirefox=-1!==c2.userAgent.indexOf("Firefox");c2.isMS=/(edge|msie|trident)/i.test(c2.userAgent)&&!c2.win.opera;c2.isSafari=!c2.isChrome&&-1!==c2.userAgent.indexOf("Safari");c2.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(c2.userAgent);c2.isWebKit=-1!==c2.userAgent.indexOf("AppleWebKit");c2.deg2rad=2*Math.PI/360;c2.hasBidiBug=c2.isFirefox&&4>parseInt(c2.userAgent.split("Firefox/")[1],10);c2.hasTouch=!!c2.win.TouchEvent;c2.marginNames=["plotTop","marginRight","marginBottom","plotLeft"];c2.noop=function(){};c2.supportsPassiveEvents=function(){var g2=false;if(!c2.isMS){var L=Object.defineProperty({},"passive",{get:function(){g2=true}});c2.win.addEventListener&&c2.win.removeEventListener&&(c2.win.addEventListener("testPassive",c2.noop,L),c2.win.removeEventListener("testPassive",c2.noop,L))}return g2}();c2.charts=[];c2.dateFormats={};c2.seriesTypes={};c2.symbolSizes={};c2.chartCount=0})(c||(c={}));return c}));I(g,"Core/Utilities.js",[g["Core/Globals.js"]],(function(c){function g2(h,b2,d2,l2){var v=b2?"Highcharts error":"Highcharts warning";32===h&&(h=""+v+": Deprecated member");var n2=r(h),J=n2?""+v+" #"+h+": www.highcharts.com/errors/"+h+"/":h.toString();if("undefined"!==typeof l2){var E="";n2&&(J+="?");H(l2,(function(h2,b3){E+="\n - ".concat(b3,": ").concat(h2);n2&&(J+=encodeURI(b3)+"="+encodeURI(h2))}));J+=E}u(c,"displayError",{chart:d2,code:h,message:J,params:l2},(function(){if(b2)throw Error(J);f.console&&-1===g2.messages.indexOf(J)&&console.warn(J)}));g2.messages.push(J)}function y(h,b2){var d2={};H(h,(function(v,f2){if(C(h[f2],true)&&!h.nodeType&&b2[f2])v=y(h[f2],b2[f2]),Object.keys(v).length&&(d2[f2]=v);else if(C(h[f2])||h[f2]!==b2[f2]||f2 in h&&!(f2 in b2))d2[f2]=h[f2]}));return d2}function A(h,b2){return parseInt(h,b2||10)}function B(h){return"string"===typeof h}function z(h){h=Object.prototype.toString.call(h);return"[object Array]"===h||"[object Array Iterator]"===h}function C(h,b2){return!!h&&"object"===typeof h&&(!b2||!z(h))}function x(h){return C(h)&&"number"===typeof h.nodeType}function t(h){var b2=h&&h.constructor;return!(!C(h,true)||x(h)||!b2||!b2.name||"Object"===b2.name)}function r(h){return"number"===typeof h&&!isNaN(h)&&Infinity>h&&-Infinity=b2-1&&(b2=Math.floor(d2)),Math.max(0,b2-(v(h,"padding-left",true)||0)-(v(h,"padding-right",true)||0));if("height"===b2)return Math.max(0,Math.min(h.offsetHeight,h.scrollHeight)-(v(h,"padding-top",true)||0)-(v(h,"padding-bottom",true)||0));f.getComputedStyle||g2(27,true);if(h=f.getComputedStyle(h,void 0)){var l2=h.getPropertyValue(b2);p(d2,"opacity"!==b2)&&(l2=A(l2))}return l2}function H(h,b2,d2){for(var v in h)Object.hasOwnProperty.call(h,v)&&b2.call(d2||h[v],h[v],v,h)}function K(h,b2,d2){function v(b3,d3){var v2=h.removeEventListener||c.removeEventListenerPolyfill;v2&&v2.call(h,b3,d3,false)}function f2(d3){var f3;if(h.nodeName){if(b2){var l3={};l3[b2]=true}else l3=d3;H(l3,(function(h2,b3){if(d3[b3])for(f3=d3[b3].length;f3--;)v(b3,d3[b3][f3].fn)}))}}var l2="function"===typeof h&&h.prototype||h;if(Object.hasOwnProperty.call(l2,"hcEvents")){var n2=l2.hcEvents;b2?(l2=n2[b2]||[],d2?(n2[b2]=l2.filter((function(h2){return d2!==h2.fn})),v(b2,d2)):(f2(n2),n2[b2]=[])):(f2(n2),delete l2.hcEvents)}}function u(h,b2,d2,f2){d2=d2||{};if(w.createEvent&&(h.dispatchEvent||h.fireEvent&&h!==c)){var v=w.createEvent("Events");v.initEvent(b2,true,true);d2=m(v,d2);h.dispatchEvent?h.dispatchEvent(d2):h.fireEvent(b2,d2)}else if(h.hcEvents){d2.target||m(d2,{preventDefault:function(){d2.defaultPrevented=true},target:h,type:b2});v=[];for(var l2=h,n2=false;l2.hcEvents;)Object.hasOwnProperty.call(l2,"hcEvents")&&l2.hcEvents[b2]&&(v.length&&(n2=true),v.unshift.apply(v,l2.hcEvents[b2])),l2=Object.getPrototypeOf(l2);n2&&v.sort((function(b3,h2){return b3.order-h2.order}));v.forEach((function(b3){false===b3.fn.call(h,d2)&&d2.preventDefault()}))}f2&&!d2.defaultPrevented&&f2.call(h,d2)}var n=c.charts,w=c.doc,f=c.win;(g2||(g2={})).messages=[];Math.easeInOutSine=function(b2){return-.5*(Math.cos(Math.PI*b2)-1)};var l=Array.prototype.find?function(b2,d2){return b2.find(d2)}:function(b2,d2){var h,v=b2.length;for(h=0;hd2&&(d2=b2[h]);return d2},arrayMin:function(b2){for(var h=b2.length,d2=b2[0];h--;)b2[h]d2?b2=f2&&(d2=[1/f2])));for(l2=0;l2=b2||!n2&&v<=(d2[l2]+(d2[l2+1]||d2[l2]))/2);l2++);return h=D(h*f2,-Math.round(Math.log(.001)/Math.LN10))},objectEach:H,offset:function(b2){var d2=w.documentElement;b2=b2.parentElement||b2.parentNode?b2.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:b2.top+(f.pageYOffset||d2.scrollTop)-(d2.clientTop||0),left:b2.left+(f.pageXOffset||d2.scrollLeft)-(d2.clientLeft||0),width:b2.width,height:b2.height}},pad:function(b2,d2,f2){return Array((d2||2)+1-String(b2).replace("-","").length).join(f2||"0")+b2},pick:p,pInt:A,relativeLength:function(b2,d2,f2){return/%$/.test(b2)?d2*parseFloat(b2)/100+(f2||0):parseFloat(b2)},removeEvent:K,splat:function(b2){return z(b2)?b2:[b2]},stableSort:function(b2,d2){var h=b2.length,f2,l2;for(l2=0;l2>16,(r&65280)>>8,r&255,1]:4===t&&(x=[(r&3840)>>4|(r&3840)>>8,(r&240)>>4|r&240,(r&15)<<4|r&15,1])}if(!x)for(r=g3.parsers.length;r--&&!x;){var a=g3.parsers[r];(t=a.regex.exec(c2))&&(x=a.parse(t))}}x&&(this.rgba=x)};g3.prototype.get=function(c2){var x=this.input,t=this.rgba;if("object"===typeof x&&"undefined"!==typeof this.stops){var r=A(x);r.stops=[].slice.call(r.stops);this.stops.forEach((function(a,q){r.stops[q]=[r.stops[q][0],a.get(c2)]}));return r}return t&&L(t[0])?"rgb"===c2||!c2&&1===t[3]?"rgb("+t[0]+","+t[1]+","+t[2]+")":"a"===c2?"".concat(t[3]):"rgba("+t.join(",")+")":x};g3.prototype.brighten=function(c2){var x=this.rgba;if(this.stops)this.stops.forEach((function(r){r.brighten(c2)}));else if(L(c2)&&0!==c2)for(var t=0;3>t;t++)x[t]+=B(255*c2),0>x[t]&&(x[t]=0),255n?"AM":"PM",P:12>n?"am":"pm",S:r(u.getSeconds()),L:r(Math.floor(k2%1e3),3)},c.dateFormats);t(u,(function(b2,d2){for(;-1!==e2.indexOf("%"+d2);)e2=e2.replace("%"+d2,"function"===typeof b2?b2.call(D,k2):b2)}));return p2?e2.substr(0,1).toUpperCase()+e2.substr(1):e2};e.prototype.resolveDTLFormat=function(e2){return C(e2,true)?e2:(e2=q(e2),{main:e2[0],from:e2[1],to:e2[2]})};e.prototype.getTimeTicks=function(e2,k2,p2,q2){var u=this,n=[],w={},f=new u.Date(k2),l=e2.unitRange,d=e2.count||1,b;q2=a(q2,1);if(A(k2)){u.set("Milliseconds",f,l>=m.second?0:d*Math.floor(u.get("Milliseconds",f)/d));l>=m.second&&u.set("Seconds",f,l>=m.minute?0:d*Math.floor(u.get("Seconds",f)/d));l>=m.minute&&u.set("Minutes",f,l>=m.hour?0:d*Math.floor(u.get("Minutes",f)/d));l>=m.hour&&u.set("Hours",f,l>=m.day?0:d*Math.floor(u.get("Hours",f)/d));l>=m.day&&u.set("Date",f,l>=m.month?1:Math.max(1,d*Math.floor(u.get("Date",f)/d)));if(l>=m.month){u.set("Month",f,l>=m.year?0:d*Math.floor(u.get("Month",f)/d));var h=u.get("FullYear",f)}l>=m.year&&u.set("FullYear",f,h-h%d);l===m.week&&(h=u.get("Day",f),u.set("Date",f,u.get("Date",f)-h+q2+(h4*m.month||u.getTimezoneOffset(k2)!==u.getTimezoneOffset(p2));k2=f.getTime();for(f=1;k2n.length&&n.forEach((function(b2){0===b2%18e5&&"000000000"===u.dateFormat("%H%M%S%L",b2)&&(w[b2]="day")}))}n.info=z(e2,{higherRanks:w,totalRange:l*d});return n};e.prototype.getDateFormat=function(e2,k2,p2,a2){var u=this.dateFormat("%m-%d %H:%M:%S.%L",k2),n={millisecond:15,second:12,minute:9,hour:6,day:3},w="millisecond";for(f in m){if(e2===m.week&&+this.dateFormat("%w",k2)===p2&&"00:00:00.000"===u.substr(6)){var f="week";break}if(m[f]>e2){f=w;break}if(n[f]&&u.substr(n[f])!=="01-01 00:00:00.000".substr(n[f]))break;"week"!==f&&(w=f)}return this.resolveDTLFormat(a2[f]).main};return e}();return g2}));I(g,"Core/Defaults.js",[g["Core/Chart/ChartDefaults.js"],g["Core/Color/Color.js"],g["Core/Globals.js"],g["Core/Color/Palettes.js"],g["Core/Time.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z){g2=g2.parse;var C=z.merge,x={colors:A.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:true},chart:c,title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:true,align:"center",alignColumns:true,className:"highcharts-no-tooltip",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:false,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:true,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:true,animation:y.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:false,snap:y.isTouchDevice?25:10,headerFormat:'{point.key}
',pointFormat:' {series.name}: {point.y}
',backgroundColor:g2("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:true,stickOnContact:false,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"},useHTML:false},credits:{enabled:true,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};x.chart.styledMode=false;var t=new B(C(x.global,x.time));c={defaultOptions:x,defaultTime:t,getOptions:function(){return x},setOptions:function(r){C(true,x,r);if(r.time||r.global)y.time?y.time.update(C(x.global,x.time,r.global,r.time)):y.time=t;return x}};return c}));I(g,"Core/Animation/Fx.js",[g["Core/Color/Color.js"],g["Core/Globals.js"],g["Core/Utilities.js"]],(function(c,g2,y){var L=c.parse,B=g2.win,z=y.isNumber,C=y.objectEach;return function(){function c2(t,r,a){this.pos=NaN;this.options=r;this.elem=t;this.prop=a}c2.prototype.dSetter=function(){var t=this.paths,r=t&&t[0];t=t&&t[1];var a=this.now||0,q=[];if(1!==a&&r&&t)if(r.length===t.length&&1>a)for(var m=0;m=p+this.startTime){this.now=this.end;this.pos=1;this.update();var e=k[this.prop]=true;C(k,(function(k2){true!==k2&&(e=false)}));e&&m&&m.call(q);t=false}else this.pos=a.easing((r-this.startTime)/p),this.now=this.start+(this.end-this.start)*this.pos,this.update(),t=true;return t};c2.prototype.initPath=function(t,r,a){function q(k2,n){for(;k2.lengthe[1]){var G=a+ +e[1];0<=G?(e[0]=(+e[0]).toExponential(G).split("e")[0],a=G):(e[0]=e[0].split(".")[0]||0,r=20>a?(e[0]*Math.pow(10,e[1])).toFixed(a):0,e[1]=0)}G=(Math.abs(e[1]?e[0]:r)+Math.pow(10,-Math.max(a,k)-1)).toFixed(a);k=String(t(G));var c2=3r?"-":"")+(c2?k.substr(0,c2)+m:"");r=0>+e[1]&&!D?"0":r+k.substr(c2).replace(/(\d{3})(?=\d)/g,"$1"+m);a&&(r+=q+G.slice(-a));e[1]&&0!==+r&&(r+="e"+e[1]);return r}var A=c.defaultOptions,B=c.defaultTime,z=g2.getNestedProperty,C=g2.isNumber,x=g2.pick,t=g2.pInt;return{dateFormat:function(r,a,q){return B.dateFormat(r,a,q)},format:function(r,a,q){var m="{",p=false,k=/f$/,e=/\.([0-9])/,D=A.lang,G=q&&q.time||B;q=q&&q.numberFormatter||L;for(var t2=[];r;){var c2=r.indexOf(m);if(-1===c2)break;var u=r.slice(0,c2);if(p){u=u.split(":");m=z(u.shift()||"",a);if(u.length&&"number"===typeof m)if(u=u.join(":"),k.test(u)){var n=parseInt((u.match(e)||["","-1"])[1],10);null!==m&&(m=q(m,n,D.decimalPoint,-1q){A(c3,m);for(G=k=0;G<=q;)G+=c3[k].size,k++;D=c3.splice(k-1,c3.length)}A(c3,p);for(c3=c3.map((function(e2){return{size:e2.size,targets:[e2.target],align:y(e2.align,.5)}}));e;){for(k=c3.length;k--;)q=c3[k],m=(Math.min.apply(0,q.targets)+Math.max.apply(0,q.targets))/2,q.pos=g2(m-q.size*q.align,0,t-q.size);k=c3.length;for(e=false;k--;)0c3[k].pos&&(c3[k-1].size+=c3[k].size,c3[k-1].targets=c3[k-1].targets.concat(c3[k].targets),c3[k-1].align=.5,c3[k-1].pos+c3[k-1].size>t&&(c3[k-1].pos=t-c3[k-1].size),c3.splice(k,1),e=true)}a.push.apply(a,D);k=0;c3.some((function(e2){var p2=0;return(e2.targets||[]).some((function(){a[k].pos=e2.pos+p2;if("undefined"!==typeof r&&Math.abs(a[k].pos-a[k].target)>r)return a.slice(0,k+1).forEach((function(e3){return delete e3.pos})),a.reducedLen=(a.reducedLen||t)-.1*t,a.reducedLen>.1*t&&C(a,t,r),true;p2+=a[k].size;k++;return false}))}));A(a,p);return a}c2.distribute=C})(B||(B={}));return B}));I(g,"Core/Renderer/SVG/SVGElement.js",[g["Core/Animation/AnimationUtilities.js"],g["Core/Color/Color.js"],g["Core/Globals.js"],g["Core/Utilities.js"]],(function(c,g2,y,A){var L=c.animate,z=c.animObject,C=c.stop,x=y.deg2rad,t=y.doc,r=y.svg,a=y.SVG_NS,q=y.win,m=A.addEvent,p=A.attr,k=A.createElement,e=A.css,D=A.defined,G=A.erase,H=A.extend,K=A.fireEvent,u=A.isArray,n=A.isFunction,w=A.isString,f=A.merge,l=A.objectEach,d=A.pick,b=A.pInt,h=A.syncTimeout,v=A.uniqueKey;c=function(){function E(){this.element=void 0;this.onEvents={};this.opacity=1;this.renderer=void 0;this.SVG_NS=a;this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}E.prototype._defaultGetter=function(b2){b2=d(this[b2+"Value"],this[b2],this.element?this.element.getAttribute(b2):null,0);/^[\-0-9\.]+$/.test(b2)&&(b2=parseFloat(b2));return b2};E.prototype._defaultSetter=function(b2,d2,h2){h2.setAttribute(d2,b2)};E.prototype.add=function(b2){var d2=this.renderer,h2=this.element;b2&&(this.parentGroup=b2);"undefined"!==typeof this.textStr&&"text"===this.element.nodeName&&d2.buildText(this);this.added=true;if(!b2||b2.handleZ||this.zIndex)var f2=this.zIndexSetter();f2||(b2?b2.element:d2.box).appendChild(h2);if(this.onAdd)this.onAdd();return this};E.prototype.addClass=function(b2,d2){var h2=d2?"":this.attr("class")||"";b2=(b2||"").split(/ /g).reduce((function(b3,d3){-1===h2.indexOf(d3)&&b3.push(d3);return b3}),h2?[h2]:[]).join(" ");b2!==h2&&this.attr("class",b2);return this};E.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=false)};E.prototype.align=function(b2,h2,f2){var l2={},v2=this.renderer,F=v2.alignedObjects,n2,e2,J;if(b2){if(this.alignOptions=b2,this.alignByTranslate=h2,!f2||w(f2))this.alignTo=n2=f2||"renderer",G(F,this),F.push(this),f2=void 0}else b2=this.alignOptions,h2=this.alignByTranslate,n2=this.alignTo;f2=d(f2,v2[n2],"scrollablePlotBox"===n2?v2.plotBox:void 0,v2);n2=b2.align;var k2=b2.verticalAlign;v2=(f2.x||0)+(b2.x||0);F=(f2.y||0)+(b2.y||0);"right"===n2?e2=1:"center"===n2&&(e2=2);e2&&(v2+=(f2.width-(b2.width||0))/e2);l2[h2?"translateX":"x"]=Math.round(v2);"bottom"===k2?J=1:"middle"===k2&&(J=2);J&&(F+=(f2.height-(b2.height||0))/J);l2[h2?"translateY":"y"]=Math.round(F);this[this.placed?"animate":"attr"](l2);this.placed=true;this.alignAttr=l2;return this};E.prototype.alignSetter=function(b2){var d2={left:"start",center:"middle",right:"end"};d2[b2]&&(this.alignValue=b2,this.element.setAttribute("text-anchor",d2[b2]))};E.prototype.animate=function(b2,f2,v2){var n2=this,e2=z(d(f2,this.renderer.globalAnimation,true));f2=e2.defer;d(t.hidden,t.msHidden,t.webkitHidden,false)&&(e2.duration=0);0!==e2.duration?(v2&&(e2.complete=v2),h((function(){n2.element&&L(n2,b2,e2)}),f2)):(this.attr(b2,void 0,v2||e2.complete),l(b2,(function(b3,d2){e2.step&&e2.step.call(this,b3,{prop:d2,pos:1,elem:this})}),this));return this};E.prototype.applyTextOutline=function(b2){var d2=this.element;-1!==b2.indexOf("contrast")&&(b2=b2.replace(/contrast/g,this.renderer.getContrast(d2.style.fill)));var h2=b2.split(" ");b2=h2[h2.length-1];if((h2=h2[0])&&"none"!==h2&&y.svg){this.fakeTS=true;h2=h2.replace(/(^[\d\.]+)(.*?)$/g,(function(b3,d3,h3){return 2*Number(d3)+h3}));this.removeTextOutline();var f2=t.createElementNS(a,"tspan");p(f2,{class:"highcharts-text-outline",fill:b2,stroke:b2,"stroke-width":h2,"stroke-linejoin":"round"});b2=d2.querySelector("textPath")||d2;[].forEach.call(b2.childNodes,(function(b3){var d3=b3.cloneNode(true);d3.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach((function(b4){return d3.removeAttribute(b4)}));f2.appendChild(d3)}));var l2=0;[].forEach.call(b2.querySelectorAll("text tspan"),(function(b3){l2+=Number(b3.getAttribute("dy"))}));h2=t.createElementNS(a,"tspan");h2.textContent="​";p(h2,{x:Number(d2.getAttribute("x")),dy:-l2});f2.appendChild(h2);b2.insertBefore(f2,b2.firstChild)}};E.prototype.attr=function(b2,d2,h2,f2){var v2=this.element,F=this.symbolCustomAttribs,n2,e2=this,w2,J;if("string"===typeof b2&&"undefined"!==typeof d2){var k2=b2;b2={};b2[k2]=d2}"string"===typeof b2?e2=(this[b2+"Getter"]||this._defaultGetter).call(this,b2,v2):(l(b2,(function(d3,h3){w2=false;f2||C(this,h3);this.symbolName&&-1!==F.indexOf(h3)&&(n2||(this.symbolAttr(b2),n2=true),w2=true);!this.rotation||"x"!==h3&&"y"!==h3||(this.doTransform=true);w2||(J=this[h3+"Setter"]||this._defaultSetter,J.call(this,d3,h3,v2),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(h3)&&this.updateShadows(h3,d3,J))}),this),this.afterSetters());h2&&h2.call(this);return e2};E.prototype.clip=function(b2){return this.attr("clip-path",b2?"url("+this.renderer.url+"#"+b2.id+")":"none")};E.prototype.crisp=function(b2,d2){d2=d2||b2.strokeWidth||0;var h2=Math.round(d2)%2/2;b2.x=Math.floor(b2.x||this.x||0)+h2;b2.y=Math.floor(b2.y||this.y||0)+h2;b2.width=Math.floor((b2.width||this.width||0)-2*h2);b2.height=Math.floor((b2.height||this.height||0)-2*h2);D(b2.strokeWidth)&&(b2.strokeWidth=d2);return b2};E.prototype.complexColor=function(b2,d2,h2){var n2=this.renderer,e2,F,Q,w2,k2,J,E2,p2,a2,q2,m2=[],M;K(this.renderer,"complexColor",{args:arguments},(function(){b2.radialGradient?F="radialGradient":b2.linearGradient&&(F="linearGradient");if(F){Q=b2[F];k2=n2.gradients;J=b2.stops;a2=h2.radialReference;u(Q)&&(b2[F]=Q={x1:Q[0],y1:Q[1],x2:Q[2],y2:Q[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===F&&a2&&!D(Q.gradientUnits)&&(w2=Q,Q=f(Q,n2.getRadialAttr(a2,w2),{gradientUnits:"userSpaceOnUse"}));l(Q,(function(b3,d3){"id"!==d3&&m2.push(d3,b3)}));l(J,(function(b3){m2.push(b3)}));m2=m2.join(",");if(k2[m2])q2=k2[m2].attr("id");else{Q.id=q2=v();var N=k2[m2]=n2.createElement(F).attr(Q).add(n2.defs);N.radAttr=w2;N.stops=[];J.forEach((function(b3){0===b3[1].indexOf("rgba")?(e2=g2.parse(b3[1]),E2=e2.get("rgb"),p2=e2.get("a")):(E2=b3[1],p2=1);b3=n2.createElement("stop").attr({offset:b3[0],"stop-color":E2,"stop-opacity":p2}).add(N);N.stops.push(b3)}))}M="url("+n2.url+"#"+q2+")";h2.setAttribute(d2,M);h2.gradient=m2;b2.toString=function(){return M}}}))};E.prototype.css=function(d2){var h2=this.styles,n2={},v2=this.element,w2=!h2;d2.color&&(d2.fill=d2.color);h2&&l(d2,(function(b2,d3){h2&&h2[d3]!==b2&&(n2[d3]=b2,w2=true)}));if(w2){h2&&(d2=H(h2,n2));if(null===d2.width||"auto"===d2.width)delete this.textWidth;else if("text"===v2.nodeName.toLowerCase()&&d2.width)var F=this.textWidth=b(d2.width);this.styles=d2;F&&!r&&this.renderer.forExport&&delete d2.width;var Q=f(d2);v2.namespaceURI===this.SVG_NS&&["textOutline","textOverflow","width"].forEach((function(b2){return Q&&delete Q[b2]}));e(v2,Q);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),d2.textOutline&&this.applyTextOutline(d2.textOutline))}return this};E.prototype.dashstyleSetter=function(h2){var f2=this["stroke-width"];"inherit"===f2&&(f2=1);if(h2=h2&&h2.toLowerCase()){var l2=h2.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(h2=l2.length;h2--;)l2[h2]=""+b(l2[h2])*d(f2,NaN);h2=l2.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",h2)}};E.prototype.destroy=function(){var b2=this,d2=b2.element||{},h2=b2.renderer,f2=d2.ownerSVGElement,n2=h2.isSVG&&"SPAN"===d2.nodeName&&b2.parentGroup||void 0;d2.onclick=d2.onmouseout=d2.onmouseover=d2.onmousemove=d2.point=null;C(b2);if(b2.clipPath&&f2){var F=b2.clipPath;[].forEach.call(f2.querySelectorAll("[clip-path],[CLIP-PATH]"),(function(b3){-1J.width)J={x:0,y:0,width:0,height:0}}else J=this.htmlGetBBox();if(v2.isSVG&&(v2=J.width,b2=J.height,a2&&(J.height=b2={"11px,17":14,"13px,20":16}[""+(N||"")+",".concat(Math.round(b2))]||b2),h2)){a2=Number(l2.getAttribute("y")||0)-J.y;f2={right:1,center:.5}[f2||0]||0;F=h2*x;N=(h2-90)*x;var m2=v2*Math.cos(F);h2=v2*Math.sin(F);u2=Math.cos(N);F=Math.sin(N);v2=J.x+f2*(v2-m2)+a2*u2;N=v2+m2;u2=N-b2*u2;m2=u2-m2;a2=J.y+a2-f2*h2+a2*F;f2=a2+h2;b2=f2-b2*F;h2=b2-h2;J.x=Math.min(v2,N,u2,m2);J.y=Math.min(a2,f2,b2,h2);J.width=Math.max(v2,N,u2,m2)-J.x;J.height=Math.max(a2,f2,b2,h2)-J.y}if(q2&&(""===w2||0]*>/g,"").replace(/</g,"<").replace(/>/g,">")};E.prototype.toFront=function(){var b2=this.element;b2.parentNode.appendChild(b2);return this};E.prototype.translate=function(b2,d2){return this.attr({translateX:b2,translateY:d2})};E.prototype.updateShadows=function(b2,d2,h2){var f2=this.shadows;if(f2)for(var l2=f2.length;l2--;)h2.call(f2[l2],"height"===b2?Math.max(d2-(f2[l2].cutHeight||0),0):"d"===b2?this.d:d2,b2,f2[l2])};E.prototype.updateTransform=function(){var b2=this.element,h2=this.matrix,f2=this.rotation;f2=void 0===f2?0:f2;var l2=this.scaleX,n2=this.scaleY,v2=this.translateX,e2=this.translateY;v2=["translate("+(void 0===v2?0:v2)+","+(void 0===e2?0:e2)+")"];D(h2)&&v2.push("matrix("+h2.join(",")+")");f2&&v2.push("rotate("+f2+" "+d(this.rotationOriginX,b2.getAttribute("x"),0)+" "+d(this.rotationOriginY,b2.getAttribute("y")||0)+")");(D(l2)||D(n2))&&v2.push("scale("+d(l2,1)+" "+d(n2,1)+")");v2.length&&!(this.text||this).textPath&&b2.setAttribute("transform",v2.join(" "))};E.prototype.visibilitySetter=function(b2,d2,h2){"inherit"===b2?h2.removeAttribute(d2):this[d2]!==b2&&h2.setAttribute(d2,b2);this[d2]=b2};E.prototype.xGetter=function(b2){"circle"===this.element.nodeName&&("x"===b2?b2="cx":"y"===b2&&(b2="cy"));return this._defaultGetter(b2)};E.prototype.zIndexSetter=function(d2,h2){var f2=this.renderer,l2=this.parentGroup,v2=(l2||f2).element||f2.box,n2=this.element;f2=v2===f2.box;var e2=false;var w2=this.added;var k2;D(d2)?(n2.setAttribute("data-z-index",d2),d2=+d2,this[h2]===d2&&(w2=false)):D(this[h2])&&n2.removeAttribute("data-z-index");this[h2]=d2;if(w2){(d2=this.zIndex)&&l2&&(l2.handleZ=true);h2=v2.childNodes;for(k2=h2.length-1;0<=k2&&!e2;k2--){l2=h2[k2];w2=l2.getAttribute("data-z-index");var E2=!D(w2);if(l2!==n2){if(0>d2&&E2&&!f2&&!k2)v2.insertBefore(n2,h2[k2]),e2=true;else if(b(w2)<=d2||E2&&(!D(d2)||0<=d2))v2.insertBefore(n2,h2[k2+1]||null),e2=true}}e2||(v2.insertBefore(n2,h2[f2?3:0]||null),e2=true)}return e2};return E}();c.prototype.strokeSetter=c.prototype.fillSetter;c.prototype.yGetter=c.prototype.xGetter;c.prototype.matrixSetter=c.prototype.rotationOriginXSetter=c.prototype.rotationOriginYSetter=c.prototype.rotationSetter=c.prototype.scaleXSetter=c.prototype.scaleYSetter=c.prototype.translateXSetter=c.prototype.translateYSetter=c.prototype.verticalAlignSetter=function(b2,d2){this[d2]=b2;this.doTransform=true};return c}));I(g,"Core/Renderer/RendererRegistry.js",[g["Core/Globals.js"]],(function(c){var g2;(function(g3){g3.rendererTypes={};var L;g3.getRendererType=function(c2){void 0===c2&&(c2=L);return g3.rendererTypes[c2]||g3.rendererTypes[L]};g3.registerRendererType=function(y,z,C){g3.rendererTypes[y]=z;if(!L||C)L=y,c.Renderer=z}})(g2||(g2={}));return g2}));I(g,"Core/Renderer/SVG/SVGLabel.js",[g["Core/Renderer/SVG/SVGElement.js"],g["Core/Utilities.js"]],(function(c,g2){var L=this&&this.__extends||function(){var c2=function(a,q){c2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a2,p){a2.__proto__=p}||function(a2,p){for(var k in p)p.hasOwnProperty(k)&&(a2[k]=p[k])};return c2(a,q)};return function(a,q){function m(){this.constructor=a}c2(a,q);a.prototype=null===q?Object.create(q):(m.prototype=q.prototype,new m)}}(),A=g2.defined,B=g2.extend,z=g2.isNumber,C=g2.merge,x=g2.pick,t=g2.removeEvent;return function(r){function a(q,m,p,k,e,D,c2,t2,g3,u){var n=r.call(this)||this;n.paddingLeftSetter=n.paddingSetter;n.paddingRightSetter=n.paddingSetter;n.init(q,"g");n.textStr=m;n.x=p;n.y=k;n.anchorX=D;n.anchorY=c2;n.baseline=g3;n.className=u;n.addClass("button"===u?"highcharts-no-tooltip":"highcharts-label");u&&n.addClass("highcharts-"+u);n.text=q.text(void 0,0,0,t2).attr({zIndex:1});var w;"string"===typeof e&&((w=/^url\((.*?)\)$/.test(e))||n.renderer.symbols[e])&&(n.symbolKey=e);n.bBox=a.emptyBBox;n.padding=3;n.baselineOffset=0;n.needsBox=q.styledMode||w;n.deferredAttr={};n.alignFactor=0;return n}L(a,r);a.prototype.alignSetter=function(a2){a2={left:0,center:.5,right:1}[a2];a2!==this.alignFactor&&(this.alignFactor=a2,this.bBox&&z(this.xSetting)&&this.attr({x:this.xSetting}))};a.prototype.anchorXSetter=function(a2,m){this.anchorX=a2;this.boxAttr(m,Math.round(a2)-this.getCrispAdjust()-this.xSetting)};a.prototype.anchorYSetter=function(a2,m){this.anchorY=a2;this.boxAttr(m,a2-this.ySetting)};a.prototype.boxAttr=function(a2,m){this.box?this.box.attr(a2,m):this.deferredAttr[a2]=m};a.prototype.css=function(q){if(q){var m={};q=C(q);a.textProps.forEach((function(a2){"undefined"!==typeof q[a2]&&(m[a2]=q[a2],delete q[a2])}));this.text.css(m);"fontSize"in m||"fontWeight"in m?this.updateTextPadding():("width"in m||"textOverflow"in m)&&this.updateBoxSize()}return c.prototype.css.call(this,q)};a.prototype.destroy=function(){t(this.element,"mouseenter");t(this.element,"mouseleave");this.text&&this.text.destroy();this.box&&(this.box=this.box.destroy());c.prototype.destroy.call(this)};a.prototype.fillSetter=function(a2,m){a2&&(this.needsBox=true);this.fill=a2;this.boxAttr(m,a2)};a.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var a2=this.padding,m=x(this.paddingLeft,a2);return{width:this.width,height:this.height,x:this.bBox.x-m,y:this.bBox.y-a2}};a.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2};a.prototype.heightSetter=function(a2){this.heightSetting=a2};a.prototype.onAdd=function(){this.text.add(this);this.attr({text:x(this.textStr,""),x:this.x||0,y:this.y||0});this.box&&A(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})};a.prototype.paddingSetter=function(a2,m){z(a2)?a2!==this[m]&&(this[m]=a2,this.updateTextPadding()):this[m]=void 0};a.prototype.rSetter=function(a2,m){this.boxAttr(m,a2)};a.prototype.shadow=function(a2){a2&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(a2));return this};a.prototype.strokeSetter=function(a2,m){this.stroke=a2;this.boxAttr(m,a2)};a.prototype["stroke-widthSetter"]=function(a2,m){a2&&(this.needsBox=true);this["stroke-width"]=a2;this.boxAttr(m,a2)};a.prototype["text-alignSetter"]=function(a2){this.textAlign=a2};a.prototype.textSetter=function(a2){"undefined"!==typeof a2&&this.text.attr({text:a2});this.updateTextPadding()};a.prototype.updateBoxSize=function(){var q=this.text,m=q.element.style,p={},k=this.padding,e=this.bBox=z(this.widthSetting)&&z(this.heightSetting)&&!this.textAlign||!A(q.textStr)?a.emptyBBox:q.getBBox();this.width=this.getPaddedWidth();this.height=(this.heightSetting||e.height||0)+2*k;m=this.renderer.fontMetrics(m&&m.fontSize,q);this.baselineOffset=k+Math.min((this.text.firstLineMetrics||m).b,e.height||Infinity);this.heightSetting&&(this.baselineOffset+=(this.heightSetting-m.h)/2);this.needsBox&&!q.textPath&&(this.box||(q=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),q.addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),q.add(this)),q=this.getCrispAdjust(),p.x=q,p.y=(this.baseline?-this.baselineOffset:0)+q,p.width=Math.round(this.width),p.height=Math.round(this.height),this.box.attr(B(p,this.deferredAttr)),this.deferredAttr={})};a.prototype.updateTextPadding=function(){var a2=this.text;if(!a2.textPath){this.updateBoxSize();var m=this.baseline?0:this.baselineOffset,p=x(this.paddingLeft,this.padding);A(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(p+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width));if(p!==a2.x||m!==a2.y)a2.attr("x",p),a2.hasBoxWidthChanged&&(this.bBox=a2.getBBox(true)),"undefined"!==typeof m&&a2.attr("y",m);a2.x=p;a2.y=m}};a.prototype.widthSetter=function(a2){this.widthSetting=z(a2)?a2:void 0};a.prototype.getPaddedWidth=function(){var a2=this.padding,m=x(this.paddingLeft,a2);a2=x(this.paddingRight,a2);return(this.widthSetting||this.bBox.width||0)+m+a2};a.prototype.xSetter=function(a2){this.x=a2;this.alignFactor&&(a2-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=true);this.xSetting=Math.round(a2);this.attr("translateX",this.xSetting)};a.prototype.ySetter=function(a2){this.ySetting=this.y=Math.round(a2);this.attr("translateY",this.ySetting)};a.emptyBBox={width:0,height:0,x:0,y:0};a.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" ");return a}(c)}));I(g,"Core/Renderer/SVG/Symbols.js",[g["Core/Utilities.js"]],(function(c){function g2(c2,t,r,a,q){var m=[];if(q){var p=q.start||0,k=C(q.r,r);r=C(q.r,a||r);var e=(q.end||0)-.001;a=q.innerR;var D=C(q.open,.001>Math.abs((q.end||0)-p-2*Math.PI)),G=Math.cos(p),g3=Math.sin(p),x=Math.cos(e),u=Math.sin(e);p=C(q.longArc,.001>e-p-Math.PI?0:1);m.push(["M",c2+k*G,t+r*g3],["A",k,r,0,p,C(q.clockwise,1),c2+k*x,t+r*u]);B(a)&&m.push(D?["M",c2+a*x,t+a*u]:["L",c2+a*x,t+a*u],["A",a,a,0,p,B(q.clockwise)?1-q.clockwise:0,c2+a*G,t+a*g3]);D||m.push(["Z"])}return m}function y(c2,t,r,a,q){return q&&q.r?A(c2,t,r,a,q):[["M",c2,t],["L",c2+r,t],["L",c2+r,t+a],["L",c2,t+a],["Z"]]}function A(c2,t,r,a,q){q=q&&q.r||0;return[["M",c2+q,t],["L",c2+r-q,t],["C",c2+r,t,c2+r,t,c2+r,t+q],["L",c2+r,t+a-q],["C",c2+r,t+a,c2+r,t+a,c2+r-q,t+a],["L",c2+q,t+a],["C",c2,t+a,c2,t+a,c2,t+a-q],["L",c2,t+q],["C",c2,t,c2,t,c2+q,t]]}var B=c.defined,z=c.isNumber,C=c.pick;return{arc:g2,callout:function(c2,t,r,a,q){var m=Math.min(q&&q.r||0,r,a),p=m+6,k=q&&q.anchorX;q=q&&q.anchorY||0;var e=A(c2,t,r,a,{r:m});if(!z(k))return e;c2+k>=r?q>t+p&&q=c2+k?q>t+p&&qa&&k>c2+p&&kq&&k>c2+p&&k/g,u=[m2,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(u!==a2.textCache){a2.textCache=u;delete a2.actualWidth;for(u=t2.length;u--;)k.removeChild(t2[u]);G||this.ellipsis||this.width||a2.textPath||-1!==m2.indexOf(" ")&&(!this.noWrap||g3.test(m2))?""!==m2&&(e&&e.appendChild(k),m2=new c(m2),this.modifyTree(m2.nodes),m2.addToDOM(k),this.modifyDOM(),this.ellipsis&&-1!==(k.textContent||"").indexOf("…")&&a2.attr("title",this.unescapeEntities(a2.textStr||"",["<",">"])),e&&e.removeChild(k)):k.appendChild(L.createTextNode(this.unescapeEntities(m2)));r(this.textOutline)&&a2.applyTextOutline&&a2.applyTextOutline(this.textOutline)}};m.prototype.modifyDOM=function(){var a2=this,k=this.svgElement,e=C(k.element,"x");k.firstLineMetrics=void 0;for(var m2;m2=k.element.firstChild;)if(/^[\s\u200B]*$/.test(m2.textContent||" "))k.element.removeChild(m2);else break;[].forEach.call(k.element.querySelectorAll("tspan.highcharts-br"),(function(u,n){u.nextSibling&&u.previousSibling&&(0===n&&1===u.previousSibling.nodeType&&(k.firstLineMetrics=k.renderer.fontMetrics(void 0,u.previousSibling)),C(u,{dy:a2.getLineHeight(u.nextSibling),x:e}))}));var c2=this.width||0;if(c2){var q2=function(u,n){var w=u.textContent||"",f=w.replace(/([^\^])-/g,"$1- ").split(" "),l=!a2.noWrap&&(1c2){for(;f<=l;)d=Math.ceil((f+l)/2),e&&(b=q2(e,d)),v=h(d,b&&b.length-1),f===l?f=l+1:v>c2?l=d-1:f=d;0===l?a2.textContent="":k&&l===k.length-1||(a2.textContent=b||q2(k||e,d))}e&&e.splice(0,d);p.actualWidth=v;p.rotation=n};m.prototype.unescapeEntities=function(m2,k){a(this.renderer.escapes,(function(e,a2){k&&-1!==k.indexOf(e)||(m2=m2.toString().replace(new RegExp(e,"g"),a2))}));return m2};return m}()}));I(g,"Core/Renderer/SVG/SVGRenderer.js",[g["Core/Renderer/HTML/AST.js"],g["Core/Color/Color.js"],g["Core/Globals.js"],g["Core/Renderer/RendererRegistry.js"],g["Core/Renderer/SVG/SVGElement.js"],g["Core/Renderer/SVG/SVGLabel.js"],g["Core/Renderer/SVG/Symbols.js"],g["Core/Renderer/SVG/TextBuilder.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z,C,x,t){var r=y.charts,a=y.deg2rad,q=y.doc,m=y.isFirefox,p=y.isMS,k=y.isWebKit,e=y.noop,D=y.SVG_NS,G=y.symbolSizes,H=y.win,K=t.addEvent,u=t.attr,n=t.createElement,w=t.css,f=t.defined,l=t.destroyObjectProperties,d=t.extend,b=t.isArray,h=t.isNumber,v=t.isObject,E=t.isString,J=t.merge,M=t.pick,O=t.pInt,P=t.uniqueKey,T;y=function(){function F(b2,d2,h2,f2,l2,n2,v2){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0;this.init(b2,d2,h2,f2,l2,n2,v2)}F.prototype.init=function(b2,d2,h2,f2,l2,n2,v2){var F2=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),e2=F2.element;v2||F2.css(this.getStyle(f2));b2.appendChild(e2);u(b2,"dir","ltr");-1===b2.innerHTML.indexOf("xmlns")&&u(e2,"xmlns",this.SVG_NS);this.isSVG=true;this.box=e2;this.boxWrapper=F2;this.alignedObjects=[];this.url=this.getReferenceURL();this.createElement("desc").add().element.appendChild(q.createTextNode("Created with Highcharts 10.3.3"));this.defs=this.createElement("defs").add();this.allowHTML=n2;this.forExport=l2;this.styledMode=v2;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(d2,h2,false);var a2;m&&b2.getBoundingClientRect&&(d2=function(){w(b2,{left:0,top:0});a2=b2.getBoundingClientRect();w(b2,{left:Math.ceil(a2.left)-a2.left+"px",top:Math.ceil(a2.top)-a2.top+"px"})},d2(),this.unSubPixelFix=K(H,"resize",d2))};F.prototype.definition=function(b2){return new c([b2]).addToDOM(this.defs.element)};F.prototype.getReferenceURL=function(){if((m||k)&&q.getElementsByTagName("base").length){if(!f(T)){var b2=P();b2=new c([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:b2},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#".concat(b2,")"),fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(q.body);w(b2,{position:"fixed",top:0,left:0,zIndex:9e5});var d2=q.elementFromPoint(6,6);T="hitme"===(d2&&d2.id);q.body.removeChild(b2)}if(T)return H.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""};F.prototype.getStyle=function(b2){return this.style=d({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},b2)};F.prototype.setStyle=function(b2){this.boxWrapper.css(this.getStyle(b2))};F.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width};F.prototype.destroy=function(){var b2=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();l(this.gradients||{});this.gradients=null;b2&&(this.defs=b2.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null};F.prototype.createElement=function(b2){var d2=new this.Element;d2.init(this,b2);return d2};F.prototype.getRadialAttr=function(b2,d2){return{cx:b2[0]-b2[2]/2+(d2.cx||0)*b2[2],cy:b2[1]-b2[2]/2+(d2.cy||0)*b2[2],r:(d2.r||0)*b2[2]}};F.prototype.buildText=function(b2){new x(b2).buildSVG()};F.prototype.getContrast=function(b2){b2=g2.parse(b2).rgba.map((function(b3){b3/=255;return.03928>=b3?b3/12.92:Math.pow((b3+.055)/1.055,2.4)}));b2=.2126*b2[0]+.7152*b2[1]+.0722*b2[2];return 1.05/(b2+.05)>(b2+.05)/.05?"#FFFFFF":"#000000"};F.prototype.button=function(b2,h2,f2,l2,n2,F2,e2,a2,w2,k2){void 0===n2&&(n2={});var E2=this.label(b2,h2,f2,w2,void 0,void 0,k2,void 0,"button"),Q=this.styledMode;b2=n2.states||{};var N=0;n2=J(n2);delete n2.states;var m2=J({color:"#333333",cursor:"pointer",fontWeight:"normal"},n2.style);delete n2.style;var u2=c.filterUserAttributes(n2);E2.attr(J({padding:8,r:2},u2));if(!Q){u2=J({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1},u2);F2=J(u2,{fill:"#e6e6e6"},c.filterUserAttributes(F2||b2.hover||{}));var q2=F2.style;delete F2.style;e2=J(u2,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},c.filterUserAttributes(e2||b2.select||{}));var D2=e2.style;delete e2.style;a2=J(u2,{style:{color:"#cccccc"}},c.filterUserAttributes(a2||b2.disabled||{}));var r2=a2.style;delete a2.style}K(E2.element,p?"mouseover":"mouseenter",(function(){3!==N&&E2.setState(1)}));K(E2.element,p?"mouseout":"mouseleave",(function(){3!==N&&E2.setState(N)}));E2.setState=function(b3){1!==b3&&(E2.state=N=b3);E2.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][b3||0]);Q||(E2.attr([u2,F2,e2,a2][b3||0]),b3=[m2,q2,D2,r2][b3||0],v(b3)&&E2.css(b3))};Q||(E2.attr(u2).css(d({cursor:"default"},m2)),k2&&E2.text.css({pointerEvents:"none"}));return E2.on("touchstart",(function(b3){return b3.stopPropagation()})).on("click",(function(b3){3!==N&&l2.call(E2,b3)}))};F.prototype.crispLine=function(b2,d2,h2){void 0===h2&&(h2="round");var l2=b2[0],n2=b2[1];f(l2[1])&&l2[1]===n2[1]&&(l2[1]=n2[1]=Math[h2](l2[1])-d2%2/2);f(l2[2])&&l2[2]===n2[2]&&(l2[2]=n2[2]=Math[h2](l2[2])+d2%2/2);return b2};F.prototype.path=function(h2){var f2=this.styledMode?{}:{fill:"none"};b(h2)?f2.d=h2:v(h2)&&d(f2,h2);return this.createElement("path").attr(f2)};F.prototype.circle=function(b2,d2,h2){b2=v(b2)?b2:"undefined"===typeof b2?{}:{x:b2,y:d2,r:h2};d2=this.createElement("circle");d2.xSetter=d2.ySetter=function(b3,d3,h3){h3.setAttribute("c"+d3,b3)};return d2.attr(b2)};F.prototype.arc=function(b2,d2,h2,f2,l2,n2){v(b2)?(f2=b2,d2=f2.y,h2=f2.r,b2=f2.x):f2={innerR:f2,start:l2,end:n2};b2=this.symbol("arc",b2,d2,h2,h2,f2);b2.r=h2;return b2};F.prototype.rect=function(b2,d2,h2,f2,l2,n2){l2=v(b2)?b2.r:l2;var F2=this.createElement("rect");b2=v(b2)?b2:"undefined"===typeof b2?{}:{x:b2,y:d2,width:Math.max(h2,0),height:Math.max(f2,0)};this.styledMode||("undefined"!==typeof n2&&(b2["stroke-width"]=n2,b2=F2.crisp(b2)),b2.fill="none");l2&&(b2.r=l2);F2.rSetter=function(b3,d3,h3){F2.r=b3;u(h3,{rx:b3,ry:b3})};F2.rGetter=function(){return F2.r||0};return F2.attr(b2)};F.prototype.setSize=function(b2,d2,h2){this.width=b2;this.height=d2;this.boxWrapper.animate({width:b2,height:d2},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:M(h2,true)?void 0:0});this.alignElements()};F.prototype.g=function(b2){var d2=this.createElement("g");return b2?d2.attr({class:"highcharts-"+b2}):d2};F.prototype.image=function(b2,d2,f2,l2,n2,v2){var F2={preserveAspectRatio:"none"},e2=function(b3,d3){b3.setAttributeNS?b3.setAttributeNS("http://www.w3.org/1999/xlink","href",d3):b3.setAttribute("hc-svg-href",d3)};h(d2)&&(F2.x=d2);h(f2)&&(F2.y=f2);h(l2)&&(F2.width=l2);h(n2)&&(F2.height=n2);var a2=this.createElement("image").attr(F2);d2=function(d3){e2(a2.element,b2);v2.call(a2,d3)};v2?(e2(a2.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),f2=new H.Image,K(f2,"load",d2),f2.src=b2,f2.complete&&d2({})):e2(a2.element,b2);return a2};F.prototype.symbol=function(b2,h2,l2,v2,F2,e2){var a2=this,k2=/^url\((.*?)\)$/,E2=k2.test(b2),N=!E2&&(this.symbols[b2]?b2:"circle"),m2=N&&this.symbols[N],Q;if(m2){"number"===typeof h2&&(Q=m2.call(this.symbols,Math.round(h2||0),Math.round(l2||0),v2||0,F2||0,e2));var p2=this.path(Q);a2.styledMode||p2.attr("fill","none");d(p2,{symbolName:N||void 0,x:h2,y:l2,width:v2,height:F2});e2&&d(p2,e2)}else if(E2){var c2=b2.match(k2)[1];var J2=p2=this.image(c2);J2.imgwidth=M(G[c2]&&G[c2].width,e2&&e2.width);J2.imgheight=M(G[c2]&&G[c2].height,e2&&e2.height);var D2=function(b3){return b3.attr({width:b3.width,height:b3.height})};["width","height"].forEach((function(b3){J2[b3+"Setter"]=function(b4,d2){this[d2]=b4;b4=this.alignByTranslate;var h3=this.element,l3=this.width,n2=this.height,v3=this.imgwidth,F3=this.imgheight,a3=this["img"+d2];if(f(a3)){var w2=1;e2&&"within"===e2.backgroundSize&&l3&&n2?(w2=Math.min(l3/v3,n2/F3),a3=Math.round(a3*w2),u(h3,{width:Math.round(v3*w2),height:Math.round(F3*w2)})):h3&&h3.setAttribute(d2,a3);b4||this.translate(((l3||0)-a3*w2)/2,((n2||0)-a3*w2)/2)}}}));f(h2)&&J2.attr({x:h2,y:l2});J2.isImg=true;f(J2.imgwidth)&&f(J2.imgheight)?D2(J2):(J2.attr({width:0,height:0}),n("img",{onload:function(){var b3=r[a2.chartIndex];0===this.width&&(w(this,{position:"absolute",top:"-999em"}),q.body.appendChild(this));G[c2]={width:this.width,height:this.height};J2.imgwidth=this.width;J2.imgheight=this.height;J2.element&&D2(J2);this.parentNode&&this.parentNode.removeChild(this);a2.imgCount--;if(!a2.imgCount&&b3&&!b3.hasLoaded)b3.onload()},src:c2}),this.imgCount++)}return p2};F.prototype.clipRect=function(b2,d2,h2,f2){var l2=P()+"-",n2=this.createElement("clipPath").attr({id:l2}).add(this.defs);b2=this.rect(b2,d2,h2,f2,0).add(n2);b2.id=l2;b2.clipPath=n2;b2.count=0;return b2};F.prototype.text=function(b2,d2,h2,l2){var n2={};if(l2&&(this.allowHTML||!this.forExport))return this.html(b2,d2,h2);n2.x=Math.round(d2||0);h2&&(n2.y=Math.round(h2));f(b2)&&(n2.text=b2);b2=this.createElement("text").attr(n2);if(!l2||this.forExport&&!this.allowHTML)b2.xSetter=function(b3,d3,h3){for(var f2=h3.getElementsByTagName("tspan"),l3=h3.getAttribute(d3),n3=0,v2;n3b2?b2+3:Math.round(1.2*b2);return{h:d2,b:Math.round(.8*d2),f:b2}};F.prototype.rotCorr=function(b2,d2,h2){var f2=b2;d2&&h2&&(f2=Math.max(f2*Math.cos(d2*a),4));return{x:-b2/3*Math.sin(d2*a),y:f2}};F.prototype.pathToSegments=function(b2){for(var d2=[],f2=[],l2={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},n2=0;n2":">","'":"'",'"':"""},symbols:C,draw:e});A.registerRendererType("svg",y,true);return y}));I(g,"Core/Renderer/HTML/HTMLElement.js",[g["Core/Globals.js"],g["Core/Renderer/SVG/SVGElement.js"],g["Core/Utilities.js"]],(function(c,g2,y){var L=this&&this.__extends||function(){var a2=function(k,e){a2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e2,a3){e2.__proto__=a3}||function(e2,a3){for(var k2 in a3)a3.hasOwnProperty(k2)&&(e2[k2]=a3[k2])};return a2(k,e)};return function(k,e){function m2(){this.constructor=k}a2(k,e);k.prototype=null===e?Object.create(e):(m2.prototype=e.prototype,new m2)}}(),B=c.isFirefox,z=c.isMS,C=c.isWebKit,x=c.win,t=y.css,r=y.defined,a=y.extend,q=y.pick,m=y.pInt;return function(p){function k(){return null!==p&&p.apply(this,arguments)||this}L(k,p);k.compose=function(e){if(-1===k.composedClasses.indexOf(e)){k.composedClasses.push(e);var a2=k.prototype,m2=e.prototype;m2.getSpanCorrection=a2.getSpanCorrection;m2.htmlCss=a2.htmlCss;m2.htmlGetBBox=a2.htmlGetBBox;m2.htmlUpdateTransform=a2.htmlUpdateTransform;m2.setSpanRotation=a2.setSpanRotation}return e};k.prototype.getSpanCorrection=function(e,a2,k2){this.xCorr=-e*k2;this.yCorr=-a2};k.prototype.htmlCss=function(e){var k2="SPAN"===this.element.tagName&&e&&"width"in e,m2=q(k2&&e.width,void 0);if(k2){delete e.width;this.textWidth=m2;var p2=true}e&&"ellipsis"===e.textOverflow&&(e.whiteSpace="nowrap",e.overflow="hidden");this.styles=a(this.styles,e);t(this.element,e);p2&&this.htmlUpdateTransform();return this};k.prototype.htmlGetBBox=function(){var e=this.element;return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}};k.prototype.htmlUpdateTransform=function(){if(this.added){var e=this.renderer,a2=this.element,k2=this.translateX||0,p2=this.translateY||0,c2=this.x||0,u=this.y||0,n=this.textAlign||"left",w={left:0,center:.5,right:1}[n],f=this.styles;f=f&&f.whiteSpace;t(a2,{marginLeft:k2,marginTop:p2});!e.styledMode&&this.shadows&&this.shadows.forEach((function(b2){t(b2,{marginLeft:k2+1,marginTop:p2+1})}));this.inverted&&[].forEach.call(a2.childNodes,(function(b2){e.invertChild(b2,a2)}));if("SPAN"===a2.tagName){var l=this.rotation,d=this.textWidth&&m(this.textWidth),b=[l,n,a2.innerHTML,this.textWidth,this.textAlign].join(),h=void 0;h=false;if(d!==this.oldTextWidth){if(this.textPxLength)var v=this.textPxLength;else t(a2,{width:"",whiteSpace:f||"nowrap"}),v=a2.offsetWidth;(d>this.oldTextWidth||v>d)&&(/[ \-]/.test(a2.textContent||a2.innerText)||"ellipsis"===a2.style.textOverflow)&&(t(a2,{width:v>d||l?d+"px":"auto",display:"block",whiteSpace:f||"normal"}),this.oldTextWidth=d,h=true)}this.hasBoxWidthChanged=h;b!==this.cTT&&(h=e.fontMetrics(a2.style.fontSize,a2).b,!r(l)||l===(this.oldRotation||0)&&n===this.oldAlign||this.setSpanRotation(l,w,h),this.getSpanCorrection(!r(l)&&this.textPxLength||a2.offsetWidth,h,w,l,n));t(a2,{left:c2+(this.xCorr||0)+"px",top:u+(this.yCorr||0)+"px"});this.cTT=b;this.oldRotation=l;this.oldAlign=n}}else this.alignOnAdd=true};k.prototype.setSpanRotation=function(e,a2,k2){var m2={},p2=z&&!/Edge/.test(x.navigator.userAgent)?"-ms-transform":C?"-webkit-transform":B?"MozTransform":x.opera?"-o-transform":void 0;p2&&(m2[p2]=m2.transform="rotate("+e+"deg)",m2[p2+(B?"Origin":"-origin")]=m2.transformOrigin=100*a2+"% "+k2+"px",t(this.element,m2))};k.composedClasses=[];return k}(g2)}));I(g,"Core/Renderer/HTML/HTMLRenderer.js",[g["Core/Renderer/HTML/AST.js"],g["Core/Renderer/SVG/SVGElement.js"],g["Core/Renderer/SVG/SVGRenderer.js"],g["Core/Utilities.js"]],(function(c,g2,y,A){var L=this&&this.__extends||function(){var c2=function(a,q){c2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a2,p){a2.__proto__=p}||function(a2,p){for(var k in p)p.hasOwnProperty(k)&&(a2[k]=p[k])};return c2(a,q)};return function(a,q){function m(){this.constructor=a}c2(a,q);a.prototype=null===q?Object.create(q):(m.prototype=q.prototype,new m)}}(),z=A.attr,C=A.createElement,x=A.extend,t=A.pick;return function(r){function a(){return null!==r&&r.apply(this,arguments)||this}L(a,r);a.compose=function(c2){-1===a.composedClasses.indexOf(c2)&&(a.composedClasses.push(c2),c2.prototype.html=a.prototype.html);return c2};a.prototype.html=function(a2,m,p){var k=this.createElement("span"),e=k.element,q=k.renderer,r2=q.isSVG,H=function(e2,a3){["opacity","visibility"].forEach((function(n){e2[n+"Setter"]=function(w,f,l){var d=e2.div?e2.div.style:a3;g2.prototype[n+"Setter"].call(this,w,f,l);d&&(d[f]=w)}}));e2.addedSetters=true};k.textSetter=function(e2){e2!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,c.setElementHTML(this.element,t(e2,"")),this.textStr=e2,k.doTransform=true)};r2&&H(k,k.element.style);k.xSetter=k.ySetter=k.alignSetter=k.rotationSetter=function(e2,a3){"align"===a3?k.alignValue=k.textAlign=e2:k[a3]=e2;k.doTransform=true};k.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=false)};k.attr({text:a2,x:Math.round(m),y:Math.round(p)}).css({position:"absolute"});q.styledMode||k.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});e.style.whiteSpace="nowrap";k.css=k.htmlCss;r2&&(k.add=function(a3){var m2=q.box.parentNode,n=[];if(this.parentGroup=a3){var w=a3.div;if(!w){for(;a3;)n.push(a3),a3=a3.parentGroup;n.reverse().forEach((function(f){function l(b2,d2){f[d2]=b2;"translateX"===d2?h.left=b2+"px":h.top=b2+"px";f.doTransform=true}var d=z(f.element,"class"),b=f.styles||{};w=f.div=f.div||C("div",d?{className:d}:void 0,{position:"absolute",left:(f.translateX||0)+"px",top:(f.translateY||0)+"px",display:f.display,opacity:f.opacity,cursor:b.cursor,pointerEvents:b.pointerEvents,visibility:f.visibility},w||m2);var h=w.style;x(f,{classSetter:function(b2){return function(d2){this.element.setAttribute("class",d2);b2.className=d2}}(w),on:function(){n[0].div&&k.on.apply({element:n[0].div,onEvents:f.onEvents},arguments);return f},translateXSetter:l,translateYSetter:l});f.addedSetters||H(f)}))}}else w=m2;w.appendChild(e);k.added=true;k.alignOnAdd&&k.htmlUpdateTransform();return k});return k};a.composedClasses=[];return a}(y)}));I(g,"Core/Axis/AxisDefaults.js",[],(function(){var c;(function(c2){c2.defaultXAxisOptions={alignTicks:true,allowDecimals:void 0,panningEnabled:true,zIndex:2,zoomEnabled:true,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:false},second:{main:"%H:%M:%S",range:false},minute:{main:"%H:%M",range:false},hour:{main:"%H:%M",range:false},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:false,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:true,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:false,x:0,zIndex:7,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:false,reversed:void 0,reversedStacks:false,showEmpty:true,showFirstLabel:true,showLastLabel:true,startOfWeek:1,startOnTick:false,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:false,x:0,y:0,style:{color:"#666666"}},type:"linear",uniqueNames:true,visible:true,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#ccd6eb"};c2.defaultYAxisOptions={reversedStacks:true,endOnTick:true,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:true,labels:{x:-8},startOnTick:true,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:false,enabled:false,crop:true,overflow:"justify",formatter:function(){var c3=this.axis.chart.numberFormatter;return c3(this.total||0,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0};c2.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}};c2.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}};c2.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}};c2.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}}})(c||(c={}));return c}));I(g,"Core/Foundation.js",[g["Core/Utilities.js"]],(function(c){var g2=c.addEvent,y=c.isFunction,A=c.objectEach,B=c.removeEvent,z;(function(c2){c2.registerEventOptions=function(c3,t){c3.eventOptions=c3.eventOptions||{};A(t.events,(function(r,a){c3.eventOptions[a]!==r&&(c3.eventOptions[a]&&(B(c3,a,c3.eventOptions[a]),delete c3.eventOptions[a]),y(r)&&(c3.eventOptions[a]=r,g2(c3,a,r)))}))}})(z||(z={}));return z}));I(g,"Core/Axis/Tick.js",[g["Core/FormatUtilities.js"],g["Core/Globals.js"],g["Core/Utilities.js"]],(function(c,g2,y){var L=g2.deg2rad,B=y.clamp,z=y.correctFloat,C=y.defined,x=y.destroyObjectProperties,t=y.extend,r=y.fireEvent,a=y.isNumber,q=y.merge,m=y.objectEach,p=y.pick;g2=function(){function k(e,a2,k2,m2,p2){this.isNewLabel=this.isNew=true;this.axis=e;this.pos=a2;this.type=k2||"";this.parameters=p2||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;r(this,"init");k2||m2||this.addLabel()}k.prototype.addLabel=function(){var e=this,k2=e.axis,m2=k2.options,q2=k2.chart,g3=k2.categories,u=k2.logarithmic,n=k2.names,w=e.pos,f=p(e.options&&e.options.labels,m2.labels),l=k2.tickPositions,d=w===l[0],b=w===l[l.length-1],h=(!f.step||1===f.step)&&1===k2.tickInterval;l=l.info;var v=e.label,E;g3=this.parameters.category||(g3?p(g3[w],n[w],w):w);u&&a(g3)&&(g3=z(u.lin2log(g3)));if(k2.dateTime)if(l){var J=q2.time.resolveDTLFormat(m2.dateTimeLabelFormats[!m2.grid&&l.higherRanks[w]||l.unitName]);var M=J.main}else a(g3)&&(M=k2.dateTime.getXDateFormat(g3,m2.dateTimeLabelFormats||{}));e.isFirst=d;e.isLast=b;var O={axis:k2,chart:q2,dateTimeLabelFormat:M,isFirst:d,isLast:b,pos:w,tick:e,tickPositionInfo:l,value:g3};r(this,"labelFormat",O);var P=function(b2){return f.formatter?f.formatter.call(b2,b2):f.format?(b2.text=k2.defaultLabelFormatter.call(b2,b2),c.format(f.format,b2,q2)):k2.defaultLabelFormatter.call(b2,b2)};m2=P.call(O,O);var T=J&&J.list;e.shortenLabel=T?function(){for(E=0;Ef&&m2-l*du&&(q2=Math.round((c2-m2)/Math.cos(f*L)));else if(c2=m2+(1-l)*d,m2-l*du&&(v=u-e.x+v*l,E=-1),v=Math.min(b,v),vv||a2.autoRotation&&(w.styles||{}).width)q2=v;q2&&(this.shortenLabel?this.shortenLabel():(h.width=Math.floor(q2)+"px",(k2.style||{}).textOverflow||(h.textOverflow="ellipsis"),w.css(h)))};k.prototype.moveLabel=function(a2,k2){var e=this,p2=e.label,c2=e.axis,u=c2.reversed,n=false;p2&&p2.textStr===a2?(e.movedLabel=p2,n=true,delete e.label):m(c2.ticks,(function(f){n||f.isNew||f===e||!f.label||f.label.textStr!==a2||(e.movedLabel=f.label,n=true,f.labelPos=e.movedLabel.xy,delete f.label)}));if(!n&&(e.labelPos||p2)){var w=e.labelPos||p2.xy;p2=c2.horiz?u?0:c2.width+c2.left:w.x;c2=c2.horiz?w.y:u?c2.width+c2.left:0;e.movedLabel=e.createLabel({x:p2,y:c2},a2,k2);e.movedLabel&&e.movedLabel.attr({opacity:0})}};k.prototype.render=function(a2,k2,m2){var e=this.axis,c2=e.horiz,u=this.pos,n=p(this.tickmarkOffset,e.tickmarkOffset);u=this.getPosition(c2,u,n,k2);n=u.x;var w=u.y;e=c2&&n===e.pos+e.len||!c2&&w===e.pos?-1:1;c2=p(m2,this.label&&this.label.newOpacity,1);m2=p(m2,1);this.isActive=true;this.renderGridLine(k2,m2,e);this.renderMark(u,m2,e);this.renderLabel(u,k2,c2,a2);this.isNew=false;r(this,"afterRender")};k.prototype.renderGridLine=function(e,a2,k2){var m2=this.axis,c2=m2.options,u={},n=this.pos,w=this.type,f=p(this.tickmarkOffset,m2.tickmarkOffset),l=m2.chart.renderer,d=this.gridLine,b=c2.gridLineWidth,h=c2.gridLineColor,v=c2.gridLineDashStyle;"minor"===this.type&&(b=c2.minorGridLineWidth,h=c2.minorGridLineColor,v=c2.minorGridLineDashStyle);d||(m2.chart.styledMode||(u.stroke=h,u["stroke-width"]=b||0,u.dashstyle=v),w||(u.zIndex=1),e&&(a2=0),this.gridLine=d=l.path().attr(u).addClass("highcharts-"+(w?w+"-":"")+"grid-line").add(m2.gridGroup));if(d&&(k2=m2.getPlotLinePath({value:n+f,lineWidth:d.strokeWidth()*k2,force:"pass",old:e,acrossPanes:false})))d[e||this.isNew?"attr":"animate"]({d:k2,opacity:a2})};k.prototype.renderMark=function(a2,k2,m2){var e=this.axis,c2=e.options,u=e.chart.renderer,n=this.type,w=e.tickSize(n?n+"Tick":"tick"),f=a2.x;a2=a2.y;var l=p(c2["minor"!==n?"tickWidth":"minorTickWidth"],!n&&e.isXAxis?1:0);c2=c2["minor"!==n?"tickColor":"minorTickColor"];var d=this.mark,b=!d;w&&(e.opposite&&(w[0]=-w[0]),d||(this.mark=d=u.path().addClass("highcharts-"+(n?n+"-":"")+"tick").add(e.axisGroup),e.chart.styledMode||d.attr({stroke:c2,"stroke-width":l})),d[b?"attr":"animate"]({d:this.getMarkPath(f,a2,w[0],d.strokeWidth()*m2,e.horiz,u),opacity:k2}))};k.prototype.renderLabel=function(e,k2,m2,c2){var q2=this.axis,u=q2.horiz,n=q2.options,w=this.label,f=n.labels,l=f.step;q2=p(this.tickmarkOffset,q2.tickmarkOffset);var d=e.x;e=e.y;var b=true;w&&a(d)&&(w.xy=e=this.getLabelPosition(d,e,w,u,f,q2,c2,l),this.isFirst&&!this.isLast&&!n.showFirstLabel||this.isLast&&!this.isFirst&&!n.showLastLabel?b=false:!u||f.step||f.rotation||k2||0===m2||this.handleOverflow(e),l&&c2%l&&(b=false),b&&a(e.y)?(e.opacity=m2,w[this.isNewLabel?"attr":"animate"](e).show(true),this.isNewLabel=false):(w.hide(),this.isNewLabel=true))};k.prototype.replaceMovedLabel=function(){var a2=this.label,k2=this.axis,m2=k2.reversed;if(a2&&!this.isNew){var c2=k2.horiz?m2?k2.left:k2.width+k2.left:a2.xy.x;m2=k2.horiz?a2.xy.y:m2?k2.width+k2.top:k2.top;a2.animate({x:c2,y:m2,opacity:0},void 0,a2.destroy);delete this.label}k2.isDirty=true;this.label=this.movedLabel;delete this.movedLabel};return k}();return g2}));I(g,"Core/Axis/Axis.js",[g["Core/Animation/AnimationUtilities.js"],g["Core/Axis/AxisDefaults.js"],g["Core/Color/Color.js"],g["Core/Defaults.js"],g["Core/Foundation.js"],g["Core/Globals.js"],g["Core/Axis/Tick.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z,C,x){var t=c.animObject,r=A.defaultOptions,a=B.registerEventOptions,q=z.deg2rad,m=x.arrayMax,p=x.arrayMin,k=x.clamp,e=x.correctFloat,D=x.defined,G=x.destroyObjectProperties,H=x.erase,K=x.error,u=x.extend,n=x.fireEvent,w=x.isArray,f=x.isNumber,l=x.isString,d=x.merge,b=x.normalizeTickInterval,h=x.objectEach,v=x.pick,E=x.relativeLength,J=x.removeEvent,M=x.splat,O=x.syncTimeout,P=function(d2,h2){return b(h2,void 0,void 0,v(d2.options.allowDecimals,.5>h2||void 0!==d2.tickAmount),!!d2.tickAmount)};c=function(){function b2(b3,d2){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.bottom=this.alternateBands=void 0;this.init(b3,d2)}b2.prototype.init=function(b3,d2){var h2=d2.isX;this.chart=b3;this.horiz=b3.inverted&&!this.isZAxis?!h2:h2;this.isXAxis=h2;this.coll=this.coll||(h2?"xAxis":"yAxis");n(this,"init",{userOptions:d2});this.opposite=v(d2.opposite,this.opposite);this.side=v(d2.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(d2);var l2=this.options,e2=l2.labels,F=l2.type;this.userOptions=d2;this.minPixelPadding=0;this.reversed=v(l2.reversed,this.reversed);this.visible=l2.visible;this.zoomEnabled=l2.zoomEnabled;this.hasNames="category"===F||true===l2.categories;this.categories=l2.categories||(this.hasNames?[]:void 0);this.names||(this.names=[],this.names.keys={});this.plotLinesAndBandsGroups={};this.positiveValuesOnly=!!this.logarithmic;this.isLinked=D(l2.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=l2.minRange||l2.maxZoom;this.range=l2.range;this.offset=l2.offset||0;this.min=this.max=null;d2=v(l2.crosshair,M(b3.options.tooltip.crosshairs)[h2?0:1]);this.crosshair=true===d2?{}:d2;-1===b3.axes.indexOf(this)&&(h2?b3.axes.splice(b3.xAxis.length,0,this):b3.axes.push(this),b3[this.coll].push(this));this.series=this.series||[];b3.inverted&&!this.isZAxis&&h2&&"undefined"===typeof this.reversed&&(this.reversed=true);this.labelRotation=f(e2.rotation)?e2.rotation:void 0;a(this,l2);n(this,"afterInit")};b2.prototype.setOptions=function(b3){this.options=d(g2.defaultXAxisOptions,"yAxis"===this.coll&&g2.defaultYAxisOptions,[g2.defaultTopAxisOptions,g2.defaultRightAxisOptions,g2.defaultBottomAxisOptions,g2.defaultLeftAxisOptions][this.side],d(r[this.coll],b3));n(this,"afterSetOptions",{userOptions:b3})};b2.prototype.defaultLabelFormatter=function(b3){var d2=this.axis;b3=this.chart.numberFormatter;var h2=f(this.value)?this.value:NaN,l2=d2.chart.time,n2=this.dateTimeLabelFormat,v2=r.lang,a2=v2.numericSymbols;v2=v2.numericSymbolMagnitude||1e3;var e2=d2.logarithmic?Math.abs(h2):d2.tickInterval,F=a2&&a2.length;if(d2.categories)var k2="".concat(this.value);else if(n2)k2=l2.dateFormat(n2,h2);else if(F&&1e3<=e2)for(;F--&&"undefined"===typeof k2;)d2=Math.pow(v2,F+1),e2>=d2&&0===10*h2%d2&&null!==a2[F]&&0!==h2&&(k2=b3(h2/d2,-1)+a2[F]);"undefined"===typeof k2&&(k2=1e4<=Math.abs(h2)?b3(h2,-1):b3(h2,-1,void 0,""));return k2};b2.prototype.getSeriesExtremes=function(){var b3=this,d2=b3.chart,h2;n(this,"getSeriesExtremes",null,(function(){b3.hasVisibleSeries=false;b3.dataMin=b3.dataMax=b3.threshold=null;b3.softThreshold=!b3.isXAxis;b3.series.forEach((function(l2){if(l2.visible||!d2.options.chart.ignoreHiddenSeries){var n2=l2.options,a2=n2.threshold;b3.hasVisibleSeries=true;b3.positiveValuesOnly&&0>=a2&&(a2=null);if(b3.isXAxis){if(n2=l2.xData,n2.length){n2=b3.logarithmic?n2.filter(b3.validatePositiveValue):n2;h2=l2.getXExtremes(n2);var e2=h2.min;var F=h2.max;f(e2)||e2 instanceof Date||(n2=n2.filter(f),h2=l2.getXExtremes(n2),e2=h2.min,F=h2.max);n2.length&&(b3.dataMin=Math.min(v(b3.dataMin,e2),e2),b3.dataMax=Math.max(v(b3.dataMax,F),F))}}else if(l2=l2.applyExtremes(),f(l2.dataMin)&&(e2=l2.dataMin,b3.dataMin=Math.min(v(b3.dataMin,e2),e2)),f(l2.dataMax)&&(F=l2.dataMax,b3.dataMax=Math.max(v(b3.dataMax,F),F)),D(a2)&&(b3.threshold=a2),!n2.softThreshold||b3.positiveValuesOnly)b3.softThreshold=false}}))}));n(this,"afterGetSeriesExtremes")};b2.prototype.translate=function(b3,d2,h2,l2,n2,v2){var a2=this.linkedParent||this,F=l2&&a2.old?a2.old.min:a2.min;if(!f(F))return NaN;var k2=a2.minPixelPadding;n2=(a2.isOrdinal||a2.brokenAxis&&a2.brokenAxis.hasBreaks||a2.logarithmic&&n2)&&a2.lin2val;var w2=1,m2=0;l2=l2&&a2.old?a2.old.transA:a2.transA;l2||(l2=a2.transA);h2&&(w2*=-1,m2=a2.len);a2.reversed&&(w2*=-1,m2-=w2*(a2.sector||a2.len));d2?(v2=(b3*w2+m2-k2)/l2+F,n2&&(v2=a2.lin2val(v2))):(n2&&(b3=a2.val2lin(b3)),b3=w2*(b3-F)*l2,v2=(a2.isRadial?b3:e(b3))+m2+w2*k2+(f(v2)?l2*v2:0));return v2};b2.prototype.toPixels=function(b3,d2){return this.translate(b3,false,!this.horiz,void 0,true)+(d2?0:this.pos)};b2.prototype.toValue=function(b3,d2){return this.translate(b3-(d2?0:this.pos),true,!this.horiz,void 0,true)};b2.prototype.getPlotLinePath=function(b3){function d2(b4,d3,h3){"pass"!==q2&&(b4h3)&&(q2?b4=k(b4,d3,h3):M2=true);return b4}var h2=this,l2=h2.chart,a2=h2.left,e2=h2.top,F=b3.old,w2=b3.value,m2=b3.lineWidth,E2=F&&l2.oldChartHeight||l2.chartHeight,c2=F&&l2.oldChartWidth||l2.chartWidth,p2=h2.transB,u2=b3.translatedValue,q2=b3.force,J2,r2,g3,t2,M2;b3={value:w2,lineWidth:m2,old:F,force:q2,acrossPanes:b3.acrossPanes,translatedValue:u2};n(this,"getPlotLinePath",b3,(function(b4){u2=v(u2,h2.translate(w2,void 0,void 0,F));u2=k(u2,-1e5,1e5);J2=g3=Math.round(u2+p2);r2=t2=Math.round(E2-u2-p2);f(u2)?h2.horiz?(r2=e2,t2=E2-h2.bottom,J2=g3=d2(J2,a2,a2+h2.width)):(J2=a2,g3=c2-h2.right,r2=t2=d2(r2,e2,e2+h2.height)):(M2=true,q2=false);b4.path=M2&&!q2?null:l2.renderer.crispLine([["M",J2,r2],["L",g3,t2]],m2||1)}));return b3.path};b2.prototype.getLinearTickPositions=function(b3,d2,h2){var f2=e(Math.floor(d2/b3)*b3);h2=e(Math.ceil(h2/b3)*b3);var l2=[],n2;e(f2+b3)===f2&&(n2=20);if(this.single)return[d2];for(d2=f2;d2<=h2;){l2.push(d2);d2=e(d2+b3,n2);if(d2===a2)break;var a2=d2}return l2};b2.prototype.getMinorTickInterval=function(){var b3=this.options;return true===b3.minorTicks?v(b3.minorTickInterval,"auto"):false===b3.minorTicks?null:b3.minorTickInterval};b2.prototype.getMinorTickPositions=function(){var b3=this.options,d2=this.tickPositions,h2=this.minorTickInterval,f2=this.pointRangePadding||0,l2=this.min-f2;f2=this.max+f2;var n2=f2-l2,a2=[];if(n2&&n2/h2=this.minRange;var E2=this.minRange;var c2=(E2-f2+h2)/2;c2=[h2-c2,v(b3.min,h2-c2)];w2&&(c2[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):this.dataMin);h2=m(c2);f2=[h2+E2,v(b3.max,h2+E2)];w2&&(f2[2]=d2?d2.log2lin(this.dataMax):this.dataMax);f2=p(f2);f2-h2=u2)r2=u2,c2=0;else if(this.dataMax<=u2){var g3=u2;E2=0}}this.min=v(q2,r2,this.dataMin);this.max=v(J2,g3,this.dataMax)}h2&&(this.positiveValuesOnly&&!b3&&0>=Math.min(this.min,v(this.dataMin,this.min))&&K(10,1,d2),this.min=e(h2.log2lin(this.min),16),this.max=e(h2.log2lin(this.max),16));this.range&&D(this.max)&&(this.userMin=this.min=q2=Math.max(this.dataMin,this.minFromRange()),this.userMax=J2=this.max,this.range=null);n(this,"foundExtremes");this.beforePadding&&this.beforePadding();this.adjustForMinRange();!(F||this.axisPointRange||this.stacking&&this.stacking.usePercentage||k2)&&D(this.min)&&D(this.max)&&(d2=this.max-this.min)&&(!D(q2)&&c2&&(this.min-=d2*c2),!D(J2)&&E2&&(this.max+=d2*E2));f(this.userMin)||(f(l2.softMin)&&l2.softMinthis.max&&(this.max=J2=l2.softMax),f(l2.ceiling)&&(this.max=Math.min(this.max,l2.ceiling)));m2&&D(this.dataMin)&&(u2=u2||0,!D(q2)&&this.min=u2?this.min=this.options.minRange?Math.min(u2,this.max-this.minRange):u2:!D(J2)&&this.max>u2&&this.dataMax<=u2&&(this.max=this.options.minRange?Math.max(u2,this.min+this.minRange):u2));f(this.min)&&f(this.max)&&!this.chart.polar&&this.min>this.max&&(D(this.options.min)?this.max=this.min:D(this.options.max)&&(this.min=this.max));this.tickInterval=this.min===this.max||"undefined"===typeof this.min||"undefined"===typeof this.max?1:k2&&this.linkedParent&&!p2&&w2===this.linkedParent.options.tickPixelInterval?p2=this.linkedParent.tickInterval:v(p2,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,F?1:(this.max-this.min)*w2/Math.max(this.len,w2));if(a2&&!b3){var t2=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach((function(b4){b4.forceCrop=b4.forceCropping&&b4.forceCropping();b4.processData(t2)}));n(this,"postProcessData",{hasExtremesChanged:t2})}this.setAxisTranslation();n(this,"initialAxisTranslation");this.pointRange&&!p2&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));b3=v(l2.minTickInterval,this.dateTime&&!this.series.some((function(b4){return b4.noSharedTooltip}))?this.closestPointRange:0);!p2&&this.tickIntervalMath.max(2*this.len,200)))if(this.dateTime)v2=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,b3.units),this.min,this.max,b3.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,true);else if(this.logarithmic)v2=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else for(l2=b3=this.tickInterval;l2<=2*b3;)if(v2=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&v2.length>this.tickAmount)this.tickInterval=P(this,l2*=1.1);else break;else v2=[this.min,this.max],K(19,false,this.chart);v2.length>this.len&&(v2=[v2[0],v2[v2.length-1]],v2[0]===v2[1]&&(v2.length=1));h2&&(this.tickPositions=v2,(k2=h2.apply(this,[this.min,this.max]))&&(v2=k2))}this.tickPositions=v2;this.paddedTicks=v2.slice(0);this.trimTicks(v2,e2,a2);!this.isLinked&&f(this.min)&&f(this.max)&&(this.single&&2>v2.length&&!this.categories&&!this.series.some((function(b4){return b4.is("heatmap")&&"between"===b4.options.pointPlacement}))&&(this.min-=.5,this.max+=.5),d2||k2||this.adjustTickAmount());n(this,"afterSetTickPositions")};b2.prototype.trimTicks=function(b3,d2,h2){var f2=b3[0],l2=b3[b3.length-1],a2=!this.isOrdinal&&this.minPointOffset||0;n(this,"trimTicks");if(!this.isLinked){if(d2&&-Infinity!==f2)this.min=f2;else for(;this.min-a2>b3[0];)b3.shift();if(h2)this.max=l2;else for(;this.max+a2h2&&(this.finalTickAmt=h2,h2=5);this.tickAmount=h2};b2.prototype.adjustTickAmount=function(){var b3=this,d2=b3.finalTickAmt,h2=b3.max,l2=b3.min,n2=b3.options,a2=b3.tickPositions,k2=b3.tickAmount,w2=b3.thresholdAlignment,m2=a2&&a2.length,E2=v(b3.threshold,b3.softThreshold?0:null);var c2=b3.tickInterval;if(f(w2)){var p2=.5>w2?Math.ceil(w2*(k2-1)):Math.floor(w2*(k2-1));n2.reversed&&(p2=k2-1-p2)}if(b3.hasData()&&f(l2)&&f(h2)){w2=function(){b3.transA*=(m2-1)/(k2-1);b3.min=n2.startOnTick?a2[0]:Math.min(l2,a2[0]);b3.max=n2.endOnTick?a2[a2.length-1]:Math.max(h2,a2[a2.length-1])};if(f(p2)&&f(b3.threshold)){for(;a2[p2]!==E2||a2.length!==k2||a2[0]>l2||a2[a2.length-1]b3.threshold?a2.unshift(e(a2[0]-c2)):a2.push(e(a2[a2.length-1]+c2));if(c2>8*b3.tickInterval)break;c2*=2}w2()}else if(m2=d2&&0k2&&(d3=k2)),D(l2)&&(a3k2&&(a3=k2))),h2.displayBtn="undefined"!==typeof d3||"undefined"!==typeof a3,h2.setExtremes(d3,a3,false,void 0,{trigger:"zoom"});b4.zoomed=true}));return b3.zoomed};b2.prototype.setAxisSize=function(){var b3=this.chart,d2=this.options,h2=d2.offsets||[0,0,0,0],f2=this.horiz,l2=this.width=Math.round(E(v(d2.width,b3.plotWidth-h2[3]+h2[1]),b3.plotWidth)),a2=this.height=Math.round(E(v(d2.height,b3.plotHeight-h2[0]+h2[2]),b3.plotHeight)),n2=this.top=Math.round(E(v(d2.top,b3.plotTop+h2[0]),b3.plotHeight,b3.plotTop));d2=this.left=Math.round(E(v(d2.left,b3.plotLeft+h2[3]),b3.plotWidth,b3.plotLeft));this.bottom=b3.chartHeight-a2-n2;this.right=b3.chartWidth-l2-d2;this.len=Math.max(f2?l2:a2,0);this.pos=f2?d2:n2};b2.prototype.getExtremes=function(){var b3=this.logarithmic;return{min:b3?e(b3.lin2log(this.min)):this.min,max:b3?e(b3.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}};b2.prototype.getThreshold=function(b3){var d2=this.logarithmic,h2=d2?d2.lin2log(this.min):this.min;d2=d2?d2.lin2log(this.max):this.max;null===b3||-Infinity===b3?b3=h2:Infinity===b3?b3=d2:h2>b3?b3=h2:d2d2?b4.align="right":195d2&&(b4.align="left")}));return b3.align};b2.prototype.tickSize=function(b3){var d2=this.options,h2=v(d2["tick"===b3?"tickWidth":"minorTickWidth"],"tick"===b3&&this.isXAxis&&!this.categories?1:0),f2=d2["tick"===b3?"tickLength":"minorTickLength"];if(h2&&f2){"inside"===d2[b3+"Position"]&&(f2=-f2);var l2=[f2,h2]}b3={tickSize:l2};n(this,"afterTickSize",b3);return b3.tickSize};b2.prototype.labelMetrics=function(){var b3=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[b3]&&this.ticks[b3].label)};b2.prototype.unsquish=function(){var b3=this.options.labels,d2=this.horiz,h2=this.tickInterval,l2=this.len/(((this.categories?1:0)+this.max-this.min)/h2),a2=b3.rotation,n2=this.labelMetrics(),k2=Math.max(this.max-this.min,0),w2=function(b4){var d3=b4/(l2||1);d3=1k2&&Infinity!==b4&&Infinity!==l2&&k2&&(d3=Math.ceil(k2/h2));return e(d3*h2)},m2=h2,E2=Number.MAX_VALUE;if(d2){if(!b3.staggerLines)if(f(a2))var c2=[a2];else l2=r2){if(d2=w2(Math.abs(n2.h/Math.sin(q*r2))),p2=d2+Math.abs(r2/360),p2l2.step)return l2.rotation?0:(this.staggerLines||1)*this.len/a2;if(!h2){b3=l2.style.width;if(void 0!==b3)return parseInt(String(b3),10);if(n2)return n2-d2.spacing[3]}return.33*d2.chartWidth};b2.prototype.renderUnsquish=function(){var b3=this.chart,d2=b3.renderer,h2=this.tickPositions,f2=this.ticks,a2=this.options.labels,n2=a2.style,v2=this.horiz,e2=this.getSlotWidth(),k2=Math.max(1,Math.round(e2-2*a2.padding)),w2={},m2=this.labelMetrics(),E2=n2.textOverflow,c2=0;l(a2.rotation)||(w2.rotation=a2.rotation||0);h2.forEach((function(b4){b4=f2[b4];b4.movedLabel&&b4.replaceMovedLabel();b4&&b4.label&&b4.label.textPxLength>c2&&(c2=b4.label.textPxLength)}));this.maxLabelLength=c2;if(this.autoRotation)c2>k2&&c2>m2.h?w2.rotation=this.labelRotation:this.labelRotation=0;else if(e2){var p2=k2;if(!E2){var u2="clip";for(k2=h2.length;!v2&&k2--;){var q2=h2[k2];if(q2=f2[q2].label)q2.styles&&"ellipsis"===q2.styles.textOverflow?q2.css({textOverflow:"clip"}):q2.textPxLength>e2&&q2.css({width:e2+"px"}),q2.getBBox().height>this.len/h2.length-(m2.h-m2.f)&&(q2.specificTextOverflow="ellipsis")}}}w2.rotation&&(p2=c2>.5*b3.chartHeight?.33*b3.chartHeight:c2,E2||(u2="ellipsis"));if(this.labelAlign=a2.align||this.autoLabelAlign(this.labelRotation))w2.align=this.labelAlign;h2.forEach((function(b4){var d3=(b4=f2[b4])&&b4.label,h3=n2.width,l2={};d3&&(d3.attr(w2),b4.shortenLabel?b4.shortenLabel():p2&&!h3&&"nowrap"!==n2.whiteSpace&&(p2=this.min&&b3<=this.max||this.grid&&this.grid.isColumn)f2[b3]||(f2[b3]=new C(this,b3)),h2&&f2[b3].isNew&&f2[b3].render(d2,true,-1),f2[b3].render(d2)};b2.prototype.render=function(){var b3=this,d2=b3.chart,l2=b3.logarithmic,a2=b3.options,v2=b3.isLinked,e2=b3.tickPositions,k2=b3.axisTitle,w2=b3.ticks,m2=b3.minorTicks,E2=b3.alternateBands,c2=a2.stackLabels,p2=a2.alternateGridColor,u2=b3.tickmarkOffset,q2=b3.axisLine,J2=b3.showAxis,r2=t(d2.renderer.globalAnimation),g3,M2;b3.labelEdge.length=0;b3.overlap=false;[w2,m2,E2].forEach((function(b4){h(b4,(function(b5){b5.isActive=false}))}));if(b3.hasData()||v2){var D2=b3.chart.hasRendered&&b3.old&&f(b3.old.min);b3.minorTickInterval&&!b3.categories&&b3.getMinorTickPositions().forEach((function(d3){b3.renderMinorTick(d3,D2)}));e2.length&&(e2.forEach((function(d3,h2){b3.renderTick(d3,h2,D2)})),u2&&(0===b3.min||b3.single)&&(w2[-1]||(w2[-1]=new C(b3,-1,null,true)),w2[-1].render(-1)));p2&&e2.forEach((function(h2,f2){M2="undefined"!==typeof e2[f2+1]?e2[f2+1]+u2:b3.max-u2;0===f2%2&&h2m&&(!k||q<=c3)&&"undefined"!==typeof q&&r2.push(q);q>c3&&(n=true);q=f}}}else m=this.lin2log(m),c3=this.lin2log(c3),a2=k?e.getMinorTickInterval():q.tickInterval,a2=A("auto"===a2?null:a2,this.minorAutoInterval,q.tickPixelInterval/(k?5:1)*(c3-m)/((k?p/e.tickPositions.length:p)||1)),a2=y(a2),r2=e.getLinearTickPositions(a2,m,c3).map(this.log2lin),k||(this.minorAutoInterval=a2/5);k||(e.tickInterval=a2);return r2};a.prototype.lin2log=function(a2){return Math.pow(10,a2)};a.prototype.log2lin=function(a2){return Math.log(a2)/Math.LN10};return a}();c2.Additions=r})(B||(B={}));return B}));I(g,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[g["Core/Utilities.js"]],(function(c){var g2=c.erase,y=c.extend,A=c.isNumber,B;(function(c2){var C=[],x;c2.compose=function(c3,a){x||(x=c3);-1===C.indexOf(a)&&(C.push(a),y(a.prototype,t.prototype));return a};var t=function(){function c3(){}c3.prototype.getPlotBandPath=function(a,c4,m){void 0===m&&(m=this.options);var p=this.getPlotLinePath({value:c4,force:true,acrossPanes:m.acrossPanes}),k=[],e=this.horiz;c4=!A(this.min)||!A(this.max)||athis.max&&c4>this.max;a=this.getPlotLinePath({value:a,force:true,acrossPanes:m.acrossPanes});m=1;if(a&&p){if(c4){var q=a.toString()===p.toString();m=0}for(c4=0;c4q3-h?q3:q3-h);else if(u2)b[f2]=Math.max(k3,v+h+l2>a3?v:v+h);else return false},t2=function(h2,f2,a3,l2,n2){var e3;n2f2-d?e3=false:b[h2]=n2f2-l2/2?f2-l2-2:n2-a3/2;return e3},D2=function(b2){var d2=p2;p2=u;u=d2;q2=b2},N=function(){false!==r2.apply(0,p2)?false!==t2.apply(0,u)||q2||(D2(true),N()):q2?b.x=b.y=0:(D2(true),N())};(l.inverted||1d2}))&&(a2=a2.map((function(b2){var d2=f(b2.anchorX,b2.anchorY,b2.point.isHeader,b2.boxWidth,false);return q(b2,{target:d2.y,x:d2.x})})));l.cleanSplit();x(a2,ca);var Z=B2,I2=B2;a2.forEach((function(b2){var d2=b2.x,h2=b2.boxWidth;b2=b2.isHeader;b2||(l.outside&&B2+d2I2&&(I2=B2+d2))}));a2.forEach((function(b2){var d2=b2.x,h2=b2.anchorX,a3=b2.pos,f2=b2.point.isHeader;a3={visibility:"undefined"===typeof a3?"hidden":"inherit",x:d2,y:(a3||0)+L,anchorX:h2,anchorY:b2.anchorY};if(l.outside&&d2f[0]?Math.max(Math.abs(f[0]),d.width-f[0]):Math.max(Math.abs(f[0]),d.width);l.height=0>f[1]?Math.max(Math.abs(f[1]),d.height-Math.abs(f[1])):Math.max(Math.abs(f[1]),d.height);this.tracker?this.tracker.attr(l):(this.tracker=e2.renderer.rect(l).addClass("highcharts-tracker").add(e2),a2.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}else this.tracker&&this.tracker.destroy()};c2.prototype.styledModeFormat=function(a2){return a2.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')};c2.prototype.tooltipFooterHeaderFormatter=function(a2,e2){var f=a2.series,l=f.tooltipOptions,d=f.xAxis,b=d&&d.dateTime;d={isFooter:e2,labelConfig:a2};var h=l.xDateFormat,n=l[e2?"footerFormat":"headerFormat"];m(this,"headerFormatter",d,(function(d2){b&&!h&&k(a2.key)&&(h=b.getXDateFormat(a2.key,l.dateTimeLabelFormats));b&&h&&(a2.point&&a2.point.tooltipDateKeys||["key"]).forEach((function(b2){n=n.replace("{point."+b2+"}","{point."+b2+":"+h+"}")}));f.chart.styledMode&&(n=this.styledModeFormat(n));d2.text=z(n,{point:a2,series:f},this.chart)}));return d.text};c2.prototype.update=function(a2){this.destroy();D(true,this.chart.options.tooltip.userOptions,a2);this.init(this.chart,D(true,this.options,a2))};c2.prototype.updatePosition=function(a2){var e2=this.chart,f=this.distance,l=this.options,d=e2.pointer,b=this.getLabel(),h=d.getChartPosition();d=h.left;var n=h.top,k2=h.scaleX;h=h.scaleY;var c3=(l.positioner||this.getPosition).call(this,b.width,b.height,a2),m2=(a2.plotX||0)+e2.plotLeft;a2=(a2.plotY||0)+e2.plotTop;if(this.outside){l.positioner&&(c3.x+=d-f,c3.y+=n-f);f=l.borderWidth+2*f;this.renderer.setSize(b.width+f,b.height+f,false);if(1!==k2||1!==h)r(this.container,{transform:"scale(".concat(k2,", ").concat(h,")")}),m2*=k2,a2*=h;m2+=d-c3.x;a2+=n-c3.y}this.move(Math.round(c3.x),Math.round(c3.y||0),m2,a2)};return c2}();return c}));I(g,"Core/Series/Point.js",[g["Core/Renderer/HTML/AST.js"],g["Core/Animation/AnimationUtilities.js"],g["Core/Defaults.js"],g["Core/FormatUtilities.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B){var z=g2.animObject,C=y.defaultOptions,x=A.format,t=B.addEvent,r=B.defined,a=B.erase,q=B.extend,m=B.fireEvent,p=B.getNestedProperty,k=B.isArray,e=B.isFunction,D=B.isNumber,G=B.isObject,H=B.merge,K=B.objectEach,u=B.pick,n=B.syncTimeout,w=B.removeEvent,f=B.uniqueKey;g2=function(){function l(){this.category=void 0;this.formatPrefix="point";this.id=void 0;this.isNull=false;this.percentage=this.options=this.name=void 0;this.selected=false;this.total=this.shapeArgs=this.series=void 0;this.visible=true;this.x=void 0}l.prototype.animateBeforeDestroy=function(){var d=this,b={x:d.startXPos,opacity:0},h=d.getGraphicalProps();h.singular.forEach((function(h2){d[h2]=d[h2].animate("dataLabel"===h2?{x:d[h2].startXPos,y:d[h2].startYPos,opacity:0}:b)}));h.plural.forEach((function(b2){d[b2].forEach((function(b3){b3.element&&b3.animate(q({x:d.startXPos},b3.startYPos?{x:b3.startXPos,y:b3.startYPos}:{}))}))}))};l.prototype.applyOptions=function(d,b){var h=this.series,a2=h.options.pointValKey||h.pointValKey;d=l.prototype.optionsToObject.call(this,d);q(this,d);this.options=this.options?q(this.options,d):d;d.group&&delete this.group;d.dataLabels&&delete this.dataLabels;a2&&(this.y=l.prototype.getNestedProperty.call(this,a2));this.formatPrefix=(this.isNull=this.isValid&&!this.isValid())?"null":"point";this.selected&&(this.state="select");"name"in this&&"undefined"===typeof b&&h.xAxis&&h.xAxis.hasNames&&(this.x=h.xAxis.nameToX(this));"undefined"===typeof this.x&&h?this.x="undefined"===typeof b?h.autoIncrement():b:D(d.x)&&h.options.relativeXValue&&(this.x=h.autoIncrement(d.x));return this};l.prototype.destroy=function(){function d(){if(b.graphic||b.graphics||b.dataLabel||b.dataLabels)w(b),b.destroyElements();for(k2 in b)b[k2]=null}var b=this,h=b.series,f2=h.chart;h=h.options.dataSorting;var l2=f2.hoverPoints,e2=z(b.series.chart.renderer.globalAnimation),k2;b.legendItem&&f2.legend.destroyItem(b);l2&&(b.setState(),a(l2,b),l2.length||(f2.hoverPoints=null));if(b===f2.hoverPoint)b.onMouseOut();h&&h.enabled?(this.animateBeforeDestroy(),n(d,e2.duration)):d();f2.pointCount--};l.prototype.destroyElements=function(d){var b=this;d=b.getGraphicalProps(d);d.singular.forEach((function(d2){b[d2]=b[d2].destroy()}));d.plural.forEach((function(d2){b[d2].forEach((function(b2){b2&&b2.element&&b2.destroy()}));delete b[d2]}))};l.prototype.firePointEvent=function(d,b,h){var a2=this,f2=this.series.options;(f2.point.events[d]||a2.options&&a2.options.events&&a2.options.events[d])&&a2.importEvents();"click"===d&&f2.allowPointSelect&&(h=function(b2){a2.select&&a2.select(null,b2.ctrlKey||b2.metaKey||b2.shiftKey)});m(a2,d,b,h)};l.prototype.getClassName=function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+("undefined"!==typeof this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")};l.prototype.getGraphicalProps=function(d){var b=this,h=[],a2={singular:[],plural:[]},f2;d=d||{graphic:1,dataLabel:1};d.graphic&&h.push("graphic","shadowGroup");d.dataLabel&&h.push("dataLabel","dataLabelPath","dataLabelUpper","connector");for(f2=h.length;f2--;){var l2=h[f2];b[l2]&&a2.singular.push(l2)}["graphic","dataLabel","connector"].forEach((function(h2){var f3=h2+"s";d[h2]&&b[f3]&&a2.plural.push(f3)}));return a2};l.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}};l.prototype.getNestedProperty=function(d){if(d)return 0===d.indexOf("custom.")?p(d,this.options):this[d]};l.prototype.getZone=function(){var d=this.series,b=d.zones;d=d.zoneAxis||"y";var h,a2=0;for(h=b[a2];this[d]>=h.value;)h=b[++a2];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=h&&h.color&&!this.options.color?h.color:this.nonZonedColor;return h};l.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType};l.prototype.init=function(d,b,h){this.series=d;this.applyOptions(b,h);this.id=r(this.id)?this.id:f();this.resolveColor();d.chart.pointCount++;m(this,"afterInit");return this};l.prototype.isValid=function(){return null!==this.x&&D(this.y)};l.prototype.optionsToObject=function(d){var b=this.series,h=b.options.keys,a2=h||b.pointArrayMap||["y"],f2=a2.length,e2={},n2=0,c2=0;if(D(d)||null===d)e2[a2[0]]=d;else if(k(d))for(!h&&d.length>f2&&(b=typeof d[0],"string"===b?e2.name=d[0]:"number"===b&&(e2.x=d[0]),n2++);c2l+b&&(q2=l+b),ud+h&&(u=d+h),this.hasDragged=Math.sqrt(Math.pow(k2-q2,2)+Math.pow(c3-u,2)),10d.options.findNearestPointBy.indexOf("y");d=d.searchPoint(f,b);if((b=e(d,true)&&d.series)&&!(b=!e(l,true))){b=l.distX-d.distX;var h=l.dist-d.dist,a3=(d.series.group&&d.series.group.zIndex)-(l.series.group&&l.series.group.zIndex);b=0<(0!==b&&k2?b:0!==h?h:0!==a3?a3:l.series.index>d.series.index?-1:1)}b&&(l=d)}));return l};c2.prototype.getChartCoordinatesFromPoint=function(a2,e2){var f=a2.series,l=f.xAxis;f=f.yAxis;var d=a2.shapeArgs;if(l&&f){var b=H(a2.clientX,a2.plotX),h=a2.plotY||0;a2.isNode&&d&&k(d.x)&&k(d.y)&&(b=d.x,h=d.y);return e2?{chartX:f.len+f.pos-h,chartY:l.len+l.pos-b}:{chartX:b+l.pos,chartY:h+f.pos}}if(d&&d.x&&d.y)return{chartX:d.x,chartY:d.y}};c2.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var a2=this.chart.container,e2=G(a2);this.chartPosition={left:e2.left,top:e2.top,scaleX:1,scaleY:1};var f=a2.offsetWidth;a2=a2.offsetHeight;2q2.max&&(f=q2.max-N,C2=true);C2?(x2-=.8*(x2-h[v][0]),"number"===typeof H2&&(H2-=.8*(H2-h[v][1])),e2()):h[v]=[x2,H2];w||(b[v]=D2-u,b[p2]=N);b=w?1/G2:G2;d[p2]=N;d[v]=f;l[w?a2?"scaleY":"scaleX":"scale"+n]=G2;l["translate"+n]=b*u+(x2-b*r2)};c2.prototype.reset=function(a2,e2){var f=this.chart,l=f.hoverSeries,d=f.hoverPoint,b=f.hoverPoints,h=f.tooltip,k2=h&&h.shared?b:d;a2&&k2&&K(k2).forEach((function(b2){b2.series.isCartesian&&"undefined"===typeof b2.plotX&&(a2=false)}));if(a2)h&&k2&&K(k2).length&&(h.refresh(k2),h.shared&&b?b.forEach((function(b2){b2.setState(b2.state,true);b2.series.isCartesian&&(b2.series.xAxis.crosshair&&b2.series.xAxis.drawCrosshair(null,b2),b2.series.yAxis.crosshair&&b2.series.yAxis.drawCrosshair(null,b2))})):d&&(d.setState(d.state,true),f.axes.forEach((function(b2){b2.crosshair&&d.series[b2.coll]===b2&&b2.drawCrosshair(null,d)}))));else{if(d)d.onMouseOut();b&&b.forEach((function(b2){b2.setState()}));if(l)l.onMouseOut();h&&h.hide(e2);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());f.axes.forEach((function(b2){b2.hideCrosshair()}));this.hoverX=f.hoverPoints=f.hoverPoint=null}};c2.prototype.runPointActions=function(a2,e2,f){var l=this.chart,d=l.tooltip&&l.tooltip.options.enabled?l.tooltip:void 0,b=d?d.shared:false,h=e2||l.hoverPoint,k2=h&&h.series||l.hoverSeries;e2=this.getHoverData(h,k2,l.series,(!a2||"touchmove"!==a2.type)&&(!!e2||k2&&k2.directTouch&&this.isDirectTouch),b,a2);h=e2.hoverPoint;k2=e2.hoverSeries;var n=e2.hoverPoints;e2=k2&&k2.tooltipOptions.followPointer&&!k2.tooltipOptions.split;var p2=b&&k2&&!k2.noSharedTooltip;if(h&&(f||h!==l.hoverPoint||d&&d.isHidden)){(l.hoverPoints||[]).forEach((function(b2){-1===n.indexOf(b2)&&b2.setState()}));if(l.hoverSeries!==k2)k2.onMouseOver();this.applyInactiveState(n);(n||[]).forEach((function(b2){b2.setState("hover")}));l.hoverPoint&&l.hoverPoint.firePointEvent("mouseOut");if(!h.series)return;l.hoverPoints=n;l.hoverPoint=h;h.firePointEvent("mouseOver",void 0,(function(){d&&h&&d.refresh(p2?n:h,a2)}))}else e2&&d&&!d.isHidden&&(f=d.getAnchor([{}],a2),l.isInsidePlot(f[0],f[1],{visiblePlotOnly:true})&&d.updatePosition({plotX:f[0],plotY:f[1]}));this.unDocMouseMove||(this.unDocMouseMove=x(l.container.ownerDocument,"mousemove",(function(b2){var d2=z[c2.hoverChartIndex];if(d2)d2.pointer.onDocumentMouseMove(b2)})),this.eventsToUnbind.push(this.unDocMouseMove));l.axes.forEach((function(b2){var d2=H((b2.crosshair||{}).snap,true),h2;d2&&((h2=l.hoverPoint)&&h2.series[b2.coll]===b2||(h2=m(n,(function(d3){return d3.series&&d3.series[b2.coll]===b2}))));h2||!d2?b2.drawCrosshair(a2,h2):b2.hideCrosshair()}))};c2.prototype.scaleGroups=function(a2,e2){var f=this.chart;f.series.forEach((function(l){var d=a2||l.getPlotBox();l.group&&(l.xAxis&&l.xAxis.zoomEnabled||f.mapView)&&(l.group.attr(d),l.markerGroup&&(l.markerGroup.attr(d),l.markerGroup.clip(e2?f.clipRect:null)),l.dataLabelsGroup&&l.dataLabelsGroup.attr(d))}));f.clipRect.attr(e2||f.clipBox)};c2.prototype.setDOMEvents=function(){var a2=this,e2=this.chart.container,f=e2.ownerDocument;e2.onmousedown=this.onContainerMouseDown.bind(this);e2.onmousemove=this.onContainerMouseMove.bind(this);e2.onclick=this.onContainerClick.bind(this);this.eventsToUnbind.push(x(e2,"mouseenter",this.onContainerMouseEnter.bind(this)));this.eventsToUnbind.push(x(e2,"mouseleave",this.onContainerMouseLeave.bind(this)));c2.unbindDocumentMouseUp||(c2.unbindDocumentMouseUp=x(f,"mouseup",this.onDocumentMouseUp.bind(this)));for(var l=this.chart.renderTo.parentElement;l&&"BODY"!==l.tagName;)this.eventsToUnbind.push(x(l,"scroll",(function(){delete a2.chartPosition}))),l=l.parentElement;g2.hasTouch&&(this.eventsToUnbind.push(x(e2,"touchstart",this.onContainerTouchStart.bind(this),{passive:false})),this.eventsToUnbind.push(x(e2,"touchmove",this.onContainerTouchMove.bind(this),{passive:false})),c2.unbindDocumentTouchEnd||(c2.unbindDocumentTouchEnd=x(f,"touchend",this.onDocumentTouchEnd.bind(this),{passive:false})))};c2.prototype.setHoverChartIndex=function(){var a2=this.chart,e2=g2.charts[H(c2.hoverChartIndex,-1)];if(e2&&e2!==a2)e2.pointer.onContainerMouseLeave({relatedTarget:a2.container});e2&&e2.mouseIsDown||(c2.hoverChartIndex=a2.index)};c2.prototype.touch=function(a2,e2){var f=this.chart;this.setHoverChartIndex();if(1===a2.touches.length)if(a2=this.normalize(a2),f.isInsidePlot(a2.chartX-f.plotLeft,a2.chartY-f.plotTop,{visiblePlotOnly:true})&&!f.openMenu){e2&&this.runPointActions(a2);if("touchmove"===a2.type){e2=this.pinchDown;var d=e2[0]?4<=Math.sqrt(Math.pow(e2[0].chartX-a2.chartX,2)+Math.pow(e2[0].chartY-a2.chartY,2)):false}H(d,true)&&this.pinch(a2)}else e2&&this.reset();else 2===a2.touches.length&&this.pinch(a2)};c2.prototype.touchSelect=function(a2){return!(!this.chart.options.chart.zooming.singleTouch||!a2.touches||1!==a2.touches.length)};c2.prototype.zoomOption=function(a2){var e2=this.chart,f=e2.options.chart;e2=e2.inverted;var l=f.zooming.type||"";/touch/.test(a2.type)&&(l=H(f.zooming.pinchType,l));this.zoomX=a2=/x/.test(l);this.zoomY=f=/y/.test(l);this.zoomHor=a2&&!e2||f&&e2;this.zoomVert=f&&!e2||a2&&e2;this.hasZoom=a2||f};return c2}();return c}));I(g,"Core/MSPointer.js",[g["Core/Globals.js"],g["Core/Pointer.js"],g["Core/Utilities.js"]],(function(c,g2,y){function A(){var a2=[];a2.item=function(a3){return this[a3]};m(e,(function(e2){a2.push({pageX:e2.pageX,pageY:e2.pageY,target:e2.target})}));return a2}function B(a2,e2,k2,c2){var n=C[g2.hoverChartIndex||NaN];"touch"!==a2.pointerType&&a2.pointerType!==a2.MSPOINTER_TYPE_TOUCH||!n||(n=n.pointer,c2(a2),n[e2]({type:k2,target:a2.currentTarget,preventDefault:t,touches:A()}))}var z=this&&this.__extends||function(){var a2=function(e2,k2){a2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a3,e3){a3.__proto__=e3}||function(a3,e3){for(var k3 in e3)e3.hasOwnProperty(k3)&&(a3[k3]=e3[k3])};return a2(e2,k2)};return function(e2,k2){function c2(){this.constructor=e2}a2(e2,k2);e2.prototype=null===k2?Object.create(k2):(c2.prototype=k2.prototype,new c2)}}(),C=c.charts,x=c.doc,t=c.noop,r=c.win,a=y.addEvent,q=y.css,m=y.objectEach,p=y.pick,k=y.removeEvent,e={},D=!!r.PointerEvent;return function(m2){function g3(){return null!==m2&&m2.apply(this,arguments)||this}z(g3,m2);g3.isRequired=function(){return!(c.hasTouch||!r.PointerEvent&&!r.MSPointerEvent)};g3.prototype.batchMSEvents=function(a2){a2(this.chart.container,D?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a2(this.chart.container,D?"pointermove":"MSPointerMove",this.onContainerPointerMove);a2(x,D?"pointerup":"MSPointerUp",this.onDocumentPointerUp)};g3.prototype.destroy=function(){this.batchMSEvents(k);m2.prototype.destroy.call(this)};g3.prototype.init=function(a2,e2){m2.prototype.init.call(this,a2,e2);this.hasZoom&&q(a2.container,{"-ms-touch-action":"none","touch-action":"none"})};g3.prototype.onContainerPointerDown=function(a2){B(a2,"onContainerTouchStart","touchstart",(function(a3){e[a3.pointerId]={pageX:a3.pageX,pageY:a3.pageY,target:a3.currentTarget}}))};g3.prototype.onContainerPointerMove=function(a2){B(a2,"onContainerTouchMove","touchmove",(function(a3){e[a3.pointerId]={pageX:a3.pageX,pageY:a3.pageY};e[a3.pointerId].target||(e[a3.pointerId].target=a3.currentTarget)}))};g3.prototype.onDocumentPointerUp=function(a2){B(a2,"onDocumentTouchEnd","touchend",(function(a3){delete e[a3.pointerId]}))};g3.prototype.setDOMEvents=function(){var e2=this.chart.tooltip;m2.prototype.setDOMEvents.call(this);(this.hasZoom||p(e2&&e2.options.followTouchMove,true))&&this.batchMSEvents(a)};return g3}(g2)}));I(g,"Core/Legend/Legend.js",[g["Core/Animation/AnimationUtilities.js"],g["Core/FormatUtilities.js"],g["Core/Globals.js"],g["Core/Series/Point.js"],g["Core/Renderer/RendererUtilities.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z){var C=c.animObject,x=c.setAnimation,t=g2.format,r=y.marginNames,a=B.distribute,q=z.addEvent,m=z.createElement,p=z.css,k=z.defined,e=z.discardElement,D=z.find,G=z.fireEvent,H=z.isNumber,K=z.merge,u=z.pick,n=z.relativeLength,w=z.stableSort,f=z.syncTimeout;c=function(){function l(d,b){this.allItems=[];this.contentGroup=this.box=void 0;this.display=false;this.group=void 0;this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0;this.options=void 0;this.padding=0;this.pages=[];this.proximate=false;this.scrollGroup=void 0;this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0;this.chart=d;this.init(d,b)}l.prototype.init=function(d,b){this.chart=d;this.setOptions(b);b.enabled&&(this.render(),q(this.chart,"endResize",(function(){this.legend.positionCheckboxes()})),this.proximate?this.unchartrender=q(this.chart,"render",(function(){this.legend.proximatePositions();this.legend.positionItems()})):this.unchartrender&&this.unchartrender())};l.prototype.setOptions=function(d){var b=u(d.padding,8);this.options=d;this.chart.styledMode||(this.itemStyle=d.itemStyle,this.itemHiddenStyle=K(this.itemStyle,d.itemHiddenStyle));this.itemMarginTop=d.itemMarginTop||0;this.itemMarginBottom=d.itemMarginBottom||0;this.padding=b;this.initialItemY=b-5;this.symbolWidth=u(d.symbolWidth,16);this.pages=[];this.proximate="proximate"===d.layout&&!this.chart.inverted;this.baseline=void 0};l.prototype.update=function(d,b){var a2=this.chart;this.setOptions(K(true,this.options,d));this.destroy();a2.isDirtyLegend=a2.isDirtyBox=true;u(b,true)&&a2.redraw();G(this,"afterUpdate")};l.prototype.colorizeItem=function(d,b){var a2=d.legendItem||{},f2=a2.group,l2=a2.label,e2=a2.line;a2=a2.symbol;if(f2)f2[b?"removeClass":"addClass"]("highcharts-legend-item-hidden");if(!this.chart.styledMode){var k2=this.options;f2=this.itemHiddenStyle.color;k2=b?k2.itemStyle.color:f2;var c2=b?d.color||f2:f2,n2=d.options&&d.options.marker,m2={fill:c2};l2&&l2.css({fill:k2,color:k2});e2&&e2.attr({stroke:c2});a2&&(n2&&a2.isMarker&&(m2=d.pointAttribs(),b||(m2.stroke=m2.fill=f2)),a2.attr(m2))}G(this,"afterColorizeItem",{item:d,visible:b})};l.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this);this.chart.isResizing||this.positionCheckboxes()};l.prototype.positionItem=function(d){var b=this,a2=d.legendItem||{},f2=a2.group,l2=a2.x;l2=void 0===l2?0:l2;a2=a2.y;a2=void 0===a2?0:a2;var e2=this.options,c2=e2.symbolPadding,n2=!e2.rtl;e2=d.checkbox;f2&&f2.element&&(c2={translateX:n2?l2:this.legendWidth-l2-2*c2-4,translateY:a2},f2[k(f2.translateY)?"animate":"attr"](c2,void 0,(function(){G(b,"afterPositionItem",{item:d})})));e2&&(e2.x=l2,e2.y=a2)};l.prototype.destroyItem=function(d){for(var b=d.checkbox,a2=d.legendItem||{},f2=0,l2=["group","label","line","symbol"];f2f2-6&&e21.5*f2?a2.height:f2))};l.prototype.layoutItem=function(d){var b=this.options,a2=this.padding,f2="horizontal"===b.layout,l2=d.itemHeight,e2=this.itemMarginBottom,k2=this.itemMarginTop,c2=f2?u(b.itemDistance,20):0,n2=this.maxLegendWidth;b=b.alignColumns&&this.totalItemWidth>n2?this.maxItemWidth:d.itemWidth;var m2=d.legendItem||{};f2&&this.itemX-a2+b>n2&&(this.itemX=a2,this.lastLineHeight&&(this.itemY+=k2+this.lastLineHeight+e2),this.lastLineHeight=0);this.lastItemY=k2+this.itemY+e2;this.lastLineHeight=Math.max(l2,this.lastLineHeight);m2.x=this.itemX;m2.y=this.itemY;f2?this.itemX+=b:(this.itemY+=k2+l2+e2,this.lastLineHeight=l2);this.offsetWidth=this.widthOption||Math.max((f2?this.itemX-a2-(d.checkbox?0:c2):b)+a2,this.offsetWidth)};l.prototype.getAllItems=function(){var d=[];this.chart.series.forEach((function(b){var a2=b&&b.options;b&&u(a2.showInLegend,k(a2.linkedTo)?false:void 0,true)&&(d=d.concat((b.legendItem||{}).labels||("point"===a2.legendType?b.data:b)))}));G(this,"afterGetAllItems",{allItems:d});return d};l.prototype.getAlignment=function(){var d=this.options;return this.proximate?d.align.charAt(0)+"tv":d.floating?"":d.align.charAt(0)+d.verticalAlign.charAt(0)+d.layout.charAt(0)};l.prototype.adjustMargins=function(d,b){var a2=this.chart,f2=this.options,l2=this.getAlignment();l2&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((function(h,e2){h.test(l2)&&!k(d[e2])&&(a2[r[e2]]=Math.max(a2[r[e2]],a2.legend[(e2+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][e2]*f2[e2%2?"x":"y"]+u(f2.margin,12)+b[e2]+(a2.titleOffset[e2]||0)))}))};l.prototype.proximatePositions=function(){var d=this.chart,b=[],h="left"===this.options.align;this.allItems.forEach((function(a2){var f3;var l3=h;if(a2.yAxis){a2.xAxis.options.reversed&&(l3=!l3);a2.points&&(f3=D(l3?a2.points:a2.points.slice(0).reverse(),(function(b2){return H(b2.plotY)})));l3=this.itemMarginTop+a2.legendItem.label.getBBox().height+this.itemMarginBottom;var e3=a2.yAxis.top-d.plotTop;a2.visible?(f3=f3?f3.plotY:a2.yAxis.height,f3+=e3-.3*l3):f3=e3+a2.yAxis.height;b.push({target:f3,size:l3,item:a2})}}),this);for(var f2,l2=0,e2=a(b,d.plotHeight);l2e2&&false!==m2.enabled?(this.clipHeight=D2=Math.max(e2-20-this.titleHeight-c2,0),this.currentPage=u(this.currentPage,1),this.fullHeight=d,g3.forEach((function(b2,d2){x2=b2.legendItem||{};b2=x2.y||0;var a3=Math.round(x2.label.getBBox().height),h=w2.length;if(!h||b2-w2[h-1]>D2&&(G2||b2)!==w2[h-1])w2.push(G2||b2),h++;x2.pageIx=h-1;G2&&((g3[d2-1].legendItem||{}).pageIx=h-1);d2===g3.length-1&&b2+a3-w2[h-1]>D2&&a3<=D2&&(w2.push(b2),x2.pageIx=h);b2!==G2&&(G2=b2)})),H2||(H2=b.clipRect=f2.clipRect(0,c2,9999,0),b.contentGroup.clip(H2)),r2(D2),C2||(this.nav=C2=f2.g().attr({zIndex:1}).add(this.group),this.up=f2.symbol("triangle",0,0,q2,q2).add(C2),t2("upTracker").on("click",(function(){b.scroll(-1,p2)})),this.pager=f2.text("",15,10).addClass("highcharts-legend-navigation"),!a2.styledMode&&m2.style&&this.pager.css(m2.style),this.pager.add(C2),this.down=f2.symbol("triangle-down",0,0,q2,q2).add(C2),t2("downTracker").on("click",(function(){b.scroll(1,p2)}))),b.scroll(0),d=e2):C2&&(r2(),this.nav=C2.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return d};l.prototype.scroll=function(d,b){var a2=this,l2=this.chart,e2=this.pages,k2=e2.length,c2=this.clipHeight,n2=this.options.navigation,m2=this.pager,p2=this.padding,q2=this.currentPage+d;q2>k2&&(q2=k2);0=Math.max(c2+l2,m2.pos)&&k2<=Math.min(c2+l2+f2.width,m2.pos+m2.len)||(b2.isInsidePlot=false)}!a3.ignoreY&&b2.isInsidePlot&&(h2=a3.axis&&!a3.axis.isXAxis&&a3.axis||v2&&(h2?v2.xAxis:v2.yAxis)||{pos:e2,len:Infinity},a3=a3.paneCoordinates?h2.pos+d2:e2+d2,a3>=Math.max(n2+e2,h2.pos)&&a3<=Math.min(n2+e2+f2.height,h2.pos+h2.len)||(b2.isInsidePlot=false));R(this,"afterIsInsidePlot",b2);return b2.isInsidePlot};a2.prototype.redraw=function(b2){R(this,"beforeRedraw");var d2=this.hasCartesianSeries?this.axes:this.colorAxis||[],a3=this.series,h2=this.pointer,f2=this.legend,l2=this.userOptions.legend,e2=this.renderer,k2=e2.isHidden(),c2=[],n2=this.isDirtyBox,v2=this.isDirtyLegend;this.setResponsive&&this.setResponsive(false);G(this.hasRendered?b2:false,this);k2&&this.temporaryDisplay();this.layOutTitles();for(b2=a3.length;b2--;){var m2=a3[b2];if(m2.options.stacking||m2.options.centerInCategory){var p2=true;if(m2.isDirty){var q2=true;break}}}if(q2)for(b2=a3.length;b2--;)m2=a3[b2],m2.options.stacking&&(m2.isDirty=true);a3.forEach((function(b3){b3.isDirty&&("point"===b3.options.legendType?("function"===typeof b3.updateTotals&&b3.updateTotals(),v2=true):l2&&(l2.labelFormatter||l2.labelFormat)&&(v2=true));b3.isDirtyData&&R(b3,"updatedData")}));v2&&f2&&f2.options.enabled&&(f2.render(),this.isDirtyLegend=false);p2&&this.getStacks();d2.forEach((function(b3){b3.updateNames();b3.setScale()}));this.getMargins();d2.forEach((function(b3){b3.isDirty&&(n2=true)}));d2.forEach((function(b3){var d3=b3.min+","+b3.max;b3.extKey!==d3&&(b3.extKey=d3,c2.push((function(){R(b3,"afterSetExtremes",aa(b3.eventArgs,b3.getExtremes()));delete b3.eventArgs})));(n2||p2)&&b3.redraw()}));n2&&this.drawChartBox();R(this,"predraw");a3.forEach((function(b3){(n2||b3.isDirty)&&b3.visible&&b3.redraw();b3.isDirtyData=false}));h2&&h2.reset(true);e2.draw();R(this,"redraw");R(this,"render");k2&&this.temporaryDisplay(true);c2.forEach((function(b3){b3.call()}))};a2.prototype.get=function(b2){function d2(d3){return d3.id===b2||d3.options&&d3.options.id===b2}for(var a3=this.series,h2=L(this.axes,d2)||L(this.series,d2),f2=0;!h2&&f2d2.pointCount))};a2.prototype.pan=function(b2,d2){var a3=this,h2=a3.hoverPoints;d2="object"===typeof d2?d2:{enabled:d2,type:"x"};var f2=a3.options.chart;f2&&f2.panning&&(f2.panning=d2);var l2=d2.type,e2;R(this,"pan",{originalEvent:b2},(function(){h2&&h2.forEach((function(b3){b3.setState()}));var d3=a3.xAxis;"xy"===l2?d3=d3.concat(a3.yAxis):"y"===l2&&(d3=a3.yAxis);var f3={};d3.forEach((function(d4){if(d4.options.panningEnabled&&!d4.options.isInternal){var h3=d4.horiz,k2=b2[h3?"chartX":"chartY"];h3=h3?"mouseDownX":"mouseDownY";var c2=a3[h3],n2=d4.minPointOffset||0,v2=d4.reversed&&!a3.inverted||!d4.reversed&&a3.inverted?-1:1,m2=d4.getExtremes(),p2=d4.toValue(c2-k2,true)+n2*v2,q2=d4.toValue(c2+d4.len-k2,true)-(n2*v2||d4.isXAxis&&d4.pointRangePadding||0),u2=q2=v2&&p2<=q2&&(d4.setExtremes(c2,p2,false,false,{trigger:"pan"}),!a3.resetZoomButton&&c2!==v2&&p2!==q2&&l2.match("y")&&(a3.showResetZoom(),d4.displayBtn=false),e2=true),f3[h3]=k2)}}));Y(f3,(function(b3,d4){a3[d4]=b3}));e2&&a3.redraw(false);O(a3.container,{cursor:"move"})}))};return a2}();aa(c.prototype,{callbacks:[],collectionsWithInit:{xAxis:[c.prototype.addAxis,[true]],yAxis:[c.prototype.addAxis,[false]],series:[c.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")});return c}));I(g,"Core/Legend/LegendSymbol.js",[g["Core/Utilities.js"]],(function(c){var g2=c.extend,y=c.merge,A=c.pick,B;(function(c2){c2.drawLineMarker=function(c3){var x=this.legendItem=this.legendItem||{},t=this.options,r=c3.symbolWidth,a=c3.symbolHeight,q=a/2,m=this.chart.renderer,p=x.group;c3=c3.baseline-Math.round(.3*c3.fontMetrics.b);var k={},e=t.marker,D=0;this.chart.styledMode||(k={"stroke-width":Math.min(t.lineWidth||0,24)},t.dashStyle?k.dashstyle=t.dashStyle:"square"!==t.linecap&&(k["stroke-linecap"]="round"));x.line=m.path().addClass("highcharts-graph").attr(k).add(p);k["stroke-linecap"]&&(D=Math.min(x.line.strokeWidth(),r)/2);x.line.attr({d:[["M",D,c3],["L",r-D,c3]]});e&&false!==e.enabled&&r&&(t=Math.min(A(e.radius,q),q),0===this.symbol.indexOf("url")&&(e=y(e,{width:a,height:a}),t=0),x.symbol=x=m.symbol(this.symbol,r/2-t,c3-t,2*t,2*t,g2({context:"legend"},e)).addClass("highcharts-point").add(p),x.isMarker=true)};c2.drawRectangle=function(c3,g3){g3=g3.legendItem||{};var t=c3.symbolHeight,r=c3.options.squareSymbol;g3.symbol=this.chart.renderer.rect(r?(c3.symbolWidth-t)/2:0,c3.baseline-t+1,r?t:c3.symbolWidth,t,A(c3.options.symbolRadius,t/2)).addClass("highcharts-point").attr({zIndex:3}).add(g3.group)}})(B||(B={}));return B}));I(g,"Core/Series/SeriesDefaults.js",[],(function(){return{lineWidth:2,allowPointSelect:false,crisp:true,showCheckbox:false,animation:{duration:1e3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:true},hover:{animation:{duration:50},enabled:true,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:true,formatter:function(){var c=this.series.chart.numberFormatter;return"number"!==typeof this.y?"":c(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:true,states:{normal:{animation:true},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:true,turboThreshold:1e3,findNearestPointBy:"x"}}));I(g,"Core/Series/Series.js",[g["Core/Animation/AnimationUtilities.js"],g["Core/Defaults.js"],g["Core/Foundation.js"],g["Core/Globals.js"],g["Core/Legend/LegendSymbol.js"],g["Core/Series/Point.js"],g["Core/Series/SeriesDefaults.js"],g["Core/Series/SeriesRegistry.js"],g["Core/Renderer/SVG/SVGElement.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z,C,x,t,r){var a=c.animObject,q=c.setAnimation,m=g2.defaultOptions,p=y.registerEventOptions,k=A.hasTouch,e=A.svg,D=A.win,G=x.seriesTypes,H=r.arrayMax,K=r.arrayMin,u=r.clamp,n=r.cleanRecursively,w=r.correctFloat,f=r.defined,l=r.erase,d=r.error,b=r.extend,h=r.find,v=r.fireEvent,E=r.getNestedProperty,J=r.isArray,M=r.isNumber,O=r.isString,P=r.merge,T=r.objectEach,F=r.pick,Q=r.removeEvent,aa=r.splat,L=r.syncTimeout;c=function(){function c2(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}c2.prototype.init=function(d2,a2){v(this,"init",{options:a2});var h2=this,f2=d2.series;this.eventsToUnbind=[];h2.chart=d2;h2.options=h2.setOptions(a2);a2=h2.options;h2.linkedSeries=[];h2.bindAxes();b(h2,{name:a2.name,state:"",visible:false!==a2.visible,selected:true===a2.selected});p(this,a2);var l2=a2.events;if(l2&&l2.click||a2.point&&a2.point.events&&a2.point.events.click||a2.allowPointSelect)d2.runTrackerClick=true;h2.getColor();h2.getSymbol();h2.parallelArrays.forEach((function(b2){h2[b2+"Data"]||(h2[b2+"Data"]=[])}));h2.isCartesian&&(d2.hasCartesianSeries=true);var e2;f2.length&&(e2=f2[f2.length-1]);h2._i=F(e2&&e2._i,-1)+1;h2.opacity=h2.options.opacity;d2.orderSeries(this.insert(f2));a2.dataSorting&&a2.dataSorting.enabled?h2.setDataSortingOptions():h2.points||h2.data||h2.setData(a2.data,false);v(this,"afterInit")};c2.prototype.is=function(b2){return G[b2]&&this instanceof G[b2]};c2.prototype.insert=function(b2){var d2=this.options.index,a2;if(M(d2)){for(a2=b2.length;a2--;)if(d2>=F(b2[a2].options.index,b2[a2]._i)){b2.splice(a2+1,0,this);break}-1===a2&&b2.unshift(this);a2+=1}else b2.push(this);return F(a2,b2.length-1)};c2.prototype.bindAxes=function(){var b2=this,a2=b2.options,h2=b2.chart,f2;v(this,"bindAxes",null,(function(){(b2.axisTypes||[]).forEach((function(l2){var e2=0;h2[l2].forEach((function(d2){f2=d2.options;if(a2[l2]===e2&&!f2.isInternal||"undefined"!==typeof a2[l2]&&a2[l2]===f2.id||"undefined"===typeof a2[l2]&&0===f2.index)b2.insert(d2.series),b2[l2]=d2,d2.isDirty=true;f2.isInternal||e2++}));b2[l2]||b2.optionalAxis===l2||d(18,true,h2)}))}));v(this,"afterBindAxes")};c2.prototype.updateParallelArrays=function(b2,d2){var a2=b2.series,h2=arguments,f2=M(d2)?function(h3){var f3="y"===h3&&a2.toYData?a2.toYData(b2):b2[h3];a2[h3+"Data"][d2]=f3}:function(b3){Array.prototype[d2].apply(a2[b3+"Data"],Array.prototype.slice.call(h2,2))};a2.parallelArrays.forEach(f2)};c2.prototype.hasData=function(){return this.visible&&"undefined"!==typeof this.dataMax&&"undefined"!==typeof this.dataMin||this.visible&&this.yData&&0=this.cropStart?n2-this.cropStart:n2);!k2&&M(n2)&&l2[n2]&&l2[n2].touched&&(n2=void 0);return n2};c2.prototype.updateData=function(b2,d2){var a2=this.options,h2=a2.dataSorting,l2=this.points,e2=[],c3=this.requireSorting,k2=b2.length===l2.length,n2,v2,m2,p2=true;this.xIncrement=null;b2.forEach((function(b3,d3){var v3=f(b3)&&this.pointClass.prototype.optionsToObject.call({series:this},b3)||{},p3=v3.x;if(v3.id||M(p3)){if(v3=this.findPointIndex(v3,m2),-1===v3||"undefined"===typeof v3?e2.push(b3):l2[v3]&&b3!==a2.data[v3]?(l2[v3].update(b3,false,null,false),l2[v3].touched=true,c3&&(m2=v3+1)):l2[v3]&&(l2[v3].touched=true),!k2||d3!==v3||h2&&h2.enabled||this.hasDerivedData)n2=true}else e2.push(b3)}),this);if(n2)for(b2=l2.length;b2--;)(v2=l2[b2])&&!v2.touched&&v2.remove&&v2.remove(false,d2);else!k2||h2&&h2.enabled?p2=false:(b2.forEach((function(b3,d3){b3!==l2[d3].y&&l2[d3].update&&l2[d3].update(b3,false,null,false)})),e2.length=0);l2.forEach((function(b3){b3&&(b3.touched=false)}));if(!p2)return false;e2.forEach((function(b3){this.addPoint(b3,false,null,null,false)}),this);null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=H(this.xData),this.autoIncrement());return true};c2.prototype.setData=function(b2,a2,h2,f2){void 0===a2&&(a2=true);var l2=this,e2=l2.points,c3=e2&&e2.length||0,k2=l2.options,n2=l2.chart,v2=k2.dataSorting,m2=l2.xAxis,p2=k2.turboThreshold,q2=this.xData,u2=this.yData,w2=l2.pointArrayMap;w2=w2&&w2.length;var g3=k2.keys,E2,r2=0,t2=1,F2=null;if(!n2.options.chart.allowMutatingData){k2.data&&delete l2.options.data;l2.userOptions.data&&delete l2.userOptions.data;var D2=P(true,b2)}b2=D2||b2||[];D2=b2.length;v2&&v2.enabled&&(b2=this.sortData(b2));n2.options.chart.allowMutatingData&&false!==f2&&D2&&c3&&!l2.cropped&&!l2.hasGroupedData&&l2.visible&&!l2.boosted&&(E2=this.updateData(b2,h2));if(!E2){l2.xIncrement=null;l2.colorCounter=0;this.parallelArrays.forEach((function(b3){l2[b3+"Data"].length=0}));if(p2&&D2>p2)if(F2=l2.getFirstValidPoint(b2),M(F2))for(h2=0;h2b3?1:0})).forEach((function(b3,d3){b3.x=d3}),this);d2.linkedSeries&&d2.linkedSeries.forEach((function(d3){var a3=d3.options,f2=a3.data;a3.dataSorting&&a3.dataSorting.enabled||!f2||(f2.forEach((function(a4,l2){f2[l2]=h2(d3,a4);b2[l2]&&(f2[l2].x=b2[l2].x,f2[l2].index=l2)})),d3.setData(f2,false))}));return b2};c2.prototype.getProcessedData=function(b2){var a2=this.xAxis,h2=this.options,f2=h2.cropThreshold,l2=b2||this.getExtremesFromAll||h2.getExtremesFromAll,e2=this.isCartesian;b2=a2&&a2.val2lin;h2=!(!a2||!a2.logarithmic);var c3=0,k2=this.xData,n2=this.yData,v2=this.requireSorting;var m2=false;var p2=k2.length;if(a2){m2=a2.getExtremes();var q2=m2.min;var u2=m2.max;m2=!(!a2.categories||a2.names.length)}if(e2&&this.sorted&&!l2&&(!f2||p2>f2||this.forceCrop)){if(k2[p2-1]u2)k2=[],n2=[];else if(this.yData&&(k2[0]u2)){var w2=this.cropData(this.xData,this.yData,q2,u2);k2=w2.xData;n2=w2.yData;c3=w2.start;w2=true}}for(f2=k2.length||1;--f2;)if(a2=h2?b2(k2[f2])-b2(k2[f2-1]):k2[f2]-k2[f2-1],0a2&&v2&&!m2&&(d(15,false,this.chart),v2=false);return{xData:k2,yData:n2,cropped:w2,cropStart:c3,closestPointRange:g3}};c2.prototype.processData=function(b2){var d2=this.xAxis;if(this.isCartesian&&!this.isDirty&&!d2.isDirty&&!this.yAxis.isDirty&&!b2)return false;b2=this.getProcessedData();this.cropped=b2.cropped;this.cropStart=b2.cropStart;this.processedXData=b2.xData;this.processedYData=b2.yData;this.closestPointRange=this.basePointRange=b2.closestPointRange;v(this,"afterProcessData")};c2.prototype.cropData=function(b2,d2,a2,h2,f2){var l2=b2.length,e2,c3=0,k2=l2;f2=F(f2,this.cropShoulder);for(e2=0;e2=a2){c3=Math.max(0,e2-f2);break}for(a2=e2;a2h2){k2=a2+f2;break}return{xData:b2.slice(c3,k2),yData:d2.slice(c3,k2),start:c3,end:k2}};c2.prototype.generatePoints=function(){var d2=this.options,a2=this.processedData||d2.data,h2=this.processedXData,f2=this.processedYData,l2=this.pointClass,e2=h2.length,c3=this.cropStart||0,k2=this.hasGroupedData,n2=d2.keys,m2=[];d2=d2.dataGrouping&&d2.dataGrouping.groupAll?c3:0;var p2,q2,u2=this.data;if(!u2&&!k2){var w2=[];w2.length=a2.length;u2=this.data=w2}n2&&k2&&(this.options.keys=false);for(q2=0;q2=k2&&(f2[c3-e2]||u2)<=n2;if(w2&&u2)if(w2=q2.length)for(;w2--;)M(q2[w2])&&(l2[m2++]=q2[w2]);else l2[m2++]=q2}b2={activeYData:l2,dataMin:K(l2),dataMax:H(l2)};v(this,"afterGetExtremes",{dataExtremes:b2});return b2};c2.prototype.applyExtremes=function(){var b2=this.getExtremes();this.dataMin=b2.dataMin;this.dataMax=b2.dataMax;return b2};c2.prototype.getFirstValidPoint=function(b2){for(var d2=b2.length,a2=0,h2=null;null===h2&&a2=H2&&(H2=void 0),D2.total=D2.stackTotal=F(x2.total),D2.percentage=f(D2.y)&&x2.total?D2.y/x2.total*100:void 0,D2.stackY=O2,this.irregularWidths||x2.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))}D2.yBottom=f(H2)?u(e2.translate(H2,0,1,0,1),-1e5,1e5):void 0;this.dataModify&&(O2=this.dataModify.modifyValue(O2,r2));D2.plotY=void 0;M(O2)&&(x2=e2.translate(O2,false,true,false,true),"undefined"!==typeof x2&&(D2.plotY=u(x2,-1e5,1e5)));D2.isInside=this.isPointInside(D2);D2.clientX=m2?w(a2.translate(G2,0,0,0,1,n2)):E2;D2.negative=D2[g3]<(b2[g3+"Threshold"]||p2||0);D2.category=F(h2&&h2[D2.x],D2.x);if(!D2.isNull&&false!==D2.visible){"undefined"!==typeof z2&&(t2=Math.min(t2,Math.abs(E2-z2)));var z2=E2}D2.zone=this.zones.length?D2.getZone():void 0;!D2.graphic&&this.group&&l2&&(D2.isNew=true)}this.closestPointRangePx=t2;v(this,"afterTranslate")};c2.prototype.getValidPoints=function(b2,d2,a2){var h2=this.chart;return(b2||this.points||[]).filter((function(b3){return d2&&!h2.isInsidePlot(b3.plotX,b3.plotY,{inverted:h2.inverted})?false:false!==b3.visible&&(a2||!b3.isNull)}))};c2.prototype.getClipBox=function(){var b2=this.chart,d2=this.xAxis,a2=this.yAxis,h2=P(b2.clipBox);d2&&d2.len!==b2.plotSizeX&&(h2.width=d2.len);a2&&a2.len!==b2.plotSizeY&&(h2.height=a2.len);return h2};c2.prototype.getSharedClipKey=function(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0)};c2.prototype.setClip=function(){var b2=this.chart,d2=this.group,a2=this.markerGroup,h2=b2.sharedClips;b2=b2.renderer;var f2=this.getClipBox(),l2=this.getSharedClipKey(),e2=h2[l2];e2?e2.animate(f2):h2[l2]=e2=b2.clipRect(f2);d2&&d2.clip(false===this.options.clip?void 0:e2);a2&&a2.clip()};c2.prototype.animate=function(b2){var d2=this.chart,h2=this.group,f2=this.markerGroup,l2=d2.inverted,e2=a(this.options.animation),c3=[this.getSharedClipKey(),e2.duration,e2.easing,e2.defer].join(),k2=d2.sharedClips[c3],n2=d2.sharedClips[c3+"m"];if(b2&&h2)e2=this.getClipBox(),k2?k2.attr("height",e2.height):(e2.width=0,l2&&(e2.x=d2.plotHeight),k2=d2.renderer.clipRect(e2),d2.sharedClips[c3]=k2,n2=d2.renderer.clipRect({x:-99,y:-99,width:l2?d2.plotWidth+199:99,height:l2?99:d2.plotHeight+199}),d2.sharedClips[c3+"m"]=n2),h2.clip(k2),f2&&f2.clip(n2);else if(k2&&!k2.hasClass("highcharts-animating")){d2=this.getClipBox();var v2=e2.step;f2&&f2.element.childNodes.length&&(e2.step=function(b3,d3){v2&&v2.apply(d3,arguments);"width"===d3.prop&&n2&&n2.element&&n2.attr(l2?"height":"width",b3+99)});k2.addClass("highcharts-animating").animate(d2,e2)}};c2.prototype.afterAnimate=function(){var b2=this;this.setClip();T(this.chart.sharedClips,(function(d2,a2,h2){d2&&!b2.chart.container.querySelector('[clip-path="url(#'.concat(d2.id,')"]'))&&(d2.destroy(),delete h2[a2])}));this.finishedAnimating=true;v(this,"afterAnimate")};c2.prototype.drawPoints=function(b2){void 0===b2&&(b2=this.points);var d2=this.chart,a2=d2.styledMode,h2=this.colorAxis,f2=this.options.marker,l2=this[this.specialGroup||"markerGroup"],e2=this.xAxis,c3=F(f2.enabled,!e2||e2.isRadial?true:null,this.closestPointRangePx>=f2.enabledThreshold*f2.radius),k2,n2;if(false!==f2.enabled||this._hasPointMarkers)for(k2=0;k2G2.max;b2.resetZones&&0===m2&&(m2=void 0)}));this.clips=f2}else b2.visible&&(l2&&l2.show(),e2&&e2.show())};c2.prototype.plotGroup=function(b2,d2,a2,h2,l2){var e2=this[b2],c3=!e2;a2={visibility:a2,zIndex:h2||.1};"undefined"===typeof this.opacity||this.chart.styledMode||"inactive"===this.state||(a2.opacity=this.opacity);c3&&(this[b2]=e2=this.chart.renderer.g().add(l2));e2.addClass("highcharts-"+d2+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(f(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(e2.hasClass("highcharts-tracker")?" highcharts-tracker":""),true);e2.attr(a2)[c3?"attr":"animate"](this.getPlotBox(d2));return e2};c2.prototype.getPlotBox=function(b2){var d2=this.xAxis,a2=this.yAxis,h2=this.chart;b2=h2.inverted&&!h2.polar&&d2&&false!==this.invertible&&"series"===b2;h2.inverted&&(d2=a2,a2=this.xAxis);return{translateX:d2?d2.left:h2.plotLeft,translateY:a2?a2.top:h2.plotTop,rotation:b2?90:0,rotationOriginX:b2?(d2.len-a2.len)/2:0,rotationOriginY:b2?(d2.len+a2.len)/2:0,scaleX:b2?-1:1,scaleY:1}};c2.prototype.removeEvents=function(b2){b2||Q(this);this.eventsToUnbind.length&&(this.eventsToUnbind.forEach((function(b3){b3()})),this.eventsToUnbind.length=0)};c2.prototype.render=function(){var b2=this,d2=b2.chart,h2=b2.options,f2=a(h2.animation),l2=b2.visible?"inherit":"hidden",e2=h2.zIndex,c3=b2.hasRendered,k2=d2.seriesGroup;d2=!b2.finishedAnimating&&d2.renderer.isSVG?f2.duration:0;v(this,"render");b2.plotGroup("group","series",l2,e2,k2);b2.markerGroup=b2.plotGroup("markerGroup","markers",l2,e2,k2);false!==h2.clip&&b2.setClip();b2.animate&&d2&&b2.animate(true);b2.drawGraph&&(b2.drawGraph(),b2.applyZones());b2.visible&&b2.drawPoints();b2.drawDataLabels&&b2.drawDataLabels();b2.redrawPoints&&b2.redrawPoints();b2.drawTracker&&false!==b2.options.enableMouseTracking&&b2.drawTracker();b2.animate&&d2&&b2.animate();c3||(d2&&f2.defer&&(d2+=f2.defer),b2.animationTimeout=L((function(){b2.afterAnimate()}),d2||0));b2.isDirty=false;b2.hasRendered=true;v(b2,"afterRender")};c2.prototype.redraw=function(){var b2=this.isDirty||this.isDirtyData;this.translate();this.render();b2&&delete this.kdTree};c2.prototype.searchPoint=function(b2,d2){var a2=this.xAxis,h2=this.yAxis,f2=this.chart.inverted;return this.searchKDTree({clientX:f2?a2.len-b2.chartY+a2.pos:b2.chartX-a2.pos,plotY:f2?h2.len-b2.chartX+h2.pos:b2.chartY-h2.pos},d2,b2)};c2.prototype.buildKDTree=function(b2){function d2(b3,h3,f2){var l2=b3&&b3.length;if(l2){var e2=a2.kdAxisArray[h3%f2];b3.sort((function(b4,d3){return b4[e2]-d3[e2]}));l2=Math.floor(l2/2);return{point:b3[l2],left:d2(b3.slice(0,l2),h3+1,f2),right:d2(b3.slice(l2+1),h3+1,f2)}}}this.buildingKdTree=true;var a2=this,h2=-1m2?"left":"right";q2=0>m2?"right":"left";d3[w2]&&(w2=h2(b3,d3[w2],a3+1,n2),p2=w2[k2]w2;)u2--;this.updateParallelArrays(q2,"splice",u2,0,0);this.updateParallelArrays(q2,u2);k2&&q2.name&&(k2[w2]=q2.name);n2.splice(u2,0,b2);if(p2||this.processedData)this.data.splice(u2,0,null),this.processData();"point"===l2.legendType&&this.generatePoints();a2&&(e2[0]&&e2[0].remove?e2[0].remove(false):(e2.shift(),this.updateParallelArrays(q2,"shift"),n2.shift()));false!==f2&&v(this,"addPoint",{point:q2});this.isDirtyData=this.isDirty=true;d2&&c3.redraw(h2)};c2.prototype.removePoint=function(b2,d2,a2){var h2=this,f2=h2.data,l2=f2[b2],e2=h2.points,c3=h2.chart,k2=function(){e2&&e2.length===f2.length&&e2.splice(b2,1);f2.splice(b2,1);h2.options.data.splice(b2,1);h2.updateParallelArrays(l2||{series:h2},"splice",b2,1);l2&&l2.destroy();h2.isDirty=true;h2.isDirtyData=true;d2&&c3.redraw()};q(a2,c3);d2=F(d2,true);l2?l2.firePointEvent("remove",null,k2):k2()};c2.prototype.remove=function(b2,d2,a2,h2){function f2(){l2.destroy(h2);e2.isDirtyLegend=e2.isDirtyBox=true;e2.linkSeries();F(b2,true)&&e2.redraw(d2)}var l2=this,e2=l2.chart;false!==a2?v(l2,"remove",null,f2):f2()};c2.prototype.update=function(a2,h2){a2=n(a2,this.userOptions);v(this,"update",{options:a2});var f2=this,l2=f2.chart,e2=f2.userOptions,c3=f2.initialType||f2.type,k2=l2.options.plotOptions,m2=G[c3].prototype,p2=f2.finishedAnimating&&{animation:false},q2={},w2=["eventOptions","navigatorSeries","baseSeries"],u2=a2.type||e2.type||l2.options.chart.type,g3=!(this.hasDerivedData||u2&&u2!==this.type||"undefined"!==typeof a2.pointStart||"undefined"!==typeof a2.pointInterval||"undefined"!==typeof a2.relativeXValue||a2.joinBy||a2.mapData||f2.hasOptionChanged("dataGrouping")||f2.hasOptionChanged("pointStart")||f2.hasOptionChanged("pointInterval")||f2.hasOptionChanged("pointIntervalUnit")||f2.hasOptionChanged("keys"));u2=u2||c3;g3&&(w2.push("data","isDirtyData","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX"),false!==a2.visible&&w2.push("area","graph"),f2.parallelArrays.forEach((function(b2){w2.push(b2+"Data")})),a2.data&&(a2.dataSorting&&b(f2.options.dataSorting,a2.dataSorting),this.setData(a2.data,false)));a2=P(e2,p2,{index:"undefined"===typeof e2.index?f2.index:e2.index,pointStart:F(k2&&k2.series&&k2.series.pointStart,e2.pointStart,f2.xData[0])},!g3&&{data:f2.options.data},a2);g3&&a2.data&&(a2.data=f2.options.data);w2=["group","markerGroup","dataLabelsGroup","transformGroup","shadowGroup"].concat(w2);w2.forEach((function(b2){w2[b2]=f2[b2];delete f2[b2]}));k2=false;if(G[u2]){if(k2=u2!==f2.type,f2.remove(false,false,false,true),k2)if(Object.setPrototypeOf)Object.setPrototypeOf(f2,G[u2].prototype);else{p2=Object.hasOwnProperty.call(f2,"hcEvents")&&f2.hcEvents;for(r2 in m2)f2[r2]=void 0;b(f2,G[u2].prototype);p2?f2.hcEvents=p2:delete f2.hcEvents}}else d(17,true,l2,{missingModuleFor:u2});w2.forEach((function(b2){f2[b2]=w2[b2]}));f2.init(l2,a2);if(g3&&this.points){a2=f2.options;if(false===a2.visible)q2.graphic=1,q2.dataLabel=1;else if(!f2._hasPointLabels){m2=a2.marker;var r2=a2.dataLabels;e2=e2.marker||{};!m2||false!==m2.enabled&&e2.symbol===m2.symbol&&e2.height===m2.height&&e2.width===m2.width||(q2.graphic=1);r2&&false===r2.enabled&&(q2.dataLabel=1)}e2=0;for(m2=this.points;e2k&&g4.shadow));p&&(p.startX=a.xMap,p.isArea=a.isArea)}))};x.prototype.getGraphPath=function(c2,g4,a){var q=this,m=q.options,p=[],k=[],e,r=m.step;c2=c2||q.points;var t=c2.reversed;t&&c2.reverse();(r={right:1,center:2}[r]||r&&3)&&t&&(r=4-r);c2=this.getValidPoints(c2,false,!(m.connectNulls&&!g4&&!a));c2.forEach((function(t2,D){var u=t2.plotX,n=t2.plotY,w=c2[D-1];(t2.leftCliff||w&&w.rightCliff)&&!a&&(e=true);t2.isNull&&!B(g4)&&0c3&&t>m?(t=Math.max(c3,m),x=2*m-t):ta&&x>m?(x=Math.max(a,m),t=2*m-x):x=Math.abs(l)&&.5a2.closestPointRange*a2.xAxis.transA;b=a2.borderWidth=K(d.borderWidth,b?0:1);var h=a2.xAxis,e2=a2.yAxis,c3=d.threshold,k2=a2.translatedThreshold=e2.getThreshold(c3),n2=K(d.minPointLength,5),g3=a2.getColumnMetrics(),q2=g3.width,u2=a2.pointXOffset=g3.offset,w=a2.dataMin,r2=a2.dataMax,t2=a2.barW=Math.max(q2,1+2*b);l.inverted&&(k2-=.5);d.pointPadding&&(t2=Math.ceil(t2));z.prototype.translate.apply(a2);a2.points.forEach((function(b2){var f=K(b2.yBottom,k2),v=999+Math.abs(f),E=b2.plotX||0;v=m(b2.plotY,-v,e2.len+v);var F=Math.min(v,f),D2=Math.max(v,f)-F,J=q2,x2=E+u2,M=t2;n2&&Math.abs(D2)n2?f-n2:k2-(E?n2:0));p(b2.options.pointWidth)&&(J=M=Math.ceil(b2.options.pointWidth),x2-=Math.round((J-q2)/2));d.centerInCategory&&(x2=a2.adjustForMissingColumns(x2,J,b2,g3));b2.barX=x2;b2.pointWidth=J;b2.tooltipPos=l.inverted?[m(e2.len+e2.pos-l.plotLeft-v,e2.pos-l.plotLeft,e2.len+e2.pos-l.plotLeft),h.len+h.pos-l.plotTop-x2-M/2,D2]:[h.left-l.plotLeft+x2+M/2,m(v+e2.pos-l.plotTop,e2.pos-l.plotTop,e2.len+e2.pos-l.plotTop),D2];b2.shapeType=a2.pointClass.prototype.shapeType||"rect";b2.shapeArgs=a2.crispCol.apply(a2,b2.isNull?[x2,k2,M,0]:[x2,F,M,D2])}))};n.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")};n.prototype.pointAttribs=function(f,l){var d=this.options,b=this.pointAttrToOptions||{},h=b.stroke||"borderColor",e2=b["stroke-width"]||"borderWidth",c3=f&&f.color||this.color,k2=f&&f[h]||d[h]||c3;b=f&&f.options.dashStyle||d.dashStyle;var n2=f&&f[e2]||d[e2]||this[e2]||0,m2=K(f&&f.opacity,d.opacity,1);if(f&&this.zones.length){var p2=f.getZone();c3=f.options.color||p2&&(p2.color||f.nonZonedColor)||this.color;p2&&(k2=p2.borderColor||k2,b=p2.dashStyle||b,n2=p2.borderWidth||n2)}l&&f&&(f=H(d.states[l],f.options.states&&f.options.states[l]||{}),l=f.brightness,c3=f.color||"undefined"!==typeof l&&a(c3).brighten(f.brightness).get()||c3,k2=f[h]||k2,n2=f[e2]||n2,b=f.dashStyle||b,m2=K(f.opacity,m2));h={fill:c3,stroke:k2,"stroke-width":n2,opacity:m2};b&&(h.dashstyle=b);return h};n.prototype.drawPoints=function(a2){void 0===a2&&(a2=this.points);var f=this,d=this.chart,b=f.options,h=d.renderer,e2=b.animationLimit||250,c3;a2.forEach((function(a3){var l=a3.graphic,k2=!!l,n2=l&&d.pointCount"===l&&a2>d||"<"===l&&a2="===l&&a2>=d||"<="===l&&a2<=d||"=="===l&&a2==d||"==="===l&&a2===d?true:false):true}function g3(a2){void 0===a2&&(a2=this.points);var f=this,d=f.chart,b=f.options,h=f.hasRendered||0,e2=d.renderer,c3=d.options.chart,n2=c3.backgroundColor;c3=c3.plotBackgroundColor;var g4=e2.getContrast(r(c3)&&c3||r(n2)&&n2||"#000000"),w2=b.dataLabels,D;n2=w2.animation;n2=w2.defer?A(d,n2,f):{defer:0,duration:0};w2=u(u(d.options.plotOptions&&d.options.plotOptions.series&&d.options.plotOptions.series.dataLabels,d.options.plotOptions&&d.options.plotOptions[f.type]&&d.options.plotOptions[f.type].dataLabels),w2);x(this,"drawDataLabels");if(t(w2)||w2.enabled||f._hasPointLabels){var G=f.plotGroup("dataLabelsGroup","data-labels",h?"inherit":"hidden",w2.zIndex||6);G.attr({opacity:+h});!h&&(h=f.dataLabelsGroup)&&(f.visible&&G.show(),h[b.animation?"animate":"attr"]({opacity:1},n2));a2.forEach((function(a3){D=p(u(w2,a3.dlOptions||a3.options&&a3.options.dataLabels));D.forEach((function(h2,l){var c4=h2.enabled&&(!a3.isNull||a3.dataLabelOnNull)&&k2(a3,h2),n3=a3.connectors?a3.connectors[l]:a3.connector,p2=a3.dataLabels?a3.dataLabels[l]:a3.dataLabel,v=!p2,w3=m(h2.distance,a3.labelDistance);if(c4){var u2=a3.getLabelConfig();var r2=m(h2[a3.formatPrefix+"Format"],h2.format);u2=z(r2)?B(r2,u2,d):(h2[a3.formatPrefix+"Formatter"]||h2.formatter).call(u2,h2);r2=h2.style;var t2=h2.rotation;d.styledMode||(r2.color=m(h2.color,r2.color,f.color,"#000000"),"contrast"===r2.color?(a3.contrastColor=e2.getContrast(a3.color||f.color),r2.color=!z(w3)&&h2.inside||0>w3||b.stacking?a3.contrastColor:g4):delete a3.contrastColor,b.cursor&&(r2.cursor=b.cursor));var E={r:h2.borderRadius||0,rotation:t2,padding:h2.padding,zIndex:1};if(!d.styledMode){w3=h2.backgroundColor;var D2=h2.borderColor;E.fill="auto"===w3?a3.color:w3;E.stroke="auto"===D2?a3.color:D2;E["stroke-width"]=h2.borderWidth}q(E,(function(b2,a4){"undefined"===typeof b2&&delete E[a4]}))}!p2||c4&&z(u2)&&!!p2.div===!!h2.useHTML&&(p2.rotation&&h2.rotation||p2.rotation===h2.rotation)||(v=true,a3.dataLabel=p2=a3.dataLabel&&a3.dataLabel.destroy(),a3.dataLabels&&(1===a3.dataLabels.length?delete a3.dataLabels:delete a3.dataLabels[l]),l||delete a3.dataLabel,n3&&(a3.connector=a3.connector.destroy(),a3.connectors&&(1===a3.connectors.length?delete a3.connectors:delete a3.connectors[l])));c4&&z(u2)?(p2?E.text=u2:(a3.dataLabels=a3.dataLabels||[],p2=a3.dataLabels[l]=t2?e2.text(u2,0,0,h2.useHTML).addClass("highcharts-data-label"):e2.label(u2,0,0,h2.shape,null,null,h2.useHTML,null,"data-label"),l||(a3.dataLabel=p2),p2.addClass(" highcharts-data-label-color-"+a3.colorIndex+" "+(h2.className||"")+(h2.useHTML?" highcharts-tracker":""))),p2.options=h2,p2.attr(E),d.styledMode||p2.css(r2).shadow(h2.shadow),(l=h2[a3.formatPrefix+"TextPath"]||h2.textPath)&&!h2.useHTML&&(p2.setTextPath(a3.getDataLabelPath&&a3.getDataLabelPath(p2)||a3.graphic,l),a3.dataLabelPath&&!l.enabled&&(a3.dataLabelPath=a3.dataLabelPath.destroy())),p2.added||p2.add(G),f.alignDataLabel(a3,p2,h2,null,v)):p2&&p2.hide()}))}))}x(this,"afterDrawDataLabels")}function y2(a2,e2,d,b,h,c3){var f=this.chart,l=e2.align,k3=e2.verticalAlign,n2=a2.box?0:a2.padding||0,m2=e2.x;m2=void 0===m2?0:m2;var p2=e2.y;p2=void 0===p2?0:p2;var v=(d.x||0)+n2;if(0>v){"right"===l&&0<=m2?(e2.align="left",e2.inside=true):m2-=v;var g4=true}v=(d.x||0)+b.width-n2;v>f.plotWidth&&("left"===l&&0>=m2?(e2.align="right",e2.inside=true):m2+=f.plotWidth-v,g4=true);v=d.y+n2;0>v&&("bottom"===k3&&0<=p2?(e2.verticalAlign="top",e2.inside=true):p2-=v,g4=true);v=(d.y||0)+b.height-n2;v>f.plotHeight&&("top"===k3&&0>=p2?(e2.verticalAlign="bottom",e2.inside=true):p2+=f.plotHeight-v,g4=true);g4&&(e2.x=m2,e2.y=p2,a2.placed=!c3,a2.align(e2,void 0,h));return g4}function u(f,e2){var d=[],b;if(t(f)&&!t(e2))d=f.map((function(b2){return a(b2,e2)}));else if(t(e2)&&!t(f))d=e2.map((function(b2){return a(f,b2)}));else if(t(f)||t(e2))for(b=Math.max(f.length,e2.length);b--;)d[b]=a(f[b],e2[b]);else d=a(f,e2);return d}function n(a2,e2,d,b,h){var f=this.chart,l=f.inverted,c3=this.xAxis,k3=c3.reversed,n2=l?e2.height/2:e2.width/2;a2=(a2=a2.pointWidth)?a2/2:0;e2.startXPos=l?h.x:k3?-n2-a2:c3.width-n2+a2;e2.startYPos=l?k3?this.yAxis.height-n2+a2:-n2-a2:h.y;b?"hidden"===e2.visibility&&(e2.show(),e2.attr({opacity:0}).animate({opacity:1})):e2.attr({opacity:1}).animate({opacity:0},void 0,e2.hide);f.hasRendered&&(d&&e2.attr({x:e2.startXPos,y:e2.startYPos}),e2.placed=true)}var w=[];e.compose=function(a2){if(-1===w.indexOf(a2)){var f=a2.prototype;w.push(a2);f.alignDataLabel=c2;f.drawDataLabels=g3;f.justifyDataLabel=y2;f.setDataLabelStartPos=n}}})(k||(k={}));return k}));I(g,"Series/Column/ColumnDataLabel.js",[g["Core/Series/DataLabel.js"],g["Core/Series/SeriesRegistry.js"],g["Core/Utilities.js"]],(function(c,g2,y){var A=g2.series,B=y.merge,z=y.pick,C;(function(g3){function t(a,c2,m,p,k){var e=this.chart.inverted,g4=a.series,q=(g4.xAxis?g4.xAxis.len:this.chart.plotSizeX)||0;g4=(g4.yAxis?g4.yAxis.len:this.chart.plotSizeY)||0;var r2=a.dlBox||a.shapeArgs,t2=z(a.below,a.plotY>z(this.translatedThreshold,g4)),u=z(m.inside,!!this.options.stacking);r2&&(p=B(r2),0>p.y&&(p.height+=p.y,p.y=0),r2=p.y+p.height-g4,0 {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}}}));I(g,"Series/Scatter/ScatterSeries.js",[g["Series/Scatter/ScatterSeriesDefaults.js"],g["Core/Series/SeriesRegistry.js"],g["Core/Utilities.js"]],(function(c,g2,y){var A=this&&this.__extends||function(){var c2=function(a,g3){c2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a2,c3){a2.__proto__=c3}||function(a2,c3){for(var k in c3)c3.hasOwnProperty(k)&&(a2[k]=c3[k])};return c2(a,g3)};return function(a,g3){function m(){this.constructor=a}c2(a,g3);a.prototype=null===g3?Object.create(g3):(m.prototype=g3.prototype,new m)}}(),B=g2.seriesTypes,z=B.column,C=B.line;B=y.addEvent;var x=y.extend,t=y.merge;y=function(g3){function a(){var a2=null!==g3&&g3.apply(this,arguments)||this;a2.data=void 0;a2.options=void 0;a2.points=void 0;return a2}A(a,g3);a.prototype.applyJitter=function(){var a2=this,c2=this.options.jitter,g4=this.points.length;c2&&this.points.forEach((function(k,e){["x","y"].forEach((function(m,p){var q="plot"+m.toUpperCase();if(c2[m]&&!k.isNull){var r=a2[m+"Axis"];var u=c2[m]*r.transA;if(r&&!r.isLog){var n=Math.max(0,k[q]-u);r=Math.min(r.len,k[q]+u);p=1e4*Math.sin(e+p*g4);k[q]=n+(r-n)*(p-Math.floor(p));"x"===m&&(k.clientX=k.plotX)}}}))}))};a.prototype.drawGraph=function(){this.options.lineWidth?g3.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())};a.defaultOptions=t(C.defaultOptions,c);return a}(C);x(y.prototype,{drawTracker:z.prototype.drawTracker,sorted:false,requireSorting:false,noSharedTooltip:true,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:false});B(y,"afterTranslate",(function(){this.applyJitter()}));g2.registerSeriesType("scatter",y);return y}));I(g,"Series/CenteredUtilities.js",[g["Core/Globals.js"],g["Core/Series/Series.js"],g["Core/Utilities.js"]],(function(c,g2,y){var A=c.deg2rad,B=y.fireEvent,z=y.isNumber,C=y.pick,x=y.relativeLength,t;(function(c2){c2.getCenter=function(){var a=this.options,c3=this.chart,m=2*(a.slicedOffset||0),p=c3.plotWidth-2*m,k=c3.plotHeight-2*m,e=a.center,r=Math.min(p,k),t2=a.thickness,y2=a.size,A2=a.innerSize||0;"string"===typeof y2&&(y2=parseFloat(y2));"string"===typeof A2&&(A2=parseFloat(A2));a=[C(e[0],"50%"),C(e[1],"50%"),C(y2&&0>y2?void 0:a.size,"100%"),C(A2&&0>A2?void 0:a.innerSize||0,"0%")];!c3.angular||this instanceof g2||(a[3]=0);for(e=0;4>e;++e)y2=a[e],c3=2>e||2===e&&/%$/.test(y2),a[e]=x(y2,[p,k,r,a[2]][e])+(c3?m:0);a[3]>a[2]&&(a[3]=a[2]);z(t2)&&2*t2a&&360>c3-a?c3:a+360;return{start:A*(a+-90),end:A*(c3+-90)}}})(t||(t={}));return t}));I(g,"Series/Pie/PiePoint.js",[g["Core/Animation/AnimationUtilities.js"],g["Core/Series/Point.js"],g["Core/Utilities.js"]],(function(c,g2,y){var A=this&&this.__extends||function(){var a=function(c2,m){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a2,c3){a2.__proto__=c3}||function(a2,c3){for(var e in c3)c3.hasOwnProperty(e)&&(a2[e]=c3[e])};return a(c2,m)};return function(c2,m){function g3(){this.constructor=c2}a(c2,m);c2.prototype=null===m?Object.create(m):(g3.prototype=m.prototype,new g3)}}(),B=c.setAnimation,z=y.addEvent,C=y.defined;c=y.extend;var x=y.isNumber,t=y.pick,r=y.relativeLength;g2=function(a){function c2(){var c3=null!==a&&a.apply(this,arguments)||this;c3.labelDistance=void 0;c3.options=void 0;c3.series=void 0;return c3}A(c2,a);c2.prototype.getConnectorPath=function(){var a2=this.labelPosition,c3=this.series.options.dataLabels,k=this.connectorShapes,e=c3.connectorShape;k[e]&&(e=k[e]);return e.call(this,{x:a2.final.x,y:a2.final.y,alignment:a2.alignment},a2.connectorPosition,c3)};c2.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}};c2.prototype.haloPath=function(a2){var c3=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c3.x,c3.y,c3.r+a2,c3.r+a2,{innerR:c3.r-1,start:c3.start,end:c3.end})};c2.prototype.init=function(){var c3=this;a.prototype.init.apply(this,arguments);this.name=t(this.name,"Slice");var g3=function(a2){c3.slice("select"===a2.type)};z(this,"select",g3);z(this,"unselect",g3);return this};c2.prototype.isValid=function(){return x(this.y)&&0<=this.y};c2.prototype.setVisible=function(a2,c3){var k=this,e=this.series,g3=e.chart,m=e.options.ignoreHiddenPoint;c3=t(c3,m);a2!==this.visible&&(this.visible=this.options.visible=a2="undefined"===typeof a2?!this.visible:a2,e.options.data[e.data.indexOf(this)]=this.options,["graphic","dataLabel","connector","shadowGroup"].forEach((function(e2){if(k[e2])k[e2][a2?"show":"hide"](a2)})),this.legendItem&&g3.legend.colorizeItem(this,a2),a2||"hover"!==this.state||this.setState(""),m&&(e.isDirty=true),c3&&g3.redraw())};c2.prototype.slice=function(a2,c3,k){var e=this.series;B(k,e.chart);t(c3,true);this.sliced=this.options.sliced=C(a2)?a2:!this.sliced;e.options.data[e.data.indexOf(this)]=this.options;this.graphic&&this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())};return c2}(g2);c(g2.prototype,{connectorShapes:{fixedOffset:function(a,c2,g3){var m=c2.breakAt;c2=c2.touchingSliceAt;return[["M",a.x,a.y],g3.softConnector?["C",a.x+("left"===a.alignment?-5:5),a.y,2*m.x-c2.x,2*m.y-c2.y,m.x,m.y]:["L",m.x,m.y],["L",c2.x,c2.y]]},straight:function(a,c2){c2=c2.touchingSliceAt;return[["M",a.x,a.y],["L",c2.x,c2.y]]},crookedLine:function(a,c2,g3){c2=c2.touchingSliceAt;var m=this.series,k=m.center[0],e=m.chart.plotWidth,q=m.chart.plotLeft;m=a.alignment;var t2=this.shapeArgs.r;g3=r(g3.crookDistance,1);e="left"===m?k+t2+(e+q-k-t2)*(1-g3):q+(k-t2)*g3;g3=["L",e,a.y];k=true;if("left"===m?e>a.x||ec2.x)k=false;a=[["M",a.x,a.y]];k&&a.push(g3);a.push(["L",c2.x,c2.y]);return a}}});return g2}));I(g,"Series/Pie/PieSeriesDefaults.js",[],(function(){return{center:[null,null],clip:false,colorByPoint:true,dataLabels:{allowOverlap:true,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:true,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:true,x:0},fillColor:void 0,ignoreHiddenPoint:true,inactiveOtherPoints:true,legendType:"point",marker:null,size:null,showInLegend:false,slicedOffset:10,stickyTracking:false,tooltip:{followPointer:true},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}}));I(g,"Series/Pie/PieSeries.js",[g["Series/CenteredUtilities.js"],g["Series/Column/ColumnSeries.js"],g["Core/Globals.js"],g["Core/Legend/LegendSymbol.js"],g["Series/Pie/PiePoint.js"],g["Series/Pie/PieSeriesDefaults.js"],g["Core/Series/Series.js"],g["Core/Series/SeriesRegistry.js"],g["Core/Renderer/SVG/Symbols.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z,C,x,t,r){var a=this&&this.__extends||function(){var a2=function(e2,c2){a2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a3,e3){a3.__proto__=e3}||function(a3,e3){for(var f in e3)e3.hasOwnProperty(f)&&(a3[f]=e3[f])};return a2(e2,c2)};return function(e2,c2){function k2(){this.constructor=e2}a2(e2,c2);e2.prototype=null===c2?Object.create(c2):(k2.prototype=c2.prototype,new k2)}}(),q=c.getStartAndEndRadians;y=y.noop;var m=r.clamp,p=r.extend,k=r.fireEvent,e=r.merge,D=r.pick,G=r.relativeLength;r=function(c2){function g3(){var a2=null!==c2&&c2.apply(this,arguments)||this;a2.center=void 0;a2.data=void 0;a2.maxLabelDistance=void 0;a2.options=void 0;a2.points=void 0;return a2}a(g3,c2);g3.prototype.animate=function(a2){var e2=this,c3=e2.points,f=e2.startAngleRad;a2||c3.forEach((function(a3){var d=a3.graphic,b=a3.shapeArgs;d&&b&&(d.attr({r:D(a3.startR,e2.center&&e2.center[3]/2),start:f,end:f}),d.animate({r:b.r,start:b.start,end:b.end},e2.options.animation))}))};g3.prototype.drawEmpty=function(){var a2=this.startAngleRad,e2=this.endAngleRad,c3=this.options;if(0===this.total&&this.center){var f=this.center[0];var l=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(f,l,this.center[1]/2,0,a2,e2).addClass("highcharts-empty-series").add(this.group));this.graph.attr({d:t.arc(f,l,this.center[2]/2,0,{start:a2,end:e2,innerR:this.center[3]/2})});this.chart.styledMode||this.graph.attr({"stroke-width":c3.borderWidth,fill:c3.fillColor||"none",stroke:c3.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())};g3.prototype.drawPoints=function(){var a2=this.chart.renderer;this.points.forEach((function(e2){e2.graphic&&e2.hasNewShapeType()&&(e2.graphic=e2.graphic.destroy());e2.graphic||(e2.graphic=a2[e2.shapeType](e2.shapeArgs).add(e2.series.group),e2.delayedRendering=true)}))};g3.prototype.generatePoints=function(){c2.prototype.generatePoints.call(this);this.updateTotals()};g3.prototype.getX=function(a2,e2,c3){var f=this.center,l=this.radii?this.radii[c3.index]||0:f[2]/2;a2=Math.asin(m((a2-f[1])/(l+c3.labelDistance),-1,1));return f[0]+(e2?-1:1)*Math.cos(a2)*(l+c3.labelDistance)+(01.5*Math.PI?t2-=2*Math.PI:t2<-Math.PI/2&&(t2+=2*Math.PI);u.slicedTranslation={translateX:Math.round(Math.cos(t2)*c3),translateY:Math.round(Math.sin(t2)*c3)};x2=Math.cos(t2)*a2[2]/2;var F=Math.sin(t2)*a2[2]/2;u.tooltipPos=[a2[0]+.7*x2,a2[1]+.7*F];u.half=t2<-Math.PI/2||t2>Math.PI/2?1:0;u.angle=t2;r2=Math.min(f,u.labelDistance/5);u.labelPosition={natural:{x:a2[0]+x2+Math.cos(t2)*u.labelDistance,y:a2[1]+F+Math.sin(t2)*u.labelDistance},final:{},alignment:0>u.labelDistance?"center":u.half?"right":"left",connectorPosition:{breakAt:{x:a2[0]+x2+Math.cos(t2)*r2,y:a2[1]+F+Math.sin(t2)*r2},touchingSliceAt:{x:a2[0]+x2,y:a2[1]+F}}}}k(this,"afterTranslate")};g3.prototype.updateTotals=function(){var a2=this.points,e2=a2.length,c3=this.options.ignoreHiddenPoint,f,l=0;for(f=0;fg4&&(b2.dataLabel.css({width:Math.round(.7*g4)+"px"}),b2.dataLabel.shortened=true)):(b2.dataLabel=b2.dataLabel.destroy(),b2.dataLabels&&1===b2.dataLabels.length&&delete b2.dataLabels))})),D.forEach((function(c3,n){var g5=c3.length,v=[],q2;if(g5){e2.sortByAngle(c3,n-.5);if(0b-d&&0===n&&(w=Math.round(I2+A2-b+d),G[1]=Math.max(w,G[1])),0>V-K/2?G[0]=Math.max(Math.round(-V+K/2),G[0]):V+K/2>h&&(G[2]=Math.max(Math.round(V+K/2-h),G[2])),H.sideOverflow=w)}}})),0===t(G)||this.verifyDataLabelOverflow(G))&&(this.placeDataLabels(),this.points.forEach((function(b2){S=q(l,b2.options.dataLabels);if(z2=m(S.connectorWidth,1)){var a2;B3=b2.connector;if((H=b2.dataLabel)&&H._pos&&b2.visible&&0e2.bottom-2?c2:f,e2.half,e2)},justify:function(a2,e2,f){return f[0]+(a2.half?-1:1)*(e2+a2.labelDistance)},alignToPlotEdges:function(a2,e2,f,c2){a2=a2.getBBox().width;return e2?a2+c2:f-a2-c2},alignToConnectors:function(a2,e2,f,c2){var d=0,b;a2.forEach((function(a3){b=a3.dataLabel.getBBox().width;b>d&&(d=b)}));return e2?d+c2:f-d-c2}};e.compose=function(a2){c.compose(x);-1===B2.indexOf(a2)&&(B2.push(a2),a2=a2.prototype,a2.dataLabelPositioners=u,a2.alignDataLabel=z,a2.drawDataLabels=k2,a2.placeDataLabels=g3,a2.verifyDataLabelOverflow=y2)}})(k||(k={}));return k}));I(g,"Extensions/OverlappingDataLabels.js",[g["Core/Chart/Chart.js"],g["Core/Utilities.js"]],(function(c,g2){function y(c2,a){var g3=false;if(c2){var m=c2.newOpacity;c2.oldOpacity!==m&&(c2.alignAttr&&c2.placed?(c2[m?"removeClass":"addClass"]("highcharts-data-label-hidden"),g3=true,c2.alignAttr.opacity=m,c2[c2.isOld?"animate":"attr"](c2.alignAttr,null,(function(){a.styledMode||c2.css({pointerEvents:m?"auto":"none"})})),B(a,"afterHideOverlappingLabel")):c2.attr({opacity:m}));c2.isOld=true}return g3}var A=g2.addEvent,B=g2.fireEvent,z=g2.isArray,C=g2.isNumber,x=g2.objectEach,t=g2.pick;A(c,"render",(function(){var c2=this,a=[];(this.labelCollectors||[]).forEach((function(c3){a=a.concat(c3())}));(this.yAxis||[]).forEach((function(c3){c3.stacking&&c3.options.stackLabels&&!c3.options.stackLabels.allowOverlap&&x(c3.stacking.stacks,(function(c4){x(c4,(function(c5){c5.label&&a.push(c5.label)}))}))}));(this.series||[]).forEach((function(g3){var m=g3.options.dataLabels;g3.visible&&(false!==m.enabled||g3._hasPointLabels)&&(m=function(g4){return g4.forEach((function(k){k.visible&&(z(k.dataLabels)?k.dataLabels:k.dataLabel?[k.dataLabel]:[]).forEach((function(e){var g5=e.options;e.labelrank=t(g5.labelrank,k.labelrank,k.shapeArgs&&k.shapeArgs.height);g5.allowOverlap?(e.oldOpacity=e.opacity,e.newOpacity=1,y(e,c2)):a.push(e)}))}))},m(g3.nodes||[]),m(g3.points))}));this.hideOverlappingLabels(a)}));c.prototype.hideOverlappingLabels=function(c2){var a=this,g3=c2.length,m=a.renderer,p,k,e,t2=false;var r=function(a2){var e2,c3=a2.box?0:a2.padding||0,f=e2=0,l;if(a2&&(!a2.alignAttr||a2.placed)){var d=a2.alignAttr||{x:a2.attr("x"),y:a2.attr("y")};var b=a2.parentGroup;a2.width||(e2=a2.getBBox(),a2.width=e2.width,a2.height=e2.height,e2=m.fontMetrics(null,a2.element).h);var h=a2.width-2*c3;(l={left:"0",center:"0.5",right:"1"}[a2.alignValue])?f=+l*h:C(a2.x)&&Math.round(a2.x)!==a2.translateX&&(f=a2.x-a2.translateX);return{x:d.x+(b.translateX||0)+c3-(f||0),y:d.y+(b.translateY||0)+c3-e2,width:a2.width-2*c3,height:a2.height-2*c3}}};for(k=0;k=x2.x+x2.width||z2.x+z2.width<=x2.x||z2.y>=x2.y+x2.height||z2.y+z2.height<=x2.y||((r.labelrank=x(e.minWidth,0)&&this.chartHeight>=x(e.minHeight,0)}).call(this)&&c3.push(a4._id)};a3.prototype.setResponsive=function(a4,c3){var e=this,k=this.options.responsive,g3=this.currentResponsive,m=[];!c3&&k&&k.rules&&k.rules.forEach((function(a5){"undefined"===typeof a5._id&&(a5._id=r());e.matchResponsiveRule(a5,m)}),this);c3=z.apply(void 0,m.map((function(a5){return y((k||{}).rules||[],(function(e2){return e2._id===a5}))})).map((function(a5){return a5&&a5.chartOptions})));c3.isResponsiveOptions=true;m=m.toString()||void 0;m!==(g3&&g3.ruleIds)&&(g3&&this.update(g3.undoOptions,a4,true),m?(g3=this.currentOptions(c3),g3.isResponsiveOptions=true,this.currentResponsive={ruleIds:m,mergedOptions:c3,undoOptions:g3},this.update(c3,a4,true)):this.currentResponsive=void 0)};return a3}()})(a||(a={}));return a}));I(g,"masters/highcharts.src.js",[g["Core/Globals.js"],g["Core/Utilities.js"],g["Core/Defaults.js"],g["Core/Animation/Fx.js"],g["Core/Animation/AnimationUtilities.js"],g["Core/Renderer/HTML/AST.js"],g["Core/FormatUtilities.js"],g["Core/Renderer/RendererUtilities.js"],g["Core/Renderer/SVG/SVGElement.js"],g["Core/Renderer/SVG/SVGRenderer.js"],g["Core/Renderer/HTML/HTMLElement.js"],g["Core/Renderer/HTML/HTMLRenderer.js"],g["Core/Axis/Axis.js"],g["Core/Axis/DateTimeAxis.js"],g["Core/Axis/LogarithmicAxis.js"],g["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],g["Core/Axis/Tick.js"],g["Core/Tooltip.js"],g["Core/Series/Point.js"],g["Core/Pointer.js"],g["Core/MSPointer.js"],g["Core/Legend/Legend.js"],g["Core/Chart/Chart.js"],g["Core/Axis/Stacking/StackingAxis.js"],g["Core/Axis/Stacking/StackItem.js"],g["Core/Series/Series.js"],g["Core/Series/SeriesRegistry.js"],g["Series/Column/ColumnSeries.js"],g["Series/Column/ColumnDataLabel.js"],g["Series/Pie/PieSeries.js"],g["Series/Pie/PieDataLabel.js"],g["Core/Series/DataLabel.js"],g["Core/Responsive.js"],g["Core/Color/Color.js"],g["Core/Time.js"]],(function(c,g2,y,A,B,z,C,x,t,r,a,q,m,p,k,e,D,G,H,K,u,n,w,f,l,d,b,h,v,E,J,M,O,P,T){c.animate=B.animate;c.animObject=B.animObject;c.getDeferredAnimation=B.getDeferredAnimation;c.setAnimation=B.setAnimation;c.stop=B.stop;c.timers=A.timers;c.AST=z;c.Axis=m;c.Chart=w;c.chart=w.chart;c.Fx=A;c.Legend=n;c.PlotLineOrBand=e;c.Point=H;c.Pointer=u.isRequired()?u:K;c.Series=d;c.StackItem=l;c.SVGElement=t;c.SVGRenderer=r;c.Tick=D;c.Time=T;c.Tooltip=G;c.Color=P;c.color=P.parse;q.compose(r);a.compose(t);c.defaultOptions=y.defaultOptions;c.getOptions=y.getOptions;c.time=y.defaultTime;c.setOptions=y.setOptions;c.dateFormat=C.dateFormat;c.format=C.format;c.numberFormat=C.numberFormat;c.addEvent=g2.addEvent;c.arrayMax=g2.arrayMax;c.arrayMin=g2.arrayMin;c.attr=g2.attr;c.clearTimeout=g2.clearTimeout;c.correctFloat=g2.correctFloat;c.createElement=g2.createElement;c.css=g2.css;c.defined=g2.defined;c.destroyObjectProperties=g2.destroyObjectProperties;c.discardElement=g2.discardElement;c.distribute=x.distribute;c.erase=g2.erase;c.error=g2.error;c.extend=g2.extend;c.extendClass=g2.extendClass;c.find=g2.find;c.fireEvent=g2.fireEvent;c.getMagnitude=g2.getMagnitude;c.getStyle=g2.getStyle;c.inArray=g2.inArray;c.isArray=g2.isArray;c.isClass=g2.isClass;c.isDOMElement=g2.isDOMElement;c.isFunction=g2.isFunction;c.isNumber=g2.isNumber;c.isObject=g2.isObject;c.isString=g2.isString;c.keys=g2.keys;c.merge=g2.merge;c.normalizeTickInterval=g2.normalizeTickInterval;c.objectEach=g2.objectEach;c.offset=g2.offset;c.pad=g2.pad;c.pick=g2.pick;c.pInt=g2.pInt;c.relativeLength=g2.relativeLength;c.removeEvent=g2.removeEvent;c.seriesType=b.seriesType;c.splat=g2.splat;c.stableSort=g2.stableSort;c.syncTimeout=g2.syncTimeout;c.timeUnits=g2.timeUnits;c.uniqueKey=g2.uniqueKey;c.useSerialIds=g2.useSerialIds;c.wrap=g2.wrap;v.compose(h);M.compose(d);p.compose(m);k.compose(m);J.compose(E);e.compose(m);O.compose(w);f.compose(m,w,d);return c}));I(g,"Core/Axis/NavigatorAxisComposition.js",[g["Core/Globals.js"],g["Core/Utilities.js"]],(function(c,g2){function y(){this.navigatorAxis||(this.navigatorAxis=new q(this))}function A(a2){var c2=this.chart.options,k=c2.navigator,e=this.navigatorAxis,g3=c2.chart.zooming.pinchType,m=c2.rangeSelector;c2=c2.chart.zooming.type;this.isXAxis&&(k&&k.enabled||m&&m.enabled)&&("y"===c2?a2.zoomed=false:(!B&&"xy"===c2||B&&"xy"===g3)&&this.options.range&&(k=e.previousZoom,x(a2.newMin)?e.previousZoom=[this.min,this.max]:k&&(a2.newMin=k[0],a2.newMax=k[1],e.previousZoom=void 0)));"undefined"!==typeof a2.zoomed&&a2.preventDefault()}var B=c.isTouchDevice,z=g2.addEvent,C=g2.correctFloat,x=g2.defined,t=g2.isNumber,r=g2.pick,a=[],q=function(){function c2(a2){this.axis=a2}c2.compose=function(c3){-1===a.indexOf(c3)&&(a.push(c3),c3.keepProps.push("navigatorAxis"),z(c3,"init",y),z(c3,"zoom",A))};c2.prototype.destroy=function(){this.axis=void 0};c2.prototype.toFixedRange=function(a2,c3,e,g3){var k=this.axis,m=k.chart;a2=r(e,k.translate(a2,true,!k.horiz));c3=r(g3,k.translate(c3,true,!k.horiz));m=m&&m.fixedRange;k=(k.pointRange||0)/2;var p=m&&(c3-a2)/m;x(e)||(a2=C(a2+k));x(g3)||(c3=C(c3-k));.7p&&(g3?a2=c3-m:c3=a2+m);t(a2)&&t(c3)||(a2=c3=void 0);return{min:a2,max:c3}};return c2}();return q}));I(g,"Stock/Navigator/NavigatorDefaults.js",[g["Core/Color/Color.js"],g["Core/Series/SeriesRegistry.js"]],(function(c,g2){c=c.parse;g2=g2.seriesTypes;g2={height:40,margin:25,maskInside:true,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:true,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:c("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:"undefined"===typeof g2.areaspline?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:true,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:false,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:false},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:false},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:false,endOnTick:false,minPadding:.1,maxPadding:.1,labels:{enabled:false},crosshair:false,title:{text:null},tickLength:0,tickWidth:0}};return g2}));I(g,"Stock/Navigator/NavigatorSymbols.js",[],(function(){return{"navigator-handle":function(c,g2,y,A,B){void 0===B&&(B={});c=B.width?B.width/2:y;g2=Math.round(c/3)+.5;A=B.height||A;return[["M",-c-1,.5],["L",c,.5],["L",c,A+.5],["L",-c-1,A+.5],["L",-c-1,.5],["M",-g2,4],["L",-g2,A-3],["M",g2-1,4],["L",g2-1,A-3]]}}}));I(g,"Stock/Navigator/NavigatorComposition.js",[g["Core/Defaults.js"],g["Core/Globals.js"],g["Core/Axis/NavigatorAxisComposition.js"],g["Stock/Navigator/NavigatorDefaults.js"],g["Stock/Navigator/NavigatorSymbols.js"],g["Core/Renderer/RendererRegistry.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z,C){function x(){this.navigator&&this.navigator.setBaseSeries(null,false)}function t(){var a2=this.legend,b=this.navigator;if(b){var h=a2&&a2.options;var e2=b.xAxis;var c2=b.yAxis;var f2=b.scrollbarHeight;this.inverted?(b.left=b.opposite?this.chartWidth-f2-b.height:this.spacing[3]+f2,b.top=this.plotTop+f2):(b.left=w(e2.left,this.plotLeft+f2),b.top=b.navigatorOptions.top||this.chartHeight-b.height-f2-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(h&&"bottom"===h.verticalAlign&&"proximate"!==h.layout&&h.enabled&&!h.floating?a2.legendHeight+w(h.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));e2&&c2&&(this.inverted?e2.options.left=c2.options.left=b.left:e2.options.top=c2.options.top=b.top,e2.setAxisSize(),c2.setAxisSize())}}function r(a2){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new l(this),w(a2.redraw,true)&&this.redraw(a2.animation))}function a(){var a2=this.options;if(a2.navigator.enabled||a2.scrollbar.enabled)this.scroller=this.navigator=new l(this)}function q(){var a2=this.options,b=a2.navigator,h=a2.rangeSelector;if((b&&b.enabled||h&&h.enabled)&&(!G&&"x"===a2.chart.zooming.type||G&&"x"===a2.chart.zooming.pinchType))return false}function m(a2){var b=a2.navigator;b&&a2.xAxis[0]&&(a2=a2.xAxis[0].getExtremes(),b.render(a2.min,a2.max))}function p(a2){var b=a2.options.navigator||{},d=a2.options.scrollbar||{};this.navigator||this.scroller||!b.enabled&&!d.enabled||(n(true,this.options.navigator,b),n(true,this.options.scrollbar,d),delete a2.options.navigator,delete a2.options.scrollbar)}function k(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,false)}var e=c.defaultOptions,D=c.setOptions,G=g2.isTouchDevice,H=z.getRendererType,K=C.addEvent,u=C.extend,n=C.merge,w=C.pick,f=[],l;return{compose:function(d,b,h,c2){y.compose(d);l=h;-1===f.indexOf(b)&&(f.push(b),b.prototype.callbacks.push(m),K(b,"afterAddSeries",x),K(b,"afterSetChartSize",t),K(b,"afterUpdate",r),K(b,"beforeRender",a),K(b,"beforeShowResetZoom",q),K(b,"update",p));-1===f.indexOf(c2)&&(f.push(c2),K(c2,"afterUpdate",k));-1===f.indexOf(H)&&(f.push(H),u(H().prototype.symbols,B));-1===f.indexOf(D)&&(f.push(D),u(e,{navigator:A}))}}}));I(g,"Core/Axis/ScrollbarAxis.js",[g["Core/Utilities.js"]],(function(c){var g2=c.addEvent,y=c.defined,A=c.pick;return function(){function c2(){}c2.compose=function(z,C){if(-1===c2.composed.indexOf(z))c2.composed.push(z);else return z;var x=function(c3){var g3=A(c3.options&&c3.options.min,c3.min),a=A(c3.options&&c3.options.max,c3.max);return{axisMin:g3,axisMax:a,scrollMin:y(c3.dataMin)?Math.min(g3,c3.min,c3.dataMin,A(c3.threshold,Infinity)):g3,scrollMax:y(c3.dataMax)?Math.max(a,c3.max,c3.dataMax,A(c3.threshold,-Infinity)):a}};g2(z,"afterInit",(function(){var c3=this;c3.options&&c3.options.scrollbar&&c3.options.scrollbar.enabled&&(c3.options.scrollbar.vertical=!c3.horiz,c3.options.startOnTick=c3.options.endOnTick=false,c3.scrollbar=new C(c3.chart.renderer,c3.options.scrollbar,c3.chart),g2(c3.scrollbar,"changed",(function(g3){var a=x(c3),q=a.axisMax,m=a.scrollMin,p=a.scrollMax-m;y(a.axisMin)&&y(q)&&(c3.horiz&&!c3.reversed||!c3.horiz&&c3.reversed?(a=m+p*this.to,m+=p*this.from):(a=m+p*(1-this.from),m+=p*(1-this.to)),this.shouldUpdateExtremes(g3.DOMType)?c3.setExtremes(m,a,true,"mousemove"!==g3.DOMType&&"touchmove"!==g3.DOMType,g3):this.setRange(this.from,this.to))})))}));g2(z,"afterRender",(function(){var c3=x(this),g3=c3.scrollMin,a=c3.scrollMax;c3=this.scrollbar;var q=this.axisTitleMargin+(this.titleOffset||0),m=this.chart.scrollbarsOffsets,p=this.options.margin||0;c3&&(this.horiz?(this.opposite||(m[1]+=q),c3.position(this.left,this.top+this.height+2+m[1]-(this.opposite?p:0),this.width,this.height),this.opposite||(m[1]+=p),q=1):(this.opposite&&(m[0]+=q),c3.position(c3.options.opposite?this.left+this.width+2+m[0]-(this.opposite?0:p):this.opposite?0:p,this.top,this.width,this.height),this.opposite&&(m[0]+=p),q=0),m[q]+=c3.size+c3.options.margin,isNaN(g3)||isNaN(a)||!y(this.min)||!y(this.max)||this.min===this.max?c3.setRange(0,1):(m=(this.min-g3)/(a-g3),g3=(this.max-g3)/(a-g3),this.horiz&&!this.reversed||!this.horiz&&this.reversed?c3.setRange(m,g3):c3.setRange(1-g3,1-m)))}));g2(z,"afterGetOffset",(function(){var c3=this.scrollbar&&!this.scrollbar.options.opposite;c3=this.horiz?2:c3?3:1;var g3=this.scrollbar;g3&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[c3]+=g3.size+g3.options.margin)}));return z};c2.composed=[];return c2}()}));I(g,"Stock/Scrollbar/ScrollbarDefaults.js",[g["Core/Globals.js"]],(function(c){return{height:c.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,opposite:true,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1}}));I(g,"Stock/Scrollbar/Scrollbar.js",[g["Core/Defaults.js"],g["Core/Globals.js"],g["Core/Axis/ScrollbarAxis.js"],g["Stock/Scrollbar/ScrollbarDefaults.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B){var z=c.defaultOptions,C=B.addEvent,x=B.correctFloat,t=B.defined,r=B.destroyObjectProperties,a=B.fireEvent,q=B.merge,m=B.pick,p=B.removeEvent;c=function(){function c2(a2,c3,k){this._events=[];this.chart=void 0;this.from=this.chartY=this.chartX=0;this.scrollbar=this.renderer=this.options=this.group=void 0;this.scrollbarButtons=[];this.scrollbarGroup=void 0;this.scrollbarLeft=0;this.scrollbarRifles=void 0;this.scrollbarStrokeWidth=1;this.to=this.size=this.scrollbarTop=0;this.track=void 0;this.trackBorderWidth=1;this.userOptions=void 0;this.y=this.x=0;this.init(a2,c3,k)}c2.compose=function(a2){y.compose(a2,c2)};c2.swapXY=function(a2,c3){c3&&a2.forEach((function(a3){for(var c4=a3.length,e,k=0;kthis.calculatedWidth?c3.minWidth:0;return{chartX:(a2.chartX-this.x-this.xOffset)/(this.barWidth-c3),chartY:(a2.chartY-this.y-this.yOffset)/(this.barWidth-c3)}};c2.prototype.destroy=function(){var a2=this,c3=a2.chart.scroller;a2.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach((function(c4){a2[c4]&&a2[c4].destroy&&(a2[c4]=a2[c4].destroy())}));c3&&a2===c3.scrollbar&&(c3.scrollbar=null,r(c3.scrollbarButtons))};c2.prototype.drawScrollbarButton=function(a2){var e=this.renderer,k=this.scrollbarButtons,g3=this.options,m2=this.size,p2=e.g().add(this.group);k.push(p2);p2=e.rect().addClass("highcharts-scrollbar-button").add(p2);this.chart.styledMode||p2.attr({stroke:g3.buttonBorderColor,"stroke-width":g3.buttonBorderWidth,fill:g3.buttonBackgroundColor});p2.attr(p2.crisp({x:-.5,y:-.5,width:m2+1,height:m2+1,r:g3.buttonBorderRadius},p2.strokeWidth()));p2=e.path(c2.swapXY([["M",m2/2+(a2?-1:1),m2/2-3],["L",m2/2+(a2?-1:1),m2/2+3],["L",m2/2+(a2?2:-2),m2/2]],g3.vertical)).addClass("highcharts-scrollbar-arrow").add(k[a2]);this.chart.styledMode||p2.attr({fill:g3.buttonArrowColor})};c2.prototype.init=function(a2,c3,k){this.scrollbarButtons=[];this.renderer=a2;this.userOptions=c3;this.options=q(A,z.scrollbar,c3);this.chart=k;this.size=m(this.options.size,this.options.height);c3.enabled&&(this.render(),this.addEvents())};c2.prototype.mouseDownHandler=function(a2){a2=this.chart.pointer.normalize(a2);a2=this.cursorToScrollbarPosition(a2);this.chartX=a2.chartX;this.chartY=a2.chartY;this.initPositions=[this.from,this.to];this.grabbedCenter=true};c2.prototype.mouseMoveHandler=function(c3){var e=this.chart.pointer.normalize(c3),k=this.options.vertical?"chartY":"chartX",g3=this.initPositions||[];!this.grabbedCenter||c3.touches&&0===c3.touches[0][k]||(e=this.cursorToScrollbarPosition(e)[k],k=this[k],k=e-k,this.hasDragged=true,this.updatePosition(g3[0]+k,g3[1]+k),this.hasDragged&&a(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:c3.type,DOMEvent:c3}))};c2.prototype.mouseUpHandler=function(c3){this.hasDragged&&a(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:c3.type,DOMEvent:c3});this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null};c2.prototype.position=function(a2,c3,k,g3){var e=this.options.vertical,m2=this.rendered?"animate":"attr",n=g3,p2=0;this.group.show();this.x=a2;this.y=c3+this.trackBorderWidth;this.width=k;this.height=g3;this.xOffset=n;this.yOffset=p2;e?(this.width=this.yOffset=k=p2=this.size,this.xOffset=n=0,this.barWidth=g3-2*k,this.x=a2+=this.options.margin):(this.height=this.xOffset=g3=n=this.size,this.barWidth=k-2*g3,this.y+=this.options.margin);this.group[m2]({translateX:a2,translateY:this.y});this.track[m2]({width:k,height:g3});this.scrollbarButtons[1][m2]({translateX:e?0:k-n,translateY:e?g3-p2:0})};c2.prototype.removeEvents=function(){this._events.forEach((function(a2){p.apply(null,a2)}));this._events.length=0};c2.prototype.render=function(){var a2=this.renderer,k=this.options,g3=this.size,m2=this.chart.styledMode,p2=a2.g("scrollbar").attr({zIndex:k.zIndex}).hide().add();this.group=p2;this.track=a2.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:k.trackBorderRadius||0,height:g3,width:g3}).add(p2);m2||this.track.attr({fill:k.trackBackgroundColor,stroke:k.trackBorderColor,"stroke-width":k.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a2.g().add(p2);this.scrollbar=a2.rect().addClass("highcharts-scrollbar-thumb").attr({height:g3,width:g3,r:k.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a2.path(c2.swapXY([["M",-3,g3/4],["L",-3,2*g3/3],["M",0,g3/4],["L",0,2*g3/3],["M",3,g3/4],["L",3,2*g3/3]],k.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);m2||(this.scrollbar.attr({fill:k.barBackgroundColor,stroke:k.barBorderColor,"stroke-width":k.barBorderWidth}),this.scrollbarRifles.attr({stroke:k.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)};c2.prototype.setRange=function(a2,c3){var e=this.options,k=e.vertical,g3=e.minWidth,m2=this.barWidth,n=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(t(m2)){var p2=m2*Math.min(c3,1);a2=Math.max(a2,0);var f=Math.ceil(m2*a2);this.calculatedWidth=p2=x(p2-f);p2=p2?this.scrollbarRifles.hide():this.scrollbarRifles.show();false===e.showFull&&(0>=a2&&1<=c3?this.group.hide():this.group.show());this.rendered=true}};c2.prototype.shouldUpdateExtremes=function(a2){return m(this.options.liveRedraw,g2.svg&&!g2.isTouchDevice&&!this.chart.boosted)||"mouseup"===a2||"touchend"===a2||!t(a2)};c2.prototype.trackClick=function(c3){var e=this.chart.pointer.normalize(c3),k=this.to-this.from,g3=this.y+this.scrollbarTop,m2=this.x+this.scrollbarLeft;this.options.vertical&&e.chartY>g3||!this.options.vertical&&e.chartX>m2?this.updatePosition(this.from+k,this.to+k):this.updatePosition(this.from-k,this.to-k);a(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:c3})};c2.prototype.update=function(a2){this.destroy();this.init(this.chart.renderer,q(true,this.options,a2),this.chart)};c2.prototype.updatePosition=function(a2,c3){1a2&&(c3=x(c3-a2),a2=0);this.from=a2;this.to=c3};c2.defaultOptions=A;return c2}();z.scrollbar=q(true,c.defaultOptions,z.scrollbar);return c}));I(g,"Stock/Navigator/Navigator.js",[g["Core/Axis/Axis.js"],g["Core/Defaults.js"],g["Core/Globals.js"],g["Core/Axis/NavigatorAxisComposition.js"],g["Stock/Navigator/NavigatorComposition.js"],g["Stock/Scrollbar/Scrollbar.js"],g["Core/Utilities.js"]],(function(c,g2,y,A,B,z,C){function x(a2){for(var b=[],d=1;dr2&&(this.grabbedLeft?d2=e2.toPixels(a2-r2-f2,true):this.grabbedRight&&(c2=e2.toPixels(b+r2+f2,true)));this.zoomedMax=m(Math.max(d2,c2),0,x2);this.zoomedMin=m(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(d2,c2),0,x2);this.range=this.zoomedMax-this.zoomedMin;x2=Math.round(this.zoomedMax);d2=Math.round(this.zoomedMin);g3&&(this.navigatorGroup.attr({visibility:"inherit"}),n2=n2&&!this.hasDragged?"animate":"attr",this.drawMasks(d2,x2,v,n2),this.drawOutline(d2,x2,v,n2),this.navigatorOptions.handles.enabled&&(this.drawHandle(d2,0,v,n2),this.drawHandle(x2,1,v,n2)));this.scrollbar&&(v?(v=this.top-t2,l2=this.left-t2+(g3||!l2.opposite?0:(l2.titleOffset||0)+l2.axisTitleMargin),t2=E+2*t2):(v=this.top+(g3?this.height:-t2),l2=this.left-t2),this.scrollbar.position(l2,v,h,t2),this.scrollbar.setRange(this.zoomedMin/(E||1),this.zoomedMax/(E||1)));this.rendered=true}};d.prototype.addMouseEvents=function(){var b=this,a2=b.chart,d2=a2.container,c2=[],e2,f2;b.mouseMoveHandler=e2=function(a3){b.onMouseMove(a3)};b.mouseUpHandler=f2=function(a3){b.onMouseUp(a3)};c2=b.getPartsEvents("mousedown");c2.push(q(a2.renderTo,"mousemove",e2),q(d2.ownerDocument,"mouseup",f2));r&&(c2.push(q(a2.renderTo,"touchmove",e2),q(d2.ownerDocument,"touchend",f2)),c2.concat(b.getPartsEvents("touchstart")));b.eventsToUnbind=c2;b.series&&b.series[0]&&c2.push(q(b.series[0].xAxis,"foundExtremes",(function(){a2.navigator.modifyNavigatorAxisExtremes()})))};d.prototype.getPartsEvents=function(b){var a2=this,d2=[];["shades","handles"].forEach((function(c2){a2[c2].forEach((function(h,e2){d2.push(q(h.element,b,(function(b2){a2[c2+"Mousedown"](b2,e2)})))}))}));return d2};d.prototype.shadesMousedown=function(b,a2){b=this.chart.pointer.normalize(b);var d2=this.chart,c2=this.xAxis,h=this.zoomedMin,e2=this.size,f2=this.range,l2=this.left,g3=b.chartX;d2.inverted&&(g3=b.chartY,l2=this.top);if(1===a2)this.grabbedCenter=g3,this.fixedWidth=f2,this.dragOffset=g3-h;else{b=g3-l2-f2/2;if(0===a2)b=Math.max(0,b);else if(2===a2&&b+f2>=e2)if(b=e2-f2,this.reversedExtremes){b-=f2;var n2=this.getUnionExtremes().dataMin}else var m2=this.getUnionExtremes().dataMax;b!==h&&(this.fixedWidth=f2,a2=c2.navigatorAxis.toFixedRange(b,b+f2,n2,m2),k(a2.min)&&d2.xAxis[0].setExtremes(Math.min(a2.min,a2.max),Math.max(a2.min,a2.max),true,null,{trigger:"navigator"}))}};d.prototype.handlesMousedown=function(b,a2){this.chart.pointer.normalize(b);b=this.chart;var d2=b.xAxis[0],c2=this.reversedExtremes;0===a2?(this.grabbedLeft=true,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=c2?d2.min:d2.max):(this.grabbedRight=true,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=c2?d2.max:d2.min);b.fixedRange=null};d.prototype.onMouseMove=function(b){var d2=this,c2=d2.chart,e2=d2.navigatorSize,f2=d2.range,l2=d2.dragOffset,k2=c2.inverted,g3=d2.left;b.touches&&0===b.touches[0].pageX||(b=c2.pointer.normalize(b),c2=b.chartX,k2&&(g3=d2.top,c2=b.chartY),d2.grabbedLeft?(d2.hasDragged=true,d2.render(0,0,c2-g3,d2.otherHandlePos)):d2.grabbedRight?(d2.hasDragged=true,d2.render(0,0,d2.otherHandlePos,c2-g3)):d2.grabbedCenter&&(d2.hasDragged=true,c2e2+l2-f2&&(c2=e2+l2-f2),d2.render(0,0,c2-l2,c2-l2+f2)),d2.hasDragged&&d2.scrollbar&&w(d2.scrollbar.options.liveRedraw,y.svg&&!a&&!this.chart.boosted)&&(b.DOMType=b.type,setTimeout((function(){d2.onMouseUp(b)}),0)))};d.prototype.onMouseUp=function(b){var a2=this.chart,d2=this.xAxis,c2=this.scrollbar,e2=b.DOMEvent||b,f2=a2.inverted,l2=this.rendered&&!this.hasDragged?"animate":"attr";if(this.hasDragged&&(!c2||!c2.hasDragged)||"scrollbar"===b.trigger){c2=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var g3=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var n2=this.fixedExtreme;this.zoomedMax===this.size&&(n2=this.reversedExtremes?c2.dataMin:c2.dataMax);0===this.zoomedMin&&(g3=this.reversedExtremes?c2.dataMax:c2.dataMin);d2=d2.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,g3,n2);k(d2.min)&&a2.xAxis[0].setExtremes(Math.min(d2.min,d2.max),Math.max(d2.min,d2.max),true,this.hasDragged?false:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:e2})}"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null);this.navigatorEnabled&&u(this.zoomedMin)&&u(this.zoomedMax)&&(a2=Math.round(this.zoomedMin),b=Math.round(this.zoomedMax),this.shades&&this.drawMasks(a2,b,f2,l2),this.outline&&this.drawOutline(a2,b,f2,l2),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(a2,0,f2,l2),this.drawHandle(b,1,f2,l2)))};d.prototype.removeEvents=function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach((function(b){b()})),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()};d.prototype.removeBaseSeriesEvents=function(){var b=this.baseSeries||[];this.navigatorEnabled&&b[0]&&(false!==this.navigatorOptions.adaptToUpdatedData&&b.forEach((function(b2){f(b2,"updatedData",this.updatedDataHandler)}),this),b[0].xAxis&&f(b[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))};d.prototype.init=function(b){var a2=b.options,d2=a2.navigator||{},e2=d2.enabled,f2=a2.scrollbar||{},l2=f2.enabled;a2=e2&&d2.height||0;var k2=l2&&f2.height||0;this.handles=[];this.shades=[];this.chart=b;this.setBaseSeries();this.height=a2;this.scrollbarHeight=k2;this.scrollbarEnabled=l2;this.navigatorEnabled=e2;this.navigatorOptions=d2;this.scrollbarOptions=f2;this.outlineHeight=a2+k2;this.opposite=w(d2.opposite,!(e2||!b.inverted));var g3=this;e2=g3.baseSeries;f2=b.xAxis.length;l2=b.yAxis.length;var m2=e2&&e2[0]&&e2[0].xAxis||b.xAxis[0]||{options:{}};b.isDirtyBox=true;g3.navigatorEnabled?(g3.xAxis=new c(b,n({breaks:m2.options.breaks,ordinal:m2.options.ordinal},d2.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:true,type:"datetime",index:f2,isInternal:true,offset:0,keepOrdinalPadding:true,startOnTick:false,endOnTick:false,minPadding:0,maxPadding:0,zoomEnabled:false},b.inverted?{offsets:[k2,0,-k2,0],width:a2}:{offsets:[0,-k2,0,k2],height:a2})),g3.yAxis=new c(b,n(d2.yAxis,{id:"navigator-y-axis",alignTicks:false,offset:0,index:l2,isInternal:true,reversed:w(d2.yAxis&&d2.yAxis.reversed,b.yAxis[0]&&b.yAxis[0].reversed,false),zoomEnabled:false},b.inverted?{width:a2}:{height:a2})),e2||d2.series.data?g3.updateNavigatorSeries(false):0===b.series.length&&(g3.unbindRedraw=q(b,"beforeRedraw",(function(){0e2.indexOf(a3)?(a3&&(f(a3,"updatedData",d2.updatedDataHandler),delete a3.navigatorSeries),b2.chart&&b2.destroy(),false):true})),g3,m2,p2=d2.navigatorOptions.series,q2;e2&&e2.length&&e2.forEach((function(b2){var f2=b2.navigatorSeries,v=G({color:b2.color,visible:b2.visible},K(p2)?t.navigator.series:p2);f2&&false===d2.navigatorOptions.adaptToUpdatedData||(h.name="Navigator "+e2.length,g3=b2.options||{},q2=g3.navigatorOptions||{},v.dataLabels=l(v.dataLabels),m2=n(g3,h,v,q2),m2.pointRange=w(v.pointRange,q2.pointRange,t.plotOptions[m2.type||"line"].pointRange),v=q2.data||v.data,d2.hasNavigatorData=d2.hasNavigatorData||!!v,m2.data=v||g3.data&&g3.data.slice(0),f2&&f2.options?f2.update(m2,a2):(b2.navigatorSeries=c2.initSeries(m2),b2.navigatorSeries.baseSeries=b2,k2.push(b2.navigatorSeries)))}));if(p2.data&&(!e2||!e2.length)||K(p2))d2.hasNavigatorData=false,p2=l(p2),p2.forEach((function(b2,a3){h.name="Navigator "+(k2.length+1);m2=n(t.navigator.series,{color:c2.series[a3]&&!c2.series[a3].options.isInternal&&c2.series[a3].color||c2.options.colors[a3]||c2.options.colors[0]},h,b2);m2.data=b2.data;m2.data&&(d2.hasNavigatorData=true,k2.push(c2.initSeries(m2)))}));b&&this.addBaseSeriesEvents()};d.prototype.addBaseSeriesEvents=function(){var b=this,a2=this,d2=a2.baseSeries||[];d2[0]&&d2[0].xAxis&&d2[0].eventsToUnbind.push(q(d2[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes));d2.forEach((function(d3){d3.eventsToUnbind.push(q(d3,"show",(function(){this.navigatorSeries&&this.navigatorSeries.setVisible(true,false)})));d3.eventsToUnbind.push(q(d3,"hide",(function(){this.navigatorSeries&&this.navigatorSeries.setVisible(false,false)})));false!==b.navigatorOptions.adaptToUpdatedData&&d3.xAxis&&d3.eventsToUnbind.push(q(d3,"updatedData",b.updatedDataHandler));d3.eventsToUnbind.push(q(d3,"remove",(function(){this.navigatorSeries&&(D(a2.series,this.navigatorSeries),k(this.navigatorSeries.options)&&this.navigatorSeries.remove(false),delete this.navigatorSeries)})))}))};d.prototype.getBaseSeriesMin=function(b){return this.baseSeries.reduce((function(b2,a2){return Math.min(b2,a2.xData&&a2.xData.length?a2.xData[0]:b2)}),b)};d.prototype.modifyNavigatorAxisExtremes=function(){var b=this.xAxis;if("undefined"!==typeof b.getExtremes){var a2=this.getUnionExtremes(true);!a2||a2.dataMin===b.min&&a2.dataMax===b.max||(b.min=a2.dataMin,b.max=a2.dataMax)}};d.prototype.modifyBaseAxisExtremes=function(){var b=this.chart.navigator,a2=this.getExtremes(),d2=a2.dataMin,c2=a2.dataMax;a2=a2.max-a2.min;var e2=b.stickToMin,f2=b.stickToMax,l2=w(this.options.overscroll,0),k2=b.series&&b.series[0],g3=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(e2){var n2=d2;var m2=n2+a2}f2&&(m2=c2+l2,e2||(n2=Math.max(d2,m2-a2,b.getBaseSeriesMin(k2&&k2.xData?k2.xData[0]:-Number.MAX_VALUE))));g3&&(e2||f2)&&u(n2)&&(this.min=this.userMin=n2,this.max=this.userMax=m2)}b.stickToMin=b.stickToMax=null};d.prototype.updatedDataHandler=function(){var b=this.chart.navigator,a2=this.navigatorSeries;b.stickToMax=w(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,b.reversedExtremes?0===Math.round(b.zoomedMin):Math.round(b.zoomedMax)>=Math.round(b.size));b.stickToMin=b.shouldStickToMin(this,b);a2&&!b.hasNavigatorData&&(a2.options.pointStart=this.xData[0],a2.setData(this.options.data,false,null,false))};d.prototype.shouldStickToMin=function(b,a2){a2=a2.getBaseSeriesMin(b.xData[0]);var d2=b.xAxis;b=d2.max;var c2=d2.min;d2=d2.options.range;return u(b)&&u(c2)?d2&&0n2-g3,D2=l=864e5*{month:28,year:365}[k3]*v-x2&&e2-36e5<=864e5*{month:31,year:366}[k3]*v+x2?l=true:"ytd"===k3?(l=p2-m2+x2===e2,y2=!F):"all"===k3&&(l=c2.max-c2.min>=n2-g3,C2=!F&&r2&&l);k3=!w2&&(E||D2||C2||f2);v=F&&l||l&&!r2&&!y2||F&&a2.frozenStates;k3?d2=3:v&&(r2=true,d2=2);t2.state!==d2&&(t2.setState(d2),b&&(b.options[h+1].disabled=k3,2===d2&&(b.selectedIndex=h+1)),0===d2&&q2===h&&a2.setSelected())}))};f.prototype.computeButtonRange=function(a2){var d=a2.type,b=a2.count||1,c2={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};if(c2[d])a2._range=c2[d]*b;else if("month"===d||"year"===d)a2._range=864e5*{month:30,year:365}[d]*b;a2._offsetMin=u(a2.offsetMin,0);a2._offsetMax=u(a2.offsetMax,0);a2._range+=a2._offsetMax-a2._offsetMin};f.prototype.getInputValue=function(a2){a2="min"===a2?this.minInput:this.maxInput;var d=this.chart.options.rangeSelector,b=this.chart.time;return a2?("text"===a2.type&&d.inputDateParser||this.defaultInputDateParser)(a2.value,b.useUTC,b):0};f.prototype.setInputValue=function(a2,d){var b=this.options,c2=this.chart.time,e2="min"===a2?this.minInput:this.maxInput;a2="min"===a2?this.minDateBox:this.maxDateBox;if(e2){var f2=e2.getAttribute("data-hc-time");f2=q(f2)?Number(f2):void 0;q(d)&&(q(f2)&&e2.setAttribute("data-hc-time-previous",f2),e2.setAttribute("data-hc-time",d),f2=d);e2.value=c2.dateFormat(this.inputTypeFormats[e2.type]||b.inputEditDateFormat,f2);a2&&a2.attr({text:c2.dateFormat(b.inputDateFormat,f2)})}};f.prototype.setInputExtremes=function(a2,d,b){if(a2="min"===a2?this.minInput:this.maxInput){var c2=this.inputTypeFormats[a2.type],e2=this.chart.time;c2&&(d=e2.dateFormat(c2,d),a2.min!==d&&(a2.min=d),b=e2.dateFormat(c2,b),a2.max!==b&&(a2.max=b))}};f.prototype.showInput=function(c2){var d="min"===c2?this.minDateBox:this.maxDateBox;if((c2="min"===c2?this.minInput:this.maxInput)&&d&&this.inputGroup){var b="text"===c2.type,e2=this.inputGroup,f2=e2.translateX;e2=e2.translateY;var l=this.options.inputBoxWidth;a(c2,{width:b?d.width+(l?-2:20)+"px":"auto",height:b?d.height-2+"px":"auto",border:"2px solid silver"});b&&l?a(c2,{left:f2+d.x+"px",top:e2+"px"}):a(c2,{left:Math.min(Math.round(d.x+f2-(c2.offsetWidth-d.width)/2),this.chart.chartWidth-c2.offsetWidth)+"px",top:e2-(c2.offsetHeight-d.height)/2+"px"})}};f.prototype.hideInput=function(c2){(c2="min"===c2?this.minInput:this.maxInput)&&a(c2,{top:"-9999em",border:0,width:"1px",height:"1px"})};f.prototype.defaultInputDateParser=function(a2,d,b){var c2=a2.split("/").join("-").split(" ").join("T");-1===c2.indexOf("T")&&(c2+="T00:00");if(d)c2+="Z";else{var e2;if(e2=y.isSafari)e2=c2,e2=!(6=e2?"+".concat(K(-e2),":00"):"-".concat(K(e2),":00"))}c2=Date.parse(c2);D(c2)||(a2=a2.split("-"),c2=Date.UTC(n(a2[0]),n(a2[1])-1,n(a2[2])));b&&d&&D(c2)&&(c2+=b.getTimezoneOffset(c2));return c2};f.prototype.drawInput=function(c2){function d(){var a2=l.maxInput,d2=l.minInput,e3=b.xAxis[0],f3=b.scroller&&b.scroller.xAxis?b.scroller.xAxis:e3,h=f3.dataMin;f3=f3.dataMax;var k2=l.getInputValue(c2);k2!==Number(w2.getAttribute("data-hc-time-previous"))&&D(k2)&&(w2.setAttribute("data-hc-time-previous",k2),p2&&a2&&D(h)?k2>Number(a2.getAttribute("data-hc-time"))?k2=void 0:k2f3&&(k2=f3)),"undefined"!==typeof k2&&e3.setExtremes(p2?k2:e3.min,p2?e3.max:k2,void 0,void 0,{trigger:"rangeSelectorInput"}))}var b=this.chart,e2=this.div,f2=this.inputGroup,l=this,g3=b.renderer.style||{},n2=b.renderer,m2=b.options.rangeSelector,p2="min"===c2,q2=x.lang[p2?"rangeSelectorFrom":"rangeSelectorTo"]||"";q2=n2.label(q2,0).addClass("highcharts-range-label").attr({padding:q2?2:0,height:q2?m2.inputBoxHeight:0}).add(f2);n2=n2.label("",0).addClass("highcharts-range-input").attr({padding:2,width:m2.inputBoxWidth,height:m2.inputBoxHeight,"text-align":"center"}).on("click",(function(){l.showInput(c2);l[c2+"Input"].focus()}));b.styledMode||n2.attr({stroke:m2.inputBoxBorderColor,"stroke-width":1});n2.add(f2);var w2=r("input",{name:c2,className:"highcharts-range-selector"},void 0,e2);w2.setAttribute("type",C(m2.inputDateFormat||"%b %e, %Y"));b.styledMode||(q2.css(G(g3,m2.labelStyle)),n2.css(G({color:"#333333"},g3,m2.inputStyle)),a(w2,k({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:g3.fontSize,fontFamily:g3.fontFamily,top:"-9999em"},m2.inputStyle)));w2.onfocus=function(){l.showInput(c2)};w2.onblur=function(){w2===y.doc.activeElement&&d();l.hideInput(c2);l.setInputValue(c2);w2.blur()};var u2=false;w2.onchange=function(){u2||(d(),l.hideInput(c2),w2.blur())};w2.onkeypress=function(b2){13===b2.keyCode&&d()};w2.onkeydown=function(b2){u2=true;38!==b2.keyCode&&40!==b2.keyCode||d()};w2.onkeyup=function(){u2=false};return{dateBox:n2,input:w2,label:q2}};f.prototype.getPosition=function(){var a2=this.chart,d=a2.options.rangeSelector;a2="top"===d.verticalAlign?a2.plotTop-a2.axisOffset[0]:0;return{buttonTop:a2+d.buttonPosition.y,inputTop:a2+d.inputPosition.y-10}};f.prototype.getYTDExtremes=function(a2,d,b){var c2=this.chart.time,e2=new c2.Date(a2),f2=c2.get("FullYear",e2);b=b?c2.Date.UTC(f2,0,1):+new c2.Date(f2,0,1);d=Math.max(d,b);e2=e2.getTime();return{max:Math.min(a2||e2,e2),min:d}};f.prototype.render=function(a2,d){var b=this.chart,c2=b.renderer,e2=b.container,f2=b.options,l=f2.rangeSelector,k2=u(f2.chart.style&&f2.chart.style.zIndex,0)+1;f2=l.inputEnabled;if(false!==l.enabled){this.rendered||(this.group=c2.g("range-selector-group").attr({zIndex:7}).add(),this.div=r("div",void 0,{position:"relative",height:0,zIndex:k2}),this.buttonOptions.length&&this.renderButtons(),e2.parentNode&&e2.parentNode.insertBefore(this.div,e2),f2&&(this.inputGroup=c2.g("input-group").add(this.group),c2=this.drawInput("min"),this.minDateBox=c2.dateBox,this.minLabel=c2.label,this.minInput=c2.input,c2=this.drawInput("max"),this.maxDateBox=c2.dateBox,this.maxLabel=c2.label,this.maxInput=c2.input));if(f2&&(this.setInputValue("min",a2),this.setInputValue("max",d),a2=b.scroller&&b.scroller.getUnionExtremes()||b.xAxis[0]||{},q(a2.dataMin)&&q(a2.dataMax)&&(b=b.xAxis[0].minRange||0,this.setInputExtremes("min",a2.dataMin,Math.min(a2.dataMax,this.getInputValue("max"))-b),this.setInputExtremes("max",Math.max(a2.dataMin,this.getInputValue("min"))+b,a2.dataMax)),this.inputGroup)){var g3=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach((function(b2){if(b2){var a3=b2.getBBox().width;a3&&(b2.attr({x:g3}),g3+=a3+l.inputSpacing)}}))}this.alignElements();this.rendered=true}};f.prototype.renderButtons=function(){var a2=this,d=this.buttons,b=this.options,c2=x.lang,f2=this.chart.renderer,k2=G(b.buttonTheme),g3=k2&&k2.states,n2=k2.width||28;delete k2.width;delete k2.states;this.buttonGroup=f2.g("range-selector-buttons").add(this.group);var m2=this.dropdown=r("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:1e-4},this.div);t(m2,"touchstart",(function(){m2.style.fontSize="16px"}));[[y.isMS?"mouseover":"mouseenter"],[y.isMS?"mouseout":"mouseleave"],["change","click"]].forEach((function(b2){var c3=b2[0],f3=b2[1];t(m2,c3,(function(){var b3=d[a2.currentButtonIndex()];b3&&e(b3.element,f3||c3)}))}));this.zoomText=f2.label(c2&&c2.rangeSelectorZoom||"",0).attr({padding:b.buttonTheme.padding,height:b.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup);this.chart.styledMode||(this.zoomText.css(b.labelStyle),k2["stroke-width"]=u(k2["stroke-width"],0));r("option",{textContent:this.zoomText.textStr,disabled:true},void 0,m2);this.buttonOptions.forEach((function(b2,c3){r("option",{textContent:b2.title||b2.text},void 0,m2);d[c3]=f2.button(b2.text,0,0,(function(d2){var e2=b2.events&&b2.events.click,f3;e2&&(f3=e2.call(b2,d2));false!==f3&&a2.clickButton(c3);a2.isActive=true}),k2,g3&&g3.hover,g3&&g3.select,g3&&g3.disabled).attr({"text-align":"center",width:n2}).add(a2.buttonGroup);b2.title&&d[c3].attr("title",b2.title)}))};f.prototype.alignElements=function(){var a2=this,d=this.buttonGroup,b=this.buttons,c2=this.chart,e2=this.group,f2=this.inputGroup,k2=this.options,g3=this.zoomText,n2=c2.options,m2=n2.exporting&&false!==n2.exporting.enabled&&n2.navigation&&n2.navigation.buttonOptions;n2=k2.buttonPosition;var p2=k2.inputPosition,q2=k2.verticalAlign,w2=function(b2,d2){return m2&&a2.titleCollision(c2)&&"top"===q2&&"right"===d2.align&&d2.y-b2.getBBox().height-12<(m2.y||0)+(m2.height||0)+c2.spacing[0]?-40:0},r2=c2.plotLeft;if(e2&&n2&&p2){var t2=n2.x-c2.spacing[3];if(d){this.positionButtons();if(!this.initialButtonGroupWidth){var x2=0;g3&&(x2+=g3.getBBox().width+5);b.forEach((function(a3,d2){x2+=a3.width;d2!==b.length-1&&(x2+=k2.buttonSpacing)}));this.initialButtonGroupWidth=x2}r2-=c2.spacing[3];this.updateButtonStates();g3=w2(d,n2);this.alignButtonGroup(g3);e2.placed=d.placed=c2.hasLoaded}d=0;f2&&(d=w2(f2,p2),"left"===p2.align?t2=r2:"right"===p2.align&&(t2=-Math.max(c2.axisOffset[1],-d)),f2.align({y:p2.y,width:f2.getBBox().width,align:p2.align,x:p2.x+t2-2},true,c2.spacingBox),f2.placed=c2.hasLoaded);this.handleCollision(d);e2.align({verticalAlign:q2},true,c2.spacingBox);f2=e2.alignAttr.translateY;d=e2.getBBox().height+20;w2=0;"bottom"===q2&&(w2=(w2=c2.legend&&c2.legend.options)&&"bottom"===w2.verticalAlign&&w2.enabled&&!w2.floating?c2.legend.legendHeight+u(w2.margin,10):0,d=d+w2-20,w2=f2-d-(k2.floating?0:k2.y)-(c2.titleOffset?c2.titleOffset[2]:0)-10);if("top"===q2)k2.floating&&(w2=0),c2.titleOffset&&c2.titleOffset[0]&&(w2=c2.titleOffset[0]),w2+=c2.margin[0]-c2.spacing[0]||0;else if("middle"===q2){if(p2.y===n2.y)w2=f2;else if(p2.y||n2.y)w2=0>p2.y||0>n2.y?w2-Math.min(p2.y,n2.y):f2-d}e2.translate(k2.x,k2.y+Math.floor(w2));n2=this.minInput;p2=this.maxInput;f2=this.dropdown;k2.inputEnabled&&n2&&p2&&(n2.style.marginTop=e2.translateY+"px",p2.style.marginTop=e2.translateY+"px");f2&&(f2.style.marginTop=e2.translateY+"px")}};f.prototype.alignButtonGroup=function(a2,d){var b=this.chart,c2=this.buttonGroup,e2=this.options.buttonPosition,f2=b.plotLeft-b.spacing[3],l=e2.x-b.spacing[3];"right"===e2.align?l+=a2-f2:"center"===e2.align&&(l-=f2/2);c2&&c2.align({y:e2.y,width:u(d,this.initialButtonGroupWidth),align:e2.align,x:l},true,b.spacingBox)};f.prototype.positionButtons=function(){var a2=this.buttons,d=this.chart,b=this.options,c2=this.zoomText,e2=d.hasLoaded?"animate":"attr",f2=b.buttonPosition,k2=d=d.plotLeft;c2&&"hidden"!==c2.visibility&&(c2[e2]({x:u(d+f2.x,d)}),k2+=f2.x+c2.getBBox().width+5);c2=0;for(f2=this.buttonOptions.length;c2b2&&(b2=a3.width)}));return b2};var n2=function(b2){if(e2&&c2){var d2=e2.alignAttr.translateX+e2.alignOptions.x-a2+e2.getBBox().x+2,f3=e2.alignOptions.width,h=c2.alignAttr.translateX+c2.getBBox().x;return h+b2>d2&&d2+f3>h&&l.y=-a2?0:-a2),translateY:e2.alignAttr.translateY+c2.getBBox().height+10})};if(c2){if("always"===k2){this.collapseButtons(a2);n2(f2())&&m2();return}"never"===k2&&this.expandButtons()}e2&&c2?g3.align===l.align||n2(this.initialButtonGroupWidth+20)?"responsive"===k2?(this.collapseButtons(a2),n2(f2())&&m2()):m2():"responsive"===k2&&this.expandButtons():c2&&"responsive"===k2&&(this.initialButtonGroupWidth>b.plotWidth?this.collapseButtons(a2):this.expandButtons())};f.prototype.collapseButtons=function(a2){var d=this.buttons,b=this.buttonOptions,c2=this.chart,e2=this.dropdown,f2=this.options,l=this.zoomText,k2=c2.userOptions.rangeSelector&&c2.userOptions.rangeSelector.buttonTheme||{},g3=function(b2){return{text:b2?""+b2+" ▾":"▾",width:"auto",paddingLeft:u(f2.buttonTheme.paddingLeft,k2.padding,8),paddingRight:u(f2.buttonTheme.paddingRight,k2.padding,8)}};l&&l.hide();var n2=false;b.forEach((function(b2,a3){a3=d[a3];2!==a3.state?a3.hide():(a3.show(),a3.attr(g3(b2.text)),n2=true)}));n2||(e2&&(e2.selectedIndex=0),d[0].show(),d[0].attr(g3(this.zoomText&&this.zoomText.textStr)));b=f2.buttonPosition.align;this.positionButtons();"right"!==b&&"center"!==b||this.alignButtonGroup(a2,d[this.currentButtonIndex()].getBBox().width);this.showDropdown()};f.prototype.expandButtons=function(){var a2=this.buttons,d=this.buttonOptions,b=this.options,c2=this.zoomText;this.hideDropdown();c2&&c2.show();d.forEach((function(d2,c3){c3=a2[c3];c3.show();c3.attr({text:d2.text,width:b.buttonTheme.width||28,paddingLeft:u(b.buttonTheme.paddingLeft,"unset"),paddingRight:u(b.buttonTheme.paddingRight,"unset")});2>c3.state&&c3.setState(0)}));this.positionButtons()};f.prototype.currentButtonIndex=function(){var a2=this.dropdown;return a2&&0e2&&0>c2||0{point.x} - {point.x2}
',pointFormat:' {series.name}: {point.yCategory}
'},borderRadius:3,pointRange:0}}));I(g,"Series/XRange/XRangePoint.js",[g["Core/Series/SeriesRegistry.js"],g["Core/Utilities.js"]],(function(c,g2){var y=this&&this.__extends||function(){var c2=function(g3,y2){c2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c3,g4){c3.__proto__=g4}||function(c3,g4){for(var r in g4)g4.hasOwnProperty(r)&&(c3[r]=g4[r])};return c2(g3,y2)};return function(g3,y2){function x(){this.constructor=g3}c2(g3,y2);g3.prototype=null===y2?Object.create(y2):(x.prototype=y2.prototype,new x)}}(),A=c.series.prototype.pointClass.prototype;g2=g2.extend;c=function(c2){function g3(){var g4=null!==c2&&c2.apply(this,arguments)||this;g4.options=void 0;g4.series=void 0;return g4}y(g3,c2);g3.getColorByCategory=function(c3,g4){var t=c3.options.colors||c3.chart.options.colors;c3=g4.y%(t?t.length:c3.chart.options.chart.colorCount);return{colorIndex:c3,color:t&&t[c3]}};g3.prototype.resolveColor=function(){var c3=this.series;if(c3.options.colorByPoint&&!this.options.color){var x=g3.getColorByCategory(c3,this);c3.chart.styledMode||(this.color=x.color);this.options.colorIndex||(this.colorIndex=x.colorIndex)}else this.color||(this.color=c3.color)};g3.prototype.init=function(){A.init.apply(this,arguments);this.y||(this.y=0);return this};g3.prototype.setState=function(){A.setState.apply(this,arguments);this.series.drawPoint(this,this.series.getAnimationVerb())};g3.prototype.getLabelConfig=function(){var c3=A.getLabelConfig.call(this),g4=this.series.yAxis.categories;c3.x2=this.x2;c3.yCategory=this.yCategory=g4&&g4[this.y];return c3};g3.prototype.isValid=function(){return"number"===typeof this.x&&"number"===typeof this.x2};return g3}(c.seriesTypes.column.prototype.pointClass);g2(c.prototype,{ttBelow:false,tooltipDateKeys:["x","x2"]});return c}));I(g,"Series/XRange/XRangeSeries.js",[g["Core/Globals.js"],g["Core/Color/Color.js"],g["Core/Series/SeriesRegistry.js"],g["Core/Utilities.js"],g["Series/XRange/XRangeSeriesDefaults.js"],g["Series/XRange/XRangePoint.js"]],(function(c,g2,y,A,B,z){function C(){if(this.isXAxis){var a2=H(this.dataMax,-Number.MAX_VALUE);for(var c2=0,e2=this.series;c2a2){a2=d;var b=true}}}}b&&(this.dataMax=a2)}}var x=this&&this.__extends||function(){var a2=function(c2,e2){a2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a3,c3){a3.__proto__=c3}||function(a3,c3){for(var d in c3)c3.hasOwnProperty(d)&&(a3[d]=c3[d])};return a2(c2,e2)};return function(c2,e2){function f(){this.constructor=c2}a2(c2,e2);c2.prototype=null===e2?Object.create(e2):(f.prototype=e2.prototype,new f)}}();c=c.noop;var t=g2.parse,r=y.series.prototype,a=y.seriesTypes.column,q=A.addEvent,m=A.clamp,p=A.defined;g2=A.extend;var k=A.find,e=A.isNumber,D=A.isObject,G=A.merge,H=A.pick,K=[];A=function(c2){function g3(){var a2=null!==c2&&c2.apply(this,arguments)||this;a2.data=void 0;a2.options=void 0;a2.points=void 0;return a2}x(g3,c2);g3.compose=function(a2){-1===K.indexOf(a2)&&(K.push(a2),q(a2,"afterGetSeriesExtremes",C))};g3.prototype.init=function(){c2.prototype.init.apply(this,arguments);this.options.stacking=void 0};g3.prototype.getColumnMetrics=function(){var a2=this,e2=function(){for(var d=0,b=a2.chart.series;d=c3&&(b-=c3);return b};g3.prototype.alignDataLabel=function(a2){var e2=a2.plotX;a2.plotX=H(a2.dlBox&&a2.dlBox.centerX,a2.plotX);c2.prototype.alignDataLabel.apply(this,arguments);a2.plotX=e2};g3.prototype.translatePoint=function(a2){var c3=this.xAxis,l=this.yAxis,d=this.columnMetrics,b=this.options,h=b.minPointLength||0,k2=(a2.shapeArgs&&a2.shapeArgs.width||0)/2,g4=this.pointXOffset=d.offset,n=H(a2.x2,a2.x+(a2.len||0)),q2=a2.plotX,w=c3.translate(n,0,0,0,1);n=Math.abs(w-q2);var u=this.chart.inverted,r2=H(b.borderWidth,1)%2/2,t2=d.offset,x2=Math.round(d.width);h&&(h-=n,0>h&&(h=0),q2-=h/2,w+=h/2);q2=Math.max(q2,-10);w=m(w,-10,c3.len+10);p(a2.options.pointWidth)&&(t2-=(Math.ceil(a2.options.pointWidth)-x2)/2,x2=Math.ceil(a2.options.pointWidth));b.pointPlacement&&e(a2.plotY)&&l.categories&&(a2.plotY=l.translate(a2.y,0,1,0,1,b.pointPlacement));b=Math.floor(Math.min(q2,w))+r2;b={x:b,y:Math.floor(a2.plotY+t2)+r2,width:Math.floor(Math.max(q2,w))+r2-b,height:x2,r:this.options.borderRadius};a2.shapeArgs=b;u?a2.tooltipPos[1]+=g4+k2:a2.tooltipPos[0]-=k2+g4-b.width/2;k2=b.x;g4=k2+b.width;0>k2||g4>c3.len?(k2=m(k2,0,c3.len),g4=m(g4,0,c3.len),w=g4-k2,a2.dlBox=G(b,{x:k2,width:g4-k2,centerX:w?w/2:null})):a2.dlBox=null;k2=a2.tooltipPos;g4=u?1:0;w=u?0:1;d=this.columnMetrics?this.columnMetrics.offset:-d.width/2;k2[g4]=u?k2[g4]+b.width/2:k2[g4]+(c3.reversed?-1:0)*b.width;k2[w]=m(k2[w]+(u?-1:1)*d,0,l.len-1);if(l=a2.partialFill)D(l)&&(l=l.amount),e(l)||(l=0),a2.partShapeArgs=G(b,{r:this.options.borderRadius}),q2=Math.max(Math.round(n*l+a2.plotX-q2),0),a2.clipRectArgs={x:c3.reversed?b.x+n-q2:b.x,y:b.y,width:q2,height:b.height}};g3.prototype.translate=function(){c2.prototype.translate.apply(this,arguments);for(var a2=0,e2=this.points;a2c4.to||d>c4.from&&hc4.from&&hc4.from&&h>c4.to&&hf&&e2>=this.basePointRange&&(f=e2),d=void 0;l--;)d&&false!==d.visible||(d=a2[l+1]),e2=a2[l],false!==d.visible&&false!==e2.visible&&(d.x-e2.x>f&&(d=(e2.x+d.x)/2,a2.splice(l+1,0,{isNull:true,x:d}),k2.stacking&&this.options.stacking&&(d=k2.stacking.stacks[this.stackKey][d]=new c(k2,k2.options.stackLabels,false,d,this.stack),d.total=0)),d=e2);return this.getGraphPath(a2)}var H=[];g3.compose=function(c2,g4){-1===H.indexOf(c2)&&(H.push(c2),c2.keepProps.push("brokenAxis"),y(c2,"init",p),y(c2,"afterInit",a),y(c2,"afterSetTickPositions",m),y(c2,"afterSetOptions",q));if(-1===H.indexOf(g4)){H.push(g4);var n=g4.prototype;n.drawBreaks=r;n.gappedPath=t2;y(g4,"afterGeneratePoints",k);y(g4,"afterRender",e)}return c2};var K=function(){function a2(a3){this.hasBreaks=false;this.axis=a3}a2.isInBreak=function(a3,c2){var e2=a3.repeat||Infinity,k2=a3.from,d=a3.to-a3.from;c2=c2>=k2?(c2-k2)%e2:e2-(k2-c2)%e2;return a3.inclusive?c2<=d:c2=c2)break;else k2.to=c2)break;else if(a2.isInBreak(d,c2)){f-=c2-d.from;break}}return f};a2.prototype.findBreakAt=function(a3,c2){return A(c2,(function(c3){return c3.fromm2;)r2-=g4;for(;r2b2?this.hiddenLabels.push(h2.hide()):h2.show());(h2=this.ticks[a2].label)&&(a2-c2>b2?this.hiddenLabels.push(h2.hide()):h2.show());(d2=this.ticks[a2].mark)&&a2-c2f2&&!b2.startOnTick&&(d2[0]=f2),e2>h2&&e2-k2G?e2:G;m=m+1+k2.descendants;p=Math.max(k2.height+1,p);return k2}));r&&(r.start=A(r.start,D),r.end=A(r.end,G));g2(x,{children:e,descendants:m,height:p});"function"===typeof k&&k(x,q);return x};return{getListOfParents:B,getNode:z,getTree:function(c2,g3){var t=c2.map((function(c3){return c3.id}));c2=B(c2,t);return z("",null,1,null,c2,g3)}}}));I(g,"Core/Axis/TreeGrid/TreeGridTick.js",[g["Core/Utilities.js"]],(function(c){function g2(){this.treeGrid||(this.treeGrid=new q(this))}function y(a2,c2){a2=a2.treeGrid;var k=!a2.labelIcon,e=c2.renderer,g3=c2.xy,m=c2.options,p=m.width||0,q2=m.height||0,r2=g3.x-p/2-(m.padding||0);g3=g3.y-q2/2;var n=c2.collapsed?90:180,w=c2.show&&x(g3),f=a2.labelIcon;f||(a2.labelIcon=f=e.path(e.symbols[m.type](m.x||0,m.y||0,p,q2)).addClass("highcharts-label-icon").add(c2.group));f[w?"show":"hide"]();e.styledMode||f.attr({cursor:"pointer",fill:t(c2.color,"#666666"),"stroke-width":1,stroke:m.lineColor,strokeWidth:m.lineWidth||0});f[k?"attr":"animate"]({translateX:r2,translateY:g3,rotation:n})}function A(a2,c2,k,e,g3,q2,r2,y2,u){var m=t(this.options&&this.options.labels,q2);q2=this.pos;var p=this.axis,f="treegrid"===p.options.type;a2=a2.apply(this,[c2,k,e,g3,m,r2,y2,u]);f&&(c2=m&&C(m.symbol,true)?m.symbol:{},m=m&&x(m.indentation)?m.indentation:0,q2=(q2=(p=p.treeGrid.mapOfPosToGridNode)&&p[q2])&&q2.depth||1,a2.x+=(c2.width||0)+2*(c2.padding||0)+(q2-1)*m);return a2}function B(a2){var c2=this,k=c2.pos,e=c2.axis,g3=c2.label,m=e.treeGrid.mapOfPosToGridNode,q2=e.options,r2=t(c2.options&&c2.options.labels,q2&&q2.labels),u=r2&&C(r2.symbol,true)?r2.symbol:{},n=(m=m&&m[k])&&m.depth;q2="treegrid"===q2.type;var w=-1=b&&(a2-=.5);return{from:a2,to:d,showPoints:false}}function x(a2,b,c2){var d=[],e2=[],f2={},h="boolean"===typeof b?b:false,g3={},l2=-1;a2=y.getTree(a2,{after:function(b2){b2=g3[b2.pos];var a3=0,d2=0;b2.children.forEach((function(b3){d2+=(b3.descendants||0)+1;a3=Math.max((b3.height||0)+1,a3)}));b2.descendants=d2;b2.height=a3;b2.collapsed&&e2.push(b2)},before:function(b2){var a3=G(b2.data,true)?b2.data:{},c3=H(a3.name)?a3.name:"",e3=f2[b2.parent];e3=G(e3,true)?g3[e3.pos]:null;var m2=function(b3){return b3.name===c3},n2;h&&G(e3,true)&&(n2=k(e3.children,m2))?(m2=n2.pos,n2.nodes.push(b2)):m2=l2++;g3[m2]||(g3[m2]=n2={depth:e3?e3.depth+1:0,name:c3,id:a3.id,nodes:[b2],children:[],pos:m2},-1!==m2&&d.push(c3),G(e3,true)&&e3.children.push(n2));H(b2.id)&&(f2[b2.id]=b2);n2&&true===a3.collapsed&&(n2.collapsed=true);b2.pos=m2}});g3=function(b2,a3){var d2=function(b3,c3,e3){var f3=c3+(-1===c3?0:a3-1),h2=(f3-c3)/2,k2=c3+h2;b3.nodes.forEach((function(b4){var a4=b4.data;G(a4,true)&&(a4.y=c3+(a4.seriesIndex||0),delete a4.seriesIndex);b4.pos=k2}));e3[k2]=b3;b3.pos=k2;b3.tickmarkOffset=h2+.5;b3.collapseStart=f3+.5;b3.children.forEach((function(b4){d2(b4,f3+1,e3);f3=(b4.collapseEnd||0)-.5}));b3.collapseEnd=f3+.5;return e3};return d2(b2["-1"],-1,{})}(g3,c2);return{categories:d,mapOfIdToNode:f2,mapOfPosToGridNode:g3,collapsedNodes:e2,tree:a2}}function t(a2){a2.target.axes.filter((function(b){return"treegrid"===b.options.type})).forEach((function(b){var d=b.options||{},c2=d.labels,e2=d.uniqueNames;d=d.max;var f2=0;if(!b.treeGrid.mapOfPosToGridNode||b.series.some((function(b2){return!b2.hasRendered||b2.isDirtyData||b2.isDirty}))){var k2=b.series.reduce((function(b2,a3){a3.visible&&((a3.options.data||[]).forEach((function(d2){a3.options.keys&&a3.options.keys.length&&(d2=a3.pointClass.prototype.optionsToObject.call({series:a3},d2),a3.pointClass.setGanttPointAliases(d2));G(d2,true)&&(d2.seriesIndex=f2,b2.push(d2))})),true===e2&&f2++);return b2}),[]);if(d&&k2.length=a2&&e2<=d2)||b.brokenAxis&&b.brokenAxis.isInAnyBreak(e2)||c2.push(e2);return c2}),[])};d.prototype.isCollapsed=function(b){var a2=this.axis,d2=a2.options.breaks||[],c2=C(b,a2.max);return d2.some((function(b2){return b2.from===c2.from&&b2.to===c2.to}))};d.prototype.toggleCollapse=function(b){return this.isCollapsed(b)?this.expand(b):this.collapse(b)};return d}();return l}));I(g,"Extensions/CurrentDateIndication.js",[g["Core/Axis/Axis.js"],g["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],g["Core/Utilities.js"]],(function(c,g2,y){var A=y.addEvent,B=y.merge;y=y.wrap;var z={color:"#ccd6eb",width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:function(c2,g3){return this.axis.chart.time.dateFormat(g3||"",c2)},rotation:0,style:{fontSize:"10px"}}};A(c,"afterSetOptions",(function(){var c2=this.options,g3=c2.currentDateIndicator;g3&&(g3="object"===typeof g3?B(z,g3):B(z),g3.value=Date.now(),g3.className="highcharts-current-date-indicator",c2.plotLines||(c2.plotLines=[]),c2.plotLines.push(g3))}));A(g2,"render",(function(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})}));y(g2.prototype,"getLabelText",(function(c2,g3){var t=this.options;return t&&t.className&&-1!==t.className.indexOf("highcharts-current-date-indicator")&&t.label&&"function"===typeof t.label.formatter?(t.value=Date.now(),t.label.formatter.call(this,t.value,t.label.format)):c2.call(this,g3)}))}));I(g,"Extensions/StaticScale.js",[g["Core/Axis/Axis.js"],g["Core/Chart/Chart.js"],g["Core/Utilities.js"]],(function(c,g2,y){var A=y.addEvent,B=y.defined,z=y.isNumber,C=y.pick;A(c,"afterSetOptions",(function(){var c2=this.chart.options.chart;!this.horiz&&z(this.options.staticScale)&&(!c2.height||c2.scrollablePlotArea&&c2.scrollablePlotArea.minHeight)&&(this.staticScale=this.options.staticScale)}));g2.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach((function(c2){var g3=c2.chart,r=!!g3.initiatedScale&&g3.options.animation,a=c2.options.staticScale;if(c2.staticScale&&B(c2.min)){var q=C(c2.brokenAxis&&c2.brokenAxis.unitLength,c2.max+c2.tickInterval-c2.min)*a;q=Math.max(q,a);a=q-g3.plotHeight;!g3.scrollablePixelsY&&1<=Math.abs(a)&&(g3.plotHeight=q,g3.redrawTrigger="adjustHeight",g3.setSize(void 0,g3.chartHeight+a,r));c2.series.forEach((function(a2){(a2=a2.sharedClipKey&&g3.sharedClips[a2.sharedClipKey])&&a2.attr(g3.inverted?{width:g3.plotHeight}:{height:g3.plotHeight})}))}})),this.initiatedScale=true);this.redrawTrigger=null};A(g2,"render",g2.prototype.adjustHeight)}));I(g,"Extensions/ArrowSymbols.js",[g["Core/Renderer/SVG/SVGRenderer.js"]],(function(c){function g2(c2,g3,y2,x){return[["M",c2,g3+x/2],["L",c2+y2,g3],["L",c2,g3+x/2],["L",c2+y2,g3+x]]}function y(c2,g3,y2,x){return[["M",c2+y2,g3],["L",c2,g3+x/2],["L",c2+y2,g3+x],["Z"]]}function A(c2,g3,A2,x){return y(c2,g3,A2/2,x)}c=c.prototype.symbols;c.arrow=g2;c["arrow-filled"]=y;c["arrow-filled-half"]=A;c["arrow-half"]=function(c2,y2,A2,x){return g2(c2,y2,A2/2,x)};c["triangle-left"]=y;c["triangle-left-half"]=A;return c}));I(g,"Gantt/Connection.js",[g["Core/Defaults.js"],g["Core/Globals.js"],g["Core/Series/Point.js"],g["Core/Utilities.js"]],(function(c,g2,y,A){function B(a2){var c2=a2.shapeArgs;return c2?{xMin:c2.x||0,xMax:(c2.x||0)+(c2.width||0),yMin:c2.y||0,yMax:(c2.y||0)+(c2.height||0)}:(c2=a2.graphic&&a2.graphic.getBBox())?{xMin:a2.plotX-c2.width/2,xMax:a2.plotX+c2.width/2,yMin:a2.plotY-c2.height/2,yMax:a2.plotY+c2.height/2}:null}var z=c.defaultOptions,C=A.defined,x=A.error;c=A.extend;var t=A.merge,r=A.objectEach;var a=g2.deg2rad,q=Math.max,m=Math.min;c(z,{connectors:{type:"straight",lineWidth:1,marker:{enabled:false,align:"center",verticalAlign:"middle",inside:false,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});A=function(){function c2(a2,c3,g3){this.toPoint=this.pathfinder=this.graphics=this.fromPoint=this.chart=void 0;this.init(a2,c3,g3)}c2.prototype.init=function(a2,c3,g3){this.fromPoint=a2;this.toPoint=c3;this.options=g3;this.chart=a2.series.chart;this.pathfinder=this.chart.pathfinder};c2.prototype.renderPath=function(a2,c3,g3){var e=this.chart,k=e.styledMode,m2=e.pathfinder,p=!e.options.chart.forExport&&false!==g3,n=this.graphics&&this.graphics.path;m2.group||(m2.group=e.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(e.seriesGroup));m2.group.translate(e.plotLeft,e.plotTop);n&&n.renderer||(n=e.renderer.path().add(m2.group),k||n.attr({opacity:0}));n.attr(c3);a2={d:a2};k||(a2.opacity=1);n[p?"animate":"attr"](a2,g3);this.graphics=this.graphics||{};this.graphics.path=n};c2.prototype.addMarker=function(c3,e,g3){var k=this.fromPoint.series.chart,m2=k.pathfinder;k=k.renderer;var p="start"===c3?this.fromPoint:this.toPoint,q2=p.getPathfinderAnchorPoint(e);if(e.enabled&&((g3="start"===c3?g3[1]:g3[g3.length-2])&&"M"===g3[0]||"L"===g3[0])){g3={x:g3[1],y:g3[2]};g3=p.getRadiansToVector(g3,q2);q2=p.getMarkerVector(g3,e.radius,q2);g3=-g3/a;if(e.width&&e.height){var n=e.width;var r2=e.height}else n=r2=2*e.radius;this.graphics=this.graphics||{};q2={x:q2.x-n/2,y:q2.y-r2/2,width:n,height:r2,rotation:g3,rotationOriginX:q2.x,rotationOriginY:q2.y};this.graphics[c3]?this.graphics[c3].animate(q2):(this.graphics[c3]=k.symbol(e.symbol).addClass("highcharts-point-connecting-path-"+c3+"-marker").attr(q2).add(m2.group),k.styledMode||this.graphics[c3].attr({fill:e.color||this.fromPoint.color,stroke:e.lineColor,"stroke-width":e.lineWidth,opacity:0}).animate({opacity:1},p.series.options.animation))}};c2.prototype.getPath=function(a2){var c3=this.pathfinder,g3=this.chart,k=c3.algorithms[a2.type],m2=c3.chartObstacles;if("function"!==typeof k)return x('"'+a2.type+'" is not a Pathfinder algorithm.'),{path:[],obstacles:[]};k.requiresObstacles&&!m2&&(m2=c3.chartObstacles=c3.getChartObstacles(a2),g3.options.connectors.algorithmMargin=a2.algorithmMargin,c3.chartObstacleMetrics=c3.getObstacleMetrics(m2));return k(this.fromPoint.getPathfinderAnchorPoint(a2.startMarker),this.toPoint.getPathfinderAnchorPoint(a2.endMarker),t({chartObstacles:m2,lineObstacles:c3.lineObstacles||[],obstacleMetrics:c3.chartObstacleMetrics,hardBounds:{xMin:0,xMax:g3.plotWidth,yMin:0,yMax:g3.plotHeight},obstacleOptions:{margin:a2.algorithmMargin},startDirectionX:c3.getAlgorithmStartDirection(a2.startMarker)},a2))};c2.prototype.render=function(){var a2=this.fromPoint,c3=a2.series,g3=c3.chart,p=g3.pathfinder,r2=t(g3.options.connectors,c3.options.connectors,a2.options.connectors,this.options),x2={};g3.styledMode||(x2.stroke=r2.lineColor||a2.color,x2["stroke-width"]=r2.lineWidth,r2.dashStyle&&(x2.dashstyle=r2.dashStyle));x2["class"]="highcharts-point-connecting-path highcharts-color-"+a2.colorIndex;r2=t(x2,r2);C(r2.marker.radius)||(r2.marker.radius=m(q(Math.ceil((r2.algorithmMargin||8)/2)-1,1),5));a2=this.getPath(r2);g3=a2.path;a2.obstacles&&(p.lineObstacles=p.lineObstacles||[],p.lineObstacles=p.lineObstacles.concat(a2.obstacles));this.renderPath(g3,x2,c3.options.animation);this.addMarker("start",t(r2.marker,r2.startMarker),g3);this.addMarker("end",t(r2.marker,r2.endMarker),g3)};c2.prototype.destroy=function(){this.graphics&&(r(this.graphics,(function(a2){a2.destroy()})),delete this.graphics)};return c2}();g2.Connection=A;c(y.prototype,{getPathfinderAnchorPoint:function(a2){var c2=B(this);switch(a2.align){case"right":var e="xMax";break;case"left":e="xMin"}switch(a2.verticalAlign){case"top":var g3="yMin";break;case"bottom":g3="yMax"}return{x:e?c2[e]:(c2.xMin+c2.xMax)/2,y:g3?c2[g3]:(c2.yMin+c2.yMax)/2}},getRadiansToVector:function(a2,c2){var e;C(c2)||(e=B(this))&&(c2={x:(e.xMin+e.xMax)/2,y:(e.yMin+e.yMax)/2});return Math.atan2(c2.y-a2.y,a2.x-c2.x)},getMarkerVector:function(a2,c2,e){var g3=2*Math.PI,k=B(this),m2=k.xMax-k.xMin,p=k.yMax-k.yMin,q2=Math.atan2(p,m2),n=false;m2/=2;var r2=p/2,f=k.xMin+m2;k=k.yMin+r2;for(var l=f,d=k,b=1,h=1;a2<-Math.PI;)a2+=g3;for(;a2>Math.PI;)a2-=g3;g3=Math.tan(a2);a2>-q2&&a2<=q2?(h=-1,n=true):a2>q2&&a2<=Math.PI-q2?h=-1:a2>Math.PI-q2||a2<=-(Math.PI-q2)?(b=-1,n=true):b=-1;n?(l+=b*m2,d+=h*m2*g3):(l+=p/(2*g3)*b,d+=h*r2);e.x!==f&&(l=e.x);e.y!==k&&(d=e.y);return{x:l+c2*Math.cos(a2),y:d-c2*Math.sin(a2)}}});return A}));I(g,"Gantt/PathfinderAlgorithms.js",[g["Core/Utilities.js"]],(function(c){function g2(a,c2,g3){g3=g3||0;var m=a.length-1;c2-=1e-7;for(var k,e;g3<=m;)if(k=m+g3>>1,e=c2-a[k].xMin,0e)m=k-1;else return k;return 0=c2.x)p=a[m],p=c2.x<=p.xMax&&c2.x>=p.xMin&&c2.y<=p.yMax&&c2.y>=p.yMin;if(p)return m}return-1}function A(a){var c2=[];if(a.length){c2.push(["M",a[0].start.x,a[0].start.y]);for(var g3=0;g3t(c3[e2]-a2[e2+"Max"]);return m(c3,e2,a2,e2+(f?"Max":"Min"),f?1:-1)}var e=[],q=z(g3.startDirectionX,t(c2.x-a.x)>t(c2.y-a.y))?"x":"y",r2=g3.chartObstacles,x2=y(r2,a);g3=y(r2,c2);if(-1=a[q]===g3[q]>=u[q]&&(q="y"===q?"x":"y",c2=a[q]f2?C(g2(b,k2.x),b.length-1):0;b[e2]&&(0f2&&b[e2].xMax>=h2.x);){if(b[e2].xMin<=k2.x&&b[e2].xMax>=h2.x&&b[e2].yMin<=m2.y&&b[e2].yMax>=l2.y)return c3?{y:a2.y,x:a2.x=f2[g3+"Max"];f2=a2[g3+"Min"]<=f2[g3+"Min"];var m2=a2[g3+"Max"]>=h2[g3+"Max"];h2=a2[g3+"Min"]<=h2[g3+"Min"];var n2=t(a2[g3+"Min"]-b2[g3]),q2=t(a2[g3+"Max"]-b2[g3]);d2=10>t(n2-q2)?b2[g3]t(c2.y-a.y)),H=r2?"x":"y",I2=[],u=false,n=m.obstacleMetrics,w=C(a.x,c2.x)-n.maxWidth-10,f=x(a.x,c2.x)+n.maxWidth+10,l=C(a.y,c2.y)-n.maxHeight-10,d=x(a.y,c2.y)+n.maxHeight+10,b=m.chartObstacles;var h=g2(b,w);n=g2(b,f);b=b.slice(h,n+1);if(-1<(n=y(b,c2))){var v=q(b[n],c2,a);I2.push({end:c2,start:v});c2=v}for(;-1<(n=y(b,c2));)h=0>c2[H]-a[H],v={x:c2.x,y:c2.y},v[H]=b[n][h?H+"Max":H+"Min"]+(h?1:-1),I2.push({end:c2,start:v}),c2=v;a=e(a,c2,r2);a=a.concat(I2.reverse());return{path:A(a),obstacles:a}};r.requiresObstacles=true;return{fastAvoid:r,straight:function(a,c2){return{path:[["M",a.x,a.y],["L",c2.x,c2.y]],obstacles:[{start:a,end:c2}]}},simpleConnect:c}}));I(g,"Gantt/Pathfinder.js",[g["Gantt/Connection.js"],g["Core/Chart/Chart.js"],g["Core/Defaults.js"],g["Core/Globals.js"],g["Core/Series/Point.js"],g["Core/Utilities.js"],g["Gantt/PathfinderAlgorithms.js"]],(function(c,g2,y,A,B,z,C){function x(a2){var c2=a2.shapeArgs;return c2?{xMin:c2.x||0,xMax:(c2.x||0)+(c2.width||0),yMin:c2.y||0,yMax:(c2.y||0)+(c2.height||0)}:(c2=a2.graphic&&a2.graphic.getBBox())?{xMin:a2.plotX-c2.width/2,xMax:a2.plotX+c2.width/2,yMin:a2.plotY-c2.height/2,yMax:a2.plotY+c2.height/2}:null}function t(a2){for(var c2=a2.length,g3=0,f,k2,d=[],b=function(a3,d2,c3){c3=e(c3,10);var f2=a3.yMax+c3>d2.yMin-c3&&a3.yMin-c3d2.xMin-c3&&a3.xMin-c3d2.xMax?a3.xMin-d2.xMax:d2.xMin-a3.xMax:Infinity,k3=g4?a3.yMin>d2.yMax?a3.yMin-d2.yMax:d2.yMin-a3.yMax:Infinity;return g4&&f2?c3?b(a3,d2,Math.floor(c3/2)):Infinity:H(h,k3)};g3k2&&d.push(k2);d.push(80);return G(Math.floor(d.sort((function(a3,b2){return a3-b2}))[Math.floor(d.length/10)]/2-1),1)}function r(a2){if(a2.options.pathfinder||a2.series.reduce((function(a3,c2){c2.options&&k(true,c2.options.connectors=c2.options.connectors||{},c2.options.pathfinder);return a3||c2.options&&c2.options.pathfinder}),false))k(true,a2.options.connectors=a2.options.connectors||{},a2.options.pathfinder),m('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}y=y.defaultOptions;var a=z.addEvent,q=z.defined,m=z.error,p=z.extend,k=z.merge,e=z.pick,D=z.splat;var G=Math.max,H=Math.min;p(y,{connectors:{type:"straight",lineWidth:1,marker:{enabled:false,align:"center",verticalAlign:"middle",inside:false,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});var I2=function(){function g3(a2){this.lineObstacles=this.group=this.connections=this.chartObstacleMetrics=this.chartObstacles=this.chart=void 0;this.init(a2)}g3.prototype.init=function(c2){this.chart=c2;this.connections=[];a(c2,"redraw",(function(){this.pathfinder.update()}))};g3.prototype.update=function(a2){var e2=this.chart,f=this,g4=f.connections;f.connections=[];e2.series.forEach((function(a3){a3.visible&&!a3.options.isInternal&&a3.points.forEach((function(a4){var b2=a4.options;b2&&b2.dependency&&(b2.connect=b2.dependency);var d2;b2=a4.options&&a4.options.connect&&D(a4.options.connect);a4.visible&&false!==a4.isInside&&b2&&b2.forEach((function(b3){d2=e2.get("string"===typeof b3?b3:b3.to);d2 instanceof B&&d2.series.visible&&d2.visible&&false!==d2.isInside&&f.connections.push(new c(a4,d2,"string"===typeof b3?{}:b3))}))}))}));for(var d=0,b=void 0,h=void 0,k2=g4.length,m2=f.connections.length;dMath.PI;)a2-=f;f=Math.tan(a2);a2>-h&&a2<=h?(t2=-1,k2=true):a2>h&&a2<=Math.PI-h?t2=-1:a2>Math.PI-h||a2<=-(Math.PI-h)?(r2=-1,k2=true):r2=-1;k2?(p2+=r2*d,q2+=t2*d*f):(p2+=b/(2*f)*r2,q2+=t2*m2);e2.x!==n&&(p2=e2.x);e2.y!==g3&&(q2=e2.y);return{x:p2+c2*Math.cos(a2),y:q2-c2*Math.sin(a2)}}});g2.prototype.callbacks.push((function(a2){false!==a2.options.connectors.enabled&&(r(a2),this.pathfinder=new I2(this),this.pathfinder.update(true))}));return I2}));I(g,"Series/Gantt/GanttSeries.js",[g["Core/Axis/Axis.js"],g["Core/Chart/Chart.js"],g["Series/Gantt/GanttPoint.js"],g["Core/Series/SeriesRegistry.js"],g["Core/Axis/Tick.js"],g["Core/Utilities.js"],g["Core/Axis/TreeGrid/TreeGridAxis.js"]],(function(c,g2,y,A,B,z,C){var x=this&&this.__extends||function(){var a2=function(c2,e){a2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a3,c3){a3.__proto__=c3}||function(a3,c3){for(var e2 in c3)c3.hasOwnProperty(e2)&&(a3[e2]=c3[e2])};return a2(c2,e)};return function(c2,e){function g3(){this.constructor=c2}a2(c2,e);c2.prototype=null===e?Object.create(e):(g3.prototype=e.prototype,new g3)}}(),t=A.series,r=A.seriesTypes.xrange,a=z.extend,q=z.isNumber,m=z.merge;C.compose(c,g2,t,B);c=function(a2){function c2(){var c3=null!==a2&&a2.apply(this,arguments)||this;c3.data=void 0;c3.options=void 0;c3.points=void 0;return c3}x(c2,a2);c2.prototype.drawPoint=function(a3,c3){var e=this.options,g3=this.chart.renderer,k=a3.shapeArgs,m2=a3.plotY,n=a3.graphic,p=a3.selected&&"select",f=e.stacking&&!e.borderRadius;if(a3.options.milestone)if(q(m2)&&null!==a3.y&&false!==a3.visible){k=g3.symbols.diamond(k.x||0,k.y||0,k.width||0,k.height||0);if(n)n[c3]({d:k});else a3.graphic=g3.path(k).addClass(a3.getClassName(),true).add(a3.group||this.group);this.chart.styledMode||a3.graphic.attr(this.pointAttribs(a3,p)).shadow(e.shadow,null,f)}else n&&(a3.graphic=n.destroy());else r.prototype.drawPoint.call(this,a3,c3)};c2.prototype.translatePoint=function(a3){r.prototype.translatePoint.call(this,a3);if(a3.options.milestone){var c3=a3.shapeArgs;var e=c3.height||0;a3.shapeArgs={x:(c3.x||0)-e/2,y:c3.y,width:e,height:e}}};c2.defaultOptions=m(r.defaultOptions,{grouping:false,dataLabels:{enabled:true},tooltip:{headerFormat:'{series.name}
',pointFormat:null,pointFormatter:function(){var a3=this.series,c3=a3.xAxis,g3=a3.tooltipOptions.dateTimeLabelFormats,k=c3.options.startOfWeek,m2=a3.tooltipOptions,p=m2.xDateFormat,n=this.options.milestone,r2=""+(this.name||this.yCategory)+"";if(m2.pointFormat)return this.tooltipFormatter(m2.pointFormat);!p&&q(this.start)&&(p=a3.chart.time.getDateFormat(c3.closestPointRange,this.start,k,g3||{}));c3=a3.chart.time.dateFormat(p,this.start);a3=a3.chart.time.dateFormat(p,this.end);r2+="
";return n?r2+(c3+"
"):r2+("Start: "+c3+"
End: ")+(a3+"
")}},connectors:{type:"simpleConnect",animation:{reversed:true},startMarker:{enabled:true,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:false,align:"right"}}});return c2}(r);a(c.prototype,{pointArrayMap:["start","end","y"],pointClass:y,setData:t.prototype.setData});A.registerSeriesType("gantt",c);return c}));I(g,"Core/Chart/GanttChart.js",[g["Core/Chart/Chart.js"],g["Core/Defaults.js"],g["Core/Utilities.js"]],(function(c,g2,y){var A=this&&this.__extends||function(){var c2=function(g3,a){c2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a2,c3){a2.__proto__=c3}||function(a2,c3){for(var g4 in c3)c3.hasOwnProperty(g4)&&(a2[g4]=c3[g4])};return c2(g3,a)};return function(g3,a){function q(){this.constructor=g3}c2(g3,a);g3.prototype=null===a?Object.create(a):(q.prototype=a.prototype,new q)}}(),B=g2.getOptions,z=y.isArray,C=y.merge,x=y.splat;c=function(c2){function g3(){return null!==c2&&c2.apply(this,arguments)||this}A(g3,c2);g3.prototype.init=function(a,g4){var m=B(),p=a.xAxis,k=a.yAxis,e;a.xAxis=a.yAxis=void 0;var q=C(true,{chart:{type:"gantt"},title:{text:null},legend:{enabled:false},navigator:{series:{type:"gantt"},yAxis:{type:"category"}}},a,{isGantt:true});a.xAxis=p;a.yAxis=k;q.xAxis=(z(a.xAxis)?a.xAxis:[a.xAxis||{},{}]).map((function(a2,c3){1===c3&&(e=0);return C(m.xAxis,{grid:{enabled:true},opposite:true,linkedTo:e},a2,{type:"datetime"})}));q.yAxis=x(a.yAxis||{}).map((function(a2){return C(m.yAxis,{grid:{enabled:true},staticScale:50,reversed:true,type:a2.categories?a2.type:"treegrid"},a2)}));c2.prototype.init.call(this,q,g4)};return g3}(c);(function(c2){c2.ganttChart=function(g3,a,q){return new c2(g3,a,q)}})(c||(c={}));return c}));I(g,"masters/modules/gantt.src.js",[g["Core/Globals.js"],g["Stock/Navigator/Navigator.js"],g["Stock/Scrollbar/Scrollbar.js"],g["Stock/RangeSelector/RangeSelector.js"],g["Series/XRange/XRangeSeries.js"],g["Core/Chart/GanttChart.js"]],(function(c,g2,y,A,B,z){c.GanttChart=z;c.ganttChart=z.ganttChart;c.Navigator=g2;c.RangeSelector=A;c.Scrollbar=y;g2.compose(c.Axis,c.Chart,c.Series);A.compose(c.Axis,c.Chart);y.compose(c.Axis);B.compose(c.Axis)}));I(g,"masters/highcharts-gantt.src.js",[g["masters/highcharts.src.js"]],(function(c){c.product="Highcharts Gantt";return c}));g["masters/highcharts-gantt.src.js"]._modules=g;return g["masters/highcharts-gantt.src.js"]}))})(highchartsGantt);var highchartsGanttExports=highchartsGantt.exports;const Highcharts=getDefaultExportFromCjs(highchartsGanttExports);const GanttChart=props=>{const{aria:aria={},className:className,customOptions:customOptions={},dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_gantt_chart"),globalProps(props),className);const[options,setOptions]=useState(customOptions);useEffect((()=>{setOptions(customOptions)}),[customOptions]);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();return jsx("div",{children:jsx(HighchartsReact,{constructorType:"ganttChart",containerProps:{className:classnames(globalProps(props),classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})})};const typeMap={home:"H#",project:"P#",appointment:"A#",default:"#"};const Hashtag=props=>{const{aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,newWindow:newWindow,rel:rel,target:target,text:text2,type:type="default",url:url}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_hashtag_kit"),globalProps(props),className);const getTargetAttribute=()=>{if(target&&url){return target}else if(newWindow){return"_blank"}else{return"_self"}};return jsx("span",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx("a",{href:url,rel:newWindow?"noreferrer":rel,target:getTargetAttribute(),children:jsx(Badge,{dark:dark,text:typeMap[type]+text2,variant:"primary"})})})};const HomeAddressStreet=props=>{const{address:address,addressCont:addressCont,aria:aria={},city:city,className:className,data:data={},dark:dark=false,emphasis:emphasis="street",htmlOptions:htmlOptions={},homeId:homeId,homeUrl:homeUrl,target:target,newWindow:newWindow,houseStyle:houseStyle,state:state,zipcode:zipcode,territory:territory}=props;const classes=(className2,dark2)=>classnames({pb_home_address_street:!dark2,pb_home_address_street_dark:dark2},globalProps(props),className2);const dataProps=buildDataProps(data);const ariaProps=buildAriaProps(aria);const htmlProps=buildHtmlProps(htmlOptions);const getTargetAttribute=()=>{if(target&&homeUrl){return target}else if(newWindow){return"_blank"}else{return"_self"}};return jsxs("div",{className:classes(className,dark),...ariaProps,...dataProps,...htmlProps,children:[emphasis=="street"&&jsxs("div",{children:[jsx(Title,{className:"pb_home_address_street_address",dark:dark,size:4,children:joinPresent([titleize(address),houseStyle]," · ")}),jsx(Title,{className:"pb_home_address_street_address",dark:dark,size:4,children:titleize(addressCont)}),jsx(Body$1,{color:"light",children:`${titleize(city)}, ${state} ${zipcode}`})]}),emphasis=="city"&&jsxs("div",{children:[jsx(Body$1,{color:"light",children:joinPresent([titleize(address),houseStyle]," · ")}),jsx(Body$1,{color:"light",children:titleize(addressCont)}),jsxs("div",{children:[jsx(Title,{className:"pb_home_address_street_address",dark:dark,size:4,tag:"span",children:`${titleize(city)}, ${state}`}),jsx(Body$1,{color:"light",tag:"span",children:` ${zipcode}`})]})]}),homeId&&jsx(Hashtag,{classname:"home-hashtag",dark:dark,marginRight:"xxs",newWindow:newWindow,target:getTargetAttribute(),text:homeId,type:"home",url:homeUrl||"#"}),jsx(Body$1,{color:"light",tag:"span",children:jsx("small",{children:territory})})]})};const IconStatValue=props=>{const{aria:aria={},className:className,data:data={},dark:dark=false,htmlOptions:htmlOptions={},icon:icon,id:id,orientation:orientation="horizontal",size:size="sm",text:text2="",unit:unit="",value:value=0,variant:variant="lighter"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_icon_stat_value_kit",orientation,size,variant),globalProps(props),className);const titleSize=function(size2){if(size2=="lg"){return jsx(Title,{dark:dark,size:1,tag:"span",text:`${value}`})}else if(size2=="md"){return jsx(Title,{dark:dark,size:2,tag:"span",text:`${value}`})}else{return jsx(Title,{dark:dark,size:3,tag:"span",text:`${value}`})}};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(IconCircle,{dark:dark,icon:icon,size:size,variant:variant}),jsxs("div",{children:[jsxs(Flex,{align:"baseline",children:[titleSize(size)," ",jsx(Body$1,{dark:dark,text:unit})]}),jsx(Caption,{dark:dark,text:text2})]})]})};const IconValue=props=>{const{align:align="left",aria:aria={},className:className,dark:dark,data:data={},htmlOptions:htmlOptions={},icon:icon,id:id,text:text2}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_icon_value_kit",align),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs(Body$1,{color:"light",dark:dark,children:[jsx(Icon,{dark:dark,fixedWidth:true,icon:icon}),text2]})})};const Pill=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,text:text2,variant:variant="neutral",textTransform:textTransform="lowercase"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pill_kit",variant,textTransform),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(Title,{className:"pb_pill_text",size:4,tag:"div",text:text2})})};const LabelPill=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,label:label,pillValue:pillValue,variant:variant="neutral"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames("pb_label_pill_kit",globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:[jsx(Caption,{className:"pb_label_pill_label",text:label}),jsx(Pill,{className:"pb_label_pill_pill",text:pillValue,variant:variant})]})};const dateString=value=>{const month=DateTime$1.toMonthNum(value);const day=DateTime$1.toDay(value);return` · ${month}/${day}`};const LabelValue=props=>{const{active:active=false,aria:aria={},className:className,dark:dark=false,data:data={},date:date,description:description,htmlOptions:htmlOptions={},icon:icon,id:id,label:label,title:title,value:value,variant:variant="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const variantClass=variant==="details"?"details":"";const classes=classnames(buildCss("pb_label_value_kit",variantClass),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,title:title,children:[jsx(Caption,{dark:dark,text:label}),variant==="details"?jsxs(Flex,{inline:true,vertical:"center",children:[icon&&jsx(Body$1,{color:"light",dark:dark,marginRight:"xs",children:jsx(Icon,{dark:dark,fixedWidth:true,icon:icon})}),description&&jsx(Body$1,{color:"light",dark:dark,marginRight:"xs",text:description}),active===true?jsxs(Flex,{inline:true,vertical:"center",children:[title&&jsx(Title,{dark:dark,size:4,text:title,variant:"link"}),date&&jsx(Title,{dark:dark,marginLeft:"xs",size:4,text:" "+dateString(date),variant:"link"})]}):jsxs(Fragment,{children:[title&&jsx(Title,{dark:dark,size:4,text:title}),date&&jsx(Title,{dark:dark,marginLeft:"xs",size:4,text:" "+dateString(date)})]})]}):jsx(Body$1,{dark:dark,text:value})]})};const Side=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_sidebar",globalProps(props),className),children:children})};const Body=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_body",globalProps(props),className),children:children})};const Item=props=>{const{children:children,className:className,size:size="sm"}=props;const sizeClass=`size_${size}`;return jsx("div",{className:classnames("layout_item",sizeClass,globalProps(props),className),children:children})};const Header=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_header",globalProps(props),className),children:children})};const Footer=props=>{const{children:children,className:className}=props;return jsx("div",{className:classnames("layout_footer",globalProps(props),className),children:children})};const Layout=props=>{const{aria:aria={},children:children,className:className,collapse:collapse="md",dark:dark=false,data:data={},full:full=false,htmlOptions:htmlOptions={},position:position="left",responsive:responsive=false,size:size="md",layout:layout="sidebar",variant:variant="light",transparent:transparent=false}=props;const responsiveClass=responsive?"_responsive":"";const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const layoutCss=layout=="collection"?`pb_layout_kit_${layout}`:layout=="kanban"?`pb_layout_kit_${layout}${responsiveClass}`:buildCss(`pb_layout_kit_${layout}`,`size_${size}`,position,variant,{dark:dark,transparent:transparent,full:full});const layoutCollapseCss=layout=="collection"?"":layout=="kanban"?"":buildCss("layout",position,"collapse",collapse);const layoutChildren=React__default.Children.toArray(children);const subComponentTags=tagName=>layoutChildren.filter((c=>{var _a;return((_a=c.type)==null?void 0:_a.displayName)===tagName})).map(((child,i)=>React__default.cloneElement(child,{key:`${tagName.toLowerCase()}-${i}`})));const nonSideChildren=layoutChildren.filter((child=>{var _a;return((_a=child.type)==null?void 0:_a.displayName)!=="Side"}));const filteredProps={...props};filteredProps==null?true:delete filteredProps.position;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(layoutCss,layoutCollapseCss,className,globalProps(filteredProps)),children:[subComponentTags("Side"),nonSideChildren]})};Layout.Side=Side;Layout.Body=Body;Layout.Item=Item;Layout.Header=Header;Layout.Footer=Footer;const useKbdControls=api=>{const[cmdKey,setCmdKey]=useState("");useEffect((()=>{const handleKeyDown=({key:key})=>{const keyCmd=key.toLowerCase();setCmdKey(keyCmd);switch(keyCmd){case"escape":{api.onClose();break}case"arrowleft":{api.onArrowLeft();break}case"arrowright":{api.onArrowRight();break}}};window.addEventListener("keydown",handleKeyDown);return()=>{window.removeEventListener("keydown",handleKeyDown)}}),[api]);return cmdKey};const LightboxContext=React__default.createContext({});const LightboxHeader=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},onClickRight:onClickRight,spacing:spacing="between",text:text2,navRight:navRight,title:title,closeable:closeable=true,icon:icon="times"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const api=useContext(LightboxContext);const headerCSS=buildCss("lightbox_header");const headerSpacing=globalProps(props,{paddingY:"sm"});const handleOnLightboxClose=()=>api.onClose();const HeaderBody=()=>jsxs(React__default.Fragment,{children:[jsx(FlexItem,{flex:"1",marginLeft:"sm",children:jsx(CircleIconButton,{dark:true,icon:icon,onClick:handleOnLightboxClose,variant:"link"})}),title&&text2&&jsx(FlexItem,{flex:"5",children:jsx(Flex,{justify:"center",children:jsxs(Flex,{align:"center",orientation:"column",children:[typeof title==="string"?jsx(Title,{dark:true,paddingBottom:"xxs",size:4,text:title}):jsx(Flex,{className:"custom-header",justify:"center",children:title}),typeof text2==="string"?jsx(Caption,{dark:true,children:text2}):jsx(Flex,{className:"custom-header",justify:"center",children:text2})]})})}),jsx(FlexItem,{flex:"1",children:jsx(Flex,{justify:"end",children:jsx(Button,{className:"nav-right-btn",dark:true,htmlType:"button",onClick:onClickRight,text:navRight,variant:"link"})})})]});return jsx("div",{className:"carousel-header",children:jsxs(Flex,{...ariaProps,...dataProps,...htmlProps,className:classnames(headerCSS,headerSpacing,className),spacing:spacing,children:[closeable&&jsx(HeaderBody,{}),children]})})};var roundNumber=function(num,decimal){return Number(num.toFixed(decimal))};var checkIsNumber=function(num,defaultValue){return defaultValue};var handleCallback=function(context,event,callback){if(callback&&typeof callback==="function"){callback(context,event)}};var easeOut=function(t){return-Math.cos(t*Math.PI)/2+.5};var linear=function(t){return t};var easeInQuad=function(t){return t*t};var easeOutQuad=function(t){return t*(2-t)};var easeInOutQuad=function(t){return t<.5?2*t*t:-1+(4-2*t)*t};var easeInCubic=function(t){return t*t*t};var easeOutCubic=function(t){return--t*t*t+1};var easeInOutCubic=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1};var easeInQuart=function(t){return t*t*t*t};var easeOutQuart=function(t){return 1- --t*t*t*t};var easeInOutQuart=function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t};var easeInQuint=function(t){return t*t*t*t*t};var easeOutQuint=function(t){return 1+--t*t*t*t*t};var easeInOutQuint=function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};var animations={easeOut:easeOut,linear:linear,easeInQuad:easeInQuad,easeOutQuad:easeOutQuad,easeInOutQuad:easeInOutQuad,easeInCubic:easeInCubic,easeOutCubic:easeOutCubic,easeInOutCubic:easeInOutCubic,easeInQuart:easeInQuart,easeOutQuart:easeOutQuart,easeInOutQuart:easeInOutQuart,easeInQuint:easeInQuint,easeOutQuint:easeOutQuint,easeInOutQuint:easeInOutQuint};var handleCancelAnimationFrame=function(animation){if(typeof animation==="number"){cancelAnimationFrame(animation)}};var handleCancelAnimation=function(contextInstance){if(!contextInstance.mounted)return;handleCancelAnimationFrame(contextInstance.animation);contextInstance.animate=false;contextInstance.animation=null;contextInstance.velocity=null};function handleSetupAnimation(contextInstance,animationName,animationTime,callback){if(!contextInstance.mounted)return;var startTime=(new Date).getTime();var lastStep=1;handleCancelAnimation(contextInstance);contextInstance.animation=function(){if(!contextInstance.mounted){return handleCancelAnimationFrame(contextInstance.animation)}var frameTime=(new Date).getTime()-startTime;var animationProgress=frameTime/animationTime;var animationType=animations[animationName];var step=animationType(animationProgress);if(frameTime>=animationTime){callback(lastStep);contextInstance.animation=null}else if(contextInstance.animation){callback(step);requestAnimationFrame(contextInstance.animation)}};requestAnimationFrame(contextInstance.animation)}function isValidTargetState(targetState){var scale=targetState.scale,positionX=targetState.positionX,positionY=targetState.positionY;if(Number.isNaN(scale)||Number.isNaN(positionX)||Number.isNaN(positionY)){return false}return true}function animate(contextInstance,targetState,animationTime,animationName){var isValid=isValidTargetState(targetState);if(!contextInstance.mounted||!isValid)return;var setTransformState=contextInstance.setTransformState;var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var scaleDiff=targetState.scale-scale;var positionXDiff=targetState.positionX-positionX;var positionYDiff=targetState.positionY-positionY;if(animationTime===0){setTransformState(targetState.scale,targetState.positionX,targetState.positionY)}else{handleSetupAnimation(contextInstance,animationName,animationTime,(function(step){var newScale=scale+scaleDiff*step;var newPositionX=positionX+positionXDiff*step;var newPositionY=positionY+positionYDiff*step;setTransformState(newScale,newPositionX,newPositionY)}))}}function getComponentsSizes(wrapperComponent,contentComponent,newScale){var wrapperWidth=wrapperComponent.offsetWidth;var wrapperHeight=wrapperComponent.offsetHeight;var contentWidth=contentComponent.offsetWidth;var contentHeight=contentComponent.offsetHeight;var newContentWidth=contentWidth*newScale;var newContentHeight=contentHeight*newScale;var newDiffWidth=wrapperWidth-newContentWidth;var newDiffHeight=wrapperHeight-newContentHeight;return{wrapperWidth:wrapperWidth,wrapperHeight:wrapperHeight,newContentWidth:newContentWidth,newDiffWidth:newDiffWidth,newContentHeight:newContentHeight,newDiffHeight:newDiffHeight}}var getBounds=function(wrapperWidth,newContentWidth,diffWidth,wrapperHeight,newContentHeight,diffHeight,centerZoomedOut){var scaleWidthFactor=wrapperWidth>newContentWidth?diffWidth*(centerZoomedOut?1:.5):0;var scaleHeightFactor=wrapperHeight>newContentHeight?diffHeight*(centerZoomedOut?1:.5):0;var minPositionX=wrapperWidth-newContentWidth-scaleWidthFactor;var maxPositionX=scaleWidthFactor;var minPositionY=wrapperHeight-newContentHeight-scaleHeightFactor;var maxPositionY=scaleHeightFactor;return{minPositionX:minPositionX,maxPositionX:maxPositionX,minPositionY:minPositionY,maxPositionY:maxPositionY}};var calculateBounds=function(contextInstance,newScale){var wrapperComponent=contextInstance.wrapperComponent,contentComponent=contextInstance.contentComponent;var centerZoomedOut=contextInstance.setup.centerZoomedOut;if(!wrapperComponent||!contentComponent){throw new Error("Components are not mounted")}var _a=getComponentsSizes(wrapperComponent,contentComponent,newScale),wrapperWidth=_a.wrapperWidth,wrapperHeight=_a.wrapperHeight,newContentWidth=_a.newContentWidth,newDiffWidth=_a.newDiffWidth,newContentHeight=_a.newContentHeight,newDiffHeight=_a.newDiffHeight;var bounds=getBounds(wrapperWidth,newContentWidth,newDiffWidth,wrapperHeight,newContentHeight,newDiffHeight,Boolean(centerZoomedOut));return bounds};var boundLimiter=function(value,minBound,maxBound,isActive){if(!isActive)return roundNumber(value,2);if(valuemaxBound)return roundNumber(maxBound,2);return roundNumber(value,2)};var handleCalculateBounds=function(contextInstance,newScale){var bounds=calculateBounds(contextInstance,newScale);contextInstance.bounds=bounds;return bounds};function getMouseBoundedPosition(positionX,positionY,bounds,limitToBounds,paddingValueX,paddingValueY,wrapperComponent){var minPositionX=bounds.minPositionX,minPositionY=bounds.minPositionY,maxPositionX=bounds.maxPositionX,maxPositionY=bounds.maxPositionY;var paddingX=0;var paddingY=0;if(wrapperComponent){paddingX=paddingValueX;paddingY=paddingValueY}var x=boundLimiter(positionX,minPositionX-paddingX,maxPositionX+paddingX,limitToBounds);var y=boundLimiter(positionY,minPositionY-paddingY,maxPositionY+paddingY,limitToBounds);return{x:x,y:y}}function handleCalculateZoomPositions(contextInstance,mouseX,mouseY,newScale,bounds,limitToBounds){var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var scaleDifference=newScale-scale;if(typeof mouseX!=="number"||typeof mouseY!=="number"){console.error("Mouse X and Y position were not provided!");return{x:positionX,y:positionY}}var calculatedPositionX=positionX-mouseX*scaleDifference;var calculatedPositionY=positionY-mouseY*scaleDifference;var newPositions=getMouseBoundedPosition(calculatedPositionX,calculatedPositionY,bounds,limitToBounds,0,0,null);return newPositions}function checkZoomBounds(zoom,minScale,maxScale,zoomPadding,enablePadding){var scalePadding=enablePadding?zoomPadding:0;var minScaleWithPadding=minScale-scalePadding;if(!Number.isNaN(maxScale)&&zoom>=maxScale)return maxScale;if(!Number.isNaN(minScale)&&zoom<=minScaleWithPadding)return minScaleWithPadding;return zoom}var isPanningStartAllowed=function(contextInstance,event){var excluded=contextInstance.setup.panning.excluded;var isInitialized=contextInstance.isInitialized,wrapperComponent=contextInstance.wrapperComponent;var target=event.target;var isWrapperChild=wrapperComponent===null||wrapperComponent===void 0?void 0:wrapperComponent.contains(target);var isAllowed=isInitialized&&target&&isWrapperChild;if(!isAllowed)return false;var isExcluded=isExcludedNode(target,excluded);if(isExcluded)return false;return true};var isPanningAllowed=function(contextInstance){var isInitialized=contextInstance.isInitialized,isPanning=contextInstance.isPanning,setup=contextInstance.setup;var disabled=setup.panning.disabled;var isAllowed=isInitialized&&isPanning&&!disabled;if(!isAllowed)return false;return true};var handlePanningSetup=function(contextInstance,event){var _a=contextInstance.transformState,positionX=_a.positionX,positionY=_a.positionY;contextInstance.isPanning=true;var x=event.clientX;var y=event.clientY;contextInstance.startCoords={x:x-positionX,y:y-positionY}};var handleTouchPanningSetup=function(contextInstance,event){var touches=event.touches;var _a=contextInstance.transformState,positionX=_a.positionX,positionY=_a.positionY;contextInstance.isPanning=true;var oneFingerTouch=touches.length===1;if(oneFingerTouch){var x=touches[0].clientX;var y=touches[0].clientY;contextInstance.startCoords={x:x-positionX,y:y-positionY}}};function handlePanToBounds(contextInstance){var _a=contextInstance.transformState,positionX=_a.positionX,positionY=_a.positionY,scale=_a.scale;var _b=contextInstance.setup,disabled=_b.disabled,limitToBounds=_b.limitToBounds,centerZoomedOut=_b.centerZoomedOut;var wrapperComponent=contextInstance.wrapperComponent;if(disabled||!wrapperComponent||!contextInstance.bounds)return;var _c=contextInstance.bounds,maxPositionX=_c.maxPositionX,minPositionX=_c.minPositionX,maxPositionY=_c.maxPositionY,minPositionY=_c.minPositionY;var xChanged=positionX>maxPositionX||positionXmaxPositionY||positionYmaxPositionX?wrapperComponent.offsetWidth:contextInstance.setup.minPositionX||0;var mousePosY=positionY>maxPositionY?wrapperComponent.offsetHeight:contextInstance.setup.minPositionY||0;var _d=handleCalculateZoomPositions(contextInstance,mousePosX,mousePosY,scale,contextInstance.bounds,limitToBounds||centerZoomedOut),x=_d.x,y=_d.y;return{scale:scale,positionX:xChanged?x:positionX,positionY:yChanged?y:positionY}}function handleNewPosition(contextInstance,newPositionX,newPositionY,paddingValueX,paddingValueY){var limitToBounds=contextInstance.setup.limitToBounds;var wrapperComponent=contextInstance.wrapperComponent,bounds=contextInstance.bounds;var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;if(wrapperComponent===null||bounds===null||newPositionX===positionX&&newPositionY===positionY){return}var _b=getMouseBoundedPosition(newPositionX,newPositionY,bounds,limitToBounds,paddingValueX,paddingValueY,wrapperComponent),x=_b.x,y=_b.y;contextInstance.setTransformState(scale,x,y)}var getPanningClientPosition=function(contextInstance,clientX,clientY){var startCoords=contextInstance.startCoords,transformState=contextInstance.transformState;var panning=contextInstance.setup.panning;var lockAxisX=panning.lockAxisX,lockAxisY=panning.lockAxisY;var positionX=transformState.positionX,positionY=transformState.positionY;if(!startCoords){return{x:positionX,y:positionY}}var mouseX=clientX-startCoords.x;var mouseY=clientY-startCoords.y;var newPositionX=lockAxisX?positionX:mouseX;var newPositionY=lockAxisY?positionY:mouseY;return{x:newPositionX,y:newPositionY}};var getPaddingValue=function(contextInstance,size){var setup=contextInstance.setup,transformState=contextInstance.transformState;var scale=transformState.scale;var minScale=setup.minScale,disablePadding=setup.disablePadding;if(size>0&&scale>=minScale&&!disablePadding){return size}return 0};var isVelocityCalculationAllowed=function(contextInstance){var mounted=contextInstance.mounted;var _a=contextInstance.setup,disabled=_a.disabled,velocityAnimation=_a.velocityAnimation;var scale=contextInstance.transformState.scale;var disabledVelocity=velocityAnimation.disabled;var isAllowed=!disabledVelocity||scale>1||!disabled||mounted;if(!isAllowed)return false;return true};var isVelocityAllowed=function(contextInstance){var mounted=contextInstance.mounted,velocity=contextInstance.velocity,bounds=contextInstance.bounds;var _a=contextInstance.setup,disabled=_a.disabled,velocityAnimation=_a.velocityAnimation;var scale=contextInstance.transformState.scale;var disabledVelocity=velocityAnimation.disabled;var isAllowed=!disabledVelocity||scale>1||!disabled||mounted;if(!isAllowed)return false;if(!velocity||!bounds)return false;return true};function getVelocityMoveTime(contextInstance,velocity){var velocityAnimation=contextInstance.setup.velocityAnimation;var equalToMove=velocityAnimation.equalToMove,animationTime=velocityAnimation.animationTime,sensitivity=velocityAnimation.sensitivity;if(equalToMove){return animationTime*velocity*sensitivity}return animationTime}function getVelocityPosition(newPosition,startPosition,currentPosition,isLocked,limitToBounds,minPosition,maxPosition,minTarget,maxTarget,step){if(limitToBounds){if(startPosition>maxPosition&¤tPosition>maxPosition){var calculatedPosition=maxPosition+(newPosition-maxPosition)*step;if(calculatedPosition>maxTarget)return maxTarget;if(calculatedPositionminPosition)return minPosition;return calculatedPosition}}if(isLocked)return startPosition;return boundLimiter(newPosition,minPosition,maxPosition,limitToBounds)}function getSizeMultiplier(wrapperComponent,equalToMove){var defaultMultiplier=1;if(equalToMove){return Math.min(defaultMultiplier,wrapperComponent.offsetWidth/window.innerWidth)}return defaultMultiplier}function handleCalculateVelocity(contextInstance,position){var isAllowed=isVelocityCalculationAllowed(contextInstance);if(!isAllowed){return}var lastMousePosition=contextInstance.lastMousePosition,velocityTime=contextInstance.velocityTime,setup=contextInstance.setup;var wrapperComponent=contextInstance.wrapperComponent;var equalToMove=setup.velocityAnimation.equalToMove;var now=Date.now();if(lastMousePosition&&velocityTime&&wrapperComponent){var sizeMultiplier=getSizeMultiplier(wrapperComponent,equalToMove);var distanceX=position.x-lastMousePosition.x;var distanceY=position.y-lastMousePosition.y;var velocityX=distanceX/sizeMultiplier;var velocityY=distanceY/sizeMultiplier;var interval=now-velocityTime;var speed=distanceX*distanceX+distanceY*distanceY;var velocity=Math.sqrt(speed)/interval;contextInstance.velocity={velocityX:velocityX,velocityY:velocityY,total:velocity}}contextInstance.lastMousePosition=position;contextInstance.velocityTime=now}function handleVelocityPanning(contextInstance){var velocity=contextInstance.velocity,bounds=contextInstance.bounds,setup=contextInstance.setup,wrapperComponent=contextInstance.wrapperComponent;var isAllowed=isVelocityAllowed(contextInstance);if(!isAllowed||!velocity||!bounds||!wrapperComponent){return}var velocityX=velocity.velocityX,velocityY=velocity.velocityY,total=velocity.total;var maxPositionX=bounds.maxPositionX,minPositionX=bounds.minPositionX,maxPositionY=bounds.maxPositionY,minPositionY=bounds.minPositionY;var limitToBounds=setup.limitToBounds,alignmentAnimation=setup.alignmentAnimation;var zoomAnimation=setup.zoomAnimation,panning=setup.panning;var lockAxisY=panning.lockAxisY,lockAxisX=panning.lockAxisX;var animationType=zoomAnimation.animationType;var sizeX=alignmentAnimation.sizeX,sizeY=alignmentAnimation.sizeY,velocityAlignmentTime=alignmentAnimation.velocityAlignmentTime;var alignAnimationTime=velocityAlignmentTime;var moveAnimationTime=getVelocityMoveTime(contextInstance,total);var finalAnimationTime=Math.max(moveAnimationTime,alignAnimationTime);var paddingValueX=getPaddingValue(contextInstance,sizeX);var paddingValueY=getPaddingValue(contextInstance,sizeY);var paddingX=paddingValueX*wrapperComponent.offsetWidth/100;var paddingY=paddingValueY*wrapperComponent.offsetHeight/100;var maxTargetX=maxPositionX+paddingX;var minTargetX=minPositionX-paddingX;var maxTargetY=maxPositionY+paddingY;var minTargetY=minPositionY-paddingY;var startState=contextInstance.transformState;var startTime=(new Date).getTime();handleSetupAnimation(contextInstance,animationType,finalAnimationTime,(function(step){var _a=contextInstance.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var frameTime=(new Date).getTime()-startTime;var animationProgress=frameTime/alignAnimationTime;var alignAnimation=animations[alignmentAnimation.animationType];var alignStep=1-alignAnimation(Math.min(1,animationProgress));var customStep=1-step;var newPositionX=positionX+velocityX*customStep;var newPositionY=positionY+velocityY*customStep;var currentPositionX=getVelocityPosition(newPositionX,startState.positionX,positionX,lockAxisX,limitToBounds,minPositionX,maxPositionX,minTargetX,maxTargetX,alignStep);var currentPositionY=getVelocityPosition(newPositionY,startState.positionY,positionY,lockAxisY,limitToBounds,minPositionY,maxPositionY,minTargetY,maxTargetY,alignStep);if(positionX!==newPositionX||positionY!==newPositionY){contextInstance.setTransformState(scale,currentPositionX,currentPositionY)}}))}function handlePanningStart(contextInstance,event){var scale=contextInstance.transformState.scale;handleCancelAnimation(contextInstance);handleCalculateBounds(contextInstance,scale);if(window.TouchEvent!==void 0&&event instanceof TouchEvent){handleTouchPanningSetup(contextInstance,event)}else{handlePanningSetup(contextInstance,event)}}function handleAlignToBounds(contextInstance){var scale=contextInstance.transformState.scale;var _a=contextInstance.setup,minScale=_a.minScale,alignmentAnimation=_a.alignmentAnimation;var disabled=alignmentAnimation.disabled,sizeX=alignmentAnimation.sizeX,sizeY=alignmentAnimation.sizeY,animationTime=alignmentAnimation.animationTime,animationType=alignmentAnimation.animationType;var isDisabled=disabled||scale.1&&isZoomed;if(shouldAnimate){handleVelocityPanning(contextInstance)}else{handleAlignToBounds(contextInstance)}}}function handleZoomToPoint(contextInstance,scale,mouseX,mouseY){var _a=contextInstance.setup,minScale=_a.minScale,maxScale=_a.maxScale,limitToBounds=_a.limitToBounds;var newScale=checkZoomBounds(roundNumber(scale,2),minScale,maxScale,0,false);var bounds=handleCalculateBounds(contextInstance,newScale);var _b=handleCalculateZoomPositions(contextInstance,mouseX,mouseY,newScale,bounds,limitToBounds),x=_b.x,y=_b.y;return{scale:newScale,positionX:x,positionY:y}}function handleAlignToScaleBounds(contextInstance,mousePositionX,mousePositionY){var scale=contextInstance.transformState.scale;var wrapperComponent=contextInstance.wrapperComponent;var _a=contextInstance.setup,minScale=_a.minScale,limitToBounds=_a.limitToBounds,zoomAnimation=_a.zoomAnimation;var disabled=zoomAnimation.disabled,animationTime=zoomAnimation.animationTime,animationType=zoomAnimation.animationType;var isDisabled=disabled||scale>=minScale;if(scale>=1||limitToBounds){handleAlignToBounds(contextInstance)}if(isDisabled||!wrapperComponent||!contextInstance.mounted)return;var mouseX=mousePositionX||wrapperComponent.offsetWidth/2;var mouseY=mousePositionY||wrapperComponent.offsetHeight/2;var targetState=handleZoomToPoint(contextInstance,minScale,mouseX,mouseY);if(targetState){animate(contextInstance,targetState,animationTime,animationType)}}var __assign=function(){__assign=Object.assign||function __assign2(t){for(var s,i=1,n=arguments.length;iminScale)return true;if(Math.sign(previousWheelEvent.deltaY)!==Math.sign(event.deltaY))return true;if(previousWheelEvent.deltaY>0&&previousWheelEvent.deltaYevent.deltaY)return true;if(Math.sign(previousWheelEvent.deltaY)!==Math.sign(event.deltaY))return true;return false};var isPinchStartAllowed=function(contextInstance,event){var _a=contextInstance.setup.pinch,disabled=_a.disabled,excluded=_a.excluded;var isInitialized=contextInstance.isInitialized;var target=event.target;var isAllowed=isInitialized&&!disabled&⌖if(!isAllowed)return false;var isExcluded=isExcludedNode(target,excluded);if(isExcluded)return false;return true};var isPinchAllowed=function(contextInstance){var disabled=contextInstance.setup.pinch.disabled;var isInitialized=contextInstance.isInitialized,pinchStartDistance=contextInstance.pinchStartDistance;var isAllowed=isInitialized&&!disabled&&pinchStartDistance;if(!isAllowed)return false;return true};var calculateTouchMidPoint=function(event,scale,contentComponent){var contentRect=contentComponent.getBoundingClientRect();var touches=event.touches;var firstPointX=roundNumber(touches[0].clientX-contentRect.left,5);var firstPointY=roundNumber(touches[0].clientY-contentRect.top,5);var secondPointX=roundNumber(touches[1].clientX-contentRect.left,5);var secondPointY=roundNumber(touches[1].clientY-contentRect.top,5);return{x:(firstPointX+secondPointX)/2/scale,y:(firstPointY+secondPointY)/2/scale}};var getTouchDistance=function(event){return Math.sqrt(Math.pow(event.touches[0].pageX-event.touches[1].pageX,2)+Math.pow(event.touches[0].pageY-event.touches[1].pageY,2))};var calculatePinchZoom=function(contextInstance,currentDistance){var pinchStartScale=contextInstance.pinchStartScale,pinchStartDistance=contextInstance.pinchStartDistance,setup=contextInstance.setup;var maxScale=setup.maxScale,minScale=setup.minScale,zoomAnimation=setup.zoomAnimation,disablePadding=setup.disablePadding;var size=zoomAnimation.size,disabled=zoomAnimation.disabled;if(!pinchStartScale||pinchStartDistance===null||!currentDistance){throw new Error("Pinch touches distance was not provided")}if(currentDistance<0){return contextInstance.transformState.scale}var touchProportion=currentDistance/pinchStartDistance;var scaleDifference=touchProportion*pinchStartScale;return checkZoomBounds(roundNumber(scaleDifference,2),minScale,maxScale,size,!disabled&&!disablePadding)};var wheelStopEventTime=160;var wheelAnimationTime=100;var handleWheelStart=function(contextInstance,event){var _a=contextInstance.props,onWheelStart=_a.onWheelStart,onZoomStart=_a.onZoomStart;if(!contextInstance.wheelStopEventTimer){handleCancelAnimation(contextInstance);handleCallback(getContext(contextInstance),event,onWheelStart);handleCallback(getContext(contextInstance),event,onZoomStart)}};var handleWheelZoom=function(contextInstance,event){var _a=contextInstance.props,onWheel=_a.onWheel,onZoom=_a.onZoom;var contentComponent=contextInstance.contentComponent,setup=contextInstance.setup,transformState=contextInstance.transformState;var scale=transformState.scale;var limitToBounds=setup.limitToBounds,centerZoomedOut=setup.centerZoomedOut,zoomAnimation=setup.zoomAnimation,wheel=setup.wheel,disablePadding=setup.disablePadding;var size=zoomAnimation.size,disabled=zoomAnimation.disabled;var step=wheel.step;if(!contentComponent){throw new Error("Component not mounted")}event.preventDefault();event.stopPropagation();var delta=getDelta(event,null);var newScale=handleCalculateWheelZoom(contextInstance,delta,step,!event.ctrlKey);if(scale===newScale)return;var bounds=handleCalculateBounds(contextInstance,newScale);var mousePosition=getMousePosition(event,contentComponent,scale);var isPaddingDisabled=disabled||size===0||centerZoomedOut||disablePadding;var isLimitedToBounds=limitToBounds&&isPaddingDisabled;var _b=handleCalculateZoomPositions(contextInstance,mousePosition.x,mousePosition.y,newScale,bounds,isLimitedToBounds),x=_b.x,y=_b.y;contextInstance.previousWheelEvent=event;contextInstance.setTransformState(newScale,x,y);handleCallback(getContext(contextInstance),event,onWheel);handleCallback(getContext(contextInstance),event,onZoom)};var handleWheelStop=function(contextInstance,event){var _a=contextInstance.props,onWheelStop=_a.onWheelStop,onZoomStop=_a.onZoomStop;cancelTimeout(contextInstance.wheelAnimationTimer);contextInstance.wheelAnimationTimer=setTimeout((function(){if(!contextInstance.mounted)return;handleAlignToScaleBounds(contextInstance,event.x,event.y);contextInstance.wheelAnimationTimer=null}),wheelAnimationTime);var hasStoppedZooming=handleWheelZoomStop(contextInstance,event);if(hasStoppedZooming){cancelTimeout(contextInstance.wheelStopEventTimer);contextInstance.wheelStopEventTimer=setTimeout((function(){if(!contextInstance.mounted)return;contextInstance.wheelStopEventTimer=null;handleCallback(getContext(contextInstance),event,onWheelStop);handleCallback(getContext(contextInstance),event,onZoomStop)}),wheelStopEventTime)}};var handlePinchStart=function(contextInstance,event){var distance=getTouchDistance(event);contextInstance.pinchStartDistance=distance;contextInstance.lastDistance=distance;contextInstance.pinchStartScale=contextInstance.transformState.scale;contextInstance.isPanning=false;handleCancelAnimation(contextInstance)};var handlePinchZoom=function(contextInstance,event){var contentComponent=contextInstance.contentComponent,pinchStartDistance=contextInstance.pinchStartDistance;var scale=contextInstance.transformState.scale;var _a=contextInstance.setup,limitToBounds=_a.limitToBounds,centerZoomedOut=_a.centerZoomedOut,zoomAnimation=_a.zoomAnimation;var disabled=zoomAnimation.disabled,size=zoomAnimation.size;if(pinchStartDistance===null||!contentComponent)return;var midPoint=calculateTouchMidPoint(event,scale,contentComponent);if(!Number.isFinite(midPoint.x)||!Number.isFinite(midPoint.y))return;var currentDistance=getTouchDistance(event);var newScale=calculatePinchZoom(contextInstance,currentDistance);if(newScale===scale)return;var bounds=handleCalculateBounds(contextInstance,newScale);var isPaddingDisabled=disabled||size===0||centerZoomedOut;var isLimitedToBounds=limitToBounds&&isPaddingDisabled;var _b=handleCalculateZoomPositions(contextInstance,midPoint.x,midPoint.y,newScale,bounds,isLimitedToBounds),x=_b.x,y=_b.y;contextInstance.pinchMidpoint=midPoint;contextInstance.lastDistance=currentDistance;contextInstance.setTransformState(newScale,x,y)};var handlePinchStop=function(contextInstance){var pinchMidpoint=contextInstance.pinchMidpoint;contextInstance.velocity=null;contextInstance.lastDistance=null;contextInstance.pinchMidpoint=null;contextInstance.pinchStartScale=null;contextInstance.pinchStartDistance=null;handleAlignToScaleBounds(contextInstance,pinchMidpoint===null||pinchMidpoint===void 0?void 0:pinchMidpoint.x,pinchMidpoint===null||pinchMidpoint===void 0?void 0:pinchMidpoint.y)};var handleDoubleClickStop=function(contextInstance,event){var onZoomStop=contextInstance.props.onZoomStop;var animationTime=contextInstance.setup.doubleClick.animationTime;cancelTimeout(contextInstance.doubleClickStopEventTimer);contextInstance.doubleClickStopEventTimer=setTimeout((function(){contextInstance.doubleClickStopEventTimer=null;handleCallback(getContext(contextInstance),event,onZoomStop)}),animationTime)};var handleDoubleClickResetMode=function(contextInstance,event){var _a=contextInstance.props,onZoomStart=_a.onZoomStart,onZoom=_a.onZoom;var _b=contextInstance.setup.doubleClick,animationTime=_b.animationTime,animationType=_b.animationType;handleCallback(getContext(contextInstance),event,onZoomStart);resetTransformations(contextInstance,animationTime,animationType,(function(){return handleCallback(getContext(contextInstance),event,onZoom)}));handleDoubleClickStop(contextInstance,event)};function handleDoubleClick(contextInstance,event){var setup=contextInstance.setup,doubleClickStopEventTimer=contextInstance.doubleClickStopEventTimer,transformState=contextInstance.transformState,contentComponent=contextInstance.contentComponent;var scale=transformState.scale;var _a=contextInstance.props,onZoomStart=_a.onZoomStart,onZoom=_a.onZoom;var _b=setup.doubleClick,disabled=_b.disabled,mode=_b.mode,step=_b.step,animationTime=_b.animationTime,animationType=_b.animationType;if(disabled)return;if(doubleClickStopEventTimer)return;if(mode==="reset"){return handleDoubleClickResetMode(contextInstance,event)}if(!contentComponent)return console.error("No ContentComponent found");var delta=mode==="zoomOut"?-1:1;var newScale=handleCalculateButtonZoom(contextInstance,delta,step);if(scale===newScale)return;handleCallback(getContext(contextInstance),event,onZoomStart);var mousePosition=getMousePosition(event,contentComponent,scale);var targetState=handleZoomToPoint(contextInstance,newScale,mousePosition.x,mousePosition.y);if(!targetState){return console.error("Error during zoom event. New transformation state was not calculated.")}handleCallback(getContext(contextInstance),event,onZoom);animate(contextInstance,targetState,animationTime,animationType);handleDoubleClickStop(contextInstance,event)}var isDoubleClickAllowed=function(contextInstance,event){var isInitialized=contextInstance.isInitialized,setup=contextInstance.setup,wrapperComponent=contextInstance.wrapperComponent;var _a=setup.doubleClick,disabled=_a.disabled,excluded=_a.excluded;var target=event.target;var isWrapperChild=wrapperComponent===null||wrapperComponent===void 0?void 0:wrapperComponent.contains(target);var isAllowed=isInitialized&&target&&isWrapperChild&&!disabled;if(!isAllowed)return false;var isExcluded=isExcludedNode(target,excluded);if(isExcluded)return false;return true};var ZoomPanPinch=function(){function ZoomPanPinch2(props){var _this=this;this.mounted=true;this.onChangeCallbacks=new Set;this.wrapperComponent=null;this.contentComponent=null;this.isInitialized=false;this.bounds=null;this.previousWheelEvent=null;this.wheelStopEventTimer=null;this.wheelAnimationTimer=null;this.isPanning=false;this.startCoords=null;this.lastTouch=null;this.distance=null;this.lastDistance=null;this.pinchStartDistance=null;this.pinchStartScale=null;this.pinchMidpoint=null;this.doubleClickStopEventTimer=null;this.velocity=null;this.velocityTime=null;this.lastMousePosition=null;this.animate=false;this.animation=null;this.maxBounds=null;this.pressedKeys={};this.mount=function(){_this.initializeWindowEvents()};this.unmount=function(){_this.cleanupWindowEvents()};this.update=function(newProps){handleCalculateBounds(_this,_this.transformState.scale);_this.setup=createSetup(newProps)};this.initializeWindowEvents=function(){var _a;var passive=makePassiveEventOption();var currentDocument=(_a=_this.wrapperComponent)===null||_a===void 0?void 0:_a.ownerDocument;var currentWindow=currentDocument===null||currentDocument===void 0?void 0:currentDocument.defaultView;currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("mousedown",_this.onPanningStart,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("mousemove",_this.onPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("mouseup",_this.onPanningStop,passive);currentDocument===null||currentDocument===void 0?void 0:currentDocument.addEventListener("mouseleave",_this.clearPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("keyup",_this.setKeyUnPressed,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.addEventListener("keydown",_this.setKeyPressed,passive)};this.cleanupWindowEvents=function(){var _a,_b;var passive=makePassiveEventOption();var currentDocument=(_a=_this.wrapperComponent)===null||_a===void 0?void 0:_a.ownerDocument;var currentWindow=currentDocument===null||currentDocument===void 0?void 0:currentDocument.defaultView;currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("mousedown",_this.onPanningStart,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("mousemove",_this.onPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("mouseup",_this.onPanningStop,passive);currentDocument===null||currentDocument===void 0?void 0:currentDocument.removeEventListener("mouseleave",_this.clearPanning,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("keyup",_this.setKeyUnPressed,passive);currentWindow===null||currentWindow===void 0?void 0:currentWindow.removeEventListener("keydown",_this.setKeyPressed,passive);document.removeEventListener("mouseleave",_this.clearPanning,passive);handleCancelAnimation(_this);(_b=_this.observer)===null||_b===void 0?void 0:_b.disconnect()};this.handleInitializeWrapperEvents=function(wrapper){var passive=makePassiveEventOption();wrapper.addEventListener("wheel",_this.onWheelZoom,passive);wrapper.addEventListener("dblclick",_this.onDoubleClick,passive);wrapper.addEventListener("touchstart",_this.onTouchPanningStart,passive);wrapper.addEventListener("touchmove",_this.onTouchPanning,passive);wrapper.addEventListener("touchend",_this.onTouchPanningStop,passive)};this.handleInitialize=function(contentComponent){var centerOnInit=_this.setup.centerOnInit;_this.applyTransformation();if(centerOnInit){_this.setCenter();_this.observer=new ResizeObserver((function(){var _a;_this.setCenter();(_a=_this.observer)===null||_a===void 0?void 0:_a.disconnect()}));_this.observer.observe(contentComponent)}};this.onWheelZoom=function(event){var disabled=_this.setup.disabled;if(disabled)return;var isAllowed=isWheelAllowed(_this,event);if(!isAllowed)return;var keysPressed=_this.isPressingKeys(_this.setup.wheel.activationKeys);if(!keysPressed)return;handleWheelStart(_this,event);handleWheelZoom(_this,event);handleWheelStop(_this,event)};this.onPanningStart=function(event){var disabled=_this.setup.disabled;var onPanningStart=_this.props.onPanningStart;if(disabled)return;var isAllowed=isPanningStartAllowed(_this,event);if(!isAllowed)return;var keysPressed=_this.isPressingKeys(_this.setup.panning.activationKeys);if(!keysPressed)return;event.preventDefault();event.stopPropagation();handleCancelAnimation(_this);handlePanningStart(_this,event);handleCallback(getContext(_this),event,onPanningStart)};this.onPanning=function(event){var disabled=_this.setup.disabled;var onPanning=_this.props.onPanning;if(disabled)return;var isAllowed=isPanningAllowed(_this);if(!isAllowed)return;var keysPressed=_this.isPressingKeys(_this.setup.panning.activationKeys);if(!keysPressed)return;event.preventDefault();event.stopPropagation();handlePanning(_this,event.clientX,event.clientY);handleCallback(getContext(_this),event,onPanning)};this.onPanningStop=function(event){var onPanningStop=_this.props.onPanningStop;if(_this.isPanning){handlePanningEnd(_this);handleCallback(getContext(_this),event,onPanningStop)}};this.onPinchStart=function(event){var disabled=_this.setup.disabled;var _a=_this.props,onPinchingStart=_a.onPinchingStart,onZoomStart=_a.onZoomStart;if(disabled)return;var isAllowed=isPinchStartAllowed(_this,event);if(!isAllowed)return;handlePinchStart(_this,event);handleCancelAnimation(_this);handleCallback(getContext(_this),event,onPinchingStart);handleCallback(getContext(_this),event,onZoomStart)};this.onPinch=function(event){var disabled=_this.setup.disabled;var _a=_this.props,onPinching=_a.onPinching,onZoom=_a.onZoom;if(disabled)return;var isAllowed=isPinchAllowed(_this);if(!isAllowed)return;event.preventDefault();event.stopPropagation();handlePinchZoom(_this,event);handleCallback(getContext(_this),event,onPinching);handleCallback(getContext(_this),event,onZoom)};this.onPinchStop=function(event){var _a=_this.props,onPinchingStop=_a.onPinchingStop,onZoomStop=_a.onZoomStop;if(_this.pinchStartScale){handlePinchStop(_this);handleCallback(getContext(_this),event,onPinchingStop);handleCallback(getContext(_this),event,onZoomStop)}};this.onTouchPanningStart=function(event){var disabled=_this.setup.disabled;var onPanningStart=_this.props.onPanningStart;if(disabled)return;var isAllowed=isPanningStartAllowed(_this,event);if(!isAllowed)return;var isDoubleTap=_this.lastTouch&&+new Date-_this.lastTouch<200;if(isDoubleTap&&event.touches.length===1){_this.onDoubleClick(event)}else{_this.lastTouch=+new Date;handleCancelAnimation(_this);var touches=event.touches;var isPanningAction=touches.length===1;var isPinchAction=touches.length===2;if(isPanningAction){handleCancelAnimation(_this);handlePanningStart(_this,event);handleCallback(getContext(_this),event,onPanningStart)}if(isPinchAction){_this.onPinchStart(event)}}};this.onTouchPanning=function(event){var disabled=_this.setup.disabled;var onPanning=_this.props.onPanning;if(_this.isPanning&&event.touches.length===1){if(disabled)return;var isAllowed=isPanningAllowed(_this);if(!isAllowed)return;event.preventDefault();event.stopPropagation();var touch=event.touches[0];handlePanning(_this,touch.clientX,touch.clientY);handleCallback(getContext(_this),event,onPanning)}else if(event.touches.length>1){_this.onPinch(event)}};this.onTouchPanningStop=function(event){_this.onPanningStop(event);_this.onPinchStop(event)};this.onDoubleClick=function(event){var disabled=_this.setup.disabled;if(disabled)return;var isAllowed=isDoubleClickAllowed(_this,event);if(!isAllowed)return;handleDoubleClick(_this,event)};this.clearPanning=function(event){if(_this.isPanning){_this.onPanningStop(event)}};this.setKeyPressed=function(e){_this.pressedKeys[e.key]=true};this.setKeyUnPressed=function(e){_this.pressedKeys[e.key]=false};this.isPressingKeys=function(keys){if(!keys.length){return true}return Boolean(keys.find((function(key){return _this.pressedKeys[key]})))};this.setTransformState=function(scale,positionX,positionY){var onTransformed=_this.props.onTransformed;if(!Number.isNaN(scale)&&!Number.isNaN(positionX)&&!Number.isNaN(positionY)){if(scale!==_this.transformState.scale){_this.transformState.previousScale=_this.transformState.scale;_this.transformState.scale=scale}_this.transformState.positionX=positionX;_this.transformState.positionY=positionY;var ctx_1=getContext(_this);_this.onChangeCallbacks.forEach((function(callback){return callback(ctx_1)}));handleCallback(ctx_1,{scale:scale,positionX:positionX,positionY:positionY},onTransformed);_this.applyTransformation()}else{console.error("Detected NaN set state values")}};this.setCenter=function(){if(_this.wrapperComponent&&_this.contentComponent){var targetState=getCenterPosition(_this.transformState.scale,_this.wrapperComponent,_this.contentComponent);_this.setTransformState(targetState.scale,targetState.positionX,targetState.positionY)}};this.handleTransformStyles=function(x,y,scale){if(_this.props.customTransform){return _this.props.customTransform(x,y,scale)}return getTransformStyles(x,y,scale)};this.applyTransformation=function(){if(!_this.mounted||!_this.contentComponent)return;var _a=_this.transformState,scale=_a.scale,positionX=_a.positionX,positionY=_a.positionY;var transform=_this.handleTransformStyles(positionX,positionY,scale);_this.contentComponent.style.transform=transform};this.getContext=function(){return getContext(_this)};this.onChange=function(callback){if(!_this.onChangeCallbacks.has(callback)){_this.onChangeCallbacks.add(callback)}return function(){_this.onChangeCallbacks.delete(callback)}};this.init=function(wrapperComponent,contentComponent){_this.cleanupWindowEvents();_this.wrapperComponent=wrapperComponent;_this.contentComponent=contentComponent;handleCalculateBounds(_this,_this.transformState.scale);_this.handleInitializeWrapperEvents(wrapperComponent);_this.handleInitialize(contentComponent);_this.initializeWindowEvents();_this.isInitialized=true;handleCallback(getContext(_this),void 0,_this.props.onInit)};this.props=props;this.setup=createSetup(this.props);this.transformState=createState(this.props)}return ZoomPanPinch2}();var Context=React__default.createContext(null);var getContent=function(children,ctx){if(typeof children==="function"){return children(ctx)}return children};var TransformWrapper=React__default.forwardRef((function(props,ref){var _a=useState(0),forceUpdate=_a[1];var children=props.children;var instance=useRef(new ZoomPanPinch(props)).current;var content=getContent(props.children,getContext(instance));var handleOnChange=useCallback((function(){if(typeof children==="function"){forceUpdate((function(prev){return prev+1}))}}),[children]);useImperativeHandle(ref,(function(){return getContext(instance)}),[instance]);useEffect((function(){instance.update(props)}),[instance,props]);useEffect((function(){return instance.onChange(handleOnChange)}),[instance,props,handleOnChange]);return React__default.createElement(Context.Provider,{value:instance},content)}));function styleInject(css,ref){if(ref===void 0)ref={};var insertAt=ref.insertAt;if(typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}}var css_248z=".transform-component-module_wrapper__7HFJe {\n position: relative;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n overflow: hidden;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none;\n margin: 0;\n padding: 0;\n}\n.transform-component-module_content__uCDPE {\n display: flex;\n flex-wrap: wrap;\n width: -moz-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: fit-content;\n margin: 0;\n padding: 0;\n transform-origin: 0% 0%;\n}\n.transform-component-module_content__uCDPE img {\n pointer-events: none;\n}\n";var styles={wrapper:"transform-component-module_wrapper__7HFJe",content:"transform-component-module_content__uCDPE"};styleInject(css_248z);var TransformComponent=function(_a){var children=_a.children,_b=_a.wrapperClass,wrapperClass=_b===void 0?"":_b,_c=_a.contentClass,contentClass=_c===void 0?"":_c,wrapperStyle=_a.wrapperStyle,contentStyle=_a.contentStyle,_d=_a.wrapperProps,wrapperProps=_d===void 0?{}:_d,_e=_a.contentProps,contentProps=_e===void 0?{}:_e;var init=useContext(Context).init;var wrapperRef=useRef(null);var contentRef=useRef(null);useEffect((function(){var wrapper=wrapperRef.current;var content=contentRef.current;if(wrapper!==null&&content!==null&&init){init(wrapper,content)}}),[]);return React__default.createElement("div",__assign({},wrapperProps,{ref:wrapperRef,className:"react-transform-wrapper ".concat(styles.wrapper," ").concat(wrapperClass),style:wrapperStyle}),React__default.createElement("div",__assign({},contentProps,{ref:contentRef,className:"react-transform-component ".concat(styles.content," ").concat(contentClass),style:contentStyle}),children))};React__default.forwardRef((function(props,ref){var localRef=useRef(null);var instance=useContext(Context);useEffect((function(){return instance.onChange((function(ctx){if(localRef.current){var positionX=0;var positionY=0;localRef.current.style.transform=instance.handleTransformStyles(positionX,positionY,1/ctx.state.scale)}}))}),[instance]);return React__default.createElement("div",__assign({},props,{ref:mergeRefs([localRef,ref])}))}));function Slide({alt:alt,onClick:onClick=noop$4,onZoom:onZoom=noop$4,url:url,zooming:zooming=false}){const handlePinchingStop=({state:state})=>{const isZooming=state.scale>1;onZoom(isZooming)};return jsx(TransformWrapper,{doubleClick:{mode:"reset"},initialScale:1,onPinchingStop:handlePinchingStop,panning:{disabled:!zooming},children:jsx("button",{className:"Slide",onClick:onClick,onDoubleClick:()=>onZoom(false),tabIndex:-1,children:jsx(TransformComponent,{wrapperClass:"TransformComponent",children:jsx(Image,{alt:alt,url:url,zIndex:3})})})})}function Slides({urls:urls=[],current:current=0,onChange:onChange=noop$4,setIndex:setIndex}){const[zooming,setZooming]=useState(false);const[touchStart,setTouchStart]=useState(null);const[touchEnd,setTouchEnd]=useState(null);const minSwipeDistance=40;const onTouchStart=e=>{setTouchEnd(null);setTouchStart(e.targetTouches[0].clientX)};const onTouchMove=e=>setTouchEnd(e.targetTouches[0].clientX);const onTouchEnd=()=>{if(!touchStart||!touchEnd)return;const distance=touchStart-touchEnd;const isLeftSwipe=distance>minSwipeDistance;const isRightSwipe=distance<-minSwipeDistance;if(isLeftSwipe){setIndex(current0?current-1:0)}};const arrowLeft=()=>setIndex(current>0?current-1:0);const arrowRight=()=>setIndex(currentsetZooming(isZooming);return jsxs("div",{className:"Slides",onTouchEnd:onTouchEnd,onTouchMove:onTouchMove,onTouchStart:onTouchStart,children:[urls.length>1&&jsx(CircleIconButton,{className:"carousel-arrow-left",dark:true,icon:"chevron-left",onClick:arrowLeft,variant:"link"}),jsx(Slide,{onClick:()=>onChange(current),onZoom:handleZoom,url:urls[current],zooming:zooming}),urls.length>1&&jsx(CircleIconButton,{className:"carousel-arrow-right",dark:true,icon:"chevron-right",onClick:arrowRight,variant:"link"})]})}const useWindowSize=()=>{const[size,setSize]=useState({width:window.innerWidth,height:window.innerHeight});useEffect((()=>{const handleResize=()=>{setSize({width:window.innerWidth,height:window.innerHeight})};window.addEventListener("resize",handleResize);handleResize();return()=>window.removeEventListener("resize",handleResize)}),[]);return size};function Thumbnail({active:active=false,alt:alt,width:width,url:url,onClick:onClick,buttonRef:buttonRef}){const activeClasses=classnames("Thumbnail",{active:active});return jsx("button",{className:classnames(activeClasses),onClick:onClick,ref:buttonRef,style:{width:width},type:"button",children:jsx(Image,{alt:alt,size:"sm",url:url})})}function Thumbnails({current:current=0,onChange:onChange=noop$4,urls:urls=[]}){const viewportSize=useWindowSize();const thumbnailWidth=viewportSize.width/8;const shouldBeCentered=thumbnailWidth*urls.length{var _a,_b,_c;if(shouldBeCentered)return;const currentThumbnail=otherProps.buttonRef.current;const thumbWidth=currentThumbnail.clientWidth,scrollLeft=thumbWidth*current,firstThumb=thumbnailsRef.current.querySelector(".Thumbnail:first-child"),lastThumb=thumbnailsRef.current.querySelector(".Thumbnail:last-child");firstThumb.style.marginLeft=`${((_a=thumbnailsRef.current)==null?void 0:_a.clientWidth)/2-thumbWidth/2}px`;lastThumb.style.marginRight=`${((_b=thumbnailsRef.current)==null?void 0:_b.clientWidth)/2-thumbWidth/2}px`;(_c=thumbnailsRef.current)==null?void 0:_c.scrollTo(scrollLeft,0)}));return jsx("div",{className:css,ref:thumbnailsRef,children:urls.map(((url,i)=>{const active=i===current;if(active)otherProps.buttonRef=React__default.createRef();return jsx(Thumbnail,{active:active,alt:i.toString(),onClick:()=>onChange(i),url:url,...otherProps},i)}))})}function Carousel({currentIndex:currentIndex,photos:photos,onClick:onClick,onChange:onChange=()=>void 0,setIndex:setIndex}){useEffect((()=>{document.body.style.overflow="hidden";return()=>{document.body.style.overflow="initial"}}),[]);const handleChange=index=>{onChange(index)};return jsxs("div",{className:"Lightbox",children:[jsx(Slides,{current:currentIndex,onChange:handleChange,onClick:onClick,setIndex:setIndex,urls:photos.map((photo=>photo.url))}),photos.length>1?jsx(Thumbnails,{current:currentIndex,onChange:handleChange,urls:photos.map((photo=>photo.thumbnail))}):null]})}const Lightbox=props=>{const{aria:aria={},children:children,className:className,currentPhotoIndex:currentPhotoIndex,data:data={},description:description,htmlOptions:htmlOptions={},id:id="",initialPhoto:initialPhoto=0,photos:photos,onChange:onChange=()=>void 0,onClose:onClose,onClickRight:onClickRight,icon:icon="times",navRight:navRight,title:title}=props;const[activePhoto,setActivePhoto]=useState(initialPhoto);useEffect((()=>{onChange(activePhoto)}),[activePhoto]);useEffect((()=>{currentPhotoIndex!==void 0&¤tPhotoIndex!==null&&setActivePhoto(currentPhotoIndex)}),[currentPhotoIndex]);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_lightbox_kit"),globalProps(props),className);const handleOnSlide=photoIndex=>{setActivePhoto(photoIndex)};const photosMap=useMemo((()=>photos.map((photo=>({url:photo,thumbnail:photo})))),[photos]);const api={onClose:onClose,onArrowLeft:()=>{setActivePhoto(activePhoto>0?activePhoto-1:0)},onArrowRight:()=>{const nextPhoto=activePhotojsx(Button,{className:"pb_map-custom-button",onClick:onClick,children:jsx(Icon,{icon:icon})});const MapControls=({zoomBtns:zoomBtns,zoomInClick:zoomInClick,zoomOutClick:zoomOutClick,flyTo:flyTo,flyToClick:flyToClick,children:children})=>jsxs(Flex,{className:"custom-nav-control",orientation:"column",children:[zoomBtns?jsxs(Fragment,{children:[jsxs("div",{className:"custom-nav-control-zoom",children:[jsx(Button,{className:"map-zoom-in-button",onClick:zoomInClick,children:jsx(Icon,{icon:"plus"})}),jsx(Button,{className:"map-zoom-out-button",onClick:zoomOutClick,children:jsx(Icon,{icon:"minus"})})]}),flyTo?jsx(Button,{className:"map-flyto-button",onClick:flyToClick,children:jsx(Icon,{icon:"eye"})}):null]}):null,children]});const Map$1=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,zoomBtns:zoomBtns=false,flyTo:flyTo=false,zoomInClick:zoomInClick,zoomOutClick:zoomOutClick,flyToClick:flyToClick}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_map"),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[zoomBtns?jsx(Map$1.Controls,{flyTo:flyTo,flyToClick:flyToClick,zoomBtns:zoomBtns,zoomInClick:zoomInClick,zoomOutClick:zoomOutClick}):null,children]})};Map$1.Controls=MapControls;const Timestamp=props=>{const{align:align="left",aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},text:text2,timezone:timezone,timestamp:timestamp,showDate:showDate=true,showUser:showUser=false,hideUpdated:hideUpdated=false,showTimezone:showTimezone=false,unstyled:unstyled=false,variant:variant="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_timestamp_kit",align,{dark:dark,variant:variant}),globalProps(props),className);const currentYear=(new Date).getFullYear().toString();const dateDisplay=`${DateTime$1.toMonth(timestamp,timezone)} ${DateTime$1.toDay(timestamp,timezone)}`;const shouldShowUser=showUser==true&&text2.length>0;const shouldShowTimezone=showTimezone==true&&timezone.length>0;const updatedText=hideUpdated?"":"Last updated";const userDisplay=shouldShowUser?` by ${text2}`:"";let timeDisplay=`${DateTime$1.toHour(timestamp,timezone)}:${DateTime$1.toMinute(timestamp,timezone)}${DateTime$1.toMeridiem(timestamp,timezone)}`;const fullTimeDisplay=()=>{if(shouldShowTimezone){timeDisplay=`${timeDisplay} ${DateTime$1.toTimeZone(timestamp,timezone)}`}return timeDisplay};const fullDateDisplay=()=>{let fullDisplay=`${DateTime$1.toMonth(timestamp,timezone)} ${DateTime$1.toDay(timestamp,timezone)}`;if(DateTime$1.toYear(timestamp,timezone).toString()!==currentYear){fullDisplay=`${fullDisplay}, ${DateTime$1.toYear(timestamp,timezone)}`}return`${fullDisplay} ${" · "} ${fullTimeDisplay()}`};const formatUpdatedString=()=>`Last updated ${userDisplay} on ${dateDisplay} at ${timeDisplay}`;const formatElapsedString=()=>`${updatedText} ${userDisplay} ${DateTime$1.fromNow(timestamp)}`;const timestampText=()=>{switch(variant){case"updated":return formatUpdatedString();case"elapsed":return formatElapsedString();default:return showDate?timestamp?fullDateDisplay():text2:fullTimeDisplay()}};return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:jsx("div",{className:"pb_timestamp_kit",children:unstyled?jsx("div",{children:timestampText()}):jsx(Caption,{dark:dark,size:"xs",text:timestampText()})})})};const MessageMention=props=>{const{aria:aria={},children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,variant:variant="user"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_message_mention",variant),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:children})};const Message=props=>{const{aria:aria={},avatarName:avatarName,avatarStatus:avatarStatus=null,avatarUrl:avatarUrl,children:children,className:className,data:data={},htmlOptions:htmlOptions={},id:id,label:label,message:message,timestamp:timestamp,timestampObject:timestampObject,timezone:timezone,alignTimestamp:alignTimestamp="right"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const shouldDisplayAvatar=avatarUrl||avatarName;const baseClassName=shouldDisplayAvatar?"pb_message_kit_avatar":"pb_message_kit";const classes=classnames(buildCss(baseClassName),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[shouldDisplayAvatar&&jsx(Avatar,{imageUrl:avatarUrl,name:avatarName,size:"xs",status:avatarStatus}),jsxs("div",{className:"content_wrapper",children:[jsxs(Flex,{justify:alignTimestamp==="left"?"none":"between",orientation:"row",children:[label&&jsx(Title,{className:"message_title",size:4,text:label}),jsx(Timestamp,{className:`pull-${alignTimestamp} ${timestampObject?"message_humanized_time":null}`,text:timestamp,timestamp:"",timezone:timezone}),timestampObject&&jsx(Timestamp,{className:`pull-${alignTimestamp} message_timestamp`,text:"",timestamp:timestampObject,timezone:timezone})]}),message&&jsx(Body$1,{className:"pb_message_body",text:message}),children]})]})};Message.Mention=MessageMention;const MultipleUsers=props=>{const{aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,maxDisplayedUsers:maxDisplayedUsers=4,reverse:reverse=false,size:size="xs",users:users}=props;const displayCount=users.length>maxDisplayedUsers?maxDisplayedUsers-1:users.length;const usersToDisplay=users.slice(0,displayCount);const reverseClass=reverse===true?"reverse":"";const avatarSizeClass=size==="xxs"?"xxs":"xs";const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_multiple_users_kit",reverseClass),globalProps(props),className);const itemClasses=classnames("pb_multiple_users_item",buildCss("multiple_users_badge",avatarSizeClass));return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[usersToDisplay.map(((avatarData,index)=>createElement(Avatar,{...avatarData,className:"pb_multiple_users_item",dark:dark,imageAlt:avatarData.name,key:index,size:size}))),users.length>maxDisplayedUsers&&jsx("div",{className:itemClasses,children:`+${users.length-3}`})]})};const MultipleUsersStacked=props=>{const{aria:aria={},className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},id:id,users:users}=props;const moreThanTwo=users.length>2;const onlyOne=users.length==1;const displayCount=()=>moreThanTwo?1:users.length;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_multiple_users_stacked_kit",{single:onlyOne}),globalProps(props),className);const firstUser=()=>users.slice(0,1).map(((userObject,index)=>createElement(Avatar,{...userObject,className:"pb_multiple_users_stacked_item",dark:dark,key:index,size:"xs"})));const secondUser=()=>{if(moreThanTwo===false){return users.slice(1,2).map(((userObject,index)=>createElement(Avatar,{...userObject,className:"pb_multiple_users_stacked_item second_item",dark:dark,key:index,size:"xs"})))}};const plusUsers=()=>{if(moreThanTwo===true){return jsx(Badge,{className:"pb_multiple_users_stacked_item second_item",dark:dark,rounded:true,text:`+${users.length-displayCount()}`,variant:"primary"})}};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[firstUser(),secondUser(),plusUsers()]})};const previousOverlayDirectionMap$1={bottom:"to top",top:"to bottom",left:"to right",right:"to left",x:"to right",y:"to top"};const subsequentOverlayDirectionMap$1={...previousOverlayDirectionMap$1,x:"to left",y:"to bottom"};const OverlayPercentage=props=>{const{children:children,color:color,position:position,size:size}=props;const getPreviousOverlayDirection=()=>previousOverlayDirectionMap$1[position];const getSubsequentOverlayDirection=()=>subsequentOverlayDirectionMap$1[position];const hasSubsequentOverlay=position==="x"||position==="y";const previousOverlay=`linear-gradient(${getPreviousOverlayDirection()}, ${colors[color]} 0%, transparent ${size})`;const subsequentOverlay=`linear-gradient(${getSubsequentOverlayDirection()}, ${colors[color]} 0%, transparent ${size})`;return jsxs(Fragment,{children:[jsx("div",{className:"overlay_linear_gradient",style:{background:previousOverlay}}),children,hasSubsequentOverlay&&jsx("div",{className:"overlay_linear_gradient",style:{background:subsequentOverlay}})]})};const previousOverlayDirectionMap={x:"left",y:"top"};const subsequentOverlayDirectionMap={x:"right",y:"bottom"};const OverlayToken=props=>{const{children:children,color:color,position:position,size:size}=props;const hasSubsequentOverlay=position==="x"||position==="y";const getPreviousOverlayDirection=()=>hasSubsequentOverlay?previousOverlayDirectionMap[position]:position;const getSubsequentOverlayDirection=()=>hasSubsequentOverlay?subsequentOverlayDirectionMap[position]:position;const previousOverlayClassName=`overlay_${color}_${getPreviousOverlayDirection()}_${size}`;const subsequentOverlayClassName=`overlay_${color}_${getSubsequentOverlayDirection()}_${size}`;return jsxs(Fragment,{children:[jsx("div",{className:previousOverlayClassName}),children,hasSubsequentOverlay&&jsx("div",{className:subsequentOverlayClassName})]})};const Overlay=props=>{const{aria:aria={},className:className,children:children,color:color="card_light",data:data={},htmlOptions:htmlOptions={},id:id,layout:layout={bottom:"full"}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const classes=classnames(buildCss("pb_overlay"),globalProps(props),className);const htmlProps=buildHtmlProps(htmlOptions);const getPosition=()=>Object.keys(layout)[0];const getSize2=()=>Object.values(layout)[0];const isSizePercentage=getSize2().includes("%");return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:isSizePercentage?OverlayPercentage({children:children,color:color,position:getPosition(),size:getSize2()}):OverlayToken({children:children,color:color,position:getPosition(),size:getSize2()})})};const Pagination=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,current:current=1,onChange:onChange,range:range=5,total:total=1}=props;const[currentPage,setCurrentPage]=useState(current);const handlePageChange=pageNumber=>{if(pageNumber>=1&&pageNumber<=total){setCurrentPage(pageNumber);if(onChange){onChange(pageNumber)}}};const renderPageButtons=()=>{const buttons=[];let rangeStart=Math.max(1,currentPage-Math.floor(range/2));let rangeEnd=Math.min(total,rangeStart+range-1);if(rangeEnd-rangeStart+11){rangeStart=Math.max(1,rangeEnd-range+1)}else{rangeEnd=Math.min(total,rangeStart+range-1)}}if(rangeStart>1){buttons.push(jsx("li",{className:"pagination-number",onClick:()=>handlePageChange(1),children:"1"},1))}if(rangeStart>2){buttons.push(jsx("li",{className:"pagination-number",onClick:()=>handlePageChange(2),children:"2"},2))}for(let i=rangeStart;i<=rangeEnd;i++){buttons.push(jsx("li",{className:`pagination-number ${i===currentPage?"active":""}`,onClick:()=>handlePageChange(i),children:i},i))}if(rangeEndhandlePageChange(total-1),children:total-1},total-1))}if(rangeEndhandlePageChange(total),children:total},total))}return buttons};const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_paginate"),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsxs("div",{className:"pb_pagination",children:[jsx("li",{className:`pagination-left ${currentPage===1?"disabled":""}`,onClick:()=>handlePageChange(currentPage-1),children:jsx(Icon,{icon:"chevron-left"})}),renderPageButtons(),jsx("li",{className:`pagination-right ${currentPage===total?"disabled":""}`,onClick:()=>handlePageChange(currentPage+1),children:jsx(Icon,{icon:"chevron-right"})})]})})};const Person=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},firstName:firstName,id:id,lastName:lastName}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_person_kit"),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Body$1,{className:"pb_person_first",tag:"span",children:firstName}),lastName&&jsx(Title,{className:"pb_person_first",size:4,text:` ${lastName}`})]})};const PersonContact=props=>{const{aria:aria={},className:className,contacts:contacts=[],data:data={},firstName:firstName,htmlOptions:htmlOptions={},id:id,lastName:lastName}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_person_contact_kit"),globalProps(props),className);const wrongContacts=()=>contacts.filter((contactObject=>contactObject.contactType==="wrong-phone"));const validContacts=()=>contacts.filter((contactObject=>contactObject.contactType!=="wrong-phone"));return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Person,{firstName:firstName,lastName:lastName}),validContacts().map(((contactObject,index)=>jsx(Contact,{contactDetail:contactObject.contactDetail,contactType:contactObject.contactType,contactValue:contactObject.contactValue},`valid-contact-${index}`))),wrongContacts().map(((contactObject,index)=>jsxs("div",{children:[jsx(Caption,{className:"wrong_numbers",text:"wrong number"},`wrong-contact-caption-${index}`),jsx(Contact,{contactType:contactObject.contactType,contactValue:contactObject.contactValue},`wrong-contact-${index}`)]},`wrong-contact-caption-wrapper-${index}`)))]})};const ProgressPill=({active:active,dark:dark,steps:step})=>jsx("div",{className:`pb_progress_pill${step<=active?"_active":"_inactive"}${dark?" dark":""}`},step);const showSteps=(steps,active,dark)=>{const items=[];for(let step=1;step<=steps;step++){items.push(ProgressPill({steps:step,active:active,dark:dark}))}return items};const ProgressPills=props=>{const{active:active=0,aria:aria={hidden:"true"},className:className,data:data={},htmlOptions:htmlOptions={},id:id,steps:steps=3,title:title,value:value,dark:dark=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_progress_pills_kit"),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[title&&jsxs("div",{className:"progress_pills_status",children:[jsx(Title,{dark:dark,size:4,tag:"h4",text:title}),jsx(Body$1,{color:"light",dark:dark,text:value})]}),jsx("div",{className:"progress_pills",children:showSteps(steps,active,dark)})]})};const ProgressSimple=props=>{const{align:align,className:className,dark:dark=false,data:data={},htmlOptions:htmlOptions={},max:max2,muted:muted=false,percent:percent="",value:value,variant:variant="default",width:width="100%"}=props;const styles2={width:width};const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const variantStyle=variant=="default"?"":variant;const valueStyles={width:percent?`${percent}%`:`${value*100/max2}%`};const wrapperClass=classnames(buildCss("pb_progress_simple_wrapper",align,{dark:dark}),globalProps(props),className);const kitClass=classnames(buildCss("pb_progress_simple_kit",{muted:muted},variantStyle,align),className);return jsx("div",{...dataProps,...htmlProps,className:wrapperClass,children:jsx("div",{className:kitClass,"data-value":value,style:styles2,children:jsx("div",{className:"progress_simple_value",style:valueStyles})})})};const ProgressStep=props=>{const{aria:aria={},className:className,children:children,color:color,data:data={},orientation:orientation="horizontal",htmlOptions:htmlOptions={},icon:icon=false,showIcon:showIcon=false,variant:variant}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const iconStyle=icon===true||showIcon===true?"icon":"";const progressStepCss=buildCss("pb_progress_step_kit",orientation,iconStyle,variant,color);return jsx("ul",{...ariaProps,...dataProps,...htmlProps,className:classnames(progressStepCss,globalProps(props),className),children:children})};const ProgressStepItem=props=>{const{className:className,data:data={},status:status="inactive",children:children,htmlOptions:htmlOptions={},icon:icon="check"}=props;const progressStepItem=buildCss("pb_progress_step_item",status);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);return jsx("li",{...dataProps,...htmlProps,className:classnames(progressStepItem,className),children:jsxs("div",{className:"box",children:[jsx("div",{className:"circle",children:jsx(Icon,{icon:icon})}),jsx("div",{className:"content",children:children})]})})};const createOptions=options=>options.map(((option,index)=>jsx("option",{disabled:option.disabled,value:option.value,children:option.text||option.value},index)));const Select=({aria:aria={},blankSelection:blankSelection,children:children,className:className,compact:compact=false,data:data={},disabled:disabled=false,error:error,label:label,htmlOptions:htmlOptions={},inline:inline=false,multiple:multiple=false,name:name,onChange:onChange=()=>void 0,options:options=[],required:required=false,showArrow:showArrow=false,value:value,...props},ref)=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const optionsList=createOptions(options);const inlineClass=inline?"inline":null;const compactClass=compact?"compact":null;const classes=classnames(buildCss("pb_select"),globalProps({...props,marginBottom:props.marginBottom||props.margin||"sm"}),className,inlineClass,{show_arrow:showArrow},compactClass);const selectWrapperClass=classnames(buildCss("pb_select_kit_wrapper"),{error:error},className);const selectBody=(()=>{if(children)return children;return jsxs("select",{...htmlOptions,...domSafeProps(props),disabled:disabled,id:name,multiple:multiple,name:name,onChange:onChange,ref:ref,required:required,value:value,children:[blankSelection&&jsx("option",{value:"",children:blankSelection}),optionsList]})})();return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[label&&jsx("label",{className:"pb_select_kit_label",htmlFor:name,children:jsx(Caption,{text:label})}),jsxs("label",{className:selectWrapperClass,htmlFor:name,children:[selectBody,multiple!==true?jsx(Icon,{className:"pb_select_kit_caret",fixedWidth:true,icon:"angle-down"}):null,error&&jsx(Body$1,{status:"negative",text:error})]})]})};const Select$1=forwardRef(Select);const SelectableCard=props=>{const{aria:aria={},checked:checked=false,className:className,customIcon:customIcon,dark:dark=false,data:data={},disabled:disabled=false,error:error=false,htmlOptions:htmlOptions={},icon:icon=false,inputId:inputId=null,multi:multi=true,name:name,onChange:onChange=noop$3,text:text2,value:value,variant:variant="default"}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_card_kit",{checked:checked,disabled:disabled,enabled:!disabled}),{error:error},dark?"dark":"",className);const displayIcon2=()=>{if(icon===true){return jsx("div",{className:"pb_selectable_card_circle",children:jsx(Icon,{customIcon:customIcon,fixedWidth:true,icon:"check"})})}};const inputRef=useRef(null);const handleClick=()=>{inputRef.current.click()};const inputType=multi?"checkbox":"radio";const inputIdPresent=inputId!==null?inputId:name;const Input=multi?Checkbox:Radio;const filteredProps={...props};filteredProps==null?true:delete filteredProps.inputId;filteredProps==null?true:delete filteredProps.children;filteredProps==null?true:delete filteredProps.icon;filteredProps==null?true:delete filteredProps.error;filteredProps==null?true:delete filteredProps.dark;filteredProps==null?true:delete filteredProps.multi;filteredProps==null?true:delete filteredProps.customIcon;const labelProps=variant==="displayInput"?{...filteredProps,padding:"none"}:{...filteredProps};return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[jsx("input",{checked:checked,disabled:disabled,id:inputIdPresent,name:name,onChange:onChange,ref:inputRef,type:inputType,value:value,...filteredProps}),jsxs("label",{className:globalProps(labelProps),htmlFor:inputIdPresent,children:[variant==="displayInput"?jsxs(Flex,{vertical:"center",children:[jsx(Flex,{orientation:"column",padding:"sm",paddingRight:"xs",vertical:"center",children:jsx(Input,{dark:dark,children:jsx("input",{checked:checked,disabled:disabled,onClick:handleClick,readOnly:true,type:inputType})})}),jsx("div",{className:"separator"}),jsx("div",{className:"psuedo_separator"}),jsx(Card,{borderNone:true,dark:dark,padding:"sm",status:error?"negative":null,children:text2||props.children})]}):text2||props.children,displayIcon2()]})]})};const SelectableIcon=({aria:aria={},className:className,checked:checked=false,customIcon:customIcon,data:data={},disabled:disabled=false,htmlOptions:htmlOptions={},icon:icon,inputId:inputId,inputs:inputs="enabled",multi:multi=true,name:name,text:text2,value:value,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_icon_kit",{checked:checked,disabled:disabled,enabled:!disabled}),globalProps(props),className);const inputType=multi===false?"radio":"checkbox";const inputIdPresent=inputId!==null?inputId:name;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[inputs==="disabled"&&jsxs(Fragment,{children:[jsx(Icon,{customIcon:customIcon,icon:icon,size:"2x"}),jsx(Title,{size:4,tag:"h4",text:text2})]}),inputs==="enabled"&&jsxs(Fragment,{children:[jsx("input",{...props,checked:checked,disabled:disabled,id:inputIdPresent,name:name,type:inputType,value:value}),jsxs("label",{htmlFor:inputIdPresent,children:[jsx(Icon,{customIcon:customIcon,icon:icon,size:"2x"}),jsx(Title,{size:4,tag:"h4",text:text2})]})]})]})};const SelectableCardIcon=props=>{const{aria:aria={},checkmark:checkmark=false,checked:checked=false,className:className,customIcon:customIcon,dark:dark=false,data:data={},disabled:disabled=false,htmlOptions:htmlOptions={},icon:icon,inputId:inputId,multi:multi=true,name:name,titleText:titleText,bodyText:bodyText,value:value,onChange:onChange}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_card_icon_kit",{checked:checked,disabled:disabled,enabled:!disabled}),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:jsx(SelectableCard,{checked:checked,customIcon:customIcon,dark:dark,disabled:disabled,icon:checkmark,inputId:inputId,multi:multi,name:name,onChange:onChange,value:value,children:jsxs(Fragment,{children:[jsx(SelectableIcon,{customIcon:customIcon,icon:icon,inputId:"",inputs:"disabled",name:"",text:titleText}),jsx(Body$1,{color:"light",dark:dark,text:bodyText})]})})})};const SelectableListItem=({aria:aria={},checked:checked=false,children:children,className:className,data:data={},dragId:dragId,dragHandle:dragHandle=true,defaultChecked:defaultChecked,htmlOptions:htmlOptions={},id:id,label:label,text:text2="",name:name="",value:value="",variant:variant="checkbox",onChange:onChange=()=>{},...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_selectable_list_item_kit"),globalProps(props),className);const initialCheckedState=checked;const[checkedState,setCheckedState]=useState(initialCheckedState);const handleChecked=event=>{onChange(event);setCheckedState(event.target.checked)};return jsx(ListItem,{...props,className:classnames(checkedState?"checked_item":"",className),dragHandle:dragHandle,dragId:dragId,children:jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[variant=="checkbox"&&jsxs(Fragment,{children:[jsx(Checkbox,{checked:checkedState,id:id,name:name,onChange:handleChecked,text:label||text2&&false,type:"checkbox",value:value,...props}),children]}),variant=="radio"&&jsxs(Fragment,{children:[jsx(Radio,{defaultChecked:defaultChecked,id:id,label:label,name:name,onChange:onChange,text:label,type:"radio",value:value,...domSafeProps(props)}),children]}),variant!=="checkbox"&&variant!=="radio"&&{children:children}]})})};const SelectableList=props=>{var _a,_b;const{aria:aria={},children:children,className:className,data:data={},enableDrag:enableDrag=false,htmlOptions:htmlOptions={},id:id}=props;const ariaProps=buildAriaProps(aria);const classes=classnames(buildCss("pb_selectable_list_kit"),globalProps(props),className);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const isRadio=props.variant==="radio";const defaultCheckedRadioValue=(_b=(_a=children.filter((item=>item.props.defaultChecked))[0])==null?void 0:_a.props)==null?void 0:_b.value;const[selectedRadioValue,setSelectedRadioValue]=useState(defaultCheckedRadioValue);const onChangeRadioValue=({target:target})=>{setSelectedRadioValue(target.value)};let selectableListItems=children;if(isRadio){selectableListItems=children.map((({props:props2})=>createElement(SelectableListItem,{...props2,className:classnames(selectedRadioValue===props2.value?"checked_item":"",props2.className),key:props2.value,onChange:evt=>{var _a2;onChangeRadioValue(evt);(_a2=props2==null?void 0:props2.onChange)==null?void 0:_a2.call(props2,evt)}})))}return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(List,{enableDrag:enableDrag,variant:props.variant,children:selectableListItems})})};SelectableList.Item=SelectableListItem;const Source=({aria:aria={},className:className,data:data={},hideIcon:hideIcon=false,htmlOptions:htmlOptions={},id:id,source:source,type:type="inbound",user:user={}})=>{const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const ariaProps=buildAriaProps(aria);const css=classnames(["pb_source_kit",className]);const avatar=()=>{if((type==="user"||type==="referral")&&user.name!==void 0){const avatarProps={...user};avatarProps.size="sm";delete avatarProps.userId;return avatarProps}};const typeText=()=>{if(type==="user"||type==="referral"&&user.name!==void 0){return user.name}else{return titleize(type)}};const typeIconNames={events:"calendar-alt",outbound:"sign-out",prospecting:"binoculars",referral:"handshake",retail:"shopping-bag",inbound:"sign-in"};const showIcon=()=>type!=="user"&&avatar()===void 0;return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:css,id:id,children:jsxs("div",{className:"pb__source_layout",children:[hideIcon===false&&jsxs(Fragment,{children:[showIcon()&&jsx(IconCircle,{icon:typeIconNames[type],size:"sm"}),!showIcon()&&jsx(Avatar,{...avatar()})]}),jsxs("div",{className:"pb__source_content",children:[jsx(Title,{size:4,tag:"h4",text:source}),jsxs("div",{className:"pb__source_value",children:[jsx(Body$1,{color:"light",text:typeText()}),user.userId&&jsx(Caption,{text:user.userId})]})]})]})})};const starYellow=jsx("svg",{className:"iamyellow",fill:"none",viewBox:"0 0 18 16",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{clipRule:"evenodd",d:"M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z",fill:"#F9BB00",fillRule:"evenodd"})});const starPrimary=jsx("svg",{fill:"none",viewBox:"0 0 18 16",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{clipRule:"evenodd",d:"M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z",fill:"#0056CF",fillRule:"evenodd"})});const starSubtle=jsx("svg",{fill:"none",viewBox:"0 0 18 16",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{clipRule:"evenodd",d:"M8.90904 0.4371C8.78416 0.187329 8.53438 0 8.22217 0C7.94118 0 7.69141 0.187329 7.56652 0.4371L5.41224 4.83932L0.635357 5.55742C0.354364 5.58864 0.135813 5.80719 0.042149 6.05696C-0.0515154 6.33795 0.0109275 6.61895 0.229478 6.8375L3.69506 10.2719L2.85208 15.1112C2.82086 15.3922 2.94574 15.7044 3.16429 15.8605C3.41407 16.0166 3.69506 16.0478 3.94483 15.9229L8.22217 13.6126L12.4995 15.9229C12.7493 16.0478 13.0615 16.0166 13.3113 15.8605C13.5298 15.7044 13.6547 15.3922 13.5923 15.1112L12.7805 10.2719L16.2461 6.8375C16.4646 6.61895 16.5271 6.33795 16.4334 6.05696C16.3397 5.80719 16.1212 5.58864 15.8402 5.55742L11.0633 4.83932L8.90904 0.4371Z",fillRule:"evenodd"})});const starOutline=jsx("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M5.91323 5.33377L6.17269 5.29477L6.28801 5.0591L8.44116 0.659187C8.49971 0.543364 8.59517 0.5 8.64884 0.5C8.74499 0.5 8.83506 0.555009 8.88775 0.659235L11.0409 5.0591L11.1562 5.29477L11.4157 5.33377L16.1925 6.05186L16.2021 6.0533L16.2117 6.05436C16.2359 6.05706 16.2671 6.06847 16.3024 6.09973C16.3374 6.13062 16.3686 6.17476 16.3886 6.22412C16.4186 6.32162 16.401 6.40181 16.3198 6.48332C16.3196 6.48353 16.3194 6.48374 16.3192 6.48395L12.8552 9.91671L12.6712 10.0991L12.7141 10.3546L13.5258 15.1939L13.528 15.2068L13.5308 15.2196C13.5488 15.3004 13.5074 15.402 13.4567 15.4462C13.3391 15.5132 13.2227 15.5096 13.1546 15.4781L8.88646 13.1726L8.64884 13.0443L8.41121 13.1726L4.14274 15.4782C4.07877 15.5083 3.99031 15.5147 3.87267 15.4466C3.82302 15.4033 3.76655 15.2914 3.77463 15.1781L4.61431 10.3577L4.65911 10.1005L4.47368 9.91671L1.0097 6.48394C1.00947 6.48372 1.00925 6.4835 1.00903 6.48327C0.927878 6.40178 0.91031 6.3216 0.94026 6.22412C0.960274 6.17476 0.99154 6.13062 1.02646 6.09973C1.0618 6.06847 1.09296 6.05706 1.11724 6.05436L1.12682 6.0533L1.13635 6.05186L5.91323 5.33377Z",stroke:"#C1CDD6"})});const getStarIconObject=(backgroundType,color,dark,size)=>{const colorClassName=color==="subtle"?dark?"suble_star_dark":"suble_star_light":color==="primary"?dark?"primary_star_dark":"primary_star_light":`${color}_star`;const backgroundClassName=backgroundType==="outline"?dark?"outline_empty_star_dark":"outline_empty_star_light":dark?"empty_star_dark":"empty_star_light";return{yellow:{className:`pb_star_${size} ${colorClassName}`,icon:starYellow},primary:{className:`pb_star_${size} ${colorClassName}`,icon:starPrimary},subtle:{className:`pb_star_${size} ${colorClassName}`,icon:starSubtle},fill:{className:`pb_star_${size} ${backgroundClassName}`,icon:starYellow},outline:{className:`pb_star_${size} ${backgroundClassName}`,icon:starOutline}}};const StarRatingInteractive=props=>{const{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,onClick:onClick,size:size}=props;const[interactiveStarValue,setInteractiveStarValue]=useState(0);const[hoverStarValue,setHoverStarValue]=useState(null);const starIcon=getStarIconObject(backgroundType,colorOption,dark,size);const handleOnClick=interactiveStarValue2=>{setInteractiveStarValue(interactiveStarValue2);onClick&&onClick(interactiveStarValue2)};const handleMouseEnter=value=>{setHoverStarValue(value)};const handleMouseLeave=()=>{setHoverStarValue(null)};const handleOnKeyDown=(event,starIndex)=>{if(event.key==="Enter"||event.key===" "){event.preventDefault();handleOnClick(starIndex)}};return jsx(Flex,{className:"star_flex_area",children:[...Array(denominator)].map(((_,index)=>{const starIndex=index+1;const isFilled=starIndex<=interactiveStarValue;const isHovered=hoverStarValue!==null&&starIndex>interactiveStarValue&&starIndex<=hoverStarValue;const baseClass=dark?starIcon[backgroundType].className.replace("empty_star_light","empty_star_dark"):starIcon[backgroundType].className;let starClass=baseClass;if(isFilled){starClass=starClass.replace(/(empty_star_light|empty_star_dark)/,"");starClass+=` ${starIcon[colorOption].className}`}if(isHovered){starClass+=" star-hovered"}if(isFilled&&starIndex===interactiveStarValue){starClass+=" star-selected"}return jsx("div",{onKeyDown:event=>handleOnKeyDown(event,starIndex),children:jsx(Icon,{className:starClass.trim(),cursor:"pointer",customIcon:starIcon[backgroundType].icon,htmlOptions:{onClick:()=>handleOnClick(starIndex),onMouseEnter:()=>handleMouseEnter(starIndex),onMouseLeave:()=>handleMouseLeave()},tabIndex:0})},index)}))})};const StarRatingDisplay=props=>{const{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,layoutOption:layoutOption,rating:rating,size:size}=props;const denominatorStyle=layoutOption==="onestar"?1:denominator;const activeStars=Math.round(rating)>denominatorStyle?denominatorStyle:Math.round(rating);const emptyStars=denominatorStyle-Math.round(rating)<0?0:denominatorStyle-Math.round(rating);const starIcon=getStarIconObject(backgroundType,colorOption,dark,size);return jsxs(Flex,{className:"star_flex_area",children:[[...Array(activeStars)].map(((_,index)=>jsx(React__default.Fragment,{children:jsx(Icon,{className:starIcon[colorOption].className,customIcon:starIcon[colorOption].icon})},index))),[...Array(emptyStars)].map(((_,index)=>jsx(React__default.Fragment,{children:jsx(Icon,{className:starIcon[backgroundType].className,customIcon:starIcon[backgroundType].icon})},index)))]})};const StarRating=props=>{const{aria:aria={},className:className,data:data={},dark:dark=false,layoutOption:layoutOption="default",htmlOptions:htmlOptions={},id:id,rating:rating=0,denominator:denominator=5,colorOption:colorOption="yellow",backgroundType:backgroundType="fill",size:size="sm",variant:variant="display",onClick:onClick}=props;const classes=classnames(buildCss("pb_star_rating_kit"),globalProps(props),className);const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const oneDecimalRating=rating.toFixed(1);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[layoutOption==="number"&&jsxs(Fragment,{children:[(size==="xs"||size==="sm")&&jsx(Caption,{className:"pb_star_rating_number_sm",dark:dark,paddingRight:"xs",size:"xs",text:oneDecimalRating.toString()}),size==="md"&&jsx(Body$1,{className:"pb_star_rating_number_md",color:"light",dark:dark,paddingRight:"xs",text:oneDecimalRating.toString()}),size==="lg"&&jsx(Title,{bold:false,className:"pb_star_rating_number_lg",color:"light",dark:dark,paddingRight:"sm",size:2,text:oneDecimalRating.toString()})]}),variant==="display"&&jsx(StarRatingDisplay,{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,layoutOption:layoutOption,rating:rating,size:size}),variant==="interactive"&&jsx(StarRatingInteractive,{backgroundType:backgroundType,colorOption:colorOption,dark:dark,denominator:denominator,onClick:onClick,size:size}),layoutOption==="onestar"&&jsxs(Fragment,{children:[(size==="xs"||size==="sm")&&jsx(Caption,{className:"pb_star_rating_number_sm",dark:dark,size:"xs",text:`${rating.toString()} of ${denominator}`}),size==="md"&&jsx(Body$1,{className:"pb_star_rating_number_md",color:"light",dark:dark,text:`${rating.toString()} of ${denominator}`}),size==="lg"&&jsx(Title,{bold:false,className:"pb_star_rating_number_lg",color:"light",dark:dark,size:2,text:`${rating.toString()} of ${denominator}`})]})]})};const Textarea=({aria:aria={},characterCount:characterCount,className:className,children:children,data:data={},disabled:disabled,htmlOptions:htmlOptions={},inline:inline=false,resize:resize="none",error:error,label:label,maxCharacters:maxCharacters,name:name,onChange:onChange=()=>{},placeholder:placeholder,required:required,rows:rows=4,value:value,...props})=>{const ref=useRef(null);useEffect((()=>{if(ref.current&&resize==="auto"){PbTextarea.addMatch(ref.current)}}));const errorClass=error?"error":null;const inlineClass=inline?"inline":"";const resizeClass=`resize_${resize}`;const classes=classnames("pb_textarea_kit",errorClass,inlineClass,resizeClass,globalProps(props),className);const noCount=typeof characterCount!=="undefined";const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const checkIfZero=characterCount2=>characterCount2==0?characterCount2.toString():characterCount2;const characterCounter=()=>maxCharacters&&characterCount?`${checkIfZero(characterCount)} / ${maxCharacters}`:`${checkIfZero(characterCount)}`;return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,children:[jsx(Caption,{text:label}),children||jsx("textarea",{disabled:disabled,name:name,onChange:onChange,placeholder:placeholder,ref:ref,required:required,rows:rows,value:value,...props}),error?jsx(Fragment,{children:characterCount?jsxs(Flex,{spacing:"between",vertical:"center",children:[jsx(FlexItem,{children:jsx(Body$1,{margin:"none",status:"negative",text:error})}),jsx(FlexItem,{children:jsx(Caption,{margin:"none",size:"xs",text:characterCounter()})})]}):jsx(Body$1,{status:"negative",text:error})}):noCount&&jsx(Caption,{margin:"none",size:"xs",text:characterCounter()})]})};const Textarea$1=forwardRef(Textarea);const timezoneString=dateValue=>`${DateTime$1.toTimeZone(dateValue)}`;const dateTimestamp=dateValue=>`${DateTime$1.toHour(dateValue)}:${DateTime$1.toMinute(dateValue)}${DateTime$1.toMeridiem(dateValue)}`;const dateTimeIso=dateValue=>DateTime$1.toIso(dateValue);const TimeRangeInline=props=>{const{aria:aria={},className:className,data:data={},alignment:alignment="left",htmlOptions:htmlOptions={},size:size="sm",dark:dark=false,icon:icon=false,timezone:timezone=false,startTime:startTime,endTime:endTime,id:id}=props;const dataProps=buildDataProps(data);const ariaProps=buildAriaProps(aria);const htmlProps=buildHtmlProps(htmlOptions);const separator=jsx(Body$1,{color:"light",children:jsx(Icon,{className:"pb_time_range_inline_arrow",dark:dark,fixedWidth:true,icon:"long-arrow-right"})});const iconContent=()=>icon&&jsx(Body$1,{color:"light",tag:"span",children:jsx(Icon,{className:"pb_time_range_inline_icon",dark:dark,fixedWidth:true,icon:"clock",size:size,tag:"span"})});return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classnames("pb_time_range_inline_kit_"+alignment,globalProps(props),className),id:id,children:jsxs("div",{className:"pb_time_range_inline_wrapper",children:[size=="xs"&&jsxs(Fragment,{children:[jsxs(Caption,{dark:dark,tag:"span",children:[iconContent(),jsx("time",{dateTime:dateTimeIso(startTime),children:` ${dateTimestamp(startTime)} `})]}),jsx(Caption,{className:"pb_time_range_inline_arrow",dark:dark,tag:"span",children:separator}),jsx(Caption,{dark:dark,tag:"span",children:jsx("time",{dateTime:dateTimeIso(endTime),children:` ${dateTimestamp(endTime)} `})}),timezone&&jsx(Caption,{className:"pb_time_range_inline_timezone",dark:dark,tag:"span",children:timezoneString(endTime)})]}),size=="sm"&&jsxs(Fragment,{children:[jsxs(Body$1,{dark:dark,tag:"span",children:[iconContent(),jsx("time",{dateTime:dateTimeIso(startTime),children:` ${dateTimestamp(startTime)} `})]}),jsx(Body$1,{className:"pb_time_range_inline_arrow",dark:dark,tag:"span",children:separator}),jsx(Body$1,{dark:dark,tag:"span",children:jsx("time",{dateTime:dateTimeIso(endTime),children:` ${dateTimestamp(endTime)} `})}),timezone&&jsx(Body$1,{className:"pb_time_range_inline_timezone",color:"light",dark:dark,tag:"span",children:timezoneString(endTime)})]})]})})};const TimelineItem=({className:className,children:children,date:date,htmlOptions:htmlOptions={},icon:icon="user",iconColor:iconColor="default",lineStyle:lineStyle="solid",...props})=>{const timelineItemCss=buildCss("pb_timeline_item_kit",lineStyle);const htmlProps=buildHtmlProps(htmlOptions);return jsxs("div",{...htmlProps,className:classnames(timelineItemCss,globalProps(props),className),children:[jsx("div",{className:"pb_timeline_item_left_block",children:date&&jsx(DateStacked,{align:"center",date:date,size:"sm"})}),jsxs("div",{className:"pb_timeline_item_step",children:[jsx(IconCircle,{icon:icon,size:"xs",variant:iconColor}),jsx("div",{className:"pb_timeline_item_connector"})]}),jsx("div",{className:"pb_timeline_item_right_block",children:children})]})};const Timeline=({aria:aria={},className:className,children:children,data:data={},htmlOptions:htmlOptions={},id:id,orientation:orientation="horizontal",showDate:showDate=false,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const dateStyle=showDate===true?"_with_date":"";const timelineCss=buildCss("pb_timeline_kit",`_${orientation}`,dateStyle);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(timelineCss,globalProps(props),className),id:id,children:children})};Timeline.Item=TimelineItem;const TitleDetail=props=>{const{align:align="left",aria:aria={},className:className,data:data={},detail:detail,htmlOptions:htmlOptions={},id:id,title:title}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const pbCss=buildCss("pb_title_detail_kit",align);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(pbCss,globalProps(props),className),id:id,children:[jsx(Title,{size:4,text:title}),jsx(Body$1,{color:"light",text:detail})]})};const Toggle=({aria:aria={},checked:checked=false,children:children,className:className,data:data={},disabled:disabled=false,id:id,htmlOptions:htmlOptions={},name:name,onChange:onChange=()=>{},size:size="sm",value:value,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const css=classnames(buildCss("pb_toggle_kit",size,{on:checked,off:!checked}));return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classnames(css,globalProps(props),className),id:id,children:jsxs("label",{className:"pb_toggle_wrapper",children:[children&&children,!children&&jsx("input",{...props,defaultChecked:checked,disabled:disabled,name:name,onChange:onChange,type:"checkbox",value:value}),jsx("div",{className:"pb_toggle_control"})]})})};const Veteran=()=>jsxs("svg",{viewBox:"0 0 200 250",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M198.4 71.5V71c-.2-1.2-1.4-2.1-1.4-2.1L103.2 2.7c-.7-.4-1-.6-1.6-.6-1.3 0-2.3 1-2.3 2.3v67.1h-.6v29.6h99.8l-.1-29.6z",fill:"#004876"}),jsx("path",{d:"M172.9 159.2c-31.4 23-33.2 24.3-33.2 24.3l-40.5 3.2v-29.4l73.7 1.9z",fill:"#FFF"}),jsx("path",{d:"M99.3 125.4V33.5L1.6 102.7l-.1.1c-1 .7-1.5 1.8-1.5 3v67.4c0 1.2.6 2.3 1.5 3l.1.1 93.5 66.3c1.7 1.2 4.1 0 4.1-2.1v-28.9l40.5-28-40.5.7v-25h73.7l25.4-16.9.2-16.8H99.3z",fill:"#BB2432"}),jsx("path",{d:"M99.3 101.1h99.3v24.3H99.3z",fill:"#FFF"})]});const MillionDollar=()=>jsxs("svg",{viewBox:"0 0 242.9 242.9",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",children:[jsx("circle",{cx:121.5,cy:121.5,r:121.5}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"a",x1:42.483,x2:200.309,y1:35.645,y2:35.645,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M56.4 53.8c16.9-16.2 39.8-26.2 65-26.2 25.2 0 48.1 10 64.9 26.2h14c-19.1-22.2-47.4-36.3-78.9-36.3-31.5 0-59.8 14.1-78.9 36.3h13.9z",style:{fill:"url(#a)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"b",x1:17.407,x2:44.897,y1:132.179,y2:132.179,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M44.9 175.7c-10.9-15.3-17.3-34-17.3-54.2 0-14.1 3.1-27.5 8.8-39.5H25.3c-5 12.2-7.8 25.5-7.8 39.5 0 22.7 7.3 43.8 19.8 60.9l7.6-6.7z",style:{fill:"url(#b)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"c",x1:52.914,x2:189.715,y1:212.573,y2:212.573,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M173 199.8c-14.8 9.8-32.5 15.5-51.6 15.5s-37-5.8-51.8-15.6H52.9c18.3 16.1 42.3 25.8 68.5 25.8 26.1 0 50-9.7 68.3-25.7H173z",style:{fill:"url(#c)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"d",x1:31.123,x2:207.766,y1:136.159,y2:136.159,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M139.2 193v-1.8c5-.4 10.2-.5 13.4-5 3.8-5.2 3.2-15.4 3.2-21.5V78.5l-47.3 120.4L61.2 81.2v61.1c0 13.6.5 35.1 12.5 44.2 4.3 3.2 9 3.9 14.2 4.7v1.8H31.1v-1.8c1.6-.4 3.2-.7 4.8-1.1 22.6-5.7 22.9-32.4 22.9-51.1v-37.8c0-6.1.5-13.3-3.2-18.5-4.5-6.1-13.4-7.2-20.4-7.5v-1.8H96l29.6 75.4 29.9-75.4h52.3v1.8c-4.8.4-10.2.9-13.4 5-3.8 4.8-3.2 15.9-3.2 21.9v62.5c0 6.3-.7 16.1 3.2 21.5 3.2 4.3 6.2 4.7 11.2 5v1.8h-66.4z",style:{fill:"url(#d)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"e",x1:30.453,x2:213.794,y1:63.629,y2:63.629,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M30.5 60.6h183.3v6.1H30.5z",style:{fill:"url(#e)"}}),jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"f",x1:196.676,x2:225.538,y1:132.923,y2:132.923,children:[jsx("stop",{offset:0,style:{stopColor:"#e6b711"}}),jsx("stop",{offset:.128,style:{stopColor:"#eac23c"}}),jsx("stop",{offset:.278,style:{stopColor:"#ec6"}}),jsx("stop",{offset:.413,style:{stopColor:"#f1d485"}}),jsx("stop",{offset:.527,style:{stopColor:"#f2d998"}}),jsx("stop",{offset:.607,style:{stopColor:"#f3db9f"}}),jsx("stop",{offset:1,style:{stopColor:"#e6b711"}})]}),jsx("path",{d:"M196.7 177.5c11.5-15.6 18.7-35.2 18.7-56 0-14.1-3.1-27.5-8.8-39.5h11.1c5 12.2 7.8 25.5 7.8 39.5 0 23.4-7.8 45-20.9 62.4l-7.9-6.4z",style:{fill:"url(#f)"}})]});const UserBadge=props=>{const{aria:aria={},badge:badge="million-dollar",className:className,data:data={},htmlOptions:htmlOptions={},id:id,size:size="md"}=props;const image=badge==="million-dollar"?jsx(MillionDollar,{}):jsx(Veteran,{});const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_user_badge_kit",size),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx("div",{className:"pb_user_badge_wrapper",children:image})})};function isOfType$4(type){return value=>typeof value===type}var isFunction$2=isOfType$4("function");var isNull$1=value=>value===null;var isRegex$1=value=>Object.prototype.toString.call(value).slice(8,-1)==="RegExp";var isObject$1=value=>!isUndefined$1(value)&&!isNull$1(value)&&(isFunction$2(value)||typeof value==="object");var isUndefined$1=isOfType$4("undefined");function equalArray$1(left,right){const{length:length}=left;if(length!==right.length){return false}for(let index=length;index--!==0;){if(!equal$1(left[index],right[index])){return false}}return true}function equalArrayBuffer$1(left,right){if(left.byteLength!==right.byteLength){return false}const view1=new DataView(left.buffer);const view2=new DataView(right.buffer);let index=left.byteLength;while(index--){if(view1.getUint8(index)!==view2.getUint8(index)){return false}}return true}function equalMap$1(left,right){if(left.size!==right.size){return false}for(const index of left.entries()){if(!right.has(index[0])){return false}}for(const index of left.entries()){if(!equal$1(index[1],right.get(index[0]))){return false}}return true}function equalSet$1(left,right){if(left.size!==right.size){return false}for(const index of left.entries()){if(!right.has(index[0])){return false}}return true}function equal$1(left,right){if(left===right){return true}if(left&&isObject$1(left)&&right&&isObject$1(right)){if(left.constructor!==right.constructor){return false}if(Array.isArray(left)&&Array.isArray(right)){return equalArray$1(left,right)}if(left instanceof Map&&right instanceof Map){return equalMap$1(left,right)}if(left instanceof Set&&right instanceof Set){return equalSet$1(left,right)}if(ArrayBuffer.isView(left)&&ArrayBuffer.isView(right)){return equalArrayBuffer$1(left,right)}if(isRegex$1(left)&&isRegex$1(right)){return left.source===right.source&&left.flags===right.flags}if(left.valueOf!==Object.prototype.valueOf){return left.valueOf()===right.valueOf()}if(left.toString!==Object.prototype.toString){return left.toString()===right.toString()}const leftKeys=Object.keys(left);const rightKeys=Object.keys(right);if(leftKeys.length!==rightKeys.length){return false}for(let index=leftKeys.length;index--!==0;){if(!Object.prototype.hasOwnProperty.call(right,leftKeys[index])){return false}}for(let index=leftKeys.length;index--!==0;){const key=leftKeys[index];if(key==="_owner"&&left.$$typeof){continue}if(!equal$1(left[key],right[key])){return false}}return true}if(Number.isNaN(left)&&Number.isNaN(right)){return true}return left===right}var objectTypes$2=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"];var primitiveTypes$2=["bigint","boolean","null","number","string","symbol","undefined"];function getObjectType$2(value){const objectTypeName=Object.prototype.toString.call(value).slice(8,-1);if(/HTML\w+Element/.test(objectTypeName)){return"HTMLElement"}if(isObjectType$2(objectTypeName)){return objectTypeName}return void 0}function isObjectOfType$2(type){return value=>getObjectType$2(value)===type}function isObjectType$2(name){return objectTypes$2.includes(name)}function isOfType$3(type){return value=>typeof value===type}function isPrimitiveType$2(name){return primitiveTypes$2.includes(name)}var DOM_PROPERTIES_TO_CHECK$2=["innerHTML","ownerDocument","style","attributes","nodeValue"];function is$2(value){if(value===null){return"null"}switch(typeof value){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(is$2.array(value)){return"Array"}if(is$2.plainFunction(value)){return"Function"}const tagType=getObjectType$2(value);if(tagType){return tagType}return"Object"}is$2.array=Array.isArray;is$2.arrayOf=(target,predicate)=>{if(!is$2.array(target)&&!is$2.function(predicate)){return false}return target.every((d=>predicate(d)))};is$2.asyncGeneratorFunction=value=>getObjectType$2(value)==="AsyncGeneratorFunction";is$2.asyncFunction=isObjectOfType$2("AsyncFunction");is$2.bigint=isOfType$3("bigint");is$2.boolean=value=>value===true||value===false;is$2.date=isObjectOfType$2("Date");is$2.defined=value=>!is$2.undefined(value);is$2.domElement=value=>is$2.object(value)&&!is$2.plainObject(value)&&value.nodeType===1&&is$2.string(value.nodeName)&&DOM_PROPERTIES_TO_CHECK$2.every((property=>property in value));is$2.empty=value=>is$2.string(value)&&value.length===0||is$2.array(value)&&value.length===0||is$2.object(value)&&!is$2.map(value)&&!is$2.set(value)&&Object.keys(value).length===0||is$2.set(value)&&value.size===0||is$2.map(value)&&value.size===0;is$2.error=isObjectOfType$2("Error");is$2.function=isOfType$3("function");is$2.generator=value=>is$2.iterable(value)&&is$2.function(value.next)&&is$2.function(value.throw);is$2.generatorFunction=isObjectOfType$2("GeneratorFunction");is$2.instanceOf=(instance,class_)=>{if(!instance||!class_){return false}return Object.getPrototypeOf(instance)===class_.prototype};is$2.iterable=value=>!is$2.nullOrUndefined(value)&&is$2.function(value[Symbol.iterator]);is$2.map=isObjectOfType$2("Map");is$2.nan=value=>Number.isNaN(value);is$2.null=value=>value===null;is$2.nullOrUndefined=value=>is$2.null(value)||is$2.undefined(value);is$2.number=value=>isOfType$3("number")(value)&&!is$2.nan(value);is$2.numericString=value=>is$2.string(value)&&value.length>0&&!Number.isNaN(Number(value));is$2.object=value=>!is$2.nullOrUndefined(value)&&(is$2.function(value)||typeof value==="object");is$2.oneOf=(target,value)=>{if(!is$2.array(target)){return false}return target.indexOf(value)>-1};is$2.plainFunction=isObjectOfType$2("Function");is$2.plainObject=value=>{if(getObjectType$2(value)!=="Object"){return false}const prototype=Object.getPrototypeOf(value);return prototype===null||prototype===Object.getPrototypeOf({})};is$2.primitive=value=>is$2.null(value)||isPrimitiveType$2(typeof value);is$2.promise=isObjectOfType$2("Promise");is$2.propertyOf=(target,key,predicate)=>{if(!is$2.object(target)||!key){return false}const value=target[key];if(is$2.function(predicate)){return predicate(value)}return is$2.defined(value)};is$2.regexp=isObjectOfType$2("RegExp");is$2.set=isObjectOfType$2("Set");is$2.string=isOfType$3("string");is$2.symbol=isOfType$3("symbol");is$2.undefined=isOfType$3("undefined");is$2.weakMap=isObjectOfType$2("WeakMap");is$2.weakSet=isObjectOfType$2("WeakSet");var src_default$1=is$2;var objectTypes$1=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"];var primitiveTypes$1=["bigint","boolean","null","number","string","symbol","undefined"];function getObjectType$1(value){const objectTypeName=Object.prototype.toString.call(value).slice(8,-1);if(/HTML\w+Element/.test(objectTypeName)){return"HTMLElement"}if(isObjectType$1(objectTypeName)){return objectTypeName}return void 0}function isObjectOfType$1(type){return value=>getObjectType$1(value)===type}function isObjectType$1(name){return objectTypes$1.includes(name)}function isOfType$2(type){return value=>typeof value===type}function isPrimitiveType$1(name){return primitiveTypes$1.includes(name)}var DOM_PROPERTIES_TO_CHECK$1=["innerHTML","ownerDocument","style","attributes","nodeValue"];function is$1(value){if(value===null){return"null"}switch(typeof value){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(is$1.array(value)){return"Array"}if(is$1.plainFunction(value)){return"Function"}const tagType=getObjectType$1(value);if(tagType){return tagType}return"Object"}is$1.array=Array.isArray;is$1.arrayOf=(target,predicate)=>{if(!is$1.array(target)&&!is$1.function(predicate)){return false}return target.every((d=>predicate(d)))};is$1.asyncGeneratorFunction=value=>getObjectType$1(value)==="AsyncGeneratorFunction";is$1.asyncFunction=isObjectOfType$1("AsyncFunction");is$1.bigint=isOfType$2("bigint");is$1.boolean=value=>value===true||value===false;is$1.date=isObjectOfType$1("Date");is$1.defined=value=>!is$1.undefined(value);is$1.domElement=value=>is$1.object(value)&&!is$1.plainObject(value)&&value.nodeType===1&&is$1.string(value.nodeName)&&DOM_PROPERTIES_TO_CHECK$1.every((property=>property in value));is$1.empty=value=>is$1.string(value)&&value.length===0||is$1.array(value)&&value.length===0||is$1.object(value)&&!is$1.map(value)&&!is$1.set(value)&&Object.keys(value).length===0||is$1.set(value)&&value.size===0||is$1.map(value)&&value.size===0;is$1.error=isObjectOfType$1("Error");is$1.function=isOfType$2("function");is$1.generator=value=>is$1.iterable(value)&&is$1.function(value.next)&&is$1.function(value.throw);is$1.generatorFunction=isObjectOfType$1("GeneratorFunction");is$1.instanceOf=(instance,class_)=>{if(!instance||!class_){return false}return Object.getPrototypeOf(instance)===class_.prototype};is$1.iterable=value=>!is$1.nullOrUndefined(value)&&is$1.function(value[Symbol.iterator]);is$1.map=isObjectOfType$1("Map");is$1.nan=value=>Number.isNaN(value);is$1.null=value=>value===null;is$1.nullOrUndefined=value=>is$1.null(value)||is$1.undefined(value);is$1.number=value=>isOfType$2("number")(value)&&!is$1.nan(value);is$1.numericString=value=>is$1.string(value)&&value.length>0&&!Number.isNaN(Number(value));is$1.object=value=>!is$1.nullOrUndefined(value)&&(is$1.function(value)||typeof value==="object");is$1.oneOf=(target,value)=>{if(!is$1.array(target)){return false}return target.indexOf(value)>-1};is$1.plainFunction=isObjectOfType$1("Function");is$1.plainObject=value=>{if(getObjectType$1(value)!=="Object"){return false}const prototype=Object.getPrototypeOf(value);return prototype===null||prototype===Object.getPrototypeOf({})};is$1.primitive=value=>is$1.null(value)||isPrimitiveType$1(typeof value);is$1.promise=isObjectOfType$1("Promise");is$1.propertyOf=(target,key,predicate)=>{if(!is$1.object(target)||!key){return false}const value=target[key];if(is$1.function(predicate)){return predicate(value)}return is$1.defined(value)};is$1.regexp=isObjectOfType$1("RegExp");is$1.set=isObjectOfType$1("Set");is$1.string=isOfType$2("string");is$1.symbol=isOfType$2("symbol");is$1.undefined=isOfType$2("undefined");is$1.weakMap=isObjectOfType$1("WeakMap");is$1.weakSet=isObjectOfType$1("WeakSet");var src_default=is$1;function canHaveLength$1(...arguments_){return arguments_.every((d=>src_default.string(d)||src_default.array(d)||src_default.plainObject(d)))}function checkEquality$1(left,right,value){if(!isSameType$1(left,right)){return false}if([left,right].every(src_default.array)){return!left.some(hasValue$1(value))&&right.some(hasValue$1(value))}if([left,right].every(src_default.plainObject)){return!Object.entries(left).some(hasEntry$1(value))&&Object.entries(right).some(hasEntry$1(value))}return right===value}function compareNumbers$1(previousData,data,options){const{actual:actual,key:key,previous:previous,type:type}=options;const left=nested$1(previousData,key);const right=nested$1(data,key);let changed=[left,right].every(src_default.number)&&(type==="increased"?leftright);if(!src_default.undefined(actual)){changed=changed&&right===actual}if(!src_default.undefined(previous)){changed=changed&&left===previous}return changed}function compareValues$1(previousData,data,options){const{key:key,type:type,value:value}=options;const left=nested$1(previousData,key);const right=nested$1(data,key);const primary=type==="added"?left:right;const secondary=type==="added"?right:left;if(!src_default.nullOrUndefined(value)){if(src_default.defined(primary)){if(src_default.array(primary)||src_default.plainObject(primary)){return checkEquality$1(primary,secondary,value)}}else{return equal$1(secondary,value)}return false}if([left,right].every(src_default.array)){return!secondary.every(isEqualPredicate$1(primary))}if([left,right].every(src_default.plainObject)){return hasExtraKeys$1(Object.keys(primary),Object.keys(secondary))}return![left,right].every((d=>src_default.primitive(d)&&src_default.defined(d)))&&(type==="added"?!src_default.defined(left)&&src_default.defined(right):src_default.defined(left)&&!src_default.defined(right))}function getIterables$1(previousData,data,{key:key}={}){let left=nested$1(previousData,key);let right=nested$1(data,key);if(!isSameType$1(left,right)){throw new TypeError("Inputs have different types")}if(!canHaveLength$1(left,right)){throw new TypeError("Inputs don't have length")}if([left,right].every(src_default.plainObject)){left=Object.keys(left);right=Object.keys(right)}return[left,right]}function hasEntry$1(input){return([key,value])=>{if(src_default.array(input)){return equal$1(input,value)||input.some((d=>equal$1(d,value)||src_default.array(value)&&isEqualPredicate$1(value)(d)))}if(src_default.plainObject(input)&&input[key]){return!!input[key]&&equal$1(input[key],value)}return equal$1(input,value)}}function hasExtraKeys$1(left,right){return right.some((d=>!left.includes(d)))}function hasValue$1(input){return value=>{if(src_default.array(input)){return input.some((d=>equal$1(d,value)||src_default.array(value)&&isEqualPredicate$1(value)(d)))}return equal$1(input,value)}}function includesOrEqualsTo$1(previousValue,value){return src_default.array(previousValue)?previousValue.some((d=>equal$1(d,value))):equal$1(previousValue,value)}function isEqualPredicate$1(data){return value=>data.some((d=>equal$1(d,value)))}function isSameType$1(...arguments_){return arguments_.every(src_default.array)||arguments_.every(src_default.number)||arguments_.every(src_default.plainObject)||arguments_.every(src_default.string)}function nested$1(data,property){if(src_default.plainObject(data)||src_default.array(data)){if(src_default.string(property)){const props=property.split(".");return props.reduce(((acc,d)=>acc&&acc[d]),data)}if(src_default.number(property)){return data[property]}return data}return data}function treeChanges$1(previousData,data){if([previousData,data].some(src_default.nullOrUndefined)){throw new Error("Missing required parameters")}if(![previousData,data].every((d=>src_default.plainObject(d)||src_default.array(d)))){throw new Error("Expected plain objects or array")}const added=(key,value)=>{try{return compareValues$1(previousData,data,{key:key,type:"added",value:value})}catch{return false}};const changed=(key,actual,previous)=>{try{const left=nested$1(previousData,key);const right=nested$1(data,key);const hasActual=src_default.defined(actual);const hasPrevious=src_default.defined(previous);if(hasActual||hasPrevious){const leftComparator=hasPrevious?includesOrEqualsTo$1(previous,left):!includesOrEqualsTo$1(actual,left);const rightComparator=includesOrEqualsTo$1(actual,right);return leftComparator&&rightComparator}if([left,right].every(src_default.array)||[left,right].every(src_default.plainObject)){return!equal$1(left,right)}return left!==right}catch{return false}};const changedFrom=(key,previous,actual)=>{if(!src_default.defined(key)){return false}try{const left=nested$1(previousData,key);const right=nested$1(data,key);const hasActual=src_default.defined(actual);return includesOrEqualsTo$1(previous,left)&&(hasActual?includesOrEqualsTo$1(actual,right):!hasActual)}catch{return false}};const decreased=(key,actual,previous)=>{if(!src_default.defined(key)){return false}try{return compareNumbers$1(previousData,data,{key:key,actual:actual,previous:previous,type:"decreased"})}catch{return false}};const emptied=key=>{try{const[left,right]=getIterables$1(previousData,data,{key:key});return!!left.length&&!right.length}catch{return false}};const filled=key=>{try{const[left,right]=getIterables$1(previousData,data,{key:key});return!left.length&&!!right.length}catch{return false}};const increased=(key,actual,previous)=>{if(!src_default.defined(key)){return false}try{return compareNumbers$1(previousData,data,{key:key,actual:actual,previous:previous,type:"increased"})}catch{return false}};const removed=(key,value)=>{try{return compareValues$1(previousData,data,{key:key,type:"removed",value:value})}catch{return false}};return{added:added,changed:changed,changedFrom:changedFrom,decreased:decreased,emptied:emptied,filled:filled,increased:increased,removed:removed}}var E_NOSCROLL=new Error("Element already at target scroll position");var E_CANCELLED=new Error("Scroll cancelled");var min=Math.min;var ms=Date.now;var scroll={left:make("scrollLeft"),top:make("scrollTop")};function make(prop){return function scroll2(el,to,opts,cb){opts=opts||{};if(typeof opts=="function")cb=opts,opts={};if(typeof cb!="function")cb=noop$2;var start=ms();var from=el[prop];var ease=opts.ease||inOutSine;var duration=!isNaN(opts.duration)?+opts.duration:350;var cancelled=false;return from===to?cb(E_NOSCROLL,el[prop]):requestAnimationFrame(animate2),cancel;function cancel(){cancelled=true}function animate2(timestamp){if(cancelled)return cb(E_CANCELLED,el[prop]);var now=ms();var time=min(1,(now-start)/duration);var eased=ease(time);el[prop]=eased*(to-from)+from;time<1?requestAnimationFrame(animate2):requestAnimationFrame((function(){cb(null,el[prop])}))}}}function inOutSine(n){return.5*(1-Math.cos(Math.PI*n))}function noop$2(){}const scroll$1=getDefaultExportFromCjs(scroll);var scrollparent={exports:{}};(function(module){(function(root,factory){if(module.exports){module.exports=factory()}else{root.Scrollparent=factory()}})(commonjsGlobal,(function(){function isScrolling(node){var overflow=getComputedStyle(node,null).getPropertyValue("overflow");return overflow.indexOf("scroll")>-1||overflow.indexOf("auto")>-1}function scrollParent2(node){if(!(node instanceof HTMLElement||node instanceof SVGElement)){return void 0}var current=node.parentNode;while(current.parentNode){if(isScrolling(current)){return current}current=current.parentNode}return document.scrollingElement||document.documentElement}return scrollParent2}))})(scrollparent);var scrollparentExports=scrollparent.exports;const scrollParent=getDefaultExportFromCjs(scrollparentExports);var isMergeableObject=function isMergeableObject2(value){return isNonNullObject(value)&&!isSpecial(value)};function isNonNullObject(value){return!!value&&typeof value==="object"}function isSpecial(value){var stringValue=Object.prototype.toString.call(value);return stringValue==="[object RegExp]"||stringValue==="[object Date]"||isReactElement(value)}var canUseSymbol=typeof Symbol==="function"&&Symbol.for;var REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(value){return value.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(val){return Array.isArray(val)?[]:{}}function cloneUnlessOtherwiseSpecified(value,options){return options.clone!==false&&options.isMergeableObject(value)?deepmerge(emptyTarget(value),value,options):value}function defaultArrayMerge(target,source,options){return target.concat(source).map((function(element){return cloneUnlessOtherwiseSpecified(element,options)}))}function getMergeFunction(key,options){if(!options.customMerge){return deepmerge}var customMerge=options.customMerge(key);return typeof customMerge==="function"?customMerge:deepmerge}function getEnumerableOwnPropertySymbols(target){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(target).filter((function(symbol){return Object.propertyIsEnumerable.call(target,symbol)})):[]}function getKeys(target){return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))}function propertyIsOnObject(object,property){try{return property in object}catch(_){return false}}function propertyIsUnsafe(target,key){return propertyIsOnObject(target,key)&&!(Object.hasOwnProperty.call(target,key)&&Object.propertyIsEnumerable.call(target,key))}function mergeObject(target,source,options){var destination={};if(options.isMergeableObject(target)){getKeys(target).forEach((function(key){destination[key]=cloneUnlessOtherwiseSpecified(target[key],options)}))}getKeys(source).forEach((function(key){if(propertyIsUnsafe(target,key)){return}if(propertyIsOnObject(target,key)&&options.isMergeableObject(source[key])){destination[key]=getMergeFunction(key,options)(target[key],source[key],options)}else{destination[key]=cloneUnlessOtherwiseSpecified(source[key],options)}}));return destination}function deepmerge(target,source,options){options=options||{};options.arrayMerge=options.arrayMerge||defaultArrayMerge;options.isMergeableObject=options.isMergeableObject||isMergeableObject;options.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var sourceIsArray=Array.isArray(source);var targetIsArray=Array.isArray(target);var sourceAndTargetTypesMatch=sourceIsArray===targetIsArray;if(!sourceAndTargetTypesMatch){return cloneUnlessOtherwiseSpecified(source,options)}else if(sourceIsArray){return options.arrayMerge(target,source,options)}else{return mergeObject(target,source,options)}}deepmerge.all=function deepmergeAll(array,options){if(!Array.isArray(array)){throw new Error("first argument should be an array")}return array.reduce((function(prev,next){return deepmerge(prev,next,options)}),{})};var deepmerge_1=deepmerge;var cjs=deepmerge_1;const deepmerge2=getDefaultExportFromCjs(cjs); /**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.16.1 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */var isBrowser=typeof window!=="undefined"&&typeof document!=="undefined"&&typeof navigator!=="undefined";var timeoutDuration=function(){var longerTimeoutBrowsers=["Edge","Trident","Firefox"];for(var i=0;i=0){return 1}}return 0}();function microtaskDebounce(fn){var called=false;return function(){if(called){return}called=true;window.Promise.resolve().then((function(){called=false;fn()}))}}function taskDebounce(fn){var scheduled=false;return function(){if(!scheduled){scheduled=true;setTimeout((function(){scheduled=false;fn()}),timeoutDuration)}}}var supportsMicroTasks=isBrowser&&window.Promise;var debounce=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction$1(functionToCheck){var getType={};return functionToCheck&&getType.toString.call(functionToCheck)==="[object Function]"}function getStyleComputedProperty$1(element,property){if(element.nodeType!==1){return[]}var window2=element.ownerDocument.defaultView;var css=window2.getComputedStyle(element,null);return property?css[property]:css}function getParentNode(element){if(element.nodeName==="HTML"){return element}return element.parentNode||element.host}function getScrollParent$1(element){if(!element){return document.body}switch(element.nodeName){case"HTML":case"BODY":return element.ownerDocument.body;case"#document":return element.body}var _getStyleComputedProp=getStyleComputedProperty$1(element),overflow=_getStyleComputedProp.overflow,overflowX=_getStyleComputedProp.overflowX,overflowY=_getStyleComputedProp.overflowY;if(/(auto|scroll|overlay)/.test(overflow+overflowY+overflowX)){return element}return getScrollParent$1(getParentNode(element))}function getReferenceNode(reference){return reference&&reference.referenceNode?reference.referenceNode:reference}var isIE11=isBrowser&&!!(window.MSInputMethodContext&&document.documentMode);var isIE10=isBrowser&&/MSIE 10/.test(navigator.userAgent);function isIE(version){if(version===11){return isIE11}if(version===10){return isIE10}return isIE11||isIE10}function getOffsetParent(element){if(!element){return document.documentElement}var noOffsetParent=isIE(10)?document.body:null;var offsetParent=element.offsetParent||null;while(offsetParent===noOffsetParent&&element.nextElementSibling){offsetParent=(element=element.nextElementSibling).offsetParent}var nodeName=offsetParent&&offsetParent.nodeName;if(!nodeName||nodeName==="BODY"||nodeName==="HTML"){return element?element.ownerDocument.documentElement:document.documentElement}if(["TH","TD","TABLE"].indexOf(offsetParent.nodeName)!==-1&&getStyleComputedProperty$1(offsetParent,"position")==="static"){return getOffsetParent(offsetParent)}return offsetParent}function isOffsetContainer(element){var nodeName=element.nodeName;if(nodeName==="BODY"){return false}return nodeName==="HTML"||getOffsetParent(element.firstElementChild)===element}function getRoot(node){if(node.parentNode!==null){return getRoot(node.parentNode)}return node}function findCommonOffsetParent(element1,element2){if(!element1||!element1.nodeType||!element2||!element2.nodeType){return document.documentElement}var order=element1.compareDocumentPosition(element2)&Node.DOCUMENT_POSITION_FOLLOWING;var start=order?element1:element2;var end=order?element2:element1;var range=document.createRange();range.setStart(start,0);range.setEnd(end,0);var commonAncestorContainer=range.commonAncestorContainer;if(element1!==commonAncestorContainer&&element2!==commonAncestorContainer||start.contains(end)){if(isOffsetContainer(commonAncestorContainer)){return commonAncestorContainer}return getOffsetParent(commonAncestorContainer)}var element1root=getRoot(element1);if(element1root.host){return findCommonOffsetParent(element1root.host,element2)}else{return findCommonOffsetParent(element1,getRoot(element2).host)}}function getScroll(element){var side=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top";var upperSide=side==="top"?"scrollTop":"scrollLeft";var nodeName=element.nodeName;if(nodeName==="BODY"||nodeName==="HTML"){var html=element.ownerDocument.documentElement;var scrollingElement=element.ownerDocument.scrollingElement||html;return scrollingElement[upperSide]}return element[upperSide]}function includeScroll(rect,element){var subtract=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;var scrollTop=getScroll(element,"top");var scrollLeft=getScroll(element,"left");var modifier=subtract?-1:1;rect.top+=scrollTop*modifier;rect.bottom+=scrollTop*modifier;rect.left+=scrollLeft*modifier;rect.right+=scrollLeft*modifier;return rect}function getBordersSize(styles2,axis){var sideA=axis==="x"?"Left":"Top";var sideB=sideA==="Left"?"Right":"Bottom";return parseFloat(styles2["border"+sideA+"Width"])+parseFloat(styles2["border"+sideB+"Width"])}function getSize(axis,body,html,computedStyle){return Math.max(body["offset"+axis],body["scroll"+axis],html["client"+axis],html["offset"+axis],html["scroll"+axis],isIE(10)?parseInt(html["offset"+axis])+parseInt(computedStyle["margin"+(axis==="Height"?"Top":"Left")])+parseInt(computedStyle["margin"+(axis==="Height"?"Bottom":"Right")]):0)}function getWindowSizes(document2){var body=document2.body;var html=document2.documentElement;var computedStyle=isIE(10)&&getComputedStyle(html);return{height:getSize("Height",body,html,computedStyle),width:getSize("Width",body,html,computedStyle)}}var classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}};var createClass=function(){function defineProperties(target,props){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:false;var isIE102=isIE(10);var isHTML=parent.nodeName==="HTML";var childrenRect=getBoundingClientRect(children);var parentRect=getBoundingClientRect(parent);var scrollParent2=getScrollParent$1(children);var styles2=getStyleComputedProperty$1(parent);var borderTopWidth=parseFloat(styles2.borderTopWidth);var borderLeftWidth=parseFloat(styles2.borderLeftWidth);if(fixedPosition&&isHTML){parentRect.top=Math.max(parentRect.top,0);parentRect.left=Math.max(parentRect.left,0)}var offsets=getClientRect$1({top:childrenRect.top-parentRect.top-borderTopWidth,left:childrenRect.left-parentRect.left-borderLeftWidth,width:childrenRect.width,height:childrenRect.height});offsets.marginTop=0;offsets.marginLeft=0;if(!isIE102&&isHTML){var marginTop=parseFloat(styles2.marginTop);var marginLeft=parseFloat(styles2.marginLeft);offsets.top-=borderTopWidth-marginTop;offsets.bottom-=borderTopWidth-marginTop;offsets.left-=borderLeftWidth-marginLeft;offsets.right-=borderLeftWidth-marginLeft;offsets.marginTop=marginTop;offsets.marginLeft=marginLeft}if(isIE102&&!fixedPosition?parent.contains(scrollParent2):parent===scrollParent2&&scrollParent2.nodeName!=="BODY"){offsets=includeScroll(offsets,parent)}return offsets}function getViewportOffsetRectRelativeToArtbitraryNode(element){var excludeScroll=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;var html=element.ownerDocument.documentElement;var relativeOffset=getOffsetRectRelativeToArbitraryNode(element,html);var width=Math.max(html.clientWidth,window.innerWidth||0);var height=Math.max(html.clientHeight,window.innerHeight||0);var scrollTop=!excludeScroll?getScroll(html):0;var scrollLeft=!excludeScroll?getScroll(html,"left"):0;var offset2={top:scrollTop-relativeOffset.top+relativeOffset.marginTop,left:scrollLeft-relativeOffset.left+relativeOffset.marginLeft,width:width,height:height};return getClientRect$1(offset2)}function isFixed(element){var nodeName=element.nodeName;if(nodeName==="BODY"||nodeName==="HTML"){return false}if(getStyleComputedProperty$1(element,"position")==="fixed"){return true}var parentNode=getParentNode(element);if(!parentNode){return false}return isFixed(parentNode)}function getFixedPositionOffsetParent(element){if(!element||!element.parentElement||isIE()){return document.documentElement}var el=element.parentElement;while(el&&getStyleComputedProperty$1(el,"transform")==="none"){el=el.parentElement}return el||document.documentElement}function getBoundaries(popper,reference,padding,boundariesElement){var fixedPosition=arguments.length>4&&arguments[4]!==void 0?arguments[4]:false;var boundaries={top:0,left:0};var offsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,getReferenceNode(reference));if(boundariesElement==="viewport"){boundaries=getViewportOffsetRectRelativeToArtbitraryNode(offsetParent,fixedPosition)}else{var boundariesNode=void 0;if(boundariesElement==="scrollParent"){boundariesNode=getScrollParent$1(getParentNode(reference));if(boundariesNode.nodeName==="BODY"){boundariesNode=popper.ownerDocument.documentElement}}else if(boundariesElement==="window"){boundariesNode=popper.ownerDocument.documentElement}else{boundariesNode=boundariesElement}var offsets=getOffsetRectRelativeToArbitraryNode(boundariesNode,offsetParent,fixedPosition);if(boundariesNode.nodeName==="HTML"&&!isFixed(offsetParent)){var _getWindowSizes=getWindowSizes(popper.ownerDocument),height=_getWindowSizes.height,width=_getWindowSizes.width;boundaries.top+=offsets.top-offsets.marginTop;boundaries.bottom=height+offsets.top;boundaries.left+=offsets.left-offsets.marginLeft;boundaries.right=width+offsets.left}else{boundaries=offsets}}padding=padding||0;var isPaddingNumber=typeof padding==="number";boundaries.left+=isPaddingNumber?padding:padding.left||0;boundaries.top+=isPaddingNumber?padding:padding.top||0;boundaries.right-=isPaddingNumber?padding:padding.right||0;boundaries.bottom-=isPaddingNumber?padding:padding.bottom||0;return boundaries}function getArea(_ref){var width=_ref.width,height=_ref.height;return width*height}function computeAutoPlacement(placement,refRect,popper,reference,boundariesElement){var padding=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(placement.indexOf("auto")===-1){return placement}var boundaries=getBoundaries(popper,reference,padding,boundariesElement);var rects={top:{width:boundaries.width,height:refRect.top-boundaries.top},right:{width:boundaries.right-refRect.right,height:boundaries.height},bottom:{width:boundaries.width,height:boundaries.bottom-refRect.bottom},left:{width:refRect.left-boundaries.left,height:boundaries.height}};var sortedAreas=Object.keys(rects).map((function(key){return _extends({key:key},rects[key],{area:getArea(rects[key])})})).sort((function(a,b){return b.area-a.area}));var filteredAreas=sortedAreas.filter((function(_ref2){var width=_ref2.width,height=_ref2.height;return width>=popper.clientWidth&&height>=popper.clientHeight}));var computedPlacement=filteredAreas.length>0?filteredAreas[0].key:sortedAreas[0].key;var variation=placement.split("-")[1];return computedPlacement+(variation?"-"+variation:"")}function getReferenceOffsets(state,popper,reference){var fixedPosition=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;var commonOffsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,getReferenceNode(reference));return getOffsetRectRelativeToArbitraryNode(reference,commonOffsetParent,fixedPosition)}function getOuterSizes(element){var window2=element.ownerDocument.defaultView;var styles2=window2.getComputedStyle(element);var x=parseFloat(styles2.marginTop||0)+parseFloat(styles2.marginBottom||0);var y=parseFloat(styles2.marginLeft||0)+parseFloat(styles2.marginRight||0);var result={width:element.offsetWidth+y,height:element.offsetHeight+x};return result}function getOppositePlacement(placement){var hash={left:"right",right:"left",bottom:"top",top:"bottom"};return placement.replace(/left|right|bottom|top/g,(function(matched){return hash[matched]}))}function getPopperOffsets(popper,referenceOffsets,placement){placement=placement.split("-")[0];var popperRect=getOuterSizes(popper);var popperOffsets={width:popperRect.width,height:popperRect.height};var isHoriz=["right","left"].indexOf(placement)!==-1;var mainSide=isHoriz?"top":"left";var secondarySide=isHoriz?"left":"top";var measurement=isHoriz?"height":"width";var secondaryMeasurement=!isHoriz?"height":"width";popperOffsets[mainSide]=referenceOffsets[mainSide]+referenceOffsets[measurement]/2-popperRect[measurement]/2;if(placement===secondarySide){popperOffsets[secondarySide]=referenceOffsets[secondarySide]-popperRect[secondaryMeasurement]}else{popperOffsets[secondarySide]=referenceOffsets[getOppositePlacement(secondarySide)]}return popperOffsets}function find(arr,check){if(Array.prototype.find){return arr.find(check)}return arr.filter(check)[0]}function findIndex(arr,prop,value){if(Array.prototype.findIndex){return arr.findIndex((function(cur){return cur[prop]===value}))}var match=find(arr,(function(obj){return obj[prop]===value}));return arr.indexOf(match)}function runModifiers(modifiers2,data,ends){var modifiersToRun=ends===void 0?modifiers2:modifiers2.slice(0,findIndex(modifiers2,"name",ends));modifiersToRun.forEach((function(modifier){if(modifier["function"]){console.warn("`modifier.function` is deprecated, use `modifier.fn`!")}var fn=modifier["function"]||modifier.fn;if(modifier.enabled&&isFunction$1(fn)){data.offsets.popper=getClientRect$1(data.offsets.popper);data.offsets.reference=getClientRect$1(data.offsets.reference);data=fn(data,modifier)}}));return data}function update(){if(this.state.isDestroyed){return}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}};data.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed);data.placement=computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);data.originalPlacement=data.placement;data.positionFixed=this.options.positionFixed;data.offsets.popper=getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";data=runModifiers(this.modifiers,data);if(!this.state.isCreated){this.state.isCreated=true;this.options.onCreate(data)}else{this.options.onUpdate(data)}}function isModifierEnabled(modifiers2,modifierName){return modifiers2.some((function(_ref){var name=_ref.name,enabled=_ref.enabled;return enabled&&name===modifierName}))}function getSupportedPropertyName(property){var prefixes=[false,"ms","Webkit","Moz","O"];var upperProp=property.charAt(0).toUpperCase()+property.slice(1);for(var i=0;ipopper[opSide]){data.offsets.popper[side]+=reference[side]+arrowElementSize-popper[opSide]}data.offsets.popper=getClientRect$1(data.offsets.popper);var center=reference[side]+reference[len]/2-arrowElementSize/2;var css=getStyleComputedProperty$1(data.instance.popper);var popperMarginSide=parseFloat(css["margin"+sideCapitalized]);var popperBorderSide=parseFloat(css["border"+sideCapitalized+"Width"]);var sideValue=center-data.offsets.popper[side]-popperMarginSide-popperBorderSide;sideValue=Math.max(Math.min(popper[len]-arrowElementSize,sideValue),0);data.arrowElement=arrowElement;data.offsets.arrow=(_data$offsets$arrow={},defineProperty(_data$offsets$arrow,side,Math.round(sideValue)),defineProperty(_data$offsets$arrow,altSide,""),_data$offsets$arrow);return data}function getOppositeVariation(variation){if(variation==="end"){return"start"}else if(variation==="start"){return"end"}return variation}var placements=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"];var validPlacements=placements.slice(3);function clockwise(placement){var counter=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false;var index=validPlacements.indexOf(placement);var arr=validPlacements.slice(index+1).concat(validPlacements.slice(0,index));return counter?arr.reverse():arr}var BEHAVIORS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function flip(data,options){if(isModifierEnabled(data.instance.modifiers,"inner")){return data}if(data.flipped&&data.placement===data.originalPlacement){return data}var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,options.boundariesElement,data.positionFixed);var placement=data.placement.split("-")[0];var placementOpposite=getOppositePlacement(placement);var variation=data.placement.split("-")[1]||"";var flipOrder=[];switch(options.behavior){case BEHAVIORS.FLIP:flipOrder=[placement,placementOpposite];break;case BEHAVIORS.CLOCKWISE:flipOrder=clockwise(placement);break;case BEHAVIORS.COUNTERCLOCKWISE:flipOrder=clockwise(placement,true);break;default:flipOrder=options.behavior}flipOrder.forEach((function(step,index){if(placement!==step||flipOrder.length===index+1){return data}placement=data.placement.split("-")[0];placementOpposite=getOppositePlacement(placement);var popperOffsets=data.offsets.popper;var refOffsets=data.offsets.reference;var floor=Math.floor;var overlapsRef=placement==="left"&&floor(popperOffsets.right)>floor(refOffsets.left)||placement==="right"&&floor(popperOffsets.left)floor(refOffsets.top)||placement==="bottom"&&floor(popperOffsets.top)floor(boundaries.right);var overflowsTop=floor(popperOffsets.top)floor(boundaries.bottom);var overflowsBoundaries=placement==="left"&&overflowsLeft||placement==="right"&&overflowsRight||placement==="top"&&overflowsTop||placement==="bottom"&&overflowsBottom;var isVertical=["top","bottom"].indexOf(placement)!==-1;var flippedVariationByRef=!!options.flipVariations&&(isVertical&&variation==="start"&&overflowsLeft||isVertical&&variation==="end"&&overflowsRight||!isVertical&&variation==="start"&&overflowsTop||!isVertical&&variation==="end"&&overflowsBottom);var flippedVariationByContent=!!options.flipVariationsByContent&&(isVertical&&variation==="start"&&overflowsRight||isVertical&&variation==="end"&&overflowsLeft||!isVertical&&variation==="start"&&overflowsBottom||!isVertical&&variation==="end"&&overflowsTop);var flippedVariation=flippedVariationByRef||flippedVariationByContent;if(overlapsRef||overflowsBoundaries||flippedVariation){data.flipped=true;if(overlapsRef||overflowsBoundaries){placement=flipOrder[index+1]}if(flippedVariation){variation=getOppositeVariation(variation)}data.placement=placement+(variation?"-"+variation:"");data.offsets.popper=_extends({},data.offsets.popper,getPopperOffsets(data.instance.popper,data.offsets.reference,data.placement));data=runModifiers(data.instance.modifiers,data,"flip")}}));return data}function keepTogether(data){var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var placement=data.placement.split("-")[0];var floor=Math.floor;var isVertical=["top","bottom"].indexOf(placement)!==-1;var side=isVertical?"right":"bottom";var opSide=isVertical?"left":"top";var measurement=isVertical?"width":"height";if(popper[side]floor(reference[side])){data.offsets.popper[opSide]=floor(reference[side])}return data}function toValue(str,measurement,popperOffsets,referenceOffsets){var split=str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);var value=+split[1];var unit=split[2];if(!value){return str}if(unit.indexOf("%")===0){var element=void 0;switch(unit){case"%p":element=popperOffsets;break;case"%":case"%r":default:element=referenceOffsets}var rect=getClientRect$1(element);return rect[measurement]/100*value}else if(unit==="vh"||unit==="vw"){var size=void 0;if(unit==="vh"){size=Math.max(document.documentElement.clientHeight,window.innerHeight||0)}else{size=Math.max(document.documentElement.clientWidth,window.innerWidth||0)}return size/100*value}else{return value}}function parseOffset(offset2,popperOffsets,referenceOffsets,basePlacement){var offsets=[0,0];var useHeight=["right","left"].indexOf(basePlacement)!==-1;var fragments=offset2.split(/(\+|\-)/).map((function(frag){return frag.trim()}));var divider=fragments.indexOf(find(fragments,(function(frag){return frag.search(/,|\s/)!==-1})));if(fragments[divider]&&fragments[divider].indexOf(",")===-1){console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.")}var splitRegex=/\s*,\s*|\s+/;var ops=divider!==-1?[fragments.slice(0,divider).concat([fragments[divider].split(splitRegex)[0]]),[fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider+1))]:[fragments];ops=ops.map((function(op,index){var measurement=(index===1?!useHeight:useHeight)?"height":"width";var mergeWithPrevious=false;return op.reduce((function(a,b){if(a[a.length-1]===""&&["+","-"].indexOf(b)!==-1){a[a.length-1]=b;mergeWithPrevious=true;return a}else if(mergeWithPrevious){a[a.length-1]+=b;mergeWithPrevious=false;return a}else{return a.concat(b)}}),[]).map((function(str){return toValue(str,measurement,popperOffsets,referenceOffsets)}))}));ops.forEach((function(op,index){op.forEach((function(frag,index2){if(isNumeric(frag)){offsets[index]+=frag*(op[index2-1]==="-"?-1:1)}}))}));return offsets}function offset(data,_ref){var offset2=_ref.offset;var placement=data.placement,_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var basePlacement=placement.split("-")[0];var offsets=void 0;if(isNumeric(+offset2)){offsets=[+offset2,0]}else{offsets=parseOffset(offset2,popper,reference,basePlacement)}if(basePlacement==="left"){popper.top+=offsets[0];popper.left-=offsets[1]}else if(basePlacement==="right"){popper.top+=offsets[0];popper.left+=offsets[1]}else if(basePlacement==="top"){popper.left+=offsets[0];popper.top-=offsets[1]}else if(basePlacement==="bottom"){popper.left+=offsets[0];popper.top+=offsets[1]}data.popper=popper;return data}function preventOverflow(data,options){var boundariesElement=options.boundariesElement||getOffsetParent(data.instance.popper);if(data.instance.reference===boundariesElement){boundariesElement=getOffsetParent(boundariesElement)}var transformProp=getSupportedPropertyName("transform");var popperStyles=data.instance.popper.style;var top=popperStyles.top,left=popperStyles.left,transform=popperStyles[transformProp];popperStyles.top="";popperStyles.left="";popperStyles[transformProp]="";var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,boundariesElement,data.positionFixed);popperStyles.top=top;popperStyles.left=left;popperStyles[transformProp]=transform;options.boundaries=boundaries;var order=options.priority;var popper=data.offsets.popper;var check={primary:function primary(placement){var value=popper[placement];if(popper[placement]boundaries[placement]&&!options.escapeWithReference){value=Math.min(popper[mainSide],boundaries[placement]-(placement==="right"?popper.width:popper.height))}return defineProperty({},mainSide,value)}};order.forEach((function(placement){var side=["left","top"].indexOf(placement)!==-1?"primary":"secondary";popper=_extends({},popper,check[side](placement))}));data.offsets.popper=popper;return data}function shift(data){var placement=data.placement;var basePlacement=placement.split("-")[0];var shiftvariation=placement.split("-")[1];if(shiftvariation){var _data$offsets=data.offsets,reference=_data$offsets.reference,popper=_data$offsets.popper;var isVertical=["bottom","top"].indexOf(basePlacement)!==-1;var side=isVertical?"left":"top";var measurement=isVertical?"width":"height";var shiftOffsets={start:defineProperty({},side,reference[side]),end:defineProperty({},side,reference[side]+reference[measurement]-popper[measurement])};data.offsets.popper=_extends({},popper,shiftOffsets[shiftvariation])}return data}function hide(data){if(!isModifierRequired(data.instance.modifiers,"hide","preventOverflow")){return data}var refRect=data.offsets.reference;var bound=find(data.instance.modifiers,(function(modifier){return modifier.name==="preventOverflow"})).boundaries;if(refRect.bottombound.right||refRect.top>bound.bottom||refRect.right2&&arguments[2]!==void 0?arguments[2]:{};classCallCheck(this,Popper2);this.scheduleUpdate=function(){return requestAnimationFrame(_this.update)};this.update=debounce(this.update.bind(this));this.options=_extends({},Popper2.Defaults,options);this.state={isDestroyed:false,isCreated:false,scrollParents:[]};this.reference=reference&&reference.jquery?reference[0]:reference;this.popper=popper&&popper.jquery?popper[0]:popper;this.options.modifiers={};Object.keys(_extends({},Popper2.Defaults.modifiers,options.modifiers)).forEach((function(name){_this.options.modifiers[name]=_extends({},Popper2.Defaults.modifiers[name]||{},options.modifiers?options.modifiers[name]:{})}));this.modifiers=Object.keys(this.options.modifiers).map((function(name){return _extends({name:name},_this.options.modifiers[name])})).sort((function(a,b){return a.order-b.order}));this.modifiers.forEach((function(modifierOptions){if(modifierOptions.enabled&&isFunction$1(modifierOptions.onLoad)){modifierOptions.onLoad(_this.reference,_this.popper,_this.options,modifierOptions,_this.state)}}));this.update();var eventsEnabled=this.options.eventsEnabled;if(eventsEnabled){this.enableEventListeners()}this.state.eventsEnabled=eventsEnabled}createClass(Popper2,[{key:"update",value:function update$$1(){return update.call(this)}},{key:"destroy",value:function destroy$$1(){return destroy.call(this)}},{key:"enableEventListeners",value:function enableEventListeners$$1(){return enableEventListeners.call(this)}},{key:"disableEventListeners",value:function disableEventListeners$$1(){return disableEventListeners.call(this)}}]);return Popper2}();Popper.Utils=(typeof window!=="undefined"?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;var DOM_PROPERTIES_TO_CHECK=["innerHTML","ownerDocument","style","attributes","nodeValue"];var objectTypes=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"];var primitiveTypes=["bigint","boolean","null","number","string","symbol","undefined"];function getObjectType(value){var objectTypeName=Object.prototype.toString.call(value).slice(8,-1);if(/HTML\w+Element/.test(objectTypeName)){return"HTMLElement"}if(isObjectType(objectTypeName)){return objectTypeName}return void 0}function isObjectOfType(type){return function(value){return getObjectType(value)===type}}function isObjectType(name){return objectTypes.includes(name)}function isOfType$1(type){return function(value){return typeof value===type}}function isPrimitiveType(name){return primitiveTypes.includes(name)}function is(value){if(value===null){return"null"}switch(typeof value){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(is.array(value)){return"Array"}if(is.plainFunction(value)){return"Function"}var tagType=getObjectType(value);if(tagType){return tagType}return"Object"}is.array=Array.isArray;is.arrayOf=function(target,predicate){if(!is.array(target)&&!is.function(predicate)){return false}return target.every((function(d){return predicate(d)}))};is.asyncGeneratorFunction=function(value){return getObjectType(value)==="AsyncGeneratorFunction"};is.asyncFunction=isObjectOfType("AsyncFunction");is.bigint=isOfType$1("bigint");is.boolean=function(value){return value===true||value===false};is.date=isObjectOfType("Date");is.defined=function(value){return!is.undefined(value)};is.domElement=function(value){return is.object(value)&&!is.plainObject(value)&&value.nodeType===1&&is.string(value.nodeName)&&DOM_PROPERTIES_TO_CHECK.every((function(property){return property in value}))};is.empty=function(value){return is.string(value)&&value.length===0||is.array(value)&&value.length===0||is.object(value)&&!is.map(value)&&!is.set(value)&&Object.keys(value).length===0||is.set(value)&&value.size===0||is.map(value)&&value.size===0};is.error=isObjectOfType("Error");is.function=isOfType$1("function");is.generator=function(value){return is.iterable(value)&&is.function(value.next)&&is.function(value.throw)};is.generatorFunction=isObjectOfType("GeneratorFunction");is.instanceOf=function(instance,class_){if(!instance||!class_){return false}return Object.getPrototypeOf(instance)===class_.prototype};is.iterable=function(value){return!is.nullOrUndefined(value)&&is.function(value[Symbol.iterator])};is.map=isObjectOfType("Map");is.nan=function(value){return Number.isNaN(value)};is.null=function(value){return value===null};is.nullOrUndefined=function(value){return is.null(value)||is.undefined(value)};is.number=function(value){return isOfType$1("number")(value)&&!is.nan(value)};is.numericString=function(value){return is.string(value)&&value.length>0&&!Number.isNaN(Number(value))};is.object=function(value){return!is.nullOrUndefined(value)&&(is.function(value)||typeof value==="object")};is.oneOf=function(target,value){if(!is.array(target)){return false}return target.indexOf(value)>-1};is.plainFunction=isObjectOfType("Function");is.plainObject=function(value){if(getObjectType(value)!=="Object"){return false}var prototype=Object.getPrototypeOf(value);return prototype===null||prototype===Object.getPrototypeOf({})};is.primitive=function(value){return is.null(value)||isPrimitiveType(typeof value)};is.promise=isObjectOfType("Promise");is.propertyOf=function(target,key,predicate){if(!is.object(target)||!key){return false}var value=target[key];if(is.function(predicate)){return predicate(value)}return is.defined(value)};is.regexp=isObjectOfType("RegExp");is.set=isObjectOfType("Set");is.string=isOfType$1("string");is.symbol=isOfType$1("symbol");is.undefined=isOfType$1("undefined");is.weakMap=isObjectOfType("WeakMap");is.weakSet=isObjectOfType("WeakSet");function isOfType(type){return function(value){return typeof value===type}}var isFunction=isOfType("function");var isNull=function(value){return value===null};var isRegex=function(value){return Object.prototype.toString.call(value).slice(8,-1)==="RegExp"};var isObject=function(value){return!isUndefined(value)&&!isNull(value)&&(isFunction(value)||typeof value==="object")};var isUndefined=isOfType("undefined");var __values=function(o){var s=typeof Symbol==="function"&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&typeof o.length==="number")return{next:function(){if(o&&i>=o.length)o=void 0;return{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")};function equalArray(left,right){var length=left.length;if(length!==right.length){return false}for(var index=length;index--!==0;){if(!equal(left[index],right[index])){return false}}return true}function equalArrayBuffer(left,right){if(left.byteLength!==right.byteLength){return false}var view1=new DataView(left.buffer);var view2=new DataView(right.buffer);var index=left.byteLength;while(index--){if(view1.getUint8(index)!==view2.getUint8(index)){return false}}return true}function equalMap(left,right){var e_1,_a,e_2,_b;if(left.size!==right.size){return false}try{for(var _c=__values(left.entries()),_d=_c.next();!_d.done;_d=_c.next()){var index=_d.value;if(!right.has(index[0])){return false}}}catch(e_1_1){e_1={error:e_1_1}}finally{try{if(_d&&!_d.done&&(_a=_c.return))_a.call(_c)}finally{if(e_1)throw e_1.error}}try{for(var _e=__values(left.entries()),_f=_e.next();!_f.done;_f=_e.next()){var index=_f.value;if(!equal(index[1],right.get(index[0]))){return false}}}catch(e_2_1){e_2={error:e_2_1}}finally{try{if(_f&&!_f.done&&(_b=_e.return))_b.call(_e)}finally{if(e_2)throw e_2.error}}return true}function equalSet(left,right){var e_3,_a;if(left.size!==right.size){return false}try{for(var _b=__values(left.entries()),_c=_b.next();!_c.done;_c=_b.next()){var index=_c.value;if(!right.has(index[0])){return false}}}catch(e_3_1){e_3={error:e_3_1}}finally{try{if(_c&&!_c.done&&(_a=_b.return))_a.call(_b)}finally{if(e_3)throw e_3.error}}return true}function equal(left,right){if(left===right){return true}if(left&&isObject(left)&&right&&isObject(right)){if(left.constructor!==right.constructor){return false}if(Array.isArray(left)&&Array.isArray(right)){return equalArray(left,right)}if(left instanceof Map&&right instanceof Map){return equalMap(left,right)}if(left instanceof Set&&right instanceof Set){return equalSet(left,right)}if(ArrayBuffer.isView(left)&&ArrayBuffer.isView(right)){return equalArrayBuffer(left,right)}if(isRegex(left)&&isRegex(right)){return left.source===right.source&&left.flags===right.flags}if(left.valueOf!==Object.prototype.valueOf){return left.valueOf()===right.valueOf()}if(left.toString!==Object.prototype.toString){return left.toString()===right.toString()}var leftKeys=Object.keys(left);var rightKeys=Object.keys(right);if(leftKeys.length!==rightKeys.length){return false}for(var index=leftKeys.length;index--!==0;){if(!Object.prototype.hasOwnProperty.call(right,leftKeys[index])){return false}}for(var index=leftKeys.length;index--!==0;){var key=leftKeys[index];if(key==="_owner"&&left.$$typeof){continue}if(!equal(left[key],right[key])){return false}}return true}if(Number.isNaN(left)&&Number.isNaN(right)){return true}return left===right}function canHaveLength(){var arguments_=[];for(var _i=0;_iright);if(!is.undefined(actual)){changed=changed&&right===actual}if(!is.undefined(previous)){changed=changed&&left===previous}return changed}function compareValues(previousData,data,options){var key=options.key,type=options.type,value=options.value;var left=nested(previousData,key);var right=nested(data,key);var primary=type==="added"?left:right;var secondary=type==="added"?right:left;if(!is.nullOrUndefined(value)){if(is.defined(primary)){if(is.array(primary)||is.plainObject(primary)){return checkEquality(primary,secondary,value)}}else{return equal(secondary,value)}return false}if([left,right].every(is.array)){return!secondary.every(isEqualPredicate(primary))}if([left,right].every(is.plainObject)){return hasExtraKeys(Object.keys(primary),Object.keys(secondary))}return![left,right].every((function(d){return is.primitive(d)&&is.defined(d)}))&&(type==="added"?!is.defined(left)&&is.defined(right):is.defined(left)&&!is.defined(right))}function getIterables(previousData,data,_a){var _b=_a===void 0?{}:_a,key=_b.key;var left=nested(previousData,key);var right=nested(data,key);if(!isSameType(left,right)){throw new TypeError("Inputs have different types")}if(!canHaveLength(left,right)){throw new TypeError("Inputs don't have length")}if([left,right].every(is.plainObject)){left=Object.keys(left);right=Object.keys(right)}return[left,right]}function hasEntry(input){return function(_a){var key=_a[0],value=_a[1];if(is.array(input)){return equal(input,value)||input.some((function(d){return equal(d,value)||is.array(value)&&isEqualPredicate(value)(d)}))}if(is.plainObject(input)&&input[key]){return!!input[key]&&equal(input[key],value)}return equal(input,value)}}function hasExtraKeys(left,right){return right.some((function(d){return!left.includes(d)}))}function hasValue(input){return function(value){if(is.array(input)){return input.some((function(d){return equal(d,value)||is.array(value)&&isEqualPredicate(value)(d)}))}return equal(input,value)}}function includesOrEqualsTo(previousValue,value){return is.array(previousValue)?previousValue.some((function(d){return equal(d,value)})):equal(previousValue,value)}function isEqualPredicate(data){return function(value){return data.some((function(d){return equal(d,value)}))}}function isSameType(){var arguments_=[];for(var _i=0;_i=0)continue;target[key]=source[key]}return target}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key)}var DEFAULTS={flip:{padding:20},preventOverflow:{padding:10}};var VALIDATOR_ARG_ERROR_MESSAGE="The typeValidator argument must be a function with the signature function(props, propName, componentName).";var MESSAGE_ARG_ERROR_MESSAGE="The error message is optional, but must be a string if provided.";function propIsRequired(condition,props,propName,componentName){if(typeof condition==="boolean"){return condition}if(typeof condition==="function"){return condition(props,propName,componentName)}if(Boolean(condition)===true){return Boolean(condition)}return false}function propExists(props,propName){return Object.hasOwnProperty.call(props,propName)}function missingPropError(props,propName,componentName,message){return new Error("Required ".concat(props[propName]," `").concat(propName,"` was not specified in `").concat(componentName,"`."))}function guardAgainstInvalidArgTypes(typeValidator,message){if(typeof typeValidator!=="function"){throw new TypeError(VALIDATOR_ARG_ERROR_MESSAGE)}if(Boolean(message)&&typeof message!=="string"){throw new TypeError(MESSAGE_ARG_ERROR_MESSAGE)}}function isRequiredIf(typeValidator,condition,message){guardAgainstInvalidArgTypes(typeValidator,message);return function(props,propName,componentName){for(var _len=arguments.length,rest=new Array(_len>3?_len-3:0),_key=3;_key<_len;_key++){rest[_key-3]=arguments[_key]}if(propIsRequired(condition,props,propName,componentName)){if(propExists(props,propName)){return typeValidator.apply(void 0,[props,propName,componentName].concat(rest))}return missingPropError(props,propName,componentName)}return typeValidator.apply(void 0,[props,propName,componentName].concat(rest))}}var STATUS$1={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"};var isReact16$1=ReactDOM__default.createPortal!==void 0;function canUseDOM$1(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement)}function isMobile(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function log$1(_ref){var title=_ref.title,data=_ref.data,_ref$warn=_ref.warn,warn=_ref$warn===void 0?false:_ref$warn,_ref$debug=_ref.debug,debug=_ref$debug===void 0?false:_ref$debug;var logFn=warn?console.warn||console.error:console.log;if(debug&&title&&data){console.groupCollapsed("%creact-floater: ".concat(title),"color: #9b00ff; font-weight: bold; font-size: 12px;");if(Array.isArray(data)){data.forEach((function(d){if(is.plainObject(d)&&d.key){logFn.apply(console,[d.key,d.value])}else{logFn.apply(console,[d])}}))}else{logFn.apply(console,[data])}console.groupEnd()}}function on(element,event,cb){var capture=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;element.addEventListener(event,cb,capture)}function off(element,event,cb){var capture=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;element.removeEventListener(event,cb,capture)}function once(element,event,cb){var capture=arguments.length>3&&arguments[3]!==void 0?arguments[3]:false;var _nextCB;_nextCB=function nextCB(e){cb(e);off(element,event,_nextCB)};on(element,event,_nextCB,capture)}function noop$1(){}var ReactFloaterPortal=function(_React$Component){_inherits(ReactFloaterPortal2,_React$Component);var _super=_createSuper(ReactFloaterPortal2);function ReactFloaterPortal2(){_classCallCheck(this,ReactFloaterPortal2);return _super.apply(this,arguments)}_createClass(ReactFloaterPortal2,[{key:"componentDidMount",value:function componentDidMount(){if(!canUseDOM$1())return;if(!this.node){this.appendNode()}if(!isReact16$1){this.renderPortal()}}},{key:"componentDidUpdate",value:function componentDidUpdate(){if(!canUseDOM$1())return;if(!isReact16$1){this.renderPortal()}}},{key:"componentWillUnmount",value:function componentWillUnmount(){if(!canUseDOM$1()||!this.node)return;if(!isReact16$1){ReactDOM__default.unmountComponentAtNode(this.node)}if(this.node&&this.node.parentNode===document.body){document.body.removeChild(this.node);this.node=void 0}}},{key:"appendNode",value:function appendNode(){var _this$props=this.props,id=_this$props.id,zIndex=_this$props.zIndex;if(!this.node){this.node=document.createElement("div");if(id){this.node.id=id}if(zIndex){this.node.style.zIndex=zIndex}document.body.appendChild(this.node)}}},{key:"renderPortal",value:function renderPortal(){if(!canUseDOM$1())return null;var _this$props2=this.props,children=_this$props2.children,setRef=_this$props2.setRef;if(!this.node){this.appendNode()}if(isReact16$1){return ReactDOM__default.createPortal(children,this.node)}var portal=ReactDOM__default.unstable_renderSubtreeIntoContainer(this,children.length>1?React__default.createElement("div",null,children):children[0],this.node);setRef(portal);return null}},{key:"renderReact16",value:function renderReact16(){var _this$props3=this.props,hasChildren=_this$props3.hasChildren,placement=_this$props3.placement,target=_this$props3.target;if(!hasChildren){if(target||placement==="center"){return this.renderPortal()}return null}return this.renderPortal()}},{key:"render",value:function render(){if(!isReact16$1){return null}return this.renderReact16()}}]);return ReactFloaterPortal2}(React__default.Component);_defineProperty(ReactFloaterPortal,"propTypes",{children:PropTypes.oneOfType([PropTypes.element,PropTypes.array]),hasChildren:PropTypes.bool,id:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),placement:PropTypes.string,setRef:PropTypes.func.isRequired,target:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),zIndex:PropTypes.number});var FloaterArrow=function(_React$Component){_inherits(FloaterArrow2,_React$Component);var _super=_createSuper(FloaterArrow2);function FloaterArrow2(){_classCallCheck(this,FloaterArrow2);return _super.apply(this,arguments)}_createClass(FloaterArrow2,[{key:"parentStyle",get:function get(){var _this$props=this.props,placement=_this$props.placement,styles2=_this$props.styles;var length=styles2.arrow.length;var arrow2={pointerEvents:"none",position:"absolute",width:"100%"};if(placement.startsWith("top")){arrow2.bottom=0;arrow2.left=0;arrow2.right=0;arrow2.height=length}else if(placement.startsWith("bottom")){arrow2.left=0;arrow2.right=0;arrow2.top=0;arrow2.height=length}else if(placement.startsWith("left")){arrow2.right=0;arrow2.top=0;arrow2.bottom=0}else if(placement.startsWith("right")){arrow2.left=0;arrow2.top=0}return arrow2}},{key:"render",value:function render(){var _this$props2=this.props,placement=_this$props2.placement,setArrowRef=_this$props2.setArrowRef,styles2=_this$props2.styles;var _styles$arrow=styles2.arrow,color=_styles$arrow.color,display=_styles$arrow.display,length=_styles$arrow.length,margin=_styles$arrow.margin,position=_styles$arrow.position,spread=_styles$arrow.spread;var arrowStyles={display:display,position:position};var points;var x=spread;var y=length;if(placement.startsWith("top")){points="0,0 ".concat(x/2,",").concat(y," ").concat(x,",0");arrowStyles.bottom=0;arrowStyles.marginLeft=margin;arrowStyles.marginRight=margin}else if(placement.startsWith("bottom")){points="".concat(x,",").concat(y," ").concat(x/2,",0 0,").concat(y);arrowStyles.top=0;arrowStyles.marginLeft=margin;arrowStyles.marginRight=margin}else if(placement.startsWith("left")){y=spread;x=length;points="0,0 ".concat(x,",").concat(y/2," 0,").concat(y);arrowStyles.right=0;arrowStyles.marginTop=margin;arrowStyles.marginBottom=margin}else if(placement.startsWith("right")){y=spread;x=length;points="".concat(x,",").concat(y," ").concat(x,",0 0,").concat(y/2);arrowStyles.left=0;arrowStyles.marginTop=margin;arrowStyles.marginBottom=margin}return React__default.createElement("div",{className:"__floater__arrow",style:this.parentStyle},React__default.createElement("span",{ref:setArrowRef,style:arrowStyles},React__default.createElement("svg",{width:x,height:y,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("polygon",{points:points,fill:color}))))}}]);return FloaterArrow2}(React__default.Component);_defineProperty(FloaterArrow,"propTypes",{placement:PropTypes.string.isRequired,setArrowRef:PropTypes.func.isRequired,styles:PropTypes.object.isRequired});var _excluded$1=["color","height","width"];function FloaterCloseBtn(_ref){var handleClick=_ref.handleClick,styles2=_ref.styles;var color=styles2.color,height=styles2.height,width=styles2.width,style=_objectWithoutProperties(styles2,_excluded$1);return React__default.createElement("button",{"aria-label":"close",onClick:handleClick,style:style,type:"button"},React__default.createElement("svg",{width:"".concat(width,"px"),height:"".concat(height,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},React__default.createElement("g",null,React__default.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:color}))))}FloaterCloseBtn.propTypes={handleClick:PropTypes.func.isRequired,styles:PropTypes.object.isRequired};function FloaterContainer(_ref){var content=_ref.content,footer=_ref.footer,handleClick=_ref.handleClick,open=_ref.open,positionWrapper=_ref.positionWrapper,showCloseButton=_ref.showCloseButton,title=_ref.title,styles2=_ref.styles;var output={content:React__default.isValidElement(content)?content:React__default.createElement("div",{className:"__floater__content",style:styles2.content},content)};if(title){output.title=React__default.isValidElement(title)?title:React__default.createElement("div",{className:"__floater__title",style:styles2.title},title)}if(footer){output.footer=React__default.isValidElement(footer)?footer:React__default.createElement("div",{className:"__floater__footer",style:styles2.footer},footer)}if((showCloseButton||positionWrapper)&&!is["boolean"](open)){output.close=React__default.createElement(FloaterCloseBtn,{styles:styles2.close,handleClick:handleClick})}return React__default.createElement("div",{className:"__floater__container",style:styles2.container},output.close,output.title,output.content,output.footer)}FloaterContainer.propTypes={content:PropTypes.node.isRequired,footer:PropTypes.node,handleClick:PropTypes.func.isRequired,open:PropTypes.bool,positionWrapper:PropTypes.bool.isRequired,showCloseButton:PropTypes.bool.isRequired,styles:PropTypes.object.isRequired,title:PropTypes.node};var Floater=function(_React$Component){_inherits(Floater2,_React$Component);var _super=_createSuper(Floater2);function Floater2(){_classCallCheck(this,Floater2);return _super.apply(this,arguments)}_createClass(Floater2,[{key:"style",get:function get(){var _this$props=this.props,disableAnimation=_this$props.disableAnimation,component=_this$props.component,placement=_this$props.placement,hideArrow=_this$props.hideArrow,status=_this$props.status,styles2=_this$props.styles;var length=styles2.arrow.length,floater=styles2.floater,floaterCentered=styles2.floaterCentered,floaterClosing=styles2.floaterClosing,floaterOpening=styles2.floaterOpening,floaterWithAnimation=styles2.floaterWithAnimation,floaterWithComponent=styles2.floaterWithComponent;var element={};if(!hideArrow){if(placement.startsWith("top")){element.padding="0 0 ".concat(length,"px")}else if(placement.startsWith("bottom")){element.padding="".concat(length,"px 0 0")}else if(placement.startsWith("left")){element.padding="0 ".concat(length,"px 0 0")}else if(placement.startsWith("right")){element.padding="0 0 0 ".concat(length,"px")}}if([STATUS$1.OPENING,STATUS$1.OPEN].indexOf(status)!==-1){element=_objectSpread2(_objectSpread2({},element),floaterOpening)}if(status===STATUS$1.CLOSING){element=_objectSpread2(_objectSpread2({},element),floaterClosing)}if(status===STATUS$1.OPEN&&!disableAnimation){element=_objectSpread2(_objectSpread2({},element),floaterWithAnimation)}if(placement==="center"){element=_objectSpread2(_objectSpread2({},element),floaterCentered)}if(component){element=_objectSpread2(_objectSpread2({},element),floaterWithComponent)}return _objectSpread2(_objectSpread2({},floater),element)}},{key:"render",value:function render(){var _this$props2=this.props,component=_this$props2.component,closeFn=_this$props2.handleClick,hideArrow=_this$props2.hideArrow,setFloaterRef=_this$props2.setFloaterRef,status=_this$props2.status;var output={};var classes=["__floater"];if(component){if(React__default.isValidElement(component)){output.content=React__default.cloneElement(component,{closeFn:closeFn})}else{output.content=component({closeFn:closeFn})}}else{output.content=React__default.createElement(FloaterContainer,this.props)}if(status===STATUS$1.OPEN){classes.push("__floater__open")}if(!hideArrow){output.arrow=React__default.createElement(FloaterArrow,this.props)}return React__default.createElement("div",{ref:setFloaterRef,className:classes.join(" "),style:this.style},React__default.createElement("div",{className:"__floater__body"},output.content,output.arrow))}}]);return Floater2}(React__default.Component);_defineProperty(Floater,"propTypes",{component:PropTypes.oneOfType([PropTypes.func,PropTypes.element]),content:PropTypes.node,disableAnimation:PropTypes.bool.isRequired,footer:PropTypes.node,handleClick:PropTypes.func.isRequired,hideArrow:PropTypes.bool.isRequired,open:PropTypes.bool,placement:PropTypes.string.isRequired,positionWrapper:PropTypes.bool.isRequired,setArrowRef:PropTypes.func.isRequired,setFloaterRef:PropTypes.func.isRequired,showCloseButton:PropTypes.bool,status:PropTypes.string.isRequired,styles:PropTypes.object.isRequired,title:PropTypes.node});var ReactFloaterWrapper=function(_React$Component){_inherits(ReactFloaterWrapper2,_React$Component);var _super=_createSuper(ReactFloaterWrapper2);function ReactFloaterWrapper2(){_classCallCheck(this,ReactFloaterWrapper2);return _super.apply(this,arguments)}_createClass(ReactFloaterWrapper2,[{key:"render",value:function render(){var _this$props=this.props,children=_this$props.children,handleClick=_this$props.handleClick,handleMouseEnter=_this$props.handleMouseEnter,handleMouseLeave=_this$props.handleMouseLeave,setChildRef=_this$props.setChildRef,setWrapperRef=_this$props.setWrapperRef,style=_this$props.style,styles2=_this$props.styles;var element;if(children){if(React__default.Children.count(children)===1){if(!React__default.isValidElement(children)){element=React__default.createElement("span",null,children)}else{var refProp=is["function"](children.type)?"innerRef":"ref";element=React__default.cloneElement(React__default.Children.only(children),_defineProperty({},refProp,setChildRef))}}else{element=children}}if(!element){return null}return React__default.createElement("span",{ref:setWrapperRef,style:_objectSpread2(_objectSpread2({},styles2),style),onClick:handleClick,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave},element)}}]);return ReactFloaterWrapper2}(React__default.Component);_defineProperty(ReactFloaterWrapper,"propTypes",{children:PropTypes.node,handleClick:PropTypes.func.isRequired,handleMouseEnter:PropTypes.func.isRequired,handleMouseLeave:PropTypes.func.isRequired,setChildRef:PropTypes.func.isRequired,setWrapperRef:PropTypes.func.isRequired,style:PropTypes.object,styles:PropTypes.object.isRequired});var defaultOptions$1={zIndex:100};function getStyles$1(styles2){var options=deepmerge2(defaultOptions$1,styles2.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:options.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:options.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:options}}var _excluded=["arrow","flip","offset"];var POSITIONING_PROPS=["position","top","right","bottom","left"];var ReactFloater=function(_React$Component){_inherits(ReactFloater2,_React$Component);var _super=_createSuper(ReactFloater2);function ReactFloater2(props){var _this;_classCallCheck(this,ReactFloater2);_this=_super.call(this,props);_defineProperty(_assertThisInitialized(_this),"setArrowRef",(function(ref){_this.arrowRef=ref}));_defineProperty(_assertThisInitialized(_this),"setChildRef",(function(ref){_this.childRef=ref}));_defineProperty(_assertThisInitialized(_this),"setFloaterRef",(function(ref){_this.floaterRef=ref}));_defineProperty(_assertThisInitialized(_this),"setWrapperRef",(function(ref){_this.wrapperRef=ref}));_defineProperty(_assertThisInitialized(_this),"handleTransitionEnd",(function(){var status=_this.state.status;var callback=_this.props.callback;if(_this.wrapperPopper){_this.wrapperPopper.instance.update()}_this.setState({status:status===STATUS$1.OPENING?STATUS$1.OPEN:STATUS$1.IDLE},(function(){var newStatus=_this.state.status;callback(newStatus===STATUS$1.OPEN?"open":"close",_this.props)}))}));_defineProperty(_assertThisInitialized(_this),"handleClick",(function(){var _this$props=_this.props,event=_this$props.event,open=_this$props.open;if(is["boolean"](open))return;var _this$state=_this.state,positionWrapper=_this$state.positionWrapper,status=_this$state.status;if(_this.event==="click"||_this.event==="hover"&&positionWrapper){log$1({title:"click",data:[{event:event,status:status===STATUS$1.OPEN?"closing":"opening"}],debug:_this.debug});_this.toggle()}}));_defineProperty(_assertThisInitialized(_this),"handleMouseEnter",(function(){var _this$props2=_this.props,event=_this$props2.event,open=_this$props2.open;if(is["boolean"](open)||isMobile())return;var status=_this.state.status;if(_this.event==="hover"&&status===STATUS$1.IDLE){log$1({title:"mouseEnter",data:[{key:"originalEvent",value:event}],debug:_this.debug});clearTimeout(_this.eventDelayTimeout);_this.toggle()}}));_defineProperty(_assertThisInitialized(_this),"handleMouseLeave",(function(){var _this$props3=_this.props,event=_this$props3.event,eventDelay=_this$props3.eventDelay,open=_this$props3.open;if(is["boolean"](open)||isMobile())return;var _this$state2=_this.state,status=_this$state2.status,positionWrapper=_this$state2.positionWrapper;if(_this.event==="hover"){log$1({title:"mouseLeave",data:[{key:"originalEvent",value:event}],debug:_this.debug});if(!eventDelay){_this.toggle(STATUS$1.IDLE)}else if([STATUS$1.OPENING,STATUS$1.OPEN].indexOf(status)!==-1&&!positionWrapper&&!_this.eventDelayTimeout){_this.eventDelayTimeout=setTimeout((function(){delete _this.eventDelayTimeout;_this.toggle()}),eventDelay*1e3)}}}));_this.state={currentPlacement:props.placement,needsUpdate:false,positionWrapper:props.wrapperOptions.position&&!!props.target,status:STATUS$1.INIT,statusWrapper:STATUS$1.INIT};_this._isMounted=false;_this.hasMounted=false;if(canUseDOM$1()){window.addEventListener("load",(function(){if(_this.popper){_this.popper.instance.update()}if(_this.wrapperPopper){_this.wrapperPopper.instance.update()}}))}return _this}_createClass(ReactFloater2,[{key:"componentDidMount",value:function componentDidMount(){if(!canUseDOM$1())return;var positionWrapper=this.state.positionWrapper;var _this$props5=this.props,children=_this$props5.children,open=_this$props5.open,target=_this$props5.target;this._isMounted=true;log$1({title:"init",data:{hasChildren:!!children,hasTarget:!!target,isControlled:is["boolean"](open),positionWrapper:positionWrapper,target:this.target,floater:this.floaterRef},debug:this.debug});if(!this.hasMounted){this.initPopper();this.hasMounted=true}if(!children&&target&&!is["boolean"](open));}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){if(!canUseDOM$1())return;var _this$props6=this.props,autoOpen=_this$props6.autoOpen,open=_this$props6.open,target=_this$props6.target,wrapperOptions=_this$props6.wrapperOptions;var _treeChanges=treeChanges(prevState,this.state),changedFrom=_treeChanges.changedFrom,changed=_treeChanges.changed;if(prevProps.open!==open){var forceStatus;if(is["boolean"](open)){forceStatus=open?STATUS$1.OPENING:STATUS$1.CLOSING}this.toggle(forceStatus)}if(prevProps.wrapperOptions.position!==wrapperOptions.position||prevProps.target!==target){this.changeWrapperPosition(this.props)}if(changed("status",STATUS$1.IDLE)&&open){this.toggle(STATUS$1.OPEN)}else if(changedFrom("status",STATUS$1.INIT,STATUS$1.IDLE)&&autoOpen){this.toggle(STATUS$1.OPEN)}if(this.popper&&changed("status",STATUS$1.OPENING)){this.popper.instance.update()}if(this.floaterRef&&(changed("status",STATUS$1.OPENING)||changed("status",STATUS$1.CLOSING))){once(this.floaterRef,"transitionend",this.handleTransitionEnd)}if(changed("needsUpdate",true)){this.rebuildPopper()}}},{key:"componentWillUnmount",value:function componentWillUnmount(){if(!canUseDOM$1())return;this._isMounted=false;if(this.popper){this.popper.instance.destroy()}if(this.wrapperPopper){this.wrapperPopper.instance.destroy()}}},{key:"initPopper",value:function initPopper(){var _this2=this;var target=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target;var positionWrapper=this.state.positionWrapper;var _this$props7=this.props,disableFlip=_this$props7.disableFlip,getPopper=_this$props7.getPopper,hideArrow=_this$props7.hideArrow,offset2=_this$props7.offset,placement=_this$props7.placement,wrapperOptions=_this$props7.wrapperOptions;var flipBehavior=placement==="top"||placement==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(placement==="center"){this.setState({status:STATUS$1.IDLE})}else if(target&&this.floaterRef){var _this$options=this.options,arrow2=_this$options.arrow,flip2=_this$options.flip,offsetOptions=_this$options.offset,rest=_objectWithoutProperties(_this$options,_excluded);new Popper(target,this.floaterRef,{placement:placement,modifiers:_objectSpread2({arrow:_objectSpread2({enabled:!hideArrow,element:this.arrowRef},arrow2),flip:_objectSpread2({enabled:!disableFlip,behavior:flipBehavior},flip2),offset:_objectSpread2({offset:"0, ".concat(offset2,"px")},offsetOptions)},rest),onCreate:function onCreate2(data){var _this2$floaterRef;_this2.popper=data;if(!((_this2$floaterRef=_this2.floaterRef)!==null&&_this2$floaterRef!==void 0&&_this2$floaterRef.isConnected)){_this2.setState({needsUpdate:true});return}getPopper(data,"floater");if(_this2._isMounted){_this2.setState({currentPlacement:data.placement,status:STATUS$1.IDLE})}if(placement!==data.placement){setTimeout((function(){data.instance.update()}),1)}},onUpdate:function onUpdate2(data){_this2.popper=data;var currentPlacement=_this2.state.currentPlacement;if(_this2._isMounted&&data.placement!==currentPlacement){_this2.setState({currentPlacement:data.placement})}}})}if(positionWrapper){var wrapperOffset=!is.undefined(wrapperOptions.offset)?wrapperOptions.offset:0;new Popper(this.target,this.wrapperRef,{placement:wrapperOptions.placement||placement,modifiers:{arrow:{enabled:false},offset:{offset:"0, ".concat(wrapperOffset,"px")},flip:{enabled:false}},onCreate:function onCreate2(data){_this2.wrapperPopper=data;if(_this2._isMounted){_this2.setState({statusWrapper:STATUS$1.IDLE})}getPopper(data,"wrapper");if(placement!==data.placement){setTimeout((function(){data.instance.update()}),1)}}})}}},{key:"rebuildPopper",value:function rebuildPopper(){var _this3=this;this.floaterRefInterval=setInterval((function(){var _this3$floaterRef;if((_this3$floaterRef=_this3.floaterRef)!==null&&_this3$floaterRef!==void 0&&_this3$floaterRef.isConnected){clearInterval(_this3.floaterRefInterval);_this3.setState({needsUpdate:false});_this3.initPopper()}}),50)}},{key:"changeWrapperPosition",value:function changeWrapperPosition(_ref){var target=_ref.target,wrapperOptions=_ref.wrapperOptions;this.setState({positionWrapper:wrapperOptions.position&&!!target})}},{key:"toggle",value:function toggle(forceStatus){var status=this.state.status;var nextStatus=status===STATUS$1.OPEN?STATUS$1.CLOSING:STATUS$1.OPENING;if(!is.undefined(forceStatus)){nextStatus=forceStatus}this.setState({status:nextStatus})}},{key:"debug",get:function get(){var debug=this.props.debug;return debug||canUseDOM$1()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function get(){var _this$props8=this.props,disableHoverToClick=_this$props8.disableHoverToClick,event=_this$props8.event;if(event==="hover"&&isMobile()&&!disableHoverToClick){return"click"}return event}},{key:"options",get:function get(){var options=this.props.options;return deepmerge2(DEFAULTS,options||{})}},{key:"styles",get:function get(){var _this4=this;var _this$state3=this.state,status=_this$state3.status,positionWrapper=_this$state3.positionWrapper,statusWrapper=_this$state3.statusWrapper;var styles2=this.props.styles;var nextStyles=deepmerge2(getStyles$1(styles2),styles2);if(positionWrapper){var wrapperStyles;if(!([STATUS$1.IDLE].indexOf(status)!==-1)||!([STATUS$1.IDLE].indexOf(statusWrapper)!==-1)){wrapperStyles=nextStyles.wrapperPosition}else{wrapperStyles=this.wrapperPopper.styles}nextStyles.wrapper=_objectSpread2(_objectSpread2({},nextStyles.wrapper),wrapperStyles)}if(this.target){var targetStyles=window.getComputedStyle(this.target);if(this.wrapperStyles){nextStyles.wrapper=_objectSpread2(_objectSpread2({},nextStyles.wrapper),this.wrapperStyles)}else if(!(["relative","static"].indexOf(targetStyles.position)!==-1)){this.wrapperStyles={};if(!positionWrapper){POSITIONING_PROPS.forEach((function(d){_this4.wrapperStyles[d]=targetStyles[d]}));nextStyles.wrapper=_objectSpread2(_objectSpread2({},nextStyles.wrapper),this.wrapperStyles);this.target.style.position="relative";this.target.style.top="auto";this.target.style.right="auto";this.target.style.bottom="auto";this.target.style.left="auto"}}}return nextStyles}},{key:"target",get:function get(){if(!canUseDOM$1())return null;var target=this.props.target;if(target){if(is.domElement(target)){return target}return document.querySelector(target)}return this.childRef||this.wrapperRef}},{key:"render",value:function render(){var _this$state4=this.state,currentPlacement=_this$state4.currentPlacement,positionWrapper=_this$state4.positionWrapper,status=_this$state4.status;var _this$props9=this.props,children=_this$props9.children,component=_this$props9.component,content=_this$props9.content,disableAnimation=_this$props9.disableAnimation,footer=_this$props9.footer,hideArrow=_this$props9.hideArrow,id=_this$props9.id,open=_this$props9.open,showCloseButton=_this$props9.showCloseButton,style=_this$props9.style,target=_this$props9.target,title=_this$props9.title;var wrapper=React__default.createElement(ReactFloaterWrapper,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:style,styles:this.styles.wrapper},children);var output={};if(positionWrapper){output.wrapperInPortal=wrapper}else{output.wrapperAsChildren=wrapper}return React__default.createElement("span",null,React__default.createElement(ReactFloaterPortal,{hasChildren:!!children,id:id,placement:currentPlacement,setRef:this.setFloaterRef,target:target,zIndex:this.styles.options.zIndex},React__default.createElement(Floater,{component:component,content:content,disableAnimation:disableAnimation,footer:footer,handleClick:this.handleClick,hideArrow:hideArrow||currentPlacement==="center",open:open,placement:currentPlacement,positionWrapper:positionWrapper,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:showCloseButton,status:status,styles:this.styles,title:title}),output.wrapperInPortal),output.wrapperAsChildren)}}]);return ReactFloater2}(React__default.Component);_defineProperty(ReactFloater,"propTypes",{autoOpen:PropTypes.bool,callback:PropTypes.func,children:PropTypes.node,component:isRequiredIf(PropTypes.oneOfType([PropTypes.func,PropTypes.element]),(function(props){return!props.content})),content:isRequiredIf(PropTypes.node,(function(props){return!props.component})),debug:PropTypes.bool,disableAnimation:PropTypes.bool,disableFlip:PropTypes.bool,disableHoverToClick:PropTypes.bool,event:PropTypes.oneOf(["hover","click"]),eventDelay:PropTypes.number,footer:PropTypes.node,getPopper:PropTypes.func,hideArrow:PropTypes.bool,id:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),offset:PropTypes.number,open:PropTypes.bool,options:PropTypes.object,placement:PropTypes.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:PropTypes.bool,style:PropTypes.object,styles:PropTypes.object,target:PropTypes.oneOfType([PropTypes.object,PropTypes.string]),title:PropTypes.node,wrapperOptions:PropTypes.shape({offset:PropTypes.number,placement:PropTypes.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:PropTypes.bool})});_defineProperty(ReactFloater,"defaultProps",{autoOpen:false,callback:noop$1,debug:false,disableAnimation:false,disableFlip:false,disableHoverToClick:false,event:"click",eventDelay:.4,getPopper:noop$1,hideArrow:false,offset:15,placement:"bottom",showCloseButton:false,styles:{},target:null,wrapperOptions:{position:false}});var hasProps=function(jsx2){return Object.prototype.hasOwnProperty.call(jsx2,"props")};var reduceJsxToString=function(previous,current){return previous+innerText(current)};var innerText=function(jsx2){if(jsx2===null||typeof jsx2==="boolean"||typeof jsx2==="undefined"){return""}if(typeof jsx2==="number"){return jsx2.toString()}if(typeof jsx2==="string"){return jsx2}if(Array.isArray(jsx2)){return jsx2.reduce(reduceJsxToString,"")}if(hasProps(jsx2)&&Object.prototype.hasOwnProperty.call(jsx2.props,"children")){return innerText(jsx2.props.children)}return""};innerText.default=innerText;var reactInnertext=innerText;const innerText$1=getDefaultExportFromCjs(reactInnertext);var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value:value}):obj[key]=value;var __publicField=(obj,key,value)=>{__defNormalProp(obj,typeof key!=="symbol"?key+"":key,value);return value};var ACTIONS={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"};var EVENTS={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"};var LIFECYCLE={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"};var STATUS={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"};function canUseDOM(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement)}function getClientRect(element){if(!element){return null}return element.getBoundingClientRect()}function getDocumentHeight(median2=true){const{body:body,documentElement:documentElement}=document;if(!body||!documentElement){return 0}if(median2){const heights=[body.scrollHeight,body.offsetHeight,documentElement.clientHeight,documentElement.scrollHeight,documentElement.offsetHeight].sort(((a,b)=>a-b));const middle=Math.floor(heights.length/2);if(heights.length%2===0){return(heights[middle-1]+heights[middle])/2}return heights[middle]}return Math.max(body.scrollHeight,body.offsetHeight,documentElement.clientHeight,documentElement.scrollHeight,documentElement.offsetHeight)}function getElement(element){if(typeof element==="string"){return document.querySelector(element)}return element}function getStyleComputedProperty(el){if(!el||el.nodeType!==1){return null}return getComputedStyle(el)}function getScrollParent(element,skipFix,forListener){if(!element){return scrollDocument()}const parent=scrollParent(element);if(parent){if(parent.isSameNode(scrollDocument())){if(forListener){return document}return scrollDocument()}const hasScrolling=parent.scrollHeight>parent.offsetHeight;if(!hasScrolling&&!skipFix){parent.style.overflow="initial";return scrollDocument()}}return parent}function hasCustomScrollParent(element,skipFix){if(!element){return false}const parent=getScrollParent(element,skipFix);return parent?!parent.isSameNode(scrollDocument()):false}function hasCustomOffsetParent(element){return element.offsetParent!==document.body}function hasPosition(el,type="fixed"){if(!el||!(el instanceof HTMLElement)){return false}const{nodeName:nodeName}=el;const styles2=getStyleComputedProperty(el);if(nodeName==="BODY"||nodeName==="HTML"){return false}if(styles2&&styles2.position===type){return true}if(!el.parentNode){return false}return hasPosition(el.parentNode,type)}function isElementVisible(element){var _a;if(!element){return false}let parentElement=element;while(parentElement){if(parentElement===document.body){break}if(parentElement instanceof HTMLElement){const{display:display,visibility:visibility}=getComputedStyle(parentElement);if(display==="none"||visibility==="hidden"){return false}}parentElement=(_a=parentElement.parentElement)!=null?_a:null}return true}function getElementPosition(element,offset2,skipFix){var _a;const elementRect=getClientRect(element);const parent=getScrollParent(element,skipFix);const hasScrollParent=hasCustomScrollParent(element,skipFix);let parentTop=0;let top=(_a=elementRect==null?void 0:elementRect.top)!=null?_a:0;if(parent instanceof HTMLElement){parentTop=parent.scrollTop;if(!hasScrollParent&&!hasPosition(element)){top+=parentTop}if(!parent.isSameNode(scrollDocument())){top+=scrollDocument().scrollTop}}return Math.floor(top-offset2)}function getScrollTo(element,offset2,skipFix){var _a;if(!element){return 0}const{offsetTop:offsetTop=0,scrollTop:scrollTop=0}=(_a=scrollParent(element))!=null?_a:{};let top=element.getBoundingClientRect().top+scrollTop;if(!!offsetTop&&(hasCustomScrollParent(element,skipFix)||hasCustomOffsetParent(element))){top-=offsetTop}const output=Math.floor(top-offset2);return output<0?0:output}function scrollDocument(){var _a;return(_a=document.scrollingElement)!=null?_a:document.documentElement}function scrollTo(value,options){const{duration:duration,element:element}=options;return new Promise(((resolve,reject)=>{const{scrollTop:scrollTop}=element;const limit=value>scrollTop?value-scrollTop:scrollTop-value;scroll$1.top(element,value,{duration:limit<100?50:duration},(error=>{if(error&&error.message!=="Element already at target scroll position"){return reject(error)}return resolve()}))}))}var isReact16=createPortal!==void 0;function getBrowser(userAgent=navigator.userAgent){let browser=userAgent;if(typeof window==="undefined"){browser="node"}else if(document.documentMode){browser="ie"}else if(/Edge/.test(userAgent)){browser="edge"}else if(Boolean(window.opera)||userAgent.includes(" OPR/")){browser="opera"}else if(typeof window.InstallTrigger!=="undefined"){browser="firefox"}else if(window.chrome){browser="chrome"}else if(/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(userAgent)){browser="safari"}return browser}function getText(root){const content=[];const recurse=child=>{if(typeof child==="string"||typeof child==="number"){content.push(child)}else if(Array.isArray(child)){child.forEach((c=>recurse(c)))}else if(isValidElement(child)){const{children:children}=child.props;if(Array.isArray(children)){children.forEach((c=>recurse(c)))}else{recurse(children)}}};recurse(root);return content.join(" ").trim()}function hasValidKeys(object,keys){if(!src_default$1.plainObject(object)||!src_default$1.array(keys)){return false}return Object.keys(object).every((d=>keys.includes(d)))}function hexToRGB(hex){const shorthandRegex=/^#?([\da-f])([\da-f])([\da-f])$/i;const properHex=hex.replace(shorthandRegex,((_m,r,g,b)=>r+r+g+g+b+b));const result=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(properHex);return result?[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]:[]}function hideBeacon(step){return step.disableBeacon||step.placement==="center"}function isLegacy(){return!["chrome","safari","firefox","opera"].includes(getBrowser())}function log({data:data,debug:debug=false,title:title,warn:warn=false}){const logFn=warn?console.warn||console.error:console.log;if(debug){if(title&&data){console.groupCollapsed(`%creact-joyride: ${title}`,"color: #ff0044; font-weight: bold; font-size: 12px;");if(Array.isArray(data)){data.forEach((d=>{if(src_default$1.plainObject(d)&&d.key){logFn.apply(console,[d.key,d.value])}else{logFn.apply(console,[d])}}))}else{logFn.apply(console,[data])}console.groupEnd()}else{console.error("Missing title or data props")}}}function noop(){return void 0}function objectKeys(input){return Object.keys(input)}function omit(input,...filter){if(!src_default$1.plainObject(input)){throw new TypeError("Expected an object")}const output={};for(const key in input){if({}.hasOwnProperty.call(input,key)){if(!filter.includes(key)){output[key]=input[key]}}}return output}function pick(input,...filter){if(!src_default$1.plainObject(input)){throw new TypeError("Expected an object")}if(!filter.length){return input}const output={};for(const key in input){if({}.hasOwnProperty.call(input,key)){if(filter.includes(key)){output[key]=input[key]}}}return output}function shouldScroll(options){const{isFirstStep:isFirstStep,lifecycle:lifecycle,previousLifecycle:previousLifecycle,scrollToFirstStep:scrollToFirstStep,step:step,target:target}=options;return!step.disableScrolling&&(!isFirstStep||scrollToFirstStep||lifecycle===LIFECYCLE.TOOLTIP)&&step.placement!=="center"&&(!step.isFixed||!hasPosition(target))&&previousLifecycle!==lifecycle&&[LIFECYCLE.BEACON,LIFECYCLE.TOOLTIP].includes(lifecycle)}var defaultFloaterProps={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:true}};var defaultLocale={back:"Back",close:"Close",last:"Last",next:"Next",open:"Open the dialog",skip:"Skip"};var defaultStep={event:"click",placement:"bottom",offset:10,disableBeacon:false,disableCloseOnEsc:false,disableOverlay:false,disableOverlayClose:false,disableScrollParentFix:false,disableScrolling:false,hideBackButton:false,hideCloseButton:false,hideFooter:false,isFixed:false,locale:defaultLocale,showProgress:false,showSkipButton:false,spotlightClicks:false,spotlightPadding:10};var defaultProps={continuous:false,debug:false,disableCloseOnEsc:false,disableOverlay:false,disableOverlayClose:false,disableScrolling:false,disableScrollParentFix:false,getHelpers:noop(),hideBackButton:false,run:true,scrollOffset:20,scrollDuration:300,scrollToFirstStep:false,showSkipButton:false,showProgress:false,spotlightClicks:false,spotlightPadding:10,steps:[]};var defaultOptions={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100};var buttonBase={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"};var spotlight={borderRadius:4,position:"absolute"};function getStyles(props,step){var _a,_b,_c,_d,_e;const{floaterProps:floaterProps,styles:styles2}=props;const mergedFloaterProps=deepmerge2((_a=step.floaterProps)!=null?_a:{},floaterProps!=null?floaterProps:{});const mergedStyles=deepmerge2(styles2!=null?styles2:{},(_b=step.styles)!=null?_b:{});const options=deepmerge2(defaultOptions,mergedStyles.options||{});const hideBeacon2=step.placement==="center"||step.disableBeacon;let{width:width}=options;if(window.innerWidth>480){width=380}if("width"in options){width=typeof options.width==="number"&&window.innerWidthvalidateStep(d,debug)))}var defaultState={action:"init",controlled:false,index:0,lifecycle:LIFECYCLE.INIT,origin:null,size:0,status:STATUS.IDLE};var validKeys=objectKeys(omit(defaultState,"controlled","size"));var Store=class{constructor(options){__publicField(this,"beaconPopper");__publicField(this,"tooltipPopper");__publicField(this,"data",new Map);__publicField(this,"listener");__publicField(this,"store",new Map);__publicField(this,"addListener",(listener=>{this.listener=listener}));__publicField(this,"setSteps",(steps2=>{const{size:size,status:status}=this.getState();const state={size:steps2.length,status:status};this.data.set("steps",steps2);if(status===STATUS.WAITING&&!size&&steps2.length){state.status=STATUS.RUNNING}this.setState(state)}));__publicField(this,"getPopper",(name=>{if(name==="beacon"){return this.beaconPopper}return this.tooltipPopper}));__publicField(this,"setPopper",((name,popper)=>{if(name==="beacon"){this.beaconPopper=popper}else{this.tooltipPopper=popper}}));__publicField(this,"cleanupPoppers",(()=>{this.beaconPopper=null;this.tooltipPopper=null}));__publicField(this,"close",((origin=null)=>{const{index:index,status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({...this.getNextState({action:ACTIONS.CLOSE,index:index+1,origin:origin})})}));__publicField(this,"go",(nextIndex=>{const{controlled:controlled,status:status}=this.getState();if(controlled||status!==STATUS.RUNNING){return}const step=this.getSteps()[nextIndex];this.setState({...this.getNextState({action:ACTIONS.GO,index:nextIndex}),status:step?status:STATUS.FINISHED})}));__publicField(this,"info",(()=>this.getState()));__publicField(this,"next",(()=>{const{index:index,status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState(this.getNextState({action:ACTIONS.NEXT,index:index+1}))}));__publicField(this,"open",(()=>{const{status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({...this.getNextState({action:ACTIONS.UPDATE,lifecycle:LIFECYCLE.TOOLTIP})})}));__publicField(this,"prev",(()=>{const{index:index,status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({...this.getNextState({action:ACTIONS.PREV,index:index-1})})}));__publicField(this,"reset",((restart=false)=>{const{controlled:controlled}=this.getState();if(controlled){return}this.setState({...this.getNextState({action:ACTIONS.RESET,index:0}),status:restart?STATUS.RUNNING:STATUS.READY})}));__publicField(this,"skip",(()=>{const{status:status}=this.getState();if(status!==STATUS.RUNNING){return}this.setState({action:ACTIONS.SKIP,lifecycle:LIFECYCLE.INIT,status:STATUS.SKIPPED})}));__publicField(this,"start",(nextIndex=>{const{index:index,size:size}=this.getState();this.setState({...this.getNextState({action:ACTIONS.START,index:src_default$1.number(nextIndex)?nextIndex:index},true),status:size?STATUS.RUNNING:STATUS.WAITING})}));__publicField(this,"stop",((advance=false)=>{const{index:index,status:status}=this.getState();if([STATUS.FINISHED,STATUS.SKIPPED].includes(status)){return}this.setState({...this.getNextState({action:ACTIONS.STOP,index:index+(advance?1:0)}),status:STATUS.PAUSED})}));__publicField(this,"update",(state=>{var _a,_b;if(!hasValidKeys(state,validKeys)){throw new Error(`State is not valid. Valid keys: ${validKeys.join(", ")}`)}this.setState({...this.getNextState({...this.getState(),...state,action:(_a=state.action)!=null?_a:ACTIONS.UPDATE,origin:(_b=state.origin)!=null?_b:null},true)})}));const{continuous:continuous=false,stepIndex:stepIndex,steps:steps=[]}=options!=null?options:{};this.setState({action:ACTIONS.INIT,controlled:src_default$1.number(stepIndex),continuous:continuous,index:src_default$1.number(stepIndex)?stepIndex:0,lifecycle:LIFECYCLE.INIT,origin:null,status:steps.length?STATUS.READY:STATUS.IDLE},true);this.beaconPopper=null;this.tooltipPopper=null;this.listener=null;this.setSteps(steps)}getState(){if(!this.store.size){return{...defaultState}}return{action:this.store.get("action")||"",controlled:this.store.get("controlled")||false,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}}getNextState(state,force=false){var _a,_b,_c,_d,_e;const{action:action,controlled:controlled,index:index,size:size,status:status}=this.getState();const newIndex=src_default$1.number(state.index)?state.index:index;const nextIndex=controlled&&!force?index:Math.min(Math.max(newIndex,0),size);return{action:(_a=state.action)!=null?_a:action,controlled:controlled,index:nextIndex,lifecycle:(_b=state.lifecycle)!=null?_b:LIFECYCLE.INIT,origin:(_c=state.origin)!=null?_c:null,size:(_d=state.size)!=null?_d:size,status:nextIndex===size?STATUS.FINISHED:(_e=state.status)!=null?_e:status}}getSteps(){const steps=this.data.get("steps");return Array.isArray(steps)?steps:[]}hasUpdatedState(oldState){const before=JSON.stringify(oldState);const after=JSON.stringify(this.getState());return before!==after}setState(nextState,initial=false){const state=this.getState();const{action:action,index:index,lifecycle:lifecycle,origin:origin=null,size:size,status:status}={...state,...nextState};this.store.set("action",action);this.store.set("index",index);this.store.set("lifecycle",lifecycle);this.store.set("origin",origin);this.store.set("size",size);this.store.set("status",status);if(initial){this.store.set("controlled",nextState.controlled);this.store.set("continuous",nextState.continuous)}if(this.listener&&this.hasUpdatedState(state)){this.listener(this.getState())}}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function createStore(options){return new Store(options)}function JoyrideSpotlight({styles:styles2}){return React.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:styles2})}var Spotlight_default=JoyrideSpotlight;var JoyrideOverlay=class extends React.Component{constructor(){super(...arguments);__publicField(this,"isActive",false);__publicField(this,"resizeTimeout");__publicField(this,"scrollTimeout");__publicField(this,"scrollParent");__publicField(this,"state",{isScrolling:false,mouseOverSpotlight:false,showSpotlight:true});__publicField(this,"hideSpotlight",(()=>{const{continuous:continuous,disableOverlay:disableOverlay,lifecycle:lifecycle}=this.props;const hiddenLifecycles=[LIFECYCLE.BEACON,LIFECYCLE.COMPLETE,LIFECYCLE.ERROR];return disableOverlay||(continuous?hiddenLifecycles.includes(lifecycle):lifecycle!==LIFECYCLE.TOOLTIP)}));__publicField(this,"handleMouseMove",(event=>{const{mouseOverSpotlight:mouseOverSpotlight}=this.state;const{height:height,left:left,position:position,top:top,width:width}=this.spotlightStyles;const offsetY=position==="fixed"?event.clientY:event.pageY;const offsetX=position==="fixed"?event.clientX:event.pageX;const inSpotlightHeight=offsetY>=top&&offsetY<=top+height;const inSpotlightWidth=offsetX>=left&&offsetX<=left+width;const inSpotlight=inSpotlightWidth&&inSpotlightHeight;if(inSpotlight!==mouseOverSpotlight){this.updateState({mouseOverSpotlight:inSpotlight})}}));__publicField(this,"handleScroll",(()=>{const{target:target}=this.props;const element=getElement(target);if(this.scrollParent!==document){const{isScrolling:isScrolling}=this.state;if(!isScrolling){this.updateState({isScrolling:true,showSpotlight:false})}clearTimeout(this.scrollTimeout);this.scrollTimeout=window.setTimeout((()=>{this.updateState({isScrolling:false,showSpotlight:true})}),50)}else if(hasPosition(element,"sticky")){this.updateState({})}}));__publicField(this,"handleResize",(()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout((()=>{if(!this.isActive){return}this.forceUpdate()}),100)}))}componentDidMount(){const{debug:debug,disableScrolling:disableScrolling,disableScrollParentFix:disableScrollParentFix=false,target:target}=this.props;const element=getElement(target);this.scrollParent=getScrollParent(element!=null?element:document.body,disableScrollParentFix,true);this.isActive=true;window.addEventListener("resize",this.handleResize)}componentDidUpdate(previousProps){var _a;const{lifecycle:lifecycle,spotlightClicks:spotlightClicks}=this.props;const{changed:changed}=treeChanges$1(previousProps,this.props);if(changed("lifecycle",LIFECYCLE.TOOLTIP)){(_a=this.scrollParent)==null?void 0:_a.addEventListener("scroll",this.handleScroll,{passive:true});setTimeout((()=>{const{isScrolling:isScrolling}=this.state;if(!isScrolling){this.updateState({showSpotlight:true})}}),100)}if(changed("spotlightClicks")||changed("disableOverlay")||changed("lifecycle")){if(spotlightClicks&&lifecycle===LIFECYCLE.TOOLTIP){window.addEventListener("mousemove",this.handleMouseMove,false)}else if(lifecycle!==LIFECYCLE.TOOLTIP){window.removeEventListener("mousemove",this.handleMouseMove)}}}componentWillUnmount(){var _a;this.isActive=false;window.removeEventListener("mousemove",this.handleMouseMove);window.removeEventListener("resize",this.handleResize);clearTimeout(this.resizeTimeout);clearTimeout(this.scrollTimeout);(_a=this.scrollParent)==null?void 0:_a.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:mouseOverSpotlight}=this.state;const{disableOverlayClose:disableOverlayClose,placement:placement,styles:styles2}=this.props;let baseStyles=styles2.overlay;if(isLegacy()){baseStyles=placement==="center"?styles2.overlayLegacyCenter:styles2.overlayLegacy}return{cursor:disableOverlayClose?"default":"pointer",height:getDocumentHeight(),pointerEvents:mouseOverSpotlight?"none":"auto",...baseStyles}}get spotlightStyles(){var _a,_b,_c;const{showSpotlight:showSpotlight}=this.state;const{disableScrollParentFix:disableScrollParentFix=false,spotlightClicks:spotlightClicks,spotlightPadding:spotlightPadding=0,styles:styles2,target:target}=this.props;const element=getElement(target);const elementRect=getClientRect(element);const isFixedTarget=hasPosition(element);const top=getElementPosition(element,spotlightPadding,disableScrollParentFix);return{...isLegacy()?styles2.spotlightLegacy:styles2.spotlight,height:Math.round(((_a=elementRect==null?void 0:elementRect.height)!=null?_a:0)+spotlightPadding*2),left:Math.round(((_b=elementRect==null?void 0:elementRect.left)!=null?_b:0)-spotlightPadding),opacity:showSpotlight?1:0,pointerEvents:spotlightClicks?"none":"auto",position:isFixedTarget?"fixed":"absolute",top:top,transition:"opacity 0.2s",width:Math.round(((_c=elementRect==null?void 0:elementRect.width)!=null?_c:0)+spotlightPadding*2)}}updateState(state){if(!this.isActive){return}this.setState((previousState=>({...previousState,...state})))}render(){const{showSpotlight:showSpotlight}=this.state;const{onClickOverlay:onClickOverlay,placement:placement}=this.props;const{hideSpotlight:hideSpotlight,overlayStyles:overlayStyles,spotlightStyles:spotlightStyles}=this;if(hideSpotlight()){return null}let spotlight2=placement!=="center"&&showSpotlight&&React.createElement(Spotlight_default,{styles:spotlightStyles});if(getBrowser()==="safari"){const{mixBlendMode:mixBlendMode,zIndex:zIndex,...safariOverlay}=overlayStyles;spotlight2=React.createElement("div",{style:{...safariOverlay}},spotlight2);delete overlayStyles.backgroundColor}return React.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:onClickOverlay,role:"presentation",style:overlayStyles},spotlight2)}};var JoyridePortal=class extends React.Component{constructor(){super(...arguments);__publicField(this,"node",null)}componentDidMount(){const{id:id}=this.props;if(!canUseDOM()){return}this.node=document.createElement("div");this.node.id=id;document.body.appendChild(this.node);if(!isReact16){this.renderReact15()}}componentDidUpdate(){if(!canUseDOM()){return}if(!isReact16){this.renderReact15()}}componentWillUnmount(){if(!canUseDOM()||!this.node){return}if(!isReact16){ReactDOM.unmountComponentAtNode(this.node)}if(this.node.parentNode===document.body){document.body.removeChild(this.node);this.node=null}}renderReact15(){if(!canUseDOM()){return}const{children:children}=this.props;if(this.node){ReactDOM.unstable_renderSubtreeIntoContainer(this,children,this.node)}}renderReact16(){if(!canUseDOM()||!isReact16){return null}const{children:children}=this.props;if(!this.node){return null}return ReactDOM.createPortal(children,this.node)}render(){if(!isReact16){return null}return this.renderReact16()}};var Scope=class{constructor(element,options){__publicField(this,"element");__publicField(this,"options");__publicField(this,"canBeTabbed",(element2=>{const{tabIndex:tabIndex}=element2;if(tabIndex===null||tabIndex<0){return false}return this.canHaveFocus(element2)}));__publicField(this,"canHaveFocus",(element2=>{const validTabNodes=/input|select|textarea|button|object/;const nodeName=element2.nodeName.toLowerCase();const isValid=validTabNodes.test(nodeName)&&!element2.getAttribute("disabled")||nodeName==="a"&&!!element2.getAttribute("href");return isValid&&this.isVisible(element2)}));__publicField(this,"findValidTabElements",(()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)));__publicField(this,"handleKeyDown",(event=>{const{code:code="Tab"}=this.options;if(event.code===code){this.interceptTab(event)}}));__publicField(this,"interceptTab",(event=>{event.preventDefault();const elements=this.findValidTabElements();const{shiftKey:shiftKey}=event;if(!elements.length){return}let x=document.activeElement?elements.indexOf(document.activeElement):0;if(x===-1||!shiftKey&&x+1===elements.length){x=0}else if(shiftKey&&x===0){x=elements.length-1}else{x+=shiftKey?-1:1}elements[x].focus()}));__publicField(this,"isHidden",(element2=>{const noSize=element2.offsetWidth<=0&&element2.offsetHeight<=0;const style=window.getComputedStyle(element2);if(noSize&&!element2.innerHTML){return true}return noSize&&style.getPropertyValue("overflow")!=="visible"||style.getPropertyValue("display")==="none"}));__publicField(this,"isVisible",(element2=>{let parentElement=element2;while(parentElement){if(parentElement instanceof HTMLElement){if(parentElement===document.body){break}if(this.isHidden(parentElement)){return false}parentElement=parentElement.parentNode}}return true}));__publicField(this,"removeScope",(()=>{window.removeEventListener("keydown",this.handleKeyDown)}));__publicField(this,"checkFocus",(target=>{if(document.activeElement!==target){target.focus();window.requestAnimationFrame((()=>this.checkFocus(target)))}}));__publicField(this,"setFocus",(()=>{const{selector:selector}=this.options;if(!selector){return}const target=this.element.querySelector(selector);if(target){window.requestAnimationFrame((()=>this.checkFocus(target)))}}));if(!(element instanceof HTMLElement)){throw new TypeError("Invalid parameter: element must be an HTMLElement")}this.element=element;this.options=options;window.addEventListener("keydown",this.handleKeyDown,false);this.setFocus()}};var JoyrideBeacon=class extends React.Component{constructor(props){super(props);__publicField(this,"beacon",null);__publicField(this,"setBeaconRef",(c=>{this.beacon=c}));if(props.beaconComponent){return}const head=document.head||document.getElementsByTagName("head")[0];const style=document.createElement("style");style.id="joyride-beacon-animation";if(props.nonce){style.setAttribute("nonce",props.nonce)}const css=`\n @keyframes joyride-beacon-inner {\n 20% {\n opacity: 0.9;\n }\n \n 90% {\n opacity: 0.7;\n }\n }\n \n @keyframes joyride-beacon-outer {\n 0% {\n transform: scale(1);\n }\n \n 45% {\n opacity: 0.7;\n transform: scale(0.75);\n }\n \n 100% {\n opacity: 0.9;\n transform: scale(1);\n }\n }\n `;style.appendChild(document.createTextNode(css));head.appendChild(style)}componentDidMount(){const{shouldFocus:shouldFocus}=this.props;setTimeout((()=>{if(src_default$1.domElement(this.beacon)&&shouldFocus){this.beacon.focus()}}),0)}componentWillUnmount(){const style=document.getElementById("joyride-beacon-animation");if(style==null?void 0:style.parentNode){style.parentNode.removeChild(style)}}render(){const{beaconComponent:beaconComponent,continuous:continuous,index:index,isLastStep:isLastStep,locale:locale,onClickOrHover:onClickOrHover,size:size,step:step,styles:styles2}=this.props;const title=src_default$1.string(locale.open)?locale.open:innerText$1(locale.open);const sharedProps={"aria-label":title,onClick:onClickOrHover,onMouseEnter:onClickOrHover,ref:this.setBeaconRef,title:title};let component;if(beaconComponent){const BeaconComponent=beaconComponent;component=React.createElement(BeaconComponent,{continuous:continuous,index:index,isLastStep:isLastStep,size:size,step:step,...sharedProps})}else{component=React.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:styles2.beacon,type:"button",...sharedProps},React.createElement("span",{style:styles2.beaconInner}),React.createElement("span",{style:styles2.beaconOuter}))}return component}};function JoyrideTooltipCloseButton({styles:styles2,...props}){const{color:color,height:height,width:width,...style}=styles2;return React__default.createElement("button",{style:style,type:"button",...props},React__default.createElement("svg",{height:typeof height==="number"?`${height}px`:height,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof width==="number"?`${width}px`:width,xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("g",null,React__default.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:color}))))}var CloseButton_default=JoyrideTooltipCloseButton;function JoyrideTooltipContainer(props){const{backProps:backProps,closeProps:closeProps,continuous:continuous,index:index,isLastStep:isLastStep,primaryProps:primaryProps,size:size,skipProps:skipProps,step:step,tooltipProps:tooltipProps}=props;const{content:content,hideBackButton:hideBackButton,hideCloseButton:hideCloseButton,hideFooter:hideFooter,locale:locale,showProgress:showProgress,showSkipButton:showSkipButton,styles:styles2,title:title}=step;const{back:back,close:close,last:last,next:next,skip:skip}=locale;const output={primary:close};if(continuous){output.primary=isLastStep?last:next;if(showProgress){output.primary=React.createElement("span",null,output.primary," (",index+1,"/",size,")")}}if(output.primary){output.primary=React.createElement("button",{"data-test-id":"button-primary",style:styles2.buttonNext,type:"button",...primaryProps},output.primary)}if(showSkipButton&&!isLastStep){output.skip=React.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:styles2.buttonSkip,type:"button",...skipProps},skip)}if(!hideBackButton&&index>0){output.back=React.createElement("button",{"data-test-id":"button-back",style:styles2.buttonBack,type:"button",...backProps},back)}output.close=!hideCloseButton&&React.createElement(CloseButton_default,{"data-test-id":"button-close",styles:styles2.buttonClose,...closeProps});return React.createElement("div",{key:"JoyrideTooltip","aria-label":getText(title)||getText(content),className:"react-joyride__tooltip",style:styles2.tooltip,...tooltipProps},React.createElement("div",{style:styles2.tooltipContainer},title&&React.createElement("h1",{"aria-label":getText(title),style:styles2.tooltipTitle},title),React.createElement("div",{style:styles2.tooltipContent},content)),!hideFooter&&React.createElement("div",{style:styles2.tooltipFooter},React.createElement("div",{style:styles2.tooltipFooterSpacer},output.skip),output.back,output.primary),output.close)}var Container_default=JoyrideTooltipContainer;var JoyrideTooltip=class extends React.Component{constructor(){super(...arguments);__publicField(this,"handleClickBack",(event=>{event.preventDefault();const{helpers:helpers}=this.props;helpers.prev()}));__publicField(this,"handleClickClose",(event=>{event.preventDefault();const{helpers:helpers}=this.props;helpers.close("button_close")}));__publicField(this,"handleClickPrimary",(event=>{event.preventDefault();const{continuous:continuous,helpers:helpers}=this.props;if(!continuous){helpers.close("button_primary");return}helpers.next()}));__publicField(this,"handleClickSkip",(event=>{event.preventDefault();const{helpers:helpers}=this.props;helpers.skip()}));__publicField(this,"getElementsProps",(()=>{const{continuous:continuous,isLastStep:isLastStep,setTooltipRef:setTooltipRef,step:step}=this.props;const back=getText(step.locale.back);const close=getText(step.locale.close);const last=getText(step.locale.last);const next=getText(step.locale.next);const skip=getText(step.locale.skip);let primaryText=continuous?next:close;if(isLastStep){primaryText=last}return{backProps:{"aria-label":back,"data-action":"back",onClick:this.handleClickBack,role:"button",title:back},closeProps:{"aria-label":close,"data-action":"close",onClick:this.handleClickClose,role:"button",title:close},primaryProps:{"aria-label":primaryText,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:primaryText},skipProps:{"aria-label":skip,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:skip},tooltipProps:{"aria-modal":true,ref:setTooltipRef,role:"alertdialog"}}}))}render(){const{continuous:continuous,index:index,isLastStep:isLastStep,setTooltipRef:setTooltipRef,size:size,step:step}=this.props;const{beaconComponent:beaconComponent,tooltipComponent:tooltipComponent,...cleanStep}=step;let component;if(tooltipComponent){const renderProps={...this.getElementsProps(),continuous:continuous,index:index,isLastStep:isLastStep,size:size,step:cleanStep,setTooltipRef:setTooltipRef};const TooltipComponent=tooltipComponent;component=React.createElement(TooltipComponent,{...renderProps})}else{component=React.createElement(Container_default,{...this.getElementsProps(),continuous:continuous,index:index,isLastStep:isLastStep,size:size,step:step})}return component}};var JoyrideStep=class extends React.Component{constructor(){super(...arguments);__publicField(this,"scope",null);__publicField(this,"tooltip",null);__publicField(this,"handleClickHoverBeacon",(event=>{const{step:step,store:store}=this.props;if(event.type==="mouseenter"&&step.event!=="hover"){return}store.update({lifecycle:LIFECYCLE.TOOLTIP})}));__publicField(this,"setTooltipRef",(element=>{this.tooltip=element}));__publicField(this,"setPopper",((popper,type)=>{var _a;const{action:action,lifecycle:lifecycle,step:step,store:store}=this.props;if(type==="wrapper"){store.setPopper("beacon",popper)}else{store.setPopper("tooltip",popper)}if(store.getPopper("beacon")&&store.getPopper("tooltip")&&lifecycle===LIFECYCLE.INIT){store.update({action:action,lifecycle:LIFECYCLE.READY})}if((_a=step.floaterProps)==null?void 0:_a.getPopper){step.floaterProps.getPopper(popper,type)}}));__publicField(this,"renderTooltip",(renderProps=>{const{continuous:continuous,helpers:helpers,index:index,size:size,step:step}=this.props;return React.createElement(JoyrideTooltip,{continuous:continuous,helpers:helpers,index:index,isLastStep:index+1===size,setTooltipRef:this.setTooltipRef,size:size,step:step,...renderProps})}))}componentDidMount(){const{debug:debug,index:index}=this.props;log({title:`step:${index}`,data:[{key:"props",value:this.props}],debug:debug})}componentDidUpdate(previousProps){var _a;const{action:action,callback:callback,continuous:continuous,controlled:controlled,debug:debug,helpers:helpers,index:index,lifecycle:lifecycle,status:status,step:step,store:store}=this.props;const{changed:changed,changedFrom:changedFrom}=treeChanges$1(previousProps,this.props);const state=helpers.info();const skipBeacon=continuous&&action!==ACTIONS.CLOSE&&(index>0||action===ACTIONS.PREV);const hasStoreChanged=changed("action")||changed("index")||changed("lifecycle")||changed("status");const isInitial=changedFrom("lifecycle",[LIFECYCLE.TOOLTIP,LIFECYCLE.INIT],LIFECYCLE.INIT);const isAfterAction=changed("action",[ACTIONS.NEXT,ACTIONS.PREV,ACTIONS.SKIP,ACTIONS.CLOSE]);const isControlled=controlled&&index===previousProps.index;if(isAfterAction&&(isInitial||isControlled)){callback({...state,index:previousProps.index,lifecycle:LIFECYCLE.COMPLETE,step:previousProps.step,type:EVENTS.STEP_AFTER})}if(step.placement==="center"&&status===STATUS.RUNNING&&changed("index")&&action!==ACTIONS.START&&lifecycle===LIFECYCLE.INIT){store.update({lifecycle:LIFECYCLE.READY})}if(hasStoreChanged){const element=getElement(step.target);const elementExists=!!element;const hasRenderedTarget=elementExists&&isElementVisible(element);if(hasRenderedTarget){if(changedFrom("status",STATUS.READY,STATUS.RUNNING)||changedFrom("lifecycle",LIFECYCLE.INIT,LIFECYCLE.READY)){callback({...state,step:step,type:EVENTS.STEP_BEFORE})}}else{console.warn(elementExists?"Target not visible":"Target not mounted",step);callback({...state,type:EVENTS.TARGET_NOT_FOUND,step:step});if(!controlled){store.update({index:index+(action===ACTIONS.PREV?-1:1)})}}}if(changedFrom("lifecycle",LIFECYCLE.INIT,LIFECYCLE.READY)){store.update({lifecycle:hideBeacon(step)||skipBeacon?LIFECYCLE.TOOLTIP:LIFECYCLE.BEACON})}if(changed("index")){log({title:`step:${lifecycle}`,data:[{key:"props",value:this.props}],debug:debug})}if(changed("lifecycle",LIFECYCLE.BEACON)){callback({...state,step:step,type:EVENTS.BEACON})}if(changed("lifecycle",LIFECYCLE.TOOLTIP)){callback({...state,step:step,type:EVENTS.TOOLTIP});if(this.tooltip){this.scope=new Scope(this.tooltip,{selector:"[data-action=primary]"});this.scope.setFocus()}}if(changedFrom("lifecycle",[LIFECYCLE.TOOLTIP,LIFECYCLE.INIT],LIFECYCLE.INIT)){(_a=this.scope)==null?void 0:_a.removeScope();store.cleanupPoppers()}}componentWillUnmount(){var _a;(_a=this.scope)==null?void 0:_a.removeScope()}get open(){const{lifecycle:lifecycle,step:step}=this.props;return hideBeacon(step)||lifecycle===LIFECYCLE.TOOLTIP}render(){const{continuous:continuous,debug:debug,index:index,nonce:nonce,shouldScroll:shouldScroll2,size:size,step:step}=this.props;const target=getElement(step.target);if(!validateStep(step)||!src_default$1.domElement(target)){return null}return React.createElement("div",{key:`JoyrideStep-${index}`,className:"react-joyride__step"},React.createElement(ReactFloater,{...step.floaterProps,component:this.renderTooltip,debug:debug,getPopper:this.setPopper,id:`react-joyride-step-${index}`,open:this.open,placement:step.placement,target:step.target},React.createElement(JoyrideBeacon,{beaconComponent:step.beaconComponent,continuous:continuous,index:index,isLastStep:index+1===size,locale:step.locale,nonce:nonce,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:shouldScroll2,size:size,step:step,styles:step.styles})))}};var Joyride=class extends React.Component{constructor(props){super(props);__publicField(this,"helpers");__publicField(this,"store");__publicField(this,"callback",(data=>{const{callback:callback}=this.props;if(src_default$1.function(callback)){callback(data)}}));__publicField(this,"handleKeyboard",(event=>{const{index:index,lifecycle:lifecycle}=this.state;const{steps:steps}=this.props;const step=steps[index];if(lifecycle===LIFECYCLE.TOOLTIP){if(event.code==="Escape"&&step&&!step.disableCloseOnEsc){this.store.close("keyboard")}}}));__publicField(this,"handleClickOverlay",(()=>{const{index:index}=this.state;const{steps:steps}=this.props;const step=getMergedStep(this.props,steps[index]);if(!step.disableOverlayClose){this.helpers.close("overlay")}}));__publicField(this,"syncState",(state=>{this.setState(state)}));const{debug:debug,getHelpers:getHelpers,run:run,stepIndex:stepIndex}=props;this.store=createStore({...props,controlled:run&&src_default$1.number(stepIndex)});this.helpers=this.store.getHelpers();const{addListener:addListener}=this.store;log({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:debug});addListener(this.syncState);if(getHelpers){getHelpers(this.helpers)}this.state=this.store.getState()}componentDidMount(){if(!canUseDOM()){return}const{debug:debug,disableCloseOnEsc:disableCloseOnEsc,run:run,steps:steps}=this.props;const{start:start}=this.store;if(validateSteps(steps,debug)&&run){start()}if(!disableCloseOnEsc){document.body.addEventListener("keydown",this.handleKeyboard,{passive:true})}}componentDidUpdate(previousProps,previousState){if(!canUseDOM()){return}const{action:action,controlled:controlled,index:index,lifecycle:lifecycle,status:status}=this.state;const{debug:debug,run:run,stepIndex:stepIndex,steps:steps}=this.props;const{stepIndex:previousStepIndex,steps:previousSteps}=previousProps;const{reset:reset,setSteps:setSteps,start:start,stop:stop,update:update2}=this.store;const{changed:changedProps}=treeChanges$1(previousProps,this.props);const{changed:changed,changedFrom:changedFrom}=treeChanges$1(previousState,this.state);const step=getMergedStep(this.props,steps[index]);const stepsChanged=!equal$1(previousSteps,steps);const stepIndexChanged=src_default$1.number(stepIndex)&&changedProps("stepIndex");const target=getElement(step.target);if(stepsChanged){if(validateSteps(steps,debug)){setSteps(steps)}else{console.warn("Steps are not valid",steps)}}if(changedProps("run")){if(run){start(stepIndex)}else{stop()}}if(stepIndexChanged){let nextAction=src_default$1.number(previousStepIndex)&&previousStepIndex=0?scrollY:0;if(status===STATUS.RUNNING){scrollTo(scrollY,{element:scrollParent2,duration:scrollDuration}).then((()=>{setTimeout((()=>{var _a;(_a=this.store.getPopper("tooltip"))==null?void 0:_a.instance.update()}),10)}))}}}render(){if(!canUseDOM()){return null}const{index:index,lifecycle:lifecycle,status:status}=this.state;const{continuous:continuous=false,debug:debug=false,nonce:nonce,scrollToFirstStep:scrollToFirstStep=false,steps:steps}=this.props;const isRunning=status===STATUS.RUNNING;const content={};if(isRunning&&steps[index]){const step=getMergedStep(this.props,steps[index]);content.step=React.createElement(JoyrideStep,{...this.state,callback:this.callback,continuous:continuous,debug:debug,helpers:this.helpers,nonce:nonce,shouldScroll:!step.disableScrolling&&(index!==0||scrollToFirstStep),step:step,store:this.store});content.overlay=React.createElement(JoyridePortal,{id:"react-joyride-portal"},React.createElement(JoyrideOverlay,{...step,continuous:continuous,debug:debug,lifecycle:lifecycle,onClickOverlay:this.handleClickOverlay}))}return React.createElement("div",{className:"react-joyride"},content.step,content.overlay)}};__publicField(Joyride,"defaultProps",defaultProps);var components_default=Joyride;const Tooltip=React__default.forwardRef((props=>jsxs("div",{className:"pb_card_kit_border_none p_none",...props.tooltipProps,children:[props.step.title&&jsxs("div",{children:[jsxs(Flex,{align:"center",justify:"between",padding:"xs",children:[jsx(Title,{paddingLeft:"xs",size:4,children:props.step.title}),props.skip&&jsx(Button,{...props.skipProps,id:"skip",text:"Skip Tour",variant:"link"}),jsx(Button,{...props.skipProps,id:"skip",text:"Skip Tour",variant:"link"})]}),jsx(SectionSeparator,{})]}),jsx(Flex,{padding:"sm",children:props.step.content}),jsx(SectionSeparator,{}),jsxs(Flex,{justify:props.index==0?"end":"between",padding:"xs",children:[props.index>0&&jsx(Button,{...props.backProps,id:"back",text:"Back"}),props.continuous&&!props.isLastStep&&jsx(Button,{...props.primaryProps,id:"next",text:"Next"}),!props.continuous&&jsx(Button,{...props.closeProps,id:"close",text:"Close"}),!(props.continuous&&!props.isLastStep||!props.continuous)&&jsx(Button,{...props.closeProps,id:"close",text:"Close"})]})]})));const Walkthrough=props=>{const{aria:aria={},callback:callback,className:className,continuous:continuous=false,data:data={},disableOverlay:disableOverlay,floaterProps:floaterProps={offset:50},htmlOptions:htmlOptions={},id:id,run:run=false,steps:steps,styles:styles2={options:{zIndex:2e4}},showSkipButton:showSkipButton}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_walkthrough"),globalProps(props),className);return jsx("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:jsx(components_default,{callback:callback,continuous:continuous,disableOverlay:disableOverlay,disableScrolling:true,floaterProps:floaterProps,run:run,showSkipButton:showSkipButton,steps:steps,styles:styles2,tooltipComponent:Tooltip,...props})})};const getDayOfWeek=(value,compact)=>{if(compact){return DateTime$1.toDayAbbr(value)}else{return DateTime$1.toWeekday(value)}};const getFormattedDate=(value,variant)=>{if(variant==="day_only"){return DateTime$1.toDay(value).toString()}else{const format=variant==="expanded"?"expanded":"month_day";return DateTime$1.toCustomFormat(value,format)}};const WeekdayStacked=props=>{const{align:align="left",aria:aria={},className:className,dark:dark=false,data:data={},date:date=new Date,htmlOptions:htmlOptions={},id:id,variant:variant="month_day",compact:compact=false}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_weekday_stacked_kit",align),globalProps(props),className);return jsxs("div",{...ariaProps,...dataProps,...htmlProps,className:classes,id:id,children:[jsx(Caption,{dark:dark,children:getDayOfWeek(date,compact)}),jsx(Title,{dark:dark,size:4,tag:"span",text:getFormattedDate(date,variant)})]})};export{ProgressStepItem as $,AdvancedTable as A,BreadCrumbs as B,Contact as C,DashboardValue as D,Timestamp as E,FileUpload as F,GanttChart as G,Hashtag as H,IconStatValue as I,Lightbox as J,LoadingInline as K,List as L,MultipleUsers as M,Map$1 as N,MapCustomButton as O,Pill as P,Message as Q,MultipleUsersStacked as R,Select$1 as S,Table as T,Overlay as U,Pagination as V,ProgressSimple as W,Person as X,PersonContact as Y,ProgressPills as Z,ProgressStep as _,AvatarActionButton as a,SelectableIcon as a0,Source as a1,StarRating as a2,StatChange as a3,StatValue as a4,Textarea$1 as a5,Time as a6,TimeRangeInline as a7,TimeStackedDefault as a8,Timeline as a9,TitleDetail as aa,TitleCount as ab,Toggle as ac,UserBadge as ad,Walkthrough as ae,WeekdayStacked as af,SelectableListItem as ag,TableRow as ah,BreadCrumbItem as b,ButtonToolbar as c,ListItem as d,Currency as e,PbDate as f,DatePicker as g,LabelValue as h,DateRangeInline as i,DateRangeStacked as j,DateStacked as k,DateTime as l,DateTimeStacked as m,DateYearStacked as n,Detail as o,SelectableList as p,Dropdown as q,Filter as r,FixedConfirmationToast as s,FormGroup as t,SelectableCard as u,SelectableCardIcon as v,HomeAddressStreet as w,IconValue as x,LabelPill as y,Layout as z};