@geneui/components
Version:
The Gene UI components library designed for BI tools
995 lines (937 loc) • 626 kB
JavaScript
import { _ as _extends } from '../_rollupPluginBabelHelpers-e8fb2e5c.js';
import React__default, { useMemo, useState, useEffect, useCallback, useRef } from 'react';
import { c as classnames } from '../index-031ff73c.js';
import PropTypes from 'prop-types';
import ModuleTitle from '../ModuleTitle/index.js';
import SearchWithDropdown from '../SearchWithDropdown/index.js';
import { s as styleInject } from '../style-inject.es-746bb8ed.js';
import Paper from '../Paper/index.js';
import { L as Logger, n as noop } from '../index-a0e4e333.js';
import Pagination from '../Pagination/index.js';
import { D as Dropdown } from '../index-9d8d0112.js';
import { T as Table, s as searchConfigs, a as sortHandler, u as useSortConfigs } from '../index-295fd678.js';
import '../configs-00612ce0.js';
import useThrottle from '../hooks/useThrottle.js';
import Button from '../Button/index.js';
import Divider from '../Divider/index.js';
import { T as Tooltip } from '../index-6d7e99cd.js';
import { c as commonjsGlobal } from '../_commonjsHelpers-24198af3.js';
import { P as PopoverV2 } from '../index-08898b29.js';
import '../dateValidation-67caec66.js';
import 'react-dom';
import Icon from '../Icon/index.js';
import Option from '../Option/index.js';
import '../tslib.es6-f211516f.js';
import '../hooks/useDeviceType.js';
import '../hooks/useWindowSize.js';
import '../hooks/useDebounce.js';
import '../GeneUIProvider/index.js';
import '../Search/index.js';
import '../ExtendedInput/index.js';
import '../useEllipsisDetection-4d997d5d.js';
import '../SuggestionList/index.js';
import '../hooks/useKeyDown.js';
import '../hooks/useClickOutside.js';
import '../config-1053d64d.js';
import '../Scrollbar/index.js';
import '../callAfterDelay-7272faca.js';
import '../objectWithoutPropertiesLoose-d8a4a68c.js';
import '../react-lifecycles-compat.es-6e1f3768.js';
import '../clsx.m-2bb6df4b.js';
import '../hooks/useMount.js';
import '../hooks/useClick.js';
import '../hooks/useUpdatableRef.js';
import '../hooks/useForceUpdate.js';
import '../BusyLoader/index.js';
import '../Empty/index.js';
import '../index-122432cd.js';
import '../debounce-4419bc2f.js';
import '../Checkbox/index.js';
import '../checkboxRadioSwitcher-5b69d7bd.js';
import '../guid-8ddf77b3.js';
import '../index-0cbb1102.js';
import '../Tag/index.js';
import '../ValidatableTextInput/index.js';
import '../CellMeasurerCache-661c24a8.js';
import '../hooks/useUpdate.js';
import '../hooks/useMutationObserver.js';
import '../SkeletonLoader/index.js';
import '../Copy/index.js';
import '../hooks/useHover.js';
import '../Popover/index.js';
import '../Portal/index.js';
import '../Menu/index.js';
import '../redux-b3e598ca.js';
function WithTitle(_ref) {
let {
name,
actions,
children,
...restProps
} = _ref;
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (!!name || !!actions) && /*#__PURE__*/React__default.createElement(ModuleTitle, _extends({
title: name,
cornerRadius: "position-radius"
}, restProps), actions), children);
}
WithTitle.propTypes = {
name: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
actions: PropTypes.node,
children: PropTypes.node
};
var css_248z$2 = "[data-gene-ui-version=\"2.16.5\"] .paper-actions{align-items:center;display:flex;flex-shrink:0}[data-gene-ui-version=\"2.16.5\"] .paper-actions>li{align-items:center;display:flex;padding:2rem}[data-gene-ui-version=\"2.16.5\"] .paper-actions .paper-left-actions{flex:auto}[data-gene-ui-version=\"2.16.5\"] .paper-actions .paper-left-actions>.dropdown-holder,[data-gene-ui-version=\"2.16.5\"] .paper-actions .paper-left-actions>.input-holder{max-width:25.5rem}html:not([dir=rtl]) .paper-actions .paper-left-actions>*+*{margin-left:2rem}html[dir=rtl] .paper-actions .paper-left-actions>*+*{margin-right:2rem}[data-gene-ui-version=\"2.16.5\"] .paper-actions .paper-right-actions{flex-shrink:0}html:not([dir=rtl]) .paper-actions .paper-right-actions>:not(.btn)+:not(.btn){margin-left:1.6rem}html[dir=rtl] .paper-actions .paper-right-actions>:not(.btn)+:not(.btn){margin-right:1.6rem}";
styleInject(css_248z$2);
function WithHeader(_ref) {
let {
actions,
children,
withSearch,
handleSearch,
dropDownData,
checkAllText,
leftHeaderActions,
hideSearchDropdown,
...restProps
} = _ref;
const [data, defaultSelected] = useMemo(() => {
if (withSearch) {
const data = dropDownData.filter(_ref2 => {
let {
text
} = _ref2;
return !!text;
});
const selected = data.map(_ref3 => {
let {
dataKey
} = _ref3;
return dataKey;
});
return [data, selected];
}
const data = dropDownData.map(data => data.dataKey);
return [data, data];
}, [withSearch, dropDownData]);
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (actions || withSearch || leftHeaderActions) && /*#__PURE__*/React__default.createElement("ul", _extends({
className: "paper-actions"
}, restProps), /*#__PURE__*/React__default.createElement("li", {
className: "paper-left-actions"
}, withSearch ? /*#__PURE__*/React__default.createElement(SearchWithDropdown, {
onChange: handleSearch,
hideDropdown: hideSearchDropdown,
dropdownProps: {
checkAllText,
isMultiSelect: true,
labelKey: 'text',
valueKey: 'dataKey',
data,
defaultValue: defaultSelected
}
}) : null, leftHeaderActions), /*#__PURE__*/React__default.createElement("li", {
className: "paper-right-actions"
}, actions)), children);
}
WithHeader.propTypes = {
withSearch: PropTypes.bool,
actions: PropTypes.node,
leftHeaderActions: PropTypes.node,
handleSearch: PropTypes.func,
dropDownData: PropTypes.arrayOf(PropTypes.object),
checkAllText: PropTypes.string
};
WithHeader.defaultProps = {
withSearch: false,
checkAllText: 'All'
};
function PaperWrapper(_ref) {
let {
className,
shadow,
cornerRadius,
paperDirection,
children,
...restProps
} = _ref;
return /*#__PURE__*/React__default.createElement(Paper, _extends({
shadow: shadow,
paperDirection: paperDirection,
cornerRadius: cornerRadius,
className: classnames(className)
}, restProps), children);
}
PaperWrapper.propTypes = {
className: PropTypes.string,
children: PropTypes.node.isRequired,
cornerRadius: PropTypes.string,
shadow: PropTypes.bool
};
PaperWrapper.defaultProps = {
shadow: true,
cornerRadius: 'full-radius',
paperDirection: 'column'
};
var css_248z$1 = "[data-gene-ui-version=\"2.16.5\"] .pagination-drop{align-items:center;display:flex}html:not([dir=rtl]) .pagination-drop>*+*{margin-left:2rem}html[dir=rtl] .pagination-drop>*+*{margin-right:2rem}[data-gene-ui-version=\"2.16.5\"] .pagination-drop>p{font-weight:600}[data-gene-ui-version=\"2.16.5\"] .ta-pagination-holder{align-items:center;border-top:1px solid rgba(var(--background-sc-rgb),.1);display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;padding:1rem;width:100%}[data-gene-ui-version=\"2.16.5\"] .ta-pagination-holder>li{padding:1rem}[data-gene-ui-version=\"2.16.5\"] .ta-pagination-holder>li:first-child{flex:auto}[data-gene-ui-version=\"2.16.5\"] .ta-pagination-holder>li:last-child{flex-shrink:0}";
styleInject(css_248z$1);
function PaginationSelector(_ref) {
let {
maxPage,
totalCount,
startNumber,
currentPage,
selectorData,
selectorProps,
noItemsText,
selectedPage,
showSelector,
onPageChange,
selectorValue,
showPagination,
onSelectorChange,
defaultOpenedPage,
fabricateSelectorLabel,
...paginationProps
} = _ref;
'value' in paginationProps && Logger.warn("'value' prop will not be applied to DropDown");
const controlledProps = useMemo(() => currentPage || selectedPage ? {
selected: currentPage || selectedPage
} : {
defaultSelected: defaultOpenedPage
}, [currentPage, selectedPage, defaultOpenedPage]);
const representingNums = useMemo(() => {
if (totalCount) {
const endNumber = startNumber + selectorValue;
const showCount = "".concat(startNumber + 1, "-").concat(endNumber >= totalCount ? totalCount : endNumber);
const result = fabricateSelectorLabel(showCount, totalCount) || "".concat(showCount, " of ").concat(totalCount);
return result;
}
return noItemsText;
}, [totalCount, startNumber, fabricateSelectorLabel, noItemsText, selectorValue]);
const dropdownValue = useMemo(() => selectorValue === totalCount && selectorData.find(item => item.value === 'all') ? 'all' : selectorValue, [selectorValue, totalCount, selectorData]);
return /*#__PURE__*/React__default.createElement("ul", {
className: "ta-pagination-holder"
}, /*#__PURE__*/React__default.createElement("li", null, /*#__PURE__*/React__default.createElement("div", {
className: "pagination-drop"
}, showSelector && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Dropdown, _extends({
flexibility: "content-size"
}, selectorProps, {
hasSearch: false,
onChange: onSelectorChange,
data: selectorData,
value: dropdownValue,
position: "top"
})), /*#__PURE__*/React__default.createElement("p", null, representingNums)))), /*#__PURE__*/React__default.createElement("li", null, showPagination && /*#__PURE__*/React__default.createElement(Pagination, _extends({
count: maxPage,
onChange: onPageChange
}, controlledProps, paginationProps))));
}
PaginationSelector.propTypes = {
showSelector: PropTypes.bool,
defaultOpenedPage: PropTypes.number,
showPagination: PropTypes.bool,
noItemsText: PropTypes.string,
totalCount: PropTypes.number.isRequired,
fabricateSelectorLabel: PropTypes.func
};
PaginationSelector.defaultProps = {
defaultOpenedPage: 1,
selectorData: [],
noItemsText: '0 items',
showSelector: true,
showPagination: true,
fabricateSelectorLabel: noop
};
var css_248z = "[data-gene-ui-version=\"2.16.5\"] .table-actions{align-items:center;display:flex;padding:1rem}[data-gene-ui-version=\"2.16.5\"] .table-actions>li{padding:1rem}[data-gene-ui-version=\"2.16.5\"] .table-actions .table-left-actions{flex:auto}[data-gene-ui-version=\"2.16.5\"] .table-actions .table-right-actions{flex-shrink:0}";
styleInject(css_248z);
function TableHeader(_ref) {
let {
columns,
withSearch,
actions,
handleSearch,
checkAllText,
leftHeaderActions,
hideSearchDropdown,
...tableProps
} = _ref;
return /*#__PURE__*/React__default.createElement(WithHeader, {
withSearch: withSearch,
actions: actions,
dropDownData: columns,
handleSearch: handleSearch,
checkAllText: handleSearch,
leftHeaderActions: leftHeaderActions,
hideSearchDropdown: hideSearchDropdown
}, /*#__PURE__*/React__default.createElement(Table, _extends({
columns: columns
}, tableProps)));
}
TableHeader.propTypes = {
/**
* Define is search bar will shown or no
*/
withSearch: PropTypes.bool,
/**
* Any valid react node
*/
headerActions: PropTypes.node
};
function WrapperTableWithHeader(_ref) {
let {
paperProps,
...props
} = _ref;
return /*#__PURE__*/React__default.createElement(PaperWrapper, _extends({
className: classnames({
'table-loader-container': props.loading
})
}, paperProps), /*#__PURE__*/React__default.createElement(TableHeader, props));
}
function TableTitle(_ref) {
let {
name,
titleActions,
...tableProps
} = _ref;
return /*#__PURE__*/React__default.createElement(WithTitle, {
name: name,
actions: titleActions
}, /*#__PURE__*/React__default.createElement(Table, tableProps));
}
TableTitle.propTypes = {
/**
* Any valid react node
*/
titleActions: PropTypes.node,
/**
* Value for title
*/
name: PropTypes.string.isRequired,
/**
* Callback for refresh icon click
*/
onRefreshClick: PropTypes.func
};
function WrapperTableTitle(_ref) {
let {
paperProps,
...props
} = _ref;
return /*#__PURE__*/React__default.createElement(PaperWrapper, _extends({
className: classnames({
'table-loader-container': props.loading
})
}, paperProps), /*#__PURE__*/React__default.createElement(TableTitle, props));
}
function PaginationTable(_ref) {
let {
rows,
rowsCount,
startPage,
rowsPerPage,
searchQuery,
selectorData,
onPageChange,
selectorProps,
withPagination,
withPageSelector,
onSelectorChange,
defaultOpenedPage,
onPaginationChange,
selectorDefaultValue,
nextIconTooltipText,
previousIconTooltipText,
columns,
...tableProps
} = _ref;
if (onPageChange) {
Logger.deprecate('"onPageChange" is deprecated. Use "onPaginationChange" change instead.');
}
const isSelectorControlled = ('selectorValue' in tableProps);
const isPaginationControlled = ('currentPage' in tableProps);
const currentPage = isPaginationControlled && tableProps.currentPage;
const selectorValue = isSelectorControlled && tableProps.selectorValue;
const [rowState, setRowState] = useState(rows);
const totalCount = useMemo(() => rowsCount || rowState.length, [rowsCount, rowState.length]);
const selectorValueInNumber = useMemo(() => selectorValue === 'all' ? totalCount : selectorValue, [totalCount, selectorValue]);
const defaultRowsPerPage = rowsPerPage || selectorData.find(data => data.value === selectorDefaultValue) || selectorData[0];
const [itemsPerPage, setItemsPerPage] = useState(() => isSelectorControlled ? selectorValueInNumber : defaultRowsPerPage.value);
const [page, setPage] = useState(defaultOpenedPage);
const [filterState, setFilterState] = useState([]);
const [rowStartIndex, setRowStartIndex] = useState((defaultOpenedPage - 1) * itemsPerPage);
const hasSearch = useMemo(() => columns.some(x => !!x.searchInColumns), [columns]);
useEffect(() => {
setRowState(rows);
}, [rows]);
useEffect(() => {
!isPaginationControlled && setRowStartIndex((defaultOpenedPage - 1) * itemsPerPage);
setPage(defaultOpenedPage);
}, [rowState.length]);
useEffect(() => {
isSelectorControlled && setItemsPerPage(selectorValueInNumber);
}, [selectorValue, isSelectorControlled, selectorValueInNumber]);
useEffect(() => {
setRowStartIndex((defaultOpenedPage - 1) * itemsPerPage);
}, [currentPage]);
useEffect(() => {
if (!hasSearch) return;
(columns || []).filter(item => {
var _item$searchInColumns;
return ((_item$searchInColumns = item.searchInColumns) === null || _item$searchInColumns === void 0 ? void 0 : _item$searchInColumns.type) === searchConfigs.typeEnum.select;
}).forEach(item => item.searchInColumns.data = [...new Set(rows.map(elem => elem.data[item.dataKey]))].map(elem => ({
label: elem,
value: elem
})));
}, [columns, rows]);
const searchHandler = useCallback(_ref2 => {
let {
type,
dataKey,
value
} = _ref2;
const newFilterState = [...filterState];
const existRow = newFilterState.find(x => x.dataKey === dataKey);
if (existRow) {
existRow.value = value;
} else {
newFilterState.push({
type,
dataKey,
value
});
}
setFilterState(newFilterState);
}, [setFilterState, filterState]);
useEffect(() => {
if (!filterState.length) return;
const newData = rows.filter(x => filterState.every(y => {
var _y$value, _y$value2;
return y.type === searchConfigs.typeEnum.text && y.value && x.data[y.dataKey].includes(y.value) || !y.value || y.type === searchConfigs.typeEnum.select && ((_y$value = y.value) === null || _y$value === void 0 ? void 0 : _y$value.length) && y.value.includes(x.data[y.dataKey]) || !((_y$value2 = y.value) !== null && _y$value2 !== void 0 && _y$value2.length);
}));
setRowState(newData);
}, [filterState]);
const itemsCount = useMemo(() => searchQuery ? rowState.length : totalCount, [searchQuery, rowState.length, totalCount]);
const pageChange = useCallback(page => {
if (!isPaginationControlled) {
setPage(page);
setRowStartIndex((page - 1) * itemsPerPage);
}
onPageChange && onPageChange(page, itemsPerPage);
onPaginationChange(page, itemsPerPage);
}, [isPaginationControlled, onPageChange, itemsPerPage, onPaginationChange]);
const pageSelectorChange = useCallback(_ref3 => {
let {
value
} = _ref3;
if (!isSelectorControlled) {
setItemsPerPage(value === 'all' ? itemsCount : value);
}
if (!isPaginationControlled) {
setPage(1);
setRowStartIndex(0);
}
onPaginationChange(value === 'all' || value !== rowStartIndex ? 1 : page, value);
onSelectorChange(value, page);
}, [isSelectorControlled, isPaginationControlled, onPaginationChange, rowStartIndex, page, onSelectorChange, itemsCount]);
const pageNotExist = (currentPage - 1) * itemsPerPage > itemsCount;
if (pageNotExist) {
console.warn('Page does not exist');
onPageChange && onPageChange(Math.ceil(itemsCount / itemsPerPage), itemsPerPage);
}
const selectorSelectedValue = useMemo(() => isSelectorControlled ? selectorValueInNumber : itemsPerPage, [isSelectorControlled, selectorValueInNumber, itemsPerPage]);
const maxPage = useMemo(() => Math.ceil(itemsCount / itemsPerPage), [itemsCount, itemsPerPage]);
const startNumber = useMemo(() => !isPaginationControlled ? rowStartIndex : (currentPage - 1) * selectorSelectedValue, [isPaginationControlled, rowStartIndex, currentPage, selectorSelectedValue]);
const tableRows = useMemo(() => rowState.filter((_, index) => index >= rowStartIndex && index < rowStartIndex + (isSelectorControlled ? selectorSelectedValue : itemsPerPage)), [rowState, rowStartIndex, itemsPerPage, isSelectorControlled, selectorSelectedValue]);
return /*#__PURE__*/React__default.createElement(Table, _extends({}, tableProps, {
page: page,
rows: tableRows,
columns: columns,
searchHandler: searchHandler,
hasSearch: hasSearch,
pagination: tableRows.length ? /*#__PURE__*/React__default.createElement(PaginationSelector, {
maxPage: maxPage,
selectedPage: page,
totalCount: itemsCount,
startNumber: startNumber,
selectorData: selectorData,
selectorProps: selectorProps,
showPagination: withPagination,
showSelector: withPageSelector,
defaultOpenedPage: defaultOpenedPage,
selectorValue: selectorSelectedValue,
currentPage: !pageNotExist ? currentPage : maxPage,
nextIconTooltipText: nextIconTooltipText,
previousIconTooltipText: previousIconTooltipText,
onPageChange: pageChange,
onSelectorChange: pageSelectorChange,
onPaginationChange: onPaginationChange
}) : null
}));
}
PaginationTable.selectorProps = {
data: [{
label: '10',
value: 10
}, {
label: '50',
value: 50
}, {
label: '100',
value: 100
}, {
label: 'All',
value: 'all'
}]
};
PaginationTable.propTypes = {
/**
* Page number that must be opened by default
*/
defaultOpenedPage: PropTypes.number,
/**
* Rows total count
*/
rowsCount: PropTypes.number,
/**
* Data for selector dropdown
*/
selectorData: PropTypes.array,
/**
* Define pagination will be shown or no.
*/
withPagination: PropTypes.bool,
/**
* Define page selector will be shown or no.
*/
withPageSelector: PropTypes.bool,
/**
* Default value for selector dropdown
*/
selectorDefaultValue: PropTypes.number,
/**
* Value for selector dropdown
*/
selectorValue: PropTypes.number
};
PaginationTable.defaultProps = {
withPageSelector: true,
withPagination: true,
rows: [],
defaultOpenedPage: 1,
onPaginationChange: noop,
selectorData: PaginationTable.selectorProps.data,
onSelectorChange: noop
};
function WrapperTablePagination(_ref) {
let {
paperProps,
...props
} = _ref;
return /*#__PURE__*/React__default.createElement(PaperWrapper, _extends({
className: classnames({
'table-loader-container': props.loading
})
}, paperProps), /*#__PURE__*/React__default.createElement(PaginationTable, props));
}
function WrapperTableContainer(_ref) {
let {
name,
titleActions,
headerActions,
className,
paperProps,
...headerProps
} = _ref;
return /*#__PURE__*/React__default.createElement(PaperWrapper, _extends({
className: classnames(className, {
'table-loader-container': headerProps.loading
})
}, paperProps), /*#__PURE__*/React__default.createElement(WithTitle, {
name: name,
actions: titleActions
}, /*#__PURE__*/React__default.createElement(TableHeader, _extends({
actions: headerActions
}, headerProps))));
}
WrapperTableContainer.propTypes = {
name: PropTypes.string.isRequired,
titleActions: PropTypes.node,
headerActions: PropTypes.node,
...TableHeader.propTypes
};
var img$1 = "data:image/svg+xml,%3csvg id='XLS' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3e %3crect id='Path' width='24' height='24' fill='none'/%3e %3cg id='icons8-xls' transform='translate(2 2)'%3e %3cpath id='Path_3937' data-name='Path 3937' d='M9.445%2c5H19.713a1.071%2c1.071%2c0%2c0%2c1%2c1.071%2c1.071V23.214a1.071%2c1.071%2c0%2c0%2c1-1.071%2c1.071H6.141A1.071%2c1.071%2c0%2c0%2c1%2c5.07%2c23.214V9.361A1.071%2c1.071%2c0%2c0%2c1%2c5.4%2c8.6L8.688%2c5.3A1.071%2c1.071%2c0%2c0%2c1%2c9.445%2c5Z' transform='translate(-4.688 -4.643)' fill='rgba(159%2c168%2c218%2c0.4)'/%3e %3cg id='Group_553' data-name='Group 553' transform='translate(0.332 0.346)'%3e %3cpath id='Path_3938' data-name='Path 3938' d='M4.98%2c25l-.05-3.379L20.459%2c6.09l.236%2c8.193L9.98%2c25Z' transform='translate(-4.93 -5.69)' fill='%23eceef8'/%3e %3cpath id='Path_3939' data-name='Path 3939' d='M4.93%2c17.188%2c17.148%2c4.97l2.054.089L4.98%2c19.277Z' transform='translate(-4.93 -4.97)' fill='%23eceef8'/%3e %3cpath id='Path_3940' data-name='Path 3940' d='M4.93%2c15.084%2c14.98%2c5.03h1.071L4.93%2c16.155Z' transform='translate(-4.93 -5.009)' fill='%23eceef8'/%3e %3c/g%3e %3cg id='Group_552' data-name='Group 552' transform='translate(1.811 2.511)'%3e %3cpath id='Path_3941' data-name='Path 3941' d='M37.324%2c13.03l.439.807.811.443-.811.443-.439.807-.443-.807-.811-.443.811-.443Z' transform='translate(-26.427 -12.316)' fill='white'/%3e %3cpath id='Path_3942' data-name='Path 3942' d='M22.934%2c11.03l.307.561.557.3-.557.3-.307.561-.3-.561-.561-.3.561-.3Z' transform='translate(-17.427 -11.03)' fill='white'/%3e %3cpath id='Path_3943' data-name='Path 3943' d='M9.659%2c42.03l.207.382.382.207-.382.207-.207.382-.207-.382-.382-.207.382-.207Z' transform='translate(-9.07 -30.959)' fill='white'/%3e %3c/g%3e %3cpath id='Path_3944' data-name='Path 3944' d='M9.356%2c5.03V9.316H5.07Z' transform='translate(-4.688 -4.662)' fill='%239fa8da'/%3e %3cpath id='Path_3980' data-name='Path 3980' d='M0%2c0H15.714V7.857H0Z' transform='translate(3.954 6.796)' fill='%239fa8da'/%3e %3cg id='Group_551' data-name='Group 551' transform='translate(1.429 17.143)'%3e %3cpath id='Path_3945' data-name='Path 3945' d='M8.357%2c52A.357.357%2c0%2c0%2c0%2c8%2c52.357v.714a.357.357%2c0%2c1%2c0%2c.714%2c0v-.714A.357.357%2c0%2c0%2c0%2c8.357%2c52Z' transform='translate(-8 -52)' fill='%237481c9'/%3e %3cpath id='Path_3946' data-name='Path 3946' d='M13.357%2c52a.357.357%2c0%2c0%2c0-.357.357v.714a.357.357%2c0%2c1%2c0%2c.714%2c0v-.714A.357.357%2c0%2c0%2c0%2c13.357%2c52Z' transform='translate(-11.214 -52)' fill='%237481c9'/%3e %3cpath id='Path_3947' data-name='Path 3947' d='M18.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c18.357%2c53.429Z' transform='translate(-14.429 -52)' fill='%237481c9'/%3e %3cpath id='Path_3948' data-name='Path 3948' d='M23.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c23.357%2c53.429Z' transform='translate(-17.643 -52)' fill='%237481c9'/%3e %3cpath id='Path_3949' data-name='Path 3949' d='M28.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c28.357%2c53.429Z' transform='translate(-20.857 -52)' fill='%237481c9'/%3e %3cpath id='Path_3950' data-name='Path 3950' d='M33.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c33.357%2c53.429Z' transform='translate(-24.071 -52)' fill='%237481c9'/%3e %3cpath id='Path_3951' data-name='Path 3951' d='M38.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c38.357%2c53.429Z' transform='translate(-27.286 -52)' fill='%237481c9'/%3e %3cpath id='Path_3952' data-name='Path 3952' d='M43.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c43.357%2c53.429Z' transform='translate(-30.5 -52)' fill='%237481c9'/%3e %3c/g%3e %3cpath id='Path_3953' data-name='Path 3953' d='M23.286%2c10.429H20.429V5.071A1.071%2c1.071%2c0%2c0%2c0%2c19.357%2c4H8.879a1.786%2c1.786%2c0%2c0%2c0-1.264.521L4.521%2c7.614A1.786%2c1.786%2c0%2c0%2c0%2c4%2c8.879v14.05A1.071%2c1.071%2c0%2c0%2c0%2c5.071%2c24H19.357a1.071%2c1.071%2c0%2c0%2c0%2c1.071-1.071V19h2.857A.714.714%2c0%2c0%2c0%2c24%2c18.286V11.143A.714.714%2c0%2c0%2c0%2c23.286%2c10.429ZM8.121%2c5.029a1.072%2c1.072%2c0%2c0%2c1%2c.164-.136V7.929a.357.357%2c0%2c0%2c1-.357.357H4.893a1.021%2c1.021%2c0%2c0%2c1%2c.136-.164Zm11.593%2c17.9a.357.357%2c0%2c0%2c1-.357.357H5.071a.357.357%2c0%2c0%2c1-.357-.357V9H7.929A1.071%2c1.071%2c0%2c0%2c0%2c9%2c7.929V4.714H19.357a.357.357%2c0%2c0%2c1%2c.357.357v5.357H8.286a.714.714%2c0%2c0%2c0-.714.714v7.143A.714.714%2c0%2c0%2c0%2c8.286%2c19H19.714Zm3.571-4.643h-15V11.143h15Z' transform='translate(-4 -4)' fill='%237481c9'/%3e %3cpath id='Path_3954' data-name='Path 3954' d='M37.143%2c31.571H35.714V28.357a.357.357%2c0%2c0%2c0-.714%2c0v3.571a.357.357%2c0%2c0%2c0%2c.357.357h1.786a.357.357%2c0%2c1%2c0%2c0-.714Z' transform='translate(-23.929 -19.429)' fill='white'/%3e %3cpath id='Path_3955' data-name='Path 3955' d='M26.724%2c28.048a.357.357%2c0%2c0%2c0-.489.121l-.764%2c1.279-.764-1.275a.357.357%2c0%2c0%2c0-.611.357l.957%2c1.611-.961%2c1.6a.357.357%2c0%2c0%2c0%2c.611.357l.768-1.268.764%2c1.275a.357.357%2c0%2c1%2c0%2c.611-.357l-.957-1.611.961-1.6A.357.357%2c0%2c0%2c0%2c26.724%2c28.048Z' transform='translate(-16.899 -19.427)' fill='white'/%3e %3cpath id='Path_3956' data-name='Path 3956' d='M44.071%2c28A1.071%2c1.071%2c0%2c0%2c0%2c43%2c29.071v.357A1.071%2c1.071%2c0%2c0%2c0%2c44.071%2c30.5h.714a.357.357%2c0%2c0%2c1%2c.357.357v.357a.357.357%2c0%2c0%2c1-.357.357h-.714a.357.357%2c0%2c0%2c1-.357-.357.357.357%2c0%2c0%2c0-.714%2c0%2c1.071%2c1.071%2c0%2c0%2c0%2c1.071%2c1.071h.714a1.071%2c1.071%2c0%2c0%2c0%2c1.071-1.071v-.357a1.071%2c1.071%2c0%2c0%2c0-1.071-1.071h-.714a.357.357%2c0%2c0%2c1-.357-.357v-.357a.357.357%2c0%2c0%2c1%2c.357-.357h.714a.357.357%2c0%2c0%2c1%2c.357.357.357.357%2c0%2c0%2c0%2c.714%2c0A1.071%2c1.071%2c0%2c0%2c0%2c44.786%2c28Z' transform='translate(-29.071 -19.429)' fill='white'/%3e %3c/g%3e%3c/svg%3e";
var img = "data:image/svg+xml,%3csvg id='CSV' xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3e %3crect id='Path' width='24' height='24' fill='none'/%3e %3cg id='icons8-csv' transform='translate(2 2)'%3e %3cpath id='Path_3937' data-name='Path 3937' d='M9.445%2c5H19.713a1.071%2c1.071%2c0%2c0%2c1%2c1.071%2c1.071V23.214a1.071%2c1.071%2c0%2c0%2c1-1.071%2c1.071H6.141A1.071%2c1.071%2c0%2c0%2c1%2c5.07%2c23.214V9.361A1.071%2c1.071%2c0%2c0%2c1%2c5.4%2c8.6L8.688%2c5.3A1.071%2c1.071%2c0%2c0%2c1%2c9.445%2c5Z' transform='translate(-4.688 -4.643)' fill='rgba(127%2c202%2c195%2c0.4)'/%3e %3cg id='Group_553' data-name='Group 553' transform='translate(0.332 0.346)'%3e %3cpath id='Path_3938' data-name='Path 3938' d='M4.98%2c25l-.05-3.379L20.459%2c6.09l.236%2c8.193L9.98%2c25Z' transform='translate(-4.93 -5.69)' fill='%23e5f5f3'/%3e %3cpath id='Path_3939' data-name='Path 3939' d='M4.93%2c17.188%2c17.148%2c4.97l2.054.089L4.98%2c19.277Z' transform='translate(-4.93 -4.97)' fill='%23e5f5f3'/%3e %3cpath id='Path_3940' data-name='Path 3940' d='M4.93%2c15.084%2c14.98%2c5.03h1.071L4.93%2c16.155Z' transform='translate(-4.93 -5.009)' fill='%23e5f5f3'/%3e %3c/g%3e %3cg id='Group_552' data-name='Group 552' transform='translate(1.811 2.511)'%3e %3cpath id='Path_3941' data-name='Path 3941' d='M37.324%2c13.03l.439.807.811.443-.811.443-.439.807-.443-.807-.811-.443.811-.443Z' transform='translate(-26.427 -12.316)' fill='white'/%3e %3cpath id='Path_3942' data-name='Path 3942' d='M22.934%2c11.03l.307.561.557.3-.557.3-.307.561-.3-.561-.561-.3.561-.3Z' transform='translate(-17.427 -11.03)' fill='white'/%3e %3cpath id='Path_3943' data-name='Path 3943' d='M9.659%2c42.03l.207.382.382.207-.382.207-.207.382-.207-.382-.382-.207.382-.207Z' transform='translate(-9.07 -30.959)' fill='white'/%3e %3c/g%3e %3cpath id='Path_3944' data-name='Path 3944' d='M9.356%2c5.03V9.316H5.07Z' transform='translate(-4.688 -4.662)' fill='%237fcac3'/%3e %3crect id='Rectangle_1270' data-name='Rectangle 1270' width='15.714' height='7.857' transform='translate(3.954 6.796)' fill='%237fcac3'/%3e %3cg id='Group_551' data-name='Group 551' transform='translate(1.429 17.143)'%3e %3cpath id='Path_3945' data-name='Path 3945' d='M8.357%2c52A.357.357%2c0%2c0%2c0%2c8%2c52.357v.714a.357.357%2c0%2c1%2c0%2c.714%2c0v-.714A.357.357%2c0%2c0%2c0%2c8.357%2c52Z' transform='translate(-8 -52)' fill='%2347b4a9'/%3e %3cpath id='Path_3946' data-name='Path 3946' d='M13.357%2c52a.357.357%2c0%2c0%2c0-.357.357v.714a.357.357%2c0%2c1%2c0%2c.714%2c0v-.714A.357.357%2c0%2c0%2c0%2c13.357%2c52Z' transform='translate(-11.214 -52)' fill='%2347b4a9'/%3e %3cpath id='Path_3947' data-name='Path 3947' d='M18.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c18.357%2c53.429Z' transform='translate(-14.429 -52)' fill='%2347b4a9'/%3e %3cpath id='Path_3948' data-name='Path 3948' d='M23.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c23.357%2c53.429Z' transform='translate(-17.643 -52)' fill='%2347b4a9'/%3e %3cpath id='Path_3949' data-name='Path 3949' d='M28.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c28.357%2c53.429Z' transform='translate(-20.857 -52)' fill='%2347b4a9'/%3e %3cpath id='Path_3950' data-name='Path 3950' d='M33.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c33.357%2c53.429Z' transform='translate(-24.071 -52)' fill='%2347b4a9'/%3e %3cpath id='Path_3951' data-name='Path 3951' d='M38.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c38.357%2c53.429Z' transform='translate(-27.286 -52)' fill='%2347b4a9'/%3e %3cpath id='Path_3952' data-name='Path 3952' d='M43.357%2c53.429a.357.357%2c0%2c0%2c0%2c.357-.357v-.714a.357.357%2c0%2c1%2c0-.714%2c0v.714A.357.357%2c0%2c0%2c0%2c43.357%2c53.429Z' transform='translate(-30.5 -52)' fill='%2347b4a9'/%3e %3c/g%3e %3cpath id='Path_3953' data-name='Path 3953' d='M23.286%2c10.429H20.429V5.071A1.071%2c1.071%2c0%2c0%2c0%2c19.357%2c4H8.879a1.786%2c1.786%2c0%2c0%2c0-1.264.521L4.521%2c7.614A1.786%2c1.786%2c0%2c0%2c0%2c4%2c8.879v14.05A1.071%2c1.071%2c0%2c0%2c0%2c5.071%2c24H19.357a1.071%2c1.071%2c0%2c0%2c0%2c1.071-1.071V19h2.857A.714.714%2c0%2c0%2c0%2c24%2c18.286V11.143A.714.714%2c0%2c0%2c0%2c23.286%2c10.429ZM8.121%2c5.029a1.072%2c1.072%2c0%2c0%2c1%2c.164-.136V7.929a.357.357%2c0%2c0%2c1-.357.357H4.893a1.021%2c1.021%2c0%2c0%2c1%2c.136-.164Zm11.593%2c17.9a.357.357%2c0%2c0%2c1-.357.357H5.071a.357.357%2c0%2c0%2c1-.357-.357V9H7.929A1.071%2c1.071%2c0%2c0%2c0%2c9%2c7.929V4.714H19.357a.357.357%2c0%2c0%2c1%2c.357.357v5.357H8.286a.714.714%2c0%2c0%2c0-.714.714v7.143A.714.714%2c0%2c0%2c0%2c8.286%2c19H19.714Zm3.571-4.643h-15V11.143h15Z' transform='translate(-4 -4)' fill='%2347b4a9'/%3e %3cpath id='Path_3977' data-name='Path 3977' d='M25.071%2c28.714h.714a.357.357%2c0%2c0%2c1%2c.357.357.357.357%2c0%2c0%2c0%2c.714%2c0A1.071%2c1.071%2c0%2c0%2c0%2c25.786%2c28h-.714A1.071%2c1.071%2c0%2c0%2c0%2c24%2c29.071v2.143a1.071%2c1.071%2c0%2c0%2c0%2c1.071%2c1.071h.714a1.071%2c1.071%2c0%2c0%2c0%2c1.071-1.071.357.357%2c0%2c0%2c0-.714%2c0%2c.357.357%2c0%2c0%2c1-.357.357h-.714a.357.357%2c0%2c0%2c1-.357-.357V29.071A.357.357%2c0%2c0%2c1%2c25.071%2c28.714Z' transform='translate(-16.857 -19.429)' fill='white'/%3e %3cpath id='Path_3978' data-name='Path 3978' d='M44.739%2c28.225a.358.358%2c0%2c0%2c0-.686.2L45.125%2c32a.357.357%2c0%2c0%2c0%2c.686%2c0l1.071-3.571a.371.371%2c0%2c0%2c0-.714-.2l-.714%2c2.432Z' transform='translate(-29.739 -19.4)' fill='white'/%3e %3cpath id='Path_3979' data-name='Path 3979' d='M35.071%2c28.714h.714a.357.357%2c0%2c0%2c1%2c.357.357.357.357%2c0%2c0%2c0%2c.714%2c0A1.071%2c1.071%2c0%2c0%2c0%2c35.786%2c28h-.714A1.071%2c1.071%2c0%2c0%2c0%2c34%2c29.071v.357A1.071%2c1.071%2c0%2c0%2c0%2c35.071%2c30.5h.714a.357.357%2c0%2c0%2c1%2c.357.357v.357a.357.357%2c0%2c0%2c1-.357.357h-.714a.357.357%2c0%2c0%2c1-.357-.357.357.357%2c0%2c0%2c0-.714%2c0%2c1.071%2c1.071%2c0%2c0%2c0%2c1.071%2c1.071h.714a1.071%2c1.071%2c0%2c0%2c0%2c1.071-1.071v-.357a1.071%2c1.071%2c0%2c0%2c0-1.071-1.071h-.714a.357.357%2c0%2c0%2c1-.357-.357v-.357A.357.357%2c0%2c0%2c1%2c35.071%2c28.714Z' transform='translate(-23.286 -19.429)' fill='white'/%3e %3c/g%3e%3c/svg%3e";
var FileSaver_minExports = {};
var FileSaver_min = {
get exports(){ return FileSaver_minExports; },
set exports(v){ FileSaver_minExports = v; },
};
(function (module, exports) {
(function(a,b){b();})(commonjsGlobal,function(){function b(a,b){return "undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c);},d.onerror=function(){console.error("could not download file");},d.send();}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send();}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"));}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b);}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href);},4E4),setTimeout(function(){e(j);},0));}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else {var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i);});}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null;},k.readAsDataURL(b);}else {var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m);},4E4);}});f.saveAs=g.saveAs=g,(module.exports=g);});
} (FileSaver_min));
var FileSaver = FileSaver_minExports;
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*exported XLSX */
/*global process:false, Buffer:false, ArrayBuffer:false, DataView:false, Deno:false */
var XLSX = {};
XLSX.version = '0.18.5';
var current_ansi = 1252;
var VALID_ANSI = [ 874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 10000 ];
var set_ansi = function(cp/*:number*/) { if(VALID_ANSI.indexOf(cp) == -1) return; current_ansi = cp; };
function reset_ansi() { set_ansi(1252); }
var set_cp = function(cp/*:number*/) { set_ansi(cp); };
function reset_cp() { set_cp(1200); reset_ansi(); }
function utf16beread(data/*:string*/)/*:string*/ {
var o/*:Array<string>*/ = [];
for(var i = 0; i < (data.length>>1); ++i) o[i] = String.fromCharCode(data.charCodeAt(2*i+1) + (data.charCodeAt(2*i)<<8));
return o.join("");
}
var _getchar = function _gc1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };
var _getansi = function _ga1(x/*:number*/)/*:string*/ { return String.fromCharCode(x); };
var $cptable;
var Base64_map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function Base64_encode(input) {
var o = "";
var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;
for (var i = 0; i < input.length; ) {
c1 = input.charCodeAt(i++);
e1 = c1 >> 2;
c2 = input.charCodeAt(i++);
e2 = (c1 & 3) << 4 | c2 >> 4;
c3 = input.charCodeAt(i++);
e3 = (c2 & 15) << 2 | c3 >> 6;
e4 = c3 & 63;
if (isNaN(c2)) {
e3 = e4 = 64;
} else if (isNaN(c3)) {
e4 = 64;
}
o += Base64_map.charAt(e1) + Base64_map.charAt(e2) + Base64_map.charAt(e3) + Base64_map.charAt(e4);
}
return o;
}
function Base64_decode(input) {
var o = "";
var c1 = 0, c2 = 0, c3 = 0, e1 = 0, e2 = 0, e3 = 0, e4 = 0;
input = input.replace(/[^\w\+\/\=]/g, "");
for (var i = 0; i < input.length; ) {
e1 = Base64_map.indexOf(input.charAt(i++));
e2 = Base64_map.indexOf(input.charAt(i++));
c1 = e1 << 2 | e2 >> 4;
o += String.fromCharCode(c1);
e3 = Base64_map.indexOf(input.charAt(i++));
c2 = (e2 & 15) << 4 | e3 >> 2;
if (e3 !== 64) {
o += String.fromCharCode(c2);
}
e4 = Base64_map.indexOf(input.charAt(i++));
c3 = (e3 & 3) << 6 | e4;
if (e4 !== 64) {
o += String.fromCharCode(c3);
}
}
return o;
}
var has_buf = /*#__PURE__*/(function() { return typeof Buffer !== 'undefined' && typeof process !== 'undefined' && typeof process.versions !== 'undefined' && !!process.versions.node; })();
var Buffer_from = /*#__PURE__*/(function() {
if(typeof Buffer !== 'undefined') {
var nbfs = !Buffer.from;
if(!nbfs) try { Buffer.from("foo", "utf8"); } catch(e) { nbfs = true; }
return nbfs ? function(buf, enc) { return (enc) ? new Buffer(buf, enc) : new Buffer(buf); } : Buffer.from.bind(Buffer);
}
return function() {};
})();
function new_raw_buf(len/*:number*/) {
/* jshint -W056 */
if(has_buf) return Buffer.alloc ? Buffer.alloc(len) : new Buffer(len);
return typeof Uint8Array != "undefined" ? new Uint8Array(len) : new Array(len);
/* jshint +W056 */
}
function new_unsafe_buf(len/*:number*/) {
/* jshint -W056 */
if(has_buf) return Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : new Buffer(len);
return typeof Uint8Array != "undefined" ? new Uint8Array(len) : new Array(len);
/* jshint +W056 */
}
var s2a = function s2a(s/*:string*/)/*:any*/ {
if(has_buf) return Buffer_from(s, "binary");
return s.split("").map(function(x/*:string*/)/*:number*/{ return x.charCodeAt(0) & 0xff; });
};
function s2ab(s/*:string*/)/*:any*/ {
if(typeof ArrayBuffer === 'undefined') return s2a(s);
var buf = new ArrayBuffer(s.length), view = new Uint8Array(buf);
for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
return buf;
}
function a2s(data/*:any*/)/*:string*/ {
if(Array.isArray(data)) return data.map(function(c) { return String.fromCharCode(c); }).join("");
var o/*:Array<string>*/ = []; for(var i = 0; i < data.length; ++i) o[i] = String.fromCharCode(data[i]); return o.join("");
}
function a2u(data/*:Array<number>*/)/*:Uint8Array*/ {
if(typeof Uint8Array === 'undefined') throw new Error("Unsupported");
return new Uint8Array(data);
}
var bconcat = has_buf ? function(bufs) { return Buffer.concat(bufs.map(function(buf) { return Buffer.isBuffer(buf) ? buf : Buffer_from(buf); })); } : function(bufs) {
if(typeof Uint8Array !== "undefined") {
var i = 0, maxlen = 0;
for(i = 0; i < bufs.length; ++i) maxlen += bufs[i].length;
var o = new Uint8Array(maxlen);
var len = 0;
for(i = 0, maxlen = 0; i < bufs.length; maxlen += len, ++i) {
len = bufs[i].length;
if(bufs[i] instanceof Uint8Array) o.set(bufs[i], maxlen);
else if(typeof bufs[i] == "string") { throw "wtf"; }
else o.set(new Uint8Array(bufs[i]), maxlen);
}
return o;
}
return [].concat.apply([], bufs.map(function(buf) { return Array.isArray(buf) ? buf : [].slice.call(buf); }));
};
function utf8decode(content/*:string*/) {
var out = [], widx = 0, L = content.length + 250;
var o = new_raw_buf(content.length + 255);
for(var ridx = 0; ridx < content.length; ++ridx) {
var c = content.charCodeAt(ridx);
if(c < 0x80) o[widx++] = c;
else if(c < 0x800) {
o[widx++] = (192|((c>>6)&31));
o[widx++] = (128|(c&63));
} else if(c >= 0xD800 && c < 0xE000) {
c = (c&1023)+64;
var d = content.charCodeAt(++ridx)&1023;
o[widx++] = (240|((c>>8)&7));
o[widx++] = (128|((c>>2)&63));
o[widx++] = (128|((d>>6)&15)|((c&3)<<4));
o[widx++] = (128|(d&63));
} else {
o[widx++] = (224|((c>>12)&15));
o[widx++] = (128|((c>>6)&63));
o[widx++] = (128|(c&63));
}
if(widx > L) {
out.push(o.slice(0, widx));
widx = 0;
o = new_raw_buf(65535);
L = 65530;
}
}
out.push(o.slice(0, widx));
return bconcat(out);
}
var chr0 = /\u0000/g, chr1 = /[\u0001-\u0006]/g;
/*::
declare type Block = any;
declare type BufArray = {
newblk(sz:number):Block;
next(sz:number):Block;
end():any;
push(buf:Block):void;
};
type RecordHopperCB = {(d:any, Rn:string, RT:number):?boolean;};
type EvertType = {[string]:string};
type EvertNumType = {[string]:number};
type EvertArrType = {[string]:Array<string>};
type StringConv = {(string):string};
*/
/* ssf.js (C) 2013-present SheetJS -- http://sheetjs.com */
/*jshint -W041 */
function _strrev(x/*:string*/)/*:string*/ { var o = "", i = x.length-1; while(i>=0) o += x.charAt(i--); return o; }
function pad0(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:fill('0',d-t.length)+t;}
function pad_(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v;return t.length>=d?t:fill(' ',d-t.length)+t;}
function rpad_(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:t+fill(' ',d-t.length);}
function pad0r1(v/*:any*/,d/*:number*/)/*:string*/{var t=""+Math.round(v); return t.length>=d?t:fill('0',d-t.length)+t;}
function pad0r2(v/*:any*/,d/*:number*/)/*:string*/{var t=""+v; return t.length>=d?t:fill('0',d-t.length)+t;}
var p2_32 = /*#__PURE__*/Math.pow(2,32);
function pad0r(v/*:any*/,d/*:number*/)/*:string*/{if(v>p2_32||v<-p2_32) return pad0r1(v,d); var i = Math.round(v); return pad0r2(i,d); }
/* yes, in 2022 this is still faster than string compare */
function SSF_isgeneral(s/*:string*/, i/*:?number*/)/*:boolean*/ { i = i || 0; return s.length >= 7 + i && (s.charCodeAt(i)|32) === 103 && (s.charCodeAt(i+1)|32) === 101 && (s.charCodeAt(i+2)|32) === 110 && (s.charCodeAt(i+3)|32) === 101 && (s.charCodeAt(i+4)|32) === 114 && (s.charCodeAt(i+5)|32) === 97 && (s.charCodeAt(i+6)|32) === 108; }
var days/*:Array<Array<string> >*/ = [
['Sun', 'Sunday'],
['Mon', 'Monday'],
['Tue', 'Tuesday'],
['Wed', 'Wednesday'],
['Thu', 'Thursday'],
['Fri', 'Friday'],
['Sat', 'Saturday']
];
var months/*:Array<Array<string> >*/ = [
['J', 'Jan', 'January'],
['F', 'Feb', 'February'],
['M', 'Mar', 'March'],
['A', 'Apr', 'April'],
['M', 'May', 'May'],
['J', 'Jun', 'June'],
['J', 'Jul', 'July'],
['A', 'Aug', 'August'],
['S', 'Sep', 'September'],
['O', 'Oct', 'October'],
['N', 'Nov', 'November'],
['D', 'Dec', 'December']
];
function SSF_init_table(t/*:any*/) {
if(!t) t = {};
t[0]= 'General';
t[1]= '0';
t[2]= '0.00';
t[3]= '#,##0';
t[4]= '#,##0.00';
t[9]= '0%';
t[10]= '0.00%';
t[11]= '0.00E+00';
t[12]= '# ?/?';
t[13]= '# ??/??';
t[14]= 'm/d/yy';
t[15]= 'd-mmm-yy';
t[16]= 'd-mmm';
t[17]= 'mmm-yy';
t[18]= 'h:mm AM/PM';
t[19]= 'h:mm:ss AM/PM';
t[20]= 'h:mm';
t[21]= 'h:mm:ss';
t[22]= 'm/d/yy h:mm';
t[37]= '#,##0 ;(#,##0)';
t[38]= '#,##0 ;[Red](#,##0)';
t[39]= '#,##0.00;(#,##0.00)';
t[40]= '#,##0.00;[Red](#,##0.00)';
t[45]= 'mm:ss';
t[46]= '[h]:mm:ss';
t[47]= 'mmss.0';
t[48]= '##0.0E+0';
t[49]= '@';
t[56]= '"上午/下午 "hh"時"mm"分"ss"秒 "';
return t;
}
/* repeated to satiate webpack */
var table_fmt = {
0: 'General',
1: '0',
2: '0.00',
3: '#,##0',
4: '#,##0.00',
9: '0%',
10: '0.00%',
11: '0.00E+00',
12: '# ?/?',
13: '# ??/??',
14: 'm/d/yy',
15: 'd-mmm-yy',
16: 'd-mmm',
17: 'mmm-yy',
18: 'h:mm AM/PM',
19: 'h:mm:ss AM/PM',
20: 'h:mm',
21: 'h:mm:ss',
22: 'm/d/yy h:mm',
37: '#,##0 ;(#,##0)',
38: '#,##0 ;[Red](#,##0)',
39: '#,##0.00;(#,##0.00)',
40: '#,##0.00;[Red](#,##0.00)',
45: 'mm:ss',
46: '[h]:mm:ss',
47: 'mmss.0',
48: '##0.0E+0',
49: '@',
56: '"上午/下午 "hh"時"mm"分"ss"秒 "'
};
/* Defaults determined by systematically testing in Excel 2019 */
/* These formats appear to default to other formats in the table */
var SSF_default_map = {
5: 37, 6: 38, 7: 39, 8: 40, // 5 -> 37 ... 8 -> 40
23: 0, 24: 0, 25: 0, 26: 0, // 23 -> 0 ... 26 -> 0
27: 14, 28: 14, 29: 14, 30: 14, 31: 14, // 27 -> 14 ... 31 -> 14
50: 14, 51: 14, 52: 14, 53: 14, 54: 14, // 50 -> 14 ... 58 -> 14
55: 14, 56: 14, 57: 14, 58: 14,
59: 1, 60: 2, 61: 3, 62: 4, // 59 -> 1 ... 62 -> 4
67: 9, 68: 10, // 67 -> 9 ... 68 -> 10
69: 12, 70: 13, 71: 14, // 69 -> 12 ... 71 -> 14
72: 14, 73: 15, 74: 16, 75: 17, // 72 -> 14 ... 75 -> 17
76: 20, 77: 21, 78: 22, // 76 -> 20 ... 78 -> 22
79: 45, 80: 46, 81: 47, // 79 -> 45 ... 81 -> 47
82: 0 // 82 -> 0 ... 65536 -> 0 (omitted)
};
/* These formats technically refer to Accounting formats with no equivalent */
var SSF_default_str = {
// 5 -- Currency, 0 decimal, black negative
5: '"$"#,##0_);\\("$"#,##0\\)',
63: '"$"#,##0_);\\("$"#,##0\\)',
// 6 -- Currency, 0 decimal, red negative
6: '"$"#,##0_);[Red]\\("$"#,##0\\)',
64: '"$"#,##0_);[Red]\\("$"#,##0\\)',
// 7 -- Currency, 2 decimal, black negative
7: '"$"#,##0.00_);\\("$"#,##0.00\\)',
65: '"$"#,##0.00_);\\("$"#,##0.00\\)',
// 8 -- Currency, 2 decimal, red negative
8: '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
66: '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
// 41 -- Accounting, 0 decimal, No Symbol
41: '_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',
// 42 -- Accounting, 0 decimal, $ Symbol
42: '_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',
// 43 -- Accounting, 2 decimal, No Symbol
43: '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',
// 44 -- Accounting, 2 decimal, $ Symbol
44: '_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'
};
function SSF_frac(x/*:number*/, D/*:number*/, mixed/*:?boolean*/)/*:Array<number>*/ {
var sgn = x < 0 ? -1 : 1;
var B = x * sgn;
var P_2 = 0, P_1 = 1, P = 0;
var Q_2 = 1, Q_1 = 0, Q = 0;
var A = Math.floor(B);
while(Q_1 < D) {
A = Math.floor(B);
P = A * P_1 + P_2;
Q = A * Q_1 + Q_2;
if((B - A) < 0.00000005) break;
B = 1 / (B - A);
P_2 = P_1; P_1 = P;
Q_2 = Q_1; Q_1 = Q;
}
if(Q > D) { if(Q_1 > D) { Q = Q_2; P = P_2; } else { Q = Q_1; P = P_1; } }
if(!mixed) return [0, sgn * P, Q];
var q = Math.floor(sgn * P/Q);
return [q, sgn*P - q*Q, Q];
}
function SSF_parse_date_code(v/*:number*/,opts/*:?any*/,b2/*:?boolean*/) {
if(v > 2958465 || v < 0) return null;
var date = (v|0), time = Math.floor(86400 * (v - date)), dow=0;
var dout=[];
var out={D:date, T:time, u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};
if(Math.abs(out.u) < 1e-6) out.u = 0;
if(opts && opts.date1904) date += 1462;
if(out.u > 0.9999) {
out.u = 0;
if(++time == 86400) { out.T = time = 0; ++date; ++out.D; }
}
if(date === 60) {dout = b2 ? [1317,10,29] : [1900,2,29]; dow=3;}
else if(date === 0) {dout = b2 ? [1317,8,29] : [1900,1,0]; dow=6;}
else {
if(date > 60) --date;
/* 1 = Jan 1 1900 in Gregorian */
var d = new Date(1900, 0, 1);
d.setDate(d.getDate() + date - 1);
dout = [d.getFullYear(), d.getMonth()+1,d.getDate()];
dow = d.getDay();
if(date < 60) dow = (dow + 6) % 7;
if(b2) dow = SSF_fix_hijri(d, dout);
}
out.y = dout[0]; out.m = dout[1]; out.d = dout[2];
out.S = time % 60; time = Math.floor(time / 60);
out.M = time % 60; time = Math.floor(time / 60);
out.H = time;
out.q = dow;
return out;
}
var SSFbasedate = /*#__PURE__*/new Date(1899, 11, 31, 0, 0, 0);
var SSFdnthresh = /*#__PURE__*/SSFbasedate.getTime();
var SSFbase1904 = /*#__PURE__*/new Date(1900, 2, 1, 0, 0, 0);
function datenum_local(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {
var epoch = /*#__PURE__*/v.getTime();
if(date1904) epoch -= 1461*24*60*60*1000;
else if(v >= SSFbase1904) epoch += 24*60*60*1000;
return (epoch - (SSFdnthresh + (/*#__PURE__*/v.getTimezoneOffset() - /*#__PURE__*/SSFbasedate.getTimezoneOffset()) * 60000)) / (24 * 60 * 60 * 1000);
}
/* ECMA-376 18.8.30 numFmt*/
/* Note: `toPrecision` uses standard form when prec > E and E >= -6 */
/* exponent >= -9 and <= 9 */
functi