1mpacto-react-ui 2.0.16 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/style.css +1 -1
- package/dist/components/Alert/index.cjs +1 -0
- package/dist/components/Alert/index.mjs +220 -0
- package/dist/components/Alert/style.module.scss.cjs +1 -0
- package/dist/components/Alert/style.module.scss.mjs +14 -0
- package/dist/components/Badges/Badges.cjs +2 -0
- package/dist/components/Badges/Badges.config.cjs +1 -0
- package/dist/components/Badges/Badges.config.mjs +47 -0
- package/dist/components/Badges/Badges.mjs +29 -0
- package/dist/components/Badges/style.module.scss.cjs +1 -0
- package/dist/components/Badges/style.module.scss.mjs +40 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +3 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.cjs +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.mjs +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.mjs +67 -0
- package/dist/components/Breadcrumbs/style.module.scss.cjs +1 -0
- package/dist/components/Breadcrumbs/style.module.scss.mjs +16 -0
- package/dist/components/Button/Button.cjs +12 -0
- package/dist/components/Button/Button.config.cjs +1 -0
- package/dist/components/Button/Button.config.mjs +75 -0
- package/dist/components/Button/Button.mjs +75 -0
- package/dist/components/Button/style.module.scss.cjs +1 -0
- package/dist/components/Button/style.module.scss.mjs +58 -0
- package/dist/components/ButtonIcon/ButtonIcon.cjs +12 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.cjs +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.mjs +68 -0
- package/dist/components/ButtonIcon/ButtonIcon.mjs +65 -0
- package/dist/components/ButtonIcon/style.module.scss.cjs +1 -0
- package/dist/components/ButtonIcon/style.module.scss.mjs +51 -0
- package/dist/components/ButtonPopover/ButtonPopover.cjs +1 -0
- package/dist/components/ButtonPopover/ButtonPopover.mjs +84 -0
- package/dist/components/ButtonPopover/style.module.scss.cjs +1 -0
- package/dist/components/ButtonPopover/style.module.scss.mjs +10 -0
- package/dist/components/Calendar/Calendar.cjs +1 -0
- package/dist/components/Calendar/Calendar.mjs +199 -0
- package/dist/components/Calendar/CalendarButton.cjs +1 -0
- package/dist/components/Calendar/CalendarButton.mjs +18 -0
- package/dist/components/Calendar/CalendarCell.cjs +1 -0
- package/dist/components/Calendar/CalendarCell.mjs +26 -0
- package/dist/components/Calendar/CalendarMonth.cjs +1 -0
- package/dist/components/Calendar/CalendarMonth.mjs +74 -0
- package/dist/components/Calendar/CalendarRange.cjs +1 -0
- package/dist/components/Calendar/CalendarRange.mjs +140 -0
- package/dist/components/Calendar/CalendarYear.cjs +3 -0
- package/dist/components/Calendar/CalendarYear.mjs +74 -0
- package/dist/components/Calendar/style.module.scss.cjs +1 -0
- package/dist/components/Calendar/style.module.scss.mjs +36 -0
- package/dist/components/Chart/DoughnutChart.cjs +1 -0
- package/dist/components/Chart/DoughnutChart.mjs +173 -0
- package/dist/components/Chart/GradientBarChart.cjs +1 -0
- package/dist/components/Chart/GradientBarChart.mjs +157 -0
- package/dist/components/Chart/GradientLineChart.cjs +1 -0
- package/dist/components/Chart/GradientLineChart.mjs +143 -0
- package/dist/components/Chart/LineChart.cjs +1 -0
- package/dist/components/Chart/LineChart.mjs +158 -0
- package/dist/components/Chips/Chips.cjs +3 -0
- package/dist/components/Chips/Chips.config.cjs +1 -0
- package/dist/components/Chips/Chips.config.mjs +35 -0
- package/dist/components/Chips/Chips.mjs +37 -0
- package/dist/components/Chips/style.module.scss.cjs +1 -0
- package/dist/components/Chips/style.module.scss.mjs +14 -0
- package/dist/components/Collapse/Collapse.cjs +1 -0
- package/dist/components/Collapse/Collapse.mjs +35 -0
- package/dist/components/Collapse/CollapseV2.cjs +1 -0
- package/dist/components/Collapse/CollapseV2.mjs +30 -0
- package/dist/components/Collapse/style.module.scss.cjs +1 -0
- package/dist/components/Collapse/style.module.scss.mjs +7 -0
- package/dist/components/DatePicker/DatePicker.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.mjs +125 -0
- package/dist/components/DatePicker/DateRangePicker.cjs +1 -0
- package/dist/components/DatePicker/DateRangePicker.mjs +112 -0
- package/dist/components/DatePicker/FilterDate.cjs +1 -0
- package/dist/components/DatePicker/FilterDate.mjs +248 -0
- package/dist/components/DatePicker/MonthYearPicker.cjs +1 -0
- package/dist/components/DatePicker/MonthYearPicker.mjs +83 -0
- package/dist/components/ErrorMessage/ErrorMessage.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.mjs +11 -0
- package/dist/components/ErrorMessage/ErrorMessage.mjs +6 -0
- package/dist/components/ErrorMessage/style.module.scss.cjs +1 -0
- package/dist/components/ErrorMessage/style.module.scss.mjs +8 -0
- package/dist/components/FilterContainer/FilterContainer.cjs +1 -0
- package/dist/components/FilterContainer/FilterContainer.mjs +63 -0
- package/dist/components/Input/InputFloatingInner.cjs +5 -0
- package/dist/components/Input/InputFloatingInner.config.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.config.mjs +11 -0
- package/dist/components/Input/InputFloatingInner.mjs +65 -0
- package/dist/components/Input/InputFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.module.scss.mjs +20 -0
- package/dist/components/Input/InputInnerLabel.cjs +6 -0
- package/dist/components/Input/InputInnerLabel.config.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.config.mjs +10 -0
- package/dist/components/Input/InputInnerLabel.mjs +78 -0
- package/dist/components/Input/InputInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.module.scss.mjs +20 -0
- package/dist/components/Input/InputNative.cjs +5 -0
- package/dist/components/Input/InputNative.config.cjs +1 -0
- package/dist/components/Input/InputNative.config.mjs +11 -0
- package/dist/components/Input/InputNative.mjs +58 -0
- package/dist/components/Input/InputNative.module.scss.cjs +1 -0
- package/dist/components/Input/InputNative.module.scss.mjs +18 -0
- package/dist/components/Input/InputReguler.cjs +5 -0
- package/dist/components/Input/InputReguler.config.cjs +1 -0
- package/dist/components/Input/InputReguler.config.mjs +11 -0
- package/dist/components/Input/InputReguler.mjs +79 -0
- package/dist/components/Input/InputReguler.module.scss.cjs +1 -0
- package/dist/components/Input/InputReguler.module.scss.mjs +24 -0
- package/dist/components/Modal/ModalDialog.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.mjs +12 -0
- package/dist/components/Modal/ModalDialog.mjs +44 -0
- package/dist/components/Modal/style.module.scss.cjs +1 -0
- package/dist/components/Modal/style.module.scss.mjs +14 -0
- package/dist/components/NumberFormat/NumberFormat.cjs +1 -0
- package/dist/components/NumberFormat/NumberFormat.mjs +33 -0
- package/dist/components/Pagination/Pagination.cjs +2 -0
- package/dist/components/Pagination/Pagination.config.cjs +1 -0
- package/dist/components/Pagination/Pagination.config.mjs +25 -0
- package/dist/components/Pagination/Pagination.mjs +231 -0
- package/dist/components/Pagination/style.module.scss.cjs +1 -0
- package/dist/components/Pagination/style.module.scss.mjs +20 -0
- package/dist/components/Popover/Popover.cjs +1 -0
- package/dist/components/Popover/Popover.mjs +78 -0
- package/dist/components/Popover/style.module.scss.cjs +1 -0
- package/dist/components/Popover/style.module.scss.mjs +7 -0
- package/dist/components/PortalComponent/PortalComponent.cjs +1 -0
- package/dist/components/PortalComponent/PortalComponent.mjs +18 -0
- package/dist/components/RadioCheckbox/CheckboxTable.cjs +1 -0
- package/dist/components/RadioCheckbox/CheckboxTable.mjs +27 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.cjs +3 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.mjs +31 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.mjs +84 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.mjs +26 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.cjs +4 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.mjs +20 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.mjs +55 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.mjs +19 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.mjs +27 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.mjs +150 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.mjs +10 -0
- package/dist/components/SelectDropdownContainer/styleConfig.cjs +1 -0
- package/dist/components/SelectDropdownContainer/styleConfig.mjs +277 -0
- package/dist/components/Sidebar/ItemSidebar.cjs +8 -0
- package/dist/components/Sidebar/ItemSidebar.config.cjs +1 -0
- package/dist/components/Sidebar/ItemSidebar.config.mjs +42 -0
- package/dist/components/Sidebar/ItemSidebar.mjs +122 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.mjs +25 -0
- package/dist/components/Sidebar/Sidebar.mjs +136 -0
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.module.scss.mjs +26 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.mjs +31 -0
- package/dist/components/Step/Step.cjs +5 -0
- package/dist/components/Step/Step.mjs +85 -0
- package/dist/components/Step/Step.module.scss.cjs +1 -0
- package/dist/components/Step/Step.module.scss.mjs +17 -0
- package/dist/components/Step/StepIndicator.cjs +4 -0
- package/dist/components/Step/StepIndicator.mjs +65 -0
- package/dist/components/Step/StepIndicator.module.scss.cjs +1 -0
- package/dist/components/Step/StepIndicator.module.scss.mjs +16 -0
- package/dist/components/Switch/Switch.cjs +1 -0
- package/dist/components/Switch/Switch.config.cjs +1 -0
- package/dist/components/Switch/Switch.config.mjs +28 -0
- package/dist/components/Switch/Switch.mjs +53 -0
- package/dist/components/Switch/style.module.scss.cjs +1 -0
- package/dist/components/Switch/style.module.scss.mjs +23 -0
- package/dist/components/TPublish/TPublish.cjs +1 -0
- package/dist/components/TPublish/TPublish.mjs +5 -0
- package/dist/components/Table/Table.cjs +3 -0
- package/dist/components/Table/Table.config.cjs +1 -0
- package/dist/components/Table/Table.config.mjs +69 -0
- package/dist/components/Table/Table.mjs +402 -0
- package/dist/components/Table/Table.module.scss.cjs +1 -0
- package/dist/components/Table/Table.module.scss.mjs +19 -0
- package/dist/components/Table/TableSubMobile.cjs +1 -0
- package/dist/components/Table/TableSubMobile.mjs +37 -0
- package/dist/components/Table/TableSubMobile.module.scss.cjs +1 -0
- package/dist/components/Table/TableSubMobile.module.scss.mjs +6 -0
- package/dist/components/Tabs/TabPanel.cjs +1 -0
- package/dist/components/Tabs/TabPanel.mjs +14 -0
- package/dist/components/Tabs/Tabs.cjs +8 -0
- package/dist/components/Tabs/Tabs.config.cjs +1 -0
- package/dist/components/Tabs/Tabs.config.mjs +33 -0
- package/dist/components/Tabs/Tabs.mjs +112 -0
- package/dist/components/Tabs/style.module.scss.cjs +1 -0
- package/dist/components/Tabs/style.module.scss.mjs +30 -0
- package/dist/components/Text/Text.cjs +5 -0
- package/dist/components/Text/Text.mjs +39 -0
- package/dist/components/TextEditor/TextEditor.cjs +1 -0
- package/dist/components/TextEditor/TextEditor.mjs +9 -0
- package/dist/components/TextEditor/style.module.scss.cjs +1 -0
- package/dist/components/TextEditor/style.module.scss.mjs +7 -0
- package/dist/components/Textarea/Textarea.cjs +7 -0
- package/dist/components/Textarea/Textarea.config.cjs +1 -0
- package/dist/components/Textarea/Textarea.config.mjs +33 -0
- package/dist/components/Textarea/Textarea.mjs +87 -0
- package/dist/components/Textarea/TextareaFloatingInner.cjs +6 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.mjs +9 -0
- package/dist/components/Textarea/TextareaFloatingInner.mjs +101 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.mjs +17 -0
- package/dist/components/Textarea/TextareaInnerLabel.cjs +6 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.mjs +10 -0
- package/dist/components/Textarea/TextareaInnerLabel.mjs +87 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.mjs +17 -0
- package/dist/components/Textarea/style.module.scss.cjs +1 -0
- package/dist/components/Textarea/style.module.scss.mjs +25 -0
- package/dist/components/TimeRange/TimeRange.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.mjs +187 -0
- package/dist/components/TimeRange/TimeRange.module.scss.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.module.scss.mjs +23 -0
- package/dist/components/Timeline/Timeline.cjs +1 -0
- package/dist/components/Timeline/Timeline.mjs +12 -0
- package/dist/components/Timeline/style.module.scss.cjs +1 -0
- package/dist/components/Timeline/style.module.scss.mjs +14 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.mjs +77 -0
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.module.scss.mjs +8 -0
- package/dist/components/TruncateComponent/TruncateComponent.cjs +1 -0
- package/dist/components/TruncateComponent/TruncateComponent.mjs +83 -0
- package/dist/components/Upload/UploadFile.cjs +1 -0
- package/dist/components/Upload/UploadFile.mjs +94 -0
- package/dist/components/Upload/UploadFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadFile.module.scss.mjs +6 -0
- package/dist/components/Upload/UploadImage.cjs +12 -0
- package/dist/components/Upload/UploadImage.mjs +162 -0
- package/dist/components/Upload/UploadImage.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadImage.module.scss.mjs +14 -0
- package/dist/components/Upload/UploadMultipleFile.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.mjs +85 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.mjs +14 -0
- package/dist/components/Virtualization/ListVirtualization.cjs +1 -0
- package/dist/components/Virtualization/ListVirtualization.mjs +82 -0
- package/dist/components/Virtualization/TableVirtualization.cjs +1 -0
- package/dist/components/Virtualization/TableVirtualization.mjs +84 -0
- package/dist/config/bigNumber/index.cjs +1 -0
- package/dist/config/bigNumber/index.mjs +15 -0
- package/dist/config/components/borderRadius.cjs +1 -0
- package/dist/config/components/borderRadius.mjs +14 -0
- package/dist/config/components/font.cjs +1 -0
- package/dist/config/components/font.mjs +8 -0
- package/dist/config/components/gap.cjs +1 -0
- package/dist/config/components/gap.mjs +110 -0
- package/dist/config/components/tinymce.cjs +28 -0
- package/dist/config/components/tinymce.mjs +81 -0
- package/dist/config/components/typography.cjs +1 -0
- package/dist/config/components/typography.mjs +83 -0
- package/dist/config/resources/index.cjs +1 -0
- package/dist/config/resources/index.mjs +4 -0
- package/dist/config/tailwind/colors.cjs +1 -0
- package/dist/config/tailwind/colors.mjs +291 -0
- package/dist/config/tailwind/nativeScreen.cjs +1 -0
- package/dist/config/tailwind/nativeScreen.mjs +11 -0
- package/dist/config/tailwind/screen.cjs +1 -0
- package/dist/config/tailwind/screen.mjs +11 -0
- package/dist/config/tailwind/typography.cjs +1 -0
- package/dist/config/tailwind/typography.mjs +158 -0
- package/dist/hooks/useAsyncDebounce.cjs +1 -0
- package/dist/hooks/useAsyncDebounce.mjs +21 -0
- package/dist/hooks/useCombinedResizeObserver.cjs +1 -0
- package/dist/hooks/useCombinedResizeObserver.mjs +48 -0
- package/dist/hooks/useCountdown.cjs +1 -0
- package/dist/hooks/useCountdown.mjs +38 -0
- package/dist/hooks/useDeepCompareEffect.cjs +1 -0
- package/dist/hooks/useDeepCompareEffect.mjs +14 -0
- package/dist/hooks/useElementOrWindowMediaQuery.cjs +1 -0
- package/dist/hooks/useElementOrWindowMediaQuery.mjs +23 -0
- package/dist/hooks/useEventListener.cjs +1 -0
- package/dist/hooks/useEventListener.mjs +19 -0
- package/dist/hooks/useMasonry.cjs +1 -0
- package/dist/hooks/useMasonry.mjs +53 -0
- package/dist/hooks/useMergeRefs.cjs +1 -0
- package/dist/hooks/useMergeRefs.mjs +29 -0
- package/dist/hooks/useOtpInput.cjs +1 -0
- package/dist/hooks/useOtpInput.mjs +115 -0
- package/dist/hooks/useStateRef.cjs +1 -0
- package/dist/hooks/useStateRef.mjs +10 -0
- package/dist/index.cjs +1 -247
- package/dist/index.mjs +207 -51684
- package/dist/package.json.cjs +1 -0
- package/dist/package.json.d.ts +3 -2
- package/dist/package.json.mjs +7 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.cjs +1 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.mjs +4 -0
- package/dist/src/components/Chart/PieChart.d.ts +3 -0
- package/dist/src/components/Chart/PieChart.stories.d.ts +147 -0
- package/dist/src/interfaces/components/Chart/index.d.ts +203 -0
- package/dist/utils/axiosBigNumber.cjs +1 -0
- package/dist/utils/axiosBigNumber.mjs +32 -0
- package/dist/utils/common.cjs +1 -0
- package/dist/utils/common.mjs +264 -0
- package/dist/utils/cookies.cjs +1 -0
- package/dist/utils/cookies.mjs +48 -0
- package/dist/utils/formatBigNumber.cjs +1 -0
- package/dist/utils/formatBigNumber.mjs +39 -0
- package/dist/utils/yup.cjs +1 -0
- package/dist/utils/yup.mjs +78 -0
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,247 +1 @@
|
|
|
1
|
-
"use strict";var J_=Object.defineProperty;var Q_=(e,t,n)=>t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ce=(e,t,n)=>Q_(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react/jsx-runtime"),N=require("react"),Zo=require("react-dom");function Vx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ae=Vx(N),pg=Vx(Zo),Hx=6048e5,eI=864e5,vm=Symbol.for("constructDateFrom");function na(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&vm in e?e[vm](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ir(e,t){return na(t||e,e)}let tI={};function Yc(){return tI}function Ma(e,t){var s,l,u,c;const n=Yc(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=Ir(e,t==null?void 0:t.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function nc(e,t){return Ma(e,{...t,weekStartsOn:1})}function jx(e,t){const n=Ir(e,t==null?void 0:t.in),r=n.getFullYear(),i=na(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=nc(i),o=na(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const s=nc(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ym(e){const t=Ir(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function zx(e,...t){const n=na.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function xm(e,t){const n=Ir(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function nI(e,t,n){const[r,i]=zx(n==null?void 0:n.in,e,t),a=xm(r),o=xm(i),s=+a-ym(a),l=+o-ym(o);return Math.round((s-l)/eI)}function rI(e,t){const n=jx(e,t),r=na(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),nc(r)}function iI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function aI(e){return!(!iI(e)&&typeof e!="number"||isNaN(+Ir(e)))}function oI(e,t){const n=Ir(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const sI={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},lI=(e,t,n)=>{let r;const i=sI[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function cr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const uI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fI={date:cr({formats:uI,defaultWidth:"full"}),time:cr({formats:cI,defaultWidth:"full"}),dateTime:cr({formats:dI,defaultWidth:"full"})},hI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gI=(e,t,n,r)=>hI[e];function Pt(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{const o=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const pI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},bI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},yI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},xI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},CI=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},EI={ordinalNumber:CI,era:Pt({values:pI,defaultWidth:"wide"}),quarter:Pt({values:mI,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pt({values:bI,defaultWidth:"wide"}),day:Pt({values:vI,defaultWidth:"wide"}),dayPeriod:Pt({values:yI,defaultWidth:"wide",formattingValues:xI,defaultFormattingWidth:"wide"})};function Ft(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?wI(s,p=>p.test(o)):SI(s,p=>p.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function SI(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function wI(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Kc(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const s=t.slice(i.length);return{value:o,rest:s}}}const _I=/^(\d+)(th|st|nd|rd)?/i,II=/\d+/i,DI={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},TI={any:[/^b/i,/^(a|c)/i]},AI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RI={any:[/1/i,/2/i,/3/i,/4/i]},BI={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},$I={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},kI={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},PI={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},FI={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},NI={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},MI={ordinalNumber:Kc({matchPattern:_I,parsePattern:II,valueCallback:e=>parseInt(e,10)}),era:Ft({matchPatterns:DI,defaultMatchWidth:"wide",parsePatterns:TI,defaultParseWidth:"any"}),quarter:Ft({matchPatterns:AI,defaultMatchWidth:"wide",parsePatterns:RI,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ft({matchPatterns:BI,defaultMatchWidth:"wide",parsePatterns:$I,defaultParseWidth:"any"}),day:Ft({matchPatterns:kI,defaultMatchWidth:"wide",parsePatterns:PI,defaultParseWidth:"any"}),dayPeriod:Ft({matchPatterns:FI,defaultMatchWidth:"any",parsePatterns:NI,defaultParseWidth:"any"})},mg={code:"en-US",formatDistance:lI,formatLong:fI,formatRelative:gI,localize:EI,match:MI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function OI(e,t){const n=Ir(e,t==null?void 0:t.in);return nI(n,oI(n))+1}function LI(e,t){const n=Ir(e,t==null?void 0:t.in),r=+nc(n)-+rI(n);return Math.round(r/Hx)+1}function Gx(e,t){var c,p,g,d;const n=Ir(e,t==null?void 0:t.in),r=n.getFullYear(),i=Yc(),a=(t==null?void 0:t.firstWeekContainsDate)??((p=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:p.firstWeekContainsDate)??i.firstWeekContainsDate??((d=(g=i.locale)==null?void 0:g.options)==null?void 0:d.firstWeekContainsDate)??1,o=na((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const s=Ma(o,t),l=na((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=Ma(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function VI(e,t){var s,l,u,c;const n=Yc(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=Gx(e,t),a=na((t==null?void 0:t.in)||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Ma(a,t)}function HI(e,t){const n=Ir(e,t==null?void 0:t.in),r=+Ma(n,t)-+VI(n,t);return Math.round(r/Hx)+1}function rt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $i={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return rt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):rt(n+1,2)},d(e,t){return rt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return rt(e.getHours()%12||12,t.length)},H(e,t){return rt(e.getHours(),t.length)},m(e,t){return rt(e.getMinutes(),t.length)},s(e,t){return rt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return rt(i,t.length)}},io={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Cm={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return $i.y(e,t)},Y:function(e,t,n,r){const i=Gx(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return rt(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):rt(a,t.length)},R:function(e,t){const n=jx(e);return rt(n,t.length)},u:function(e,t){const n=e.getFullYear();return rt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return rt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return rt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $i.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return rt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=HI(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):rt(i,t.length)},I:function(e,t,n){const r=LI(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):rt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$i.d(e,t)},D:function(e,t,n){const r=OI(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):rt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return rt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return rt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return rt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=io.noon:r===0?i=io.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=io.evening:r>=12?i=io.afternoon:r>=4?i=io.morning:i=io.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $i.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$i.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):rt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$i.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$i.s(e,t)},S:function(e,t){return $i.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Sm(r);case"XXXX":case"XX":return xa(r);case"XXXXX":case"XXX":default:return xa(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Sm(r);case"xxxx":case"xx":return xa(r);case"xxxxx":case"xxx":default:return xa(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Em(r,":");case"OOOO":default:return"GMT"+xa(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Em(r,":");case"zzzz":default:return"GMT"+xa(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return rt(r,t.length)},T:function(e,t,n){return rt(+e,t.length)}};function Em(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+rt(a,2)}function Sm(e,t){return e%60===0?(e>0?"-":"+")+rt(Math.abs(e)/60,2):xa(e,t)}function xa(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=rt(Math.trunc(r/60),2),a=rt(r%60,2);return n+i+t+a}const wm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Wx=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jI=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return wm(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",wm(r,t)).replace("{{time}}",Wx(i,t))},zI={p:Wx,P:jI},GI=/^D+$/,WI=/^Y+$/,UI=["D","DD","YY","YYYY"];function XI(e){return GI.test(e)}function YI(e){return WI.test(e)}function KI(e,t,n){const r=ZI(e,t,n);if(console.warn(r),UI.includes(e))throw new RangeError(r)}function ZI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,QI=/^'([^]*?)'?$/,e5=/''/g,t5=/[a-zA-Z]/;function Ls(e,t,n){var c,p,g,d,m,b,y,f;const r=Yc(),i=(n==null?void 0:n.locale)??r.locale??mg,a=(n==null?void 0:n.firstWeekContainsDate)??((p=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:p.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(g=r.locale)==null?void 0:g.options)==null?void 0:d.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((b=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:b.weekStartsOn)??r.weekStartsOn??((f=(y=r.locale)==null?void 0:y.options)==null?void 0:f.weekStartsOn)??0,s=Ir(e,n==null?void 0:n.in);if(!aI(s))throw new RangeError("Invalid time value");let l=t.match(JI).map(v=>{const C=v[0];if(C==="p"||C==="P"){const S=zI[C];return S(v,i.formatLong)}return v}).join("").match(qI).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const C=v[0];if(C==="'")return{isToken:!1,value:n5(v)};if(Cm[C])return{isToken:!0,value:v};if(C.match(t5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:v}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return l.map(v=>{if(!v.isToken)return v.value;const C=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&YI(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&XI(C))&&KI(C,t,String(e));const S=Cm[C[0]];return S(s,C,i.localize,u)}).join("")}function n5(e){const t=e.match(QI);return t?t[1].replace(e5,"'"):e}function r5(e,t,n){const[r,i]=zx(n==null?void 0:n.in,e,t);return+Ma(r,n)==+Ma(i,n)}const i5={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},a5=(e,t,n)=>{let r;const i=i5[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},o5={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},s5={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},l5={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u5={date:cr({formats:o5,defaultWidth:"full"}),time:cr({formats:s5,defaultWidth:"full"}),dateTime:cr({formats:l5,defaultWidth:"full"})},c5={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},d5=(e,t,n,r)=>c5[e],f5={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},h5={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},g5={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},p5={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},m5={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},b5={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},v5=(e,t)=>"ke-"+Number(e),y5={ordinalNumber:v5,era:Pt({values:f5,defaultWidth:"wide"}),quarter:Pt({values:h5,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pt({values:g5,defaultWidth:"wide"}),day:Pt({values:p5,defaultWidth:"wide"}),dayPeriod:Pt({values:m5,defaultWidth:"wide",formattingValues:b5,defaultFormattingWidth:"wide"})},x5=/^ke-(\d+)?/i,C5=/\d+/i,E5={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},S5={any:[/^s/i,/^(m|e)/i]},w5={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},_5={any:[/1/i,/2/i,/3/i,/4/i]},I5={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},D5={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},T5={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},A5={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},R5={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},B5={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},$5={ordinalNumber:Kc({matchPattern:x5,parsePattern:C5,valueCallback:e=>parseInt(e,10)}),era:Ft({matchPatterns:E5,defaultMatchWidth:"wide",parsePatterns:S5,defaultParseWidth:"any"}),quarter:Ft({matchPatterns:w5,defaultMatchWidth:"wide",parsePatterns:_5,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ft({matchPatterns:I5,defaultMatchWidth:"wide",parsePatterns:D5,defaultParseWidth:"any"}),day:Ft({matchPatterns:T5,defaultMatchWidth:"wide",parsePatterns:A5,defaultParseWidth:"any"}),dayPeriod:Ft({matchPatterns:R5,defaultMatchWidth:"any",parsePatterns:B5,defaultParseWidth:"any"})},rc={code:"id",formatDistance:a5,formatLong:u5,formatRelative:d5,localize:y5,match:$5,options:{weekStartsOn:1,firstWeekContainsDate:1}},k5={lessThanXSeconds:{one:"minder dan een seconde",other:"minder dan {{count}} seconden"},xSeconds:{one:"1 seconde",other:"{{count}} seconden"},halfAMinute:"een halve minuut",lessThanXMinutes:{one:"minder dan een minuut",other:"minder dan {{count}} minuten"},xMinutes:{one:"een minuut",other:"{{count}} minuten"},aboutXHours:{one:"ongeveer 1 uur",other:"ongeveer {{count}} uur"},xHours:{one:"1 uur",other:"{{count}} uur"},xDays:{one:"1 dag",other:"{{count}} dagen"},aboutXWeeks:{one:"ongeveer 1 week",other:"ongeveer {{count}} weken"},xWeeks:{one:"1 week",other:"{{count}} weken"},aboutXMonths:{one:"ongeveer 1 maand",other:"ongeveer {{count}} maanden"},xMonths:{one:"1 maand",other:"{{count}} maanden"},aboutXYears:{one:"ongeveer 1 jaar",other:"ongeveer {{count}} jaar"},xYears:{one:"1 jaar",other:"{{count}} jaar"},overXYears:{one:"meer dan 1 jaar",other:"meer dan {{count}} jaar"},almostXYears:{one:"bijna 1 jaar",other:"bijna {{count}} jaar"}},P5=(e,t,n)=>{let r;const i=k5[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"over "+r:r+" geleden":r},F5={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd-MM-y"},N5={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},M5={full:"{{date}} 'om' {{time}}",long:"{{date}} 'om' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},O5={date:cr({formats:F5,defaultWidth:"full"}),time:cr({formats:N5,defaultWidth:"full"}),dateTime:cr({formats:M5,defaultWidth:"full"})},L5={lastWeek:"'afgelopen' eeee 'om' p",yesterday:"'gisteren om' p",today:"'vandaag om' p",tomorrow:"'morgen om' p",nextWeek:"eeee 'om' p",other:"P"},V5=(e,t,n,r)=>L5[e],H5={narrow:["v.C.","n.C."],abbreviated:["v.Chr.","n.Chr."],wide:["voor Christus","na Christus"]},j5={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"]},z5={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},G5={narrow:["Z","M","D","W","D","V","Z"],short:["zo","ma","di","wo","do","vr","za"],abbreviated:["zon","maa","din","woe","don","vri","zat"],wide:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},W5={narrow:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},abbreviated:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"},wide:{am:"AM",pm:"PM",midnight:"middernacht",noon:"het middaguur",morning:"'s ochtends",afternoon:"'s middags",evening:"'s avonds",night:"'s nachts"}},U5=(e,t)=>Number(e)+"e",X5={ordinalNumber:U5,era:Pt({values:H5,defaultWidth:"wide"}),quarter:Pt({values:j5,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pt({values:z5,defaultWidth:"wide"}),day:Pt({values:G5,defaultWidth:"wide"}),dayPeriod:Pt({values:W5,defaultWidth:"wide"})},Y5=/^(\d+)e?/i,K5=/\d+/i,Z5={narrow:/^([vn]\.? ?C\.?)/,abbreviated:/^([vn]\. ?Chr\.?)/,wide:/^((voor|na) Christus)/},q5={any:[/^v/,/^n/]},J5={narrow:/^[1234]/i,abbreviated:/^K[1234]/i,wide:/^[1234]e kwartaal/i},Q5={any:[/1/i,/2/i,/3/i,/4/i]},eD={narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mrt.|apr.|mei|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i},tD={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^jan/i,/^feb/i,/^m(r|a)/i,/^apr/i,/^mei/i,/^jun/i,/^jul/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i]},nD={narrow:/^[zmdwv]/i,short:/^(zo|ma|di|wo|do|vr|za)/i,abbreviated:/^(zon|maa|din|woe|don|vri|zat)/i,wide:/^(zondag|maandag|dinsdag|woensdag|donderdag|vrijdag|zaterdag)/i},rD={narrow:[/^z/i,/^m/i,/^d/i,/^w/i,/^d/i,/^v/i,/^z/i],any:[/^zo/i,/^ma/i,/^di/i,/^wo/i,/^do/i,/^vr/i,/^za/i]},iD={any:/^(am|pm|middernacht|het middaguur|'s (ochtends|middags|avonds|nachts))/i},aD={any:{am:/^am/i,pm:/^pm/i,midnight:/^middernacht/i,noon:/^het middaguur/i,morning:/ochtend/i,afternoon:/middag/i,evening:/avond/i,night:/nacht/i}},oD={ordinalNumber:Kc({matchPattern:Y5,parsePattern:K5,valueCallback:e=>parseInt(e,10)}),era:Ft({matchPatterns:Z5,defaultMatchWidth:"wide",parsePatterns:q5,defaultParseWidth:"any"}),quarter:Ft({matchPatterns:J5,defaultMatchWidth:"wide",parsePatterns:Q5,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ft({matchPatterns:eD,defaultMatchWidth:"wide",parsePatterns:tD,defaultParseWidth:"any"}),day:Ft({matchPatterns:nD,defaultMatchWidth:"wide",parsePatterns:rD,defaultParseWidth:"any"}),dayPeriod:Ft({matchPatterns:iD,defaultMatchWidth:"any",parsePatterns:aD,defaultParseWidth:"any"})},Ux={code:"nl",formatDistance:P5,formatLong:O5,formatRelative:V5,localize:X5,match:oD,options:{weekStartsOn:1,firstWeekContainsDate:4}},sD={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},lD=(e,t,n)=>{let r;const i=sD[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},uD={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},cD={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},dD={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},fD={date:cr({formats:uD,defaultWidth:"full"}),time:cr({formats:cD,defaultWidth:"full"}),dateTime:cr({formats:dD,defaultWidth:"full"})};function _m(e,t,n){const r="eeee p";return r5(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const hD={lastWeek:_m,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:_m,other:"PP p"},gD=(e,t,n,r)=>{const i=hD[e];return typeof i=="function"?i(t,n,r):i},pD={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},mD={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},bD={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},vD={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},yD={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},xD={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},CD=(e,t)=>{const n=Number(e);switch(t==null?void 0:t.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},ED={ordinalNumber:CD,era:Pt({values:pD,defaultWidth:"wide"}),quarter:Pt({values:mD,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pt({values:bD,defaultWidth:"wide"}),day:Pt({values:vD,defaultWidth:"wide"}),dayPeriod:Pt({values:yD,defaultWidth:"wide",formattingValues:xD,defaultFormattingWidth:"wide"})},SD=/^(第\s*)?\d+(日|时|分|秒)?/i,wD=/\d+/i,_D={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},ID={any:[/^(前)/i,/^(公元)/i]},DD={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},TD={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},AD={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},RD={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},BD={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},$D={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},kD={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},PD={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},FD={ordinalNumber:Kc({matchPattern:SD,parsePattern:wD,valueCallback:e=>parseInt(e,10)}),era:Ft({matchPatterns:_D,defaultMatchWidth:"wide",parsePatterns:ID,defaultParseWidth:"any"}),quarter:Ft({matchPatterns:DD,defaultMatchWidth:"wide",parsePatterns:TD,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ft({matchPatterns:AD,defaultMatchWidth:"wide",parsePatterns:RD,defaultParseWidth:"any"}),day:Ft({matchPatterns:BD,defaultMatchWidth:"wide",parsePatterns:$D,defaultParseWidth:"any"}),dayPeriod:Ft({matchPatterns:kD,defaultMatchWidth:"any",parsePatterns:PD,defaultParseWidth:"any"})},Xx={code:"zh-CN",formatDistance:lD,formatLong:fD,formatRelative:gD,localize:ED,match:FD,options:{weekStartsOn:1,firstWeekContainsDate:4}};var ND=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,jd=Math.ceil,tr=Math.floor,Tn="[BigNumber Error] ",Im=Tn+"Number primitive has more than 15 significant digits: ",mr=1e14,Ne=14,zd=9007199254740991,Gd=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],ki=1e7,sn=1e9;function Yx(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,l=-7,u=21,c=-1e7,p=1e7,g=!1,d=1,m=0,b={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},y="0123456789abcdefghijklmnopqrstuvwxyz",f=!0;function v(h,w){var D,I,T,F,P,k,R,M,O=this;if(!(O instanceof v))return new v(h,w);if(w==null){if(h&&h._isBigNumber===!0){O.s=h.s,!h.c||h.e>p?O.c=O.e=null:h.e<c?O.c=[O.e=0]:(O.e=h.e,O.c=h.c.slice());return}if((k=typeof h=="number")&&h*0==0){if(O.s=1/h<0?(h=-h,-1):1,h===~~h){for(F=0,P=h;P>=10;P/=10,F++);F>p?O.c=O.e=null:(O.e=F,O.c=[h]);return}M=String(h)}else{if(!ND.test(M=String(h)))return r(O,M,k);O.s=M.charCodeAt(0)==45?(M=M.slice(1),-1):1}(F=M.indexOf("."))>-1&&(M=M.replace(".","")),(P=M.search(/e/i))>0?(F<0&&(F=P),F+=+M.slice(P+1),M=M.substring(0,P)):F<0&&(F=M.length)}else{if(vt(w,2,y.length,"Base"),w==10&&f)return O=new v(h),E(O,o+O.e+1,s);if(M=String(h),k=typeof h=="number"){if(h*0!=0)return r(O,M,k,w);if(O.s=1/h<0?(M=M.slice(1),-1):1,v.DEBUG&&M.replace(/^0\.0*|\./,"").length>15)throw Error(Im+h)}else O.s=M.charCodeAt(0)===45?(M=M.slice(1),-1):1;for(D=y.slice(0,w),F=P=0,R=M.length;P<R;P++)if(D.indexOf(I=M.charAt(P))<0){if(I=="."){if(P>F){F=R;continue}}else if(!T&&(M==M.toUpperCase()&&(M=M.toLowerCase())||M==M.toLowerCase()&&(M=M.toUpperCase()))){T=!0,P=-1,F=0;continue}return r(O,String(h),k,w)}k=!1,M=n(M,w,10,O.s),(F=M.indexOf("."))>-1?M=M.replace(".",""):F=M.length}for(P=0;M.charCodeAt(P)===48;P++);for(R=M.length;M.charCodeAt(--R)===48;);if(M=M.slice(P,++R)){if(R-=P,k&&v.DEBUG&&R>15&&(h>zd||h!==tr(h)))throw Error(Im+O.s*h);if((F=F-P-1)>p)O.c=O.e=null;else if(F<c)O.c=[O.e=0];else{if(O.e=F,O.c=[],P=(F+1)%Ne,F<0&&(P+=Ne),P<R){for(P&&O.c.push(+M.slice(0,P)),R-=Ne;P<R;)O.c.push(+M.slice(P,P+=Ne));P=Ne-(M=M.slice(P)).length}else P-=R;for(;P--;M+="0");O.c.push(+M)}}else O.c=[O.e=0]}v.clone=Yx,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(h){var w,D;if(h!=null)if(typeof h=="object"){if(h.hasOwnProperty(w="DECIMAL_PLACES")&&(D=h[w],vt(D,0,sn,w),o=D),h.hasOwnProperty(w="ROUNDING_MODE")&&(D=h[w],vt(D,0,8,w),s=D),h.hasOwnProperty(w="EXPONENTIAL_AT")&&(D=h[w],D&&D.pop?(vt(D[0],-sn,0,w),vt(D[1],0,sn,w),l=D[0],u=D[1]):(vt(D,-sn,sn,w),l=-(u=D<0?-D:D))),h.hasOwnProperty(w="RANGE"))if(D=h[w],D&&D.pop)vt(D[0],-sn,-1,w),vt(D[1],1,sn,w),c=D[0],p=D[1];else if(vt(D,-sn,sn,w),D)c=-(p=D<0?-D:D);else throw Error(Tn+w+" cannot be zero: "+D);if(h.hasOwnProperty(w="CRYPTO"))if(D=h[w],D===!!D)if(D)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))g=D;else throw g=!D,Error(Tn+"crypto unavailable");else g=D;else throw Error(Tn+w+" not true or false: "+D);if(h.hasOwnProperty(w="MODULO_MODE")&&(D=h[w],vt(D,0,9,w),d=D),h.hasOwnProperty(w="POW_PRECISION")&&(D=h[w],vt(D,0,sn,w),m=D),h.hasOwnProperty(w="FORMAT"))if(D=h[w],typeof D=="object")b=D;else throw Error(Tn+w+" not an object: "+D);if(h.hasOwnProperty(w="ALPHABET"))if(D=h[w],typeof D=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(D))f=D.slice(0,10)=="0123456789",y=D;else throw Error(Tn+w+" invalid: "+D)}else throw Error(Tn+"Object expected: "+h);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[l,u],RANGE:[c,p],CRYPTO:g,MODULO_MODE:d,POW_PRECISION:m,FORMAT:b,ALPHABET:y}},v.isBigNumber=function(h){if(!h||h._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var w,D,I=h.c,T=h.e,F=h.s;e:if({}.toString.call(I)=="[object Array]"){if((F===1||F===-1)&&T>=-sn&&T<=sn&&T===tr(T)){if(I[0]===0){if(T===0&&I.length===1)return!0;break e}if(w=(T+1)%Ne,w<1&&(w+=Ne),String(I[0]).length==w){for(w=0;w<I.length;w++)if(D=I[w],D<0||D>=mr||D!==tr(D))break e;if(D!==0)return!0}}}else if(I===null&&T===null&&(F===null||F===1||F===-1))return!0;throw Error(Tn+"Invalid BigNumber: "+h)},v.maximum=v.max=function(){return S(arguments,-1)},v.minimum=v.min=function(){return S(arguments,1)},v.random=function(){var h=9007199254740992,w=Math.random()*h&2097151?function(){return tr(Math.random()*h)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(D){var I,T,F,P,k,R=0,M=[],O=new v(a);if(D==null?D=o:vt(D,0,sn),P=jd(D/Ne),g)if(crypto.getRandomValues){for(I=crypto.getRandomValues(new Uint32Array(P*=2));R<P;)k=I[R]*131072+(I[R+1]>>>11),k>=9e15?(T=crypto.getRandomValues(new Uint32Array(2)),I[R]=T[0],I[R+1]=T[1]):(M.push(k%1e14),R+=2);R=P/2}else if(crypto.randomBytes){for(I=crypto.randomBytes(P*=7);R<P;)k=(I[R]&31)*281474976710656+I[R+1]*1099511627776+I[R+2]*4294967296+I[R+3]*16777216+(I[R+4]<<16)+(I[R+5]<<8)+I[R+6],k>=9e15?crypto.randomBytes(7).copy(I,R):(M.push(k%1e14),R+=7);R=P/7}else throw g=!1,Error(Tn+"crypto unavailable");if(!g)for(;R<P;)k=w(),k<9e15&&(M[R++]=k%1e14);for(P=M[--R],D%=Ne,P&&D&&(k=Gd[Ne-D],M[R]=tr(P/k)*k);M[R]===0;M.pop(),R--);if(R<0)M=[F=0];else{for(F=-1;M[0]===0;M.splice(0,1),F-=Ne);for(R=1,k=M[0];k>=10;k/=10,R++);R<Ne&&(F-=Ne-R)}return O.e=F,O.c=M,O}}(),v.sum=function(){for(var h=1,w=arguments,D=new v(w[0]);h<w.length;)D=D.plus(w[h++]);return D},n=function(){var h="0123456789";function w(D,I,T,F){for(var P,k=[0],R,M=0,O=D.length;M<O;){for(R=k.length;R--;k[R]*=I);for(k[0]+=F.indexOf(D.charAt(M++)),P=0;P<k.length;P++)k[P]>T-1&&(k[P+1]==null&&(k[P+1]=0),k[P+1]+=k[P]/T|0,k[P]%=T)}return k.reverse()}return function(D,I,T,F,P){var k,R,M,O,z,G,U,J,Q=D.indexOf("."),ee=o,q=s;for(Q>=0&&(O=m,m=0,D=D.replace(".",""),J=new v(I),G=J.pow(D.length-Q),m=O,J.c=w(ii(qn(G.c),G.e,"0"),10,T,h),J.e=J.c.length),U=w(D,I,T,P?(k=y,h):(k=h,y)),M=O=U.length;U[--O]==0;U.pop());if(!U[0])return k.charAt(0);if(Q<0?--M:(G.c=U,G.e=M,G.s=F,G=t(G,J,ee,q,T),U=G.c,z=G.r,M=G.e),R=M+ee+1,Q=U[R],O=T/2,z=z||R<0||U[R+1]!=null,z=q<4?(Q!=null||z)&&(q==0||q==(G.s<0?3:2)):Q>O||Q==O&&(q==4||z||q==6&&U[R-1]&1||q==(G.s<0?8:7)),R<1||!U[0])D=z?ii(k.charAt(1),-ee,k.charAt(0)):k.charAt(0);else{if(U.length=R,z)for(--T;++U[--R]>T;)U[R]=0,R||(++M,U=[1].concat(U));for(O=U.length;!U[--O];);for(Q=0,D="";Q<=O;D+=k.charAt(U[Q++]));D=ii(D,M,k.charAt(0))}return D}}(),t=function(){function h(I,T,F){var P,k,R,M,O=0,z=I.length,G=T%ki,U=T/ki|0;for(I=I.slice();z--;)R=I[z]%ki,M=I[z]/ki|0,P=U*R+M*G,k=G*R+P%ki*ki+O,O=(k/F|0)+(P/ki|0)+U*M,I[z]=k%F;return O&&(I=[O].concat(I)),I}function w(I,T,F,P){var k,R;if(F!=P)R=F>P?1:-1;else for(k=R=0;k<F;k++)if(I[k]!=T[k]){R=I[k]>T[k]?1:-1;break}return R}function D(I,T,F,P){for(var k=0;F--;)I[F]-=k,k=I[F]<T[F]?1:0,I[F]=k*P+I[F]-T[F];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,T,F,P,k){var R,M,O,z,G,U,J,Q,ee,q,Z,se,te,$,H,V,A,L=I.s==T.s?1:-1,K=I.c,X=T.c;if(!K||!K[0]||!X||!X[0])return new v(!I.s||!T.s||(K?X&&K[0]==X[0]:!X)?NaN:K&&K[0]==0||!X?L*0:L/0);for(Q=new v(L),ee=Q.c=[],M=I.e-T.e,L=F+M+1,k||(k=mr,M=nr(I.e/Ne)-nr(T.e/Ne),L=L/Ne|0),O=0;X[O]==(K[O]||0);O++);if(X[O]>(K[O]||0)&&M--,L<0)ee.push(1),z=!0;else{for($=K.length,V=X.length,O=0,L+=2,G=tr(k/(X[0]+1)),G>1&&(X=h(X,G,k),K=h(K,G,k),V=X.length,$=K.length),te=V,q=K.slice(0,V),Z=q.length;Z<V;q[Z++]=0);A=X.slice(),A=[0].concat(A),H=X[0],X[1]>=k/2&&H++;do{if(G=0,R=w(X,q,V,Z),R<0){if(se=q[0],V!=Z&&(se=se*k+(q[1]||0)),G=tr(se/H),G>1)for(G>=k&&(G=k-1),U=h(X,G,k),J=U.length,Z=q.length;w(U,q,J,Z)==1;)G--,D(U,V<J?A:X,J,k),J=U.length,R=1;else G==0&&(R=G=1),U=X.slice(),J=U.length;if(J<Z&&(U=[0].concat(U)),D(q,U,Z,k),Z=q.length,R==-1)for(;w(X,q,V,Z)<1;)G++,D(q,V<Z?A:X,Z,k),Z=q.length}else R===0&&(G++,q=[0]);ee[O++]=G,q[0]?q[Z++]=K[te]||0:(q=[K[te]],Z=1)}while((te++<$||q[0]!=null)&&L--);z=q[0]!=null,ee[0]||ee.splice(0,1)}if(k==mr){for(O=1,L=ee[0];L>=10;L/=10,O++);E(Q,F+(Q.e=O+M*Ne-1)+1,P,z)}else Q.e=M,Q.r=+z;return Q}}();function C(h,w,D,I){var T,F,P,k,R;if(D==null?D=s:vt(D,0,8),!h.c)return h.toString();if(T=h.c[0],P=h.e,w==null)R=qn(h.c),R=I==1||I==2&&(P<=l||P>=u)?Gl(R,P):ii(R,P,"0");else if(h=E(new v(h),w,D),F=h.e,R=qn(h.c),k=R.length,I==1||I==2&&(w<=F||F<=l)){for(;k<w;R+="0",k++);R=Gl(R,F)}else if(w-=P+(I===2&&F>P),R=ii(R,F,"0"),F+1>k){if(--w>0)for(R+=".";w--;R+="0");}else if(w+=F-k,w>0)for(F+1==k&&(R+=".");w--;R+="0");return h.s<0&&T?"-"+R:R}function S(h,w){for(var D,I,T=1,F=new v(h[0]);T<h.length;T++)I=new v(h[T]),(!I.s||(D=fa(F,I))===w||D===0&&F.s===w)&&(F=I);return F}function _(h,w,D){for(var I=1,T=w.length;!w[--T];w.pop());for(T=w[0];T>=10;T/=10,I++);return(D=I+D*Ne-1)>p?h.c=h.e=null:D<c?h.c=[h.e=0]:(h.e=D,h.c=w),h}r=function(){var h=/^(-?)0([xbo])(?=\w[\w.]*$)/i,w=/^([^.]+)\.$/,D=/^\.([^.]+)$/,I=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(F,P,k,R){var M,O=k?P:P.replace(T,"");if(I.test(O))F.s=isNaN(O)?null:O<0?-1:1;else{if(!k&&(O=O.replace(h,function(z,G,U){return M=(U=U.toLowerCase())=="x"?16:U=="b"?2:8,!R||R==M?G:z}),R&&(M=R,O=O.replace(w,"$1").replace(D,"0.$1")),P!=O))return new v(O,M);if(v.DEBUG)throw Error(Tn+"Not a"+(R?" base "+R:"")+" number: "+P);F.s=null}F.c=F.e=null}}();function E(h,w,D,I){var T,F,P,k,R,M,O,z=h.c,G=Gd;if(z){e:{for(T=1,k=z[0];k>=10;k/=10,T++);if(F=w-T,F<0)F+=Ne,P=w,R=z[M=0],O=tr(R/G[T-P-1]%10);else if(M=jd((F+1)/Ne),M>=z.length)if(I){for(;z.length<=M;z.push(0));R=O=0,T=1,F%=Ne,P=F-Ne+1}else break e;else{for(R=k=z[M],T=1;k>=10;k/=10,T++);F%=Ne,P=F-Ne+T,O=P<0?0:tr(R/G[T-P-1]%10)}if(I=I||w<0||z[M+1]!=null||(P<0?R:R%G[T-P-1]),I=D<4?(O||I)&&(D==0||D==(h.s<0?3:2)):O>5||O==5&&(D==4||I||D==6&&(F>0?P>0?R/G[T-P]:0:z[M-1])%10&1||D==(h.s<0?8:7)),w<1||!z[0])return z.length=0,I?(w-=h.e+1,z[0]=G[(Ne-w%Ne)%Ne],h.e=-w||0):z[0]=h.e=0,h;if(F==0?(z.length=M,k=1,M--):(z.length=M+1,k=G[Ne-F],z[M]=P>0?tr(R/G[T-P]%G[P])*k:0),I)for(;;)if(M==0){for(F=1,P=z[0];P>=10;P/=10,F++);for(P=z[0]+=k,k=1;P>=10;P/=10,k++);F!=k&&(h.e++,z[0]==mr&&(z[0]=1));break}else{if(z[M]+=k,z[M]!=mr)break;z[M--]=0,k=1}for(F=z.length;z[--F]===0;z.pop());}h.e>p?h.c=h.e=null:h.e<c&&(h.c=[h.e=0])}return h}function x(h){var w,D=h.e;return D===null?h.toString():(w=qn(h.c),w=D<=l||D>=u?Gl(w,D):ii(w,D,"0"),h.s<0?"-"+w:w)}return i.absoluteValue=i.abs=function(){var h=new v(this);return h.s<0&&(h.s=1),h},i.comparedTo=function(h,w){return fa(this,new v(h,w))},i.decimalPlaces=i.dp=function(h,w){var D,I,T,F=this;if(h!=null)return vt(h,0,sn),w==null?w=s:vt(w,0,8),E(new v(F),h+F.e+1,w);if(!(D=F.c))return null;if(I=((T=D.length-1)-nr(this.e/Ne))*Ne,T=D[T])for(;T%10==0;T/=10,I--);return I<0&&(I=0),I},i.dividedBy=i.div=function(h,w){return t(this,new v(h,w),o,s)},i.dividedToIntegerBy=i.idiv=function(h,w){return t(this,new v(h,w),0,1)},i.exponentiatedBy=i.pow=function(h,w){var D,I,T,F,P,k,R,M,O,z=this;if(h=new v(h),h.c&&!h.isInteger())throw Error(Tn+"Exponent not an integer: "+x(h));if(w!=null&&(w=new v(w)),k=h.e>14,!z.c||!z.c[0]||z.c[0]==1&&!z.e&&z.c.length==1||!h.c||!h.c[0])return O=new v(Math.pow(+x(z),k?h.s*(2-zl(h)):+x(h))),w?O.mod(w):O;if(R=h.s<0,w){if(w.c?!w.c[0]:!w.s)return new v(NaN);I=!R&&z.isInteger()&&w.isInteger(),I&&(z=z.mod(w))}else{if(h.e>9&&(z.e>0||z.e<-1||(z.e==0?z.c[0]>1||k&&z.c[1]>=24e7:z.c[0]<8e13||k&&z.c[0]<=9999975e7)))return F=z.s<0&&zl(h)?-0:0,z.e>-1&&(F=1/F),new v(R?1/F:F);m&&(F=jd(m/Ne+2))}for(k?(D=new v(.5),R&&(h.s=1),M=zl(h)):(T=Math.abs(+x(h)),M=T%2),O=new v(a);;){if(M){if(O=O.times(z),!O.c)break;F?O.c.length>F&&(O.c.length=F):I&&(O=O.mod(w))}if(T){if(T=tr(T/2),T===0)break;M=T%2}else if(h=h.times(D),E(h,h.e+1,1),h.e>14)M=zl(h);else{if(T=+x(h),T===0)break;M=T%2}z=z.times(z),F?z.c&&z.c.length>F&&(z.c.length=F):I&&(z=z.mod(w))}return I?O:(R&&(O=a.div(O)),w?O.mod(w):F?E(O,m,s,P):O)},i.integerValue=function(h){var w=new v(this);return h==null?h=s:vt(h,0,8),E(w,w.e+1,h)},i.isEqualTo=i.eq=function(h,w){return fa(this,new v(h,w))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(h,w){return fa(this,new v(h,w))>0},i.isGreaterThanOrEqualTo=i.gte=function(h,w){return(w=fa(this,new v(h,w)))===1||w===0},i.isInteger=function(){return!!this.c&&nr(this.e/Ne)>this.c.length-2},i.isLessThan=i.lt=function(h,w){return fa(this,new v(h,w))<0},i.isLessThanOrEqualTo=i.lte=function(h,w){return(w=fa(this,new v(h,w)))===-1||w===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(h,w){var D,I,T,F,P=this,k=P.s;if(h=new v(h,w),w=h.s,!k||!w)return new v(NaN);if(k!=w)return h.s=-w,P.plus(h);var R=P.e/Ne,M=h.e/Ne,O=P.c,z=h.c;if(!R||!M){if(!O||!z)return O?(h.s=-w,h):new v(z?P:NaN);if(!O[0]||!z[0])return z[0]?(h.s=-w,h):new v(O[0]?P:s==3?-0:0)}if(R=nr(R),M=nr(M),O=O.slice(),k=R-M){for((F=k<0)?(k=-k,T=O):(M=R,T=z),T.reverse(),w=k;w--;T.push(0));T.reverse()}else for(I=(F=(k=O.length)<(w=z.length))?k:w,k=w=0;w<I;w++)if(O[w]!=z[w]){F=O[w]<z[w];break}if(F&&(T=O,O=z,z=T,h.s=-h.s),w=(I=z.length)-(D=O.length),w>0)for(;w--;O[D++]=0);for(w=mr-1;I>k;){if(O[--I]<z[I]){for(D=I;D&&!O[--D];O[D]=w);--O[D],O[I]+=mr}O[I]-=z[I]}for(;O[0]==0;O.splice(0,1),--M);return O[0]?_(h,O,M):(h.s=s==3?-1:1,h.c=[h.e=0],h)},i.modulo=i.mod=function(h,w){var D,I,T=this;return h=new v(h,w),!T.c||!h.s||h.c&&!h.c[0]?new v(NaN):!h.c||T.c&&!T.c[0]?new v(T):(d==9?(I=h.s,h.s=1,D=t(T,h,0,3),h.s=I,D.s*=I):D=t(T,h,0,d),h=T.minus(D.times(h)),!h.c[0]&&d==1&&(h.s=T.s),h)},i.multipliedBy=i.times=function(h,w){var D,I,T,F,P,k,R,M,O,z,G,U,J,Q,ee,q=this,Z=q.c,se=(h=new v(h,w)).c;if(!Z||!se||!Z[0]||!se[0])return!q.s||!h.s||Z&&!Z[0]&&!se||se&&!se[0]&&!Z?h.c=h.e=h.s=null:(h.s*=q.s,!Z||!se?h.c=h.e=null:(h.c=[0],h.e=0)),h;for(I=nr(q.e/Ne)+nr(h.e/Ne),h.s*=q.s,R=Z.length,z=se.length,R<z&&(J=Z,Z=se,se=J,T=R,R=z,z=T),T=R+z,J=[];T--;J.push(0));for(Q=mr,ee=ki,T=z;--T>=0;){for(D=0,G=se[T]%ee,U=se[T]/ee|0,P=R,F=T+P;F>T;)M=Z[--P]%ee,O=Z[P]/ee|0,k=U*M+O*G,M=G*M+k%ee*ee+J[F]+D,D=(M/Q|0)+(k/ee|0)+U*O,J[F--]=M%Q;J[F]=D}return D?++I:J.splice(0,1),_(h,J,I)},i.negated=function(){var h=new v(this);return h.s=-h.s||null,h},i.plus=function(h,w){var D,I=this,T=I.s;if(h=new v(h,w),w=h.s,!T||!w)return new v(NaN);if(T!=w)return h.s=-w,I.minus(h);var F=I.e/Ne,P=h.e/Ne,k=I.c,R=h.c;if(!F||!P){if(!k||!R)return new v(T/0);if(!k[0]||!R[0])return R[0]?h:new v(k[0]?I:T*0)}if(F=nr(F),P=nr(P),k=k.slice(),T=F-P){for(T>0?(P=F,D=R):(T=-T,D=k),D.reverse();T--;D.push(0));D.reverse()}for(T=k.length,w=R.length,T-w<0&&(D=R,R=k,k=D,w=T),T=0;w;)T=(k[--w]=k[w]+R[w]+T)/mr|0,k[w]=mr===k[w]?0:k[w]%mr;return T&&(k=[T].concat(k),++P),_(h,k,P)},i.precision=i.sd=function(h,w){var D,I,T,F=this;if(h!=null&&h!==!!h)return vt(h,1,sn),w==null?w=s:vt(w,0,8),E(new v(F),h,w);if(!(D=F.c))return null;if(T=D.length-1,I=T*Ne+1,T=D[T]){for(;T%10==0;T/=10,I--);for(T=D[0];T>=10;T/=10,I++);}return h&&F.e+1>I&&(I=F.e+1),I},i.shiftedBy=function(h){return vt(h,-zd,zd),this.times("1e"+h)},i.squareRoot=i.sqrt=function(){var h,w,D,I,T,F=this,P=F.c,k=F.s,R=F.e,M=o+4,O=new v("0.5");if(k!==1||!P||!P[0])return new v(!k||k<0&&(!P||P[0])?NaN:P?F:1/0);if(k=Math.sqrt(+x(F)),k==0||k==1/0?(w=qn(P),(w.length+R)%2==0&&(w+="0"),k=Math.sqrt(+w),R=nr((R+1)/2)-(R<0||R%2),k==1/0?w="5e"+R:(w=k.toExponential(),w=w.slice(0,w.indexOf("e")+1)+R),D=new v(w)):D=new v(k+""),D.c[0]){for(R=D.e,k=R+M,k<3&&(k=0);;)if(T=D,D=O.times(T.plus(t(F,T,M,1))),qn(T.c).slice(0,k)===(w=qn(D.c)).slice(0,k))if(D.e<R&&--k,w=w.slice(k-3,k+1),w=="9999"||!I&&w=="4999"){if(!I&&(E(T,T.e+o+2,0),T.times(T).eq(F))){D=T;break}M+=4,k+=4,I=1}else{(!+w||!+w.slice(1)&&w.charAt(0)=="5")&&(E(D,D.e+o+2,1),h=!D.times(D).eq(F));break}}return E(D,D.e+o+1,s,h)},i.toExponential=function(h,w){return h!=null&&(vt(h,0,sn),h++),C(this,h,w,1)},i.toFixed=function(h,w){return h!=null&&(vt(h,0,sn),h=h+this.e+1),C(this,h,w)},i.toFormat=function(h,w,D){var I,T=this;if(D==null)h!=null&&w&&typeof w=="object"?(D=w,w=null):h&&typeof h=="object"?(D=h,h=w=null):D=b;else if(typeof D!="object")throw Error(Tn+"Argument not an object: "+D);if(I=T.toFixed(h,w),T.c){var F,P=I.split("."),k=+D.groupSize,R=+D.secondaryGroupSize,M=D.groupSeparator||"",O=P[0],z=P[1],G=T.s<0,U=G?O.slice(1):O,J=U.length;if(R&&(F=k,k=R,R=F,J-=F),k>0&&J>0){for(F=J%k||k,O=U.substr(0,F);F<J;F+=k)O+=M+U.substr(F,k);R>0&&(O+=M+U.slice(F)),G&&(O="-"+O)}I=z?O+(D.decimalSeparator||"")+((R=+D.fractionGroupSize)?z.replace(new RegExp("\\d{"+R+"}\\B","g"),"$&"+(D.fractionGroupSeparator||"")):z):O}return(D.prefix||"")+I+(D.suffix||"")},i.toFraction=function(h){var w,D,I,T,F,P,k,R,M,O,z,G,U=this,J=U.c;if(h!=null&&(k=new v(h),!k.isInteger()&&(k.c||k.s!==1)||k.lt(a)))throw Error(Tn+"Argument "+(k.isInteger()?"out of range: ":"not an integer: ")+x(k));if(!J)return new v(U);for(w=new v(a),M=D=new v(a),I=R=new v(a),G=qn(J),F=w.e=G.length-U.e-1,w.c[0]=Gd[(P=F%Ne)<0?Ne+P:P],h=!h||k.comparedTo(w)>0?F>0?w:M:k,P=p,p=1/0,k=new v(G),R.c[0]=0;O=t(k,w,0,1),T=D.plus(O.times(I)),T.comparedTo(h)!=1;)D=I,I=T,M=R.plus(O.times(T=M)),R=T,w=k.minus(O.times(T=w)),k=T;return T=t(h.minus(D),I,0,1),R=R.plus(T.times(M)),D=D.plus(T.times(I)),R.s=M.s=U.s,F=F*2,z=t(M,I,F,s).minus(U).abs().comparedTo(t(R,D,F,s).minus(U).abs())<1?[M,I]:[R,D],p=P,z},i.toNumber=function(){return+x(this)},i.toPrecision=function(h,w){return h!=null&&vt(h,1,sn),C(this,h,w,2)},i.toString=function(h){var w,D=this,I=D.s,T=D.e;return T===null?I?(w="Infinity",I<0&&(w="-"+w)):w="NaN":(h==null?w=T<=l||T>=u?Gl(qn(D.c),T):ii(qn(D.c),T,"0"):h===10&&f?(D=E(new v(D),o+T+1,s),w=ii(qn(D.c),D.e,"0")):(vt(h,2,y.length,"Base"),w=n(ii(qn(D.c),T,"0"),10,h,I,!0)),I<0&&D.c[0]&&(w="-"+w)),w},i.valueOf=i.toJSON=function(){return x(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,e!=null&&v.set(e),v}function nr(e){var t=e|0;return e>0||e===t?t:t-1}function qn(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=Ne-t.length;n--;t="0"+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function fa(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=l==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(s=(l=i.length)<(u=a.length)?l:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return l==u?0:l>u^n?1:-1}function vt(e,t,n,r){if(e<t||e>n||e!==tr(e))throw Error(Tn+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function zl(e){var t=e.c.length-1;return nr(e.e/Ne)==t&&e.c[t]%2!=0}function Gl(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ii(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Zc=Yx();const Kx={ROUNDING_MODE:Zc.ROUND_HALF_UP,EXPONENTIAL_AT:[-1e9,1e9]};let t0=!1;const MD=(e=Kx)=>{t0||(Zc.config(e),t0=!0)},bt=(e,t)=>(t0||MD(),new Zc(e,t));var OD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function LD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function VD(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Wd,Dm;function je(){return Dm||(Dm=1,Wd={options:{usePureJavaScript:!1}}),Wd}var Ud={exports:{}},Xd,Tm;function HD(){if(Tm)return Xd;Tm=1;var e={};Xd=e;var t={};e.encode=function(r,i,a){if(typeof i!="string")throw new TypeError('"alphabet" must be a string.');if(a!==void 0&&typeof a!="number")throw new TypeError('"maxline" must be a number.');var o="";if(!(r instanceof Uint8Array))o=n(r,i);else{var s=0,l=i.length,u=i.charAt(0),c=[0];for(s=0;s<r.length;++s){for(var p=0,g=r[s];p<c.length;++p)g+=c[p]<<8,c[p]=g%l,g=g/l|0;for(;g>0;)c.push(g%l),g=g/l|0}for(s=0;r[s]===0&&s<r.length-1;++s)o+=u;for(s=c.length-1;s>=0;--s)o+=i[c[s]]}if(a){var d=new RegExp(".{1,"+a+"}","g");o=o.match(d).join(`\r
|
|
2
|
-
`)}return o},e.decode=function(r,i){if(typeof r!="string")throw new TypeError('"input" must be a string.');if(typeof i!="string")throw new TypeError('"alphabet" must be a string.');var a=t[i];if(!a){a=t[i]=[];for(var o=0;o<i.length;++o)a[i.charCodeAt(o)]=o}r=r.replace(/\s/g,"");for(var s=i.length,l=i.charAt(0),u=[0],o=0;o<r.length;o++){var c=a[r.charCodeAt(o)];if(c===void 0)return;for(var p=0,g=c;p<u.length;++p)g+=u[p]*s,u[p]=g&255,g>>=8;for(;g>0;)u.push(g&255),g>>=8}for(var d=0;r[d]===l&&d<r.length-1;++d)u.push(0);return typeof Buffer<"u"?Buffer.from(u.reverse()):new Uint8Array(u.reverse())};function n(r,i){var a=0,o=i.length,s=i.charAt(0),l=[0];for(a=0;a<r.length();++a){for(var u=0,c=r.at(a);u<l.length;++u)c+=l[u]<<8,l[u]=c%o,c=c/o|0;for(;c>0;)l.push(c%o),c=c/o|0}var p="";for(a=0;r.at(a)===0&&a<r.length()-1;++a)p+=s;for(a=l.length-1;a>=0;--a)p+=i[l[a]];return p}return Xd}var Am;function Xe(){if(Am)return Ud.exports;Am=1;var e=je(),t=HD(),n=Ud.exports=e.util=e.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){n.nextTick=process.nextTick,typeof setImmediate=="function"?n.setImmediate=setImmediate:n.setImmediate=n.nextTick;return}if(typeof setImmediate=="function"){n.setImmediate=function(){return setImmediate.apply(void 0,arguments)},n.nextTick=function(x){return setImmediate(x)};return}if(n.setImmediate=function(x){setTimeout(x,0)},typeof window<"u"&&typeof window.postMessage=="function"){let x=function(h){if(h.source===window&&h.data===f){h.stopPropagation();var w=v.slice();v.length=0,w.forEach(function(D){D()})}};var f="forge.setImmediate",v=[];n.setImmediate=function(h){v.push(h),v.length===1&&window.postMessage(f,"*")},window.addEventListener("message",x,!0)}if(typeof MutationObserver<"u"){var C=Date.now(),S=!0,_=document.createElement("div"),v=[];new MutationObserver(function(){var h=v.slice();v.length=0,h.forEach(function(w){w()})}).observe(_,{attributes:!0});var E=n.setImmediate;n.setImmediate=function(h){Date.now()-C>15?(C=Date.now(),E(h)):(v.push(h),v.length===1&&_.setAttribute("a",S=!S))}}n.nextTick=n.setImmediate})(),n.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,n.globalScope=function(){return n.isNodejs?OD:typeof self>"u"?window:self}(),n.isArray=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},n.isArrayBuffer=function(f){return typeof ArrayBuffer<"u"&&f instanceof ArrayBuffer},n.isArrayBufferView=function(f){return f&&n.isArrayBuffer(f.buffer)&&f.byteLength!==void 0};function r(f){if(!(f===8||f===16||f===24||f===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+f)}n.ByteBuffer=i;function i(f){if(this.data="",this.read=0,typeof f=="string")this.data=f;else if(n.isArrayBuffer(f)||n.isArrayBufferView(f))if(typeof Buffer<"u"&&f instanceof Buffer)this.data=f.toString("binary");else{var v=new Uint8Array(f);try{this.data=String.fromCharCode.apply(null,v)}catch{for(var C=0;C<v.length;++C)this.putByte(v[C])}}else(f instanceof i||typeof f=="object"&&typeof f.data=="string"&&typeof f.read=="number")&&(this.data=f.data,this.read=f.read);this._constructedStringLength=0}n.ByteStringBuffer=i;var a=4096;n.ByteStringBuffer.prototype._optimizeConstructedString=function(f){this._constructedStringLength+=f,this._constructedStringLength>a&&(this.data.substr(0,1),this._constructedStringLength=0)},n.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},n.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},n.ByteStringBuffer.prototype.putByte=function(f){return this.putBytes(String.fromCharCode(f))},n.ByteStringBuffer.prototype.fillWithByte=function(f,v){f=String.fromCharCode(f);for(var C=this.data;v>0;)v&1&&(C+=f),v>>>=1,v>0&&(f+=f);return this.data=C,this._optimizeConstructedString(v),this},n.ByteStringBuffer.prototype.putBytes=function(f){return this.data+=f,this._optimizeConstructedString(f.length),this},n.ByteStringBuffer.prototype.putString=function(f){return this.putBytes(n.encodeUtf8(f))},n.ByteStringBuffer.prototype.putInt16=function(f){return this.putBytes(String.fromCharCode(f>>8&255)+String.fromCharCode(f&255))},n.ByteStringBuffer.prototype.putInt24=function(f){return this.putBytes(String.fromCharCode(f>>16&255)+String.fromCharCode(f>>8&255)+String.fromCharCode(f&255))},n.ByteStringBuffer.prototype.putInt32=function(f){return this.putBytes(String.fromCharCode(f>>24&255)+String.fromCharCode(f>>16&255)+String.fromCharCode(f>>8&255)+String.fromCharCode(f&255))},n.ByteStringBuffer.prototype.putInt16Le=function(f){return this.putBytes(String.fromCharCode(f&255)+String.fromCharCode(f>>8&255))},n.ByteStringBuffer.prototype.putInt24Le=function(f){return this.putBytes(String.fromCharCode(f&255)+String.fromCharCode(f>>8&255)+String.fromCharCode(f>>16&255))},n.ByteStringBuffer.prototype.putInt32Le=function(f){return this.putBytes(String.fromCharCode(f&255)+String.fromCharCode(f>>8&255)+String.fromCharCode(f>>16&255)+String.fromCharCode(f>>24&255))},n.ByteStringBuffer.prototype.putInt=function(f,v){r(v);var C="";do v-=8,C+=String.fromCharCode(f>>v&255);while(v>0);return this.putBytes(C)},n.ByteStringBuffer.prototype.putSignedInt=function(f,v){return f<0&&(f+=2<<v-1),this.putInt(f,v)},n.ByteStringBuffer.prototype.putBuffer=function(f){return this.putBytes(f.getBytes())},n.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},n.ByteStringBuffer.prototype.getInt16=function(){var f=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,f},n.ByteStringBuffer.prototype.getInt24=function(){var f=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,f},n.ByteStringBuffer.prototype.getInt32=function(){var f=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,f},n.ByteStringBuffer.prototype.getInt16Le=function(){var f=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,f},n.ByteStringBuffer.prototype.getInt24Le=function(){var f=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,f},n.ByteStringBuffer.prototype.getInt32Le=function(){var f=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,f},n.ByteStringBuffer.prototype.getInt=function(f){r(f);var v=0;do v=(v<<8)+this.data.charCodeAt(this.read++),f-=8;while(f>0);return v},n.ByteStringBuffer.prototype.getSignedInt=function(f){var v=this.getInt(f),C=2<<f-2;return v>=C&&(v-=C<<1),v},n.ByteStringBuffer.prototype.getBytes=function(f){var v;return f?(f=Math.min(this.length(),f),v=this.data.slice(this.read,this.read+f),this.read+=f):f===0?v="":(v=this.read===0?this.data:this.data.slice(this.read),this.clear()),v},n.ByteStringBuffer.prototype.bytes=function(f){return typeof f>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+f)},n.ByteStringBuffer.prototype.at=function(f){return this.data.charCodeAt(this.read+f)},n.ByteStringBuffer.prototype.setAt=function(f,v){return this.data=this.data.substr(0,this.read+f)+String.fromCharCode(v)+this.data.substr(this.read+f+1),this},n.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},n.ByteStringBuffer.prototype.copy=function(){var f=n.createBuffer(this.data);return f.read=this.read,f},n.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},n.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},n.ByteStringBuffer.prototype.truncate=function(f){var v=Math.max(0,this.length()-f);return this.data=this.data.substr(this.read,v),this.read=0,this},n.ByteStringBuffer.prototype.toHex=function(){for(var f="",v=this.read;v<this.data.length;++v){var C=this.data.charCodeAt(v);C<16&&(f+="0"),f+=C.toString(16)}return f},n.ByteStringBuffer.prototype.toString=function(){return n.decodeUtf8(this.bytes())};function o(f,v){v=v||{},this.read=v.readOffset||0,this.growSize=v.growSize||1024;var C=n.isArrayBuffer(f),S=n.isArrayBufferView(f);if(C||S){C?this.data=new DataView(f):this.data=new DataView(f.buffer,f.byteOffset,f.byteLength),this.write="writeOffset"in v?v.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,f!=null&&this.putBytes(f),"writeOffset"in v&&(this.write=v.writeOffset)}n.DataBuffer=o,n.DataBuffer.prototype.length=function(){return this.write-this.read},n.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},n.DataBuffer.prototype.accommodate=function(f,v){if(this.length()>=f)return this;v=Math.max(v||this.growSize,f);var C=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),S=new Uint8Array(this.length()+v);return S.set(C),this.data=new DataView(S.buffer),this},n.DataBuffer.prototype.putByte=function(f){return this.accommodate(1),this.data.setUint8(this.write++,f),this},n.DataBuffer.prototype.fillWithByte=function(f,v){this.accommodate(v);for(var C=0;C<v;++C)this.data.setUint8(f);return this},n.DataBuffer.prototype.putBytes=function(f,v){if(n.isArrayBufferView(f)){var C=new Uint8Array(f.buffer,f.byteOffset,f.byteLength),S=C.byteLength-C.byteOffset;this.accommodate(S);var _=new Uint8Array(this.data.buffer,this.write);return _.set(C),this.write+=S,this}if(n.isArrayBuffer(f)){var C=new Uint8Array(f);this.accommodate(C.byteLength);var _=new Uint8Array(this.data.buffer);return _.set(C,this.write),this.write+=C.byteLength,this}if(f instanceof n.DataBuffer||typeof f=="object"&&typeof f.read=="number"&&typeof f.write=="number"&&n.isArrayBufferView(f.data)){var C=new Uint8Array(f.data.byteLength,f.read,f.length());this.accommodate(C.byteLength);var _=new Uint8Array(f.data.byteLength,this.write);return _.set(C),this.write+=C.byteLength,this}if(f instanceof n.ByteStringBuffer&&(f=f.data,v="binary"),v=v||"binary",typeof f=="string"){var E;if(v==="hex")return this.accommodate(Math.ceil(f.length/2)),E=new Uint8Array(this.data.buffer,this.write),this.write+=n.binary.hex.decode(f,E,this.write),this;if(v==="base64")return this.accommodate(Math.ceil(f.length/4)*3),E=new Uint8Array(this.data.buffer,this.write),this.write+=n.binary.base64.decode(f,E,this.write),this;if(v==="utf8"&&(f=n.encodeUtf8(f),v="binary"),v==="binary"||v==="raw")return this.accommodate(f.length),E=new Uint8Array(this.data.buffer,this.write),this.write+=n.binary.raw.decode(E),this;if(v==="utf16")return this.accommodate(f.length*2),E=new Uint16Array(this.data.buffer,this.write),this.write+=n.text.utf16.encode(E),this;throw new Error("Invalid encoding: "+v)}throw Error("Invalid parameter: "+f)},n.DataBuffer.prototype.putBuffer=function(f){return this.putBytes(f),f.clear(),this},n.DataBuffer.prototype.putString=function(f){return this.putBytes(f,"utf16")},n.DataBuffer.prototype.putInt16=function(f){return this.accommodate(2),this.data.setInt16(this.write,f),this.write+=2,this},n.DataBuffer.prototype.putInt24=function(f){return this.accommodate(3),this.data.setInt16(this.write,f>>8&65535),this.data.setInt8(this.write,f>>16&255),this.write+=3,this},n.DataBuffer.prototype.putInt32=function(f){return this.accommodate(4),this.data.setInt32(this.write,f),this.write+=4,this},n.DataBuffer.prototype.putInt16Le=function(f){return this.accommodate(2),this.data.setInt16(this.write,f,!0),this.write+=2,this},n.DataBuffer.prototype.putInt24Le=function(f){return this.accommodate(3),this.data.setInt8(this.write,f>>16&255),this.data.setInt16(this.write,f>>8&65535,!0),this.write+=3,this},n.DataBuffer.prototype.putInt32Le=function(f){return this.accommodate(4),this.data.setInt32(this.write,f,!0),this.write+=4,this},n.DataBuffer.prototype.putInt=function(f,v){r(v),this.accommodate(v/8);do v-=8,this.data.setInt8(this.write++,f>>v&255);while(v>0);return this},n.DataBuffer.prototype.putSignedInt=function(f,v){return r(v),this.accommodate(v/8),f<0&&(f+=2<<v-1),this.putInt(f,v)},n.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},n.DataBuffer.prototype.getInt16=function(){var f=this.data.getInt16(this.read);return this.read+=2,f},n.DataBuffer.prototype.getInt24=function(){var f=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,f},n.DataBuffer.prototype.getInt32=function(){var f=this.data.getInt32(this.read);return this.read+=4,f},n.DataBuffer.prototype.getInt16Le=function(){var f=this.data.getInt16(this.read,!0);return this.read+=2,f},n.DataBuffer.prototype.getInt24Le=function(){var f=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,f},n.DataBuffer.prototype.getInt32Le=function(){var f=this.data.getInt32(this.read,!0);return this.read+=4,f},n.DataBuffer.prototype.getInt=function(f){r(f);var v=0;do v=(v<<8)+this.data.getInt8(this.read++),f-=8;while(f>0);return v},n.DataBuffer.prototype.getSignedInt=function(f){var v=this.getInt(f),C=2<<f-2;return v>=C&&(v-=C<<1),v},n.DataBuffer.prototype.getBytes=function(f){var v;return f?(f=Math.min(this.length(),f),v=this.data.slice(this.read,this.read+f),this.read+=f):f===0?v="":(v=this.read===0?this.data:this.data.slice(this.read),this.clear()),v},n.DataBuffer.prototype.bytes=function(f){return typeof f>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+f)},n.DataBuffer.prototype.at=function(f){return this.data.getUint8(this.read+f)},n.DataBuffer.prototype.setAt=function(f,v){return this.data.setUint8(f,v),this},n.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},n.DataBuffer.prototype.copy=function(){return new n.DataBuffer(this)},n.DataBuffer.prototype.compact=function(){if(this.read>0){var f=new Uint8Array(this.data.buffer,this.read),v=new Uint8Array(f.byteLength);v.set(f),this.data=new DataView(v),this.write-=this.read,this.read=0}return this},n.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},n.DataBuffer.prototype.truncate=function(f){return this.write=Math.max(0,this.length()-f),this.read=Math.min(this.read,this.write),this},n.DataBuffer.prototype.toHex=function(){for(var f="",v=this.read;v<this.data.byteLength;++v){var C=this.data.getUint8(v);C<16&&(f+="0"),f+=C.toString(16)}return f},n.DataBuffer.prototype.toString=function(f){var v=new Uint8Array(this.data,this.read,this.length());if(f=f||"utf8",f==="binary"||f==="raw")return n.binary.raw.encode(v);if(f==="hex")return n.binary.hex.encode(v);if(f==="base64")return n.binary.base64.encode(v);if(f==="utf8")return n.text.utf8.decode(v);if(f==="utf16")return n.text.utf16.decode(v);throw new Error("Invalid encoding: "+f)},n.createBuffer=function(f,v){return v=v||"raw",f!==void 0&&v==="utf8"&&(f=n.encodeUtf8(f)),new n.ByteBuffer(f)},n.fillString=function(f,v){for(var C="";v>0;)v&1&&(C+=f),v>>>=1,v>0&&(f+=f);return C},n.xorBytes=function(f,v,C){for(var S="",_="",E="",x=0,h=0;C>0;--C,++x)_=f.charCodeAt(x)^v.charCodeAt(x),h>=10&&(S+=E,E="",h=0),E+=String.fromCharCode(_),++h;return S+=E,S},n.hexToBytes=function(f){var v="",C=0;for(f.length&!0&&(C=1,v+=String.fromCharCode(parseInt(f[0],16)));C<f.length;C+=2)v+=String.fromCharCode(parseInt(f.substr(C,2),16));return v},n.bytesToHex=function(f){return n.createBuffer(f).toHex()},n.int32ToBytes=function(f){return String.fromCharCode(f>>24&255)+String.fromCharCode(f>>16&255)+String.fromCharCode(f>>8&255)+String.fromCharCode(f&255)};var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],u="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";n.encode64=function(f,v){for(var C="",S="",_,E,x,h=0;h<f.length;)_=f.charCodeAt(h++),E=f.charCodeAt(h++),x=f.charCodeAt(h++),C+=s.charAt(_>>2),C+=s.charAt((_&3)<<4|E>>4),isNaN(E)?C+="==":(C+=s.charAt((E&15)<<2|x>>6),C+=isNaN(x)?"=":s.charAt(x&63)),v&&C.length>v&&(S+=C.substr(0,v)+`\r
|
|
3
|
-
`,C=C.substr(v));return S+=C,S},n.decode64=function(f){f=f.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var v="",C,S,_,E,x=0;x<f.length;)C=l[f.charCodeAt(x++)-43],S=l[f.charCodeAt(x++)-43],_=l[f.charCodeAt(x++)-43],E=l[f.charCodeAt(x++)-43],v+=String.fromCharCode(C<<2|S>>4),_!==64&&(v+=String.fromCharCode((S&15)<<4|_>>2),E!==64&&(v+=String.fromCharCode((_&3)<<6|E)));return v},n.encodeUtf8=function(f){return unescape(encodeURIComponent(f))},n.decodeUtf8=function(f){return decodeURIComponent(escape(f))},n.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:t.encode,decode:t.decode}},n.binary.raw.encode=function(f){return String.fromCharCode.apply(null,f)},n.binary.raw.decode=function(f,v,C){var S=v;S||(S=new Uint8Array(f.length)),C=C||0;for(var _=C,E=0;E<f.length;++E)S[_++]=f.charCodeAt(E);return v?_-C:S},n.binary.hex.encode=n.bytesToHex,n.binary.hex.decode=function(f,v,C){var S=v;S||(S=new Uint8Array(Math.ceil(f.length/2))),C=C||0;var _=0,E=C;for(f.length&1&&(_=1,S[E++]=parseInt(f[0],16));_<f.length;_+=2)S[E++]=parseInt(f.substr(_,2),16);return v?E-C:S},n.binary.base64.encode=function(f,v){for(var C="",S="",_,E,x,h=0;h<f.byteLength;)_=f[h++],E=f[h++],x=f[h++],C+=s.charAt(_>>2),C+=s.charAt((_&3)<<4|E>>4),isNaN(E)?C+="==":(C+=s.charAt((E&15)<<2|x>>6),C+=isNaN(x)?"=":s.charAt(x&63)),v&&C.length>v&&(S+=C.substr(0,v)+`\r
|
|
4
|
-
`,C=C.substr(v));return S+=C,S},n.binary.base64.decode=function(f,v,C){var S=v;S||(S=new Uint8Array(Math.ceil(f.length/4)*3)),f=f.replace(/[^A-Za-z0-9\+\/\=]/g,""),C=C||0;for(var _,E,x,h,w=0,D=C;w<f.length;)_=l[f.charCodeAt(w++)-43],E=l[f.charCodeAt(w++)-43],x=l[f.charCodeAt(w++)-43],h=l[f.charCodeAt(w++)-43],S[D++]=_<<2|E>>4,x!==64&&(S[D++]=(E&15)<<4|x>>2,h!==64&&(S[D++]=(x&3)<<6|h));return v?D-C:S.subarray(0,D)},n.binary.base58.encode=function(f,v){return n.binary.baseN.encode(f,u,v)},n.binary.base58.decode=function(f,v){return n.binary.baseN.decode(f,u,v)},n.text={utf8:{},utf16:{}},n.text.utf8.encode=function(f,v,C){f=n.encodeUtf8(f);var S=v;S||(S=new Uint8Array(f.length)),C=C||0;for(var _=C,E=0;E<f.length;++E)S[_++]=f.charCodeAt(E);return v?_-C:S},n.text.utf8.decode=function(f){return n.decodeUtf8(String.fromCharCode.apply(null,f))},n.text.utf16.encode=function(f,v,C){var S=v;S||(S=new Uint8Array(f.length*2));var _=new Uint16Array(S.buffer);C=C||0;for(var E=C,x=C,h=0;h<f.length;++h)_[x++]=f.charCodeAt(h),E+=2;return v?E-C:S},n.text.utf16.decode=function(f){return String.fromCharCode.apply(null,new Uint16Array(f.buffer))},n.deflate=function(f,v,C){if(v=n.decode64(f.deflate(n.encode64(v)).rval),C){var S=2,_=v.charCodeAt(1);_&32&&(S=6),v=v.substring(S,v.length-4)}return v},n.inflate=function(f,v,C){var S=f.inflate(n.encode64(v)).rval;return S===null?null:n.decode64(S)};var c=function(f,v,C){if(!f)throw new Error("WebStorage not available.");var S;if(C===null?S=f.removeItem(v):(C=n.encode64(JSON.stringify(C)),S=f.setItem(v,C)),typeof S<"u"&&S.rval!==!0){var _=new Error(S.error.message);throw _.id=S.error.id,_.name=S.error.name,_}},p=function(f,v){if(!f)throw new Error("WebStorage not available.");var C=f.getItem(v);if(f.init)if(C.rval===null){if(C.error){var S=new Error(C.error.message);throw S.id=C.error.id,S.name=C.error.name,S}C=null}else C=C.rval;return C!==null&&(C=JSON.parse(n.decode64(C))),C},g=function(f,v,C,S){var _=p(f,v);_===null&&(_={}),_[C]=S,c(f,v,_)},d=function(f,v,C){var S=p(f,v);return S!==null&&(S=C in S?S[C]:null),S},m=function(f,v,C){var S=p(f,v);if(S!==null&&C in S){delete S[C];var _=!0;for(var E in S){_=!1;break}_&&(S=null),c(f,v,S)}},b=function(f,v){c(f,v,null)},y=function(f,v,C){var S=null;typeof C>"u"&&(C=["web","flash"]);var _,E=!1,x=null;for(var h in C){_=C[h];try{if(_==="flash"||_==="both"){if(v[0]===null)throw new Error("Flash local storage not available.");S=f.apply(this,v),E=_==="flash"}(_==="web"||_==="both")&&(v[0]=localStorage,S=f.apply(this,v),E=!0)}catch(w){x=w}if(E)break}if(!E)throw x;return S};return n.setItem=function(f,v,C,S,_){y(g,arguments,_)},n.getItem=function(f,v,C,S){return y(d,arguments,S)},n.removeItem=function(f,v,C,S){y(m,arguments,S)},n.clearItems=function(f,v,C){y(b,arguments,C)},n.isEmpty=function(f){for(var v in f)if(f.hasOwnProperty(v))return!1;return!0},n.format=function(f){for(var v=/%./g,C,S,_=0,E=[],x=0;C=v.exec(f);){S=f.substring(x,v.lastIndex-2),S.length>0&&E.push(S),x=v.lastIndex;var h=C[0][1];switch(h){case"s":case"o":_<arguments.length?E.push(arguments[_+++1]):E.push("<?>");break;case"%":E.push("%");break;default:E.push("<%"+h+"?>")}}return E.push(f.substring(x)),E.join("")},n.formatNumber=function(f,v,C,S){var _=f,E=isNaN(v=Math.abs(v))?2:v,x=C===void 0?",":C,h=S===void 0?".":S,w=_<0?"-":"",D=parseInt(_=Math.abs(+_||0).toFixed(E),10)+"",I=D.length>3?D.length%3:0;return w+(I?D.substr(0,I)+h:"")+D.substr(I).replace(/(\d{3})(?=\d)/g,"$1"+h)+(E?x+Math.abs(_-D).toFixed(E).slice(2):"")},n.formatSize=function(f){return f>=1073741824?f=n.formatNumber(f/1073741824,2,".","")+" GiB":f>=1048576?f=n.formatNumber(f/1048576,2,".","")+" MiB":f>=1024?f=n.formatNumber(f/1024,0)+" KiB":f=n.formatNumber(f,0)+" bytes",f},n.bytesFromIP=function(f){return f.indexOf(".")!==-1?n.bytesFromIPv4(f):f.indexOf(":")!==-1?n.bytesFromIPv6(f):null},n.bytesFromIPv4=function(f){if(f=f.split("."),f.length!==4)return null;for(var v=n.createBuffer(),C=0;C<f.length;++C){var S=parseInt(f[C],10);if(isNaN(S))return null;v.putByte(S)}return v.getBytes()},n.bytesFromIPv6=function(f){var v=0;f=f.split(":").filter(function(x){return x.length===0&&++v,!0});for(var C=(8-f.length+v)*2,S=n.createBuffer(),_=0;_<8;++_){if(!f[_]||f[_].length===0){S.fillWithByte(0,C),C=0;continue}var E=n.hexToBytes(f[_]);E.length<2&&S.putByte(0),S.putBytes(E)}return S.getBytes()},n.bytesToIP=function(f){return f.length===4?n.bytesToIPv4(f):f.length===16?n.bytesToIPv6(f):null},n.bytesToIPv4=function(f){if(f.length!==4)return null;for(var v=[],C=0;C<f.length;++C)v.push(f.charCodeAt(C));return v.join(".")},n.bytesToIPv6=function(f){if(f.length!==16)return null;for(var v=[],C=[],S=0,_=0;_<f.length;_+=2){for(var E=n.bytesToHex(f[_]+f[_+1]);E[0]==="0"&&E!=="0";)E=E.substr(1);if(E==="0"){var x=C[C.length-1],h=v.length;!x||h!==x.end+1?C.push({start:h,end:h}):(x.end=h,x.end-x.start>C[S].end-C[S].start&&(S=C.length-1))}v.push(E)}if(C.length>0){var w=C[S];w.end-w.start>0&&(v.splice(w.start,w.end-w.start+1,""),w.start===0&&v.unshift(""),w.end===7&&v.push(""))}return v.join(":")},n.estimateCores=function(f,v){if(typeof f=="function"&&(v=f,f={}),f=f||{},"cores"in n&&!f.update)return v(null,n.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return n.cores=navigator.hardwareConcurrency,v(null,n.cores);if(typeof Worker>"u")return n.cores=1,v(null,n.cores);if(typeof Blob>"u")return n.cores=2,v(null,n.cores);var C=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function(x){var h=Date.now(),w=h+4;self.postMessage({st:h,et:w})})}).toString(),")()"],{type:"application/javascript"}));S([],5,16);function S(x,h,w){if(h===0){var D=Math.floor(x.reduce(function(I,T){return I+T},0)/x.length);return n.cores=Math.max(1,D),URL.revokeObjectURL(C),v(null,n.cores)}_(w,function(I,T){x.push(E(w,T)),S(x,h-1,w)})}function _(x,h){for(var w=[],D=[],I=0;I<x;++I){var T=new Worker(C);T.addEventListener("message",function(F){if(D.push(F.data),D.length===x){for(var P=0;P<x;++P)w[P].terminate();h(null,D)}}),w.push(T)}for(var I=0;I<x;++I)w[I].postMessage(I)}function E(x,h){for(var w=[],D=0;D<x;++D)for(var I=h[D],T=w[D]=[],F=0;F<x;++F)if(D!==F){var P=h[F];(I.st>P.st&&I.st<P.et||P.st>I.st&&P.st<I.et)&&T.push(F)}return w.reduce(function(k,R){return Math.max(k,R.length)},0)}},Ud.exports}var Yd,Rm;function bg(){if(Rm)return Yd;Rm=1;var e=je();Xe(),Yd=e.cipher=e.cipher||{},e.cipher.algorithms=e.cipher.algorithms||{},e.cipher.createCipher=function(n,r){var i=n;if(typeof i=="string"&&(i=e.cipher.getAlgorithm(i),i&&(i=i())),!i)throw new Error("Unsupported algorithm: "+n);return new e.cipher.BlockCipher({algorithm:i,key:r,decrypt:!1})},e.cipher.createDecipher=function(n,r){var i=n;if(typeof i=="string"&&(i=e.cipher.getAlgorithm(i),i&&(i=i())),!i)throw new Error("Unsupported algorithm: "+n);return new e.cipher.BlockCipher({algorithm:i,key:r,decrypt:!0})},e.cipher.registerAlgorithm=function(n,r){n=n.toUpperCase(),e.cipher.algorithms[n]=r},e.cipher.getAlgorithm=function(n){return n=n.toUpperCase(),n in e.cipher.algorithms?e.cipher.algorithms[n]:null};var t=e.cipher.BlockCipher=function(n){this.algorithm=n.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=n.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=n.decrypt,this.algorithm.initialize(n)};return t.prototype.start=function(n){n=n||{};var r={};for(var i in n)r[i]=n[i];r.decrypt=this._decrypt,this._finish=!1,this._input=e.util.createBuffer(),this.output=n.output||e.util.createBuffer(),this.mode.start(r)},t.prototype.update=function(n){for(n&&this._input.putBuffer(n);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},t.prototype.finish=function(n){n&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(i){return n(this.blockSize,i,!1)},this.mode.unpad=function(i){return n(this.blockSize,i,!0)});var r={};return r.decrypt=this._decrypt,r.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,r)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,r))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,r))},Yd}var Kd={exports:{}},Bm;function Zx(){if(Bm)return Kd.exports;Bm=1;var e=je();Xe(),e.cipher=e.cipher||{};var t=Kd.exports=e.cipher.modes=e.cipher.modes||{};t.ecb=function(a){a=a||{},this.name="ECB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.ecb.prototype.start=function(a){},t.ecb.prototype.encrypt=function(a,o,s){if(a.length()<this.blockSize&&!(s&&a.length()>0))return!0;for(var l=0;l<this._ints;++l)this._inBlock[l]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var l=0;l<this._ints;++l)o.putInt32(this._outBlock[l])},t.ecb.prototype.decrypt=function(a,o,s){if(a.length()<this.blockSize&&!(s&&a.length()>0))return!0;for(var l=0;l<this._ints;++l)this._inBlock[l]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var l=0;l<this._ints;++l)o.putInt32(this._outBlock[l])},t.ecb.prototype.pad=function(a,o){var s=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(s,s),!0},t.ecb.prototype.unpad=function(a,o){if(o.overflow>0)return!1;var s=a.length(),l=a.at(s-1);return l>this.blockSize<<2?!1:(a.truncate(l),!0)},t.cbc=function(a){a=a||{},this.name="CBC",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.cbc.prototype.start=function(a){if(a.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=n(a.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")},t.cbc.prototype.encrypt=function(a,o,s){if(a.length()<this.blockSize&&!(s&&a.length()>0))return!0;for(var l=0;l<this._ints;++l)this._inBlock[l]=this._prev[l]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var l=0;l<this._ints;++l)o.putInt32(this._outBlock[l]);this._prev=this._outBlock},t.cbc.prototype.decrypt=function(a,o,s){if(a.length()<this.blockSize&&!(s&&a.length()>0))return!0;for(var l=0;l<this._ints;++l)this._inBlock[l]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var l=0;l<this._ints;++l)o.putInt32(this._prev[l]^this._outBlock[l]);this._prev=this._inBlock.slice(0)},t.cbc.prototype.pad=function(a,o){var s=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(s,s),!0},t.cbc.prototype.unpad=function(a,o){if(o.overflow>0)return!1;var s=a.length(),l=a.at(s-1);return l>this.blockSize<<2?!1:(a.truncate(l),!0)},t.cfb=function(a){a=a||{},this.name="CFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0},t.cfb.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");this._iv=n(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.cfb.prototype.encrypt=function(a,o,s){var l=a.length();if(l===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&l>=this.blockSize){for(var u=0;u<this._ints;++u)this._inBlock[u]=a.getInt32()^this._outBlock[u],o.putInt32(this._inBlock[u]);return}var c=(this.blockSize-l)%this.blockSize;c>0&&(c=this.blockSize-c),this._partialOutput.clear();for(var u=0;u<this._ints;++u)this._partialBlock[u]=a.getInt32()^this._outBlock[u],this._partialOutput.putInt32(this._partialBlock[u]);if(c>0)a.read-=this.blockSize;else for(var u=0;u<this._ints;++u)this._inBlock[u]=this._partialBlock[u];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),c>0&&!s)return o.putBytes(this._partialOutput.getBytes(c-this._partialBytes)),this._partialBytes=c,!0;o.putBytes(this._partialOutput.getBytes(l-this._partialBytes)),this._partialBytes=0},t.cfb.prototype.decrypt=function(a,o,s){var l=a.length();if(l===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&l>=this.blockSize){for(var u=0;u<this._ints;++u)this._inBlock[u]=a.getInt32(),o.putInt32(this._inBlock[u]^this._outBlock[u]);return}var c=(this.blockSize-l)%this.blockSize;c>0&&(c=this.blockSize-c),this._partialOutput.clear();for(var u=0;u<this._ints;++u)this._partialBlock[u]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[u]^this._outBlock[u]);if(c>0)a.read-=this.blockSize;else for(var u=0;u<this._ints;++u)this._inBlock[u]=this._partialBlock[u];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),c>0&&!s)return o.putBytes(this._partialOutput.getBytes(c-this._partialBytes)),this._partialBytes=c,!0;o.putBytes(this._partialOutput.getBytes(l-this._partialBytes)),this._partialBytes=0},t.ofb=function(a){a=a||{},this.name="OFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0},t.ofb.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");this._iv=n(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ofb.prototype.encrypt=function(a,o,s){var l=a.length();if(a.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&l>=this.blockSize){for(var u=0;u<this._ints;++u)o.putInt32(a.getInt32()^this._outBlock[u]),this._inBlock[u]=this._outBlock[u];return}var c=(this.blockSize-l)%this.blockSize;c>0&&(c=this.blockSize-c),this._partialOutput.clear();for(var u=0;u<this._ints;++u)this._partialOutput.putInt32(a.getInt32()^this._outBlock[u]);if(c>0)a.read-=this.blockSize;else for(var u=0;u<this._ints;++u)this._inBlock[u]=this._outBlock[u];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),c>0&&!s)return o.putBytes(this._partialOutput.getBytes(c-this._partialBytes)),this._partialBytes=c,!0;o.putBytes(this._partialOutput.getBytes(l-this._partialBytes)),this._partialBytes=0},t.ofb.prototype.decrypt=t.ofb.prototype.encrypt,t.ctr=function(a){a=a||{},this.name="CTR",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0},t.ctr.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");this._iv=n(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ctr.prototype.encrypt=function(a,o,s){var l=a.length();if(l===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&l>=this.blockSize)for(var u=0;u<this._ints;++u)o.putInt32(a.getInt32()^this._outBlock[u]);else{var c=(this.blockSize-l)%this.blockSize;c>0&&(c=this.blockSize-c),this._partialOutput.clear();for(var u=0;u<this._ints;++u)this._partialOutput.putInt32(a.getInt32()^this._outBlock[u]);if(c>0&&(a.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),c>0&&!s)return o.putBytes(this._partialOutput.getBytes(c-this._partialBytes)),this._partialBytes=c,!0;o.putBytes(this._partialOutput.getBytes(l-this._partialBytes)),this._partialBytes=0}r(this._inBlock)},t.ctr.prototype.decrypt=t.ctr.prototype.encrypt,t.gcm=function(a){a=a||{},this.name="GCM",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0,this._R=3774873600},t.gcm.prototype.start=function(a){if(!("iv"in a))throw new Error("Invalid IV parameter.");var o=e.util.createBuffer(a.iv);this._cipherLength=0;var s;if("additionalData"in a?s=e.util.createBuffer(a.additionalData):s=e.util.createBuffer(),"tagLength"in a?this._tagLength=a.tagLength:this._tagLength=128,this._tag=null,a.decrypt&&(this._tag=e.util.createBuffer(a.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var l=o.length();if(l===12)this._j0=[o.getInt32(),o.getInt32(),o.getInt32(),1];else{for(this._j0=[0,0,0,0];o.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[o.getInt32(),o.getInt32(),o.getInt32(),o.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(i(l*8)))}this._inBlock=this._j0.slice(0),r(this._inBlock),this._partialBytes=0,s=e.util.createBuffer(s),this._aDataLength=i(s.length()*8);var u=s.length()%this.blockSize;for(u&&s.fillWithByte(0,this.blockSize-u),this._s=[0,0,0,0];s.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[s.getInt32(),s.getInt32(),s.getInt32(),s.getInt32()])},t.gcm.prototype.encrypt=function(a,o,s){var l=a.length();if(l===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&l>=this.blockSize){for(var u=0;u<this._ints;++u)o.putInt32(this._outBlock[u]^=a.getInt32());this._cipherLength+=this.blockSize}else{var c=(this.blockSize-l)%this.blockSize;c>0&&(c=this.blockSize-c),this._partialOutput.clear();for(var u=0;u<this._ints;++u)this._partialOutput.putInt32(a.getInt32()^this._outBlock[u]);if(c<=0||s){if(s){var p=l%this.blockSize;this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)}else this._cipherLength+=this.blockSize;for(var u=0;u<this._ints;++u)this._outBlock[u]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),c>0&&!s)return a.read-=this.blockSize,o.putBytes(this._partialOutput.getBytes(c-this._partialBytes)),this._partialBytes=c,!0;o.putBytes(this._partialOutput.getBytes(l-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),r(this._inBlock)},t.gcm.prototype.decrypt=function(a,o,s){var l=a.length();if(l<this.blockSize&&!(s&&l>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),r(this._inBlock),this._hashBlock[0]=a.getInt32(),this._hashBlock[1]=a.getInt32(),this._hashBlock[2]=a.getInt32(),this._hashBlock[3]=a.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var u=0;u<this._ints;++u)o.putInt32(this._outBlock[u]^this._hashBlock[u]);l<this.blockSize?this._cipherLength+=l%this.blockSize:this._cipherLength+=this.blockSize},t.gcm.prototype.afterFinish=function(a,o){var s=!0;o.decrypt&&o.overflow&&a.truncate(this.blockSize-o.overflow),this.tag=e.util.createBuffer();var l=this._aDataLength.concat(i(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,l);var u=[];this.cipher.encrypt(this._j0,u);for(var c=0;c<this._ints;++c)this.tag.putInt32(this._s[c]^u[c]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),o.decrypt&&this.tag.bytes()!==this._tag&&(s=!1),s},t.gcm.prototype.multiply=function(a,o){for(var s=[0,0,0,0],l=o.slice(0),u=0;u<128;++u){var c=a[u/32|0]&1<<31-u%32;c&&(s[0]^=l[0],s[1]^=l[1],s[2]^=l[2],s[3]^=l[3]),this.pow(l,l)}return s},t.gcm.prototype.pow=function(a,o){for(var s=a[3]&1,l=3;l>0;--l)o[l]=a[l]>>>1|(a[l-1]&1)<<31;o[0]=a[0]>>>1,s&&(o[0]^=this._R)},t.gcm.prototype.tableMultiply=function(a){for(var o=[0,0,0,0],s=0;s<32;++s){var l=s/8|0,u=a[l]>>>(7-s%8)*4&15,c=this._m[s][u];o[0]^=c[0],o[1]^=c[1],o[2]^=c[2],o[3]^=c[3]}return o},t.gcm.prototype.ghash=function(a,o,s){return o[0]^=s[0],o[1]^=s[1],o[2]^=s[2],o[3]^=s[3],this.tableMultiply(o)},t.gcm.prototype.generateHashTable=function(a,o){for(var s=8/o,l=4*s,u=16*s,c=new Array(u),p=0;p<u;++p){var g=[0,0,0,0],d=p/l|0,m=(l-1-p%l)*o;g[d]=1<<o-1<<m,c[p]=this.generateSubHashTable(this.multiply(g,a),o)}return c},t.gcm.prototype.generateSubHashTable=function(a,o){var s=1<<o,l=s>>>1,u=new Array(s);u[l]=a.slice(0);for(var c=l>>>1;c>0;)this.pow(u[2*c],u[c]=[]),c>>=1;for(c=2;c<l;){for(var p=1;p<c;++p){var g=u[c],d=u[p];u[c+p]=[g[0]^d[0],g[1]^d[1],g[2]^d[2],g[3]^d[3]]}c*=2}for(u[0]=[0,0,0,0],c=l+1;c<s;++c){var m=u[c^l];u[c]=[a[0]^m[0],a[1]^m[1],a[2]^m[2],a[3]^m[3]]}return u};function n(a,o){if(typeof a=="string"&&(a=e.util.createBuffer(a)),e.util.isArray(a)&&a.length>4){var s=a;a=e.util.createBuffer();for(var l=0;l<s.length;++l)a.putByte(s[l])}if(a.length()<o)throw new Error("Invalid IV length; got "+a.length()+" bytes and expected "+o+" bytes.");if(!e.util.isArray(a)){for(var u=[],c=o/4,l=0;l<c;++l)u.push(a.getInt32());a=u}return a}function r(a){a[a.length-1]=a[a.length-1]+1&4294967295}function i(a){return[a/4294967296|0,a&4294967295]}return Kd.exports}var Zd,$m;function Ka(){if($m)return Zd;$m=1;var e=je();bg(),Zx(),Xe(),Zd=e.aes=e.aes||{},e.aes.startEncrypting=function(d,m,b,y){var f=g({key:d,output:b,decrypt:!1,mode:y});return f.start(m),f},e.aes.createEncryptionCipher=function(d,m){return g({key:d,output:null,decrypt:!1,mode:m})},e.aes.startDecrypting=function(d,m,b,y){var f=g({key:d,output:b,decrypt:!0,mode:y});return f.start(m),f},e.aes.createDecryptionCipher=function(d,m){return g({key:d,output:null,decrypt:!0,mode:m})},e.aes.Algorithm=function(d,m){n||u();var b=this;b.name=d,b.mode=new m({blockSize:16,cipher:{encrypt:function(y,f){return p(b._w,y,f,!1)},decrypt:function(y,f){return p(b._w,y,f,!0)}}}),b._init=!1},e.aes.Algorithm.prototype.initialize=function(d){if(!this._init){var m=d.key,b;if(typeof m=="string"&&(m.length===16||m.length===24||m.length===32))m=e.util.createBuffer(m);else if(e.util.isArray(m)&&(m.length===16||m.length===24||m.length===32)){b=m,m=e.util.createBuffer();for(var y=0;y<b.length;++y)m.putByte(b[y])}if(!e.util.isArray(m)){b=m,m=[];var f=b.length();if(f===16||f===24||f===32){f=f>>>2;for(var y=0;y<f;++y)m.push(b.getInt32())}}if(!e.util.isArray(m)||!(m.length===4||m.length===6||m.length===8))throw new Error("Invalid key parameter.");var v=this.mode.name,C=["CFB","OFB","CTR","GCM"].indexOf(v)!==-1;this._w=c(m,d.decrypt&&!C),this._init=!0}},e.aes._expandKey=function(d,m){return n||u(),c(d,m)},e.aes._updateBlock=p,t("AES-ECB",e.cipher.modes.ecb),t("AES-CBC",e.cipher.modes.cbc),t("AES-CFB",e.cipher.modes.cfb),t("AES-OFB",e.cipher.modes.ofb),t("AES-CTR",e.cipher.modes.ctr),t("AES-GCM",e.cipher.modes.gcm);function t(d,m){var b=function(){return new e.aes.Algorithm(d,m)};e.cipher.registerAlgorithm(d,b)}var n=!1,r=4,i,a,o,s,l;function u(){n=!0,o=[0,1,2,4,8,16,32,64,128,27,54];for(var d=new Array(256),m=0;m<128;++m)d[m]=m<<1,d[m+128]=m+128<<1^283;i=new Array(256),a=new Array(256),s=new Array(4),l=new Array(4);for(var m=0;m<4;++m)s[m]=new Array(256),l[m]=new Array(256);for(var b=0,y=0,f,v,C,S,_,E,x,m=0;m<256;++m){S=y^y<<1^y<<2^y<<3^y<<4,S=S>>8^S&255^99,i[b]=S,a[S]=b,_=d[S],f=d[b],v=d[f],C=d[v],E=_<<24^S<<16^S<<8^(S^_),x=(f^v^C)<<24^(b^C)<<16^(b^v^C)<<8^(b^f^C);for(var h=0;h<4;++h)s[h][b]=E,l[h][S]=x,E=E<<24|E>>>8,x=x<<24|x>>>8;b===0?b=y=1:(b=f^d[d[d[f^C]]],y^=d[d[y]])}}function c(d,m){for(var b=d.slice(0),y,f=1,v=b.length,C=v+6+1,S=r*C,_=v;_<S;++_)y=b[_-1],_%v===0?(y=i[y>>>16&255]<<24^i[y>>>8&255]<<16^i[y&255]<<8^i[y>>>24]^o[f]<<24,f++):v>6&&_%v===4&&(y=i[y>>>24]<<24^i[y>>>16&255]<<16^i[y>>>8&255]<<8^i[y&255]),b[_]=b[_-v]^y;if(m){var E,x=l[0],h=l[1],w=l[2],D=l[3],I=b.slice(0);S=b.length;for(var _=0,T=S-r;_<S;_+=r,T-=r)if(_===0||_===S-r)I[_]=b[T],I[_+1]=b[T+3],I[_+2]=b[T+2],I[_+3]=b[T+1];else for(var F=0;F<r;++F)E=b[T+F],I[_+(3&-F)]=x[i[E>>>24]]^h[i[E>>>16&255]]^w[i[E>>>8&255]]^D[i[E&255]];b=I}return b}function p(d,m,b,y){var f=d.length/4-1,v,C,S,_,E;y?(v=l[0],C=l[1],S=l[2],_=l[3],E=a):(v=s[0],C=s[1],S=s[2],_=s[3],E=i);var x,h,w,D,I,T,F;x=m[0]^d[0],h=m[y?3:1]^d[1],w=m[2]^d[2],D=m[y?1:3]^d[3];for(var P=3,k=1;k<f;++k)I=v[x>>>24]^C[h>>>16&255]^S[w>>>8&255]^_[D&255]^d[++P],T=v[h>>>24]^C[w>>>16&255]^S[D>>>8&255]^_[x&255]^d[++P],F=v[w>>>24]^C[D>>>16&255]^S[x>>>8&255]^_[h&255]^d[++P],D=v[D>>>24]^C[x>>>16&255]^S[h>>>8&255]^_[w&255]^d[++P],x=I,h=T,w=F;b[0]=E[x>>>24]<<24^E[h>>>16&255]<<16^E[w>>>8&255]<<8^E[D&255]^d[++P],b[y?3:1]=E[h>>>24]<<24^E[w>>>16&255]<<16^E[D>>>8&255]<<8^E[x&255]^d[++P],b[2]=E[w>>>24]<<24^E[D>>>16&255]<<16^E[x>>>8&255]<<8^E[h&255]^d[++P],b[y?1:3]=E[D>>>24]<<24^E[x>>>16&255]<<16^E[h>>>8&255]<<8^E[w&255]^d[++P]}function g(d){d=d||{};var m=(d.mode||"CBC").toUpperCase(),b="AES-"+m,y;d.decrypt?y=e.cipher.createDecipher(b,d.key):y=e.cipher.createCipher(b,d.key);var f=y.start;return y.start=function(v,C){var S=null;C instanceof e.util.ByteBuffer&&(S=C,C={}),C=C||{},C.output=S,C.iv=v,f.call(y,C)},y}return Zd}var qd={exports:{}},Jd={exports:{}},Qd={exports:{}},km;function Za(){if(km)return Qd.exports;km=1;var e=je();e.pki=e.pki||{};var t=Qd.exports=e.pki.oids=e.oids=e.oids||{};function n(i,a){t[i]=a,t[a]=i}function r(i,a){t[i]=a}return n("1.2.840.113549.1.1.1","rsaEncryption"),n("1.2.840.113549.1.1.4","md5WithRSAEncryption"),n("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),n("1.2.840.113549.1.1.7","RSAES-OAEP"),n("1.2.840.113549.1.1.8","mgf1"),n("1.2.840.113549.1.1.9","pSpecified"),n("1.2.840.113549.1.1.10","RSASSA-PSS"),n("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),n("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),n("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),n("1.3.101.112","EdDSA25519"),n("1.2.840.10040.4.3","dsa-with-sha1"),n("1.3.14.3.2.7","desCBC"),n("1.3.14.3.2.26","sha1"),n("1.3.14.3.2.29","sha1WithRSASignature"),n("2.16.840.1.101.3.4.2.1","sha256"),n("2.16.840.1.101.3.4.2.2","sha384"),n("2.16.840.1.101.3.4.2.3","sha512"),n("2.16.840.1.101.3.4.2.4","sha224"),n("2.16.840.1.101.3.4.2.5","sha512-224"),n("2.16.840.1.101.3.4.2.6","sha512-256"),n("1.2.840.113549.2.2","md2"),n("1.2.840.113549.2.5","md5"),n("1.2.840.113549.1.7.1","data"),n("1.2.840.113549.1.7.2","signedData"),n("1.2.840.113549.1.7.3","envelopedData"),n("1.2.840.113549.1.7.4","signedAndEnvelopedData"),n("1.2.840.113549.1.7.5","digestedData"),n("1.2.840.113549.1.7.6","encryptedData"),n("1.2.840.113549.1.9.1","emailAddress"),n("1.2.840.113549.1.9.2","unstructuredName"),n("1.2.840.113549.1.9.3","contentType"),n("1.2.840.113549.1.9.4","messageDigest"),n("1.2.840.113549.1.9.5","signingTime"),n("1.2.840.113549.1.9.6","counterSignature"),n("1.2.840.113549.1.9.7","challengePassword"),n("1.2.840.113549.1.9.8","unstructuredAddress"),n("1.2.840.113549.1.9.14","extensionRequest"),n("1.2.840.113549.1.9.20","friendlyName"),n("1.2.840.113549.1.9.21","localKeyId"),n("1.2.840.113549.1.9.22.1","x509Certificate"),n("1.2.840.113549.1.12.10.1.1","keyBag"),n("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),n("1.2.840.113549.1.12.10.1.3","certBag"),n("1.2.840.113549.1.12.10.1.4","crlBag"),n("1.2.840.113549.1.12.10.1.5","secretBag"),n("1.2.840.113549.1.12.10.1.6","safeContentsBag"),n("1.2.840.113549.1.5.13","pkcs5PBES2"),n("1.2.840.113549.1.5.12","pkcs5PBKDF2"),n("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),n("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),n("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),n("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),n("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),n("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),n("1.2.840.113549.2.7","hmacWithSHA1"),n("1.2.840.113549.2.8","hmacWithSHA224"),n("1.2.840.113549.2.9","hmacWithSHA256"),n("1.2.840.113549.2.10","hmacWithSHA384"),n("1.2.840.113549.2.11","hmacWithSHA512"),n("1.2.840.113549.3.7","des-EDE3-CBC"),n("2.16.840.1.101.3.4.1.2","aes128-CBC"),n("2.16.840.1.101.3.4.1.22","aes192-CBC"),n("2.16.840.1.101.3.4.1.42","aes256-CBC"),n("2.5.4.3","commonName"),n("2.5.4.4","surname"),n("2.5.4.5","serialNumber"),n("2.5.4.6","countryName"),n("2.5.4.7","localityName"),n("2.5.4.8","stateOrProvinceName"),n("2.5.4.9","streetAddress"),n("2.5.4.10","organizationName"),n("2.5.4.11","organizationalUnitName"),n("2.5.4.12","title"),n("2.5.4.13","description"),n("2.5.4.15","businessCategory"),n("2.5.4.17","postalCode"),n("2.5.4.42","givenName"),n("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),n("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),n("2.16.840.1.113730.1.1","nsCertType"),n("2.16.840.1.113730.1.13","nsComment"),r("2.5.29.1","authorityKeyIdentifier"),r("2.5.29.2","keyAttributes"),r("2.5.29.3","certificatePolicies"),r("2.5.29.4","keyUsageRestriction"),r("2.5.29.5","policyMapping"),r("2.5.29.6","subtreesConstraint"),r("2.5.29.7","subjectAltName"),r("2.5.29.8","issuerAltName"),r("2.5.29.9","subjectDirectoryAttributes"),r("2.5.29.10","basicConstraints"),r("2.5.29.11","nameConstraints"),r("2.5.29.12","policyConstraints"),r("2.5.29.13","basicConstraints"),n("2.5.29.14","subjectKeyIdentifier"),n("2.5.29.15","keyUsage"),r("2.5.29.16","privateKeyUsagePeriod"),n("2.5.29.17","subjectAltName"),n("2.5.29.18","issuerAltName"),n("2.5.29.19","basicConstraints"),r("2.5.29.20","cRLNumber"),r("2.5.29.21","cRLReason"),r("2.5.29.22","expirationDate"),r("2.5.29.23","instructionCode"),r("2.5.29.24","invalidityDate"),r("2.5.29.25","cRLDistributionPoints"),r("2.5.29.26","issuingDistributionPoint"),r("2.5.29.27","deltaCRLIndicator"),r("2.5.29.28","issuingDistributionPoint"),r("2.5.29.29","certificateIssuer"),r("2.5.29.30","nameConstraints"),n("2.5.29.31","cRLDistributionPoints"),n("2.5.29.32","certificatePolicies"),r("2.5.29.33","policyMappings"),r("2.5.29.34","policyConstraints"),n("2.5.29.35","authorityKeyIdentifier"),r("2.5.29.36","policyConstraints"),n("2.5.29.37","extKeyUsage"),r("2.5.29.46","freshestCRL"),r("2.5.29.54","inhibitAnyPolicy"),n("1.3.6.1.4.1.11129.2.4.2","timestampList"),n("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),n("1.3.6.1.5.5.7.3.1","serverAuth"),n("1.3.6.1.5.5.7.3.2","clientAuth"),n("1.3.6.1.5.5.7.3.3","codeSigning"),n("1.3.6.1.5.5.7.3.4","emailProtection"),n("1.3.6.1.5.5.7.3.8","timeStamping"),Qd.exports}var Pm;function Jr(){if(Pm)return Jd.exports;Pm=1;var e=je();Xe(),Za();var t=Jd.exports=e.asn1=e.asn1||{};t.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},t.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},t.maxDepth=256,t.create=function(o,s,l,u,c){if(e.util.isArray(u)){for(var p=[],g=0;g<u.length;++g)u[g]!==void 0&&p.push(u[g]);u=p}var d={tagClass:o,type:s,constructed:l,composed:l||e.util.isArray(u),value:u};return c&&"bitStringContents"in c&&(d.bitStringContents=c.bitStringContents,d.original=t.copy(d)),d},t.copy=function(o,s){var l;if(e.util.isArray(o)){l=[];for(var u=0;u<o.length;++u)l.push(t.copy(o[u],s));return l}return typeof o=="string"?o:(l={tagClass:o.tagClass,type:o.type,constructed:o.constructed,composed:o.composed,value:t.copy(o.value,s)},s&&!s.excludeBitStringContents&&(l.bitStringContents=o.bitStringContents),l)},t.equals=function(o,s,l){if(e.util.isArray(o)){if(!e.util.isArray(s)||o.length!==s.length)return!1;for(var u=0;u<o.length;++u)if(!t.equals(o[u],s[u]))return!1;return!0}if(typeof o!=typeof s)return!1;if(typeof o=="string")return o===s;var c=o.tagClass===s.tagClass&&o.type===s.type&&o.constructed===s.constructed&&o.composed===s.composed&&t.equals(o.value,s.value);return l&&l.includeBitStringContents&&(c=c&&o.bitStringContents===s.bitStringContents),c},t.getBerValueLength=function(o){var s=o.getByte();if(s!==128){var l,u=s&128;return u?l=o.getInt((s&127)<<3):l=s,l}};function n(o,s,l){if(l>s){var u=new Error("Too few bytes to parse DER.");throw u.available=o.length(),u.remaining=s,u.requested=l,u}}var r=function(o,s){var l=o.getByte();if(s--,l!==128){var u,c=l&128;if(!c)u=l;else{var p=l&127;n(o,s,p),u=o.getInt(p<<3)}if(u<0)throw new Error("Negative length: "+u);return u}};t.fromDer=function(o,s){s===void 0&&(s={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof s=="boolean"&&(s={strict:s,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in s||(s.strict=!0),"parseAllBytes"in s||(s.parseAllBytes=!0),"decodeBitStrings"in s||(s.decodeBitStrings=!0),"maxDepth"in s||(s.maxDepth=t.maxDepth),typeof o=="string"&&(o=e.util.createBuffer(o));var l=o.length(),u=i(o,o.length(),0,s);if(s.parseAllBytes&&o.length()!==0){var c=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw c.byteCount=l,c.remaining=o.length(),c}return u};function i(o,s,l,u){if(l>=u.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var c;n(o,s,2);var p=o.getByte();s--;var g=p&192,d=p&31;c=o.length();var m=r(o,s);if(s-=c-o.length(),m!==void 0&&m>s){if(u.strict){var b=new Error("Too few bytes to read ASN.1 value.");throw b.available=o.length(),b.remaining=s,b.requested=m,b}m=s}var y,f,v=(p&32)===32;if(v)if(y=[],m===void 0)for(;;){if(n(o,s,2),o.bytes(2)==="\0\0"){o.getBytes(2),s-=2;break}c=o.length(),y.push(i(o,s,l+1,u)),s-=c-o.length()}else for(;m>0;)c=o.length(),y.push(i(o,m,l+1,u)),s-=c-o.length(),m-=c-o.length();if(y===void 0&&g===t.Class.UNIVERSAL&&d===t.Type.BITSTRING&&(f=o.bytes(m)),y===void 0&&u.decodeBitStrings&&g===t.Class.UNIVERSAL&&d===t.Type.BITSTRING&&m>1){var C=o.read,S=s,_=0;if(d===t.Type.BITSTRING&&(n(o,s,1),_=o.getByte(),s--),_===0)try{c=o.length();var E={strict:!0,decodeBitStrings:!0},x=i(o,s,l+1,E),h=c-o.length();s-=h,d==t.Type.BITSTRING&&h++;var w=x.tagClass;h===m&&(w===t.Class.UNIVERSAL||w===t.Class.CONTEXT_SPECIFIC)&&(y=[x])}catch{}y===void 0&&(o.read=C,s=S)}if(y===void 0){if(m===void 0){if(u.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");m=s}if(d===t.Type.BMPSTRING)for(y="";m>0;m-=2)n(o,s,2),y+=String.fromCharCode(o.getInt16()),s-=2;else y=o.getBytes(m),s-=m}var D=f===void 0?null:{bitStringContents:f};return t.create(g,d,v,y,D)}t.toDer=function(o){var s=e.util.createBuffer(),l=o.tagClass|o.type,u=e.util.createBuffer(),c=!1;if("bitStringContents"in o&&(c=!0,o.original&&(c=t.equals(o,o.original))),c)u.putBytes(o.bitStringContents);else if(o.composed){o.constructed?l|=32:u.putByte(0);for(var p=0;p<o.value.length;++p)o.value[p]!==void 0&&u.putBuffer(t.toDer(o.value[p]))}else if(o.type===t.Type.BMPSTRING)for(var p=0;p<o.value.length;++p)u.putInt16(o.value.charCodeAt(p));else o.type===t.Type.INTEGER&&o.value.length>1&&(o.value.charCodeAt(0)===0&&(o.value.charCodeAt(1)&128)===0||o.value.charCodeAt(0)===255&&(o.value.charCodeAt(1)&128)===128)?u.putBytes(o.value.substr(1)):u.putBytes(o.value);if(s.putByte(l),u.length()<=127)s.putByte(u.length()&127);else{var g=u.length(),d="";do d+=String.fromCharCode(g&255),g=g>>>8;while(g>0);s.putByte(d.length|128);for(var p=d.length-1;p>=0;--p)s.putByte(d.charCodeAt(p))}return s.putBuffer(u),s},t.oidToDer=function(o){var s=o.split("."),l=e.util.createBuffer();l.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u,c,p,g,d=2;d<s.length;++d){if(u=!0,c=[],p=parseInt(s[d],10),p>4294967295)throw new Error("OID value too large; max is 32-bits.");do g=p&127,p=p>>>7,u||(g|=128),c.push(g),u=!1;while(p>0);for(var m=c.length-1;m>=0;--m)l.putByte(c[m])}return l},t.derToOid=function(o){var s;typeof o=="string"&&(o=e.util.createBuffer(o));var l=o.getByte();s=Math.floor(l/40)+"."+l%40;for(var u=0;o.length()>0;){if(u>70368744177663)throw new Error("OID value too large; max is 53-bits.");l=o.getByte(),u=u*128,l&128?u+=l&127:(s+="."+(u+l),u=0)}return s},t.utcTimeToDate=function(o){var s=new Date,l=parseInt(o.substr(0,2),10);l=l>=50?1900+l:2e3+l;var u=parseInt(o.substr(2,2),10)-1,c=parseInt(o.substr(4,2),10),p=parseInt(o.substr(6,2),10),g=parseInt(o.substr(8,2),10),d=0;if(o.length>11){var m=o.charAt(10),b=10;m!=="+"&&m!=="-"&&(d=parseInt(o.substr(10,2),10),b+=2)}if(s.setUTCFullYear(l,u,c),s.setUTCHours(p,g,d,0),b&&(m=o.charAt(b),m==="+"||m==="-")){var y=parseInt(o.substr(b+1,2),10),f=parseInt(o.substr(b+4,2),10),v=y*60+f;v*=6e4,m==="+"?s.setTime(+s-v):s.setTime(+s+v)}return s},t.generalizedTimeToDate=function(o){var s=new Date,l=parseInt(o.substr(0,4),10),u=parseInt(o.substr(4,2),10)-1,c=parseInt(o.substr(6,2),10),p=parseInt(o.substr(8,2),10),g=parseInt(o.substr(10,2),10),d=parseInt(o.substr(12,2),10),m=0,b=0,y=!1;o.charAt(o.length-1)==="Z"&&(y=!0);var f=o.length-5,v=o.charAt(f);if(v==="+"||v==="-"){var C=parseInt(o.substr(f+1,2),10),S=parseInt(o.substr(f+4,2),10);b=C*60+S,b*=6e4,v==="+"&&(b*=-1),y=!0}return o.charAt(14)==="."&&(m=parseFloat(o.substr(14),10)*1e3),y?(s.setUTCFullYear(l,u,c),s.setUTCHours(p,g,d,m),s.setTime(+s+b)):(s.setFullYear(l,u,c),s.setHours(p,g,d,m)),s},t.dateToUtcTime=function(o){if(typeof o=="string")return o;var s="",l=[];l.push((""+o.getUTCFullYear()).substr(2)),l.push(""+(o.getUTCMonth()+1)),l.push(""+o.getUTCDate()),l.push(""+o.getUTCHours()),l.push(""+o.getUTCMinutes()),l.push(""+o.getUTCSeconds());for(var u=0;u<l.length;++u)l[u].length<2&&(s+="0"),s+=l[u];return s+="Z",s},t.dateToGeneralizedTime=function(o){if(typeof o=="string")return o;var s="",l=[];l.push(""+o.getUTCFullYear()),l.push(""+(o.getUTCMonth()+1)),l.push(""+o.getUTCDate()),l.push(""+o.getUTCHours()),l.push(""+o.getUTCMinutes()),l.push(""+o.getUTCSeconds());for(var u=0;u<l.length;++u)l[u].length<2&&(s+="0"),s+=l[u];return s+="Z",s},t.integerToDer=function(o){var s=e.util.createBuffer();if(o>=-128&&o<128)return s.putSignedInt(o,8);if(o>=-32768&&o<32768)return s.putSignedInt(o,16);if(o>=-8388608&&o<8388608)return s.putSignedInt(o,24);if(o>=-2147483648&&o<2147483648)return s.putSignedInt(o,32);var l=new Error("Integer too large; max is 32-bits.");throw l.integer=o,l},t.derToInteger=function(o){typeof o=="string"&&(o=e.util.createBuffer(o));var s=o.length()*8;if(s>32)throw new Error("Integer too large; max is 32-bits.");return o.getSignedInt(s)},t.validate=function(o,s,l,u){var c=!1;if((o.tagClass===s.tagClass||typeof s.tagClass>"u")&&(o.type===s.type||typeof s.type>"u"))if(o.constructed===s.constructed||typeof s.constructed>"u"){if(c=!0,s.value&&e.util.isArray(s.value))for(var p=0,g=0;c&&g<s.value.length;++g){var d=s.value[g];c=!!d.optional;var m=o.value[p];if(!m){d.optional||(c=!1,u&&u.push("["+s.name+'] Missing required element. Expected tag class "'+d.tagClass+'", type "'+d.type+'"'));continue}var b=typeof d.tagClass<"u"&&typeof d.type<"u";if(b&&(m.tagClass!==d.tagClass||m.type!==d.type))if(d.optional){c=!0;continue}else{c=!1,u&&u.push("["+s.name+"] Tag mismatch. Expected ("+d.tagClass+","+d.type+"), got ("+m.tagClass+","+m.type+")");break}var y=t.validate(m,d,l,u);if(y)++p,c=!0;else if(d.optional)c=!0;else{c=!1;break}}if(c&&l&&(s.capture&&(l[s.capture]=o.value),s.captureAsn1&&(l[s.captureAsn1]=o),s.captureBitStringContents&&"bitStringContents"in o&&(l[s.captureBitStringContents]=o.bitStringContents),s.captureBitStringValue&&"bitStringContents"in o))if(o.bitStringContents.length<2)l[s.captureBitStringValue]="";else{var f=o.bitStringContents.charCodeAt(0);if(f!==0)throw new Error("captureBitStringValue only supported for zero unused bits");l[s.captureBitStringValue]=o.bitStringContents.slice(1)}}else u&&u.push("["+s.name+'] Expected constructed "'+s.constructed+'", got "'+o.constructed+'"');else u&&(o.tagClass!==s.tagClass&&u.push("["+s.name+'] Expected tag class "'+s.tagClass+'", got "'+o.tagClass+'"'),o.type!==s.type&&u.push("["+s.name+'] Expected type "'+s.type+'", got "'+o.type+'"'));return c};var a=/[^\\u0000-\\u00ff]/;return t.prettyPrint=function(o,s,l){var u="";s=s||0,l=l||2,s>0&&(u+=`
|
|
5
|
-
`);for(var c="",p=0;p<s*l;++p)c+=" ";switch(u+=c+"Tag: ",o.tagClass){case t.Class.UNIVERSAL:u+="Universal:";break;case t.Class.APPLICATION:u+="Application:";break;case t.Class.CONTEXT_SPECIFIC:u+="Context-Specific:";break;case t.Class.PRIVATE:u+="Private:";break}if(o.tagClass===t.Class.UNIVERSAL)switch(u+=o.type,o.type){case t.Type.NONE:u+=" (None)";break;case t.Type.BOOLEAN:u+=" (Boolean)";break;case t.Type.INTEGER:u+=" (Integer)";break;case t.Type.BITSTRING:u+=" (Bit string)";break;case t.Type.OCTETSTRING:u+=" (Octet string)";break;case t.Type.NULL:u+=" (Null)";break;case t.Type.OID:u+=" (Object Identifier)";break;case t.Type.ODESC:u+=" (Object Descriptor)";break;case t.Type.EXTERNAL:u+=" (External or Instance of)";break;case t.Type.REAL:u+=" (Real)";break;case t.Type.ENUMERATED:u+=" (Enumerated)";break;case t.Type.EMBEDDED:u+=" (Embedded PDV)";break;case t.Type.UTF8:u+=" (UTF8)";break;case t.Type.ROID:u+=" (Relative Object Identifier)";break;case t.Type.SEQUENCE:u+=" (Sequence)";break;case t.Type.SET:u+=" (Set)";break;case t.Type.PRINTABLESTRING:u+=" (Printable String)";break;case t.Type.IA5String:u+=" (IA5String (ASCII))";break;case t.Type.UTCTIME:u+=" (UTC time)";break;case t.Type.GENERALIZEDTIME:u+=" (Generalized time)";break;case t.Type.BMPSTRING:u+=" (BMP String)";break}else u+=o.type;if(u+=`
|
|
6
|
-
`,u+=c+"Constructed: "+o.constructed+`
|
|
7
|
-
`,o.composed){for(var g=0,d="",p=0;p<o.value.length;++p)o.value[p]!==void 0&&(g+=1,d+=t.prettyPrint(o.value[p],s+1,l),p+1<o.value.length&&(d+=","));u+=c+"Sub values: "+g+d}else{if(u+=c+"Value: ",o.type===t.Type.OID){var m=t.derToOid(o.value);u+=m,e.pki&&e.pki.oids&&m in e.pki.oids&&(u+=" ("+e.pki.oids[m]+") ")}if(o.type===t.Type.INTEGER)try{u+=t.derToInteger(o.value)}catch{u+="0x"+e.util.bytesToHex(o.value)}else if(o.type===t.Type.BITSTRING){if(o.value.length>1?u+="0x"+e.util.bytesToHex(o.value.slice(1)):u+="(none)",o.value.length>0){var b=o.value.charCodeAt(0);b==1?u+=" (1 unused bit shown)":b>1&&(u+=" ("+b+" unused bits shown)")}}else if(o.type===t.Type.OCTETSTRING)a.test(o.value)||(u+="("+o.value+") "),u+="0x"+e.util.bytesToHex(o.value);else if(o.type===t.Type.UTF8)try{u+=e.util.decodeUtf8(o.value)}catch(y){if(y.message==="URI malformed")u+="0x"+e.util.bytesToHex(o.value)+" (malformed UTF8)";else throw y}else o.type===t.Type.PRINTABLESTRING||o.type===t.Type.IA5String?u+=o.value:a.test(o.value)?u+="0x"+e.util.bytesToHex(o.value):o.value.length===0?u+="[null]":u+=o.value}return u},Jd.exports}var ef={exports:{}},tf,Fm;function Ii(){if(Fm)return tf;Fm=1;var e=je();return tf=e.md=e.md||{},e.md.algorithms=e.md.algorithms||{},tf}var Nm;function yl(){if(Nm)return ef.exports;Nm=1;var e=je();Ii(),Xe();var t=ef.exports=e.hmac=e.hmac||{};return t.create=function(){var n=null,r=null,i=null,a=null,o={};return o.start=function(s,l){if(s!==null)if(typeof s=="string")if(s=s.toLowerCase(),s in e.md.algorithms)r=e.md.algorithms[s].create();else throw new Error('Unknown hash algorithm "'+s+'"');else r=s;if(l===null)l=n;else{if(typeof l=="string")l=e.util.createBuffer(l);else if(e.util.isArray(l)){var u=l;l=e.util.createBuffer();for(var c=0;c<u.length;++c)l.putByte(u[c])}var p=l.length();p>r.blockLength&&(r.start(),r.update(l.bytes()),l=r.digest()),i=e.util.createBuffer(),a=e.util.createBuffer(),p=l.length();for(var c=0;c<p;++c){var u=l.at(c);i.putByte(54^u),a.putByte(92^u)}if(p<r.blockLength)for(var u=r.blockLength-p,c=0;c<u;++c)i.putByte(54),a.putByte(92);n=l,i=i.bytes(),a=a.bytes()}r.start(),r.update(i)},o.update=function(s){r.update(s)},o.getMac=function(){var s=r.digest().bytes();return r.start(),r.update(a),r.update(s),r.digest()},o.digest=o.getMac,o},ef.exports}var nf={exports:{}},Mm;function vg(){if(Mm)return nf.exports;Mm=1;var e=je();Ii(),Xe();var t=nf.exports=e.md5=e.md5||{};e.md.md5=e.md.algorithms.md5=t,t.create=function(){o||s();var u=null,c=e.util.createBuffer(),p=new Array(16),g={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return g.start=function(){g.messageLength=0,g.fullMessageLength=g.messageLength64=[];for(var d=g.messageLengthSize/4,m=0;m<d;++m)g.fullMessageLength.push(0);return c=e.util.createBuffer(),u={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},g},g.start(),g.update=function(d,m){m==="utf8"&&(d=e.util.encodeUtf8(d));var b=d.length;g.messageLength+=b,b=[b/4294967296>>>0,b>>>0];for(var y=g.fullMessageLength.length-1;y>=0;--y)g.fullMessageLength[y]+=b[1],b[1]=b[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]=g.fullMessageLength[y]>>>0,b[0]=b[1]/4294967296>>>0;return c.putBytes(d),l(u,p,c),(c.read>2048||c.length()===0)&&c.compact(),g},g.digest=function(){var d=e.util.createBuffer();d.putBytes(c.bytes());var m=g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize,b=m&g.blockLength-1;d.putBytes(n.substr(0,g.blockLength-b));for(var y,f=0,v=g.fullMessageLength.length-1;v>=0;--v)y=g.fullMessageLength[v]*8+f,f=y/4294967296>>>0,d.putInt32Le(y>>>0);var C={h0:u.h0,h1:u.h1,h2:u.h2,h3:u.h3};l(C,p,d);var S=e.util.createBuffer();return S.putInt32Le(C.h0),S.putInt32Le(C.h1),S.putInt32Le(C.h2),S.putInt32Le(C.h3),S},g};var n=null,r=null,i=null,a=null,o=!1;function s(){n="",n+=e.util.fillString("\0",64),r=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],i=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],a=new Array(64);for(var u=0;u<64;++u)a[u]=Math.floor(Math.abs(Math.sin(u+1))*4294967296);o=!0}function l(u,c,p){for(var g,d,m,b,y,f,v,C,S=p.length();S>=64;){for(d=u.h0,m=u.h1,b=u.h2,y=u.h3,C=0;C<16;++C)c[C]=p.getInt32Le(),f=y^m&(b^y),g=d+f+a[C]+c[C],v=i[C],d=y,y=b,b=m,m+=g<<v|g>>>32-v;for(;C<32;++C)f=b^y&(m^b),g=d+f+a[C]+c[r[C]],v=i[C],d=y,y=b,b=m,m+=g<<v|g>>>32-v;for(;C<48;++C)f=m^b^y,g=d+f+a[C]+c[r[C]],v=i[C],d=y,y=b,b=m,m+=g<<v|g>>>32-v;for(;C<64;++C)f=b^(m|~y),g=d+f+a[C]+c[r[C]],v=i[C],d=y,y=b,b=m,m+=g<<v|g>>>32-v;u.h0=u.h0+d|0,u.h1=u.h1+m|0,u.h2=u.h2+b|0,u.h3=u.h3+y|0,S-=64}}return nf.exports}var rf={exports:{}},Om;function qo(){if(Om)return rf.exports;Om=1;var e=je();Xe();var t=rf.exports=e.pem=e.pem||{};t.encode=function(i,a){a=a||{};var o="-----BEGIN "+i.type+`-----\r
|
|
8
|
-
`,s;if(i.procType&&(s={name:"Proc-Type",values:[String(i.procType.version),i.procType.type]},o+=n(s)),i.contentDomain&&(s={name:"Content-Domain",values:[i.contentDomain]},o+=n(s)),i.dekInfo&&(s={name:"DEK-Info",values:[i.dekInfo.algorithm]},i.dekInfo.parameters&&s.values.push(i.dekInfo.parameters),o+=n(s)),i.headers)for(var l=0;l<i.headers.length;++l)o+=n(i.headers[l]);return i.procType&&(o+=`\r
|
|
9
|
-
`),o+=e.util.encode64(i.body,a.maxline||64)+`\r
|
|
10
|
-
`,o+="-----END "+i.type+`-----\r
|
|
11
|
-
`,o},t.decode=function(i){for(var a=[],o=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,s=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,l=/\r?\n/,u;u=o.exec(i),!!u;){var c=u[1];c==="NEW CERTIFICATE REQUEST"&&(c="CERTIFICATE REQUEST");var p={type:c,procType:null,contentDomain:null,dekInfo:null,headers:[],body:e.util.decode64(u[3])};if(a.push(p),!!u[2]){for(var g=u[2].split(l),d=0;u&&d<g.length;){for(var m=g[d].replace(/\s+$/,""),b=d+1;b<g.length;++b){var y=g[b];if(!/\s/.test(y[0]))break;m+=y,d=b}if(u=m.match(s),u){for(var f={name:u[1],values:[]},v=u[2].split(","),C=0;C<v.length;++C)f.values.push(r(v[C]));if(p.procType)if(!p.contentDomain&&f.name==="Content-Domain")p.contentDomain=v[0]||"";else if(!p.dekInfo&&f.name==="DEK-Info"){if(f.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:v[0],parameters:v[1]||null}}else p.headers.push(f);else{if(f.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(f.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');p.procType={version:v[0],type:v[1]}}}++d}if(p.procType==="ENCRYPTED"&&!p.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(a.length===0)throw new Error("Invalid PEM formatted message.");return a};function n(i){for(var a=i.name+": ",o=[],s=function(g,d){return" "+d},l=0;l<i.values.length;++l)o.push(i.values[l].replace(/^(\S+\r\n)/,s));a+=o.join(",")+`\r
|
|
12
|
-
`;for(var u=0,c=-1,l=0;l<a.length;++l,++u)if(u>65&&c!==-1){var p=a[c];p===","?(++c,a=a.substr(0,c)+`\r
|
|
13
|
-
`+a.substr(c)):a=a.substr(0,c)+`\r
|
|
14
|
-
`+p+a.substr(c+1),u=l-c-1,c=-1,++l}else(a[l]===" "||a[l]===" "||a[l]===",")&&(c=l);return a}function r(i){return i.replace(/^\s+/,"")}return rf.exports}var af={exports:{}},of,Lm;function qc(){if(Lm)return of;Lm=1;var e=je();bg(),Zx(),Xe(),of=e.des=e.des||{},e.des.startEncrypting=function(d,m,b,y){var f=g({key:d,output:b,decrypt:!1,mode:y||(m===null?"ECB":"CBC")});return f.start(m),f},e.des.createEncryptionCipher=function(d,m){return g({key:d,output:null,decrypt:!1,mode:m})},e.des.startDecrypting=function(d,m,b,y){var f=g({key:d,output:b,decrypt:!0,mode:y||(m===null?"ECB":"CBC")});return f.start(m),f},e.des.createDecryptionCipher=function(d,m){return g({key:d,output:null,decrypt:!0,mode:m})},e.des.Algorithm=function(d,m){var b=this;b.name=d,b.mode=new m({blockSize:8,cipher:{encrypt:function(y,f){return p(b._keys,y,f,!1)},decrypt:function(y,f){return p(b._keys,y,f,!0)}}}),b._init=!1},e.des.Algorithm.prototype.initialize=function(d){if(!this._init){var m=e.util.createBuffer(d.key);if(this.name.indexOf("3DES")===0&&m.length()!==24)throw new Error("Invalid Triple-DES key size: "+m.length()*8);this._keys=c(m),this._init=!0}},t("DES-ECB",e.cipher.modes.ecb),t("DES-CBC",e.cipher.modes.cbc),t("DES-CFB",e.cipher.modes.cfb),t("DES-OFB",e.cipher.modes.ofb),t("DES-CTR",e.cipher.modes.ctr),t("3DES-ECB",e.cipher.modes.ecb),t("3DES-CBC",e.cipher.modes.cbc),t("3DES-CFB",e.cipher.modes.cfb),t("3DES-OFB",e.cipher.modes.ofb),t("3DES-CTR",e.cipher.modes.ctr);function t(d,m){var b=function(){return new e.des.Algorithm(d,m)};e.cipher.registerAlgorithm(d,b)}var n=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],r=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],i=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],a=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],o=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],s=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],u=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function c(d){for(var m=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],b=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],y=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],f=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],v=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],C=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],S=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],_=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],E=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],x=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],w=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],I=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],T=d.length()>8?3:1,F=[],P=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],k=0,R,M=0;M<T;M++){var O=d.getInt32(),z=d.getInt32();R=(O>>>4^z)&252645135,z^=R,O^=R<<4,R=(z>>>-16^O)&65535,O^=R,z^=R<<-16,R=(O>>>2^z)&858993459,z^=R,O^=R<<2,R=(z>>>-16^O)&65535,O^=R,z^=R<<-16,R=(O>>>1^z)&1431655765,z^=R,O^=R<<1,R=(z>>>8^O)&16711935,O^=R,z^=R<<8,R=(O>>>1^z)&1431655765,z^=R,O^=R<<1,R=O<<8|z>>>20&240,O=z<<24|z<<8&16711680|z>>>8&65280|z>>>24&240,z=R;for(var G=0;G<P.length;++G){P[G]?(O=O<<2|O>>>26,z=z<<2|z>>>26):(O=O<<1|O>>>27,z=z<<1|z>>>27),O&=-15,z&=-15;var U=m[O>>>28]|b[O>>>24&15]|y[O>>>20&15]|f[O>>>16&15]|v[O>>>12&15]|C[O>>>8&15]|S[O>>>4&15],J=_[z>>>28]|E[z>>>24&15]|x[z>>>20&15]|h[z>>>16&15]|w[z>>>12&15]|D[z>>>8&15]|I[z>>>4&15];R=(J>>>16^U)&65535,F[k++]=U^R,F[k++]=J^R<<16}}return F}function p(d,m,b,y){var f=d.length===32?3:9,v;f===3?v=y?[30,-2,-2]:[0,32,2]:v=y?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var C,S=m[0],_=m[1];C=(S>>>4^_)&252645135,_^=C,S^=C<<4,C=(S>>>16^_)&65535,_^=C,S^=C<<16,C=(_>>>2^S)&858993459,S^=C,_^=C<<2,C=(_>>>8^S)&16711935,S^=C,_^=C<<8,C=(S>>>1^_)&1431655765,_^=C,S^=C<<1,S=S<<1|S>>>31,_=_<<1|_>>>31;for(var E=0;E<f;E+=3){for(var x=v[E+1],h=v[E+2],w=v[E];w!=x;w+=h){var D=_^d[w],I=(_>>>4|_<<28)^d[w+1];C=S,S=_,_=C^(r[D>>>24&63]|a[D>>>16&63]|s[D>>>8&63]|u[D&63]|n[I>>>24&63]|i[I>>>16&63]|o[I>>>8&63]|l[I&63])}C=S,S=_,_=C}S=S>>>1|S<<31,_=_>>>1|_<<31,C=(S>>>1^_)&1431655765,_^=C,S^=C<<1,C=(_>>>8^S)&16711935,S^=C,_^=C<<8,C=(_>>>2^S)&858993459,S^=C,_^=C<<2,C=(S>>>16^_)&65535,_^=C,S^=C<<16,C=(S>>>4^_)&252645135,_^=C,S^=C<<4,b[0]=S,b[1]=_}function g(d){d=d||{};var m=(d.mode||"CBC").toUpperCase(),b="DES-"+m,y;d.decrypt?y=e.cipher.createDecipher(b,d.key):y=e.cipher.createCipher(b,d.key);var f=y.start;return y.start=function(v,C){var S=null;C instanceof e.util.ByteBuffer&&(S=C,C={}),C=C||{},C.output=S,C.iv=v,f.call(y,C)},y}return of}const jD={},zD=Object.freeze(Object.defineProperty({__proto__:null,default:jD},Symbol.toStringTag,{value:"Module"})),yg=VD(zD);var sf,Vm;function xg(){if(Vm)return sf;Vm=1;var e=je();yl(),Ii(),Xe();var t=e.pkcs5=e.pkcs5||{},n;return e.util.isNodejs&&!e.options.usePureJavaScript&&(n=yg),sf=e.pbkdf2=t.pbkdf2=function(r,i,a,o,s,l){if(typeof s=="function"&&(l=s,s=null),e.util.isNodejs&&!e.options.usePureJavaScript&&n.pbkdf2&&(s===null||typeof s!="object")&&(n.pbkdf2Sync.length>4||!s||s==="sha1"))return typeof s!="string"&&(s="sha1"),r=Buffer.from(r,"binary"),i=Buffer.from(i,"binary"),l?n.pbkdf2Sync.length===4?n.pbkdf2(r,i,a,o,function(E,x){if(E)return l(E);l(null,x.toString("binary"))}):n.pbkdf2(r,i,a,o,s,function(E,x){if(E)return l(E);l(null,x.toString("binary"))}):n.pbkdf2Sync.length===4?n.pbkdf2Sync(r,i,a,o).toString("binary"):n.pbkdf2Sync(r,i,a,o,s).toString("binary");if((typeof s>"u"||s===null)&&(s="sha1"),typeof s=="string"){if(!(s in e.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=e.md[s].create()}var u=s.digestLength;if(o>4294967295*u){var c=new Error("Derived key is too long.");if(l)return l(c);throw c}var p=Math.ceil(o/u),g=o-(p-1)*u,d=e.hmac.create();d.start(s,r);var m="",b,y,f;if(!l){for(var v=1;v<=p;++v){d.start(null,null),d.update(i),d.update(e.util.int32ToBytes(v)),b=f=d.digest().getBytes();for(var C=2;C<=a;++C)d.start(null,null),d.update(f),y=d.digest().getBytes(),b=e.util.xorBytes(b,y,u),f=y;m+=v<p?b:b.substr(0,g)}return m}var v=1,C;function S(){if(v>p)return l(null,m);d.start(null,null),d.update(i),d.update(e.util.int32ToBytes(v)),b=f=d.digest().getBytes(),C=2,_()}function _(){if(C<=a)return d.start(null,null),d.update(f),y=d.digest().getBytes(),b=e.util.xorBytes(b,y,u),f=y,++C,e.util.setImmediate(_);m+=v<p?b:b.substr(0,g),++v,S()}S()},sf}var Wl={exports:{}},lf={exports:{}},Hm;function qx(){if(Hm)return lf.exports;Hm=1;var e=je();Ii(),Xe();var t=lf.exports=e.sha256=e.sha256||{};e.md.sha256=e.md.algorithms.sha256=t,t.create=function(){r||a();var s=null,l=e.util.createBuffer(),u=new Array(64),c={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return c.start=function(){c.messageLength=0,c.fullMessageLength=c.messageLength64=[];for(var p=c.messageLengthSize/4,g=0;g<p;++g)c.fullMessageLength.push(0);return l=e.util.createBuffer(),s={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},c},c.start(),c.update=function(p,g){g==="utf8"&&(p=e.util.encodeUtf8(p));var d=p.length;c.messageLength+=d,d=[d/4294967296>>>0,d>>>0];for(var m=c.fullMessageLength.length-1;m>=0;--m)c.fullMessageLength[m]+=d[1],d[1]=d[0]+(c.fullMessageLength[m]/4294967296>>>0),c.fullMessageLength[m]=c.fullMessageLength[m]>>>0,d[0]=d[1]/4294967296>>>0;return l.putBytes(p),o(s,u,l),(l.read>2048||l.length()===0)&&l.compact(),c},c.digest=function(){var p=e.util.createBuffer();p.putBytes(l.bytes());var g=c.fullMessageLength[c.fullMessageLength.length-1]+c.messageLengthSize,d=g&c.blockLength-1;p.putBytes(n.substr(0,c.blockLength-d));for(var m,b,y=c.fullMessageLength[0]*8,f=0;f<c.fullMessageLength.length-1;++f)m=c.fullMessageLength[f+1]*8,b=m/4294967296>>>0,y+=b,p.putInt32(y>>>0),y=m>>>0;p.putInt32(y);var v={h0:s.h0,h1:s.h1,h2:s.h2,h3:s.h3,h4:s.h4,h5:s.h5,h6:s.h6,h7:s.h7};o(v,u,p);var C=e.util.createBuffer();return C.putInt32(v.h0),C.putInt32(v.h1),C.putInt32(v.h2),C.putInt32(v.h3),C.putInt32(v.h4),C.putInt32(v.h5),C.putInt32(v.h6),C.putInt32(v.h7),C},c};var n=null,r=!1,i=null;function a(){n="",n+=e.util.fillString("\0",64),i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=!0}function o(s,l,u){for(var c,p,g,d,m,b,y,f,v,C,S,_,E,x,h,w=u.length();w>=64;){for(y=0;y<16;++y)l[y]=u.getInt32();for(;y<64;++y)c=l[y-2],c=(c>>>17|c<<15)^(c>>>19|c<<13)^c>>>10,p=l[y-15],p=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,l[y]=c+l[y-7]+p+l[y-16]|0;for(f=s.h0,v=s.h1,C=s.h2,S=s.h3,_=s.h4,E=s.h5,x=s.h6,h=s.h7,y=0;y<64;++y)d=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),m=x^_&(E^x),g=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),b=f&v|C&(f^v),c=h+d+m+i[y]+l[y],p=g+b,h=x,x=E,E=_,_=S+c>>>0,S=C,C=v,v=f,f=c+p>>>0;s.h0=s.h0+f|0,s.h1=s.h1+v|0,s.h2=s.h2+C|0,s.h3=s.h3+S|0,s.h4=s.h4+_|0,s.h5=s.h5+E|0,s.h6=s.h6+x|0,s.h7=s.h7+h|0,w-=64}}return lf.exports}var uf={exports:{}},jm;function Jx(){if(jm)return uf.exports;jm=1;var e=je();Xe();var t=null;e.util.isNodejs&&!e.options.usePureJavaScript&&!process.versions["node-webkit"]&&(t=yg);var n=uf.exports=e.prng=e.prng||{};return n.create=function(r){for(var i={plugin:r,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},a=r.md,o=new Array(32),s=0;s<32;++s)o[s]=a.create();i.pools=o,i.pool=0,i.generate=function(g,d){if(!d)return i.generateSync(g);var m=i.plugin.cipher,b=i.plugin.increment,y=i.plugin.formatKey,f=i.plugin.formatSeed,v=e.util.createBuffer();i.key=null,C();function C(S){if(S)return d(S);if(v.length()>=g)return d(null,v.getBytes(g));if(i.generated>1048575&&(i.key=null),i.key===null)return e.util.nextTick(function(){l(C)});var _=m(i.key,i.seed);i.generated+=_.length,v.putBytes(_),i.key=y(m(i.key,b(i.seed))),i.seed=f(m(i.key,i.seed)),e.util.setImmediate(C)}},i.generateSync=function(g){var d=i.plugin.cipher,m=i.plugin.increment,b=i.plugin.formatKey,y=i.plugin.formatSeed;i.key=null;for(var f=e.util.createBuffer();f.length()<g;){i.generated>1048575&&(i.key=null),i.key===null&&u();var v=d(i.key,i.seed);i.generated+=v.length,f.putBytes(v),i.key=b(d(i.key,m(i.seed))),i.seed=y(d(i.key,i.seed))}return f.getBytes(g)};function l(g){if(i.pools[0].messageLength>=32)return c(),g();var d=32-i.pools[0].messageLength<<5;i.seedFile(d,function(m,b){if(m)return g(m);i.collect(b),c(),g()})}function u(){if(i.pools[0].messageLength>=32)return c();var g=32-i.pools[0].messageLength<<5;i.collect(i.seedFileSync(g)),c()}function c(){i.reseeds=i.reseeds===4294967295?0:i.reseeds+1;var g=i.plugin.md.create();g.update(i.keyBytes);for(var d=1,m=0;m<32;++m)i.reseeds%d===0&&(g.update(i.pools[m].digest().getBytes()),i.pools[m].start()),d=d<<1;i.keyBytes=g.digest().getBytes(),g.start(),g.update(i.keyBytes);var b=g.digest().getBytes();i.key=i.plugin.formatKey(i.keyBytes),i.seed=i.plugin.formatSeed(b),i.generated=0}function p(g){var d=null,m=e.util.globalScope,b=m.crypto||m.msCrypto;b&&b.getRandomValues&&(d=function(h){return b.getRandomValues(h)});var y=e.util.createBuffer();if(d)for(;y.length()<g;){var f=Math.max(1,Math.min(g-y.length(),65536)/4),v=new Uint32Array(Math.floor(f));try{d(v);for(var C=0;C<v.length;++C)y.putInt32(v[C])}catch(h){if(!(typeof QuotaExceededError<"u"&&h instanceof QuotaExceededError))throw h}}if(y.length()<g)for(var S,_,E,x=Math.floor(Math.random()*65536);y.length()<g;){_=16807*(x&65535),S=16807*(x>>16),_+=(S&32767)<<16,_+=S>>15,_=(_&2147483647)+(_>>31),x=_&4294967295;for(var C=0;C<3;++C)E=x>>>(C<<3),E^=Math.floor(Math.random()*256),y.putByte(E&255)}return y.getBytes(g)}return t?(i.seedFile=function(g,d){t.randomBytes(g,function(m,b){if(m)return d(m);d(null,b.toString())})},i.seedFileSync=function(g){return t.randomBytes(g).toString()}):(i.seedFile=function(g,d){try{d(null,p(g))}catch(m){d(m)}},i.seedFileSync=p),i.collect=function(g){for(var d=g.length,m=0;m<d;++m)i.pools[i.pool].update(g.substr(m,1)),i.pool=i.pool===31?0:i.pool+1},i.collectInt=function(g,d){for(var m="",b=0;b<d;b+=8)m+=String.fromCharCode(g>>b&255);i.collect(m)},i.registerWorker=function(g){if(g===self)i.seedFile=function(m,b){function y(f){var v=f.data;v.forge&&v.forge.prng&&(self.removeEventListener("message",y),b(v.forge.prng.err,v.forge.prng.bytes))}self.addEventListener("message",y),self.postMessage({forge:{prng:{needed:m}}})};else{var d=function(m){var b=m.data;b.forge&&b.forge.prng&&i.seedFile(b.forge.prng.needed,function(y,f){g.postMessage({forge:{prng:{err:y,bytes:f}}})})};g.addEventListener("message",d)}},i},uf.exports}var zm;function Dr(){if(zm)return Wl.exports;zm=1;var e=je();return Ka(),qx(),Jx(),Xe(),function(){if(e.random&&e.random.getBytes){Wl.exports=e.random;return}(function(t){var n={},r=new Array(4),i=e.util.createBuffer();n.formatKey=function(g){var d=e.util.createBuffer(g);return g=new Array(4),g[0]=d.getInt32(),g[1]=d.getInt32(),g[2]=d.getInt32(),g[3]=d.getInt32(),e.aes._expandKey(g,!1)},n.formatSeed=function(g){var d=e.util.createBuffer(g);return g=new Array(4),g[0]=d.getInt32(),g[1]=d.getInt32(),g[2]=d.getInt32(),g[3]=d.getInt32(),g},n.cipher=function(g,d){return e.aes._updateBlock(g,d,r,!1),i.putInt32(r[0]),i.putInt32(r[1]),i.putInt32(r[2]),i.putInt32(r[3]),i.getBytes()},n.increment=function(g){return++g[3],g},n.md=e.md.sha256;function a(){var g=e.prng.create(n);return g.getBytes=function(d,m){return g.generate(d,m)},g.getBytesSync=function(d){return g.generate(d)},g}var o=a(),s=null,l=e.util.globalScope,u=l.crypto||l.msCrypto;if(u&&u.getRandomValues&&(s=function(g){return u.getRandomValues(g)}),e.options.usePureJavaScript||!e.util.isNodejs&&!s){if(o.collectInt(+new Date,32),typeof navigator<"u"){var c="";for(var p in navigator)try{typeof navigator[p]=="string"&&(c+=navigator[p])}catch{}o.collect(c),c=null}t&&(t().mousemove(function(g){o.collectInt(g.clientX,16),o.collectInt(g.clientY,16)}),t().keypress(function(g){o.collectInt(g.charCode,8)}))}if(!e.random)e.random=o;else for(var p in o)e.random[p]=o[p];e.random.createInstance=a,Wl.exports=e.random})(typeof jQuery<"u"?jQuery:null)}(),Wl.exports}var cf,Gm;function Qx(){if(Gm)return cf;Gm=1;var e=je();Xe();var t=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],n=[1,2,3,5],r=function(o,s){return o<<s&65535|(o&65535)>>16-s},i=function(o,s){return(o&65535)>>s|o<<16-s&65535};cf=e.rc2=e.rc2||{},e.rc2.expandKey=function(o,s){typeof o=="string"&&(o=e.util.createBuffer(o)),s=s||128;var l=o,u=o.length(),c=s,p=Math.ceil(c/8),g=255>>(c&7),d;for(d=u;d<128;d++)l.putByte(t[l.at(d-1)+l.at(d-u)&255]);for(l.setAt(128-p,t[l.at(128-p)&g]),d=127-p;d>=0;d--)l.setAt(d,t[l.at(d+1)^l.at(d+p)]);return l};var a=function(o,s,l){var u=!1,c=null,p=null,g=null,d,m,b,y,f=[];for(o=e.rc2.expandKey(o,s),b=0;b<64;b++)f.push(o.getInt16Le());l?(d=function(S){for(b=0;b<4;b++)S[b]+=f[y]+(S[(b+3)%4]&S[(b+2)%4])+(~S[(b+3)%4]&S[(b+1)%4]),S[b]=r(S[b],n[b]),y++},m=function(S){for(b=0;b<4;b++)S[b]+=f[S[(b+3)%4]&63]}):(d=function(S){for(b=3;b>=0;b--)S[b]=i(S[b],n[b]),S[b]-=f[y]+(S[(b+3)%4]&S[(b+2)%4])+(~S[(b+3)%4]&S[(b+1)%4]),y--},m=function(S){for(b=3;b>=0;b--)S[b]-=f[S[(b+3)%4]&63]});var v=function(S){var _=[];for(b=0;b<4;b++){var E=c.getInt16Le();g!==null&&(l?E^=g.getInt16Le():g.putInt16Le(E)),_.push(E&65535)}y=l?0:63;for(var x=0;x<S.length;x++)for(var h=0;h<S[x][0];h++)S[x][1](_);for(b=0;b<4;b++)g!==null&&(l?g.putInt16Le(_[b]):_[b]^=g.getInt16Le()),p.putInt16Le(_[b])},C=null;return C={start:function(S,_){S&&typeof S=="string"&&(S=e.util.createBuffer(S)),u=!1,c=e.util.createBuffer(),p=_||new e.util.createBuffer,g=S,C.output=p},update:function(S){for(u||c.putBuffer(S);c.length()>=8;)v([[5,d],[1,m],[6,d],[1,m],[5,d]])},finish:function(S){var _=!0;if(l)if(S)_=S(8,c,!l);else{var E=c.length()===8?8:8-c.length();c.fillWithByte(E,E)}if(_&&(u=!0,C.update()),!l&&(_=c.length()===0,_))if(S)_=S(8,p,!l);else{var x=p.length(),h=p.at(x-1);h>x?_=!1:p.truncate(h)}return _}},C};return e.rc2.startEncrypting=function(o,s,l){var u=e.rc2.createEncryptionCipher(o,128);return u.start(s,l),u},e.rc2.createEncryptionCipher=function(o,s){return a(o,s,!0)},e.rc2.startDecrypting=function(o,s,l){var u=e.rc2.createDecryptionCipher(o,128);return u.start(s,l),u},e.rc2.createDecryptionCipher=function(o,s){return a(o,s,!1)},cf}var df,Wm;function Jc(){if(Wm)return df;Wm=1;var e=je();df=e.jsbn=e.jsbn||{};var t;function n(j,W,Y){this.data=[],j!=null&&(typeof j=="number"?this.fromNumber(j,W,Y):W==null&&typeof j!="string"?this.fromString(j,256):this.fromString(j,W))}e.jsbn.BigInteger=n;function r(){return new n(null)}function i(j,W,Y,re,de,he){for(;--he>=0;){var ye=W*this.data[j++]+Y.data[re]+de;de=Math.floor(ye/67108864),Y.data[re++]=ye&67108863}return de}function a(j,W,Y,re,de,he){for(var ye=W&32767,me=W>>15;--he>=0;){var st=this.data[j]&32767,on=this.data[j++]>>15,Zn=me*st+on*ye;st=ye*st+((Zn&32767)<<15)+Y.data[re]+(de&1073741823),de=(st>>>30)+(Zn>>>15)+me*on+(de>>>30),Y.data[re++]=st&1073741823}return de}function o(j,W,Y,re,de,he){for(var ye=W&16383,me=W>>14;--he>=0;){var st=this.data[j]&16383,on=this.data[j++]>>14,Zn=me*st+on*ye;st=ye*st+((Zn&16383)<<14)+Y.data[re]+de,de=(st>>28)+(Zn>>14)+me*on,Y.data[re++]=st&268435455}return de}typeof navigator>"u"?(n.prototype.am=o,t=28):navigator.appName=="Microsoft Internet Explorer"?(n.prototype.am=a,t=30):navigator.appName!="Netscape"?(n.prototype.am=i,t=26):(n.prototype.am=o,t=28),n.prototype.DB=t,n.prototype.DM=(1<<t)-1,n.prototype.DV=1<<t;var s=52;n.prototype.FV=Math.pow(2,s),n.prototype.F1=s-t,n.prototype.F2=2*t-s;var l="0123456789abcdefghijklmnopqrstuvwxyz",u=new Array,c,p;for(c=48,p=0;p<=9;++p)u[c++]=p;for(c=97,p=10;p<36;++p)u[c++]=p;for(c=65,p=10;p<36;++p)u[c++]=p;function g(j){return l.charAt(j)}function d(j,W){var Y=u[j.charCodeAt(W)];return Y??-1}function m(j){for(var W=this.t-1;W>=0;--W)j.data[W]=this.data[W];j.t=this.t,j.s=this.s}function b(j){this.t=1,this.s=j<0?-1:0,j>0?this.data[0]=j:j<-1?this.data[0]=j+this.DV:this.t=0}function y(j){var W=r();return W.fromInt(j),W}function f(j,W){var Y;if(W==16)Y=4;else if(W==8)Y=3;else if(W==256)Y=8;else if(W==2)Y=1;else if(W==32)Y=5;else if(W==4)Y=2;else{this.fromRadix(j,W);return}this.t=0,this.s=0;for(var re=j.length,de=!1,he=0;--re>=0;){var ye=Y==8?j[re]&255:d(j,re);if(ye<0){j.charAt(re)=="-"&&(de=!0);continue}de=!1,he==0?this.data[this.t++]=ye:he+Y>this.DB?(this.data[this.t-1]|=(ye&(1<<this.DB-he)-1)<<he,this.data[this.t++]=ye>>this.DB-he):this.data[this.t-1]|=ye<<he,he+=Y,he>=this.DB&&(he-=this.DB)}Y==8&&(j[0]&128)!=0&&(this.s=-1,he>0&&(this.data[this.t-1]|=(1<<this.DB-he)-1<<he)),this.clamp(),de&&n.ZERO.subTo(this,this)}function v(){for(var j=this.s&this.DM;this.t>0&&this.data[this.t-1]==j;)--this.t}function C(j){if(this.s<0)return"-"+this.negate().toString(j);var W;if(j==16)W=4;else if(j==8)W=3;else if(j==2)W=1;else if(j==32)W=5;else if(j==4)W=2;else return this.toRadix(j);var Y=(1<<W)-1,re,de=!1,he="",ye=this.t,me=this.DB-ye*this.DB%W;if(ye-- >0)for(me<this.DB&&(re=this.data[ye]>>me)>0&&(de=!0,he=g(re));ye>=0;)me<W?(re=(this.data[ye]&(1<<me)-1)<<W-me,re|=this.data[--ye]>>(me+=this.DB-W)):(re=this.data[ye]>>(me-=W)&Y,me<=0&&(me+=this.DB,--ye)),re>0&&(de=!0),de&&(he+=g(re));return de?he:"0"}function S(){var j=r();return n.ZERO.subTo(this,j),j}function _(){return this.s<0?this.negate():this}function E(j){var W=this.s-j.s;if(W!=0)return W;var Y=this.t;if(W=Y-j.t,W!=0)return this.s<0?-W:W;for(;--Y>=0;)if((W=this.data[Y]-j.data[Y])!=0)return W;return 0}function x(j){var W=1,Y;return(Y=j>>>16)!=0&&(j=Y,W+=16),(Y=j>>8)!=0&&(j=Y,W+=8),(Y=j>>4)!=0&&(j=Y,W+=4),(Y=j>>2)!=0&&(j=Y,W+=2),(Y=j>>1)!=0&&(j=Y,W+=1),W}function h(){return this.t<=0?0:this.DB*(this.t-1)+x(this.data[this.t-1]^this.s&this.DM)}function w(j,W){var Y;for(Y=this.t-1;Y>=0;--Y)W.data[Y+j]=this.data[Y];for(Y=j-1;Y>=0;--Y)W.data[Y]=0;W.t=this.t+j,W.s=this.s}function D(j,W){for(var Y=j;Y<this.t;++Y)W.data[Y-j]=this.data[Y];W.t=Math.max(this.t-j,0),W.s=this.s}function I(j,W){var Y=j%this.DB,re=this.DB-Y,de=(1<<re)-1,he=Math.floor(j/this.DB),ye=this.s<<Y&this.DM,me;for(me=this.t-1;me>=0;--me)W.data[me+he+1]=this.data[me]>>re|ye,ye=(this.data[me]&de)<<Y;for(me=he-1;me>=0;--me)W.data[me]=0;W.data[he]=ye,W.t=this.t+he+1,W.s=this.s,W.clamp()}function T(j,W){W.s=this.s;var Y=Math.floor(j/this.DB);if(Y>=this.t){W.t=0;return}var re=j%this.DB,de=this.DB-re,he=(1<<re)-1;W.data[0]=this.data[Y]>>re;for(var ye=Y+1;ye<this.t;++ye)W.data[ye-Y-1]|=(this.data[ye]&he)<<de,W.data[ye-Y]=this.data[ye]>>re;re>0&&(W.data[this.t-Y-1]|=(this.s&he)<<de),W.t=this.t-Y,W.clamp()}function F(j,W){for(var Y=0,re=0,de=Math.min(j.t,this.t);Y<de;)re+=this.data[Y]-j.data[Y],W.data[Y++]=re&this.DM,re>>=this.DB;if(j.t<this.t){for(re-=j.s;Y<this.t;)re+=this.data[Y],W.data[Y++]=re&this.DM,re>>=this.DB;re+=this.s}else{for(re+=this.s;Y<j.t;)re-=j.data[Y],W.data[Y++]=re&this.DM,re>>=this.DB;re-=j.s}W.s=re<0?-1:0,re<-1?W.data[Y++]=this.DV+re:re>0&&(W.data[Y++]=re),W.t=Y,W.clamp()}function P(j,W){var Y=this.abs(),re=j.abs(),de=Y.t;for(W.t=de+re.t;--de>=0;)W.data[de]=0;for(de=0;de<re.t;++de)W.data[de+Y.t]=Y.am(0,re.data[de],W,de,0,Y.t);W.s=0,W.clamp(),this.s!=j.s&&n.ZERO.subTo(W,W)}function k(j){for(var W=this.abs(),Y=j.t=2*W.t;--Y>=0;)j.data[Y]=0;for(Y=0;Y<W.t-1;++Y){var re=W.am(Y,W.data[Y],j,2*Y,0,1);(j.data[Y+W.t]+=W.am(Y+1,2*W.data[Y],j,2*Y+1,re,W.t-Y-1))>=W.DV&&(j.data[Y+W.t]-=W.DV,j.data[Y+W.t+1]=1)}j.t>0&&(j.data[j.t-1]+=W.am(Y,W.data[Y],j,2*Y,0,1)),j.s=0,j.clamp()}function R(j,W,Y){var re=j.abs();if(!(re.t<=0)){var de=this.abs();if(de.t<re.t){W!=null&&W.fromInt(0),Y!=null&&this.copyTo(Y);return}Y==null&&(Y=r());var he=r(),ye=this.s,me=j.s,st=this.DB-x(re.data[re.t-1]);st>0?(re.lShiftTo(st,he),de.lShiftTo(st,Y)):(re.copyTo(he),de.copyTo(Y));var on=he.t,Zn=he.data[on-1];if(Zn!=0){var Ln=Zn*(1<<this.F1)+(on>1?he.data[on-2]>>this.F2:0),ri=this.FV/Ln,Hl=(1<<this.F1)/Ln,gr=1<<this.F2,pr=Y.t,jl=pr-on,Bi=W??r();for(he.dlShiftTo(jl,Bi),Y.compareTo(Bi)>=0&&(Y.data[Y.t++]=1,Y.subTo(Bi,Y)),n.ONE.dlShiftTo(on,Bi),Bi.subTo(he,he);he.t<on;)he.data[he.t++]=0;for(;--jl>=0;){var Hd=Y.data[--pr]==Zn?this.DM:Math.floor(Y.data[pr]*ri+(Y.data[pr-1]+gr)*Hl);if((Y.data[pr]+=he.am(0,Hd,Y,jl,0,on))<Hd)for(he.dlShiftTo(jl,Bi),Y.subTo(Bi,Y);Y.data[pr]<--Hd;)Y.subTo(Bi,Y)}W!=null&&(Y.drShiftTo(on,W),ye!=me&&n.ZERO.subTo(W,W)),Y.t=on,Y.clamp(),st>0&&Y.rShiftTo(st,Y),ye<0&&n.ZERO.subTo(Y,Y)}}}function M(j){var W=r();return this.abs().divRemTo(j,null,W),this.s<0&&W.compareTo(n.ZERO)>0&&j.subTo(W,W),W}function O(j){this.m=j}function z(j){return j.s<0||j.compareTo(this.m)>=0?j.mod(this.m):j}function G(j){return j}function U(j){j.divRemTo(this.m,null,j)}function J(j,W,Y){j.multiplyTo(W,Y),this.reduce(Y)}function Q(j,W){j.squareTo(W),this.reduce(W)}O.prototype.convert=z,O.prototype.revert=G,O.prototype.reduce=U,O.prototype.mulTo=J,O.prototype.sqrTo=Q;function ee(){if(this.t<1)return 0;var j=this.data[0];if((j&1)==0)return 0;var W=j&3;return W=W*(2-(j&15)*W)&15,W=W*(2-(j&255)*W)&255,W=W*(2-((j&65535)*W&65535))&65535,W=W*(2-j*W%this.DV)%this.DV,W>0?this.DV-W:-W}function q(j){this.m=j,this.mp=j.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<j.DB-15)-1,this.mt2=2*j.t}function Z(j){var W=r();return j.abs().dlShiftTo(this.m.t,W),W.divRemTo(this.m,null,W),j.s<0&&W.compareTo(n.ZERO)>0&&this.m.subTo(W,W),W}function se(j){var W=r();return j.copyTo(W),this.reduce(W),W}function te(j){for(;j.t<=this.mt2;)j.data[j.t++]=0;for(var W=0;W<this.m.t;++W){var Y=j.data[W]&32767,re=Y*this.mpl+((Y*this.mph+(j.data[W]>>15)*this.mpl&this.um)<<15)&j.DM;for(Y=W+this.m.t,j.data[Y]+=this.m.am(0,re,j,W,0,this.m.t);j.data[Y]>=j.DV;)j.data[Y]-=j.DV,j.data[++Y]++}j.clamp(),j.drShiftTo(this.m.t,j),j.compareTo(this.m)>=0&&j.subTo(this.m,j)}function $(j,W){j.squareTo(W),this.reduce(W)}function H(j,W,Y){j.multiplyTo(W,Y),this.reduce(Y)}q.prototype.convert=Z,q.prototype.revert=se,q.prototype.reduce=te,q.prototype.mulTo=H,q.prototype.sqrTo=$;function V(){return(this.t>0?this.data[0]&1:this.s)==0}function A(j,W){if(j>4294967295||j<1)return n.ONE;var Y=r(),re=r(),de=W.convert(this),he=x(j)-1;for(de.copyTo(Y);--he>=0;)if(W.sqrTo(Y,re),(j&1<<he)>0)W.mulTo(re,de,Y);else{var ye=Y;Y=re,re=ye}return W.revert(Y)}function L(j,W){var Y;return j<256||W.isEven()?Y=new O(W):Y=new q(W),this.exp(j,Y)}n.prototype.copyTo=m,n.prototype.fromInt=b,n.prototype.fromString=f,n.prototype.clamp=v,n.prototype.dlShiftTo=w,n.prototype.drShiftTo=D,n.prototype.lShiftTo=I,n.prototype.rShiftTo=T,n.prototype.subTo=F,n.prototype.multiplyTo=P,n.prototype.squareTo=k,n.prototype.divRemTo=R,n.prototype.invDigit=ee,n.prototype.isEven=V,n.prototype.exp=A,n.prototype.toString=C,n.prototype.negate=S,n.prototype.abs=_,n.prototype.compareTo=E,n.prototype.bitLength=h,n.prototype.mod=M,n.prototype.modPowInt=L,n.ZERO=y(0),n.ONE=y(1);function K(){var j=r();return this.copyTo(j),j}function X(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function le(){return this.t==0?this.s:this.data[0]<<24>>24}function ie(){return this.t==0?this.s:this.data[0]<<16>>16}function oe(j){return Math.floor(Math.LN2*this.DB/Math.log(j))}function ne(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function ue(j){if(j==null&&(j=10),this.signum()==0||j<2||j>36)return"0";var W=this.chunkSize(j),Y=Math.pow(j,W),re=y(Y),de=r(),he=r(),ye="";for(this.divRemTo(re,de,he);de.signum()>0;)ye=(Y+he.intValue()).toString(j).substr(1)+ye,de.divRemTo(re,de,he);return he.intValue().toString(j)+ye}function be(j,W){this.fromInt(0),W==null&&(W=10);for(var Y=this.chunkSize(W),re=Math.pow(W,Y),de=!1,he=0,ye=0,me=0;me<j.length;++me){var st=d(j,me);if(st<0){j.charAt(me)=="-"&&this.signum()==0&&(de=!0);continue}ye=W*ye+st,++he>=Y&&(this.dMultiply(re),this.dAddOffset(ye,0),he=0,ye=0)}he>0&&(this.dMultiply(Math.pow(W,he)),this.dAddOffset(ye,0)),de&&n.ZERO.subTo(this,this)}function ve(j,W,Y){if(typeof W=="number")if(j<2)this.fromInt(1);else for(this.fromNumber(j,Y),this.testBit(j-1)||this.bitwiseTo(n.ONE.shiftLeft(j-1),St,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(W);)this.dAddOffset(2,0),this.bitLength()>j&&this.subTo(n.ONE.shiftLeft(j-1),this);else{var re=new Array,de=j&7;re.length=(j>>3)+1,W.nextBytes(re),de>0?re[0]&=(1<<de)-1:re[0]=0,this.fromString(re,256)}}function pe(){var j=this.t,W=new Array;W[0]=this.s;var Y=this.DB-j*this.DB%8,re,de=0;if(j-- >0)for(Y<this.DB&&(re=this.data[j]>>Y)!=(this.s&this.DM)>>Y&&(W[de++]=re|this.s<<this.DB-Y);j>=0;)Y<8?(re=(this.data[j]&(1<<Y)-1)<<8-Y,re|=this.data[--j]>>(Y+=this.DB-8)):(re=this.data[j]>>(Y-=8)&255,Y<=0&&(Y+=this.DB,--j)),(re&128)!=0&&(re|=-256),de==0&&(this.s&128)!=(re&128)&&++de,(de>0||re!=this.s)&&(W[de++]=re);return W}function $e(j){return this.compareTo(j)==0}function Le(j){return this.compareTo(j)<0?this:j}function Ue(j){return this.compareTo(j)>0?this:j}function nt(j,W,Y){var re,de,he=Math.min(j.t,this.t);for(re=0;re<he;++re)Y.data[re]=W(this.data[re],j.data[re]);if(j.t<this.t){for(de=j.s&this.DM,re=he;re<this.t;++re)Y.data[re]=W(this.data[re],de);Y.t=this.t}else{for(de=this.s&this.DM,re=he;re<j.t;++re)Y.data[re]=W(de,j.data[re]);Y.t=j.t}Y.s=W(this.s,j.s),Y.clamp()}function lt(j,W){return j&W}function ut(j){var W=r();return this.bitwiseTo(j,lt,W),W}function St(j,W){return j|W}function Rt(j){var W=r();return this.bitwiseTo(j,St,W),W}function Ot(j,W){return j^W}function Cn(j){var W=r();return this.bitwiseTo(j,Ot,W),W}function En(j,W){return j&~W}function On(j){var W=r();return this.bitwiseTo(j,En,W),W}function Kn(){for(var j=r(),W=0;W<this.t;++W)j.data[W]=this.DM&~this.data[W];return j.t=this.t,j.s=~this.s,j}function fr(j){var W=r();return j<0?this.rShiftTo(-j,W):this.lShiftTo(j,W),W}function Tr(j){var W=r();return j<0?this.lShiftTo(-j,W):this.rShiftTo(j,W),W}function ni(j){if(j==0)return-1;var W=0;return(j&65535)==0&&(j>>=16,W+=16),(j&255)==0&&(j>>=8,W+=8),(j&15)==0&&(j>>=4,W+=4),(j&3)==0&&(j>>=2,W+=2),(j&1)==0&&++W,W}function Ri(){for(var j=0;j<this.t;++j)if(this.data[j]!=0)return j*this.DB+ni(this.data[j]);return this.s<0?this.t*this.DB:-1}function da(j){for(var W=0;j!=0;)j&=j-1,++W;return W}function no(){for(var j=0,W=this.s&this.DM,Y=0;Y<this.t;++Y)j+=da(this.data[Y]^W);return j}function as(j){var W=Math.floor(j/this.DB);return W>=this.t?this.s!=0:(this.data[W]&1<<j%this.DB)!=0}function Vl(j,W){var Y=n.ONE.shiftLeft(j);return this.bitwiseTo(Y,W,Y),Y}function Wt(j){return this.changeBit(j,St)}function Ut(j){return this.changeBit(j,En)}function Xt(j){return this.changeBit(j,Ot)}function Yt(j,W){for(var Y=0,re=0,de=Math.min(j.t,this.t);Y<de;)re+=this.data[Y]+j.data[Y],W.data[Y++]=re&this.DM,re>>=this.DB;if(j.t<this.t){for(re+=j.s;Y<this.t;)re+=this.data[Y],W.data[Y++]=re&this.DM,re>>=this.DB;re+=this.s}else{for(re+=this.s;Y<j.t;)re+=j.data[Y],W.data[Y++]=re&this.DM,re>>=this.DB;re+=j.s}W.s=re<0?-1:0,re>0?W.data[Y++]=re:re<-1&&(W.data[Y++]=this.DV+re),W.t=Y,W.clamp()}function Kt(j){var W=r();return this.addTo(j,W),W}function Zt(j){var W=r();return this.subTo(j,W),W}function qt(j){var W=r();return this.multiplyTo(j,W),W}function Jt(j){var W=r();return this.divRemTo(j,W,null),W}function Qt(j){var W=r();return this.divRemTo(j,null,W),W}function en(j){var W=r(),Y=r();return this.divRemTo(j,W,Y),new Array(W,Y)}function tn(j){this.data[this.t]=this.am(0,j-1,this,0,0,this.t),++this.t,this.clamp()}function nn(j,W){if(j!=0){for(;this.t<=W;)this.data[this.t++]=0;for(this.data[W]+=j;this.data[W]>=this.DV;)this.data[W]-=this.DV,++W>=this.t&&(this.data[this.t++]=0),++this.data[W]}}function wt(){}function Lt(j){return j}function rn(j,W,Y){j.multiplyTo(W,Y)}function an(j,W){j.squareTo(W)}wt.prototype.convert=Lt,wt.prototype.revert=Lt,wt.prototype.mulTo=rn,wt.prototype.sqrTo=an;function N_(j){return this.exp(j,new wt)}function M_(j,W,Y){var re=Math.min(this.t+j.t,W);for(Y.s=0,Y.t=re;re>0;)Y.data[--re]=0;var de;for(de=Y.t-this.t;re<de;++re)Y.data[re+this.t]=this.am(0,j.data[re],Y,re,0,this.t);for(de=Math.min(j.t,W);re<de;++re)this.am(0,j.data[re],Y,re,0,W-re);Y.clamp()}function O_(j,W,Y){--W;var re=Y.t=this.t+j.t-W;for(Y.s=0;--re>=0;)Y.data[re]=0;for(re=Math.max(W-this.t,0);re<j.t;++re)Y.data[this.t+re-W]=this.am(W-re,j.data[re],Y,0,0,this.t+re-W);Y.clamp(),Y.drShiftTo(1,Y)}function ro(j){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*j.t,this.r2),this.mu=this.r2.divide(j),this.m=j}function L_(j){if(j.s<0||j.t>2*this.m.t)return j.mod(this.m);if(j.compareTo(this.m)<0)return j;var W=r();return j.copyTo(W),this.reduce(W),W}function V_(j){return j}function H_(j){for(j.drShiftTo(this.m.t-1,this.r2),j.t>this.m.t+1&&(j.t=this.m.t+1,j.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);j.compareTo(this.r2)<0;)j.dAddOffset(1,this.m.t+1);for(j.subTo(this.r2,j);j.compareTo(this.m)>=0;)j.subTo(this.m,j)}function j_(j,W){j.squareTo(W),this.reduce(W)}function z_(j,W,Y){j.multiplyTo(W,Y),this.reduce(Y)}ro.prototype.convert=L_,ro.prototype.revert=V_,ro.prototype.reduce=H_,ro.prototype.mulTo=z_,ro.prototype.sqrTo=j_;function G_(j,W){var Y=j.bitLength(),re,de=y(1),he;if(Y<=0)return de;Y<18?re=1:Y<48?re=3:Y<144?re=4:Y<768?re=5:re=6,Y<8?he=new O(W):W.isEven()?he=new ro(W):he=new q(W);var ye=new Array,me=3,st=re-1,on=(1<<re)-1;if(ye[1]=he.convert(this),re>1){var Zn=r();for(he.sqrTo(ye[1],Zn);me<=on;)ye[me]=r(),he.mulTo(Zn,ye[me-2],ye[me]),me+=2}var Ln=j.t-1,ri,Hl=!0,gr=r(),pr;for(Y=x(j.data[Ln])-1;Ln>=0;){for(Y>=st?ri=j.data[Ln]>>Y-st&on:(ri=(j.data[Ln]&(1<<Y+1)-1)<<st-Y,Ln>0&&(ri|=j.data[Ln-1]>>this.DB+Y-st)),me=re;(ri&1)==0;)ri>>=1,--me;if((Y-=me)<0&&(Y+=this.DB,--Ln),Hl)ye[ri].copyTo(de),Hl=!1;else{for(;me>1;)he.sqrTo(de,gr),he.sqrTo(gr,de),me-=2;me>0?he.sqrTo(de,gr):(pr=de,de=gr,gr=pr),he.mulTo(gr,ye[ri],de)}for(;Ln>=0&&(j.data[Ln]&1<<Y)==0;)he.sqrTo(de,gr),pr=de,de=gr,gr=pr,--Y<0&&(Y=this.DB-1,--Ln)}return he.revert(de)}function W_(j){var W=this.s<0?this.negate():this.clone(),Y=j.s<0?j.negate():j.clone();if(W.compareTo(Y)<0){var re=W;W=Y,Y=re}var de=W.getLowestSetBit(),he=Y.getLowestSetBit();if(he<0)return W;for(de<he&&(he=de),he>0&&(W.rShiftTo(he,W),Y.rShiftTo(he,Y));W.signum()>0;)(de=W.getLowestSetBit())>0&&W.rShiftTo(de,W),(de=Y.getLowestSetBit())>0&&Y.rShiftTo(de,Y),W.compareTo(Y)>=0?(W.subTo(Y,W),W.rShiftTo(1,W)):(Y.subTo(W,Y),Y.rShiftTo(1,Y));return he>0&&Y.lShiftTo(he,Y),Y}function U_(j){if(j<=0)return 0;var W=this.DV%j,Y=this.s<0?j-1:0;if(this.t>0)if(W==0)Y=this.data[0]%j;else for(var re=this.t-1;re>=0;--re)Y=(W*Y+this.data[re])%j;return Y}function X_(j){var W=j.isEven();if(this.isEven()&&W||j.signum()==0)return n.ZERO;for(var Y=j.clone(),re=this.clone(),de=y(1),he=y(0),ye=y(0),me=y(1);Y.signum()!=0;){for(;Y.isEven();)Y.rShiftTo(1,Y),W?((!de.isEven()||!he.isEven())&&(de.addTo(this,de),he.subTo(j,he)),de.rShiftTo(1,de)):he.isEven()||he.subTo(j,he),he.rShiftTo(1,he);for(;re.isEven();)re.rShiftTo(1,re),W?((!ye.isEven()||!me.isEven())&&(ye.addTo(this,ye),me.subTo(j,me)),ye.rShiftTo(1,ye)):me.isEven()||me.subTo(j,me),me.rShiftTo(1,me);Y.compareTo(re)>=0?(Y.subTo(re,Y),W&&de.subTo(ye,de),he.subTo(me,he)):(re.subTo(Y,re),W&&ye.subTo(de,ye),me.subTo(he,me))}if(re.compareTo(n.ONE)!=0)return n.ZERO;if(me.compareTo(j)>=0)return me.subtract(j);if(me.signum()<0)me.addTo(j,me);else return me;return me.signum()<0?me.add(j):me}var hr=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Y_=(1<<26)/hr[hr.length-1];function K_(j){var W,Y=this.abs();if(Y.t==1&&Y.data[0]<=hr[hr.length-1]){for(W=0;W<hr.length;++W)if(Y.data[0]==hr[W])return!0;return!1}if(Y.isEven())return!1;for(W=1;W<hr.length;){for(var re=hr[W],de=W+1;de<hr.length&&re<Y_;)re*=hr[de++];for(re=Y.modInt(re);W<de;)if(re%hr[W++]==0)return!1}return Y.millerRabin(j)}function Z_(j){var W=this.subtract(n.ONE),Y=W.getLowestSetBit();if(Y<=0)return!1;for(var re=W.shiftRight(Y),de=q_(),he,ye=0;ye<j;++ye){do he=new n(this.bitLength(),de);while(he.compareTo(n.ONE)<=0||he.compareTo(W)>=0);var me=he.modPow(re,this);if(me.compareTo(n.ONE)!=0&&me.compareTo(W)!=0){for(var st=1;st++<Y&&me.compareTo(W)!=0;)if(me=me.modPowInt(2,this),me.compareTo(n.ONE)==0)return!1;if(me.compareTo(W)!=0)return!1}}return!0}function q_(){return{nextBytes:function(j){for(var W=0;W<j.length;++W)j[W]=Math.floor(Math.random()*256)}}}return n.prototype.chunkSize=oe,n.prototype.toRadix=ue,n.prototype.fromRadix=be,n.prototype.fromNumber=ve,n.prototype.bitwiseTo=nt,n.prototype.changeBit=Vl,n.prototype.addTo=Yt,n.prototype.dMultiply=tn,n.prototype.dAddOffset=nn,n.prototype.multiplyLowerTo=M_,n.prototype.multiplyUpperTo=O_,n.prototype.modInt=U_,n.prototype.millerRabin=Z_,n.prototype.clone=K,n.prototype.intValue=X,n.prototype.byteValue=le,n.prototype.shortValue=ie,n.prototype.signum=ne,n.prototype.toByteArray=pe,n.prototype.equals=$e,n.prototype.min=Le,n.prototype.max=Ue,n.prototype.and=ut,n.prototype.or=Rt,n.prototype.xor=Cn,n.prototype.andNot=On,n.prototype.not=Kn,n.prototype.shiftLeft=fr,n.prototype.shiftRight=Tr,n.prototype.getLowestSetBit=Ri,n.prototype.bitCount=no,n.prototype.testBit=as,n.prototype.setBit=Wt,n.prototype.clearBit=Ut,n.prototype.flipBit=Xt,n.prototype.add=Kt,n.prototype.subtract=Zt,n.prototype.multiply=qt,n.prototype.divide=Jt,n.prototype.remainder=Qt,n.prototype.divideAndRemainder=en,n.prototype.modPow=G_,n.prototype.modInverse=X_,n.prototype.pow=N_,n.prototype.gcd=W_,n.prototype.isProbablePrime=K_,df}var ff={exports:{}},hf={exports:{}},Um;function xl(){if(Um)return hf.exports;Um=1;var e=je();Ii(),Xe();var t=hf.exports=e.sha1=e.sha1||{};e.md.sha1=e.md.algorithms.sha1=t,t.create=function(){r||i();var o=null,s=e.util.createBuffer(),l=new Array(80),u={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return u.start=function(){u.messageLength=0,u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,p=0;p<c;++p)u.fullMessageLength.push(0);return s=e.util.createBuffer(),o={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},u},u.start(),u.update=function(c,p){p==="utf8"&&(c=e.util.encodeUtf8(c));var g=c.length;u.messageLength+=g,g=[g/4294967296>>>0,g>>>0];for(var d=u.fullMessageLength.length-1;d>=0;--d)u.fullMessageLength[d]+=g[1],g[1]=g[0]+(u.fullMessageLength[d]/4294967296>>>0),u.fullMessageLength[d]=u.fullMessageLength[d]>>>0,g[0]=g[1]/4294967296>>>0;return s.putBytes(c),a(o,l,s),(s.read>2048||s.length()===0)&&s.compact(),u},u.digest=function(){var c=e.util.createBuffer();c.putBytes(s.bytes());var p=u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize,g=p&u.blockLength-1;c.putBytes(n.substr(0,u.blockLength-g));for(var d,m,b=u.fullMessageLength[0]*8,y=0;y<u.fullMessageLength.length-1;++y)d=u.fullMessageLength[y+1]*8,m=d/4294967296>>>0,b+=m,c.putInt32(b>>>0),b=d>>>0;c.putInt32(b);var f={h0:o.h0,h1:o.h1,h2:o.h2,h3:o.h3,h4:o.h4};a(f,l,c);var v=e.util.createBuffer();return v.putInt32(f.h0),v.putInt32(f.h1),v.putInt32(f.h2),v.putInt32(f.h3),v.putInt32(f.h4),v},u};var n=null,r=!1;function i(){n="",n+=e.util.fillString("\0",64),r=!0}function a(o,s,l){for(var u,c,p,g,d,m,b,y,f=l.length();f>=64;){for(c=o.h0,p=o.h1,g=o.h2,d=o.h3,m=o.h4,y=0;y<16;++y)u=l.getInt32(),s[y]=u,b=d^p&(g^d),u=(c<<5|c>>>27)+b+m+1518500249+u,m=d,d=g,g=(p<<30|p>>>2)>>>0,p=c,c=u;for(;y<20;++y)u=s[y-3]^s[y-8]^s[y-14]^s[y-16],u=u<<1|u>>>31,s[y]=u,b=d^p&(g^d),u=(c<<5|c>>>27)+b+m+1518500249+u,m=d,d=g,g=(p<<30|p>>>2)>>>0,p=c,c=u;for(;y<32;++y)u=s[y-3]^s[y-8]^s[y-14]^s[y-16],u=u<<1|u>>>31,s[y]=u,b=p^g^d,u=(c<<5|c>>>27)+b+m+1859775393+u,m=d,d=g,g=(p<<30|p>>>2)>>>0,p=c,c=u;for(;y<40;++y)u=s[y-6]^s[y-16]^s[y-28]^s[y-32],u=u<<2|u>>>30,s[y]=u,b=p^g^d,u=(c<<5|c>>>27)+b+m+1859775393+u,m=d,d=g,g=(p<<30|p>>>2)>>>0,p=c,c=u;for(;y<60;++y)u=s[y-6]^s[y-16]^s[y-28]^s[y-32],u=u<<2|u>>>30,s[y]=u,b=p&g|d&(p^g),u=(c<<5|c>>>27)+b+m+2400959708+u,m=d,d=g,g=(p<<30|p>>>2)>>>0,p=c,c=u;for(;y<80;++y)u=s[y-6]^s[y-16]^s[y-28]^s[y-32],u=u<<2|u>>>30,s[y]=u,b=p^g^d,u=(c<<5|c>>>27)+b+m+3395469782+u,m=d,d=g,g=(p<<30|p>>>2)>>>0,p=c,c=u;o.h0=o.h0+c|0,o.h1=o.h1+p|0,o.h2=o.h2+g|0,o.h3=o.h3+d|0,o.h4=o.h4+m|0,f-=64}}return hf.exports}var Xm;function eC(){if(Xm)return ff.exports;Xm=1;var e=je();Xe(),Dr(),xl();var t=ff.exports=e.pkcs1=e.pkcs1||{};t.encode_rsa_oaep=function(r,i,a){var o,s,l,u;typeof a=="string"?(o=a,s=arguments[3]||void 0,l=arguments[4]||void 0):a&&(o=a.label||void 0,s=a.seed||void 0,l=a.md||void 0,a.mgf1&&a.mgf1.md&&(u=a.mgf1.md)),l?l.start():l=e.md.sha1.create(),u||(u=l);var c=Math.ceil(r.n.bitLength()/8),p=c-2*l.digestLength-2;if(i.length>p){var g=new Error("RSAES-OAEP input message length is too long.");throw g.length=i.length,g.maxLength=p,g}o||(o=""),l.update(o,"raw");for(var d=l.digest(),m="",b=p-i.length,y=0;y<b;y++)m+="\0";var f=d.getBytes()+m+""+i;if(!s)s=e.random.getBytes(l.digestLength);else if(s.length!==l.digestLength){var g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw g.seedLength=s.length,g.digestLength=l.digestLength,g}var v=n(s,c-l.digestLength-1,u),C=e.util.xorBytes(f,v,f.length),S=n(C,l.digestLength,u),_=e.util.xorBytes(s,S,s.length);return"\0"+_+C},t.decode_rsa_oaep=function(r,i,a){var o,s,l;typeof a=="string"?(o=a,s=arguments[3]||void 0):a&&(o=a.label||void 0,s=a.md||void 0,a.mgf1&&a.mgf1.md&&(l=a.mgf1.md));var u=Math.ceil(r.n.bitLength()/8);if(i.length!==u){var C=new Error("RSAES-OAEP encoded message length is invalid.");throw C.length=i.length,C.expectedLength=u,C}if(s===void 0?s=e.md.sha1.create():s.start(),l||(l=s),u<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");o||(o=""),s.update(o,"raw");for(var c=s.digest().getBytes(),p=i.charAt(0),g=i.substring(1,s.digestLength+1),d=i.substring(1+s.digestLength),m=n(d,s.digestLength,l),b=e.util.xorBytes(g,m,g.length),y=n(b,u-s.digestLength-1,l),f=e.util.xorBytes(d,y,d.length),v=f.substring(0,s.digestLength),C=p!=="\0",S=0;S<s.digestLength;++S)C|=c.charAt(S)!==v.charAt(S);for(var _=1,E=s.digestLength,x=s.digestLength;x<f.length;x++){var h=f.charCodeAt(x),w=h&1^1,D=_?65534:0;C|=h&D,_=_&w,E+=_}if(C||f.charCodeAt(E)!==1)throw new Error("Invalid RSAES-OAEP padding.");return f.substring(E+1)};function n(r,i,a){a||(a=e.md.sha1.create());for(var o="",s=Math.ceil(i/a.digestLength),l=0;l<s;++l){var u=String.fromCharCode(l>>24&255,l>>16&255,l>>8&255,l&255);a.start(),a.update(r+u),o+=a.digest().getBytes()}return o.substring(0,i)}return ff.exports}var Ul={exports:{}},Ym;function tC(){if(Ym)return Ul.exports;Ym=1;var e=je();return Xe(),Jc(),Dr(),function(){if(e.prime){Ul.exports=e.prime;return}var t=Ul.exports=e.prime=e.prime||{},n=e.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],i=new n(null);i.fromInt(30);var a=function(g,d){return g|d};t.generateProbablePrime=function(g,d,m){typeof d=="function"&&(m=d,d={}),d=d||{};var b=d.algorithm||"PRIMEINC";typeof b=="string"&&(b={name:b}),b.options=b.options||{};var y=d.prng||e.random,f={nextBytes:function(v){for(var C=y.getBytesSync(v.length),S=0;S<v.length;++S)v[S]=C.charCodeAt(S)}};if(b.name==="PRIMEINC")return o(g,f,b.options,m);throw new Error("Invalid prime generation algorithm: "+b.name)};function o(g,d,m,b){return"workers"in m?u(g,d,m,b):s(g,d,m,b)}function s(g,d,m,b){var y=c(g,d),f=0,v=p(y.bitLength());"millerRabinTests"in m&&(v=m.millerRabinTests);var C=10;"maxBlockTime"in m&&(C=m.maxBlockTime),l(y,g,d,f,v,C,b)}function l(g,d,m,b,y,f,v){var C=+new Date;do{if(g.bitLength()>d&&(g=c(d,m)),g.isProbablePrime(y))return v(null,g);g.dAddOffset(r[b++%8],0)}while(f<0||+new Date-C<f);e.util.setImmediate(function(){l(g,d,m,b,y,f,v)})}function u(g,d,m,b){if(typeof Worker>"u")return s(g,d,m,b);var y=c(g,d),f=m.workers,v=m.workLoad||100,C=v*30/8,S=m.workerScript||"forge/prime.worker.js";if(f===-1)return e.util.estimateCores(function(E,x){E&&(x=2),f=x-1,_()});_();function _(){f=Math.max(1,f);for(var E=[],x=0;x<f;++x)E[x]=new Worker(S);for(var x=0;x<f;++x)E[x].addEventListener("message",w);var h=!1;function w(D){if(!h){var I=D.data;if(I.found){for(var T=0;T<E.length;++T)E[T].terminate();return h=!0,b(null,new n(I.prime,16))}y.bitLength()>g&&(y=c(g,d));var F=y.toString(16);D.target.postMessage({hex:F,workLoad:v}),y.dAddOffset(C,0)}}}}function c(g,d){var m=new n(g,d),b=g-1;return m.testBit(b)||m.bitwiseTo(n.ONE.shiftLeft(b),a,m),m.dAddOffset(31-m.mod(i).byteValue(),0),m}function p(g){return g<=100?27:g<=150?18:g<=200?15:g<=250?12:g<=300?9:g<=350?8:g<=400?7:g<=500?6:g<=600?5:g<=800?4:g<=1250?3:2}}(),Ul.exports}var gf,Km;function Qc(){if(Km)return gf;Km=1;var e=je();if(Jr(),Jc(),Za(),eC(),tC(),Dr(),Xe(),typeof t>"u")var t=e.jsbn.BigInteger;var n=e.util.isNodejs?yg:null,r=e.asn1,i=e.util;e.pki=e.pki||{},gf=e.pki.rsa=e.rsa=e.rsa||{};var a=e.pki,o=[6,4,2,4,2,4,6,2],s={name:"PrivateKeyInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},u={name:"RSAPublicKey",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},c=e.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:r.Class.UNIVERSAL,type:r.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:r.Class.UNIVERSAL,type:r.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(x){var h;if(x.algorithm in a.oids)h=a.oids[x.algorithm];else{var w=new Error("Unknown message digest algorithm.");throw w.algorithm=x.algorithm,w}var D=r.oidToDer(h).getBytes(),I=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]),T=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]);T.value.push(r.create(r.Class.UNIVERSAL,r.Type.OID,!1,D)),T.value.push(r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,""));var F=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,x.digest().getBytes());return I.value.push(T),I.value.push(F),r.toDer(I).getBytes()},d=function(x,h,w){if(w)return x.modPow(h.e,h.n);if(!h.p||!h.q)return x.modPow(h.d,h.n);h.dP||(h.dP=h.d.mod(h.p.subtract(t.ONE))),h.dQ||(h.dQ=h.d.mod(h.q.subtract(t.ONE))),h.qInv||(h.qInv=h.q.modInverse(h.p));var D;do D=new t(e.util.bytesToHex(e.random.getBytes(h.n.bitLength()/8)),16);while(D.compareTo(h.n)>=0||!D.gcd(h.n).equals(t.ONE));x=x.multiply(D.modPow(h.e,h.n)).mod(h.n);for(var I=x.mod(h.p).modPow(h.dP,h.p),T=x.mod(h.q).modPow(h.dQ,h.q);I.compareTo(T)<0;)I=I.add(h.p);var F=I.subtract(T).multiply(h.qInv).mod(h.p).multiply(h.q).add(T);return F=F.multiply(D.modInverse(h.n)).mod(h.n),F};a.rsa.encrypt=function(x,h,w){var D=w,I,T=Math.ceil(h.n.bitLength()/8);w!==!1&&w!==!0?(D=w===2,I=m(x,h,w)):(I=e.util.createBuffer(),I.putBytes(x));for(var F=new t(I.toHex(),16),P=d(F,h,D),k=P.toString(16),R=e.util.createBuffer(),M=T-Math.ceil(k.length/2);M>0;)R.putByte(0),--M;return R.putBytes(e.util.hexToBytes(k)),R.getBytes()},a.rsa.decrypt=function(x,h,w,D){var I=Math.ceil(h.n.bitLength()/8);if(x.length!==I){var T=new Error("Encrypted message length is invalid.");throw T.length=x.length,T.expected=I,T}var F=new t(e.util.createBuffer(x).toHex(),16);if(F.compareTo(h.n)>=0)throw new Error("Encrypted message is invalid.");for(var P=d(F,h,w),k=P.toString(16),R=e.util.createBuffer(),M=I-Math.ceil(k.length/2);M>0;)R.putByte(0),--M;return R.putBytes(e.util.hexToBytes(k)),D!==!1?b(R.getBytes(),h,w):R.getBytes()},a.rsa.createKeyPairGenerationState=function(x,h,w){typeof x=="string"&&(x=parseInt(x,10)),x=x||2048,w=w||{};var D=w.prng||e.random,I={nextBytes:function(P){for(var k=D.getBytesSync(P.length),R=0;R<P.length;++R)P[R]=k.charCodeAt(R)}},T=w.algorithm||"PRIMEINC",F;if(T==="PRIMEINC")F={algorithm:T,state:0,bits:x,rng:I,eInt:h||65537,e:new t(null),p:null,q:null,qBits:x>>1,pBits:x-(x>>1),pqState:0,num:null,keys:null},F.e.fromInt(F.eInt);else throw new Error("Invalid key generation algorithm: "+T);return F},a.rsa.stepKeyPairGenerationState=function(x,h){"algorithm"in x||(x.algorithm="PRIMEINC");var w=new t(null);w.fromInt(30);for(var D=0,I=function(O,z){return O|z},T=+new Date,F,P=0;x.keys===null&&(h<=0||P<h);){if(x.state===0){var k=x.p===null?x.pBits:x.qBits,R=k-1;x.pqState===0?(x.num=new t(k,x.rng),x.num.testBit(R)||x.num.bitwiseTo(t.ONE.shiftLeft(R),I,x.num),x.num.dAddOffset(31-x.num.mod(w).byteValue(),0),D=0,++x.pqState):x.pqState===1?x.num.bitLength()>k?x.pqState=0:x.num.isProbablePrime(v(x.num.bitLength()))?++x.pqState:x.num.dAddOffset(o[D++%8],0):x.pqState===2?x.pqState=x.num.subtract(t.ONE).gcd(x.e).compareTo(t.ONE)===0?3:0:x.pqState===3&&(x.pqState=0,x.p===null?x.p=x.num:x.q=x.num,x.p!==null&&x.q!==null&&++x.state,x.num=null)}else if(x.state===1)x.p.compareTo(x.q)<0&&(x.num=x.p,x.p=x.q,x.q=x.num),++x.state;else if(x.state===2)x.p1=x.p.subtract(t.ONE),x.q1=x.q.subtract(t.ONE),x.phi=x.p1.multiply(x.q1),++x.state;else if(x.state===3)x.phi.gcd(x.e).compareTo(t.ONE)===0?++x.state:(x.p=null,x.q=null,x.state=0);else if(x.state===4)x.n=x.p.multiply(x.q),x.n.bitLength()===x.bits?++x.state:(x.q=null,x.state=0);else if(x.state===5){var M=x.e.modInverse(x.phi);x.keys={privateKey:a.rsa.setPrivateKey(x.n,x.e,M,x.p,x.q,M.mod(x.p1),M.mod(x.q1),x.q.modInverse(x.p)),publicKey:a.rsa.setPublicKey(x.n,x.e)}}F=+new Date,P+=F-T,T=F}return x.keys!==null},a.rsa.generateKeyPair=function(x,h,w,D){if(arguments.length===1?typeof x=="object"?(w=x,x=void 0):typeof x=="function"&&(D=x,x=void 0):arguments.length===2?typeof x=="number"?typeof h=="function"?(D=h,h=void 0):typeof h!="number"&&(w=h,h=void 0):(w=x,D=h,x=void 0,h=void 0):arguments.length===3&&(typeof h=="number"?typeof w=="function"&&(D=w,w=void 0):(D=w,w=h,h=void 0)),w=w||{},x===void 0&&(x=w.bits||2048),h===void 0&&(h=w.e||65537),!e.options.usePureJavaScript&&!w.prng&&x>=256&&x<=16384&&(h===65537||h===3)){if(D){if(C("generateKeyPair"))return n.generateKeyPair("rsa",{modulusLength:x,publicExponent:h,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(P,k,R){if(P)return D(P);D(null,{privateKey:a.privateKeyFromPem(R),publicKey:a.publicKeyFromPem(k)})});if(S("generateKey")&&S("exportKey"))return i.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:x,publicExponent:E(h),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(P){return i.globalScope.crypto.subtle.exportKey("pkcs8",P.privateKey)}).then(void 0,function(P){D(P)}).then(function(P){if(P){var k=a.privateKeyFromAsn1(r.fromDer(e.util.createBuffer(P)));D(null,{privateKey:k,publicKey:a.setRsaPublicKey(k.n,k.e)})}});if(_("generateKey")&&_("exportKey")){var I=i.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:x,publicExponent:E(h),hash:{name:"SHA-256"}},!0,["sign","verify"]);I.oncomplete=function(P){var k=P.target.result,R=i.globalScope.msCrypto.subtle.exportKey("pkcs8",k.privateKey);R.oncomplete=function(M){var O=M.target.result,z=a.privateKeyFromAsn1(r.fromDer(e.util.createBuffer(O)));D(null,{privateKey:z,publicKey:a.setRsaPublicKey(z.n,z.e)})},R.onerror=function(M){D(M)}},I.onerror=function(P){D(P)};return}}else if(C("generateKeyPairSync")){var T=n.generateKeyPairSync("rsa",{modulusLength:x,publicExponent:h,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:a.privateKeyFromPem(T.privateKey),publicKey:a.publicKeyFromPem(T.publicKey)}}}var F=a.rsa.createKeyPairGenerationState(x,h,w);if(!D)return a.rsa.stepKeyPairGenerationState(F,0),F.keys;y(F,w,D)},a.setRsaPublicKey=a.rsa.setPublicKey=function(x,h){var w={n:x,e:h};return w.encrypt=function(D,I,T){if(typeof I=="string"?I=I.toUpperCase():I===void 0&&(I="RSAES-PKCS1-V1_5"),I==="RSAES-PKCS1-V1_5")I={encode:function(P,k,R){return m(P,k,2).getBytes()}};else if(I==="RSA-OAEP"||I==="RSAES-OAEP")I={encode:function(P,k){return e.pkcs1.encode_rsa_oaep(k,P,T)}};else if(["RAW","NONE","NULL",null].indexOf(I)!==-1)I={encode:function(P){return P}};else if(typeof I=="string")throw new Error('Unsupported encryption scheme: "'+I+'".');var F=I.encode(D,w,!0);return a.rsa.encrypt(F,w,!0)},w.verify=function(D,I,T,F){typeof T=="string"?T=T.toUpperCase():T===void 0&&(T="RSASSA-PKCS1-V1_5"),F===void 0&&(F={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in F||(F._parseAllDigestBytes=!0),T==="RSASSA-PKCS1-V1_5"?T={verify:function(k,R){R=b(R,w,!0);var M=r.fromDer(R,{parseAllBytes:F._parseAllDigestBytes}),O={},z=[];if(!r.validate(M,p,O,z)){var G=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw G.errors=z,G}var U=r.derToOid(O.algorithmIdentifier);if(!(U===e.oids.md2||U===e.oids.md5||U===e.oids.sha1||U===e.oids.sha224||U===e.oids.sha256||U===e.oids.sha384||U===e.oids.sha512||U===e.oids["sha512-224"]||U===e.oids["sha512-256"])){var G=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw G.oid=U,G}if((U===e.oids.md2||U===e.oids.md5)&&!("parameters"in O))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return k===O.digest}}:(T==="NONE"||T==="NULL"||T===null)&&(T={verify:function(k,R){return R=b(R,w,!0),k===R}});var P=a.rsa.decrypt(I,w,!0,!1);return T.verify(D,P,w.n.bitLength())},w},a.setRsaPrivateKey=a.rsa.setPrivateKey=function(x,h,w,D,I,T,F,P){var k={n:x,e:h,d:w,p:D,q:I,dP:T,dQ:F,qInv:P};return k.decrypt=function(R,M,O){typeof M=="string"?M=M.toUpperCase():M===void 0&&(M="RSAES-PKCS1-V1_5");var z=a.rsa.decrypt(R,k,!1,!1);if(M==="RSAES-PKCS1-V1_5")M={decode:b};else if(M==="RSA-OAEP"||M==="RSAES-OAEP")M={decode:function(G,U){return e.pkcs1.decode_rsa_oaep(U,G,O)}};else if(["RAW","NONE","NULL",null].indexOf(M)!==-1)M={decode:function(G){return G}};else throw new Error('Unsupported encryption scheme: "'+M+'".');return M.decode(z,k,!1)},k.sign=function(R,M){var O=!1;typeof M=="string"&&(M=M.toUpperCase()),M===void 0||M==="RSASSA-PKCS1-V1_5"?(M={encode:g},O=1):(M==="NONE"||M==="NULL"||M===null)&&(M={encode:function(){return R}},O=1);var z=M.encode(R,k.n.bitLength());return a.rsa.encrypt(z,k,O)},k},a.wrapRsaPrivateKey=function(x){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(0).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.oids.rsaEncryption).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,r.toDer(x).getBytes())])},a.privateKeyFromAsn1=function(x){var h={},w=[];if(r.validate(x,s,h,w)&&(x=r.fromDer(e.util.createBuffer(h.privateKey))),h={},w=[],!r.validate(x,l,h,w)){var D=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw D.errors=w,D}var I,T,F,P,k,R,M,O;return I=e.util.createBuffer(h.privateKeyModulus).toHex(),T=e.util.createBuffer(h.privateKeyPublicExponent).toHex(),F=e.util.createBuffer(h.privateKeyPrivateExponent).toHex(),P=e.util.createBuffer(h.privateKeyPrime1).toHex(),k=e.util.createBuffer(h.privateKeyPrime2).toHex(),R=e.util.createBuffer(h.privateKeyExponent1).toHex(),M=e.util.createBuffer(h.privateKeyExponent2).toHex(),O=e.util.createBuffer(h.privateKeyCoefficient).toHex(),a.setRsaPrivateKey(new t(I,16),new t(T,16),new t(F,16),new t(P,16),new t(k,16),new t(R,16),new t(M,16),new t(O,16))},a.privateKeyToAsn1=a.privateKeyToRSAPrivateKey=function(x){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(0).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.n)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.e)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.d)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.p)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.q)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.dP)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.dQ)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.qInv))])},a.publicKeyFromAsn1=function(x){var h={},w=[];if(r.validate(x,c,h,w)){var D=r.derToOid(h.publicKeyOid);if(D!==a.oids.rsaEncryption){var I=new Error("Cannot read public key. Unknown OID.");throw I.oid=D,I}x=h.rsaPublicKey}if(w=[],!r.validate(x,u,h,w)){var I=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw I.errors=w,I}var T=e.util.createBuffer(h.publicKeyModulus).toHex(),F=e.util.createBuffer(h.publicKeyExponent).toHex();return a.setRsaPublicKey(new t(T,16),new t(F,16))},a.publicKeyToAsn1=a.publicKeyToSubjectPublicKeyInfo=function(x){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(a.oids.rsaEncryption).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.BITSTRING,!1,[a.publicKeyToRSAPublicKey(x)])])},a.publicKeyToRSAPublicKey=function(x){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.n)),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,f(x.e))])};function m(x,h,w){var D=e.util.createBuffer(),I=Math.ceil(h.n.bitLength()/8);if(x.length>I-11){var T=new Error("Message is too long for PKCS#1 v1.5 padding.");throw T.length=x.length,T.max=I-11,T}D.putByte(0),D.putByte(w);var F=I-3-x.length,P;if(w===0||w===1){P=w===0?0:255;for(var k=0;k<F;++k)D.putByte(P)}else for(;F>0;){for(var R=0,M=e.random.getBytes(F),k=0;k<F;++k)P=M.charCodeAt(k),P===0?++R:D.putByte(P);F=R}return D.putByte(0),D.putBytes(x),D}function b(x,h,w,D){var I=Math.ceil(h.n.bitLength()/8),T=e.util.createBuffer(x),F=T.getByte(),P=T.getByte();if(F!==0||w&&P!==0&&P!==1||!w&&P!=2||w&&P===0&&typeof D>"u")throw new Error("Encryption block is invalid.");var k=0;if(P===0){k=I-3-D;for(var R=0;R<k;++R)if(T.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(P===1)for(k=0;T.length()>1;){if(T.getByte()!==255){--T.read;break}++k}else if(P===2)for(k=0;T.length()>1;){if(T.getByte()===0){--T.read;break}++k}var M=T.getByte();if(M!==0||k!==I-3-T.length())throw new Error("Encryption block is invalid.");return T.getBytes()}function y(x,h,w){typeof h=="function"&&(w=h,h={}),h=h||{};var D={algorithm:{name:h.algorithm||"PRIMEINC",options:{workers:h.workers||2,workLoad:h.workLoad||100,workerScript:h.workerScript}}};"prng"in h&&(D.prng=h.prng),I();function I(){T(x.pBits,function(P,k){if(P)return w(P);if(x.p=k,x.q!==null)return F(P,x.q);T(x.qBits,F)})}function T(P,k){e.prime.generateProbablePrime(P,D,k)}function F(P,k){if(P)return w(P);if(x.q=k,x.p.compareTo(x.q)<0){var R=x.p;x.p=x.q,x.q=R}if(x.p.subtract(t.ONE).gcd(x.e).compareTo(t.ONE)!==0){x.p=null,I();return}if(x.q.subtract(t.ONE).gcd(x.e).compareTo(t.ONE)!==0){x.q=null,T(x.qBits,F);return}if(x.p1=x.p.subtract(t.ONE),x.q1=x.q.subtract(t.ONE),x.phi=x.p1.multiply(x.q1),x.phi.gcd(x.e).compareTo(t.ONE)!==0){x.p=x.q=null,I();return}if(x.n=x.p.multiply(x.q),x.n.bitLength()!==x.bits){x.q=null,T(x.qBits,F);return}var M=x.e.modInverse(x.phi);x.keys={privateKey:a.rsa.setPrivateKey(x.n,x.e,M,x.p,x.q,M.mod(x.p1),M.mod(x.q1),x.q.modInverse(x.p)),publicKey:a.rsa.setPublicKey(x.n,x.e)},w(null,x.keys)}}function f(x){var h=x.toString(16);h[0]>="8"&&(h="00"+h);var w=e.util.hexToBytes(h);return w.length>1&&(w.charCodeAt(0)===0&&(w.charCodeAt(1)&128)===0||w.charCodeAt(0)===255&&(w.charCodeAt(1)&128)===128)?w.substr(1):w}function v(x){return x<=100?27:x<=150?18:x<=200?15:x<=250?12:x<=300?9:x<=350?8:x<=400?7:x<=500?6:x<=600?5:x<=800?4:x<=1250?3:2}function C(x){return e.util.isNodejs&&typeof n[x]=="function"}function S(x){return typeof i.globalScope<"u"&&typeof i.globalScope.crypto=="object"&&typeof i.globalScope.crypto.subtle=="object"&&typeof i.globalScope.crypto.subtle[x]=="function"}function _(x){return typeof i.globalScope<"u"&&typeof i.globalScope.msCrypto=="object"&&typeof i.globalScope.msCrypto.subtle=="object"&&typeof i.globalScope.msCrypto.subtle[x]=="function"}function E(x){for(var h=e.util.hexToBytes(x.toString(16)),w=new Uint8Array(h.length),D=0;D<h.length;++D)w[D]=h.charCodeAt(D);return w}return gf}var pf,Zm;function nC(){if(Zm)return pf;Zm=1;var e=je();if(Ka(),Jr(),qc(),Ii(),Za(),xg(),qo(),Dr(),Qx(),Qc(),Xe(),typeof t>"u")var t=e.jsbn.BigInteger;var n=e.asn1,r=e.pki=e.pki||{};pf=r.pbe=e.pbe=e.pbe||{};var i=r.oids,a={name:"EncryptedPrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},o={name:"PBES2Algorithms",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},s={name:"pkcs-12PbeParams",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"iterations"}]};r.encryptPrivateKeyInfo=function(g,d,m){m=m||{},m.saltSize=m.saltSize||8,m.count=m.count||2048,m.algorithm=m.algorithm||"aes128",m.prfAlgorithm=m.prfAlgorithm||"sha1";var b=e.random.getBytesSync(m.saltSize),y=m.count,f=n.integerToDer(y),v,C,S;if(m.algorithm.indexOf("aes")===0||m.algorithm==="des"){var _,E,x;switch(m.algorithm){case"aes128":v=16,_=16,E=i["aes128-CBC"],x=e.aes.createEncryptionCipher;break;case"aes192":v=24,_=16,E=i["aes192-CBC"],x=e.aes.createEncryptionCipher;break;case"aes256":v=32,_=16,E=i["aes256-CBC"],x=e.aes.createEncryptionCipher;break;case"des":v=8,_=8,E=i.desCBC,x=e.des.createEncryptionCipher;break;default:var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=m.algorithm,h}var w="hmacWith"+m.prfAlgorithm.toUpperCase(),D=c(w),I=e.pkcs5.pbkdf2(d,b,y,v,D),T=e.random.getBytesSync(_),F=x(I);F.start(T),F.update(n.toDer(g)),F.finish(),S=F.output.getBytes();var P=p(b,f,v,w);C=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pkcs5PBES2).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pkcs5PBKDF2).getBytes()),P]),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(E).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,T)])])])}else if(m.algorithm==="3des"){v=24;var k=new e.util.ByteBuffer(b),I=r.pbe.generatePkcs12Key(d,k,1,y,v),T=r.pbe.generatePkcs12Key(d,k,2,y,v),F=e.des.createEncryptionCipher(I);F.start(T),F.update(n.toDer(g)),F.finish(),S=F.output.getBytes(),C=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,b),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,f.getBytes())])])}else{var h=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw h.algorithm=m.algorithm,h}var R=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[C,n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,S)]);return R},r.decryptPrivateKeyInfo=function(g,d){var m=null,b={},y=[];if(!n.validate(g,a,b,y)){var f=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw f.errors=y,f}var v=n.derToOid(b.encryptionOid),C=r.pbe.getCipher(v,b.encryptionParams,d),S=e.util.createBuffer(b.encryptedData);return C.update(S),C.finish()&&(m=n.fromDer(C.output)),m},r.encryptedPrivateKeyToPem=function(g,d){var m={type:"ENCRYPTED PRIVATE KEY",body:n.toDer(g).getBytes()};return e.pem.encode(m,{maxline:d})},r.encryptedPrivateKeyFromPem=function(g){var d=e.pem.decode(g)[0];if(d.type!=="ENCRYPTED PRIVATE KEY"){var m=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw m.headerType=d.type,m}if(d.procType&&d.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return n.fromDer(d.body)},r.encryptRsaPrivateKey=function(g,d,m){if(m=m||{},!m.legacy){var b=r.wrapRsaPrivateKey(r.privateKeyToAsn1(g));return b=r.encryptPrivateKeyInfo(b,d,m),r.encryptedPrivateKeyToPem(b)}var y,f,v,C;switch(m.algorithm){case"aes128":y="AES-128-CBC",v=16,f=e.random.getBytesSync(16),C=e.aes.createEncryptionCipher;break;case"aes192":y="AES-192-CBC",v=24,f=e.random.getBytesSync(16),C=e.aes.createEncryptionCipher;break;case"aes256":y="AES-256-CBC",v=32,f=e.random.getBytesSync(16),C=e.aes.createEncryptionCipher;break;case"3des":y="DES-EDE3-CBC",v=24,f=e.random.getBytesSync(8),C=e.des.createEncryptionCipher;break;case"des":y="DES-CBC",v=8,f=e.random.getBytesSync(8),C=e.des.createEncryptionCipher;break;default:var S=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+m.algorithm+'".');throw S.algorithm=m.algorithm,S}var _=e.pbe.opensslDeriveBytes(d,f.substr(0,8),v),E=C(_);E.start(f),E.update(n.toDer(r.privateKeyToAsn1(g))),E.finish();var x={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:y,parameters:e.util.bytesToHex(f).toUpperCase()},body:E.output.getBytes()};return e.pem.encode(x)},r.decryptRsaPrivateKey=function(g,d){var m=null,b=e.pem.decode(g)[0];if(b.type!=="ENCRYPTED PRIVATE KEY"&&b.type!=="PRIVATE KEY"&&b.type!=="RSA PRIVATE KEY"){var y=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw y.headerType=y,y}if(b.procType&&b.procType.type==="ENCRYPTED"){var f,v;switch(b.dekInfo.algorithm){case"DES-CBC":f=8,v=e.des.createDecryptionCipher;break;case"DES-EDE3-CBC":f=24,v=e.des.createDecryptionCipher;break;case"AES-128-CBC":f=16,v=e.aes.createDecryptionCipher;break;case"AES-192-CBC":f=24,v=e.aes.createDecryptionCipher;break;case"AES-256-CBC":f=32,v=e.aes.createDecryptionCipher;break;case"RC2-40-CBC":f=5,v=function(x){return e.rc2.createDecryptionCipher(x,40)};break;case"RC2-64-CBC":f=8,v=function(x){return e.rc2.createDecryptionCipher(x,64)};break;case"RC2-128-CBC":f=16,v=function(x){return e.rc2.createDecryptionCipher(x,128)};break;default:var y=new Error('Could not decrypt private key; unsupported encryption algorithm "'+b.dekInfo.algorithm+'".');throw y.algorithm=b.dekInfo.algorithm,y}var C=e.util.hexToBytes(b.dekInfo.parameters),S=e.pbe.opensslDeriveBytes(d,C.substr(0,8),f),_=v(S);if(_.start(C),_.update(e.util.createBuffer(b.body)),_.finish())m=_.output.getBytes();else return m}else m=b.body;return b.type==="ENCRYPTED PRIVATE KEY"?m=r.decryptPrivateKeyInfo(n.fromDer(m),d):m=n.fromDer(m),m!==null&&(m=r.privateKeyFromAsn1(m)),m},r.pbe.generatePkcs12Key=function(g,d,m,b,y,f){var v,C;if(typeof f>"u"||f===null){if(!("sha1"in e.md))throw new Error('"sha1" hash algorithm unavailable.');f=e.md.sha1.create()}var S=f.digestLength,_=f.blockLength,E=new e.util.ByteBuffer,x=new e.util.ByteBuffer;if(g!=null){for(C=0;C<g.length;C++)x.putInt16(g.charCodeAt(C));x.putInt16(0)}var h=x.length(),w=d.length(),D=new e.util.ByteBuffer;D.fillWithByte(m,_);var I=_*Math.ceil(w/_),T=new e.util.ByteBuffer;for(C=0;C<I;C++)T.putByte(d.at(C%w));var F=_*Math.ceil(h/_),P=new e.util.ByteBuffer;for(C=0;C<F;C++)P.putByte(x.at(C%h));var k=T;k.putBuffer(P);for(var R=Math.ceil(y/S),M=1;M<=R;M++){var O=new e.util.ByteBuffer;O.putBytes(D.bytes()),O.putBytes(k.bytes());for(var z=0;z<b;z++)f.start(),f.update(O.getBytes()),O=f.digest();var G=new e.util.ByteBuffer;for(C=0;C<_;C++)G.putByte(O.at(C%S));var U=Math.ceil(w/_)+Math.ceil(h/_),J=new e.util.ByteBuffer;for(v=0;v<U;v++){var Q=new e.util.ByteBuffer(k.getBytes(_)),ee=511;for(C=G.length()-1;C>=0;C--)ee=ee>>8,ee+=G.at(C)+Q.at(C),Q.setAt(C,ee&255);J.putBuffer(Q)}k=J,E.putBuffer(O)}return E.truncate(E.length()-y),E},r.pbe.getCipher=function(g,d,m){switch(g){case r.oids.pkcs5PBES2:return r.pbe.getCipherForPBES2(g,d,m);case r.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case r.oids["pbewithSHAAnd40BitRC2-CBC"]:return r.pbe.getCipherForPKCS12PBE(g,d,m);default:var b=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw b.oid=g,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],b}},r.pbe.getCipherForPBES2=function(g,d,m){var b={},y=[];if(!n.validate(d,o,b,y)){var f=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw f.errors=y,f}if(g=n.derToOid(b.kdfOid),g!==r.oids.pkcs5PBKDF2){var f=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw f.oid=g,f.supportedOids=["pkcs5PBKDF2"],f}if(g=n.derToOid(b.encOid),g!==r.oids["aes128-CBC"]&&g!==r.oids["aes192-CBC"]&&g!==r.oids["aes256-CBC"]&&g!==r.oids["des-EDE3-CBC"]&&g!==r.oids.desCBC){var f=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw f.oid=g,f.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],f}var v=b.kdfSalt,C=e.util.createBuffer(b.kdfIterationCount);C=C.getInt(C.length()<<3);var S,_;switch(r.oids[g]){case"aes128-CBC":S=16,_=e.aes.createDecryptionCipher;break;case"aes192-CBC":S=24,_=e.aes.createDecryptionCipher;break;case"aes256-CBC":S=32,_=e.aes.createDecryptionCipher;break;case"des-EDE3-CBC":S=24,_=e.des.createDecryptionCipher;break;case"desCBC":S=8,_=e.des.createDecryptionCipher;break}var E=u(b.prfOid),x=e.pkcs5.pbkdf2(m,v,C,S,E),h=b.encIv,w=_(x);return w.start(h),w},r.pbe.getCipherForPKCS12PBE=function(g,d,m){var b={},y=[];if(!n.validate(d,s,b,y)){var f=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw f.errors=y,f}var v=e.util.createBuffer(b.salt),C=e.util.createBuffer(b.iterations);C=C.getInt(C.length()<<3);var S,_,E;switch(g){case r.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:S=24,_=8,E=e.des.startDecrypting;break;case r.oids["pbewithSHAAnd40BitRC2-CBC"]:S=5,_=8,E=function(I,T){var F=e.rc2.createDecryptionCipher(I,40);return F.start(T,null),F};break;default:var f=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw f.oid=g,f}var x=u(b.prfOid),h=r.pbe.generatePkcs12Key(m,v,1,C,S,x);x.start();var w=r.pbe.generatePkcs12Key(m,v,2,C,_,x);return E(h,w)},r.pbe.opensslDeriveBytes=function(g,d,m,b){if(typeof b>"u"||b===null){if(!("md5"in e.md))throw new Error('"md5" hash algorithm unavailable.');b=e.md.md5.create()}d===null&&(d="");for(var y=[l(b,g+d)],f=16,v=1;f<m;++v,f+=16)y.push(l(b,y[v-1]+g+d));return y.join("").substr(0,m)};function l(g,d){return g.start().update(d).digest().getBytes()}function u(g){var d;if(!g)d="hmacWithSHA1";else if(d=r.oids[n.derToOid(g)],!d){var m=new Error("Unsupported PRF OID.");throw m.oid=g,m.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],m}return c(d)}function c(g){var d=e.md;switch(g){case"hmacWithSHA224":d=e.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":g=g.substr(8).toLowerCase();break;default:var m=new Error("Unsupported PRF algorithm.");throw m.algorithm=g,m.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],m}if(!d||!(g in d))throw new Error("Unknown hash algorithm: "+g);return d[g].create()}function p(g,d,m,b){var y=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,g),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d.getBytes())]);return b!=="hmacWithSHA1"&&y.value.push(n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,e.util.hexToBytes(m.toString(16))),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(r.oids[b]).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")])),y}return pf}var mf={exports:{}},bf={exports:{}},qm;function rC(){if(qm)return bf.exports;qm=1;var e=je();Jr(),Xe();var t=e.asn1,n=bf.exports=e.pkcs7asn1=e.pkcs7asn1||{};e.pkcs7=e.pkcs7||{},e.pkcs7.asn1=n;var r={name:"ContentInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};n.contentInfoValidator=r;var i={name:"EncryptedContentInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:t.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};n.envelopedDataValidator={name:"EnvelopedData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(i)},n.encryptedDataValidator={name:"EncryptedData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"}].concat(i)};var a={name:"SignerInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:t.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};return n.signedDataValidator={name:"SignedData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},r,{name:"SignedData.Certificates",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,capture:"signerInfos",optional:!0,value:[a]}]},n.recipientInfoValidator={name:"RecipientInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:t.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]},bf.exports}var vf={exports:{}},yf={exports:{}},Jm;function iC(){if(Jm)return yf.exports;Jm=1;var e=je();Xe(),e.mgf=e.mgf||{};var t=yf.exports=e.mgf.mgf1=e.mgf1=e.mgf1||{};return t.create=function(n){var r={generate:function(i,a){for(var o=new e.util.ByteBuffer,s=Math.ceil(a/n.digestLength),l=0;l<s;l++){var u=new e.util.ByteBuffer;u.putInt32(l),n.start(),n.update(i+u.getBytes()),o.putBuffer(n.digest())}return o.truncate(o.length()-a),o.getBytes()}};return r},yf.exports}var xf,Qm;function GD(){if(Qm)return xf;Qm=1;var e=je();return iC(),xf=e.mgf=e.mgf||{},e.mgf.mgf1=e.mgf1,xf}var Cf={exports:{}},e1;function Cg(){if(e1)return Cf.exports;e1=1;var e=je();Dr(),Xe();var t=Cf.exports=e.pss=e.pss||{};return t.create=function(n){arguments.length===3&&(n={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var r=n.md,i=n.mgf,a=r.digestLength,o=n.salt||null;typeof o=="string"&&(o=e.util.createBuffer(o));var s;if("saltLength"in n)s=n.saltLength;else if(o!==null)s=o.length();else throw new Error("Salt length not specified or specific salt not given.");if(o!==null&&o.length()!==s)throw new Error("Given salt length does not match length of given salt.");var l=n.prng||e.random,u={};return u.encode=function(c,p){var g,d=p-1,m=Math.ceil(d/8),b=c.digest().getBytes();if(m<a+s+2)throw new Error("Message is too long to encrypt.");var y;o===null?y=l.getBytesSync(s):y=o.bytes();var f=new e.util.ByteBuffer;f.fillWithByte(0,8),f.putBytes(b),f.putBytes(y),r.start(),r.update(f.getBytes());var v=r.digest().getBytes(),C=new e.util.ByteBuffer;C.fillWithByte(0,m-s-a-2),C.putByte(1),C.putBytes(y);var S=C.getBytes(),_=m-a-1,E=i.generate(v,_),x="";for(g=0;g<_;g++)x+=String.fromCharCode(S.charCodeAt(g)^E.charCodeAt(g));var h=65280>>8*m-d&255;return x=String.fromCharCode(x.charCodeAt(0)&~h)+x.substr(1),x+v+"¼"},u.verify=function(c,p,g){var d,m=g-1,b=Math.ceil(m/8);if(p=p.substr(-b),b<a+s+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(p.charCodeAt(b-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var y=b-a-1,f=p.substr(0,y),v=p.substr(y,a),C=65280>>8*b-m&255;if((f.charCodeAt(0)&C)!==0)throw new Error("Bits beyond keysize not zero as expected.");var S=i.generate(v,y),_="";for(d=0;d<y;d++)_+=String.fromCharCode(f.charCodeAt(d)^S.charCodeAt(d));_=String.fromCharCode(_.charCodeAt(0)&~C)+_.substr(1);var E=b-a-s-2;for(d=0;d<E;d++)if(_.charCodeAt(d)!==0)throw new Error("Leftmost octets not zero as expected");if(_.charCodeAt(E)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var x=_.substr(-s),h=new e.util.ByteBuffer;h.fillWithByte(0,8),h.putBytes(c),h.putBytes(x),r.start(),r.update(h.getBytes());var w=r.digest().getBytes();return v===w},u},Cf.exports}var t1;function Eg(){if(t1)return vf.exports;t1=1;var e=je();Ka(),Jr(),qc(),Ii(),GD(),Za(),qo(),Cg(),Qc(),Xe();var t=e.asn1,n=vf.exports=e.pki=e.pki||{},r=n.oids,i={};i.CN=r.commonName,i.commonName="CN",i.C=r.countryName,i.countryName="C",i.L=r.localityName,i.localityName="L",i.ST=r.stateOrProvinceName,i.stateOrProvinceName="ST",i.O=r.organizationName,i.organizationName="O",i.OU=r.organizationalUnitName,i.organizationalUnitName="OU",i.E=r.emailAddress,i.emailAddress="E";var a=e.pki.rsa.publicKeyValidator,o={name:"Certificate",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:t.Class.UNIVERSAL,type:t.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:t.Class.UNIVERSAL,type:t.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:t.Class.UNIVERSAL,type:t.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:t.Class.UNIVERSAL,type:t.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},a,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:t.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:t.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},s={name:"rsapss",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:t.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:t.Class.UNIVERSAL,type:t.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:t.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:t.Class.UNIVERSAL,type:t.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},l={name:"CertificationRequestInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},a,{name:"CertificationRequestInfo.attributes",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0}]}]}]},u={name:"CertificationRequest",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[l,{name:"CertificationRequest.signatureAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};n.RDNAttributesAsArray=function(E,x){for(var h=[],w,D,I,T=0;T<E.value.length;++T){w=E.value[T];for(var F=0;F<w.value.length;++F)I={},D=w.value[F],I.type=t.derToOid(D.value[0].value),I.value=D.value[1].value,I.valueTagClass=D.value[1].type,I.type in r&&(I.name=r[I.type],I.name in i&&(I.shortName=i[I.name])),x&&(x.update(I.type),x.update(I.value)),h.push(I)}return h},n.CRIAttributesAsArray=function(E){for(var x=[],h=0;h<E.length;++h)for(var w=E[h],D=t.derToOid(w.value[0].value),I=w.value[1].value,T=0;T<I.length;++T){var F={};if(F.type=D,F.value=I[T].value,F.valueTagClass=I[T].type,F.type in r&&(F.name=r[F.type],F.name in i&&(F.shortName=i[F.name])),F.type===r.extensionRequest){F.extensions=[];for(var P=0;P<F.value.length;++P)F.extensions.push(n.certificateExtensionFromAsn1(F.value[P]))}x.push(F)}return x};function c(E,x){typeof x=="string"&&(x={shortName:x});for(var h=null,w,D=0;h===null&&D<E.attributes.length;++D)w=E.attributes[D],(x.type&&x.type===w.type||x.name&&x.name===w.name||x.shortName&&x.shortName===w.shortName)&&(h=w);return h}var p=function(E,x,h){var w={};if(E!==r["RSASSA-PSS"])return w;h&&(w={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},saltLength:20});var D={},I=[];if(!t.validate(x,s,D,I)){var T=new Error("Cannot read RSASSA-PSS parameter block.");throw T.errors=I,T}return D.hashOid!==void 0&&(w.hash=w.hash||{},w.hash.algorithmOid=t.derToOid(D.hashOid)),D.maskGenOid!==void 0&&(w.mgf=w.mgf||{},w.mgf.algorithmOid=t.derToOid(D.maskGenOid),w.mgf.hash=w.mgf.hash||{},w.mgf.hash.algorithmOid=t.derToOid(D.maskGenHashOid)),D.saltLength!==void 0&&(w.saltLength=D.saltLength.charCodeAt(0)),w},g=function(E){switch(r[E.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return e.md.sha1.create();case"md5WithRSAEncryption":return e.md.md5.create();case"sha256WithRSAEncryption":return e.md.sha256.create();case"sha384WithRSAEncryption":return e.md.sha384.create();case"sha512WithRSAEncryption":return e.md.sha512.create();case"RSASSA-PSS":return e.md.sha256.create();default:var x=new Error("Could not compute "+E.type+" digest. Unknown signature OID.");throw x.signatureOid=E.signatureOid,x}},d=function(E){var x=E.certificate,h;switch(x.signatureOid){case r.sha1WithRSAEncryption:case r.sha1WithRSASignature:break;case r["RSASSA-PSS"]:var w,D;if(w=r[x.signatureParameters.mgf.hash.algorithmOid],w===void 0||e.md[w]===void 0){var I=new Error("Unsupported MGF hash function.");throw I.oid=x.signatureParameters.mgf.hash.algorithmOid,I.name=w,I}if(D=r[x.signatureParameters.mgf.algorithmOid],D===void 0||e.mgf[D]===void 0){var I=new Error("Unsupported MGF function.");throw I.oid=x.signatureParameters.mgf.algorithmOid,I.name=D,I}if(D=e.mgf[D].create(e.md[w].create()),w=r[x.signatureParameters.hash.algorithmOid],w===void 0||e.md[w]===void 0){var I=new Error("Unsupported RSASSA-PSS hash function.");throw I.oid=x.signatureParameters.hash.algorithmOid,I.name=w,I}h=e.pss.create(e.md[w].create(),D,x.signatureParameters.saltLength);break}return x.publicKey.verify(E.md.digest().getBytes(),E.signature,h)};n.certificateFromPem=function(E,x,h){var w=e.pem.decode(E)[0];if(w.type!=="CERTIFICATE"&&w.type!=="X509 CERTIFICATE"&&w.type!=="TRUSTED CERTIFICATE"){var D=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw D.headerType=w.type,D}if(w.procType&&w.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var I=t.fromDer(w.body,h);return n.certificateFromAsn1(I,x)},n.certificateToPem=function(E,x){var h={type:"CERTIFICATE",body:t.toDer(n.certificateToAsn1(E)).getBytes()};return e.pem.encode(h,{maxline:x})},n.publicKeyFromPem=function(E){var x=e.pem.decode(E)[0];if(x.type!=="PUBLIC KEY"&&x.type!=="RSA PUBLIC KEY"){var h=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw h.headerType=x.type,h}if(x.procType&&x.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var w=t.fromDer(x.body);return n.publicKeyFromAsn1(w)},n.publicKeyToPem=function(E,x){var h={type:"PUBLIC KEY",body:t.toDer(n.publicKeyToAsn1(E)).getBytes()};return e.pem.encode(h,{maxline:x})},n.publicKeyToRSAPublicKeyPem=function(E,x){var h={type:"RSA PUBLIC KEY",body:t.toDer(n.publicKeyToRSAPublicKey(E)).getBytes()};return e.pem.encode(h,{maxline:x})},n.getPublicKeyFingerprint=function(E,x){x=x||{};var h=x.md||e.md.sha1.create(),w=x.type||"RSAPublicKey",D;switch(w){case"RSAPublicKey":D=t.toDer(n.publicKeyToRSAPublicKey(E)).getBytes();break;case"SubjectPublicKeyInfo":D=t.toDer(n.publicKeyToAsn1(E)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+x.type+'".')}h.start(),h.update(D);var I=h.digest();if(x.encoding==="hex"){var T=I.toHex();return x.delimiter?T.match(/.{2}/g).join(x.delimiter):T}else{if(x.encoding==="binary")return I.getBytes();if(x.encoding)throw new Error('Unknown encoding "'+x.encoding+'".')}return I},n.certificationRequestFromPem=function(E,x,h){var w=e.pem.decode(E)[0];if(w.type!=="CERTIFICATE REQUEST"){var D=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw D.headerType=w.type,D}if(w.procType&&w.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var I=t.fromDer(w.body,h);return n.certificationRequestFromAsn1(I,x)},n.certificationRequestToPem=function(E,x){var h={type:"CERTIFICATE REQUEST",body:t.toDer(n.certificationRequestToAsn1(E)).getBytes()};return e.pem.encode(h,{maxline:x})},n.createCertificate=function(){var E={};return E.version=2,E.serialNumber="00",E.signatureOid=null,E.signature=null,E.siginfo={},E.siginfo.algorithmOid=null,E.validity={},E.validity.notBefore=new Date,E.validity.notAfter=new Date,E.issuer={},E.issuer.getField=function(x){return c(E.issuer,x)},E.issuer.addField=function(x){b([x]),E.issuer.attributes.push(x)},E.issuer.attributes=[],E.issuer.hash=null,E.subject={},E.subject.getField=function(x){return c(E.subject,x)},E.subject.addField=function(x){b([x]),E.subject.attributes.push(x)},E.subject.attributes=[],E.subject.hash=null,E.extensions=[],E.publicKey=null,E.md=null,E.setSubject=function(x,h){b(x),E.subject.attributes=x,delete E.subject.uniqueId,h&&(E.subject.uniqueId=h),E.subject.hash=null},E.setIssuer=function(x,h){b(x),E.issuer.attributes=x,delete E.issuer.uniqueId,h&&(E.issuer.uniqueId=h),E.issuer.hash=null},E.setExtensions=function(x){for(var h=0;h<x.length;++h)y(x[h],{cert:E});E.extensions=x},E.getExtension=function(x){typeof x=="string"&&(x={name:x});for(var h=null,w,D=0;h===null&&D<E.extensions.length;++D)w=E.extensions[D],(x.id&&w.id===x.id||x.name&&w.name===x.name)&&(h=w);return h},E.sign=function(x,h){E.md=h||e.md.sha1.create();var w=r[E.md.algorithm+"WithRSAEncryption"];if(!w){var D=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw D.algorithm=E.md.algorithm,D}E.signatureOid=E.siginfo.algorithmOid=w,E.tbsCertificate=n.getTBSCertificate(E);var I=t.toDer(E.tbsCertificate);E.md.update(I.getBytes()),E.signature=x.sign(E.md)},E.verify=function(x){var h=!1;if(!E.issued(x)){var w=x.issuer,D=E.subject,I=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw I.expectedIssuer=D.attributes,I.actualIssuer=w.attributes,I}var T=x.md;if(T===null){T=g({signatureOid:x.signatureOid,type:"certificate"});var F=x.tbsCertificate||n.getTBSCertificate(x),P=t.toDer(F);T.update(P.getBytes())}return T!==null&&(h=d({certificate:E,md:T,signature:x.signature})),h},E.isIssuer=function(x){var h=!1,w=E.issuer,D=x.subject;if(w.hash&&D.hash)h=w.hash===D.hash;else if(w.attributes.length===D.attributes.length){h=!0;for(var I,T,F=0;h&&F<w.attributes.length;++F)I=w.attributes[F],T=D.attributes[F],(I.type!==T.type||I.value!==T.value)&&(h=!1)}return h},E.issued=function(x){return x.isIssuer(E)},E.generateSubjectKeyIdentifier=function(){return n.getPublicKeyFingerprint(E.publicKey,{type:"RSAPublicKey"})},E.verifySubjectKeyIdentifier=function(){for(var x=r.subjectKeyIdentifier,h=0;h<E.extensions.length;++h){var w=E.extensions[h];if(w.id===x){var D=E.generateSubjectKeyIdentifier().getBytes();return e.util.hexToBytes(w.subjectKeyIdentifier)===D}}return!1},E},n.certificateFromAsn1=function(E,x){var h={},w=[];if(!t.validate(E,o,h,w)){var D=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw D.errors=w,D}var I=t.derToOid(h.publicKeyOid);if(I!==n.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var T=n.createCertificate();T.version=h.certVersion?h.certVersion.charCodeAt(0):0;var F=e.util.createBuffer(h.certSerialNumber);T.serialNumber=F.toHex(),T.signatureOid=e.asn1.derToOid(h.certSignatureOid),T.signatureParameters=p(T.signatureOid,h.certSignatureParams,!0),T.siginfo.algorithmOid=e.asn1.derToOid(h.certinfoSignatureOid),T.siginfo.parameters=p(T.siginfo.algorithmOid,h.certinfoSignatureParams,!1),T.signature=h.certSignature;var P=[];if(h.certValidity1UTCTime!==void 0&&P.push(t.utcTimeToDate(h.certValidity1UTCTime)),h.certValidity2GeneralizedTime!==void 0&&P.push(t.generalizedTimeToDate(h.certValidity2GeneralizedTime)),h.certValidity3UTCTime!==void 0&&P.push(t.utcTimeToDate(h.certValidity3UTCTime)),h.certValidity4GeneralizedTime!==void 0&&P.push(t.generalizedTimeToDate(h.certValidity4GeneralizedTime)),P.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(P.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(T.validity.notBefore=P[0],T.validity.notAfter=P[1],T.tbsCertificate=h.tbsCertificate,x){T.md=g({signatureOid:T.signatureOid,type:"certificate"});var k=t.toDer(T.tbsCertificate);T.md.update(k.getBytes())}var R=e.md.sha1.create(),M=t.toDer(h.certIssuer);R.update(M.getBytes()),T.issuer.getField=function(G){return c(T.issuer,G)},T.issuer.addField=function(G){b([G]),T.issuer.attributes.push(G)},T.issuer.attributes=n.RDNAttributesAsArray(h.certIssuer),h.certIssuerUniqueId&&(T.issuer.uniqueId=h.certIssuerUniqueId),T.issuer.hash=R.digest().toHex();var O=e.md.sha1.create(),z=t.toDer(h.certSubject);return O.update(z.getBytes()),T.subject.getField=function(G){return c(T.subject,G)},T.subject.addField=function(G){b([G]),T.subject.attributes.push(G)},T.subject.attributes=n.RDNAttributesAsArray(h.certSubject),h.certSubjectUniqueId&&(T.subject.uniqueId=h.certSubjectUniqueId),T.subject.hash=O.digest().toHex(),h.certExtensions?T.extensions=n.certificateExtensionsFromAsn1(h.certExtensions):T.extensions=[],T.publicKey=n.publicKeyFromAsn1(h.subjectPublicKeyInfo),T},n.certificateExtensionsFromAsn1=function(E){for(var x=[],h=0;h<E.value.length;++h)for(var w=E.value[h],D=0;D<w.value.length;++D)x.push(n.certificateExtensionFromAsn1(w.value[D]));return x},n.certificateExtensionFromAsn1=function(E){var x={};if(x.id=t.derToOid(E.value[0].value),x.critical=!1,E.value[1].type===t.Type.BOOLEAN?(x.critical=E.value[1].value.charCodeAt(0)!==0,x.value=E.value[2].value):x.value=E.value[1].value,x.id in r){if(x.name=r[x.id],x.name==="keyUsage"){var h=t.fromDer(x.value),w=0,D=0;h.value.length>1&&(w=h.value.charCodeAt(1),D=h.value.length>2?h.value.charCodeAt(2):0),x.digitalSignature=(w&128)===128,x.nonRepudiation=(w&64)===64,x.keyEncipherment=(w&32)===32,x.dataEncipherment=(w&16)===16,x.keyAgreement=(w&8)===8,x.keyCertSign=(w&4)===4,x.cRLSign=(w&2)===2,x.encipherOnly=(w&1)===1,x.decipherOnly=(D&128)===128}else if(x.name==="basicConstraints"){var h=t.fromDer(x.value);h.value.length>0&&h.value[0].type===t.Type.BOOLEAN?x.cA=h.value[0].value.charCodeAt(0)!==0:x.cA=!1;var I=null;h.value.length>0&&h.value[0].type===t.Type.INTEGER?I=h.value[0].value:h.value.length>1&&(I=h.value[1].value),I!==null&&(x.pathLenConstraint=t.derToInteger(I))}else if(x.name==="extKeyUsage")for(var h=t.fromDer(x.value),T=0;T<h.value.length;++T){var F=t.derToOid(h.value[T].value);F in r?x[r[F]]=!0:x[F]=!0}else if(x.name==="nsCertType"){var h=t.fromDer(x.value),w=0;h.value.length>1&&(w=h.value.charCodeAt(1)),x.client=(w&128)===128,x.server=(w&64)===64,x.email=(w&32)===32,x.objsign=(w&16)===16,x.reserved=(w&8)===8,x.sslCA=(w&4)===4,x.emailCA=(w&2)===2,x.objCA=(w&1)===1}else if(x.name==="subjectAltName"||x.name==="issuerAltName"){x.altNames=[];for(var P,h=t.fromDer(x.value),k=0;k<h.value.length;++k){P=h.value[k];var R={type:P.type,value:P.value};switch(x.altNames.push(R),P.type){case 1:case 2:case 6:break;case 7:R.ip=e.util.bytesToIP(P.value);break;case 8:R.oid=t.derToOid(P.value);break}}}else if(x.name==="subjectKeyIdentifier"){var h=t.fromDer(x.value);x.subjectKeyIdentifier=e.util.bytesToHex(h.value)}}return x},n.certificationRequestFromAsn1=function(E,x){var h={},w=[];if(!t.validate(E,u,h,w)){var D=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw D.errors=w,D}var I=t.derToOid(h.publicKeyOid);if(I!==n.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var T=n.createCertificationRequest();if(T.version=h.csrVersion?h.csrVersion.charCodeAt(0):0,T.signatureOid=e.asn1.derToOid(h.csrSignatureOid),T.signatureParameters=p(T.signatureOid,h.csrSignatureParams,!0),T.siginfo.algorithmOid=e.asn1.derToOid(h.csrSignatureOid),T.siginfo.parameters=p(T.siginfo.algorithmOid,h.csrSignatureParams,!1),T.signature=h.csrSignature,T.certificationRequestInfo=h.certificationRequestInfo,x){T.md=g({signatureOid:T.signatureOid,type:"certification request"});var F=t.toDer(T.certificationRequestInfo);T.md.update(F.getBytes())}var P=e.md.sha1.create();return T.subject.getField=function(k){return c(T.subject,k)},T.subject.addField=function(k){b([k]),T.subject.attributes.push(k)},T.subject.attributes=n.RDNAttributesAsArray(h.certificationRequestInfoSubject,P),T.subject.hash=P.digest().toHex(),T.publicKey=n.publicKeyFromAsn1(h.subjectPublicKeyInfo),T.getAttribute=function(k){return c(T,k)},T.addAttribute=function(k){b([k]),T.attributes.push(k)},T.attributes=n.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]),T},n.createCertificationRequest=function(){var E={};return E.version=0,E.signatureOid=null,E.signature=null,E.siginfo={},E.siginfo.algorithmOid=null,E.subject={},E.subject.getField=function(x){return c(E.subject,x)},E.subject.addField=function(x){b([x]),E.subject.attributes.push(x)},E.subject.attributes=[],E.subject.hash=null,E.publicKey=null,E.attributes=[],E.getAttribute=function(x){return c(E,x)},E.addAttribute=function(x){b([x]),E.attributes.push(x)},E.md=null,E.setSubject=function(x){b(x),E.subject.attributes=x,E.subject.hash=null},E.setAttributes=function(x){b(x),E.attributes=x},E.sign=function(x,h){E.md=h||e.md.sha1.create();var w=r[E.md.algorithm+"WithRSAEncryption"];if(!w){var D=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw D.algorithm=E.md.algorithm,D}E.signatureOid=E.siginfo.algorithmOid=w,E.certificationRequestInfo=n.getCertificationRequestInfo(E);var I=t.toDer(E.certificationRequestInfo);E.md.update(I.getBytes()),E.signature=x.sign(E.md)},E.verify=function(){var x=!1,h=E.md;if(h===null){h=g({signatureOid:E.signatureOid,type:"certification request"});var w=E.certificationRequestInfo||n.getCertificationRequestInfo(E),D=t.toDer(w);h.update(D.getBytes())}return h!==null&&(x=d({certificate:E,md:h,signature:E.signature})),x},E};function m(E){for(var x=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),h,w,D=E.attributes,I=0;I<D.length;++I){h=D[I];var T=h.value,F=t.Type.PRINTABLESTRING;"valueTagClass"in h&&(F=h.valueTagClass,F===t.Type.UTF8&&(T=e.util.encodeUtf8(T))),w=t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(h.type).getBytes()),t.create(t.Class.UNIVERSAL,F,!1,T)])]),x.value.push(w)}return x}function b(E){for(var x,h=0;h<E.length;++h){if(x=E[h],typeof x.name>"u"&&(x.type&&x.type in n.oids?x.name=n.oids[x.type]:x.shortName&&x.shortName in i&&(x.name=n.oids[i[x.shortName]])),typeof x.type>"u")if(x.name&&x.name in n.oids)x.type=n.oids[x.name];else{var w=new Error("Attribute type not specified.");throw w.attribute=x,w}if(typeof x.shortName>"u"&&x.name&&x.name in i&&(x.shortName=i[x.name]),x.type===r.extensionRequest&&(x.valueConstructed=!0,x.valueTagClass=t.Type.SEQUENCE,!x.value&&x.extensions)){x.value=[];for(var D=0;D<x.extensions.length;++D)x.value.push(n.certificateExtensionToAsn1(y(x.extensions[D])))}if(typeof x.value>"u"){var w=new Error("Attribute value not specified.");throw w.attribute=x,w}}}function y(E,x){if(x=x||{},typeof E.name>"u"&&E.id&&E.id in n.oids&&(E.name=n.oids[E.id]),typeof E.id>"u")if(E.name&&E.name in n.oids)E.id=n.oids[E.name];else{var h=new Error("Extension ID not specified.");throw h.extension=E,h}if(typeof E.value<"u")return E;if(E.name==="keyUsage"){var w=0,D=0,I=0;E.digitalSignature&&(D|=128,w=7),E.nonRepudiation&&(D|=64,w=6),E.keyEncipherment&&(D|=32,w=5),E.dataEncipherment&&(D|=16,w=4),E.keyAgreement&&(D|=8,w=3),E.keyCertSign&&(D|=4,w=2),E.cRLSign&&(D|=2,w=1),E.encipherOnly&&(D|=1,w=0),E.decipherOnly&&(I|=128,w=7);var T=String.fromCharCode(w);I!==0?T+=String.fromCharCode(D)+String.fromCharCode(I):D!==0&&(T+=String.fromCharCode(D)),E.value=t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,T)}else if(E.name==="basicConstraints")E.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),E.cA&&E.value.value.push(t.create(t.Class.UNIVERSAL,t.Type.BOOLEAN,!1,"ÿ")),"pathLenConstraint"in E&&E.value.value.push(t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(E.pathLenConstraint).getBytes()));else if(E.name==="extKeyUsage"){E.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);var F=E.value.value;for(var P in E)E[P]===!0&&(P in r?F.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(r[P]).getBytes())):P.indexOf(".")!==-1&&F.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(P).getBytes())))}else if(E.name==="nsCertType"){var w=0,D=0;E.client&&(D|=128,w=7),E.server&&(D|=64,w=6),E.email&&(D|=32,w=5),E.objsign&&(D|=16,w=4),E.reserved&&(D|=8,w=3),E.sslCA&&(D|=4,w=2),E.emailCA&&(D|=2,w=1),E.objCA&&(D|=1,w=0);var T=String.fromCharCode(w);D!==0&&(T+=String.fromCharCode(D)),E.value=t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,T)}else if(E.name==="subjectAltName"||E.name==="issuerAltName"){E.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);for(var k,R=0;R<E.altNames.length;++R){k=E.altNames[R];var T=k.value;if(k.type===7&&k.ip){if(T=e.util.bytesFromIP(k.ip),T===null){var h=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw h.extension=E,h}}else k.type===8&&(k.oid?T=t.oidToDer(t.oidToDer(k.oid)):T=t.oidToDer(T));E.value.value.push(t.create(t.Class.CONTEXT_SPECIFIC,k.type,!1,T))}}else if(E.name==="nsComment"&&x.cert){if(!/^[\x00-\x7F]*$/.test(E.comment)||E.comment.length<1||E.comment.length>128)throw new Error('Invalid "nsComment" content.');E.value=t.create(t.Class.UNIVERSAL,t.Type.IA5STRING,!1,E.comment)}else if(E.name==="subjectKeyIdentifier"&&x.cert){var M=x.cert.generateSubjectKeyIdentifier();E.subjectKeyIdentifier=M.toHex(),E.value=t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,M.getBytes())}else if(E.name==="authorityKeyIdentifier"&&x.cert){E.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);var F=E.value.value;if(E.keyIdentifier){var O=E.keyIdentifier===!0?x.cert.generateSubjectKeyIdentifier().getBytes():E.keyIdentifier;F.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!1,O))}if(E.authorityCertIssuer){var z=[t.create(t.Class.CONTEXT_SPECIFIC,4,!0,[m(E.authorityCertIssuer===!0?x.cert.issuer:E.authorityCertIssuer)])];F.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,z))}if(E.serialNumber){var G=e.util.hexToBytes(E.serialNumber===!0?x.cert.serialNumber:E.serialNumber);F.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!1,G))}}else if(E.name==="cRLDistributionPoints"){E.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);for(var F=E.value.value,U=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),J=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[]),k,R=0;R<E.altNames.length;++R){k=E.altNames[R];var T=k.value;if(k.type===7&&k.ip){if(T=e.util.bytesFromIP(k.ip),T===null){var h=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw h.extension=E,h}}else k.type===8&&(k.oid?T=t.oidToDer(t.oidToDer(k.oid)):T=t.oidToDer(T));J.value.push(t.create(t.Class.CONTEXT_SPECIFIC,k.type,!1,T))}U.value.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[J])),F.push(U)}if(typeof E.value>"u"){var h=new Error("Extension value not specified.");throw h.extension=E,h}return E}function f(E,x){switch(E){case r["RSASSA-PSS"]:var h=[];return x.hash.algorithmOid!==void 0&&h.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(x.hash.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])])),x.mgf.algorithmOid!==void 0&&h.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(x.mgf.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(x.mgf.hash.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])])])),x.saltLength!==void 0&&h.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(x.saltLength).getBytes())])),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,h);default:return t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")}}function v(E){var x=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[]);if(E.attributes.length===0)return x;for(var h=E.attributes,w=0;w<h.length;++w){var D=h[w],I=D.value,T=t.Type.UTF8;"valueTagClass"in D&&(T=D.valueTagClass),T===t.Type.UTF8&&(I=e.util.encodeUtf8(I));var F=!1;"valueConstructed"in D&&(F=D.valueConstructed);var P=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(D.type).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,T,F,I)])]);x.value.push(P)}return x}var C=new Date("1950-01-01T00:00:00Z"),S=new Date("2050-01-01T00:00:00Z");function _(E){return E>=C&&E<S?t.create(t.Class.UNIVERSAL,t.Type.UTCTIME,!1,t.dateToUtcTime(E)):t.create(t.Class.UNIVERSAL,t.Type.GENERALIZEDTIME,!1,t.dateToGeneralizedTime(E))}return n.getTBSCertificate=function(E){var x=_(E.validity.notBefore),h=_(E.validity.notAfter),w=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(E.version).getBytes())]),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,e.util.hexToBytes(E.serialNumber)),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(E.siginfo.algorithmOid).getBytes()),f(E.siginfo.algorithmOid,E.siginfo.parameters)]),m(E.issuer),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[x,h]),m(E.subject),n.publicKeyToAsn1(E.publicKey)]);return E.issuer.uniqueId&&w.value.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+E.issuer.uniqueId)])),E.subject.uniqueId&&w.value.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!0,[t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+E.subject.uniqueId)])),E.extensions.length>0&&w.value.push(n.certificateExtensionsToAsn1(E.extensions)),w},n.getCertificationRequestInfo=function(E){var x=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(E.version).getBytes()),m(E.subject),n.publicKeyToAsn1(E.publicKey),v(E)]);return x},n.distinguishedNameToAsn1=function(E){return m(E)},n.certificateToAsn1=function(E){var x=E.tbsCertificate||n.getTBSCertificate(E);return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[x,t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(E.signatureOid).getBytes()),f(E.signatureOid,E.signatureParameters)]),t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+E.signature)])},n.certificateExtensionsToAsn1=function(E){var x=t.create(t.Class.CONTEXT_SPECIFIC,3,!0,[]),h=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);x.value.push(h);for(var w=0;w<E.length;++w)h.value.push(n.certificateExtensionToAsn1(E[w]));return x},n.certificateExtensionToAsn1=function(E){var x=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);x.value.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(E.id).getBytes())),E.critical&&x.value.push(t.create(t.Class.UNIVERSAL,t.Type.BOOLEAN,!1,"ÿ"));var h=E.value;return typeof E.value!="string"&&(h=t.toDer(h).getBytes()),x.value.push(t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,h)),x},n.certificationRequestToAsn1=function(E){var x=E.certificationRequestInfo||n.getCertificationRequestInfo(E);return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[x,t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(E.signatureOid).getBytes()),f(E.signatureOid,E.signatureParameters)]),t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,"\0"+E.signature)])},n.createCaStore=function(E){var x={certs:{}};x.getIssuer=function(T){var F=h(T.issuer);return F},x.addCertificate=function(T){if(typeof T=="string"&&(T=e.pki.certificateFromPem(T)),w(T.subject),!x.hasCertificate(T))if(T.subject.hash in x.certs){var F=x.certs[T.subject.hash];e.util.isArray(F)||(F=[F]),F.push(T),x.certs[T.subject.hash]=F}else x.certs[T.subject.hash]=T},x.hasCertificate=function(T){typeof T=="string"&&(T=e.pki.certificateFromPem(T));var F=h(T.subject);if(!F)return!1;e.util.isArray(F)||(F=[F]);for(var P=t.toDer(n.certificateToAsn1(T)).getBytes(),k=0;k<F.length;++k){var R=t.toDer(n.certificateToAsn1(F[k])).getBytes();if(P===R)return!0}return!1},x.listAllCertificates=function(){var T=[];for(var F in x.certs)if(x.certs.hasOwnProperty(F)){var P=x.certs[F];if(!e.util.isArray(P))T.push(P);else for(var k=0;k<P.length;++k)T.push(P[k])}return T},x.removeCertificate=function(T){var F;if(typeof T=="string"&&(T=e.pki.certificateFromPem(T)),w(T.subject),!x.hasCertificate(T))return null;var P=h(T.subject);if(!e.util.isArray(P))return F=x.certs[T.subject.hash],delete x.certs[T.subject.hash],F;for(var k=t.toDer(n.certificateToAsn1(T)).getBytes(),R=0;R<P.length;++R){var M=t.toDer(n.certificateToAsn1(P[R])).getBytes();k===M&&(F=P[R],P.splice(R,1))}return P.length===0&&delete x.certs[T.subject.hash],F};function h(T){return w(T),x.certs[T.hash]||null}function w(T){if(!T.hash){var F=e.md.sha1.create();T.attributes=n.RDNAttributesAsArray(m(T),F),T.hash=F.digest().toHex()}}if(E)for(var D=0;D<E.length;++D){var I=E[D];x.addCertificate(I)}return x},n.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},n.verifyCertificateChain=function(E,x,h){typeof h=="function"&&(h={verify:h}),h=h||{},x=x.slice(0);var w=x.slice(0),D=h.validityCheckDate;typeof D>"u"&&(D=new Date);var I=!0,T=null,F=0;do{var P=x.shift(),k=null,R=!1;if(D&&(D<P.validity.notBefore||D>P.validity.notAfter)&&(T={message:"Certificate is not valid yet or has expired.",error:n.certificateError.certificate_expired,notBefore:P.validity.notBefore,notAfter:P.validity.notAfter,now:D}),T===null){if(k=x[0]||E.getIssuer(P),k===null&&P.isIssuer(P)&&(R=!0,k=P),k){var M=k;e.util.isArray(M)||(M=[M]);for(var O=!1;!O&&M.length>0;){k=M.shift();try{O=k.verify(P)}catch{}}O||(T={message:"Certificate signature is invalid.",error:n.certificateError.bad_certificate})}T===null&&(!k||R)&&!E.hasCertificate(P)&&(T={message:"Certificate is not trusted.",error:n.certificateError.unknown_ca})}if(T===null&&k&&!P.isIssuer(k)&&(T={message:"Certificate issuer is invalid.",error:n.certificateError.bad_certificate}),T===null)for(var z={keyUsage:!0,basicConstraints:!0},G=0;T===null&&G<P.extensions.length;++G){var U=P.extensions[G];U.critical&&!(U.name in z)&&(T={message:"Certificate has an unsupported critical extension.",error:n.certificateError.unsupported_certificate})}if(T===null&&(!I||x.length===0&&(!k||R))){var J=P.getExtension("basicConstraints"),Q=P.getExtension("keyUsage");if(Q!==null&&(!Q.keyCertSign||J===null)&&(T={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:n.certificateError.bad_certificate}),T===null&&J!==null&&!J.cA&&(T={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:n.certificateError.bad_certificate}),T===null&&Q!==null&&"pathLenConstraint"in J){var ee=F-1;ee>J.pathLenConstraint&&(T={message:"Certificate basicConstraints pathLenConstraint violated.",error:n.certificateError.bad_certificate})}}var q=T===null?!0:T.error,Z=h.verify?h.verify(q,F,w):q;if(Z===!0)T=null;else throw q===!0&&(T={message:"The application rejected the certificate.",error:n.certificateError.bad_certificate}),(Z||Z===0)&&(typeof Z=="object"&&!e.util.isArray(Z)?(Z.message&&(T.message=Z.message),Z.error&&(T.error=Z.error)):typeof Z=="string"&&(T.error=Z)),T;I=!1,++F}while(x.length>0);return!0},vf.exports}var n1;function aC(){if(n1)return mf.exports;n1=1;var e=je();Jr(),yl(),Za(),rC(),nC(),Dr(),Qc(),xl(),Xe(),Eg();var t=e.asn1,n=e.pki,r=mf.exports=e.pkcs12=e.pkcs12||{},i={name:"ContentInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:t.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},a={name:"PFX",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},i,{name:"PFX.macData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:t.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},o={name:"SafeBag",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:t.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},s={name:"Attribute",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,capture:"values"}]},l={name:"CertBag",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:t.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:t.Class.UNIVERSAL,type:t.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function u(b,y,f,v){for(var C=[],S=0;S<b.length;S++)for(var _=0;_<b[S].safeBags.length;_++){var E=b[S].safeBags[_];if(!(v!==void 0&&E.type!==v)){if(y===null){C.push(E);continue}E.attributes[y]!==void 0&&E.attributes[y].indexOf(f)>=0&&C.push(E)}}return C}r.pkcs12FromAsn1=function(b,y,f){typeof y=="string"?(f=y,y=!0):y===void 0&&(y=!0);var v={},C=[];if(!t.validate(b,a,v,C)){var S=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw S.errors=S,S}var _={version:v.version.charCodeAt(0),safeContents:[],getBags:function(k){var R={},M;return"localKeyId"in k?M=k.localKeyId:"localKeyIdHex"in k&&(M=e.util.hexToBytes(k.localKeyIdHex)),M===void 0&&!("friendlyName"in k)&&"bagType"in k&&(R[k.bagType]=u(_.safeContents,null,null,k.bagType)),M!==void 0&&(R.localKeyId=u(_.safeContents,"localKeyId",M,k.bagType)),"friendlyName"in k&&(R.friendlyName=u(_.safeContents,"friendlyName",k.friendlyName,k.bagType)),R},getBagsByFriendlyName:function(k,R){return u(_.safeContents,"friendlyName",k,R)},getBagsByLocalKeyId:function(k,R){return u(_.safeContents,"localKeyId",k,R)}};if(v.version.charCodeAt(0)!==3){var S=new Error("PKCS#12 PFX of version other than 3 not supported.");throw S.version=v.version.charCodeAt(0),S}if(t.derToOid(v.contentType)!==n.oids.data){var S=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw S.oid=t.derToOid(v.contentType),S}var E=v.content.value[0];if(E.tagClass!==t.Class.UNIVERSAL||E.type!==t.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(E=c(E),v.mac){var x=null,h=0,w=t.derToOid(v.macAlgorithm);switch(w){case n.oids.sha1:x=e.md.sha1.create(),h=20;break;case n.oids.sha256:x=e.md.sha256.create(),h=32;break;case n.oids.sha384:x=e.md.sha384.create(),h=48;break;case n.oids.sha512:x=e.md.sha512.create(),h=64;break;case n.oids.md5:x=e.md.md5.create(),h=16;break}if(x===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+w);var D=new e.util.ByteBuffer(v.macSalt),I="macIterations"in v?parseInt(e.util.bytesToHex(v.macIterations),16):1,T=r.generateKey(f,D,3,I,h,x),F=e.hmac.create();F.start(x,T),F.update(E.value);var P=F.getMac();if(P.getBytes()!==v.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(b.value)&&b.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return p(_,E.value,y,f),_};function c(b){if(b.composed||b.constructed){for(var y=e.util.createBuffer(),f=0;f<b.value.length;++f)y.putBytes(b.value[f].value);b.composed=b.constructed=!1,b.value=y.getBytes()}return b}function p(b,y,f,v){if(y=t.fromDer(y,f),y.tagClass!==t.Class.UNIVERSAL||y.type!==t.Type.SEQUENCE||y.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var C=0;C<y.value.length;C++){var S=y.value[C],_={},E=[];if(!t.validate(S,i,_,E)){var x=new Error("Cannot read ContentInfo.");throw x.errors=E,x}var h={encrypted:!1},w=null,D=_.content.value[0];switch(t.derToOid(_.contentType)){case n.oids.data:if(D.tagClass!==t.Class.UNIVERSAL||D.type!==t.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");w=c(D).value;break;case n.oids.encryptedData:w=g(D,v),h.encrypted=!0;break;default:var x=new Error("Unsupported PKCS#12 contentType.");throw x.contentType=t.derToOid(_.contentType),x}h.safeBags=d(w,f,v),b.safeContents.push(h)}}function g(b,y){var f={},v=[];if(!t.validate(b,e.pkcs7.asn1.encryptedDataValidator,f,v)){var C=new Error("Cannot read EncryptedContentInfo.");throw C.errors=v,C}var S=t.derToOid(f.contentType);if(S!==n.oids.data){var C=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw C.oid=S,C}S=t.derToOid(f.encAlgorithm);var _=n.pbe.getCipher(S,f.encParameter,y),E=c(f.encryptedContentAsn1),x=e.util.createBuffer(E.value);if(_.update(x),!_.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return _.output.getBytes()}function d(b,y,f){if(!y&&b.length===0)return[];if(b=t.fromDer(b,y),b.tagClass!==t.Class.UNIVERSAL||b.type!==t.Type.SEQUENCE||b.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var v=[],C=0;C<b.value.length;C++){var S=b.value[C],_={},E=[];if(!t.validate(S,o,_,E)){var x=new Error("Cannot read SafeBag.");throw x.errors=E,x}var h={type:t.derToOid(_.bagId),attributes:m(_.bagAttributes)};v.push(h);var w,D,I=_.bagValue.value[0];switch(h.type){case n.oids.pkcs8ShroudedKeyBag:if(I=n.decryptPrivateKeyInfo(I,f),I===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case n.oids.keyBag:try{h.key=n.privateKeyFromAsn1(I)}catch{h.key=null,h.asn1=I}continue;case n.oids.certBag:w=l,D=function(){if(t.derToOid(_.certId)!==n.oids.x509Certificate){var F=new Error("Unsupported certificate type, only X.509 supported.");throw F.oid=t.derToOid(_.certId),F}var P=t.fromDer(_.cert,y);try{h.cert=n.certificateFromAsn1(P,!0)}catch{h.cert=null,h.asn1=P}};break;default:var x=new Error("Unsupported PKCS#12 SafeBag type.");throw x.oid=h.type,x}if(w!==void 0&&!t.validate(I,w,_,E)){var x=new Error("Cannot read PKCS#12 "+w.name);throw x.errors=E,x}D()}return v}function m(b){var y={};if(b!==void 0)for(var f=0;f<b.length;++f){var v={},C=[];if(!t.validate(b[f],s,v,C)){var S=new Error("Cannot read PKCS#12 BagAttribute.");throw S.errors=C,S}var _=t.derToOid(v.oid);if(n.oids[_]!==void 0){y[n.oids[_]]=[];for(var E=0;E<v.values.length;++E)y[n.oids[_]].push(v.values[E].value)}}return y}return r.toPkcs12Asn1=function(b,y,f,v){v=v||{},v.saltSize=v.saltSize||8,v.count=v.count||2048,v.algorithm=v.algorithm||v.encAlgorithm||"aes128","useMac"in v||(v.useMac=!0),"localKeyId"in v||(v.localKeyId=null),"generateLocalKeyId"in v||(v.generateLocalKeyId=!0);var C=v.localKeyId,S;if(C!==null)C=e.util.hexToBytes(C);else if(v.generateLocalKeyId)if(y){var _=e.util.isArray(y)?y[0]:y;typeof _=="string"&&(_=n.certificateFromPem(_));var E=e.md.sha1.create();E.update(t.toDer(n.certificateToAsn1(_)).getBytes()),C=E.digest().getBytes()}else C=e.random.getBytes(20);var x=[];C!==null&&x.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.localKeyId).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,C)])])),"friendlyName"in v&&x.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.friendlyName).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,t.Type.BMPSTRING,!1,v.friendlyName)])])),x.length>0&&(S=t.create(t.Class.UNIVERSAL,t.Type.SET,!0,x));var h=[],w=[];y!==null&&(e.util.isArray(y)?w=y:w=[y]);for(var D=[],I=0;I<w.length;++I){y=w[I],typeof y=="string"&&(y=n.certificateFromPem(y));var T=I===0?S:void 0,F=n.certificateToAsn1(y),P=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.certBag).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.x509Certificate).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(F).getBytes())])])]),T]);D.push(P)}if(D.length>0){var k=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,D),R=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.data).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(k).getBytes())])]);h.push(R)}var M=null;if(b!==null){var O=n.wrapRsaPrivateKey(n.privateKeyToAsn1(b));f===null?M=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.keyBag).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[O]),S]):M=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.pkcs8ShroudedKeyBag).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[n.encryptPrivateKeyInfo(O,f,v)]),S]);var z=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[M]),G=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.data).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(z).getBytes())])]);h.push(G)}var U=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,h),J;if(v.useMac){var E=e.md.sha1.create(),Q=new e.util.ByteBuffer(e.random.getBytes(v.saltSize)),ee=v.count,b=r.generateKey(f,Q,3,ee,20),q=e.hmac.create();q.start(E,b),q.update(t.toDer(U).getBytes());var Z=q.getMac();J=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.sha1).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")]),t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,Z.getBytes())]),t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,Q.getBytes()),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(ee).getBytes())])}return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(3).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.data).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(U).getBytes())])]),J])},r.generateKey=e.pbe.generatePkcs12Key,mf.exports}var r1;function oC(){if(r1)return af.exports;r1=1;var e=je();Jr(),Za(),nC(),qo(),xg(),aC(),Cg(),Qc(),Xe(),Eg();var t=e.asn1,n=af.exports=e.pki=e.pki||{};return n.pemToDer=function(r){var i=e.pem.decode(r)[0];if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return e.util.createBuffer(i.body)},n.privateKeyFromPem=function(r){var i=e.pem.decode(r)[0];if(i.type!=="PRIVATE KEY"&&i.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw a.headerType=i.type,a}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var o=t.fromDer(i.body);return n.privateKeyFromAsn1(o)},n.privateKeyToPem=function(r,i){var a={type:"RSA PRIVATE KEY",body:t.toDer(n.privateKeyToAsn1(r)).getBytes()};return e.pem.encode(a,{maxline:i})},n.privateKeyInfoToPem=function(r,i){var a={type:"PRIVATE KEY",body:t.toDer(r).getBytes()};return e.pem.encode(a,{maxline:i})},af.exports}var Ef,i1;function sC(){if(i1)return Ef;i1=1;var e=je();Jr(),yl(),vg(),qo(),oC(),Dr(),xl(),Xe();var t=function($,H,V,A){var L=e.util.createBuffer(),K=$.length>>1,X=K+($.length&1),le=$.substr(0,X),ie=$.substr(K,X),oe=e.util.createBuffer(),ne=e.hmac.create();V=H+V;var ue=Math.ceil(A/16),be=Math.ceil(A/20);ne.start("MD5",le);var ve=e.util.createBuffer();oe.putBytes(V);for(var pe=0;pe<ue;++pe)ne.start(null,null),ne.update(oe.getBytes()),oe.putBuffer(ne.digest()),ne.start(null,null),ne.update(oe.bytes()+V),ve.putBuffer(ne.digest());ne.start("SHA1",ie);var $e=e.util.createBuffer();oe.clear(),oe.putBytes(V);for(var pe=0;pe<be;++pe)ne.start(null,null),ne.update(oe.getBytes()),oe.putBuffer(ne.digest()),ne.start(null,null),ne.update(oe.bytes()+V),$e.putBuffer(ne.digest());return L.putBytes(e.util.xorBytes(ve.getBytes(),$e.getBytes(),A)),L},n=function($,H,V){var A=e.hmac.create();A.start("SHA1",$);var L=e.util.createBuffer();return L.putInt32(H[0]),L.putInt32(H[1]),L.putByte(V.type),L.putByte(V.version.major),L.putByte(V.version.minor),L.putInt16(V.length),L.putBytes(V.fragment.bytes()),A.update(L.getBytes()),A.digest().getBytes()},r=function($,H,V){var A=!1;try{var L=$.deflate(H.fragment.getBytes());H.fragment=e.util.createBuffer(L),H.length=L.length,A=!0}catch{}return A},i=function($,H,V){var A=!1;try{var L=$.inflate(H.fragment.getBytes());H.fragment=e.util.createBuffer(L),H.length=L.length,A=!0}catch{}return A},a=function($,H){var V=0;switch(H){case 1:V=$.getByte();break;case 2:V=$.getInt16();break;case 3:V=$.getInt24();break;case 4:V=$.getInt32();break}return e.util.createBuffer($.getBytes(V))},o=function($,H,V){$.putInt(V.length(),H<<3),$.putBuffer(V)},s={};s.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},s.SupportedVersions=[s.Versions.TLS_1_1,s.Versions.TLS_1_0],s.Version=s.SupportedVersions[0],s.MaxFragment=15360,s.ConnectionEnd={server:0,client:1},s.PRFAlgorithm={tls_prf_sha256:0},s.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},s.CipherType={stream:0,block:1,aead:2},s.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},s.CompressionMethod={none:0,deflate:1},s.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},s.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},s.Alert={},s.Alert.Level={warning:1,fatal:2},s.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},s.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},s.CipherSuites={},s.getCipherSuite=function($){var H=null;for(var V in s.CipherSuites){var A=s.CipherSuites[V];if(A.id[0]===$.charCodeAt(0)&&A.id[1]===$.charCodeAt(1)){H=A;break}}return H},s.handleUnexpected=function($,H){var V=!$.open&&$.entity===s.ConnectionEnd.client;V||$.error($,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.unexpected_message}})},s.handleHelloRequest=function($,H,V){!$.handshaking&&$.handshakes>0&&(s.queue($,s.createAlert($,{level:s.Alert.Level.warning,description:s.Alert.Description.no_renegotiation})),s.flush($)),$.process()},s.parseHelloMessage=function($,H,V){var A=null,L=$.entity===s.ConnectionEnd.client;if(V<38)$.error($,{message:L?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.illegal_parameter}});else{var K=H.fragment,X=K.length();if(A={version:{major:K.getByte(),minor:K.getByte()},random:e.util.createBuffer(K.getBytes(32)),session_id:a(K,1),extensions:[]},L?(A.cipher_suite=K.getBytes(2),A.compression_method=K.getByte()):(A.cipher_suites=a(K,2),A.compression_methods=a(K,1)),X=V-(X-K.length()),X>0){for(var le=a(K,2);le.length()>0;)A.extensions.push({type:[le.getByte(),le.getByte()],data:a(le,2)});if(!L)for(var ie=0;ie<A.extensions.length;++ie){var oe=A.extensions[ie];if(oe.type[0]===0&&oe.type[1]===0)for(var ne=a(oe.data,2);ne.length()>0;){var ue=ne.getByte();if(ue!==0)break;$.session.extensions.server_name.serverNameList.push(a(ne,2).getBytes())}}}if($.session.version&&(A.version.major!==$.session.version.major||A.version.minor!==$.session.version.minor))return $.error($,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.protocol_version}});if(L)$.session.cipherSuite=s.getCipherSuite(A.cipher_suite);else for(var be=e.util.createBuffer(A.cipher_suites.bytes());be.length()>0&&($.session.cipherSuite=s.getCipherSuite(be.getBytes(2)),$.session.cipherSuite===null););if($.session.cipherSuite===null)return $.error($,{message:"No cipher suites in common.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.handshake_failure},cipherSuite:e.util.bytesToHex(A.cipher_suite)});L?$.session.compressionMethod=A.compression_method:$.session.compressionMethod=s.CompressionMethod.none}return A},s.createSecurityParameters=function($,H){var V=$.entity===s.ConnectionEnd.client,A=H.random.bytes(),L=V?$.session.sp.client_random:A,K=V?A:s.createRandom().getBytes();$.session.sp={entity:$.entity,prf_algorithm:s.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:$.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:L,server_random:K}},s.handleServerHello=function($,H,V){var A=s.parseHelloMessage($,H,V);if(!$.fail){if(A.version.minor<=$.version.minor)$.version.minor=A.version.minor;else return $.error($,{message:"Incompatible TLS version.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.protocol_version}});$.session.version=$.version;var L=A.session_id.bytes();L.length>0&&L===$.session.id?($.expect=d,$.session.resuming=!0,$.session.sp.server_random=A.random.bytes()):($.expect=u,$.session.resuming=!1,s.createSecurityParameters($,A)),$.session.id=L,$.process()}},s.handleClientHello=function($,H,V){var A=s.parseHelloMessage($,H,V);if(!$.fail){var L=A.session_id.bytes(),K=null;if($.sessionCache&&(K=$.sessionCache.getSession(L),K===null?L="":(K.version.major!==A.version.major||K.version.minor>A.version.minor)&&(K=null,L="")),L.length===0&&(L=e.random.getBytes(32)),$.session.id=L,$.session.clientHelloVersion=A.version,$.session.sp={},K)$.version=$.session.version=K.version,$.session.sp=K.sp;else{for(var X,le=1;le<s.SupportedVersions.length&&(X=s.SupportedVersions[le],!(X.minor<=A.version.minor));++le);$.version={major:X.major,minor:X.minor},$.session.version=$.version}K!==null?($.expect=_,$.session.resuming=!0,$.session.sp.client_random=A.random.bytes()):($.expect=$.verifyClient!==!1?v:C,$.session.resuming=!1,s.createSecurityParameters($,A)),$.open=!0,s.queue($,s.createRecord($,{type:s.ContentType.handshake,data:s.createServerHello($)})),$.session.resuming?(s.queue($,s.createRecord($,{type:s.ContentType.change_cipher_spec,data:s.createChangeCipherSpec()})),$.state.pending=s.createConnectionState($),$.state.current.write=$.state.pending.write,s.queue($,s.createRecord($,{type:s.ContentType.handshake,data:s.createFinished($)}))):(s.queue($,s.createRecord($,{type:s.ContentType.handshake,data:s.createCertificate($)})),$.fail||(s.queue($,s.createRecord($,{type:s.ContentType.handshake,data:s.createServerKeyExchange($)})),$.verifyClient!==!1&&s.queue($,s.createRecord($,{type:s.ContentType.handshake,data:s.createCertificateRequest($)})),s.queue($,s.createRecord($,{type:s.ContentType.handshake,data:s.createServerHelloDone($)})))),s.flush($),$.process()}},s.handleCertificate=function($,H,V){if(V<3)return $.error($,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.illegal_parameter}});var A=H.fragment,L={certificate_list:a(A,3)},K,X,le=[];try{for(;L.certificate_list.length()>0;)K=a(L.certificate_list,3),X=e.asn1.fromDer(K),K=e.pki.certificateFromAsn1(X,!0),le.push(K)}catch(oe){return $.error($,{message:"Could not parse certificate list.",cause:oe,send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.bad_certificate}})}var ie=$.entity===s.ConnectionEnd.client;(ie||$.verifyClient===!0)&&le.length===0?$.error($,{message:ie?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.illegal_parameter}}):le.length===0?$.expect=ie?c:C:(ie?$.session.serverCertificate=le[0]:$.session.clientCertificate=le[0],s.verifyCertificateChain($,le)&&($.expect=ie?c:C)),$.process()},s.handleServerKeyExchange=function($,H,V){if(V>0)return $.error($,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.unsupported_certificate}});$.expect=p,$.process()},s.handleClientKeyExchange=function($,H,V){if(V<48)return $.error($,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.unsupported_certificate}});var A=H.fragment,L={enc_pre_master_secret:a(A,2).getBytes()},K=null;if($.getPrivateKey)try{K=$.getPrivateKey($,$.session.serverCertificate),K=e.pki.privateKeyFromPem(K)}catch(ie){$.error($,{message:"Could not get private key.",cause:ie,send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.internal_error}})}if(K===null)return $.error($,{message:"No private key set.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.internal_error}});try{var X=$.session.sp;X.pre_master_secret=K.decrypt(L.enc_pre_master_secret);var le=$.session.clientHelloVersion;if(le.major!==X.pre_master_secret.charCodeAt(0)||le.minor!==X.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{X.pre_master_secret=e.random.getBytes(48)}$.expect=_,$.session.clientCertificate!==null&&($.expect=S),$.process()},s.handleCertificateRequest=function($,H,V){if(V<3)return $.error($,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.illegal_parameter}});var A=H.fragment,L={certificate_types:a(A,1),certificate_authorities:a(A,2)};$.session.certificateRequest=L,$.expect=g,$.process()},s.handleCertificateVerify=function($,H,V){if(V<2)return $.error($,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.illegal_parameter}});var A=H.fragment;A.read-=4;var L=A.bytes();A.read+=4;var K={signature:a(A,2).getBytes()},X=e.util.createBuffer();X.putBuffer($.session.md5.digest()),X.putBuffer($.session.sha1.digest()),X=X.getBytes();try{var le=$.session.clientCertificate;if(!le.publicKey.verify(X,K.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");$.session.md5.update(L),$.session.sha1.update(L)}catch{return $.error($,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.handshake_failure}})}$.expect=_,$.process()},s.handleServerHelloDone=function($,H,V){if(V>0)return $.error($,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.record_overflow}});if($.serverCertificate===null){var A={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.insufficient_security}},L=0,K=$.verify($,A.alert.description,L,[]);if(K!==!0)return(K||K===0)&&(typeof K=="object"&&!e.util.isArray(K)?(K.message&&(A.message=K.message),K.alert&&(A.alert.description=K.alert)):typeof K=="number"&&(A.alert.description=K)),$.error($,A)}$.session.certificateRequest!==null&&(H=s.createRecord($,{type:s.ContentType.handshake,data:s.createCertificate($)}),s.queue($,H)),H=s.createRecord($,{type:s.ContentType.handshake,data:s.createClientKeyExchange($)}),s.queue($,H),$.expect=y;var X=function(le,ie){le.session.certificateRequest!==null&&le.session.clientCertificate!==null&&s.queue(le,s.createRecord(le,{type:s.ContentType.handshake,data:s.createCertificateVerify(le,ie)})),s.queue(le,s.createRecord(le,{type:s.ContentType.change_cipher_spec,data:s.createChangeCipherSpec()})),le.state.pending=s.createConnectionState(le),le.state.current.write=le.state.pending.write,s.queue(le,s.createRecord(le,{type:s.ContentType.handshake,data:s.createFinished(le)})),le.expect=d,s.flush(le),le.process()};if($.session.certificateRequest===null||$.session.clientCertificate===null)return X($,null);s.getClientSignature($,X)},s.handleChangeCipherSpec=function($,H){if(H.fragment.getByte()!==1)return $.error($,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.illegal_parameter}});var V=$.entity===s.ConnectionEnd.client;($.session.resuming&&V||!$.session.resuming&&!V)&&($.state.pending=s.createConnectionState($)),$.state.current.read=$.state.pending.read,(!$.session.resuming&&V||$.session.resuming&&!V)&&($.state.pending=null),$.expect=V?m:E,$.process()},s.handleFinished=function($,H,V){var A=H.fragment;A.read-=4;var L=A.bytes();A.read+=4;var K=H.fragment.getBytes();A=e.util.createBuffer(),A.putBuffer($.session.md5.digest()),A.putBuffer($.session.sha1.digest());var X=$.entity===s.ConnectionEnd.client,le=X?"server finished":"client finished",ie=$.session.sp,oe=12,ne=t;if(A=ne(ie.master_secret,le,A.getBytes(),oe),A.getBytes()!==K)return $.error($,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.decrypt_error}});$.session.md5.update(L),$.session.sha1.update(L),($.session.resuming&&X||!$.session.resuming&&!X)&&(s.queue($,s.createRecord($,{type:s.ContentType.change_cipher_spec,data:s.createChangeCipherSpec()})),$.state.current.write=$.state.pending.write,$.state.pending=null,s.queue($,s.createRecord($,{type:s.ContentType.handshake,data:s.createFinished($)}))),$.expect=X?b:x,$.handshaking=!1,++$.handshakes,$.peerCertificate=X?$.session.serverCertificate:$.session.clientCertificate,s.flush($),$.isConnected=!0,$.connected($),$.process()},s.handleAlert=function($,H){var V=H.fragment,A={level:V.getByte(),description:V.getByte()},L;switch(A.description){case s.Alert.Description.close_notify:L="Connection closed.";break;case s.Alert.Description.unexpected_message:L="Unexpected message.";break;case s.Alert.Description.bad_record_mac:L="Bad record MAC.";break;case s.Alert.Description.decryption_failed:L="Decryption failed.";break;case s.Alert.Description.record_overflow:L="Record overflow.";break;case s.Alert.Description.decompression_failure:L="Decompression failed.";break;case s.Alert.Description.handshake_failure:L="Handshake failure.";break;case s.Alert.Description.bad_certificate:L="Bad certificate.";break;case s.Alert.Description.unsupported_certificate:L="Unsupported certificate.";break;case s.Alert.Description.certificate_revoked:L="Certificate revoked.";break;case s.Alert.Description.certificate_expired:L="Certificate expired.";break;case s.Alert.Description.certificate_unknown:L="Certificate unknown.";break;case s.Alert.Description.illegal_parameter:L="Illegal parameter.";break;case s.Alert.Description.unknown_ca:L="Unknown certificate authority.";break;case s.Alert.Description.access_denied:L="Access denied.";break;case s.Alert.Description.decode_error:L="Decode error.";break;case s.Alert.Description.decrypt_error:L="Decrypt error.";break;case s.Alert.Description.export_restriction:L="Export restriction.";break;case s.Alert.Description.protocol_version:L="Unsupported protocol version.";break;case s.Alert.Description.insufficient_security:L="Insufficient security.";break;case s.Alert.Description.internal_error:L="Internal error.";break;case s.Alert.Description.user_canceled:L="User canceled.";break;case s.Alert.Description.no_renegotiation:L="Renegotiation not supported.";break;default:L="Unknown error.";break}if(A.description===s.Alert.Description.close_notify)return $.close();$.error($,{message:L,send:!1,origin:$.entity===s.ConnectionEnd.client?"server":"client",alert:A}),$.process()},s.handleHandshake=function($,H){var V=H.fragment,A=V.getByte(),L=V.getInt24();if(L>V.length())return $.fragmented=H,H.fragment=e.util.createBuffer(),V.read-=4,$.process();$.fragmented=null,V.read-=4;var K=V.bytes(L+4);V.read+=4,A in J[$.entity][$.expect]?($.entity===s.ConnectionEnd.server&&!$.open&&!$.fail&&($.handshaking=!0,$.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:e.md.md5.create(),sha1:e.md.sha1.create()}),A!==s.HandshakeType.hello_request&&A!==s.HandshakeType.certificate_verify&&A!==s.HandshakeType.finished&&($.session.md5.update(K),$.session.sha1.update(K)),J[$.entity][$.expect][A]($,H,L)):s.handleUnexpected($,H)},s.handleApplicationData=function($,H){$.data.putBuffer(H.fragment),$.dataReady($),$.process()},s.handleHeartbeat=function($,H){var V=H.fragment,A=V.getByte(),L=V.getInt16(),K=V.getBytes(L);if(A===s.HeartbeatMessageType.heartbeat_request){if($.handshaking||L>K.length)return $.process();s.queue($,s.createRecord($,{type:s.ContentType.heartbeat,data:s.createHeartbeat(s.HeartbeatMessageType.heartbeat_response,K)})),s.flush($)}else if(A===s.HeartbeatMessageType.heartbeat_response){if(K!==$.expectedHeartbeatPayload)return $.process();$.heartbeatReceived&&$.heartbeatReceived($,e.util.createBuffer(K))}$.process()};var l=0,u=1,c=2,p=3,g=4,d=5,m=6,b=7,y=8,f=0,v=1,C=2,S=3,_=4,E=5,x=6,h=s.handleUnexpected,w=s.handleChangeCipherSpec,D=s.handleAlert,I=s.handleHandshake,T=s.handleApplicationData,F=s.handleHeartbeat,P=[];P[s.ConnectionEnd.client]=[[h,D,I,h,F],[h,D,I,h,F],[h,D,I,h,F],[h,D,I,h,F],[h,D,I,h,F],[w,D,h,h,F],[h,D,I,h,F],[h,D,I,T,F],[h,D,I,h,F]],P[s.ConnectionEnd.server]=[[h,D,I,h,F],[h,D,I,h,F],[h,D,I,h,F],[h,D,I,h,F],[w,D,h,h,F],[h,D,I,h,F],[h,D,I,T,F],[h,D,I,h,F]];var k=s.handleHelloRequest,R=s.handleServerHello,M=s.handleCertificate,O=s.handleServerKeyExchange,z=s.handleCertificateRequest,G=s.handleServerHelloDone,U=s.handleFinished,J=[];J[s.ConnectionEnd.client]=[[h,h,R,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[k,h,h,h,h,h,h,h,h,h,h,M,O,z,G,h,h,h,h,h,h],[k,h,h,h,h,h,h,h,h,h,h,h,O,z,G,h,h,h,h,h,h],[k,h,h,h,h,h,h,h,h,h,h,h,h,z,G,h,h,h,h,h,h],[k,h,h,h,h,h,h,h,h,h,h,h,h,h,G,h,h,h,h,h,h],[k,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[k,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,U],[k,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[k,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h]];var Q=s.handleClientHello,ee=s.handleClientKeyExchange,q=s.handleCertificateVerify;J[s.ConnectionEnd.server]=[[h,Q,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,M,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,ee,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,q,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,U],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h],[h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h]],s.generateKeys=function($,H){var V=t,A=H.client_random+H.server_random;$.session.resuming||(H.master_secret=V(H.pre_master_secret,"master secret",A,48).bytes(),H.pre_master_secret=null),A=H.server_random+H.client_random;var L=2*H.mac_key_length+2*H.enc_key_length,K=$.version.major===s.Versions.TLS_1_0.major&&$.version.minor===s.Versions.TLS_1_0.minor;K&&(L+=2*H.fixed_iv_length);var X=V(H.master_secret,"key expansion",A,L),le={client_write_MAC_key:X.getBytes(H.mac_key_length),server_write_MAC_key:X.getBytes(H.mac_key_length),client_write_key:X.getBytes(H.enc_key_length),server_write_key:X.getBytes(H.enc_key_length)};return K&&(le.client_write_IV=X.getBytes(H.fixed_iv_length),le.server_write_IV=X.getBytes(H.fixed_iv_length)),le},s.createConnectionState=function($){var H=$.entity===s.ConnectionEnd.client,V=function(){var K={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(X){return!0},compressionState:null,compressFunction:function(X){return!0},updateSequenceNumber:function(){K.sequenceNumber[1]===4294967295?(K.sequenceNumber[1]=0,++K.sequenceNumber[0]):++K.sequenceNumber[1]}};return K},A={read:V(),write:V()};if(A.read.update=function(K,X){return A.read.cipherFunction(X,A.read)?A.read.compressFunction(K,X,A.read)||K.error(K,{message:"Could not decompress record.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.decompression_failure}}):K.error(K,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.bad_record_mac}}),!K.fail},A.write.update=function(K,X){return A.write.compressFunction(K,X,A.write)?A.write.cipherFunction(X,A.write)||K.error(K,{message:"Could not encrypt record.",send:!1,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.internal_error}}):K.error(K,{message:"Could not compress record.",send:!1,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.internal_error}}),!K.fail},$.session){var L=$.session.sp;switch($.session.cipherSuite.initSecurityParameters(L),L.keys=s.generateKeys($,L),A.read.macKey=H?L.keys.server_write_MAC_key:L.keys.client_write_MAC_key,A.write.macKey=H?L.keys.client_write_MAC_key:L.keys.server_write_MAC_key,$.session.cipherSuite.initConnectionState(A,$,L),L.compression_algorithm){case s.CompressionMethod.none:break;case s.CompressionMethod.deflate:A.read.compressFunction=i,A.write.compressFunction=r;break;default:throw new Error("Unsupported compression algorithm.")}}return A},s.createRandom=function(){var $=new Date,H=+$+$.getTimezoneOffset()*6e4,V=e.util.createBuffer();return V.putInt32(H),V.putBytes(e.random.getBytes(28)),V},s.createRecord=function($,H){if(!H.data)return null;var V={type:H.type,version:{major:$.version.major,minor:$.version.minor},length:H.data.length(),fragment:H.data};return V},s.createAlert=function($,H){var V=e.util.createBuffer();return V.putByte(H.level),V.putByte(H.description),s.createRecord($,{type:s.ContentType.alert,data:V})},s.createClientHello=function($){$.session.clientHelloVersion={major:$.version.major,minor:$.version.minor};for(var H=e.util.createBuffer(),V=0;V<$.cipherSuites.length;++V){var A=$.cipherSuites[V];H.putByte(A.id[0]),H.putByte(A.id[1])}var L=H.length(),K=e.util.createBuffer();K.putByte(s.CompressionMethod.none);var X=K.length(),le=e.util.createBuffer();if($.virtualHost){var ie=e.util.createBuffer();ie.putByte(0),ie.putByte(0);var oe=e.util.createBuffer();oe.putByte(0),o(oe,2,e.util.createBuffer($.virtualHost));var ne=e.util.createBuffer();o(ne,2,oe),o(ie,2,ne),le.putBuffer(ie)}var ue=le.length();ue>0&&(ue+=2);var be=$.session.id,ve=be.length+1+2+4+28+2+L+1+X+ue,pe=e.util.createBuffer();return pe.putByte(s.HandshakeType.client_hello),pe.putInt24(ve),pe.putByte($.version.major),pe.putByte($.version.minor),pe.putBytes($.session.sp.client_random),o(pe,1,e.util.createBuffer(be)),o(pe,2,H),o(pe,1,K),ue>0&&o(pe,2,le),pe},s.createServerHello=function($){var H=$.session.id,V=H.length+1+2+4+28+2+1,A=e.util.createBuffer();return A.putByte(s.HandshakeType.server_hello),A.putInt24(V),A.putByte($.version.major),A.putByte($.version.minor),A.putBytes($.session.sp.server_random),o(A,1,e.util.createBuffer(H)),A.putByte($.session.cipherSuite.id[0]),A.putByte($.session.cipherSuite.id[1]),A.putByte($.session.compressionMethod),A},s.createCertificate=function($){var H=$.entity===s.ConnectionEnd.client,V=null;if($.getCertificate){var A;H?A=$.session.certificateRequest:A=$.session.extensions.server_name.serverNameList,V=$.getCertificate($,A)}var L=e.util.createBuffer();if(V!==null)try{e.util.isArray(V)||(V=[V]);for(var K=null,X=0;X<V.length;++X){var le=e.pem.decode(V[X])[0];if(le.type!=="CERTIFICATE"&&le.type!=="X509 CERTIFICATE"&&le.type!=="TRUSTED CERTIFICATE"){var ie=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw ie.headerType=le.type,ie}if(le.procType&&le.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var oe=e.util.createBuffer(le.body);K===null&&(K=e.asn1.fromDer(oe.bytes(),!1));var ne=e.util.createBuffer();o(ne,3,oe),L.putBuffer(ne)}V=e.pki.certificateFromAsn1(K),H?$.session.clientCertificate=V:$.session.serverCertificate=V}catch(ve){return $.error($,{message:"Could not send certificate list.",cause:ve,send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.bad_certificate}})}var ue=3+L.length(),be=e.util.createBuffer();return be.putByte(s.HandshakeType.certificate),be.putInt24(ue),o(be,3,L),be},s.createClientKeyExchange=function($){var H=e.util.createBuffer();H.putByte($.session.clientHelloVersion.major),H.putByte($.session.clientHelloVersion.minor),H.putBytes(e.random.getBytes(46));var V=$.session.sp;V.pre_master_secret=H.getBytes();var A=$.session.serverCertificate.publicKey;H=A.encrypt(V.pre_master_secret);var L=H.length+2,K=e.util.createBuffer();return K.putByte(s.HandshakeType.client_key_exchange),K.putInt24(L),K.putInt16(H.length),K.putBytes(H),K},s.createServerKeyExchange=function($){var H=e.util.createBuffer();return H},s.getClientSignature=function($,H){var V=e.util.createBuffer();V.putBuffer($.session.md5.digest()),V.putBuffer($.session.sha1.digest()),V=V.getBytes(),$.getSignature=$.getSignature||function(A,L,K){var X=null;if(A.getPrivateKey)try{X=A.getPrivateKey(A,A.session.clientCertificate),X=e.pki.privateKeyFromPem(X)}catch(le){A.error(A,{message:"Could not get private key.",cause:le,send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.internal_error}})}X===null?A.error(A,{message:"No private key set.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.internal_error}}):L=X.sign(L,null),K(A,L)},$.getSignature($,V,H)},s.createCertificateVerify=function($,H){var V=H.length+2,A=e.util.createBuffer();return A.putByte(s.HandshakeType.certificate_verify),A.putInt24(V),A.putInt16(H.length),A.putBytes(H),A},s.createCertificateRequest=function($){var H=e.util.createBuffer();H.putByte(1);var V=e.util.createBuffer();for(var A in $.caStore.certs){var L=$.caStore.certs[A],K=e.pki.distinguishedNameToAsn1(L.subject),X=e.asn1.toDer(K);V.putInt16(X.length()),V.putBuffer(X)}var le=1+H.length()+2+V.length(),ie=e.util.createBuffer();return ie.putByte(s.HandshakeType.certificate_request),ie.putInt24(le),o(ie,1,H),o(ie,2,V),ie},s.createServerHelloDone=function($){var H=e.util.createBuffer();return H.putByte(s.HandshakeType.server_hello_done),H.putInt24(0),H},s.createChangeCipherSpec=function(){var $=e.util.createBuffer();return $.putByte(1),$},s.createFinished=function($){var H=e.util.createBuffer();H.putBuffer($.session.md5.digest()),H.putBuffer($.session.sha1.digest());var V=$.entity===s.ConnectionEnd.client,A=$.session.sp,L=12,K=t,X=V?"client finished":"server finished";H=K(A.master_secret,X,H.getBytes(),L);var le=e.util.createBuffer();return le.putByte(s.HandshakeType.finished),le.putInt24(H.length()),le.putBuffer(H),le},s.createHeartbeat=function($,H,V){typeof V>"u"&&(V=H.length);var A=e.util.createBuffer();A.putByte($),A.putInt16(V),A.putBytes(H);var L=A.length(),K=Math.max(16,L-V-3);return A.putBytes(e.random.getBytes(K)),A},s.queue=function($,H){if(H&&!(H.fragment.length()===0&&(H.type===s.ContentType.handshake||H.type===s.ContentType.alert||H.type===s.ContentType.change_cipher_spec))){if(H.type===s.ContentType.handshake){var V=H.fragment.bytes();$.session.md5.update(V),$.session.sha1.update(V),V=null}var A;if(H.fragment.length()<=s.MaxFragment)A=[H];else{A=[];for(var L=H.fragment.bytes();L.length>s.MaxFragment;)A.push(s.createRecord($,{type:H.type,data:e.util.createBuffer(L.slice(0,s.MaxFragment))})),L=L.slice(s.MaxFragment);L.length>0&&A.push(s.createRecord($,{type:H.type,data:e.util.createBuffer(L)}))}for(var K=0;K<A.length&&!$.fail;++K){var X=A[K],le=$.state.current.write;le.update($,X)&&$.records.push(X)}}},s.flush=function($){for(var H=0;H<$.records.length;++H){var V=$.records[H];$.tlsData.putByte(V.type),$.tlsData.putByte(V.version.major),$.tlsData.putByte(V.version.minor),$.tlsData.putInt16(V.fragment.length()),$.tlsData.putBuffer($.records[H].fragment)}return $.records=[],$.tlsDataReady($)};var Z=function($){switch($){case!0:return!0;case e.pki.certificateError.bad_certificate:return s.Alert.Description.bad_certificate;case e.pki.certificateError.unsupported_certificate:return s.Alert.Description.unsupported_certificate;case e.pki.certificateError.certificate_revoked:return s.Alert.Description.certificate_revoked;case e.pki.certificateError.certificate_expired:return s.Alert.Description.certificate_expired;case e.pki.certificateError.certificate_unknown:return s.Alert.Description.certificate_unknown;case e.pki.certificateError.unknown_ca:return s.Alert.Description.unknown_ca;default:return s.Alert.Description.bad_certificate}},se=function($){switch($){case!0:return!0;case s.Alert.Description.bad_certificate:return e.pki.certificateError.bad_certificate;case s.Alert.Description.unsupported_certificate:return e.pki.certificateError.unsupported_certificate;case s.Alert.Description.certificate_revoked:return e.pki.certificateError.certificate_revoked;case s.Alert.Description.certificate_expired:return e.pki.certificateError.certificate_expired;case s.Alert.Description.certificate_unknown:return e.pki.certificateError.certificate_unknown;case s.Alert.Description.unknown_ca:return e.pki.certificateError.unknown_ca;default:return e.pki.certificateError.bad_certificate}};s.verifyCertificateChain=function($,H){try{var V={};for(var A in $.verifyOptions)V[A]=$.verifyOptions[A];V.verify=function(K,X,le){var ie=Z(K),oe=$.verify($,K,X,le);if(oe!==!0){if(typeof oe=="object"&&!e.util.isArray(oe)){var ne=new Error("The application rejected the certificate.");throw ne.send=!0,ne.alert={level:s.Alert.Level.fatal,description:s.Alert.Description.bad_certificate},oe.message&&(ne.message=oe.message),oe.alert&&(ne.alert.description=oe.alert),ne}oe!==K&&(oe=se(oe))}return oe},e.pki.verifyCertificateChain($.caStore,H,V)}catch(K){var L=K;(typeof L!="object"||e.util.isArray(L))&&(L={send:!0,alert:{level:s.Alert.Level.fatal,description:Z(K)}}),"send"in L||(L.send=!0),"alert"in L||(L.alert={level:s.Alert.Level.fatal,description:Z(L.error)}),$.error($,L)}return!$.fail},s.createSessionCache=function($,H){var V=null;if($&&$.getSession&&$.setSession&&$.order)V=$;else{V={},V.cache=$||{},V.capacity=Math.max(H||100,1),V.order=[];for(var A in $)V.order.length<=H?V.order.push(A):delete $[A];V.getSession=function(L){var K=null,X=null;if(L?X=e.util.bytesToHex(L):V.order.length>0&&(X=V.order[0]),X!==null&&X in V.cache){K=V.cache[X],delete V.cache[X];for(var le in V.order)if(V.order[le]===X){V.order.splice(le,1);break}}return K},V.setSession=function(L,K){if(V.order.length===V.capacity){var X=V.order.shift();delete V.cache[X]}var X=e.util.bytesToHex(L);V.order.push(X),V.cache[X]=K}}return V},s.createConnection=function($){var H=null;$.caStore?e.util.isArray($.caStore)?H=e.pki.createCaStore($.caStore):H=$.caStore:H=e.pki.createCaStore();var V=$.cipherSuites||null;if(V===null){V=[];for(var A in s.CipherSuites)V.push(s.CipherSuites[A])}var L=$.server?s.ConnectionEnd.server:s.ConnectionEnd.client,K=$.sessionCache?s.createSessionCache($.sessionCache):null,X={version:{major:s.Version.major,minor:s.Version.minor},entity:L,sessionId:$.sessionId,caStore:H,sessionCache:K,cipherSuites:V,connected:$.connected,virtualHost:$.virtualHost||null,verifyClient:$.verifyClient||!1,verify:$.verify||function(ne,ue,be,ve){return ue},verifyOptions:$.verifyOptions||{},getCertificate:$.getCertificate||null,getPrivateKey:$.getPrivateKey||null,getSignature:$.getSignature||null,input:e.util.createBuffer(),tlsData:e.util.createBuffer(),data:e.util.createBuffer(),tlsDataReady:$.tlsDataReady,dataReady:$.dataReady,heartbeatReceived:$.heartbeatReceived,closed:$.closed,error:function(ne,ue){ue.origin=ue.origin||(ne.entity===s.ConnectionEnd.client?"client":"server"),ue.send&&(s.queue(ne,s.createAlert(ne,ue.alert)),s.flush(ne));var be=ue.fatal!==!1;be&&(ne.fail=!0),$.error(ne,ue),be&&ne.close(!1)},deflate:$.deflate||null,inflate:$.inflate||null};X.reset=function(ne){X.version={major:s.Version.major,minor:s.Version.minor},X.record=null,X.session=null,X.peerCertificate=null,X.state={pending:null,current:null},X.expect=X.entity===s.ConnectionEnd.client?l:f,X.fragmented=null,X.records=[],X.open=!1,X.handshakes=0,X.handshaking=!1,X.isConnected=!1,X.fail=!(ne||typeof ne>"u"),X.input.clear(),X.tlsData.clear(),X.data.clear(),X.state.current=s.createConnectionState(X)},X.reset();var le=function(ne,ue){var be=ue.type-s.ContentType.change_cipher_spec,ve=P[ne.entity][ne.expect];be in ve?ve[be](ne,ue):s.handleUnexpected(ne,ue)},ie=function(ne){var ue=0,be=ne.input,ve=be.length();if(ve<5)ue=5-ve;else{ne.record={type:be.getByte(),version:{major:be.getByte(),minor:be.getByte()},length:be.getInt16(),fragment:e.util.createBuffer(),ready:!1};var pe=ne.record.version.major===ne.version.major;pe&&ne.session&&ne.session.version&&(pe=ne.record.version.minor===ne.version.minor),pe||ne.error(ne,{message:"Incompatible TLS version.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.protocol_version}})}return ue},oe=function(ne){var ue=0,be=ne.input,ve=be.length();if(ve<ne.record.length)ue=ne.record.length-ve;else{ne.record.fragment.putBytes(be.getBytes(ne.record.length)),be.compact();var pe=ne.state.current.read;pe.update(ne,ne.record)&&(ne.fragmented!==null&&(ne.fragmented.type===ne.record.type?(ne.fragmented.fragment.putBuffer(ne.record.fragment),ne.record=ne.fragmented):ne.error(ne,{message:"Invalid fragmented record.",send:!0,alert:{level:s.Alert.Level.fatal,description:s.Alert.Description.unexpected_message}})),ne.record.ready=!0)}return ue};return X.handshake=function(ne){if(X.entity!==s.ConnectionEnd.client)X.error(X,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(X.handshaking)X.error(X,{message:"Handshake already in progress.",fatal:!1});else{X.fail&&!X.open&&X.handshakes===0&&(X.fail=!1),X.handshaking=!0,ne=ne||"";var ue=null;ne.length>0&&(X.sessionCache&&(ue=X.sessionCache.getSession(ne)),ue===null&&(ne="")),ne.length===0&&X.sessionCache&&(ue=X.sessionCache.getSession(),ue!==null&&(ne=ue.id)),X.session={id:ne,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:e.md.md5.create(),sha1:e.md.sha1.create()},ue&&(X.version=ue.version,X.session.sp=ue.sp),X.session.sp.client_random=s.createRandom().getBytes(),X.open=!0,s.queue(X,s.createRecord(X,{type:s.ContentType.handshake,data:s.createClientHello(X)})),s.flush(X)}},X.process=function(ne){var ue=0;return ne&&X.input.putBytes(ne),X.fail||(X.record!==null&&X.record.ready&&X.record.fragment.isEmpty()&&(X.record=null),X.record===null&&(ue=ie(X)),!X.fail&&X.record!==null&&!X.record.ready&&(ue=oe(X)),!X.fail&&X.record!==null&&X.record.ready&&le(X,X.record)),ue},X.prepare=function(ne){return s.queue(X,s.createRecord(X,{type:s.ContentType.application_data,data:e.util.createBuffer(ne)})),s.flush(X)},X.prepareHeartbeatRequest=function(ne,ue){return ne instanceof e.util.ByteBuffer&&(ne=ne.bytes()),typeof ue>"u"&&(ue=ne.length),X.expectedHeartbeatPayload=ne,s.queue(X,s.createRecord(X,{type:s.ContentType.heartbeat,data:s.createHeartbeat(s.HeartbeatMessageType.heartbeat_request,ne,ue)})),s.flush(X)},X.close=function(ne){if(!X.fail&&X.sessionCache&&X.session){var ue={id:X.session.id,version:X.session.version,sp:X.session.sp};ue.sp.keys=null,X.sessionCache.setSession(ue.id,ue)}X.open&&(X.open=!1,X.input.clear(),(X.isConnected||X.handshaking)&&(X.isConnected=X.handshaking=!1,s.queue(X,s.createAlert(X,{level:s.Alert.Level.warning,description:s.Alert.Description.close_notify})),s.flush(X)),X.closed(X)),X.reset(ne)},X},Ef=e.tls=e.tls||{};for(var te in s)typeof s[te]!="function"&&(e.tls[te]=s[te]);return e.tls.prf_tls1=t,e.tls.hmac_sha1=n,e.tls.createSessionCache=s.createSessionCache,e.tls.createConnection=s.createConnection,Ef}var a1;function WD(){if(a1)return qd.exports;a1=1;var e=je();Ka(),sC();var t=qd.exports=e.tls;t.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(l){l.bulk_cipher_algorithm=t.BulkCipherAlgorithm.aes,l.cipher_type=t.CipherType.block,l.enc_key_length=16,l.block_length=16,l.fixed_iv_length=16,l.record_iv_length=16,l.mac_algorithm=t.MACAlgorithm.hmac_sha1,l.mac_length=20,l.mac_key_length=20},initConnectionState:n},t.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(l){l.bulk_cipher_algorithm=t.BulkCipherAlgorithm.aes,l.cipher_type=t.CipherType.block,l.enc_key_length=32,l.block_length=16,l.fixed_iv_length=16,l.record_iv_length=16,l.mac_algorithm=t.MACAlgorithm.hmac_sha1,l.mac_length=20,l.mac_key_length=20},initConnectionState:n};function n(l,u,c){var p=u.entity===e.tls.ConnectionEnd.client;l.read.cipherState={init:!1,cipher:e.cipher.createDecipher("AES-CBC",p?c.keys.server_write_key:c.keys.client_write_key),iv:p?c.keys.server_write_IV:c.keys.client_write_IV},l.write.cipherState={init:!1,cipher:e.cipher.createCipher("AES-CBC",p?c.keys.client_write_key:c.keys.server_write_key),iv:p?c.keys.client_write_IV:c.keys.server_write_IV},l.read.cipherFunction=o,l.write.cipherFunction=r,l.read.macLength=l.write.macLength=c.mac_length,l.read.macFunction=l.write.macFunction=t.hmac_sha1}function r(l,u){var c=!1,p=u.macFunction(u.macKey,u.sequenceNumber,l);l.fragment.putBytes(p),u.updateSequenceNumber();var g;l.version.minor===t.Versions.TLS_1_0.minor?g=u.cipherState.init?null:u.cipherState.iv:g=e.random.getBytesSync(16),u.cipherState.init=!0;var d=u.cipherState.cipher;return d.start({iv:g}),l.version.minor>=t.Versions.TLS_1_1.minor&&d.output.putBytes(g),d.update(l.fragment),d.finish(i)&&(l.fragment=d.output,l.length=l.fragment.length(),c=!0),c}function i(l,u,c){if(!c){var p=l-u.length()%l;u.fillWithByte(p-1,p)}return!0}function a(l,u,c){var p=!0;if(c){for(var g=u.length(),d=u.last(),m=g-1-d;m<g-1;++m)p=p&&u.at(m)==d;p&&u.truncate(d+1)}return p}function o(l,u){var c=!1,p;l.version.minor===t.Versions.TLS_1_0.minor?p=u.cipherState.init?null:u.cipherState.iv:p=l.fragment.getBytes(16),u.cipherState.init=!0;var g=u.cipherState.cipher;g.start({iv:p}),g.update(l.fragment),c=g.finish(a);var d=u.macLength,m=e.random.getBytesSync(d),b=g.output.length();b>=d?(l.fragment=g.output.getBytes(b-d),m=g.output.getBytes(d)):l.fragment=g.output.getBytes(),l.fragment=e.util.createBuffer(l.fragment),l.length=l.fragment.length();var y=u.macFunction(u.macKey,u.sequenceNumber,l);return u.updateSequenceNumber(),c=s(u.macKey,m,y)&&c,c}function s(l,u,c){var p=e.hmac.create();return p.start("SHA1",l),p.update(u),u=p.digest().getBytes(),p.start(null,null),p.update(c),c=p.digest().getBytes(),u===c}return qd.exports}var Sf={exports:{}},o1;function lC(){if(o1)return Sf.exports;o1=1;var e=je();Ii(),Xe();var t=Sf.exports=e.sha512=e.sha512||{};e.md.sha512=e.md.algorithms.sha512=t;var n=e.sha384=e.sha512.sha384=e.sha512.sha384||{};n.create=function(){return t.create("SHA-384")},e.md.sha384=e.md.algorithms.sha384=n,e.sha512.sha256=e.sha512.sha256||{create:function(){return t.create("SHA-512/256")}},e.md["sha512/256"]=e.md.algorithms["sha512/256"]=e.sha512.sha256,e.sha512.sha224=e.sha512.sha224||{create:function(){return t.create("SHA-512/224")}},e.md["sha512/224"]=e.md.algorithms["sha512/224"]=e.sha512.sha224,t.create=function(u){if(i||s(),typeof u>"u"&&(u="SHA-512"),!(u in o))throw new Error("Invalid SHA-512 algorithm: "+u);for(var c=o[u],p=null,g=e.util.createBuffer(),d=new Array(80),m=0;m<80;++m)d[m]=new Array(2);var b=64;switch(u){case"SHA-384":b=48;break;case"SHA-512/256":b=32;break;case"SHA-512/224":b=28;break}var y={algorithm:u.replace("-","").toLowerCase(),blockLength:128,digestLength:b,messageLength:0,fullMessageLength:null,messageLengthSize:16};return y.start=function(){y.messageLength=0,y.fullMessageLength=y.messageLength128=[];for(var f=y.messageLengthSize/4,v=0;v<f;++v)y.fullMessageLength.push(0);g=e.util.createBuffer(),p=new Array(c.length);for(var v=0;v<c.length;++v)p[v]=c[v].slice(0);return y},y.start(),y.update=function(f,v){v==="utf8"&&(f=e.util.encodeUtf8(f));var C=f.length;y.messageLength+=C,C=[C/4294967296>>>0,C>>>0];for(var S=y.fullMessageLength.length-1;S>=0;--S)y.fullMessageLength[S]+=C[1],C[1]=C[0]+(y.fullMessageLength[S]/4294967296>>>0),y.fullMessageLength[S]=y.fullMessageLength[S]>>>0,C[0]=C[1]/4294967296>>>0;return g.putBytes(f),l(p,d,g),(g.read>2048||g.length()===0)&&g.compact(),y},y.digest=function(){var f=e.util.createBuffer();f.putBytes(g.bytes());var v=y.fullMessageLength[y.fullMessageLength.length-1]+y.messageLengthSize,C=v&y.blockLength-1;f.putBytes(r.substr(0,y.blockLength-C));for(var S,_,E=y.fullMessageLength[0]*8,x=0;x<y.fullMessageLength.length-1;++x)S=y.fullMessageLength[x+1]*8,_=S/4294967296>>>0,E+=_,f.putInt32(E>>>0),E=S>>>0;f.putInt32(E);for(var h=new Array(p.length),x=0;x<p.length;++x)h[x]=p[x].slice(0);l(h,d,f);var w=e.util.createBuffer(),D;u==="SHA-512"?D=h.length:u==="SHA-384"?D=h.length-2:D=h.length-4;for(var x=0;x<D;++x)w.putInt32(h[x][0]),(x!==D-1||u!=="SHA-512/224")&&w.putInt32(h[x][1]);return w},y};var r=null,i=!1,a=null,o=null;function s(){r="",r+=e.util.fillString("\0",128),a=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],o={},o["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],o["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],o["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],o["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],i=!0}function l(u,c,p){for(var g,d,m,b,y,f,v,C,S,_,E,x,h,w,D,I,T,F,P,k,R,M,O,z,G,U,J,Q,ee,q,Z,se,te,$,H,V=p.length();V>=128;){for(ee=0;ee<16;++ee)c[ee][0]=p.getInt32()>>>0,c[ee][1]=p.getInt32()>>>0;for(;ee<80;++ee)se=c[ee-2],q=se[0],Z=se[1],g=((q>>>19|Z<<13)^(Z>>>29|q<<3)^q>>>6)>>>0,d=((q<<13|Z>>>19)^(Z<<3|q>>>29)^(q<<26|Z>>>6))>>>0,$=c[ee-15],q=$[0],Z=$[1],m=((q>>>1|Z<<31)^(q>>>8|Z<<24)^q>>>7)>>>0,b=((q<<31|Z>>>1)^(q<<24|Z>>>8)^(q<<25|Z>>>7))>>>0,te=c[ee-7],H=c[ee-16],Z=d+te[1]+b+H[1],c[ee][0]=g+te[0]+m+H[0]+(Z/4294967296>>>0)>>>0,c[ee][1]=Z>>>0;for(h=u[0][0],w=u[0][1],D=u[1][0],I=u[1][1],T=u[2][0],F=u[2][1],P=u[3][0],k=u[3][1],R=u[4][0],M=u[4][1],O=u[5][0],z=u[5][1],G=u[6][0],U=u[6][1],J=u[7][0],Q=u[7][1],ee=0;ee<80;++ee)v=((R>>>14|M<<18)^(R>>>18|M<<14)^(M>>>9|R<<23))>>>0,C=((R<<18|M>>>14)^(R<<14|M>>>18)^(M<<23|R>>>9))>>>0,S=(G^R&(O^G))>>>0,_=(U^M&(z^U))>>>0,y=((h>>>28|w<<4)^(w>>>2|h<<30)^(w>>>7|h<<25))>>>0,f=((h<<4|w>>>28)^(w<<30|h>>>2)^(w<<25|h>>>7))>>>0,E=(h&D|T&(h^D))>>>0,x=(w&I|F&(w^I))>>>0,Z=Q+C+_+a[ee][1]+c[ee][1],g=J+v+S+a[ee][0]+c[ee][0]+(Z/4294967296>>>0)>>>0,d=Z>>>0,Z=f+x,m=y+E+(Z/4294967296>>>0)>>>0,b=Z>>>0,J=G,Q=U,G=O,U=z,O=R,z=M,Z=k+d,R=P+g+(Z/4294967296>>>0)>>>0,M=Z>>>0,P=T,k=F,T=D,F=I,D=h,I=w,Z=d+b,h=g+m+(Z/4294967296>>>0)>>>0,w=Z>>>0;Z=u[0][1]+w,u[0][0]=u[0][0]+h+(Z/4294967296>>>0)>>>0,u[0][1]=Z>>>0,Z=u[1][1]+I,u[1][0]=u[1][0]+D+(Z/4294967296>>>0)>>>0,u[1][1]=Z>>>0,Z=u[2][1]+F,u[2][0]=u[2][0]+T+(Z/4294967296>>>0)>>>0,u[2][1]=Z>>>0,Z=u[3][1]+k,u[3][0]=u[3][0]+P+(Z/4294967296>>>0)>>>0,u[3][1]=Z>>>0,Z=u[4][1]+M,u[4][0]=u[4][0]+R+(Z/4294967296>>>0)>>>0,u[4][1]=Z>>>0,Z=u[5][1]+z,u[5][0]=u[5][0]+O+(Z/4294967296>>>0)>>>0,u[5][1]=Z>>>0,Z=u[6][1]+U,u[6][0]=u[6][0]+G+(Z/4294967296>>>0)>>>0,u[6][1]=Z>>>0,Z=u[7][1]+Q,u[7][0]=u[7][0]+J+(Z/4294967296>>>0)>>>0,u[7][1]=Z>>>0,V-=128}}return Sf.exports}var Xl={},s1;function UD(){if(s1)return Xl;s1=1;var e=je();Jr();var t=e.asn1;return Xl.privateKeyValidator={name:"PrivateKeyInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},Xl.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]},Xl}var wf,l1;function XD(){if(l1)return wf;l1=1;var e=je();Jc(),Dr(),lC(),Xe();var t=UD(),n=t.publicKeyValidator,r=t.privateKeyValidator;if(typeof i>"u")var i=e.jsbn.BigInteger;var a=e.util.ByteBuffer,o=typeof Buffer>"u"?Uint8Array:Buffer;e.pki=e.pki||{},wf=e.pki.ed25519=e.ed25519=e.ed25519||{};var s=e.ed25519;s.constants={},s.constants.PUBLIC_KEY_BYTE_LENGTH=32,s.constants.PRIVATE_KEY_BYTE_LENGTH=64,s.constants.SEED_BYTE_LENGTH=32,s.constants.SIGN_BYTE_LENGTH=64,s.constants.HASH_BYTE_LENGTH=64,s.generateKeyPair=function($){$=$||{};var H=$.seed;if(H===void 0)H=e.random.getBytesSync(s.constants.SEED_BYTE_LENGTH);else if(typeof H=="string"){if(H.length!==s.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+s.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(H instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');H=l({message:H,encoding:"binary"});for(var V=new o(s.constants.PUBLIC_KEY_BYTE_LENGTH),A=new o(s.constants.PRIVATE_KEY_BYTE_LENGTH),L=0;L<32;++L)A[L]=H[L];return v(V,A),{publicKey:V,privateKey:A}},s.privateKeyFromAsn1=function($){var H={},V=[],A=e.asn1.validate($,r,H,V);if(!A){var L=new Error("Invalid Key.");throw L.errors=V,L}var K=e.asn1.derToOid(H.privateKeyOid),X=e.oids.EdDSA25519;if(K!==X)throw new Error('Invalid OID "'+K+'"; OID must be "'+X+'".');var le=H.privateKey,ie=l({message:e.asn1.fromDer(le).value,encoding:"binary"});return{privateKeyBytes:ie}},s.publicKeyFromAsn1=function($){var H={},V=[],A=e.asn1.validate($,n,H,V);if(!A){var L=new Error("Invalid Key.");throw L.errors=V,L}var K=e.asn1.derToOid(H.publicKeyOid),X=e.oids.EdDSA25519;if(K!==X)throw new Error('Invalid OID "'+K+'"; OID must be "'+X+'".');var le=H.ed25519PublicKey;if(le.length!==s.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return l({message:le,encoding:"binary"})},s.publicKeyFromPrivateKey=function($){$=$||{};var H=l({message:$.privateKey,encoding:"binary"});if(H.length!==s.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+s.constants.PRIVATE_KEY_BYTE_LENGTH);for(var V=new o(s.constants.PUBLIC_KEY_BYTE_LENGTH),A=0;A<V.length;++A)V[A]=H[32+A];return V},s.sign=function($){$=$||{};var H=l($),V=l({message:$.privateKey,encoding:"binary"});if(V.length===s.constants.SEED_BYTE_LENGTH){var A=s.generateKeyPair({seed:V});V=A.privateKey}else if(V.length!==s.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+s.constants.SEED_BYTE_LENGTH+" or "+s.constants.PRIVATE_KEY_BYTE_LENGTH);var L=new o(s.constants.SIGN_BYTE_LENGTH+H.length);C(L,H,H.length,V);for(var K=new o(s.constants.SIGN_BYTE_LENGTH),X=0;X<K.length;++X)K[X]=L[X];return K},s.verify=function($){$=$||{};var H=l($);if($.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var V=l({message:$.signature,encoding:"binary"});if(V.length!==s.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+s.constants.SIGN_BYTE_LENGTH);var A=l({message:$.publicKey,encoding:"binary"});if(A.length!==s.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+s.constants.PUBLIC_KEY_BYTE_LENGTH);var L=new o(s.constants.SIGN_BYTE_LENGTH+H.length),K=new o(s.constants.SIGN_BYTE_LENGTH+H.length),X;for(X=0;X<s.constants.SIGN_BYTE_LENGTH;++X)L[X]=V[X];for(X=0;X<H.length;++X)L[X+s.constants.SIGN_BYTE_LENGTH]=H[X];return S(K,L,L.length,A)>=0};function l($){var H=$.message;if(H instanceof Uint8Array||H instanceof o)return H;var V=$.encoding;if(H===void 0)if($.md)H=$.md.digest().getBytes(),V="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof H=="string"&&!V)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof H=="string"){if(typeof Buffer<"u")return Buffer.from(H,V);H=new a(H,V)}else if(!(H instanceof a))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var A=new o(H.length()),L=0;L<A.length;++L)A[L]=H.at(L);return A}var u=ee(),c=ee([1]),p=ee([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=ee([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=ee([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),m=ee([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),b=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),y=ee([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function f($,H){var V=e.md.sha512.create(),A=new a($);V.update(A.getBytes(H),"binary");var L=V.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(L,"binary");for(var K=new o(s.constants.HASH_BYTE_LENGTH),X=0;X<64;++X)K[X]=L.charCodeAt(X);return K}function v($,H){var V=[ee(),ee(),ee(),ee()],A,L=f(H,32);for(L[0]&=248,L[31]&=127,L[31]|=64,z(V,L),w($,V),A=0;A<32;++A)H[A+32]=$[A];return 0}function C($,H,V,A){var L,K,X=new Float64Array(64),le=[ee(),ee(),ee(),ee()],ie=f(A,32);ie[0]&=248,ie[31]&=127,ie[31]|=64;var oe=V+64;for(L=0;L<V;++L)$[64+L]=H[L];for(L=0;L<32;++L)$[32+L]=ie[32+L];var ne=f($.subarray(32),V+32);for(E(ne),z(le,ne),w($,le),L=32;L<64;++L)$[L]=A[L];var ue=f($,V+64);for(E(ue),L=32;L<64;++L)X[L]=0;for(L=0;L<32;++L)X[L]=ne[L];for(L=0;L<32;++L)for(K=0;K<32;K++)X[L+K]+=ue[L]*ie[K];return _($.subarray(32),X),oe}function S($,H,V,A){var L,K,X=new o(32),le=[ee(),ee(),ee(),ee()],ie=[ee(),ee(),ee(),ee()];if(K=-1,V<64||I(ie,A))return-1;for(L=0;L<V;++L)$[L]=H[L];for(L=0;L<32;++L)$[L+32]=A[L];var oe=f($,V);if(E(oe),O(le,ie,oe),z(ie,H.subarray(32)),x(le,ie),w(X,le),V-=64,k(H,0,X,0)){for(L=0;L<V;++L)$[L]=0;return-1}for(L=0;L<V;++L)$[L]=H[L+64];return K=V,K}function _($,H){var V,A,L,K;for(A=63;A>=32;--A){for(V=0,L=A-32,K=A-12;L<K;++L)H[L]+=V-16*H[A]*b[L-(A-32)],V=H[L]+128>>8,H[L]-=V*256;H[L]+=V,H[A]=0}for(V=0,L=0;L<32;++L)H[L]+=V-(H[31]>>4)*b[L],V=H[L]>>8,H[L]&=255;for(L=0;L<32;++L)H[L]-=V*b[L];for(A=0;A<32;++A)H[A+1]+=H[A]>>8,$[A]=H[A]&255}function E($){for(var H=new Float64Array(64),V=0;V<64;++V)H[V]=$[V],$[V]=0;_($,H)}function x($,H){var V=ee(),A=ee(),L=ee(),K=ee(),X=ee(),le=ee(),ie=ee(),oe=ee(),ne=ee();Z(V,$[1],$[0]),Z(ne,H[1],H[0]),te(V,V,ne),q(A,$[0],$[1]),q(ne,H[0],H[1]),te(A,A,ne),te(L,$[3],H[3]),te(L,L,g),te(K,$[2],H[2]),q(K,K,K),Z(X,A,V),Z(le,K,L),q(ie,K,L),q(oe,A,V),te($[0],X,le),te($[1],oe,ie),te($[2],ie,le),te($[3],X,oe)}function h($,H,V){for(var A=0;A<4;++A)Q($[A],H[A],V)}function w($,H){var V=ee(),A=ee(),L=ee();U(L,H[2]),te(V,H[0],L),te(A,H[1],L),D($,A),$[31]^=M(V)<<7}function D($,H){var V,A,L,K=ee(),X=ee();for(V=0;V<16;++V)X[V]=H[V];for(J(X),J(X),J(X),A=0;A<2;++A){for(K[0]=X[0]-65517,V=1;V<15;++V)K[V]=X[V]-65535-(K[V-1]>>16&1),K[V-1]&=65535;K[15]=X[15]-32767-(K[14]>>16&1),L=K[15]>>16&1,K[14]&=65535,Q(X,K,1-L)}for(V=0;V<16;V++)$[2*V]=X[V]&255,$[2*V+1]=X[V]>>8}function I($,H){var V=ee(),A=ee(),L=ee(),K=ee(),X=ee(),le=ee(),ie=ee();return G($[2],c),T($[1],H),se(L,$[1]),te(K,L,p),Z(L,L,$[2]),q(K,$[2],K),se(X,K),se(le,X),te(ie,le,X),te(V,ie,L),te(V,V,K),F(V,V),te(V,V,L),te(V,V,K),te(V,V,K),te($[0],V,K),se(A,$[0]),te(A,A,K),P(A,L)&&te($[0],$[0],y),se(A,$[0]),te(A,A,K),P(A,L)?-1:(M($[0])===H[31]>>7&&Z($[0],u,$[0]),te($[3],$[0],$[1]),0)}function T($,H){var V;for(V=0;V<16;++V)$[V]=H[2*V]+(H[2*V+1]<<8);$[15]&=32767}function F($,H){var V=ee(),A;for(A=0;A<16;++A)V[A]=H[A];for(A=250;A>=0;--A)se(V,V),A!==1&&te(V,V,H);for(A=0;A<16;++A)$[A]=V[A]}function P($,H){var V=new o(32),A=new o(32);return D(V,$),D(A,H),k(V,0,A,0)}function k($,H,V,A){return R($,H,V,A,32)}function R($,H,V,A,L){var K,X=0;for(K=0;K<L;++K)X|=$[H+K]^V[A+K];return(1&X-1>>>8)-1}function M($){var H=new o(32);return D(H,$),H[0]&1}function O($,H,V){var A,L;for(G($[0],u),G($[1],c),G($[2],c),G($[3],u),L=255;L>=0;--L)A=V[L/8|0]>>(L&7)&1,h($,H,A),x(H,$),x($,$),h($,H,A)}function z($,H){var V=[ee(),ee(),ee(),ee()];G(V[0],d),G(V[1],m),G(V[2],c),te(V[3],d,m),O($,V,H)}function G($,H){var V;for(V=0;V<16;V++)$[V]=H[V]|0}function U($,H){var V=ee(),A;for(A=0;A<16;++A)V[A]=H[A];for(A=253;A>=0;--A)se(V,V),A!==2&&A!==4&&te(V,V,H);for(A=0;A<16;++A)$[A]=V[A]}function J($){var H,V,A=1;for(H=0;H<16;++H)V=$[H]+A+65535,A=Math.floor(V/65536),$[H]=V-A*65536;$[0]+=A-1+37*(A-1)}function Q($,H,V){for(var A,L=~(V-1),K=0;K<16;++K)A=L&($[K]^H[K]),$[K]^=A,H[K]^=A}function ee($){var H,V=new Float64Array(16);if($)for(H=0;H<$.length;++H)V[H]=$[H];return V}function q($,H,V){for(var A=0;A<16;++A)$[A]=H[A]+V[A]}function Z($,H,V){for(var A=0;A<16;++A)$[A]=H[A]-V[A]}function se($,H){te($,H,H)}function te($,H,V){var A,L,K=0,X=0,le=0,ie=0,oe=0,ne=0,ue=0,be=0,ve=0,pe=0,$e=0,Le=0,Ue=0,nt=0,lt=0,ut=0,St=0,Rt=0,Ot=0,Cn=0,En=0,On=0,Kn=0,fr=0,Tr=0,ni=0,Ri=0,da=0,no=0,as=0,Vl=0,Wt=V[0],Ut=V[1],Xt=V[2],Yt=V[3],Kt=V[4],Zt=V[5],qt=V[6],Jt=V[7],Qt=V[8],en=V[9],tn=V[10],nn=V[11],wt=V[12],Lt=V[13],rn=V[14],an=V[15];A=H[0],K+=A*Wt,X+=A*Ut,le+=A*Xt,ie+=A*Yt,oe+=A*Kt,ne+=A*Zt,ue+=A*qt,be+=A*Jt,ve+=A*Qt,pe+=A*en,$e+=A*tn,Le+=A*nn,Ue+=A*wt,nt+=A*Lt,lt+=A*rn,ut+=A*an,A=H[1],X+=A*Wt,le+=A*Ut,ie+=A*Xt,oe+=A*Yt,ne+=A*Kt,ue+=A*Zt,be+=A*qt,ve+=A*Jt,pe+=A*Qt,$e+=A*en,Le+=A*tn,Ue+=A*nn,nt+=A*wt,lt+=A*Lt,ut+=A*rn,St+=A*an,A=H[2],le+=A*Wt,ie+=A*Ut,oe+=A*Xt,ne+=A*Yt,ue+=A*Kt,be+=A*Zt,ve+=A*qt,pe+=A*Jt,$e+=A*Qt,Le+=A*en,Ue+=A*tn,nt+=A*nn,lt+=A*wt,ut+=A*Lt,St+=A*rn,Rt+=A*an,A=H[3],ie+=A*Wt,oe+=A*Ut,ne+=A*Xt,ue+=A*Yt,be+=A*Kt,ve+=A*Zt,pe+=A*qt,$e+=A*Jt,Le+=A*Qt,Ue+=A*en,nt+=A*tn,lt+=A*nn,ut+=A*wt,St+=A*Lt,Rt+=A*rn,Ot+=A*an,A=H[4],oe+=A*Wt,ne+=A*Ut,ue+=A*Xt,be+=A*Yt,ve+=A*Kt,pe+=A*Zt,$e+=A*qt,Le+=A*Jt,Ue+=A*Qt,nt+=A*en,lt+=A*tn,ut+=A*nn,St+=A*wt,Rt+=A*Lt,Ot+=A*rn,Cn+=A*an,A=H[5],ne+=A*Wt,ue+=A*Ut,be+=A*Xt,ve+=A*Yt,pe+=A*Kt,$e+=A*Zt,Le+=A*qt,Ue+=A*Jt,nt+=A*Qt,lt+=A*en,ut+=A*tn,St+=A*nn,Rt+=A*wt,Ot+=A*Lt,Cn+=A*rn,En+=A*an,A=H[6],ue+=A*Wt,be+=A*Ut,ve+=A*Xt,pe+=A*Yt,$e+=A*Kt,Le+=A*Zt,Ue+=A*qt,nt+=A*Jt,lt+=A*Qt,ut+=A*en,St+=A*tn,Rt+=A*nn,Ot+=A*wt,Cn+=A*Lt,En+=A*rn,On+=A*an,A=H[7],be+=A*Wt,ve+=A*Ut,pe+=A*Xt,$e+=A*Yt,Le+=A*Kt,Ue+=A*Zt,nt+=A*qt,lt+=A*Jt,ut+=A*Qt,St+=A*en,Rt+=A*tn,Ot+=A*nn,Cn+=A*wt,En+=A*Lt,On+=A*rn,Kn+=A*an,A=H[8],ve+=A*Wt,pe+=A*Ut,$e+=A*Xt,Le+=A*Yt,Ue+=A*Kt,nt+=A*Zt,lt+=A*qt,ut+=A*Jt,St+=A*Qt,Rt+=A*en,Ot+=A*tn,Cn+=A*nn,En+=A*wt,On+=A*Lt,Kn+=A*rn,fr+=A*an,A=H[9],pe+=A*Wt,$e+=A*Ut,Le+=A*Xt,Ue+=A*Yt,nt+=A*Kt,lt+=A*Zt,ut+=A*qt,St+=A*Jt,Rt+=A*Qt,Ot+=A*en,Cn+=A*tn,En+=A*nn,On+=A*wt,Kn+=A*Lt,fr+=A*rn,Tr+=A*an,A=H[10],$e+=A*Wt,Le+=A*Ut,Ue+=A*Xt,nt+=A*Yt,lt+=A*Kt,ut+=A*Zt,St+=A*qt,Rt+=A*Jt,Ot+=A*Qt,Cn+=A*en,En+=A*tn,On+=A*nn,Kn+=A*wt,fr+=A*Lt,Tr+=A*rn,ni+=A*an,A=H[11],Le+=A*Wt,Ue+=A*Ut,nt+=A*Xt,lt+=A*Yt,ut+=A*Kt,St+=A*Zt,Rt+=A*qt,Ot+=A*Jt,Cn+=A*Qt,En+=A*en,On+=A*tn,Kn+=A*nn,fr+=A*wt,Tr+=A*Lt,ni+=A*rn,Ri+=A*an,A=H[12],Ue+=A*Wt,nt+=A*Ut,lt+=A*Xt,ut+=A*Yt,St+=A*Kt,Rt+=A*Zt,Ot+=A*qt,Cn+=A*Jt,En+=A*Qt,On+=A*en,Kn+=A*tn,fr+=A*nn,Tr+=A*wt,ni+=A*Lt,Ri+=A*rn,da+=A*an,A=H[13],nt+=A*Wt,lt+=A*Ut,ut+=A*Xt,St+=A*Yt,Rt+=A*Kt,Ot+=A*Zt,Cn+=A*qt,En+=A*Jt,On+=A*Qt,Kn+=A*en,fr+=A*tn,Tr+=A*nn,ni+=A*wt,Ri+=A*Lt,da+=A*rn,no+=A*an,A=H[14],lt+=A*Wt,ut+=A*Ut,St+=A*Xt,Rt+=A*Yt,Ot+=A*Kt,Cn+=A*Zt,En+=A*qt,On+=A*Jt,Kn+=A*Qt,fr+=A*en,Tr+=A*tn,ni+=A*nn,Ri+=A*wt,da+=A*Lt,no+=A*rn,as+=A*an,A=H[15],ut+=A*Wt,St+=A*Ut,Rt+=A*Xt,Ot+=A*Yt,Cn+=A*Kt,En+=A*Zt,On+=A*qt,Kn+=A*Jt,fr+=A*Qt,Tr+=A*en,ni+=A*tn,Ri+=A*nn,da+=A*wt,no+=A*Lt,as+=A*rn,Vl+=A*an,K+=38*St,X+=38*Rt,le+=38*Ot,ie+=38*Cn,oe+=38*En,ne+=38*On,ue+=38*Kn,be+=38*fr,ve+=38*Tr,pe+=38*ni,$e+=38*Ri,Le+=38*da,Ue+=38*no,nt+=38*as,lt+=38*Vl,L=1,A=K+L+65535,L=Math.floor(A/65536),K=A-L*65536,A=X+L+65535,L=Math.floor(A/65536),X=A-L*65536,A=le+L+65535,L=Math.floor(A/65536),le=A-L*65536,A=ie+L+65535,L=Math.floor(A/65536),ie=A-L*65536,A=oe+L+65535,L=Math.floor(A/65536),oe=A-L*65536,A=ne+L+65535,L=Math.floor(A/65536),ne=A-L*65536,A=ue+L+65535,L=Math.floor(A/65536),ue=A-L*65536,A=be+L+65535,L=Math.floor(A/65536),be=A-L*65536,A=ve+L+65535,L=Math.floor(A/65536),ve=A-L*65536,A=pe+L+65535,L=Math.floor(A/65536),pe=A-L*65536,A=$e+L+65535,L=Math.floor(A/65536),$e=A-L*65536,A=Le+L+65535,L=Math.floor(A/65536),Le=A-L*65536,A=Ue+L+65535,L=Math.floor(A/65536),Ue=A-L*65536,A=nt+L+65535,L=Math.floor(A/65536),nt=A-L*65536,A=lt+L+65535,L=Math.floor(A/65536),lt=A-L*65536,A=ut+L+65535,L=Math.floor(A/65536),ut=A-L*65536,K+=L-1+37*(L-1),L=1,A=K+L+65535,L=Math.floor(A/65536),K=A-L*65536,A=X+L+65535,L=Math.floor(A/65536),X=A-L*65536,A=le+L+65535,L=Math.floor(A/65536),le=A-L*65536,A=ie+L+65535,L=Math.floor(A/65536),ie=A-L*65536,A=oe+L+65535,L=Math.floor(A/65536),oe=A-L*65536,A=ne+L+65535,L=Math.floor(A/65536),ne=A-L*65536,A=ue+L+65535,L=Math.floor(A/65536),ue=A-L*65536,A=be+L+65535,L=Math.floor(A/65536),be=A-L*65536,A=ve+L+65535,L=Math.floor(A/65536),ve=A-L*65536,A=pe+L+65535,L=Math.floor(A/65536),pe=A-L*65536,A=$e+L+65535,L=Math.floor(A/65536),$e=A-L*65536,A=Le+L+65535,L=Math.floor(A/65536),Le=A-L*65536,A=Ue+L+65535,L=Math.floor(A/65536),Ue=A-L*65536,A=nt+L+65535,L=Math.floor(A/65536),nt=A-L*65536,A=lt+L+65535,L=Math.floor(A/65536),lt=A-L*65536,A=ut+L+65535,L=Math.floor(A/65536),ut=A-L*65536,K+=L-1+37*(L-1),$[0]=K,$[1]=X,$[2]=le,$[3]=ie,$[4]=oe,$[5]=ne,$[6]=ue,$[7]=be,$[8]=ve,$[9]=pe,$[10]=$e,$[11]=Le,$[12]=Ue,$[13]=nt,$[14]=lt,$[15]=ut}return wf}var _f,u1;function YD(){if(u1)return _f;u1=1;var e=je();Xe(),Dr(),Jc(),_f=e.kem=e.kem||{};var t=e.jsbn.BigInteger;e.kem.rsa={},e.kem.rsa.create=function(r,i){i=i||{};var a=i.prng||e.random,o={};return o.encrypt=function(s,l){var u=Math.ceil(s.n.bitLength()/8),c;do c=new t(e.util.bytesToHex(a.getBytesSync(u)),16).mod(s.n);while(c.compareTo(t.ONE)<=0);c=e.util.hexToBytes(c.toString(16));var p=u-c.length;p>0&&(c=e.util.fillString("\0",p)+c);var g=s.encrypt(c,"NONE"),d=r.generate(c,l);return{encapsulation:g,key:d}},o.decrypt=function(s,l,u){var c=s.decrypt(l,"NONE");return r.generate(c,u)},o},e.kem.kdf1=function(r,i){n(this,r,0,i||r.digestLength)},e.kem.kdf2=function(r,i){n(this,r,1,i||r.digestLength)};function n(r,i,a,o){r.generate=function(s,l){for(var u=new e.util.ByteBuffer,c=Math.ceil(l/o)+a,p=new e.util.ByteBuffer,g=a;g<c;++g){p.putInt32(g),i.start(),i.update(s+p.getBytes());var d=i.digest();u.putBytes(d.getBytes(o))}return u.truncate(u.length()-l),u.getBytes()}}return _f}var If,c1;function KD(){if(c1)return If;c1=1;var e=je();Xe(),If=e.log=e.log||{},e.log.levels=["none","error","warning","info","debug","verbose","max"];var t={},n=[],r=null;e.log.LEVEL_LOCKED=2,e.log.NO_LEVEL_CHECK=4,e.log.INTERPOLATE=8;for(var i=0;i<e.log.levels.length;++i){var a=e.log.levels[i];t[a]={index:i,name:a.toUpperCase()}}e.log.logMessage=function(g){for(var d=t[g.level].index,m=0;m<n.length;++m){var b=n[m];if(b.flags&e.log.NO_LEVEL_CHECK)b.f(g);else{var y=t[b.level].index;d<=y&&b.f(b,g)}}},e.log.prepareStandard=function(g){"standard"in g||(g.standard=t[g.level].name+" ["+g.category+"] "+g.message)},e.log.prepareFull=function(g){if(!("full"in g)){var d=[g.message];d=d.concat([]),g.full=e.util.format.apply(this,d)}},e.log.prepareStandardFull=function(g){"standardFull"in g||(e.log.prepareStandard(g),g.standardFull=g.standard)};for(var o=["error","warning","info","debug","verbose"],i=0;i<o.length;++i)(function(d){e.log[d]=function(m,b){var y=Array.prototype.slice.call(arguments).slice(2),f={timestamp:new Date,level:d,category:m,message:b,arguments:y};e.log.logMessage(f)}})(o[i]);if(e.log.makeLogger=function(g){var d={flags:0,f:g};return e.log.setLevel(d,"none"),d},e.log.setLevel=function(g,d){var m=!1;if(g&&!(g.flags&e.log.LEVEL_LOCKED))for(var b=0;b<e.log.levels.length;++b){var y=e.log.levels[b];if(d==y){g.level=d,m=!0;break}}return m},e.log.lock=function(g,d){typeof d>"u"||d?g.flags|=e.log.LEVEL_LOCKED:g.flags&=~e.log.LEVEL_LOCKED},e.log.addLogger=function(g){n.push(g)},typeof console<"u"&&"log"in console){var s;if(console.error&&console.warn&&console.info&&console.debug){var l={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},u=function(g,d){e.log.prepareStandard(d);var m=l[d.level],b=[d.standard];b=b.concat(d.arguments.slice()),m.apply(console,b)};s=e.log.makeLogger(u)}else{var u=function(d,m){e.log.prepareStandardFull(m),console.log(m.standardFull)};s=e.log.makeLogger(u)}e.log.setLevel(s,"debug"),e.log.addLogger(s),r=s}else console={log:function(){}};if(r!==null&&typeof window<"u"&&window.location){var c=new URL(window.location.href).searchParams;if(c.has("console.level")&&e.log.setLevel(r,c.get("console.level").slice(-1)[0]),c.has("console.lock")){var p=c.get("console.lock").slice(-1)[0];p=="true"&&e.log.lock(r)}}return e.log.consoleLogger=r,If}var Df,d1;function ZD(){return d1||(d1=1,Df=Ii(),vg(),xl(),qx(),lC()),Df}var Tf={exports:{}},f1;function qD(){if(f1)return Tf.exports;f1=1;var e=je();Ka(),Jr(),qc(),Za(),qo(),rC(),Dr(),Xe(),Eg();var t=e.asn1,n=Tf.exports=e.pkcs7=e.pkcs7||{};n.messageFromPem=function(d){var m=e.pem.decode(d)[0];if(m.type!=="PKCS7"){var b=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw b.headerType=m.type,b}if(m.procType&&m.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var y=t.fromDer(m.body);return n.messageFromAsn1(y)},n.messageToPem=function(d,m){var b={type:"PKCS7",body:t.toDer(d.toAsn1()).getBytes()};return e.pem.encode(b,{maxline:m})},n.messageFromAsn1=function(d){var m={},b=[];if(!t.validate(d,n.asn1.contentInfoValidator,m,b)){var y=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw y.errors=b,y}var f=t.derToOid(m.contentType),v;switch(f){case e.pki.oids.envelopedData:v=n.createEnvelopedData();break;case e.pki.oids.encryptedData:v=n.createEncryptedData();break;case e.pki.oids.signedData:v=n.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+f+" is not (yet) supported.")}return v.fromAsn1(m.content.value[0]),v},n.createSignedData=function(){var d=null;return d={type:e.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(y){if(p(d,y,n.asn1.signedDataValidator),d.certificates=[],d.crls=[],d.digestAlgorithmIdentifiers=[],d.contentInfo=null,d.signerInfos=[],d.rawCapture.certificates)for(var f=d.rawCapture.certificates.value,v=0;v<f.length;++v)d.certificates.push(e.pki.certificateFromAsn1(f[v]))},toAsn1:function(){d.contentInfo||d.sign();for(var y=[],f=0;f<d.certificates.length;++f)y.push(e.pki.certificateToAsn1(d.certificates[f]));var v=[],C=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(d.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,d.digestAlgorithmIdentifiers),d.contentInfo])]);return y.length>0&&C.value[0].value.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,y)),v.length>0&&C.value[0].value.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,v)),C.value[0].value.push(t.create(t.Class.UNIVERSAL,t.Type.SET,!0,d.signerInfos)),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.type).getBytes()),C])},addSigner:function(y){var f=y.issuer,v=y.serialNumber;if(y.certificate){var C=y.certificate;typeof C=="string"&&(C=e.pki.certificateFromPem(C)),f=C.issuer.attributes,v=C.serialNumber}var S=y.key;if(!S)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof S=="string"&&(S=e.pki.privateKeyFromPem(S));var _=y.digestAlgorithm||e.pki.oids.sha1;switch(_){case e.pki.oids.sha1:case e.pki.oids.sha256:case e.pki.oids.sha384:case e.pki.oids.sha512:case e.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+_)}var E=y.authenticatedAttributes||[];if(E.length>0){for(var x=!1,h=!1,w=0;w<E.length;++w){var D=E[w];if(!x&&D.type===e.pki.oids.contentType){if(x=!0,h)break;continue}if(!h&&D.type===e.pki.oids.messageDigest){if(h=!0,x)break;continue}}if(!x||!h)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}d.signers.push({key:S,version:1,issuer:f,serialNumber:v,digestAlgorithm:_,signatureAlgorithm:e.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:E,unauthenticatedAttributes:[]})},sign:function(y){if(y=y||{},(typeof d.content!="object"||d.contentInfo===null)&&(d.contentInfo=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(e.pki.oids.data).getBytes())]),"content"in d)){var f;d.content instanceof e.util.ByteBuffer?f=d.content.bytes():typeof d.content=="string"&&(f=e.util.encodeUtf8(d.content)),y.detached?d.detachedContent=t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,f):d.contentInfo.value.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,f)]))}if(d.signers.length!==0){var v=m();b(v)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(y){typeof y=="string"&&(y=e.pki.certificateFromPem(y)),d.certificates.push(y)},addCertificateRevokationList:function(y){throw new Error("PKCS#7 CRL support not yet implemented.")}},d;function m(){for(var y={},f=0;f<d.signers.length;++f){var v=d.signers[f],C=v.digestAlgorithm;C in y||(y[C]=e.md[e.pki.oids[C]].create()),v.authenticatedAttributes.length===0?v.md=y[C]:v.md=e.md[e.pki.oids[C]].create()}d.digestAlgorithmIdentifiers=[];for(var C in y)d.digestAlgorithmIdentifiers.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(C).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")]));return y}function b(y){var f;if(d.detachedContent?f=d.detachedContent:(f=d.contentInfo.value[1],f=f.value[0]),!f)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var v=t.derToOid(d.contentInfo.value[0].value),C=t.toDer(f);C.getByte(),t.getBerValueLength(C),C=C.getBytes();for(var S in y)y[S].start().update(C);for(var _=new Date,E=0;E<d.signers.length;++E){var x=d.signers[E];if(x.authenticatedAttributes.length===0){if(v!==e.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{x.authenticatedAttributesAsn1=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[]),w=0;w<x.authenticatedAttributes.length;++w){var D=x.authenticatedAttributes[w];D.type===e.pki.oids.messageDigest?D.value=y[x.digestAlgorithm].digest():D.type===e.pki.oids.signingTime&&(D.value||(D.value=_)),h.value.push(u(D)),x.authenticatedAttributesAsn1.value.push(u(D))}C=t.toDer(h).getBytes(),x.md.start().update(C)}x.signature=x.key.sign(x.md,"RSASSA-PKCS1-V1_5")}d.signerInfos=l(d.signers)}},n.createEncryptedData=function(){var d=null;return d={type:e.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:e.pki.oids["aes256-CBC"]},fromAsn1:function(m){p(d,m,n.asn1.encryptedDataValidator)},decrypt:function(m){m!==void 0&&(d.encryptedContent.key=m),g(d)}},d},n.createEnvelopedData=function(){var d=null;return d={type:e.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:e.pki.oids["aes256-CBC"]},fromAsn1:function(m){var b=p(d,m,n.asn1.envelopedDataValidator);d.recipients=a(b.recipientInfos.value)},toAsn1:function(){return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.type).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(d.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,o(d.recipients)),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,c(d.encryptedContent))])])])},findRecipient:function(m){for(var b=m.issuer.attributes,y=0;y<d.recipients.length;++y){var f=d.recipients[y],v=f.issuer;if(f.serialNumber===m.serialNumber&&v.length===b.length){for(var C=!0,S=0;S<b.length;++S)if(v[S].type!==b[S].type||v[S].value!==b[S].value){C=!1;break}if(C)return f}}return null},decrypt:function(m,b){if(d.encryptedContent.key===void 0&&m!==void 0&&b!==void 0)switch(m.encryptedContent.algorithm){case e.pki.oids.rsaEncryption:case e.pki.oids.desCBC:var y=b.decrypt(m.encryptedContent.content);d.encryptedContent.key=e.util.createBuffer(y);break;default:throw new Error("Unsupported asymmetric cipher, OID "+m.encryptedContent.algorithm)}g(d)},addRecipient:function(m){d.recipients.push({version:0,issuer:m.issuer.attributes,serialNumber:m.serialNumber,encryptedContent:{algorithm:e.pki.oids.rsaEncryption,key:m.publicKey}})},encrypt:function(m,b){if(d.encryptedContent.content===void 0){b=b||d.encryptedContent.algorithm,m=m||d.encryptedContent.key;var y,f,v;switch(b){case e.pki.oids["aes128-CBC"]:y=16,f=16,v=e.aes.createEncryptionCipher;break;case e.pki.oids["aes192-CBC"]:y=24,f=16,v=e.aes.createEncryptionCipher;break;case e.pki.oids["aes256-CBC"]:y=32,f=16,v=e.aes.createEncryptionCipher;break;case e.pki.oids["des-EDE3-CBC"]:y=24,f=8,v=e.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+b)}if(m===void 0)m=e.util.createBuffer(e.random.getBytes(y));else if(m.length()!=y)throw new Error("Symmetric key has wrong length; got "+m.length()+" bytes, expected "+y+".");d.encryptedContent.algorithm=b,d.encryptedContent.key=m,d.encryptedContent.parameter=e.util.createBuffer(e.random.getBytes(f));var C=v(m);if(C.start(d.encryptedContent.parameter.copy()),C.update(d.content),!C.finish())throw new Error("Symmetric encryption failed.");d.encryptedContent.content=C.output}for(var S=0;S<d.recipients.length;++S){var _=d.recipients[S];if(_.encryptedContent.content===void 0)switch(_.encryptedContent.algorithm){case e.pki.oids.rsaEncryption:_.encryptedContent.content=_.encryptedContent.key.encrypt(d.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+_.encryptedContent.algorithm)}}}},d};function r(d){var m={},b=[];if(!t.validate(d,n.asn1.recipientInfoValidator,m,b)){var y=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw y.errors=b,y}return{version:m.version.charCodeAt(0),issuer:e.pki.RDNAttributesAsArray(m.issuer),serialNumber:e.util.createBuffer(m.serial).toHex(),encryptedContent:{algorithm:t.derToOid(m.encAlgorithm),parameter:m.encParameter?m.encParameter.value:void 0,content:m.encKey}}}function i(d){return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(d.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[e.pki.distinguishedNameToAsn1({attributes:d.issuer}),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,e.util.hexToBytes(d.serialNumber))]),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.encryptedContent.algorithm).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")]),t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,d.encryptedContent.content)])}function a(d){for(var m=[],b=0;b<d.length;++b)m.push(r(d[b]));return m}function o(d){for(var m=[],b=0;b<d.length;++b)m.push(i(d[b]));return m}function s(d){var m=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(d.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[e.pki.distinguishedNameToAsn1({attributes:d.issuer}),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,e.util.hexToBytes(d.serialNumber))]),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.digestAlgorithm).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])]);if(d.authenticatedAttributesAsn1&&m.value.push(d.authenticatedAttributesAsn1),m.value.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.signatureAlgorithm).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])),m.value.push(t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,d.signature)),d.unauthenticatedAttributes.length>0){for(var b=t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[]),y=0;y<d.unauthenticatedAttributes.length;++y){var f=d.unauthenticatedAttributes[y];b.values.push(u(f))}m.value.push(b)}return m}function l(d){for(var m=[],b=0;b<d.length;++b)m.push(s(d[b]));return m}function u(d){var m;if(d.type===e.pki.oids.contentType)m=t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.value).getBytes());else if(d.type===e.pki.oids.messageDigest)m=t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,d.value.bytes());else if(d.type===e.pki.oids.signingTime){var b=new Date("1950-01-01T00:00:00Z"),y=new Date("2050-01-01T00:00:00Z"),f=d.value;if(typeof f=="string"){var v=Date.parse(f);isNaN(v)?f.length===13?f=t.utcTimeToDate(f):f=t.generalizedTimeToDate(f):f=new Date(v)}f>=b&&f<y?m=t.create(t.Class.UNIVERSAL,t.Type.UTCTIME,!1,t.dateToUtcTime(f)):m=t.create(t.Class.UNIVERSAL,t.Type.GENERALIZEDTIME,!1,t.dateToGeneralizedTime(f))}return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.type).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[m])])}function c(d){return[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(e.pki.oids.data).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(d.algorithm).getBytes()),d.parameter?t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,d.parameter.getBytes()):void 0]),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,d.content.getBytes())])]}function p(d,m,b){var y={},f=[];if(!t.validate(m,b,y,f)){var v=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw v.errors=v,v}var C=t.derToOid(y.contentType);if(C!==e.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(y.encryptedContent){var S="";if(e.util.isArray(y.encryptedContent))for(var _=0;_<y.encryptedContent.length;++_){if(y.encryptedContent[_].type!==t.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");S+=y.encryptedContent[_].value}else S=y.encryptedContent;d.encryptedContent={algorithm:t.derToOid(y.encAlgorithm),parameter:e.util.createBuffer(y.encParameter.value),content:e.util.createBuffer(S)}}if(y.content){var S="";if(e.util.isArray(y.content))for(var _=0;_<y.content.length;++_){if(y.content[_].type!==t.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");S+=y.content[_].value}else S=y.content;d.content=e.util.createBuffer(S)}return d.version=y.version.charCodeAt(0),d.rawCapture=y,y}function g(d){if(d.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(d.content===void 0){var m;switch(d.encryptedContent.algorithm){case e.pki.oids["aes128-CBC"]:case e.pki.oids["aes192-CBC"]:case e.pki.oids["aes256-CBC"]:m=e.aes.createDecryptionCipher(d.encryptedContent.key);break;case e.pki.oids.desCBC:case e.pki.oids["des-EDE3-CBC"]:m=e.des.createDecryptionCipher(d.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+d.encryptedContent.algorithm)}if(m.start(d.encryptedContent.parameter),m.update(d.encryptedContent.content),!m.finish())throw new Error("Symmetric decryption failed.");d.content=m.output}}return Tf.exports}var Af={exports:{}},h1;function JD(){if(h1)return Af.exports;h1=1;var e=je();Ka(),yl(),vg(),xl(),Xe();var t=Af.exports=e.ssh=e.ssh||{};t.privateKeyToPutty=function(a,o,s){s=s||"",o=o||"";var l="ssh-rsa",u=o===""?"none":"aes256-cbc",c="PuTTY-User-Key-File-2: "+l+`\r
|
|
15
|
-
`;c+="Encryption: "+u+`\r
|
|
16
|
-
`,c+="Comment: "+s+`\r
|
|
17
|
-
`;var p=e.util.createBuffer();r(p,l),n(p,a.e),n(p,a.n);var g=e.util.encode64(p.bytes(),64),d=Math.floor(g.length/66)+1;c+="Public-Lines: "+d+`\r
|
|
18
|
-
`,c+=g;var m=e.util.createBuffer();n(m,a.d),n(m,a.p),n(m,a.q),n(m,a.qInv);var b;if(!o)b=e.util.encode64(m.bytes(),64);else{var y=m.length()+16-1;y-=y%16;var f=i(m.bytes());f.truncate(f.length()-y+m.length()),m.putBuffer(f);var v=e.util.createBuffer();v.putBuffer(i("\0\0\0\0",o)),v.putBuffer(i("\0\0\0",o));var C=e.aes.createEncryptionCipher(v.truncate(8),"CBC");C.start(e.util.createBuffer().fillWithByte(0,16)),C.update(m.copy()),C.finish();var S=C.output;S.truncate(16),b=e.util.encode64(S.bytes(),64)}d=Math.floor(b.length/66)+1,c+=`\r
|
|
19
|
-
Private-Lines: `+d+`\r
|
|
20
|
-
`,c+=b;var _=i("putty-private-key-file-mac-key",o),E=e.util.createBuffer();r(E,l),r(E,u),r(E,s),E.putInt32(p.length()),E.putBuffer(p),E.putInt32(m.length()),E.putBuffer(m);var x=e.hmac.create();return x.start("sha1",_),x.update(E.bytes()),c+=`\r
|
|
21
|
-
Private-MAC: `+x.digest().toHex()+`\r
|
|
22
|
-
`,c},t.publicKeyToOpenSSH=function(a,o){var s="ssh-rsa";o=o||"";var l=e.util.createBuffer();return r(l,s),n(l,a.e),n(l,a.n),s+" "+e.util.encode64(l.bytes())+" "+o},t.privateKeyToOpenSSH=function(a,o){return o?e.pki.encryptRsaPrivateKey(a,o,{legacy:!0,algorithm:"aes128"}):e.pki.privateKeyToPem(a)},t.getPublicKeyFingerprint=function(a,o){o=o||{};var s=o.md||e.md.md5.create(),l="ssh-rsa",u=e.util.createBuffer();r(u,l),n(u,a.e),n(u,a.n),s.start(),s.update(u.getBytes());var c=s.digest();if(o.encoding==="hex"){var p=c.toHex();return o.delimiter?p.match(/.{2}/g).join(o.delimiter):p}else{if(o.encoding==="binary")return c.getBytes();if(o.encoding)throw new Error('Unknown encoding "'+o.encoding+'".')}return c};function n(a,o){var s=o.toString(16);s[0]>="8"&&(s="00"+s);var l=e.util.hexToBytes(s);a.putInt32(l.length),a.putBytes(l)}function r(a,o){a.putInt32(o.length),a.putString(o)}function i(){for(var a=e.md.sha1.create(),o=arguments.length,s=0;s<o;++s)a.update(arguments[s]);return a.digest()}return Af.exports}var Rf,g1;function QD(){return g1||(g1=1,Rf=je(),Ka(),WD(),Jr(),bg(),qc(),XD(),yl(),YD(),KD(),ZD(),iC(),xg(),qo(),eC(),aC(),qD(),oC(),tC(),Jx(),Cg(),Dr(),Qx(),JD(),sC(),Xe()),Rf}var eT=QD();const ha=LD(eT),Zr=e=>{try{return bt(e).isFinite()}catch{return!1}},uC=e=>{if(typeof e=="number"&&Number.isFinite(e))return!0;if(typeof e=="string"&&e.trim()!==""&&!isNaN(Number(e))){const t=Number(e);return Number.isFinite(t)}return!1};function Cl(e,t){const{minimumFractionDigits:n,instance:r=!1,ignoreFractionLimit:i=!1}=t||{};let{maximumFractionDigits:a=2}=t||{};Zr(e)||(e="0"),!i&&n!==void 0&&n>a&&(a=n);let o="";if(i?o=bt(e).toString():o=bt(e).toFixed(a),o.includes(".")&&!i){const[s,l]=o.split(".");let u=l.replace(/0+$/,"");n!==void 0&&n>=0&&(u=u.padEnd(n,"0")),o=u?`${s}.${u}`:s}return r?bt(o):o}const Sg=(e,t=2)=>{let n=parseFloat(uC(e)?e:0);return n=(+(Math.round(n+"e"+t)+"e-"+t)).toFixed(t),n=Number(n),n};function Oi(e,t="currency",n){const{minimumFractionDigits:r=0,locale:i="id-ID",currency:a="IDR",withSpace:o=!1}=n||{},s=new Intl.NumberFormat(i,{style:t,currency:a,minimumFractionDigits:r}).format(Sg(e,r>0?r:2));return o?s:s.replace(/\s/g,"")}const yo=(e,t,n,r)=>{const i={"id-ID":rc,"zh-CN":Xx,"en-US":mg,"nl-BE":Ux};let a=n??"-";return e&&!isNaN(new Date(e).getTime())&&(a=Ls(e,t??"dd/MM/yyyy",{locale:i[r??"id-ID"]})),a},tT=(e,t,n,r,i,a)=>{const o={"id-ID":rc,"zh-CN":Xx,"en-US":mg,"nl-NL":Ux};if(e&&!isNaN(new Date(e).getTime())){const s=Ls(e,n??"dd/MM/yyyy",{locale:o[a??"id-ID"]});if(t&&!isNaN(new Date(t).getTime())){const l=Ls(t,n??"dd/MM/yyyy",{locale:o[a??"id-ID"]});return s===l?s:`${s}${r??"-"}${l}`}return s}return i??"-"},cC=(e,t)=>e.reduce((n,r)=>{const i=String(r[t]);return n[i]||(n[i]=[]),n[i].push(r),n},{}),nT=({value:e,keyDate:t="date",keyFormat:n="formatDate",format:r="dd/MM/yyyy"})=>{const i=e.map(a=>({...a,[n]:yo(a[t],r)}));return cC(i,n)},rT=e=>(Object.keys(e).forEach(t=>{["",null,void 0,[],{}].includes(e[t])&&delete e[t]}),e),iT=(e,t)=>{var g,d;const n=/^-?\d+[0-9.,]*$/,r=/([.])(?=.*\1)/,i=/([,])(?=.*\1)/,a=((g=e.split(",")[0])==null?void 0:g.trim())||"",o=((d=e.split(",")[1])==null?void 0:d.trim())||"",s=!r.test(a)&&(a==="-"||n.test(a)||!a),l=!r.test(o)&&(o==="-"||n.test(o)||!o),u=(m,b,y)=>{let f=m;const v=m.split(".")[0];return isNaN(parseFloat(v.split(".")[0]))||(parseFloat(v.split(".")[0])<=b?f=`${b}`:parseFloat(v)>=y&&(f=`${y}`)),f},c=u(a,(t==null?void 0:t.latMin)??-85,(t==null?void 0:t.latMax)??85),p=u(o,(t==null?void 0:t.longMin)??-180,(t==null?void 0:t.longMax)??180);return{latitude:c,longitude:p,latlong:`${c}${e.includes(",")?","+p:""}`,isValid:!i.test(e)&&s&&l}},p1=(e,t)=>e?Object.fromEntries(Object.entries(t).filter(([r])=>r.startsWith(e))):t,wg=(e,t)=>e.map(n=>n[t]).join(","),_g=(e,t)=>e.map(n=>n[t]),aT=(e,t)=>Array.isArray(e)?e==null?void 0:e.map((n,r,i)=>typeof t=="function"?t(n,r,i):n):[],oT=(e,t,n,r,i)=>Array.isArray(e)?{[t]:e==null?void 0:e.map((a,o,s)=>typeof n=="function"?n(a,o,s):a),[`${t}-val-be`]:a=>r==="array-of-object-to-array"?_g(a,i):wg(a,i)}:{[t]:"",[`${t}-val-be`]:()=>""};function Ig(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||!Ig(e[i],t[i]))return!1;return!0}function sT(e,t={maxTime:"hour"}){const{maxTime:n="hour"}=t,r=l=>l<10?`0${l}`:l;let i=r(0),a=r(0);const o=r(Math.floor(e%3600/60)),s=r(Math.floor(e%60));return n==="hour"?a=r(Math.floor(e/3600)):n==="day"&&(i=r(Math.floor(e/(3600*24))),a=r(Math.floor(e%(3600*24)/3600))),{day:i,hour:a,minute:o,second:s}}function So(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Vs(e,...t){if(!t.length)return e;const n=t.shift();if(So(e)&&So(n))for(const r in n)So(n[r])?(e[r]||Object.assign(e,{[r]:{}}),Vs(e[r],n[r])):Object.assign(e,{[r]:n[r]});return Vs(e,...t)}function ic(e,t){const n=t.match(/[^.[\]]+/g);if(!n||n.length===0)return;const r=(i,a)=>{if(typeof i!="object"||i===null||a.length===0)return;const o=i,s=a[0],l=a.slice(1);if(l.length===0){delete o[s];return}const u=o[s];if(s==="*"&&Array.isArray(o)){for(const c of o)r(c,l);return}r(u,l)};r(e,n)}function lT(e,t){if(!e||!t)return e;if(Array.isArray(t))for(const n of t)ic(e,n);else ic(e,t);return e}function dC(e,t){const n=JSON.parse(JSON.stringify(e));if(Array.isArray(t))for(const r of t)ic(n,r);else ic(n,t);return n}function uT(e,t,n={}){const r=n.arrayMergeStrategy||"combine",i=(n.keepKeys||[]).map(s=>s.match(/[^.[\]]+/g)||[]),a=s=>i.some(l=>l.length!==s.length?!1:l.every((u,c)=>u===s[c]));function o(s,l,u){if(u.length>0&&a(u))return s;if(Array.isArray(l)&&Array.isArray(s)){if(r==="overwrite")return[...l];const c=r==="sync"?l.length:Math.max(s.length,l.length),p=new Array(c);for(let g=0;g<c;g++){const d=[...u,String(g)],m=s[g],b=l[g];if(g>=l.length){p[g]=m;continue}if(g>=s.length){p[g]=b;continue}p[g]=o(m,b,d)}return p}if(So(l)&&So(s)){const c={...s};return Object.keys(l).forEach(p=>{const g=[...u,p],d=l[p],m=s[p];c[p]=o(m,d,g)}),c}return l===void 0?s:l}return o(e,t,[])}const cT=e=>Sg(e||0),dT=e=>Cl(e||0),fT=(e,t)=>Cl(e||0,t),hT=e=>isNaN(e)?void 0:e,ed=e=>{const t=e.toString().split(""),n=t[1]!=="0"?`,${t[1]}`:"";let[r]=e.toString().split(".");return r=r.replaceAll("-",""),r.length>=15?`${+r.substring(0,3)} T`:r.length===14?`${+r.substring(0,2)} T`:r.length===13?`${+r.substring(0,1)}${n} T`:r.length===12?`${+r.substring(0,3)} M`:r.length===11?`${+r.substring(0,2)} M`:r.length===10?`${+r.substring(0,1)}${n} M`:r.length===9?`${+r.substring(0,3)} JT`:r.length===8?`${+r.substring(0,2)} JT`:r.length===7?`${+r.substring(0,1)}${n} JT`:r.length===6?`${+r.substring(0,3)} RB`:r.length===5?`${+r.substring(0,2)} RB`:r.length===4?`${+r.substring(0,1)}${n} RB`:r.length<=3?+r?`${+r}`:0:null};function n0(e){if(typeof e!="string")throw new Error("Input harus berupa string");const t=e.split(".");if(t.length===1)return{filename:e,extension:""};const n="."+t[t.length-1];return{filename:t.slice(0,-1).join("."),extension:n}}const gT=e=>(new DOMParser().parseFromString(e||"","text/html").body.textContent??"").toString();function pT(e,t){const n=typeof e=="string"?e:JSON.stringify(e),r=ha.util.decode64(t.replace(/\s+/g,"")),i=ha.util.decode64(r),a=ha.asn1.fromDer(i),s=ha.pki.publicKeyFromAsn1(a).encrypt(n,"RSA-OAEP",{md:ha.md.sha256.create(),mgf1:{md:ha.md.sha1.create()}});return ha.util.encode64(s)}function mT(e,t={}){const{locale:n,currency:r,minimumFractionDigits:i,withSpace:a,currencyDisplay:o,ignoreFractionLimit:s=!1}=t;let{maximumFractionDigits:l=2}=t;!s&&i!==void 0&&i>l&&(l=i);const u=Cl(e,{maximumFractionDigits:l,ignoreFractionLimit:s}),[c,p=""]=u.split("."),g=c.replace(/\B(?=(\d{3})+(?!\d))/g,".");let d="";s?d=p:d=p.slice(0,l),s||(i===void 0?d=d.replace(/0+$/,""):d&&i>0&&(d=d.padEnd(i,"0")));let m=d?`${g},${d}`:g;if(!n||!r)return m;const y={"id-ID":{symbol:"Rp",code:"IDR",name:"Rupiah",negativePosition:"start"},"en-US":{symbol:"$",code:"USD",name:"US Dollar",negativePosition:"middle"},"ja-JP":{symbol:"¥",code:"JPY",name:"Yen",negativePosition:"middle"}}[n]||{symbol:"",code:r,name:r},f={symbol:y.symbol,code:y.code,name:y.name}[o||"symbol"],v=m.includes("-");return m=y.negativePosition==="start"?m.replace("-",""):m,a?`${y.negativePosition==="start"&&v?"-":""}${f} ${m}`:`${y.negativePosition==="start"&&v?"-":""}${f}${m}`}function bT(e){if(!Zr(e))return"0";const t=typeof e=="number"?bt(e).toString():e;if(!t.includes("."))return t;const[n,r]=t.split("."),i=r.replace(/0+$/,"");return i?`${n}.${i}`:n}/*! js-cookie v3.0.5 | MIT */function Yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var vT={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function r0(e,t){function n(i,a,o){if(!(typeof document>"u")){o=Yl({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in o)o[l]&&(s+="; "+l,o[l]!==!0&&(s+="="+o[l].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+s}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},s=0;s<a.length;s++){var l=a[s].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(o[c]=e.read(u,c),i===c)break}catch{}}return i?o[i]:o}}return Object.create({set:n,get:r,remove:function(i,a){n(i,"",Yl({},a,{expires:-1}))},withAttributes:function(i){return r0(this.converter,Yl({},this.attributes,i))},withConverter:function(i){return r0(Yl({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Ar=r0(vT,{path:"/"});const yT={setItem(e,t,n={},r=3e3){const a={...{path:"/",expires:365},...n};parseInt(Ar.get(`${e}_count`)??"0",10)&&this.removeItem(e,n);const s=Math.ceil(t.length/r);for(let l=0;l<s;l++){const u=t.slice(l*r,(l+1)*r);Ar.set(`${e}_${l}`,u,a)}Ar.set(`${e}_count`,s.toString(),a)},getItem(e){const t=parseInt(Ar.get(`${e}_count`)??"0",10);if(!t)return null;let n="";for(let r=0;r<t;r++){const i=Ar.get(`${e}_${r}`);if(!i)return null;n+=i}return n},removeItem(e,t={}){const n=parseInt(Ar.get(`${e}_count`)??"0",10),r={path:"/",...t};if(!isNaN(n)){for(let i=0;i<n;i++)Ar.remove(`${e}_${i}`,r);Ar.remove(`${e}_count`,r)}},clear(e={}){const t={path:"/",...e},n=Ar.get();Object.keys(n).forEach(r=>Ar.remove(r,t))}};function fC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=fC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qi(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=fC(e))&&(r&&(r+=" "),r+=t);return r}function xT(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}xT(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
23
|
-
`);var El=e=>typeof e=="number"&&!isNaN(e),Oa=e=>typeof e=="string",Si=e=>typeof e=="function",CT=e=>Oa(e)||El(e),i0=e=>Oa(e)||Si(e)?e:null,ET=(e,t)=>e===!1||El(e)&&e>0?e:t,a0=e=>N.isValidElement(e)||Oa(e)||Si(e)||El(e);function ST(e,t,n=300){let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function wT({enter:e,exit:t,appendPosition:n=!1,collapse:r=!0,collapseDuration:i=300}){return function({children:a,position:o,preventExitTransition:s,done:l,nodeRef:u,isIn:c,playToast:p}){let g=n?`${e}--${o}`:e,d=n?`${t}--${o}`:t,m=N.useRef(0);return N.useLayoutEffect(()=>{let b=u.current,y=g.split(" "),f=v=>{v.target===u.current&&(p(),b.removeEventListener("animationend",f),b.removeEventListener("animationcancel",f),m.current===0&&v.type!=="animationcancel"&&b.classList.remove(...y))};b.classList.add(...y),b.addEventListener("animationend",f),b.addEventListener("animationcancel",f)},[]),N.useEffect(()=>{let b=u.current,y=()=>{b.removeEventListener("animationend",y),r?ST(b,l,i):l()};c||(s?y():(m.current=1,b.className+=` ${d}`,b.addEventListener("animationend",y)))},[c]),N.createElement(N.Fragment,null,a)}}function m1(e,t){return{content:hC(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function hC(e,t,n=!1){return N.isValidElement(e)&&!Oa(e.type)?N.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):Si(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function _T({closeToast:e,theme:t,ariaLabel:n="close"}){return N.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:r=>{r.stopPropagation(),e(!0)},"aria-label":n},N.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},N.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function IT({delay:e,isRunning:t,closeToast:n,type:r="default",hide:i,className:a,controlledProgress:o,progress:s,rtl:l,isIn:u,theme:c}){let p=i||o&&s===0,g={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};o&&(g.transform=`scaleX(${s})`);let d=qi("Toastify__progress-bar",o?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${c}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":l}),m=Si(a)?a({rtl:l,type:r,defaultClassName:d}):qi(d,a),b={[o&&s>=1?"onTransitionEnd":"onAnimationEnd"]:o&&s<1?null:()=>{u&&n()}};return N.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},N.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${c} Toastify__progress-bar--${r}`}),N.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:m,style:g,...b}))}var DT=1,gC=()=>`${DT++}`;function TT(e,t,n){let r=1,i=0,a=[],o=[],s=t,l=new Map,u=new Set,c=v=>(u.add(v),()=>u.delete(v)),p=()=>{o=Array.from(l.values()),u.forEach(v=>v())},g=({containerId:v,toastId:C,updateId:S})=>{let _=v?v!==e:e!==1,E=l.has(C)&&S==null;return _||E},d=(v,C)=>{l.forEach(S=>{var _;(C==null||C===S.props.toastId)&&((_=S.toggle)==null||_.call(S,v))})},m=v=>{var C,S;(S=(C=v.props)==null?void 0:C.onClose)==null||S.call(C,v.removalReason),v.isActive=!1},b=v=>{if(v==null)l.forEach(m);else{let C=l.get(v);C&&m(C)}p()},y=()=>{i-=a.length,a=[]},f=v=>{var C,S;let{toastId:_,updateId:E}=v.props,x=E==null;v.staleId&&l.delete(v.staleId),v.isActive=!0,l.set(_,v),p(),n(m1(v,x?"added":"updated")),x&&((S=(C=v.props).onOpen)==null||S.call(C))};return{id:e,props:s,observe:c,toggle:d,removeToast:b,toasts:l,clearQueue:y,buildToast:(v,C)=>{if(g(C))return;let{toastId:S,updateId:_,data:E,staleId:x,delay:h}=C,w=_==null;w&&i++;let D={...s,style:s.toastStyle,key:r++,...Object.fromEntries(Object.entries(C).filter(([T,F])=>F!=null)),toastId:S,updateId:_,data:E,isIn:!1,className:i0(C.className||s.toastClassName),progressClassName:i0(C.progressClassName||s.progressClassName),autoClose:C.isLoading?!1:ET(C.autoClose,s.autoClose),closeToast(T){l.get(S).removalReason=T,b(S)},deleteToast(){let T=l.get(S);if(T!=null){if(n(m1(T,"removed")),l.delete(S),i--,i<0&&(i=0),a.length>0){f(a.shift());return}p()}}};D.closeButton=s.closeButton,C.closeButton===!1||a0(C.closeButton)?D.closeButton=C.closeButton:C.closeButton===!0&&(D.closeButton=a0(s.closeButton)?s.closeButton:!0);let I={content:v,props:D,staleId:x};s.limit&&s.limit>0&&i>s.limit&&w?a.push(I):El(h)?setTimeout(()=>{f(I)},h):f(I)},setProps(v){s=v},setToggle:(v,C)=>{let S=l.get(v);S&&(S.toggle=C)},isToastActive:v=>{var C;return(C=l.get(v))==null?void 0:C.isActive},getSnapshot:()=>o}}var Sn=new Map,Hs=[],o0=new Set,AT=e=>o0.forEach(t=>t(e)),pC=()=>Sn.size>0;function RT(){Hs.forEach(e=>bC(e.content,e.options)),Hs=[]}var BT=(e,{containerId:t})=>{var n;return(n=Sn.get(t||1))==null?void 0:n.toasts.get(e)};function mC(e,t){var n;if(t)return!!((n=Sn.get(t))!=null&&n.isToastActive(e));let r=!1;return Sn.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function $T(e){if(!pC()){Hs=Hs.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||CT(e))Sn.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=Sn.get(e.containerId);t?t.removeToast(e.id):Sn.forEach(n=>{n.removeToast(e.id)})}}var kT=(e={})=>{Sn.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function bC(e,t){a0(e)&&(pC()||Hs.push({content:e,options:t}),Sn.forEach(n=>{n.buildToast(e,t)}))}function PT(e){var t;(t=Sn.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function vC(e,t){Sn.forEach(n=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===n.id)&&n.toggle(e,t==null?void 0:t.id)})}function FT(e){let t=e.containerId||1;return{subscribe(n){let r=TT(t,e,AT);Sn.set(t,r);let i=r.observe(n);return RT(),()=>{i(),Sn.delete(t)}},setProps(n){var r;(r=Sn.get(t))==null||r.setProps(n)},getSnapshot(){var n;return(n=Sn.get(t))==null?void 0:n.getSnapshot()}}}function NT(e){return o0.add(e),()=>{o0.delete(e)}}function MT(e){return e&&(Oa(e.toastId)||El(e.toastId))?e.toastId:gC()}function Sl(e,t){return bC(e,t),t.toastId}function td(e,t){return{...t,type:t&&t.type||e,toastId:MT(t)}}function nd(e){return(t,n)=>Sl(t,td(e,n))}function qe(e,t){return Sl(e,td("default",t))}qe.loading=(e,t)=>Sl(e,td("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function OT(e,{pending:t,error:n,success:r},i){let a;t&&(a=Oa(t)?qe.loading(t,i):qe.loading(t.render,{...i,...t}));let o={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(u,c,p)=>{if(c==null){qe.dismiss(a);return}let g={type:u,...o,...i,data:p},d=Oa(c)?{render:c}:c;return a?qe.update(a,{...g,...d}):qe(d.render,{...g,...d}),p},l=Si(e)?e():e;return l.then(u=>s("success",r,u)).catch(u=>s("error",n,u)),l}qe.promise=OT;qe.success=nd("success");qe.info=nd("info");qe.error=nd("error");qe.warning=nd("warning");qe.warn=qe.warning;qe.dark=(e,t)=>Sl(e,td("default",{theme:"dark",...t}));function LT(e){$T(e)}qe.dismiss=LT;qe.clearWaitingQueue=kT;qe.isActive=mC;qe.update=(e,t={})=>{let n=BT(e,t);if(n){let{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:gC()};a.toastId!==e&&(a.staleId=e);let o=a.render||i;delete a.render,Sl(o,a)}};qe.done=e=>{qe.update(e,{progress:1})};qe.onChange=NT;qe.play=e=>vC(!0,e);qe.pause=e=>vC(!1,e);function VT(e){var t;let{subscribe:n,getSnapshot:r,setProps:i}=N.useRef(FT(e)).current;i(e);let a=(t=N.useSyncExternalStore(n,r,r))==null?void 0:t.slice();function o(s){if(!a)return[];let l=new Map;return e.newestOnTop&&a.reverse(),a.forEach(u=>{let{position:c}=u.props;l.has(c)||l.set(c,[]),l.get(c).push(u)}),Array.from(l,u=>s(u[0],u[1]))}return{getToastToRender:o,isToastActive:mC,count:a==null?void 0:a.length}}function HT(e){let[t,n]=N.useState(!1),[r,i]=N.useState(!1),a=N.useRef(null),o=N.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:u,onClick:c,closeOnClick:p}=e;PT({id:e.toastId,containerId:e.containerId,fn:n}),N.useEffect(()=>{if(e.pauseOnFocusLoss)return g(),()=>{d()}},[e.pauseOnFocusLoss]);function g(){document.hasFocus()||f(),window.addEventListener("focus",y),window.addEventListener("blur",f)}function d(){window.removeEventListener("focus",y),window.removeEventListener("blur",f)}function m(x){if(e.draggable===!0||e.draggable===x.pointerType){v();let h=a.current;o.canCloseOnClick=!0,o.canDrag=!0,h.style.transition="none",e.draggableDirection==="x"?(o.start=x.clientX,o.removalDistance=h.offsetWidth*(e.draggablePercent/100)):(o.start=x.clientY,o.removalDistance=h.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function b(x){let{top:h,bottom:w,left:D,right:I}=a.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=D&&x.clientX<=I&&x.clientY>=h&&x.clientY<=w?f():y()}function y(){n(!0)}function f(){n(!1)}function v(){o.didMove=!1,document.addEventListener("pointermove",S),document.addEventListener("pointerup",_)}function C(){document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",_)}function S(x){let h=a.current;if(o.canDrag&&h){o.didMove=!0,t&&f(),e.draggableDirection==="x"?o.delta=x.clientX-o.start:o.delta=x.clientY-o.start,o.start!==x.clientX&&(o.canCloseOnClick=!1);let w=e.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`;h.style.transform=`translate3d(${w},0)`,h.style.opacity=`${1-Math.abs(o.delta/o.removalDistance)}`}}function _(){C();let x=a.current;if(o.canDrag&&o.didMove&&x){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance){i(!0),e.closeToast(!0),e.collapseAll();return}x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}let E={onPointerDown:m,onPointerUp:b};return s&&l&&(E.onMouseEnter=f,e.stacked||(E.onMouseLeave=y)),p&&(E.onClick=x=>{c&&c(x),o.canCloseOnClick&&u(!0)}),{playToast:y,pauseToast:f,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:E}}var jT=typeof window<"u"?N.useLayoutEffect:N.useEffect,rd=({theme:e,type:t,isLoading:n,...r})=>N.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r});function zT(e){return N.createElement(rd,{...e},N.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function GT(e){return N.createElement(rd,{...e},N.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function WT(e){return N.createElement(rd,{...e},N.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function UT(e){return N.createElement(rd,{...e},N.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function XT(){return N.createElement("div",{className:"Toastify__spinner"})}var s0={info:GT,warning:zT,success:WT,error:UT,spinner:XT},YT=e=>e in s0;function KT({theme:e,type:t,isLoading:n,icon:r}){let i=null,a={theme:e,type:t};return r===!1||(Si(r)?i=r({...a,isLoading:n}):N.isValidElement(r)?i=N.cloneElement(r,a):n?i=s0.spinner():YT(t)&&(i=s0[t](a))),i}var ZT=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:a}=HT(e),{closeButton:o,children:s,autoClose:l,onClick:u,type:c,hideProgressBar:p,closeToast:g,transition:d,position:m,className:b,style:y,progressClassName:f,updateId:v,role:C,progress:S,rtl:_,toastId:E,deleteToast:x,isIn:h,isLoading:w,closeOnClick:D,theme:I,ariaLabel:T}=e,F=qi("Toastify__toast",`Toastify__toast-theme--${I}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":_},{"Toastify__toast--close-on-click":D}),P=Si(b)?b({rtl:_,position:m,type:c,defaultClassName:F}):qi(F,b),k=KT(e),R=!!S||!l,M={closeToast:g,type:c,theme:I},O=null;return o===!1||(Si(o)?O=o(M):N.isValidElement(o)?O=N.cloneElement(o,M):O=_T(M)),N.createElement(d,{isIn:h,done:x,position:m,preventExitTransition:n,nodeRef:r,playToast:a},N.createElement("div",{id:E,tabIndex:0,onClick:u,"data-in":h,className:P,...i,style:y,ref:r,...h&&{role:C,"aria-label":T}},k!=null&&N.createElement("div",{className:qi("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!w})},k),hC(s,e,!t),O,!e.customProgressBar&&N.createElement(IT,{...v&&!R?{key:`p-${v}`}:{},rtl:_,theme:I,delay:l,isRunning:t,isIn:h,closeToast:g,hide:p,type:c,className:f,controlledProgress:R,progress:S||0})))},qT=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),JT=wT(qT("bounce",!0)),QT={position:"top-right",transition:JT,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function e6(e){let t={...QT,...e},n=e.stacked,[r,i]=N.useState(!0),a=N.useRef(null),{getToastToRender:o,isToastActive:s,count:l}=VT(t),{className:u,style:c,rtl:p,containerId:g,hotKeys:d}=t;function m(y){let f=qi("Toastify__toast-container",`Toastify__toast-container--${y}`,{"Toastify__toast-container--rtl":p});return Si(u)?u({position:y,rtl:p,defaultClassName:f}):qi(f,i0(u))}function b(){n&&(i(!0),qe.play())}return jT(()=>{var y;if(n){let f=a.current.querySelectorAll('[data-in="true"]'),v=12,C=(y=t.position)==null?void 0:y.includes("top"),S=0,_=0;Array.from(f).reverse().forEach((E,x)=>{let h=E;h.classList.add("Toastify__toast--stacked"),x>0&&(h.dataset.collapsed=`${r}`),h.dataset.pos||(h.dataset.pos=C?"top":"bot");let w=S*(r?.2:1)+(r?0:v*x);h.style.setProperty("--y",`${C?w:w*-1}px`),h.style.setProperty("--g",`${v}`),h.style.setProperty("--s",`${1-(r?_:0)}`),S+=h.offsetHeight,_+=.025})}},[r,l,n]),N.useEffect(()=>{function y(f){var v;let C=a.current;d(f)&&((v=C.querySelector('[tabIndex="0"]'))==null||v.focus(),i(!1),qe.pause()),f.key==="Escape"&&(document.activeElement===C||C!=null&&C.contains(document.activeElement))&&(i(!0),qe.play())}return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[d]),N.createElement("section",{ref:a,className:"Toastify",id:g,onMouseEnter:()=>{n&&(i(!1),qe.pause())},onMouseLeave:b,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},o((y,f)=>{let v=f.length?{...c}:{...c,pointerEvents:"none"};return N.createElement("div",{tabIndex:-1,className:m(y),"data-stacked":n,style:v,key:`c-${y}`},f.map(({content:C,props:S})=>N.createElement(ZT,{...S,stacked:n,collapseAll:b,isIn:s(S.toastId,S.containerId),key:`t-${S.key}`},C)))}))}const Jn={"alert-info-filled":"_alert-info-filled_1snwl_1","alert-warning-filled":"_alert-warning-filled_1snwl_1","alert-error-filled":"_alert-error-filled_1snwl_1","alert-success-filled":"_alert-success-filled_1snwl_1","alert-info-outlined":"_alert-info-outlined_1snwl_1","alert-warning-outlined":"_alert-warning-outlined_1snwl_1","alert-error-outlined":"_alert-error-outlined_1snwl_1","alert-success-outlined":"_alert-success-outlined_1snwl_1","text-header":"_text-header_1snwl_83"},t6=(e,t,n)=>{const r=(n==null?void 0:n.variant)??"outline",i={position:"top-center",autoClose:2e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0},a={icon:{solid:{success:B.jsx(r6,{}),warning:B.jsx(l6,{}),error:B.jsx(o6,{}),info:B.jsx(a6,{})},outline:{success:B.jsx(n6,{}),warning:B.jsx(s6,{}),error:B.jsx(i6,{}),info:B.jsx(u6,{})}},variant:{solid:{success:Jn["alert-success-filled"],error:Jn["alert-error-filled"],warning:Jn["alert-warning-filled"],info:Jn["alert-info-filled"]},outline:{success:Jn["alert-success-outlined"],error:Jn["alert-error-outlined"],warning:Jn["alert-warning-outlined"],info:Jn["alert-info-outlined"]}}};return t==="error"?qe.error(B.jsxs("div",{children:[["solid"].includes(r)&&B.jsx("p",{className:Jn["text-header"],children:"Error"}),e]}),{icon:a.icon[r].error,className:a.variant[r].error,...i,...n}):t==="info"?qe.info(B.jsxs("div",{children:[["solid"].includes(r)&&B.jsx("p",{className:Jn["text-header"],children:"Info"}),e]}),{icon:a.icon[r].info,className:a.variant[r].info,...i,...n}):t==="warning"?qe.warning(B.jsxs("div",{children:[["solid"].includes(r)&&B.jsx("p",{className:Jn["text-header"],children:"Warning"}),e]}),{icon:a.icon[r].warning,className:a.variant[r].warning,...i,...n}):qe(B.jsxs("div",{children:[["solid"].includes(r)&&B.jsx("p",{className:Jn["text-header"],children:"Success"}),e]}),{icon:a.icon[r].success,className:a.variant[r].success,...i,...n})},n6=()=>B.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:B.jsx("g",{id:"check-circle",children:B.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M10 18.5C12.1217 18.5 14.1566 17.6571 15.6569 16.1569C17.1571 14.6566 18 12.6217 18 10.5C18 8.37827 17.1571 6.34344 15.6569 4.84315C14.1566 3.34285 12.1217 2.5 10 2.5C7.87827 2.5 5.84344 3.34285 4.34315 4.84315C2.84285 6.34344 2 8.37827 2 10.5C2 12.6217 2.84285 14.6566 4.34315 16.1569C5.84344 17.6571 7.87827 18.5 10 18.5ZM13.707 9.207C13.8892 9.0184 13.99 8.7658 13.9877 8.5036C13.9854 8.2414 13.8802 7.99059 13.6948 7.80518C13.5094 7.61977 13.2586 7.5146 12.9964 7.51233C12.7342 7.51005 12.4816 7.61084 12.293 7.793L9 11.086L7.707 9.793C7.5184 9.61084 7.2658 9.51005 7.0036 9.51233C6.7414 9.5146 6.49059 9.61977 6.30518 9.80518C6.11977 9.99059 6.0146 10.2414 6.01233 10.5036C6.01005 10.7658 6.11084 11.0184 6.293 11.207L8.293 13.207C8.48053 13.3945 8.73484 13.4998 9 13.4998C9.26516 13.4998 9.51947 13.3945 9.707 13.207L13.707 9.207Z",fill:"#388E3C"})})}),r6=()=>B.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:B.jsxs("g",{id:"circle",children:[B.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),B.jsx("path",{id:"Vector_2",d:"M9 12L11 14L15 10",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),i6=()=>B.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:B.jsx("g",{id:"exclamation-circle",children:B.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 14.5C11 14.7652 10.8946 15.0196 10.7071 15.2071C10.5196 15.3946 10.2652 15.5 10 15.5C9.73478 15.5 9.48043 15.3946 9.29289 15.2071C9.10536 15.0196 9 14.7652 9 14.5C9 14.2348 9.10536 13.9804 9.29289 13.7929C9.48043 13.6054 9.73478 13.5 10 13.5C10.2652 13.5 10.5196 13.6054 10.7071 13.7929C10.8946 13.9804 11 14.2348 11 14.5ZM10 5.5C9.73478 5.5 9.48043 5.60536 9.29289 5.79289C9.10536 5.98043 9 6.23478 9 6.5V10.5C9 10.7652 9.10536 11.0196 9.29289 11.2071C9.48043 11.3946 9.73478 11.5 10 11.5C10.2652 11.5 10.5196 11.3946 10.7071 11.2071C10.8946 11.0196 11 10.7652 11 10.5V6.5C11 6.23478 10.8946 5.98043 10.7071 5.79289C10.5196 5.60536 10.2652 5.5 10 5.5Z",fill:"#F44336"})})}),a6=()=>B.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:B.jsxs("g",{id:"alert",children:[B.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),B.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),B.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),o6=()=>B.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:B.jsxs("g",{id:"alert",children:[B.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),B.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),B.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),s6=()=>B.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:B.jsx("g",{id:"exclamation",children:B.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M8.25697 3.59898C9.02197 2.23898 10.979 2.23898 11.743 3.59898L17.323 13.519C18.073 14.853 17.11 16.499 15.581 16.499H4.41997C2.88997 16.499 1.92697 14.853 2.67697 13.519L8.25697 3.59898ZM11 13.5C11 13.7652 10.8946 14.0196 10.7071 14.2071C10.5195 14.3946 10.2652 14.5 9.99997 14.5C9.73475 14.5 9.4804 14.3946 9.29286 14.2071C9.10533 14.0196 8.99997 13.7652 8.99997 13.5C8.99997 13.2348 9.10533 12.9804 9.29286 12.7929C9.4804 12.6053 9.73475 12.5 9.99997 12.5C10.2652 12.5 10.5195 12.6053 10.7071 12.7929C10.8946 12.9804 11 13.2348 11 13.5ZM9.99997 5.49998C9.73475 5.49998 9.4804 5.60534 9.29286 5.79287C9.10533 5.98041 8.99997 6.23476 8.99997 6.49998V9.49998C8.99997 9.7652 9.10533 10.0195 9.29286 10.2071C9.4804 10.3946 9.73475 10.5 9.99997 10.5C10.2652 10.5 10.5195 10.3946 10.7071 10.2071C10.8946 10.0195 11 9.7652 11 9.49998V6.49998C11 6.23476 10.8946 5.98041 10.7071 5.79287C10.5195 5.60534 10.2652 5.49998 9.99997 5.49998Z",fill:"#F9A825"})})}),l6=()=>B.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:B.jsxs("g",{id:"alert",children:[B.jsx("path",{id:"Vector",d:"M12 15V15.01M12 9V11V9Z",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),B.jsx("path",{id:"Vector_2",d:"M5 19H19C19.3263 18.9977 19.6471 18.9156 19.9344 18.7609C20.2217 18.6061 20.4667 18.3835 20.6482 18.1123C20.8297 17.841 20.942 17.5296 20.9754 17.205C21.0089 16.8804 20.9624 16.5525 20.84 16.25L13.74 4.00002C13.567 3.68741 13.3135 3.42685 13.0058 3.2454C12.698 3.06396 12.3473 2.96826 11.99 2.96826C11.6327 2.96826 11.282 3.06396 10.9742 3.2454C10.6665 3.42685 10.413 3.68741 10.24 4.00002L3.14 16.25C3.01994 16.5456 2.97233 16.8656 3.00115 17.1833C3.02997 17.501 3.13437 17.8073 3.30565 18.0764C3.47693 18.3456 3.71011 18.5698 3.98573 18.7305C4.26134 18.8912 4.57139 18.9836 4.89 19",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),u6=()=>B.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:B.jsx("g",{id:"information-circle",children:B.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 6.5C11 6.76522 10.8946 7.01957 10.7071 7.20711C10.5196 7.39464 10.2652 7.5 10 7.5C9.73478 7.5 9.48043 7.39464 9.29289 7.20711C9.10536 7.01957 9 6.76522 9 6.5C9 6.23478 9.10536 5.98043 9.29289 5.79289C9.48043 5.60536 9.73478 5.5 10 5.5C10.2652 5.5 10.5196 5.60536 10.7071 5.79289C10.8946 5.98043 11 6.23478 11 6.5ZM9 9.5C8.73478 9.5 8.48043 9.60536 8.29289 9.79289C8.10536 9.98043 8 10.2348 8 10.5C8 10.7652 8.10536 11.0196 8.29289 11.2071C8.48043 11.3946 8.73478 11.5 9 11.5V14.5C9 14.7652 9.10536 15.0196 9.29289 15.2071C9.48043 15.3946 9.73478 15.5 10 15.5H11C11.2652 15.5 11.5196 15.3946 11.7071 15.2071C11.8946 15.0196 12 14.7652 12 14.5C12 14.2348 11.8946 13.9804 11.7071 13.7929C11.5196 13.6054 11.2652 13.5 11 13.5V10.5C11 10.2348 10.8946 9.98043 10.7071 9.79289C10.5196 9.60536 10.2652 9.5 10 9.5H9Z",fill:"#0288D1"})})}),wl=e=>typeof e=="string"||typeof e=="number"||typeof e=="bigint"?Cl(e):"";function c6(e,t){return{name:"minBig",message:t||`Value must be greater than or equal to ${e}`,test(n){return n=wl(n),Zr(n)?bt(n).gte(bt(e))?!0:this.createError({message:t||`Value must be greater than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function d6(e,t){return{name:"maxBig",message:t||`Value must be less than or equal to ${e}`,test(n){return n=wl(n),Zr(n)?bt(n).lte(bt(e))?!0:this.createError({message:t||`Value must be less than or equal to ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function f6(e,t){return{name:"moreThanBig",message:t||`Value must be greater than ${e}`,test(n){return n=wl(n),Zr(n)?bt(n).gt(bt(e))?!0:this.createError({message:t||`Value must be greater than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function h6(e,t){return{name:"lessThanBig",message:t||`Value must be less than ${e}`,test(n){return n=wl(n),Zr(n)?bt(n).lt(bt(e))?!0:this.createError({message:t||`Value must be less than ${e}`}):this.createError({message:t||"Invalid BigNumber value"})}}}function g6(e,t,n){return{name:"betweenBig",message:n||`Value must be between ${e} and ${t}`,test(r){if(r=wl(r),!Zr(r))return this.createError({message:n||"Invalid BigNumber value"});const i=bt(r),a=bt(e),o=bt(t);return i.lt(a)||i.gt(o)?this.createError({message:n||`Value must be between ${e} and ${t}`}):!0}}}function ac(e){return p6.test(e)}const p6=/^-?[0-9]+$/;function m6(e){return b6.test(e)}const b6=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function yC(e,t){if(ac(e))return Number.isSafeInteger(Number.parseInt(e,10));const n=Number.parseFloat(e),r=String(n);if(e===r)return!0;const i=b1(e),a=b1(r);return!!(i===a||(t==null?void 0:t.approx)===!0&&!ac(e)&&a.length>=14&&i.startsWith(a.substring(0,14)))}let vs=function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e}({});function v6(e){if(yC(e,{approx:!1}))return;if(ac(e))return vs.truncate_integer;const t=Number.parseFloat(e);return Number.isFinite(t)?t===0?vs.underflow:vs.truncate_float:vs.overflow}function b1(e){const{start:t,end:n}=y6(e),r=e.substring(t,n),i=r.indexOf(".");return i===-1?r:r.substring(0,i)+r.substring(i+1)}function y6(e){let t=0;for(e[0]==="-"&&t++;e[t]==="0"||e[t]===".";)t++;let n=e.lastIndexOf("e");for(n===-1&&(n=e.lastIndexOf("E")),n===-1&&(n=e.length);(e[n-1]==="0"||e[n-1]===".")&&n>t;)n--;return{start:t,end:n}}class x6{constructor(t){Ce(this,"isLosslessNumber",!0);if(!m6(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=v6(this.value);if(t===void 0||t===vs.truncate_float)return Number.parseFloat(this.value);if(ac(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function C6(e){return e&&typeof e=="object"&&e.isLosslessNumber||!1}function E6(e){return new x6(e)}function S6(e,t){return Dg({"":e},"",e,t)}function Dg(e,t,n,r){return Array.isArray(n)?r.call(e,t,_6(n,r)):n&&typeof n=="object"&&!C6(n)?r.call(e,t,w6(n,r)):r.call(e,t,n)}function w6(e,t){for(const n of Object.keys(e)){const r=Dg(e,n,e[n],t);r!==void 0?e[n]=r:delete e[n]}return e}function _6(e,t){for(let n=0;n<e.length;n++)e[n]=Dg(e,String(n),e[n],t);return e}function I6(e,t,n){const r=typeof n=="function"?{parseNumber:n}:n,i=(r==null?void 0:r.parseNumber)??E6,a=(r==null?void 0:r.onDuplicateKey)??x;let o=0;const s=c();return f(s),C(),t?S6(s,t):s;function l(){if(e.charCodeAt(o)===$6){o++,g();const M={};let O=!0;for(;o<e.length&&e.charCodeAt(o)!==y1;){O?O=!1:(b(),g());const z=o,G=d();if(G===void 0){E();return}g(),y();const U=c();if(U===void 0){T();return}if(Object.prototype.hasOwnProperty.call(M,G)&&!l0(U,M[G])){const J=a({key:G,position:z+1,oldValue:M[G],newValue:U});J!==void 0&&(M[G]=J)}else M[G]=U}return e.charCodeAt(o)!==y1&&h(),o++,M}}function u(){if(e.charCodeAt(o)===k6){o++,g();const M=[];let O=!0;for(;o<e.length&&e.charCodeAt(o)!==x1;){O?O=!1:b();const z=c();v(z),M.push(z)}return e.charCodeAt(o)!==x1&&w(),o++,M}}function c(){g();const M=d()??m()??l()??u()??p("true",!0)??p("false",!1)??p("null",null);return g(),M}function p(M,O){if(e.slice(o,o+M.length)===M)return o+=M.length,O}function g(){for(;D6(e.charCodeAt(o));)o++}function d(){if(e.charCodeAt(o)===Bf){o++;let M="";for(;o<e.length&&e.charCodeAt(o)!==Bf;){if(e.charCodeAt(o)===B6){const O=e[o+1],z=R6[O];z!==void 0?(M+=z,o++):O==="u"?Kl(e.charCodeAt(o+2))&&Kl(e.charCodeAt(o+3))&&Kl(e.charCodeAt(o+4))&&Kl(e.charCodeAt(o+5))?(M+=String.fromCharCode(Number.parseInt(e.slice(o+2,o+6),16)),o+=5):F(o):I(o)}else A6(e.charCodeAt(o))?M+=e[o]:D(e[o]);o++}return _(),o++,M}}function m(){const M=o;if(e.charCodeAt(o)===C1&&(o++,S(M)),e.charCodeAt(o)===Tg)o++;else if(T6(e.charCodeAt(o)))for(o++;Zl(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===H6)for(o++,S(M);Zl(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===U6||e.charCodeAt(o)===W6)for(o++,(e.charCodeAt(o)===C1||e.charCodeAt(o)===O6)&&o++,S(M);Zl(e.charCodeAt(o));)o++;if(o>M)return i(e.slice(M,o))}function b(){if(e.charCodeAt(o)!==V6)throw new SyntaxError(`Comma ',' expected after value ${R()}`);o++}function y(){if(e.charCodeAt(o)!==j6)throw new SyntaxError(`Colon ':' expected after property name ${R()}`);o++}function f(M){if(M===void 0)throw new SyntaxError(`JSON value expected ${R()}`)}function v(M){if(M===void 0)throw new SyntaxError(`Array item expected ${R()}`)}function C(){if(o<e.length)throw new SyntaxError(`Expected end of input ${R()}`)}function S(M){if(!Zl(e.charCodeAt(o))){const O=e.slice(M,o);throw new SyntaxError(`Invalid number '${O}', expecting a digit ${R()}`)}}function _(){if(e.charCodeAt(o)!==Bf)throw new SyntaxError(`End of string '"' expected ${R()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${R()}`)}function x(M){let{key:O,position:z}=M;throw new SyntaxError(`Duplicate key '${O}' encountered at position ${z}`)}function h(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${R()}`)}function w(){throw new SyntaxError(`Array item or end of array ']' expected ${R()}`)}function D(M){throw new SyntaxError(`Invalid character '${M}' ${P()}`)}function I(M){const O=e.slice(M,M+2);throw new SyntaxError(`Invalid escape character '${O}' ${P()}`)}function T(){throw new SyntaxError(`Object value expected after ':' ${P()}`)}function F(M){const O=e.slice(M,M+6);throw new SyntaxError(`Invalid unicode character '${O}' ${P()}`)}function P(){return`at position ${o}`}function k(){return o<e.length?`but got '${e[o]}'`:"but reached end of input"}function R(){return`${k()} ${P()}`}}function D6(e){return e===P6||e===F6||e===N6||e===M6}function Kl(e){return e>=Tg&&e<=Ag||e>=z6&&e<=X6||e>=G6&&e<=Y6}function Zl(e){return e>=Tg&&e<=Ag}function T6(e){return e>=L6&&e<=Ag}function A6(e){return e>=32&&e<=1114111}function l0(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>l0(n,t[r])):v1(e)&&v1(t)?[...new Set([...Object.keys(e),...Object.keys(t)])].every(r=>l0(e[r],t[r])):!1}function v1(e){return typeof e=="object"&&e!==null}const R6={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
24
|
-
`,r:"\r",t:" "},B6=92,$6=123,y1=125,k6=91,x1=93,P6=32,F6=10,N6=9,M6=13,Bf=34,O6=43,C1=45,Tg=48,L6=49,Ag=57,V6=44,H6=46,j6=58,z6=65,G6=97,W6=69,U6=101,X6=70,Y6=102;function u0(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(u0);const t={};for(const[n,r]of Object.entries(e))typeof r=="number"||typeof r=="string"?typeof r=="number"&&!Number.isSafeInteger(r)||typeof r=="string"&&/^-?\d+(?:\.\d+)?$/.test(r)?t[n]=bt(r).toString():t[n]=r:typeof r=="object"?t[n]=u0(r):t[n]=r;return t}return e}function c0(e){if(typeof e=="object"&&e!==null){if(Array.isArray(e))return e.map(c0);if(e instanceof bt)return e.toString();const t={};for(const[n,r]of Object.entries(e))t[n]=c0(r);return t}return e}const K6=e=>I6(e,null,n=>typeof n=="number"&&!Number.isSafeInteger(n)||typeof n=="string"&&/^-?\d+(?:\.\d+)?$/.test(n)?yC(n)?parseFloat(n):bt(n).toString():n),xC={transparent:"transparent",black:"#212121",white:"#FFFFFF","primary-50":"#E3F2FD","primary-100":"#BBDEFB","primary-200":"#90CAF9","primary-300":"#64B5F6","primary-400":"#42A5F5","primary-500":"#2196F3","primary-600":"#1E88E5","primary-700":"#1976D2","primary-800":"#1565C0","primary-900":"#0D47A1","blue-gray-50":"#ECEFF1","blue-gray-100":"#CFD8DC","blue-gray-200":"#B0BEC5","blue-gray-300":"#90A4AE","blue-gray-400":"#78909C","blue-gray-500":"#607D8B","blue-gray-600":"#546E7A","blue-gray-700":"#455A64","blue-gray-800":"#37474F","blue-gray-900":"#263238","gray-50":"#FAFAFA","gray-100":"#F5F5F5","gray-200":"#EEEEEE","gray-300":"#E0E0E0","gray-400":"#BDBDBD","gray-500":"#9E9E9E","gray-600":"#757575","gray-700":"#616161","gray-800":"#424242","gray-900":"#212121","brown-50":"#EFEBE9","brown-100":"#D7CCC8","brown-200":"#BCAAA4","brown-300":"#A1887F","brown-400":"#8D6E63","brown-500":"#795548","brown-600":"#6D4C41","brown-700":"#5D4037","brown-800":"#4E342E","brown-900":"#3E2723","deep-orange-50":"#FBE9E7","deep-orange-100":"#FFCCBC","deep-orange-200":"#FFAB91","deep-orange-300":"#FF8A65","deep-orange-400":"#FF7043","deep-orange-500":"#FF5722","deep-orange-600":"#F4511E","deep-orange-700":"#E64A19","deep-orange-800":"#D84315","deep-orange-900":"#BF360C","orange-50":"#FFF3E0","orange-100":"#FFE0B2","orange-200":"#FFCC80","orange-300":"#FFB74D","orange-400":"#FFA726","orange-500":"#FF9800","orange-600":"#FB8C00","orange-700":"#F57C00","orange-800":"#EF6C00","orange-900":"#E65100","amber-50":"#FFF8E1","amber-100":"#FFECB3","amber-200":"#FFE082","amber-300":"#FFD54F","amber-400":"#FFCA28","amber-500":"#FFC107","amber-600":"#FFB300","amber-700":"#FFA000","amber-800":"#FF8F00","amber-900":"#FF6F00","yellow-50":"#FFFDE7","yellow-100":"#FFF9C4","yellow-200":"#FFF59D","yellow-300":"#FFF176","yellow-400":"#FFEE58","yellow-500":"#FFEB3B","yellow-600":"#FDD835","yellow-700":"#FBC02D","yellow-800":"#F9A825","yellow-900":"#F57F17","lime-50":"#F9FBE7","lime-100":"#F0F4C3","lime-200":"#E6EE9C","lime-300":"#DCE775","lime-400":"#D4E157","lime-500":"#CDDC39","lime-600":"#C0CA33","lime-700":"#AFB42B","lime-800":"#9E9D24","lime-900":"#827717","light-green-50":"#F1F8E9","light-green-100":"#DCEDC8","light-green-200":"#C5E1A5","light-green-300":"#AED581","light-green-400":"#9CCC65","light-green-500":"#8BC34A","light-green-600":"#7CB342","light-green-700":"#689F38","light-green-800":"#558B2F","light-green-900":"#33691E","green-50":"#E8F5E9","green-100":"#C8E6C9","green-200":"#A5D6A7","green-300":"#81C784","green-400":"#66BB6A","green-500":"#4CAF50","green-600":"#43A047","green-700":"#388E3C","green-800":"#2E7D32","green-900":"#1B5E20","teal-50":"#E0F2F1","teal-100":"#B2DFDB","teal-200":"#80CBC4","teal-300":"#4DB6AC","teal-400":"#26A69A","teal-500":"#009688","teal-600":"#00897B","teal-700":"#00796B","teal-800":"#00695C","teal-900":"#004D40","cyan-50":"#E0F7FA","cyan-100":"#B2EBF2","cyan-200":"#80DEEA","cyan-300":"#4DD0E1","cyan-400":"#26C6DA","cyan-500":"#00BCD4","cyan-600":"#00ACC1","cyan-700":"#0097A7","cyan-800":"#00838F","cyan-900":"#006064","light-blue-50":"#E1F5FE","light-blue-100":"#B3E5FC","light-blue-200":"#81D4FA","light-blue-300":"#4FC3F7","light-blue-400":"#29B6F6","light-blue-500":"#03A9F4","light-blue-600":"#039BE5","light-blue-700":"#0288D1","light-blue-800":"#0277BD","light-blue-900":"#01579B","blue-50":"#E3F2FD","blue-100":"#BBDEFB","blue-200":"#90CAF9","blue-300":"#64B5F6","blue-400":"#42A5F5","blue-500":"#2196F3","blue-600":"#1E88E5","blue-700":"#1976D2","blue-800":"#1565C0","blue-900":"#0D47A1","indigo-50":"#E8EAF6","indigo-100":"#C5CAE9","indigo-200":"#9FA8DA","indigo-300":"#7986CB","indigo-400":"#5C6BC0","indigo-500":"#3F51B5","indigo-600":"#3949AB","indigo-700":"#303F9F","indigo-800":"#283593","indigo-900":"#1A237E","deep-purple-50":"#EDE7F6","deep-purple-100":"#D1C4E9","deep-purple-200":"#B39DDB","deep-purple-300":"#9575CD","deep-purple-400":"#7E57C2","deep-purple-500":"#673AB7","deep-purple-600":"#5E35B1","deep-purple-700":"#512DA8","deep-purple-800":"#4527A0","deep-purple-900":"#311B92","purple-50":"#F3E5F5","purple-100":"#E1BEE7","purple-200":"#CE93D8","purple-300":"#BA68C8","purple-400":"#AB47BC","purple-500":"#9C27B0","purple-600":"#8E24AA","purple-700":"#7B1FA2","purple-800":"#6A1B9A","purple-900":"#4A148C","pink-50":"#FCE4EC","pink-100":"#F8BBD0","pink-200":"#F48FB1","pink-300":"#F06292","pink-400":"#EC407A","pink-500":"#E91E63","pink-600":"#D81B60","pink-700":"#C2185B","pink-800":"#AD1457","pink-900":"#880E4F","red-50":"#FFEBEE","red-100":"#FFCDD2","red-200":"#EF9A9A","red-300":"#E57373","red-400":"#EF5350","red-500":"#F44336","red-600":"#E53935","red-700":"#D32F2F","red-800":"#C62828","red-900":"#B71C1C","payhere-brand-base":"#102A4D","payhere-brand-10":"#CFD4DB","payhere-brand-20":"#AFB8C4","payhere-brand-30":"#8794A6","payhere-brand-40":"#607188","payhere-brand-50":"#384E6B","payhere-brand-60":"#0D2340","laba-black":"#212529","laba-white":"#FFFFFF","laba-blue-10":"#0163C8","laba-blue-08":"#006DFF","laba-blue-06":"#2899FF","laba-blue-05":"#73A4D6","laba-blue-02":"#DBECFF","laba-blue-01":"#F0F7FF","laba-green-10":"#038C67","laba-green-08":"#04BA27","laba-green-06":"#78D798","laba-green-05":"#ABF3CC","laba-green-02":"#CAEEE5","laba-green-01":"#DFF6F6","laba-grey-10":"#898989","laba-grey-08":"#AEAEAE","laba-grey-06":"#D6D6D6","laba-grey-05":"#EEEEEE","laba-grey-02":"#F2F2F2","laba-grey-01":"#FDFDFD","laba-orange-10":"#C05000","laba-orange-08":"#FF7200","laba-orange-06":"#FF9300","laba-orange-05":"#FFBD78","laba-orange-02":"#FFDDBB","laba-orange-01":"#FFF5EB","laba-red-10":"#9E101F","laba-red-08":"#ED0019","laba-red-06":"#FB004E","laba-red-05":"#FF5378","laba-red-02":"#FFAEBF","laba-red-01":"#FFEBEF","lpd-primary-50":"#CEDBFE","lpd-primary-100":"#B6CAFE","lpd-primary-200":"#9DB8FE","lpd-primary-300":"#6C94FD","lpd-primary-400":"#3B71FD","lpd-primary-500":"#0A4DFC","lpd-primary-600":"#083ECA","lpd-primary-700":"#062E97","lpd-primary-800":"#041F65","lpd-primary-900":"#03174C","lpd-secondary-50":"#FEF5CE","lpd-secondary-100":"#FEEFB5","lpd-secondary-200":"#FDEA9D","lpd-secondary-300":"#FDE06B","lpd-secondary-400":"#FCD53A","lpd-secondary-500":"#FBCB09","lpd-secondary-600":"#C9A207","lpd-secondary-700":"#977A05","lpd-secondary-800":"#645104","lpd-secondary-900":"#4B3D03","bill-primary-50":"#EAF0FE","bill-primary-100":"#D5E1FD","bill-primary-200":"#ABC3FB","bill-primary-300":"#81A4F9","bill-primary-400":"#5786F7","bill-primary-500":"#2D68F5","bill-primary-600":"#2453C4","bill-primary-700":"#1B3E93","bill-primary-800":"#122A62","bill-primary-900":"#091531","bill-secondary-50":"#F0FEFD","bill-secondary-100":"#E2FCFA","bill-secondary-200":"#C5F9F5","bill-secondary-300":"#A8F7F1","bill-secondary-400":"#8BF4EC","bill-secondary-500":"#6EF1E7","bill-secondary-600":"#59CBC2","bill-secondary-700":"#44A59D","bill-secondary-800":"#2F7E79","bill-secondary-900":"#1A5854"},CC={"payhere-h1":["60px",{lineHeight:"72px",fontWeight:700}],"payhere-h2":["48px",{lineHeight:"58px",fontWeight:700}],"payhere-h3":["40px",{lineHeight:"48px",fontWeight:700}],"payhere-h4":["30px",{lineHeight:"38px",fontWeight:700}],"payhere-h5":["28px",{lineHeight:"40px",fontWeight:600}],"payhere-h6":["24px",{lineHeight:"30px",fontWeight:600}],"payhere-body-lr":["18px",{lineHeight:"26px",fontWeight:400}],"payhere-body-lm":["18px",{lineHeight:"26px",fontWeight:500}],"payhere-body-ls":["18px",{lineHeight:"26px",fontWeight:600}],"payhere-body-lb":["18px",{lineHeight:"26px",fontWeight:700}],"payhere-body-mr":["16px",{lineHeight:"24px",fontWeight:400}],"payhere-body-mm":["16px",{lineHeight:"24px",fontWeight:500}],"payhere-body-ms":["16px",{lineHeight:"24px",fontWeight:600}],"payhere-body-mb":["16px",{lineHeight:"24px",fontWeight:700}],"payhere-label-r":["15px",{lineHeight:"26px",fontWeight:400}],"payhere-label-m":["15px",{lineHeight:"26px",fontWeight:500}],"payhere-label-sb":["15px",{lineHeight:"26px",fontWeight:600}],"payhere-label-b":["15px",{lineHeight:"26px",fontWeight:700}],"payhere-body-sr":["14px",{lineHeight:"22px",fontWeight:400}],"payhere-body-sm":["14px",{lineHeight:"22px",fontWeight:500}],"payhere-body-smb":["14px",{lineHeight:"22px",fontWeight:600}],"payhere-body-sb":["14px",{lineHeight:"22px",fontWeight:700}],"payhere-body-esr":["12px",{lineHeight:"20px",fontWeight:400}],"payhere-body-esm":["12px",{lineHeight:"20px",fontWeight:500}],"payhere-body-esmb":["12px",{lineHeight:"20px",fontWeight:600}],"payhere-body-esb":["12px",{lineHeight:"20px",fontWeight:700}]},EC={"laba-title-lb":["36px",{lineHeight:"44px",fontWeight:700}],"laba-title-ls":["36px",{lineHeight:"44px",fontWeight:600}],"laba-title-lr":["36px",{lineHeight:"44px",fontWeight:400}],"laba-title-mb":["32px",{lineHeight:"40px",fontWeight:700}],"laba-title-ms":["32px",{lineHeight:"40px",fontWeight:600}],"laba-title-mr":["32px",{lineHeight:"40px",fontWeight:400}],"laba-h1":["24px",{lineHeight:"30px",fontWeight:700}],"laba-h1-b":["24px",{lineHeight:"30px",fontWeight:700}],"laba-h1-sb":["24px",{lineHeight:"30px",fontWeight:600}],"laba-h1-r":["24px",{lineHeight:"30px",fontWeight:400}],"laba-h2":["18px",{lineHeight:"26px",fontWeight:700}],"laba-h2-b":["18px",{lineHeight:"26px",fontWeight:700}],"laba-h2-sb":["18px",{lineHeight:"26px",fontWeight:600}],"laba-h2-r":["18px",{lineHeight:"26px",fontWeight:400}],"laba-base-rb":["16px",{lineHeight:"24px",fontWeight:700}],"laba-base-rs":["16px",{lineHeight:"24px",fontWeight:600}],"laba-base-rr":["16px",{lineHeight:"24px",fontWeight:400}],"laba-base-sb":["14px",{lineHeight:"20px",fontWeight:700}],"laba-base-ss":["14px",{lineHeight:"20px",fontWeight:600}],"laba-base-sr":["14px",{lineHeight:"20px",fontWeight:400}],"laba-subtitle-rb":["12px",{lineHeight:"16px",fontWeight:700}],"laba-subtitle-rs":["12px",{lineHeight:"16px",fontWeight:600}],"laba-subtitle-rr":["12px",{lineHeight:"16px",fontWeight:400}],"laba-subtitle-sb":["10px",{lineHeight:"12px",fontWeight:700}],"laba-subtitle-ss":["10px",{lineHeight:"12px",fontWeight:600}],"laba-subtitle-sr":["10px",{lineHeight:"12px",fontWeight:400}]},Z6={"bill-h1":["60px",{lineHeight:"72px",fontWeight:700}],"bill-h2":["48px",{lineHeight:"58px",fontWeight:700}],"bill-h3":["40px",{lineHeight:"58px",fontWeight:700}],"bill-h4":["30px",{lineHeight:"38px",fontWeight:700}],"bill-h5":["28px",{lineHeight:"40px",fontWeight:600}],"bill-h6":["24px",{lineHeight:"30px",fontWeight:600}],"bill-body-lr":["18px",{lineHeight:"26px",fontWeight:400}],"bill-body-lm":["18px",{lineHeight:"26px",fontWeight:500}],"bill-body-lsm":["18px",{lineHeight:"26px",fontWeight:600}],"bill-body-blb":["18px",{lineHeight:"26px",fontWeight:700}],"bill-body-mr":["16px",{lineHeight:"24px",fontWeight:400}],"bill-body-mm":["16px",{lineHeight:"24px",fontWeight:500}],"bill-body-msm":["16px",{lineHeight:"24px",fontWeight:600}],"bill-body-mb":["16px",{lineHeight:"24px",fontWeight:700}],"bill-label-r":["15px",{lineHeight:"26px",fontWeight:400}],"bill-label-m":["15px",{lineHeight:"26px",fontWeight:500}],"bill-label-sm":["15px",{lineHeight:"26px",fontWeight:600}],"bill-label-b":["15px",{lineHeight:"26px",fontWeight:700}],"bill-body-sr":["14px",{lineHeight:"22px",fontWeight:400}],"bill-body-sm":["14px",{lineHeight:"22px",fontWeight:500}],"bill-body-ssm":["14px",{lineHeight:"22px",fontWeight:600}],"bill-body-sb":["14px",{lineHeight:"22px",fontWeight:700}],"bill-body-esr":["12px",{lineHeight:"20px",fontWeight:400}],"bill-body-ems":["12px",{lineHeight:"20px",fontWeight:500}],"bill-body-essm":["12px",{lineHeight:"20px",fontWeight:600}],"bill-body-esb":["12px",{lineHeight:"20px",fontWeight:700}]},q6={...CC,...EC,...Z6},J6={"sm-default":"640px",sm:"576px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},d0={"sm-default":640,sm:576,md:768,lg:1024,xl:1280,"2xl":1536},Q6=()=>B.jsx("div",{className:"iru-w-full iru-bg-red-900",children:"index"}),eA="_loading_1y0ia_14",Ie={"button-bill-xxs":"_button-bill-xxs_1y0ia_6","button-bill-xs":"_button-bill-xs_1y0ia_6","button-bill-s":"_button-bill-s_1y0ia_6","button-bill-m":"_button-bill-m_1y0ia_6","button-bill-l":"_button-bill-l_1y0ia_6","button-xs":"_button-xs_1y0ia_6","button-s":"_button-s_1y0ia_6","button-m":"_button-m_1y0ia_6","button-l":"_button-l_1y0ia_6","button-extra-small":"_button-extra-small_1y0ia_6","button-small":"_button-small_1y0ia_6","button-reguler":"_button-reguler_1y0ia_6","button-large":"_button-large_1y0ia_6",loading:eA,"filled-bill-secondary-800_bg-white":"_filled-bill-secondary-800_bg-white_1y0ia_29","filled-bill-blue-gray-500_bg-blue-gray-50":"_filled-bill-blue-gray-500_bg-blue-gray-50_1y0ia_29","nude-laba-red-05":"_nude-laba-red-05_1y0ia_29","nude-laba-red-08":"_nude-laba-red-08_1y0ia_29","nude-laba-red-10":"_nude-laba-red-10_1y0ia_29","nude-gray-500":"_nude-gray-500_1y0ia_29","nude-green-700":"_nude-green-700_1y0ia_29","nude-red-700":"_nude-red-700_1y0ia_29","nude-laba-blue-10":"_nude-laba-blue-10_1y0ia_29","ghost-blue-gray-100-bg_white-text_blue-gray-400":"_ghost-blue-gray-100-bg_white-text_blue-gray-400_1y0ia_29","ghost-blue-gray-100-bg_white":"_ghost-blue-gray-100-bg_white_1y0ia_29","ghost-laba-green-10":"_ghost-laba-green-10_1y0ia_29","ghost-laba-blue-01":"_ghost-laba-blue-01_1y0ia_29","ghost-laba-blue-05":"_ghost-laba-blue-05_1y0ia_29","ghost-green-700":"_ghost-green-700_1y0ia_29","ghost-red-700":"_ghost-red-700_1y0ia_29","ghost-laba-blue-10":"_ghost-laba-blue-10_1y0ia_29","filled-laba-white_laba-red-05":"_filled-laba-white_laba-red-05_1y0ia_29","filled-laba-white_laba-blue-10":"_filled-laba-white_laba-blue-10_1y0ia_29","primary-green-700-dsb_laba-grey-06":"_primary-green-700-dsb_laba-grey-06_1y0ia_29","primary-red-700-dsb_laba-grey-06":"_primary-red-700-dsb_laba-grey-06_1y0ia_29","primary-laba-blue-10":"_primary-laba-blue-10_1y0ia_29","primary-bill-red-700":"_primary-bill-red-700_1y0ia_29","tertiary-bill-secondary-800":"_tertiary-bill-secondary-800_1y0ia_29","secondary-bill-secondary-800":"_secondary-bill-secondary-800_1y0ia_29","primary-bill-primary-600":"_primary-bill-primary-600_1y0ia_29","tertiary-black":"_tertiary-black_1y0ia_29","tertiary-gray-500":"_tertiary-gray-500_1y0ia_29","tertiary-red-600":"_tertiary-red-600_1y0ia_29","tertiary-red-300":"_tertiary-red-300_1y0ia_29","tertiary-blue-700":"_tertiary-blue-700_1y0ia_29","secondary-green-600":"_secondary-green-600_1y0ia_29","secondary-red-700":"_secondary-red-700_1y0ia_29","secondary-red-600":"_secondary-red-600_1y0ia_29","secondary-blue-700":"_secondary-blue-700_1y0ia_29","primary-red-700":"_primary-red-700_1y0ia_29","primary-blue-700":"_primary-blue-700_1y0ia_29","icon-loading":"_icon-loading_1y0ia_244"},$f={size:{large:Ie["button-large"],reguler:Ie["button-reguler"],small:Ie["button-small"],"extra-small":Ie["button-extra-small"],l:Ie["button-l"],m:Ie["button-m"],s:Ie["button-s"],xs:Ie["button-xs"],"bill-l":Ie["button-bill-l"],"bill-m":Ie["button-bill-m"],"bill-s":Ie["button-bill-s"],"bill-xs":Ie["button-bill-xs"],"bill-xxs":Ie["button-bill-xxs"]},loadingSize:{large:"iru-size-6",reguler:"iru-size-5",small:"iru-size-5","extra-small":"iru-size-5",l:"iru-size-6",m:"iru-size-5",s:"iru-size-5",xs:"iru-size-5","bill-l":"iru-size-6","bill-m":"iru-size-5","bill-s":"iru-size-5","bill-xs":"iru-size-5","bill-xxs":"iru-size-5"},variants:{"primary-laba-blue-10":Ie["primary-laba-blue-10"],"primary-red-700-dsb_laba-grey-06":Ie["primary-red-700-dsb_laba-grey-06"],"primary-green-700-dsb_laba-grey-06":Ie["primary-green-700-dsb_laba-grey-06"],"ghost-laba-blue-10":Ie["ghost-laba-blue-10"],"ghost-red-700":Ie["ghost-red-700"],"ghost-green-700":Ie["ghost-green-700"],"ghost-laba-green-10":Ie["ghost-laba-green-10"],"nude-laba-blue-10":Ie["nude-laba-blue-10"],"nude-red-700":Ie["nude-red-700"],"nude-green-700":Ie["nude-green-700"],"nude-gray-500":Ie["nude-gray-500"],"primary-blue-700":Ie["primary-blue-700"],"secondary-blue-700":Ie["secondary-blue-700"],"tertiary-blue-700":Ie["tertiary-blue-700"],"ghost-blue-gray-100-bg_white":Ie["ghost-blue-gray-100-bg_white"],"ghost-blue-gray-100-bg_white-text_blue-gray-400":Ie["ghost-blue-gray-100-bg_white-text_blue-gray-400"],"ghost-laba-blue-05":Ie["ghost-laba-blue-05"],"secondary-red-600":Ie["secondary-red-600"],"tertiary-red-300":Ie["tertiary-red-300"],"tertiary-gray-500":Ie["tertiary-gray-500"],"tertiary-red-600":Ie["tertiary-red-600"],"tertiary-black":Ie["tertiary-black"],"secondary-green-600":Ie["secondary-green-600"],"nude-laba-red-10":Ie["nude-laba-red-10"],"nude-laba-red-05":Ie["nude-laba-red-05"],"primary-red-700":Ie["primary-red-700"],"nude-laba-red-08":Ie["nude-laba-red-08"],"ghost-laba-blue-01":Ie["ghost-laba-blue-01"],"filled-laba-white_laba-blue-10":Ie["filled-laba-white_laba-blue-10"],"filled-laba-white_laba-red-05":Ie["filled-laba-white_laba-red-05"],"secondary-red-700":Ie["secondary-red-700"],"primary-bill-primary-600":Ie["primary-bill-primary-600"],"secondary-bill-secondary-800":Ie["secondary-bill-secondary-800"],"tertiary-bill-secondary-800":Ie["tertiary-bill-secondary-800"],"primary-bill-red-700":Ie["primary-bill-red-700"],"filled-bill-blue-gray-500_bg-blue-gray-50":Ie["filled-bill-blue-gray-500_bg-blue-gray-50"],"filled-bill-secondary-800_bg-white":Ie["filled-bill-secondary-800_bg-white"]}},tA=({className:e=""})=>B.jsx("svg",{className:`${Ie["icon-loading"]} ${e??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:B.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063 \r
|
|
25
|
-
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629 \r
|
|
26
|
-
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861 \r
|
|
27
|
-
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514 \r
|
|
28
|
-
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731 \r
|
|
29
|
-
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543 \r
|
|
30
|
-
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776 \r
|
|
31
|
-
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858 \r
|
|
32
|
-
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607 \r
|
|
33
|
-
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049 \r
|
|
34
|
-
6.79445 20.9604 7.02733 21.6311 6.63315Z`,fill:"currentColor"})}),Pn=N.forwardRef((e,t)=>{const{size:n="reguler",variants:r="primary-laba-blue-10",startIcon:i=()=>B.jsx(B.Fragment,{}),endIcon:a=()=>B.jsx(B.Fragment,{}),children:o,className:s,classNameIconLoading:l,loading:u,onClick:c,type:p="button",disabled:g,...d}=e;return B.jsxs("button",{onClick:u?void 0:c,ref:t,className:`${$f.size[n]} ${$f.variants[r]}
|
|
35
|
-
${u?Ie.loading:""} ${s??""}`,type:p,disabled:g??u,...d,children:[!u&&B.jsxs(B.Fragment,{children:[typeof i=="function"&&i(),N.isValidElement(i)&&i]}),u&&B.jsx(tA,{className:`${$f.loadingSize[n]} ${l}`}),o,!u&&B.jsxs(B.Fragment,{children:[typeof a=="function"&&a(),N.isValidElement(a)&&a]})]})});Pn.displayName="Button";function id(){return typeof window<"u"}function sa(e){return Rg(e)?(e.nodeName||"").toLowerCase():"#document"}function Gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(Rg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rg(e){return id()?e instanceof Node||e instanceof Gn(e).Node:!1}function _t(e){return id()?e instanceof Element||e instanceof Gn(e).Element:!1}function jt(e){return id()?e instanceof HTMLElement||e instanceof Gn(e).HTMLElement:!1}function f0(e){return!id()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gn(e).ShadowRoot}const nA=new Set(["inline","contents"]);function _l(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!nA.has(i)}const rA=new Set(["table","td","th"]);function iA(e){return rA.has(sa(e))}const aA=[":popover-open",":modal"];function ad(e){return aA.some(t=>{try{return e.matches(t)}catch{return!1}})}const oA=["transform","translate","scale","rotate","perspective"],sA=["transform","translate","scale","rotate","perspective","filter"],lA=["paint","layout","strict","content"];function Bg(e){const t=od(),n=_t(e)?Xn(e):e;return oA.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||sA.some(r=>(n.willChange||"").includes(r))||lA.some(r=>(n.contain||"").includes(r))}function uA(e){let t=wi(e);for(;jt(t)&&!Ci(t);){if(Bg(t))return t;if(ad(t))return null;t=wi(t)}return null}function od(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const cA=new Set(["html","body","#document"]);function Ci(e){return cA.has(sa(e))}function Xn(e){return Gn(e).getComputedStyle(e)}function sd(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wi(e){if(sa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||f0(e)&&e.host||Qr(e);return f0(t)?t.host:t}function SC(e){const t=wi(e);return Ci(t)?e.ownerDocument?e.ownerDocument.body:e.body:jt(t)&&_l(t)?t:SC(t)}function Ji(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=SC(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Gn(i);if(a){const s=h0(o);return t.concat(o,o.visualViewport||[],_l(i)?i:[],s&&n?Ji(s):[])}return t.concat(i,Ji(i,[],n))}function h0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const dA=["top","right","bottom","left"],E1=["start","end"],S1=dA.reduce((e,t)=>e.concat(t,t+"-"+E1[0],t+"-"+E1[1]),[]),Oo=Math.min,$a=Math.max,oc=Math.round,ql=Math.floor,Wr=e=>({x:e,y:e}),fA={left:"right",right:"left",bottom:"top",top:"bottom"},hA={start:"end",end:"start"};function g0(e,t,n){return $a(e,Oo(t,n))}function Jo(e,t){return typeof e=="function"?e(t):e}function _i(e){return e.split("-")[0]}function Ur(e){return e.split("-")[1]}function wC(e){return e==="x"?"y":"x"}function $g(e){return e==="y"?"height":"width"}const gA=new Set(["top","bottom"]);function Gi(e){return gA.has(_i(e))?"y":"x"}function kg(e){return wC(Gi(e))}function _C(e,t,n){n===void 0&&(n=!1);const r=Ur(e),i=kg(e),a=$g(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=lc(o)),[o,lc(o)]}function pA(e){const t=lc(e);return[sc(e),t,sc(t)]}function sc(e){return e.replace(/start|end/g,t=>hA[t])}const w1=["left","right"],_1=["right","left"],mA=["top","bottom"],bA=["bottom","top"];function vA(e,t,n){switch(e){case"top":case"bottom":return n?t?_1:w1:t?w1:_1;case"left":case"right":return t?mA:bA;default:return[]}}function yA(e,t,n,r){const i=Ur(e);let a=vA(_i(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(sc)))),a}function lc(e){return e.replace(/left|right|bottom|top/g,t=>fA[t])}function xA(e){return{top:0,right:0,bottom:0,left:0,...e}}function IC(e){return typeof e!="number"?xA(e):{top:e,right:e,bottom:e,left:e}}function uc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}/*!
|
|
36
|
-
* tabbable 6.2.0
|
|
37
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
38
|
-
*/var CA=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],cc=CA.join(","),DC=typeof Element>"u",Lo=DC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,dc=!DC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},fc=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},EA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},TC=function(t,n,r){if(fc(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(cc));return n&&Lo.call(t,cc)&&i.unshift(t),i=i.filter(r),i},AC=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!fc(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),l=s.length?s:o.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var c=Lo.call(o,cc);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var p=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!fc(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(p&&g){var d=e(p===!0?o.children:p.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:o,candidates:d})}else a.unshift.apply(a,o.children)}}return i},RC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},BC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||EA(t))&&!RC(t)?0:t.tabIndex},SA=function(t,n){var r=BC(t);return r<0&&n&&!RC(t)?0:r},wA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},$C=function(t){return t.tagName==="INPUT"},_A=function(t){return $C(t)&&t.type==="hidden"},IA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},DA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},TA=function(t){if(!t.name)return!0;var n=t.form||dc(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=DA(i,t.form);return!a||a===t},AA=function(t){return $C(t)&&t.type==="radio"},RA=function(t){return AA(t)&&!TA(t)},BA=function(t){var n,r=t&&dc(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,l;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!a&&i;){var u,c,p;r=dc(i),i=(u=r)===null||u===void 0?void 0:u.host,a=!!((c=i)!==null&&c!==void 0&&(p=c.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return a},I1=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},$A=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Lo.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Lo.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=dc(t);if(l&&!l.shadowRoot&&i(l)===!0)return I1(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(BA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return I1(t);return!1},kA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Lo.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},p0=function(t,n){return!(n.disabled||fc(n)||_A(n)||$A(n,t)||IA(n)||kA(n))},m0=function(t,n){return!(RA(n)||BC(n)<0||!p0(t,n))},PA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},FA=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,l=SA(s,o),u=o?e(i.candidates):s;l===0?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:a,tabIndex:l,item:i,isScope:o,content:u})}),r.sort(wA).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},ld=function(t,n){n=n||{};var r;return n.getShadowRoot?r=AC([t],n.includeContainer,{filter:m0.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:PA}):r=TC(t,n.includeContainer,m0.bind(null,n)),FA(r)},NA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=AC([t],n.includeContainer,{filter:p0.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=TC(t,n.includeContainer,p0.bind(null,n)),r},kC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lo.call(t,cc)===!1?!1:m0(n,t)};function MA(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function PC(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function OA(){return/apple/i.test(navigator.vendor)}function b0(){const e=/android/i;return e.test(MA())||e.test(PC())}function LA(){return PC().includes("jsdom/")}const D1="data-floating-ui-focusable",VA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function bo(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Vn(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&f0(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Hi(e){return"composedPath"in e?e.composedPath()[0]:e.target}function kf(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function HA(e){return e.matches("html,body")}function vr(e){return(e==null?void 0:e.ownerDocument)||document}function FC(e){return jt(e)&&e.matches(VA)}function T1(e){return e?e.getAttribute("role")==="combobox"&&FC(e):!1}function v0(e){return e?e.hasAttribute(D1)?e:e.querySelector("["+D1+"]")||e:null}function wo(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var a;return i.parentId===t&&(!n||((a=i.context)==null?void 0:a.open))}).flatMap(i=>[i,...wo(e,i.id,n)])}function A1(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Pf(e){e.preventDefault(),e.stopPropagation()}function jA(e){return"nativeEvent"in e}function zA(e){return e.mozInputSource===0&&e.isTrusted?!0:b0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function GA(e){return LA()?!1:!b0()&&e.width===0&&e.height===0||b0()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function R1(e,t){return["mouse","pen"].includes(e)}var WA=typeof document<"u",UA=function(){},wn=WA?N.useLayoutEffect:UA;const XA={...ae};function _a(e){const t=ae.useRef(e);return wn(()=>{t.current=e}),t}const YA=XA.useInsertionEffect,KA=YA||(e=>e());function Vr(e){const t=ae.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return KA(()=>{t.current=e}),ae.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const Il=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function NC(e,t){const n=ld(e,Il()),r=n.length;if(r===0)return;const i=bo(vr(e)),a=n.indexOf(i),o=a===-1?t===1?0:r-1:a+t;return n[o]}function MC(e){return NC(vr(e).body,1)||e}function OC(e){return NC(vr(e).body,-1)||e}function Rs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Vn(n,r)}function ZA(e){ld(e,Il()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function B1(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function $1(e,t,n){let{reference:r,floating:i}=e;const a=Gi(t),o=kg(t),s=$g(o),l=_i(t),u=a==="y",c=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:p};break;case"left":d={x:r.x-i.width,y:p};break;default:d={x:r.x,y:r.y}}switch(Ur(t)){case"start":d[o]-=g*(n&&u?-1:1);break;case"end":d[o]+=g*(n&&u?-1:1);break}return d}const qA=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:p}=$1(u,r,l),g=r,d={},m=0;for(let b=0;b<s.length;b++){const{name:y,fn:f}=s[b],{x:v,y:C,data:S,reset:_}=await f({x:c,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:d,rects:u,platform:o,elements:{reference:e,floating:t}});c=v??c,p=C??p,d={...d,[y]:{...d[y],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(g=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:c,y:p}=$1(u,g,l)),b=-1)}return{x:c,y:p,placement:g,strategy:i,middlewareData:d}};async function Pg(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:g=!1,padding:d=0}=Jo(t,e),m=IC(d),y=s[g?p==="floating"?"reference":"floating":p],f=uc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v=p==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},_=uc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:C,strategy:l}):v);return{top:(f.top-_.top+m.top)/S.y,bottom:(_.bottom-f.bottom+m.bottom)/S.y,left:(f.left-_.left+m.left)/S.x,right:(_.right-f.right+m.right)/S.x}}const JA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=Jo(e,t)||{};if(u==null)return{};const p=IC(c),g={x:n,y:r},d=kg(i),m=$g(d),b=await o.getDimensions(u),y=d==="y",f=y?"top":"left",v=y?"bottom":"right",C=y?"clientHeight":"clientWidth",S=a.reference[m]+a.reference[d]-g[d]-a.floating[m],_=g[d]-a.reference[d],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let x=E?E[C]:0;(!x||!await(o.isElement==null?void 0:o.isElement(E)))&&(x=s.floating[C]||a.floating[m]);const h=S/2-_/2,w=x/2-b[m]/2-1,D=Oo(p[f],w),I=Oo(p[v],w),T=D,F=x-b[m]-I,P=x/2-b[m]/2+h,k=g0(T,P,F),R=!l.arrow&&Ur(i)!=null&&P!==k&&a.reference[m]/2-(P<T?D:I)-b[m]/2<0,M=R?P<T?P-T:P-F:0;return{[d]:g[d]+M,data:{[d]:k,centerOffset:P-k-M,...R&&{alignmentOffset:M}},reset:R}}});function QA(e,t,n){return(e?[...n.filter(i=>Ur(i)===e),...n.filter(i=>Ur(i)!==e)]:n.filter(i=>_i(i)===i)).filter(i=>e?Ur(i)===e||(t?sc(i)!==i:!1):!0)}const eR=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:a,middlewareData:o,placement:s,platform:l,elements:u}=t,{crossAxis:c=!1,alignment:p,allowedPlacements:g=S1,autoAlignment:d=!0,...m}=Jo(e,t),b=p!==void 0||g===S1?QA(p||null,d,g):g,y=await Pg(t,m),f=((n=o.autoPlacement)==null?void 0:n.index)||0,v=b[f];if(v==null)return{};const C=_C(v,a,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(s!==v)return{reset:{placement:b[0]}};const S=[y[_i(v)],y[C[0]],y[C[1]]],_=[...((r=o.autoPlacement)==null?void 0:r.overflows)||[],{placement:v,overflows:S}],E=b[f+1];if(E)return{data:{index:f+1,overflows:_},reset:{placement:E}};const x=_.map(D=>{const I=Ur(D.placement);return[D.placement,I&&c?D.overflows.slice(0,2).reduce((T,F)=>T+F,0):D.overflows[0],D.overflows]}).sort((D,I)=>D[1]-I[1]),w=((i=x.filter(D=>D[2].slice(0,Ur(D[0])?2:3).every(I=>I<=0))[0])==null?void 0:i[0])||x[0][0];return w!==s?{data:{index:f+1,overflows:_},reset:{placement:w}}:{}}}},tR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...y}=Jo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const f=_i(i),v=Gi(s),C=_i(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=g||(C||!b?[lc(s)]:pA(s)),E=m!=="none";!g&&E&&_.push(...yA(s,b,m,S));const x=[s,..._],h=await Pg(t,y),w=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&w.push(h[f]),p){const P=_C(i,o,S);w.push(h[P[0]],h[P[1]])}if(D=[...D,{placement:i,overflows:w}],!w.every(P=>P<=0)){var I,T;const P=(((I=a.flip)==null?void 0:I.index)||0)+1,k=x[P];if(k&&(!(p==="alignment"?v!==Gi(k):!1)||D.every(O=>Gi(O.placement)===v?O.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:k}};let R=(T=D.filter(M=>M.overflows[0]<=0).sort((M,O)=>M.overflows[1]-O.overflows[1])[0])==null?void 0:T.placement;if(!R)switch(d){case"bestFit":{var F;const M=(F=D.filter(O=>{if(E){const z=Gi(O.placement);return z===v||z==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(z=>z>0).reduce((z,G)=>z+G,0)]).sort((O,z)=>O[1]-z[1])[0])==null?void 0:F[0];M&&(R=M);break}case"initialPlacement":R=s;break}if(i!==R)return{reset:{placement:R}}}return{}}}},nR=new Set(["left","top"]);async function rR(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=_i(n),s=Ur(n),l=Gi(n)==="y",u=nR.has(o)?-1:1,c=a&&l?-1:1,p=Jo(t,e);let{mainAxis:g,crossAxis:d,alignmentAxis:m}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*c,y:g*u}:{x:g*u,y:d*c}}const iR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await rR(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},aR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:f,y:v}=y;return{x:f,y:v}}},...l}=Jo(e,t),u={x:n,y:r},c=await Pg(t,l),p=Gi(_i(i)),g=wC(p);let d=u[g],m=u[p];if(a){const y=g==="y"?"top":"left",f=g==="y"?"bottom":"right",v=d+c[y],C=d-c[f];d=g0(v,d,C)}if(o){const y=p==="y"?"top":"left",f=p==="y"?"bottom":"right",v=m+c[y],C=m-c[f];m=g0(v,m,C)}const b=s.fn({...t,[g]:d,[p]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:a,[p]:o}}}}}};function LC(e){const t=Xn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=jt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=oc(n)!==a||oc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Fg(e){return _t(e)?e:e.contextElement}function _o(e){const t=Fg(e);if(!jt(t))return Wr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=LC(t);let o=(a?oc(n.width):n.width)/r,s=(a?oc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const oR=Wr(0);function VC(e){const t=Gn(e);return!od()||!t.visualViewport?oR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gn(e)?!1:t}function La(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Fg(e);let o=Wr(1);t&&(r?_t(r)&&(o=_o(r)):o=_o(e));const s=sR(a,n,r)?VC(a):Wr(0);let l=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,c=i.width/o.x,p=i.height/o.y;if(a){const g=Gn(a),d=r&&_t(r)?Gn(r):r;let m=g,b=h0(m);for(;b&&r&&d!==m;){const y=_o(b),f=b.getBoundingClientRect(),v=Xn(b),C=f.left+(b.clientLeft+parseFloat(v.paddingLeft))*y.x,S=f.top+(b.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,p*=y.y,l+=C,u+=S,m=Gn(b),b=h0(m)}}return uc({width:c,height:p,x:l,y:u})}function ud(e,t){const n=sd(e).scrollLeft;return t?t.left+n:La(Qr(e)).left+n}function HC(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ud(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function lR(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=Qr(r),s=t?ad(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=Wr(1);const c=Wr(0),p=jt(r);if((p||!p&&!a)&&((sa(r)!=="body"||_l(o))&&(l=sd(r)),jt(r))){const d=La(r);u=_o(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}const g=o&&!p&&!a?HC(o,l):Wr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+g.x,y:n.y*u.y-l.scrollTop*u.y+c.y+g.y}}function uR(e){return Array.from(e.getClientRects())}function cR(e){const t=Qr(e),n=sd(e),r=e.ownerDocument.body,i=$a(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$a(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+ud(e);const s=-n.scrollTop;return Xn(r).direction==="rtl"&&(o+=$a(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}const k1=25;function dR(e,t){const n=Gn(e),r=Qr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=od();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const u=ud(r);if(u<=0){const c=r.ownerDocument,p=c.body,g=getComputedStyle(p),d=c.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,m=Math.abs(r.clientWidth-p.clientWidth-d);m<=k1&&(a-=m)}else u<=k1&&(a+=u);return{width:a,height:o,x:s,y:l}}const fR=new Set(["absolute","fixed"]);function hR(e,t){const n=La(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=jt(e)?_o(e):Wr(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,u=r*a.y;return{width:o,height:s,x:l,y:u}}function P1(e,t,n){let r;if(t==="viewport")r=dR(e,n);else if(t==="document")r=cR(Qr(e));else if(_t(t))r=hR(t,n);else{const i=VC(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return uc(r)}function jC(e,t){const n=wi(e);return n===t||!_t(n)||Ci(n)?!1:Xn(n).position==="fixed"||jC(n,t)}function gR(e,t){const n=t.get(e);if(n)return n;let r=Ji(e,[],!1).filter(s=>_t(s)&&sa(s)!=="body"),i=null;const a=Xn(e).position==="fixed";let o=a?wi(e):e;for(;_t(o)&&!Ci(o);){const s=Xn(o),l=Bg(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&fR.has(i.position)||_l(o)&&!l&&jC(e,o))?r=r.filter(c=>c!==o):i=s,o=wi(o)}return t.set(e,r),r}function pR(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?ad(t)?[]:gR(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((u,c)=>{const p=P1(t,c,i);return u.top=$a(p.top,u.top),u.right=Oo(p.right,u.right),u.bottom=Oo(p.bottom,u.bottom),u.left=$a(p.left,u.left),u},P1(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mR(e){const{width:t,height:n}=LC(e);return{width:t,height:n}}function bR(e,t,n){const r=jt(t),i=Qr(t),a=n==="fixed",o=La(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Wr(0);function u(){l.x=ud(i)}if(r||!r&&!a)if((sa(t)!=="body"||_l(i))&&(s=sd(t)),r){const d=La(t,!0,a,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();a&&!r&&i&&u();const c=i&&!r&&!a?HC(i,s):Wr(0),p=o.left+s.scrollLeft-l.x-c.x,g=o.top+s.scrollTop-l.y-c.y;return{x:p,y:g,width:o.width,height:o.height}}function Ff(e){return Xn(e).position==="static"}function F1(e,t){if(!jt(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qr(e)===n&&(n=n.ownerDocument.body),n}function zC(e,t){const n=Gn(e);if(ad(e))return n;if(!jt(e)){let i=wi(e);for(;i&&!Ci(i);){if(_t(i)&&!Ff(i))return i;i=wi(i)}return n}let r=F1(e,t);for(;r&&iA(r)&&Ff(r);)r=F1(r,t);return r&&Ci(r)&&Ff(r)&&!Bg(r)?n:r||uA(e)||n}const vR=async function(e){const t=this.getOffsetParent||zC,n=this.getDimensions,r=await n(e.floating);return{reference:bR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function yR(e){return Xn(e).direction==="rtl"}const xR={convertOffsetParentRelativeRectToViewportRelativeRect:lR,getDocumentElement:Qr,getClippingRect:pR,getOffsetParent:zC,getElementRects:vR,getClientRects:uR,getDimensions:mR,getScale:_o,isElement:_t,isRTL:yR};function GC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function CR(e,t){let n=null,r;const i=Qr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:c,top:p,width:g,height:d}=u;if(s||t(),!g||!d)return;const m=ql(p),b=ql(i.clientWidth-(c+g)),y=ql(i.clientHeight-(p+d)),f=ql(c),C={rootMargin:-m+"px "+-b+"px "+-y+"px "+-f+"px",threshold:$a(0,Oo(1,l))||1};let S=!0;function _(E){const x=E[0].intersectionRatio;if(x!==l){if(!S)return o();x?o(!1,x):r=setTimeout(()=>{o(!1,1e-7)},1e3)}x===1&&!GC(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(_,{...C,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,C)}n.observe(e)}return o(!0),a}function WC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Fg(e),c=i||a?[...u?Ji(u):[],...Ji(t)]:[];c.forEach(f=>{i&&f.addEventListener("scroll",n,{passive:!0}),a&&f.addEventListener("resize",n)});const p=u&&s?CR(u,n):null;let g=-1,d=null;o&&(d=new ResizeObserver(f=>{let[v]=f;v&&v.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=d)==null||C.observe(t)})),n()}),u&&!l&&d.observe(u),d.observe(t));let m,b=l?La(e):null;l&&y();function y(){const f=La(e);b&&!GC(b,f)&&n(),b=f,m=requestAnimationFrame(y)}return n(),()=>{var f;c.forEach(v=>{i&&v.removeEventListener("scroll",n),a&&v.removeEventListener("resize",n)}),p==null||p(),(f=d)==null||f.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const ER=iR,SR=eR,wR=aR,_R=tR,N1=JA,IR=(e,t,n)=>{const r=new Map,i={platform:xR,...n},a={...i.platform,_c:r};return qA(e,t,{...i,platform:a})};var DR=typeof document<"u",TR=function(){},Nu=DR?N.useLayoutEffect:TR;function hc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!hc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!hc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function UC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function M1(e,t){const n=UC(e);return Math.round(t*n)/n}function Nf(e){const t=ae.useRef(e);return Nu(()=>{t.current=e}),t}function AR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,p]=ae.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,d]=ae.useState(r);hc(g,r)||d(r);const[m,b]=ae.useState(null),[y,f]=ae.useState(null),v=ae.useCallback(O=>{O!==E.current&&(E.current=O,b(O))},[]),C=ae.useCallback(O=>{O!==x.current&&(x.current=O,f(O))},[]),S=a||m,_=o||y,E=ae.useRef(null),x=ae.useRef(null),h=ae.useRef(c),w=l!=null,D=Nf(l),I=Nf(i),T=Nf(u),F=ae.useCallback(()=>{if(!E.current||!x.current)return;const O={placement:t,strategy:n,middleware:g};I.current&&(O.platform=I.current),IR(E.current,x.current,O).then(z=>{const G={...z,isPositioned:T.current!==!1};P.current&&!hc(h.current,G)&&(h.current=G,pg.flushSync(()=>{p(G)}))})},[g,t,n,I,T]);Nu(()=>{u===!1&&h.current.isPositioned&&(h.current.isPositioned=!1,p(O=>({...O,isPositioned:!1})))},[u]);const P=ae.useRef(!1);Nu(()=>(P.current=!0,()=>{P.current=!1}),[]),Nu(()=>{if(S&&(E.current=S),_&&(x.current=_),S&&_){if(D.current)return D.current(S,_,F);F()}},[S,_,F,D,w]);const k=ae.useMemo(()=>({reference:E,floating:x,setReference:v,setFloating:C}),[v,C]),R=ae.useMemo(()=>({reference:S,floating:_}),[S,_]),M=ae.useMemo(()=>{const O={position:n,left:0,top:0};if(!R.floating)return O;const z=M1(R.floating,c.x),G=M1(R.floating,c.y);return s?{...O,transform:"translate("+z+"px, "+G+"px)",...UC(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:G}},[n,s,R.floating,c.x,c.y]);return ae.useMemo(()=>({...c,update:F,refs:k,elements:R,floatingStyles:M}),[c,F,k,R,M])}const RR=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?N1({element:r.current,padding:i}).fn(n):{}:r?N1({element:r,padding:i}).fn(n):{}}}},BR=(e,t)=>({...ER(e),options:[e,t]}),$R=(e,t)=>({...wR(e),options:[e,t]}),kR=(e,t)=>({..._R(e),options:[e,t]}),PR=(e,t)=>({...SR(e),options:[e,t]}),FR=(e,t)=>({...RR(e),options:[e,t]}),NR="data-floating-ui-focusable",O1="active",L1="selected",MR={...ae};let V1=!1,OR=0;const H1=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+OR++;function LR(){const[e,t]=ae.useState(()=>V1?H1():void 0);return wn(()=>{e==null&&t(H1())},[]),ae.useEffect(()=>{V1=!0},[]),e}const VR=MR.useId,cd=VR||LR;let js;process.env.NODE_ENV!=="production"&&(js=new Set);function HR(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=js)!=null&&e.has(i))){var a;(a=js)==null||a.add(i),console.warn(i)}}function jR(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=js)!=null&&e.has(i))){var a;(a=js)==null||a.add(i),console.error(i)}}const zR=ae.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:i},middlewareData:{arrow:a,shift:o}},width:s=14,height:l=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:p,stroke:g,d,style:{transform:m,...b}={},...y}=t;process.env.NODE_ENV!=="production"&&(n||HR("The `ref` prop is required for `FloatingArrow`."));const f=cd(),[v,C]=ae.useState(!1);if(wn(()=>{if(!i)return;Xn(i).direction==="rtl"&&C(!0)},[i]),!i)return null;const[S,_]=r.split("-"),E=S==="top"||S==="bottom";let x=p;(E&&o!=null&&o.x||!E&&o!=null&&o.y)&&(x=null);const h=c*2,w=h/2,D=s/2*(u/-8+1),I=l/2*u/4,T=!!d,F=x&&_==="end"?"bottom":"top";let P=x&&_==="end"?"right":"left";x&&v&&(P=_==="end"?"left":"right");const k=(a==null?void 0:a.x)!=null?x||a.x:"",R=(a==null?void 0:a.y)!=null?x||a.y:"",M=d||"M0,0"+(" H"+s)+(" L"+(s-D)+","+(l-I))+(" Q"+s/2+","+l+" "+D+","+(l-I))+" Z",O={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[S];return B.jsxs("svg",{...y,"aria-hidden":!0,ref:n,width:T?s:s+h,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[P]:k,[F]:R,[S]:E||T?"100%":"calc(100% - "+h/2+"px)",transform:[O,m].filter(z=>!!z).join(" "),...b},children:[h>0&&B.jsx("path",{clipPath:"url(#"+f+")",fill:"none",stroke:g,strokeWidth:h+(d?0:1),d:M}),B.jsx("path",{stroke:h&&!d?y.fill:"none",d:M}),B.jsx("clipPath",{id:f,children:B.jsx("rect",{x:-w,y:w*(T?-1:1),width:s+h,height:s})})]})});function GR(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const WR=ae.createContext(null),UR=ae.createContext(null),XC=()=>{var e;return((e=ae.useContext(WR))==null?void 0:e.id)||null},Ng=()=>ae.useContext(UR);function zs(e){return"data-floating-ui-"+e}function XR(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}let j1=0;function ao(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(j1);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():j1=requestAnimationFrame(a)}function YR(e){return(e==null?void 0:e.ownerDocument)||document}const Io={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function z1(e){return e==="inert"?Io.inert:e==="aria-hidden"?Io["aria-hidden"]:Io.none}let Jl=new WeakSet,Ql={},Mf=0;const KR=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,YC=e=>e&&(e.host||YC(e.parentNode)),ZR=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=YC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function qR(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=ZR(t,e),s=new Set,l=new Set(o),u=[];Ql[i]||(Ql[i]=new WeakMap);const c=Ql[i];o.forEach(p),g(t),s.clear();function p(d){!d||s.has(d)||(s.add(d),d.parentNode&&p(d.parentNode))}function g(d){!d||l.has(d)||[].forEach.call(d.children,m=>{if(sa(m)!=="script")if(s.has(m))g(m);else{const b=a?m.getAttribute(a):null,y=b!==null&&b!=="false",f=z1(a),v=(f.get(m)||0)+1,C=(c.get(m)||0)+1;f.set(m,v),c.set(m,C),u.push(m),v===1&&y&&Jl.add(m),C===1&&m.setAttribute(i,""),!y&&a&&m.setAttribute(a,a==="inert"?"":"true")}})}return Mf++,()=>{u.forEach(d=>{const m=z1(a),y=(m.get(d)||0)-1,f=(c.get(d)||0)-1;m.set(d,y),c.set(d,f),y||(!Jl.has(d)&&a&&d.removeAttribute(a),Jl.delete(d)),f||d.removeAttribute(i)}),Mf--,Mf||(Io.inert=new WeakMap,Io["aria-hidden"]=new WeakMap,Io.none=new WeakMap,Jl=new WeakSet,Ql={})}}function G1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=YR(e[0]).body;return qR(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const dd={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},gc=ae.forwardRef(function(t,n){const[r,i]=ae.useState();wn(()=>{OA()&&i("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[zs("focus-guard")]:"",style:dd};return B.jsx("span",{...t,...a})}),KC=ae.createContext(null),W1=zs("portal");function JR(e){e===void 0&&(e={});const{id:t,root:n}=e,r=cd(),i=ZC(),[a,o]=ae.useState(null),s=ae.useRef(null);return wn(()=>()=>{a==null||a.remove(),queueMicrotask(()=>{s.current=null})},[a]),wn(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=r,u.setAttribute(W1,""),l.appendChild(u),s.current=u,o(u)},[t,r]),wn(()=>{if(n===null||!r||s.current)return;let l=n||(i==null?void 0:i.portalNode);l&&!Rg(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const c=document.createElement("div");c.id=r,c.setAttribute(W1,""),l=u||l,l.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function QR(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=JR({id:n,root:r}),[o,s]=ae.useState(null),l=ae.useRef(null),u=ae.useRef(null),c=ae.useRef(null),p=ae.useRef(null),g=o==null?void 0:o.modal,d=o==null?void 0:o.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return ae.useEffect(()=>{if(!a||!i||g)return;function b(y){a&&Rs(y)&&(y.type==="focusin"?B1:ZA)(a)}return a.addEventListener("focusin",b,!0),a.addEventListener("focusout",b,!0),()=>{a.removeEventListener("focusin",b,!0),a.removeEventListener("focusout",b,!0)}},[a,i,g]),ae.useEffect(()=>{a&&(d||B1(a))},[d,a]),B.jsxs(KC.Provider,{value:ae.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:p,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&B.jsx(gc,{"data-type":"outside",ref:l,onFocus:b=>{if(Rs(b,a)){var y;(y=c.current)==null||y.focus()}else{const f=o?o.domReference:null,v=OC(f);v==null||v.focus()}}}),m&&a&&B.jsx("span",{"aria-owns":a.id,style:dd}),a&&pg.createPortal(t,a),m&&a&&B.jsx(gc,{"data-type":"outside",ref:u,onFocus:b=>{if(Rs(b,a)){var y;(y=p.current)==null||y.focus()}else{const f=o?o.domReference:null,v=MC(f);v==null||v.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,b.nativeEvent,"focus-out"))}}})]})}const ZC=()=>ae.useContext(KC);function U1(e){return ae.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const eB=20;let Wi=[];function Mg(){Wi=Wi.filter(e=>e.isConnected)}function tB(e){Mg(),e&&sa(e)!=="body"&&(Wi.push(e),Wi.length>eB&&(Wi=Wi.slice(-20)))}function X1(){return Mg(),Wi[Wi.length-1]}function nB(e){const t=Il();return kC(e,t)?e:ld(e,t)[0]||e}function Y1(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Il(),a=NA(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return kC(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const rB=ae.forwardRef(function(t,n){return B.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:dd})});function iB(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:p=!0,outsideElementsInert:g=!1,getInsideElements:d=()=>[]}=e,{open:m,onOpenChange:b,events:y,dataRef:f,elements:{domReference:v,floating:C}}=t,S=Vr(()=>{var A;return(A=f.current.floatingContext)==null?void 0:A.nodeId}),_=Vr(d),E=typeof o=="number"&&o<0,x=T1(v)&&E,h=KR(),w=h?a:!0,D=!w||h&&g,I=_a(i),T=_a(o),F=_a(s),P=Ng(),k=ZC(),R=ae.useRef(null),M=ae.useRef(null),O=ae.useRef(!1),z=ae.useRef(!1),G=ae.useRef(-1),U=ae.useRef(-1),J=k!=null,Q=v0(C),ee=Vr(function(A){return A===void 0&&(A=Q),A?ld(A,Il()):[]}),q=Vr(A=>{const L=ee(A);return I.current.map(K=>v&&K==="reference"?v:Q&&K==="floating"?Q:L).filter(Boolean).flat()});ae.useEffect(()=>{if(r||!u)return;function A(K){if(K.key==="Tab"){Vn(Q,bo(vr(Q)))&&ee().length===0&&!x&&Pf(K);const X=q(),le=Hi(K);I.current[0]==="reference"&&le===v&&(Pf(K),K.shiftKey?ao(X[X.length-1]):ao(X[1])),I.current[1]==="floating"&&le===Q&&K.shiftKey&&(Pf(K),ao(X[0]))}}const L=vr(Q);return L.addEventListener("keydown",A),()=>{L.removeEventListener("keydown",A)}},[r,v,Q,u,I,x,ee,q]),ae.useEffect(()=>{if(r||!C)return;function A(L){const K=Hi(L),le=ee().indexOf(K);le!==-1&&(G.current=le)}return C.addEventListener("focusin",A),()=>{C.removeEventListener("focusin",A)}},[r,C,ee]),ae.useEffect(()=>{if(r||!p)return;function A(){z.current=!0,setTimeout(()=>{z.current=!1})}function L(le){const ie=le.relatedTarget,oe=le.currentTarget,ne=Hi(le);queueMicrotask(()=>{const ue=S(),be=!(Vn(v,ie)||Vn(C,ie)||Vn(ie,C)||Vn(k==null?void 0:k.portalNode,ie)||ie!=null&&ie.hasAttribute(zs("focus-guard"))||P&&(wo(P.nodesRef.current,ue).find(ve=>{var pe,$e;return Vn((pe=ve.context)==null?void 0:pe.elements.floating,ie)||Vn(($e=ve.context)==null?void 0:$e.elements.domReference,ie)})||A1(P.nodesRef.current,ue).find(ve=>{var pe,$e,Le;return[(pe=ve.context)==null?void 0:pe.elements.floating,v0(($e=ve.context)==null?void 0:$e.elements.floating)].includes(ie)||((Le=ve.context)==null?void 0:Le.elements.domReference)===ie})));if(oe===v&&Q&&Y1(Q,I),l&&oe!==v&&!(ne!=null&&ne.isConnected)&&bo(vr(Q))===vr(Q).body){jt(Q)&&Q.focus();const ve=G.current,pe=ee(),$e=pe[ve]||pe[pe.length-1]||Q;jt($e)&&$e.focus()}if(f.current.insideReactTree){f.current.insideReactTree=!1;return}(x||!u)&&ie&&be&&!z.current&&ie!==X1()&&(O.current=!0,b(!1,le,"focus-out"))})}const K=!!(!P&&k);function X(){XR(U),f.current.insideReactTree=!0,U.current=window.setTimeout(()=>{f.current.insideReactTree=!1})}if(C&&jt(v))return v.addEventListener("focusout",L),v.addEventListener("pointerdown",A),C.addEventListener("focusout",L),K&&C.addEventListener("focusout",X,!0),()=>{v.removeEventListener("focusout",L),v.removeEventListener("pointerdown",A),C.removeEventListener("focusout",L),K&&C.removeEventListener("focusout",X,!0)}},[r,v,C,Q,u,P,k,b,p,l,ee,x,S,I,f]);const Z=ae.useRef(null),se=ae.useRef(null),te=U1([Z,k==null?void 0:k.beforeInsideRef]),$=U1([se,k==null?void 0:k.afterInsideRef]);ae.useEffect(()=>{var A,L;if(r||!C)return;const K=Array.from((k==null||(A=k.portalNode)==null?void 0:A.querySelectorAll("["+zs("portal")+"]"))||[]),le=(L=(P?A1(P.nodesRef.current,S()):[]).find(ne=>{var ue;return T1(((ue=ne.context)==null?void 0:ue.elements.domReference)||null)}))==null||(L=L.context)==null?void 0:L.elements.domReference,ie=[C,le,...K,..._(),R.current,M.current,Z.current,se.current,k==null?void 0:k.beforeOutsideRef.current,k==null?void 0:k.afterOutsideRef.current,I.current.includes("reference")||x?v:null].filter(ne=>ne!=null),oe=u||x?G1(ie,!D,D):G1(ie);return()=>{oe()}},[r,v,C,u,I,k,x,w,D,P,S,_]),wn(()=>{if(r||!jt(Q))return;const A=vr(Q),L=bo(A);queueMicrotask(()=>{const K=q(Q),X=T.current,le=(typeof X=="number"?K[X]:X.current)||Q,ie=Vn(Q,L);!E&&!ie&&m&&ao(le,{preventScroll:le===Q})})},[r,m,Q,E,q,T]),wn(()=>{if(r||!Q)return;const A=vr(Q),L=bo(A);tB(L);function K(ie){let{reason:oe,event:ne,nested:ue}=ie;if(["hover","safe-polygon"].includes(oe)&&ne.type==="mouseleave"&&(O.current=!0),oe==="outside-press")if(ue)O.current=!1;else if(zA(ne)||GA(ne))O.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?O.current=!1:O.current=!0}}y.on("openchange",K);const X=A.createElement("span");X.setAttribute("tabindex","-1"),X.setAttribute("aria-hidden","true"),Object.assign(X.style,dd),J&&v&&v.insertAdjacentElement("afterend",X);function le(){if(typeof F.current=="boolean"){const ie=v||X1();return ie&&ie.isConnected?ie:X}return F.current.current||X}return()=>{y.off("openchange",K);const ie=bo(A),oe=Vn(C,ie)||P&&wo(P.nodesRef.current,S(),!1).some(ue=>{var be;return Vn((be=ue.context)==null?void 0:be.elements.floating,ie)}),ne=le();queueMicrotask(()=>{const ue=nB(ne);F.current&&!O.current&&jt(ue)&&(!(ue!==ie&&ie!==A.body)||oe)&&ue.focus({preventScroll:!0}),X.remove()})}},[r,C,Q,F,f,y,P,J,v,S]),ae.useEffect(()=>(queueMicrotask(()=>{O.current=!1}),()=>{queueMicrotask(Mg)}),[r]),wn(()=>{if(!r&&k)return k.setFocusManagerState({modal:u,closeOnFocusOut:p,open:m,onOpenChange:b,domReference:v}),()=>{k.setFocusManagerState(null)}},[r,k,u,m,b,p,v]),wn(()=>{r||Q&&Y1(Q,I)},[r,Q,I]);function H(A){return r||!c||!u?null:B.jsx(rB,{ref:A==="start"?R:M,onClick:L=>b(!1,L.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}const V=!r&&w&&(u?!x:!0)&&(J||u);return B.jsxs(B.Fragment,{children:[V&&B.jsx(gc,{"data-type":"inside",ref:te,onFocus:A=>{if(u){const K=q();ao(i[0]==="reference"?K[0]:K[K.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(O.current=!1,Rs(A,k.portalNode)){const K=MC(v);K==null||K.focus()}else{var L;(L=k.beforeOutsideRef.current)==null||L.focus()}}}),!x&&H("start"),n,H("end"),V&&B.jsx(gc,{"data-type":"inside",ref:$,onFocus:A=>{if(u)ao(q()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(p&&(O.current=!0),Rs(A,k.portalNode)){const K=OC(v);K==null||K.focus()}else{var L;(L=k.afterOutsideRef.current)==null||L.focus()}}})]})}function K1(e){return jt(e.target)&&e.target.tagName==="BUTTON"}function aB(e){return jt(e.target)&&e.target.tagName==="A"}function Z1(e){return FC(e)}function oB(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0,stickIfOpen:p=!0}=t,g=ae.useRef(),d=ae.useRef(!1),m=ae.useMemo(()=>({onPointerDown(b){g.current=b.pointerType},onMouseDown(b){const y=g.current;b.button===0&&s!=="click"&&(R1(y)&&u||(n&&l&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="mousedown")?r(!1,b.nativeEvent,"click"):(b.preventDefault(),r(!0,b.nativeEvent,"click"))))},onClick(b){const y=g.current;if(s==="mousedown"&&g.current){g.current=void 0;return}R1(y)&&u||(n&&l&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="click")?r(!1,b.nativeEvent,"click"):r(!0,b.nativeEvent,"click"))},onKeyDown(b){g.current=void 0,!(b.defaultPrevented||!c||K1(b))&&(b.key===" "&&!Z1(a)&&(b.preventDefault(),d.current=!0),!aB(b)&&b.key==="Enter"&&r(!(n&&l),b.nativeEvent,"click"))},onKeyUp(b){b.defaultPrevented||!c||K1(b)||Z1(a)||b.key===" "&&d.current&&(d.current=!1,r(!(n&&l),b.nativeEvent,"click"))}}),[i,a,s,u,c,r,n,p,l]);return ae.useMemo(()=>o?{reference:m}:{},[o,m])}const sB={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},lB={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},q1=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function uB(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:c=!1,referencePressEvent:p="pointerdown",ancestorScroll:g=!1,bubbles:d,capture:m}=t,b=Ng(),y=Vr(typeof l=="function"?l:()=>!1),f=typeof l=="function"?y:l,v=ae.useRef(!1),{escapeKey:C,outsidePress:S}=q1(d),{escapeKey:_,outsidePress:E}=q1(m),x=ae.useRef(!1),h=Vr(P=>{var k;if(!n||!o||!s||P.key!=="Escape"||x.current)return;const R=(k=a.current.floatingContext)==null?void 0:k.nodeId,M=b?wo(b.nodesRef.current,R):[];if(!C&&(P.stopPropagation(),M.length>0)){let O=!0;if(M.forEach(z=>{var G;if((G=z.context)!=null&&G.open&&!z.context.dataRef.current.__escapeKeyBubbles){O=!1;return}}),!O)return}r(!1,jA(P)?P.nativeEvent:P,"escape-key")}),w=Vr(P=>{var k;const R=()=>{var M;h(P),(M=Hi(P))==null||M.removeEventListener("keydown",R)};(k=Hi(P))==null||k.addEventListener("keydown",R)}),D=Vr(P=>{var k;const R=a.current.insideReactTree;a.current.insideReactTree=!1;const M=v.current;if(v.current=!1,u==="click"&&M||R||typeof f=="function"&&!f(P))return;const O=Hi(P),z="["+zs("inert")+"]",G=vr(i.floating).querySelectorAll(z);let U=_t(O)?O:null;for(;U&&!Ci(U);){const q=wi(U);if(Ci(q)||!_t(q))break;U=q}if(G.length&&_t(O)&&!HA(O)&&!Vn(O,i.floating)&&Array.from(G).every(q=>!Vn(U,q)))return;if(jt(O)&&F){const q=Ci(O),Z=Xn(O),se=/auto|scroll/,te=q||se.test(Z.overflowX),$=q||se.test(Z.overflowY),H=te&&O.clientWidth>0&&O.scrollWidth>O.clientWidth,V=$&&O.clientHeight>0&&O.scrollHeight>O.clientHeight,A=Z.direction==="rtl",L=V&&(A?P.offsetX<=O.offsetWidth-O.clientWidth:P.offsetX>O.clientWidth),K=H&&P.offsetY>O.clientHeight;if(L||K)return}const J=(k=a.current.floatingContext)==null?void 0:k.nodeId,Q=b&&wo(b.nodesRef.current,J).some(q=>{var Z;return kf(P,(Z=q.context)==null?void 0:Z.elements.floating)});if(kf(P,i.floating)||kf(P,i.domReference)||Q)return;const ee=b?wo(b.nodesRef.current,J):[];if(ee.length>0){let q=!0;if(ee.forEach(Z=>{var se;if((se=Z.context)!=null&&se.open&&!Z.context.dataRef.current.__outsidePressBubbles){q=!1;return}}),!q)return}r(!1,P,"outside-press")}),I=Vr(P=>{var k;const R=()=>{var M;D(P),(M=Hi(P))==null||M.removeEventListener(u,R)};(k=Hi(P))==null||k.addEventListener(u,R)});ae.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=S;let P=-1;function k(G){r(!1,G,"ancestor-scroll")}function R(){window.clearTimeout(P),x.current=!0}function M(){P=window.setTimeout(()=>{x.current=!1},od()?5:0)}const O=vr(i.floating);s&&(O.addEventListener("keydown",_?w:h,_),O.addEventListener("compositionstart",R),O.addEventListener("compositionend",M)),f&&O.addEventListener(u,E?I:D,E);let z=[];return g&&(_t(i.domReference)&&(z=Ji(i.domReference)),_t(i.floating)&&(z=z.concat(Ji(i.floating))),!_t(i.reference)&&i.reference&&i.reference.contextElement&&(z=z.concat(Ji(i.reference.contextElement)))),z=z.filter(G=>{var U;return G!==((U=O.defaultView)==null?void 0:U.visualViewport)}),z.forEach(G=>{G.addEventListener("scroll",k,{passive:!0})}),()=>{s&&(O.removeEventListener("keydown",_?w:h,_),O.removeEventListener("compositionstart",R),O.removeEventListener("compositionend",M)),f&&O.removeEventListener(u,E?I:D,E),z.forEach(G=>{G.removeEventListener("scroll",k)}),window.clearTimeout(P)}},[a,i,s,f,u,n,r,g,o,C,S,h,_,w,D,E,I]),ae.useEffect(()=>{a.current.insideReactTree=!1},[a,f,u]);const T=ae.useMemo(()=>({onKeyDown:h,...c&&{[sB[p]]:P=>{r(!1,P.nativeEvent,"reference-press")},...p!=="click"&&{onClick(P){r(!1,P.nativeEvent,"reference-press")}}}}),[h,r,c,p]),F=ae.useMemo(()=>({onKeyDown:h,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[lB[u]]:()=>{a.current.insideReactTree=!0}}),[h,u,a]);return ae.useMemo(()=>o?{reference:T,floating:F}:{},[o,T,F])}function cB(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=cd(),a=ae.useRef({}),[o]=ae.useState(()=>GR()),s=XC()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!_t(d)&&jR("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=ae.useState(r.reference),c=Vr((d,m,b)=>{a.current.openEvent=d?m:void 0,o.emit("openchange",{open:d,event:m,reason:b,nested:s}),n==null||n(d,m,b)}),p=ae.useMemo(()=>({setPositionReference:u}),[]),g=ae.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return ae.useMemo(()=>({dataRef:a,open:t,onOpenChange:c,elements:g,events:o,floatingId:i,refs:p}),[t,c,g,o,i,p])}function dB(e){e===void 0&&(e={});const{nodeId:t}=e,n=cB({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=ae.useState(null),[s,l]=ae.useState(null),c=(i==null?void 0:i.domReference)||a,p=ae.useRef(null),g=Ng();wn(()=>{c&&(p.current=c)},[c]);const d=AR({...e,elements:{...i,...s&&{reference:s}}}),m=ae.useCallback(C=>{const S=_t(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;l(S),d.refs.setReference(S)},[d.refs]),b=ae.useCallback(C=>{(_t(C)||C===null)&&(p.current=C,o(C)),(_t(d.refs.reference.current)||d.refs.reference.current===null||C!==null&&!_t(C))&&d.refs.setReference(C)},[d.refs]),y=ae.useMemo(()=>({...d.refs,setReference:b,setPositionReference:m,domReference:p}),[d.refs,b,m]),f=ae.useMemo(()=>({...d.elements,domReference:c}),[d.elements,c]),v=ae.useMemo(()=>({...d,...r,refs:y,elements:f,nodeId:t}),[d,y,f,t,r]);return wn(()=>{r.dataRef.current.floatingContext=v;const C=g==null?void 0:g.nodesRef.current.find(S=>S.id===t);C&&(C.context=v)}),ae.useMemo(()=>({...d,context:v,refs:y,elements:f}),[d,y,f,v])}function Of(e,t,n){const r=new Map,i=n==="item";let a=e;if(i&&e){const{[O1]:o,[L1]:s,...l}=e;a=l}return{...n==="floating"&&{tabIndex:-1,[NR]:""},...a,...t.map(o=>{const s=o?o[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((o,s)=>(s&&Object.entries(s).forEach(l=>{let[u,c]=l;if(!(i&&[O1,L1].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var p;(p=r.get(u))==null||p.push(c),o[u]=function(){for(var g,d=arguments.length,m=new Array(d),b=0;b<d;b++)m[b]=arguments[b];return(g=r.get(u))==null?void 0:g.map(y=>y(...m)).find(y=>y!==void 0)}}}else o[u]=c}),o),{})}}function fB(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),i=ae.useCallback(s=>Of(s,e,"reference"),t),a=ae.useCallback(s=>Of(s,e,"floating"),n),o=ae.useCallback(s=>Of(s,e,"item"),r);return ae.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}const hB=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gB(e,t){var n,r;t===void 0&&(t={});const{open:i,elements:a,floatingId:o}=e,{enabled:s=!0,role:l="dialog"}=t,u=cd(),c=((n=a.domReference)==null?void 0:n.id)||u,p=ae.useMemo(()=>{var v;return((v=v0(a.floating))==null?void 0:v.id)||o},[a.floating,o]),g=(r=hB.get(l))!=null?r:l,m=XC()!=null,b=ae.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?p:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":i?p:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:c},...g==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,p,m,i,c,l]),y=ae.useMemo(()=>{const v={id:p,...g&&{role:g}};return g==="tooltip"||l==="label"?v:{...v,...g==="menu"&&{"aria-labelledby":c}}},[g,p,c,l]),f=ae.useCallback(v=>{let{active:C,selected:S}=v;const _={role:"option",...C&&{id:p+"-fui-option"}};switch(l){case"select":case"combobox":return{..._,"aria-selected":S}}return{}},[p,l]);return ae.useMemo(()=>s?{reference:b,floating:y,item:f}:{},[s,b,y,f])}const J1=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function oo(e,t){return typeof e=="function"?e(t):e}function pB(e,t){const[n,r]=ae.useState(e);return e&&!n&&r(!0),ae.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function mB(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,o=(typeof i=="number"?i:i.close)||0,[s,l]=ae.useState("unmounted"),u=pB(n,o);return!u&&s==="close"&&l("unmounted"),wn(()=>{if(r){if(n){l("initial");const c=requestAnimationFrame(()=>{pg.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(c)}}l("close")}},[n,r]),{isMounted:u,status:s}}function bB(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,s=e.placement,l=s.split("-")[0],u=ae.useMemo(()=>({side:l,placement:s}),[l,s]),c=typeof o=="number",p=(c?o:o.open)||0,g=(c?o:o.close)||0,[d,m]=ae.useState(()=>({...oo(a,u),...oo(n,u)})),{isMounted:b,status:y}=mB(e,{duration:o}),f=_a(n),v=_a(r),C=_a(i),S=_a(a);return wn(()=>{const _=oo(f.current,u),E=oo(C.current,u),x=oo(S.current,u),h=oo(v.current,u)||Object.keys(_).reduce((w,D)=>(w[D]="",w),{});if(y==="initial"&&m(w=>({transitionProperty:w.transitionProperty,...x,..._})),y==="open"&&m({transitionProperty:Object.keys(h).map(J1).join(","),transitionDuration:p+"ms",...x,...h}),y==="close"){const w=E||_;m({transitionProperty:Object.keys(w).map(J1).join(","),transitionDuration:g+"ms",...x,...w})}},[g,C,f,v,S,p,y,u]),{isMounted:b,styles:d}}const vB="_popover_cskuc_1",yB={popover:vB},ei=N.forwardRef((e,t)=>{const{children:n,className:r,offset:i=10,isShow:a,anchorEl:o,useAutoPlacement:s=!1,flipOptions:l,autoPlacementOptions:u,zIndex:c=10,width:p,styleInnerPopover:g={},floatingOptions:d={},onClose:m=()=>{},withArrow:b,propsArrow:y={},floatingFocusManagerProps:f,useDismissProps:v,...C}=e,S=N.useRef(null),[_,E]=N.useState(!1),{refs:x,floatingStyles:h,context:w}=dB({open:_,onOpenChange:z=>{E(z),z||m()},middleware:[BR(i),s?PR(u):kR(l),$R(),FR({element:S})],whileElementsMounted:WC,...d}),D=oB(w),I=uB(w,v),T=gB(w),{getReferenceProps:F,getFloatingProps:P}=fB([D,I,T]),{styles:k,isMounted:R}=bB(w),M=z=>{x.setReference(z.currentTarget),E(G=>!G),_&&m()};N.useEffect(()=>{a&&o?M({currentTarget:o}):a||E(!1)},[a,o]),N.useImperativeHandle(t,()=>({show:_,setShow:E,handlerShow:M,getReferenceProps:F}),[_]);const O=()=>{let z={...h,...k,...g,zIndex:c};return p&&(z={...z,width:p}),z};return B.jsx(B.Fragment,{children:R&&_&&B.jsx(QR,{children:B.jsx(iB,{context:w,modal:!1,...f,children:B.jsxs("div",{ref:x.setFloating,style:O(),...P(),className:`${yB.popover} ${r??""}`,...C,children:[n,b&&B.jsx(zR,{ref:S,context:w,...y})]})})})})});ei.displayName="Popover";const xB="_input_8nct2_12",CB="_label_8nct2_66",EB="_error_8nct2_84",Bn={"container-large":"_container-large_8nct2_1","container-input":"_container-input_8nct2_6",input:xB,label:CB,error:EB,"isset-right-icon":"_isset-right-icon_8nct2_108","isset-left-icon":"_isset-left-icon_8nct2_112","start-icon":"_start-icon_8nct2_134","end-icon":"_end-icon_8nct2_142","label-error":"_label-error_8nct2_152","container-medium":"_container-medium_8nct2_164","container-small":"_container-small_8nct2_327"},SB={size:{large:Bn["container-large"],medium:Bn["container-medium"],small:Bn["container-small"]}},qC=N.forwardRef((e,t)=>{var v;const{isRequired:n,classNameContainer:r,classNameLabelError:i,classNameLabel:a,className:o,name:s,id:l,label:u,type:c="text",startIcon:p,endIcon:g,error:d,sizeInput:m="large",...b}=e,y=()=>typeof p=="function"||N.isValidElement(p),f=()=>typeof g=="function"||N.isValidElement(g);return B.jsxs("div",{className:`${Bn.container} ${(v=SB.size)==null?void 0:v[m]} ${r??""}`,children:[B.jsxs("div",{className:Bn["container-input"],children:[B.jsx("input",{id:l??s,className:`${Bn.input} ${d?Bn.error:""}
|
|
39
|
-
${y()?Bn["isset-left-icon"]:""}
|
|
40
|
-
${f()?Bn["isset-right-icon"]:""}
|
|
41
|
-
${o??""}`,ref:t,type:c,...b}),B.jsxs("div",{className:Bn["start-icon"],children:[typeof p=="function"&&p(),N.isValidElement(p)&&p]}),B.jsxs("label",{className:`${Bn.label} ${a??""}`,htmlFor:l??s,children:[u," ",n&&B.jsx("span",{className:"iru-text-laba-red-08",children:"*"})]}),B.jsxs("div",{className:Bn["end-icon"],children:[typeof g=="function"&&g(),N.isValidElement(g)&&g]})]}),d&&B.jsx("label",{className:`${Bn["label-error"]}
|
|
42
|
-
${b.disabled?Bn.disabled:""} ${i??""}`,children:d})]})});qC.displayName="InputFloatingInner";const wB="_label_1qpwf_6",_B="_disabled_1qpwf_26",IB="_input_1qpwf_39",DB="_error_1qpwf_93",gn={"container-large":"_container-large_1qpwf_1","label-container":"_label-container_1qpwf_6",label:wB,disabled:_B,"content-label":"_content-label_1qpwf_29","container-input":"_container-input_1qpwf_33",input:IB,error:DB,"isset-right-icon":"_isset-right-icon_1qpwf_102","isset-left-icon":"_isset-left-icon_1qpwf_106","start-icon":"_start-icon_1qpwf_110","end-icon":"_end-icon_1qpwf_117","label-error":"_label-error_1qpwf_124","container-medium":"_container-medium_1qpwf_139","container-small":"_container-small_1qpwf_277"},TB={size:{large:gn["container-large"],medium:gn["container-medium"],small:gn["container-small"]}},Og=N.forwardRef((e,t)=>{const{isRequired:n,classNameContainer:r,className:i,classNameLabel:a,classNameLabelError:o,name:s,id:l,label:u,type:c="text",startIcon:p,endIcon:g,error:d,sizeInput:m="large",contentLabel:b,classNameLabelContainer:y,...f}=e,v=()=>typeof p=="function"||N.isValidElement(p),C=()=>typeof g=="function"||N.isValidElement(g);return B.jsxs("div",{className:`${TB.size[m]} ${r??""}`,children:[B.jsxs("div",{className:`${gn["label-container"]} ${y??""}`,children:[u&&B.jsxs("label",{htmlFor:l??s,className:`${gn.label} ${f.disabled?gn.disabled:""} ${a??""}`,children:[u," ",n&&B.jsx("span",{className:"iru-text-laba-red-08",children:"*"})]}),b&&B.jsxs("div",{className:gn["content-label"],children:[typeof b=="function"&&b(),N.isValidElement(b)&&b]})]}),B.jsxs("div",{className:`${gn["container-input"]}`,children:[B.jsxs("div",{className:gn["start-icon"],children:[typeof p=="function"&&p(),N.isValidElement(p)&&p]}),B.jsx("input",{id:l??s,className:`${gn.input} ${d?gn.error:""}
|
|
43
|
-
${v()?gn["isset-left-icon"]:""}
|
|
44
|
-
${C()?gn["isset-right-icon"]:""}
|
|
45
|
-
${i??""}`,ref:t,type:c,...f}),B.jsxs("div",{className:gn["end-icon"],children:[typeof g=="function"&&g(),N.isValidElement(g)&&g]})]}),d&&B.jsx("label",{className:`${gn["label-error"]}
|
|
46
|
-
${f.disabled?gn.disabled:""} ${o??""}`,children:d})]})});Og.displayName="InputReguler";/**
|
|
47
|
-
* table-core
|
|
48
|
-
*
|
|
49
|
-
* Copyright (c) TanStack
|
|
50
|
-
*
|
|
51
|
-
* This source code is licensed under the MIT license found in the
|
|
52
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
53
|
-
*
|
|
54
|
-
* @license MIT
|
|
55
|
-
*/function AB(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function pi(e,t){return typeof e=="function"?e(t):e}function RB(){}function Fn(e,t){return n=>{t.setState(r=>({...r,[e]:pi(n,r[e])}))}}function Dl(e){return e instanceof Function}function JC(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Lg(e,t){const n=[],r=i=>{i.forEach(a=>{n.push(a);const o=t(a);o!=null&&o.length&&r(o)})};return r(e),n}function Se(e,t,n){let r=[],i;return a=>{let o;n.key&&n.debug&&(o=Date.now());const s=e(a);if(!(s.length!==r.length||s.some((c,p)=>r[p]!==c)))return i;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-o)*100)/100,p=Math.round((Date.now()-u)*100)/100,g=p/16,d=(m,b)=>{for(m=String(m);m.length<b;)m=" "+m;return m};console.info(`%c⏱ ${d(p,5)} /${d(c,5)} ms`,`
|
|
56
|
-
font-size: .6rem;
|
|
57
|
-
font-weight: bold;
|
|
58
|
-
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function we(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function QC(e,t,n,r){const i=()=>{var o;return(o=a.getValue())!=null?o:e.options.renderFallbackValue},a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Se(()=>[e,n,t,a],(o,s,l,u)=>({table:o,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),we(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(a,n,t,e)},{}),a}function e2(e,t,n,r){var i,a;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let u=(i=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=g=>{let d=g;for(const b of l.split(".")){var m;d=(m=d)==null?void 0:m[b],process.env.NODE_ENV!=="production"&&d===void 0&&console.warn(`"${b}" in deeply nested key "${l}" returned undefined.`)}return d}:c=g=>g[s.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let p={id:`${String(u)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Se(()=>[!0],()=>{var g;return[p,...(g=p.columns)==null?void 0:g.flatMap(d=>d.getFlatColumns())]},we(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Se(()=>[e._getOrderColumnsFn()],g=>{var d;if((d=p.columns)!=null&&d.length){let m=p.columns.flatMap(b=>b.getLeafColumns());return g(m)}return[p]},we(e.options,"debugColumns","column.getLeafColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(p,e);return p}const fn="debugHeaders";function Q1(e,t,n){var r;let a={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),o.push(l)};return s(a),o},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(a,e)}),a}const t2={createTable:e=>{e.getHeaderGroups=Se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var a,o;const s=(a=r==null?void 0:r.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?a:[],l=(o=i==null?void 0:i.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?o:[],u=n.filter(p=>!(r!=null&&r.includes(p.id))&&!(i!=null&&i.includes(p.id)));return ys(t,[...s,...u,...l],e)},we(e.options,fn,"getHeaderGroups")),e.getCenterHeaderGroups=Se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(a=>!(r!=null&&r.includes(a.id))&&!(i!=null&&i.includes(a.id))),ys(t,n,e,"center")),we(e.options,fn,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const a=(i=r==null?void 0:r.map(o=>n.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return ys(t,a,e,"left")},we(e.options,fn,"getLeftHeaderGroups")),e.getRightHeaderGroups=Se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const a=(i=r==null?void 0:r.map(o=>n.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return ys(t,a,e,"right")},we(e.options,fn,"getRightHeaderGroups")),e.getFooterGroups=Se(()=>[e.getHeaderGroups()],t=>[...t].reverse(),we(e.options,fn,"getFooterGroups")),e.getLeftFooterGroups=Se(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),we(e.options,fn,"getLeftFooterGroups")),e.getCenterFooterGroups=Se(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),we(e.options,fn,"getCenterFooterGroups")),e.getRightFooterGroups=Se(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),we(e.options,fn,"getRightFooterGroups")),e.getFlatHeaders=Se(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),we(e.options,fn,"getFlatHeaders")),e.getLeftFlatHeaders=Se(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),we(e.options,fn,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Se(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),we(e.options,fn,"getCenterFlatHeaders")),e.getRightFlatHeaders=Se(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),we(e.options,fn,"getRightFlatHeaders")),e.getCenterLeafHeaders=Se(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),we(e.options,fn,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Se(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),we(e.options,fn,"getLeftLeafHeaders")),e.getRightLeafHeaders=Se(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),we(e.options,fn,"getRightLeafHeaders")),e.getLeafHeaders=Se(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,a,o,s,l,u;return[...(i=(a=t[0])==null?void 0:a.headers)!=null?i:[],...(o=(s=n[0])==null?void 0:s.headers)!=null?o:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},we(e.options,fn,"getLeafHeaders"))}};function ys(e,t,n,r){var i,a;let o=0;const s=function(g,d){d===void 0&&(d=1),o=Math.max(o,d),g.filter(m=>m.getIsVisible()).forEach(m=>{var b;(b=m.columns)!=null&&b.length&&s(m.columns,d+1)},0)};s(e);let l=[];const u=(g,d)=>{const m={depth:d,id:[r,`${d}`].filter(Boolean).join("_"),headers:[]},b=[];g.forEach(y=>{const f=[...b].reverse()[0],v=y.column.depth===m.depth;let C,S=!1;if(v&&y.column.parent?C=y.column.parent:(C=y.column,S=!0),f&&(f==null?void 0:f.column)===C)f.subHeaders.push(y);else{const _=Q1(n,C,{id:[r,d,C.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${b.filter(E=>E.column===C).length}`:void 0,depth:d,index:b.length});_.subHeaders.push(y),b.push(_)}m.headers.push(y),y.headerGroup=m}),l.push(m),d>0&&u(b,d-1)},c=t.map((g,d)=>Q1(n,g,{depth:o,index:d}));u(c,o-1),l.reverse();const p=g=>g.filter(m=>m.column.getIsVisible()).map(m=>{let b=0,y=0,f=[0];m.subHeaders&&m.subHeaders.length?(f=[],p(m.subHeaders).forEach(C=>{let{colSpan:S,rowSpan:_}=C;b+=S,f.push(_)})):b=1;const v=Math.min(...f);return y=y+v,m.colSpan=b,m.rowSpan=y,{colSpan:b,rowSpan:y}});return p((i=(a=l[0])==null?void 0:a.headers)!=null?i:[]),l}const Tl=(e,t,n,r,i,a,o)=>{let s={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>Lg(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:Se(()=>[e.getAllLeafColumns()],l=>l.map(u=>QC(e,s,u,u.id)),we(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Se(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),we(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},n2={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},r2=(e,t,n)=>{var r,i;const a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(a))};r2.autoRemove=e=>xr(e);const i2=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};i2.autoRemove=e=>xr(e);const a2=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};a2.autoRemove=e=>xr(e);const o2=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};o2.autoRemove=e=>xr(e);const s2=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});s2.autoRemove=e=>xr(e)||!(e!=null&&e.length);const l2=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});l2.autoRemove=e=>xr(e)||!(e!=null&&e.length);const u2=(e,t,n)=>e.getValue(t)===n;u2.autoRemove=e=>xr(e);const c2=(e,t,n)=>e.getValue(t)==n;c2.autoRemove=e=>xr(e);const Vg=(e,t,n)=>{let[r,i]=n;const a=e.getValue(t);return a>=r&&a<=i};Vg.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,a=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(a>o){const s=a;a=o,o=s}return[a,o]};Vg.autoRemove=e=>xr(e)||xr(e[0])&&xr(e[1]);const Mr={includesString:r2,includesStringSensitive:i2,equalsString:a2,arrIncludes:o2,arrIncludesAll:s2,arrIncludesSome:l2,equals:u2,weakEquals:c2,inNumberRange:Vg};function xr(e){return e==null||e===""}const d2={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Fn("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Mr.includesString:typeof r=="number"?Mr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Mr.equals:Array.isArray(r)?Mr.arrIncludes:Mr.weakEquals},e.getFilterFn=()=>{var n,r;return Dl(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Mr[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),a=r==null?void 0:r.find(c=>c.id===e.id),o=pi(n,a?a.value:void 0);if(y0(i,o,e)){var s;return(s=r==null?void 0:r.filter(c=>c.id!==e.id))!=null?s:[]}const l={id:e.id,value:o};if(a){var u;return(u=r==null?void 0:r.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var a;return(a=pi(t,i))==null?void 0:a.filter(o=>{const s=n.find(l=>l.id===o.id);if(s){const l=s.getFilterFn();if(y0(l,o.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function y0(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const BB=(e,t,n)=>n.reduce((r,i)=>{const a=i.getValue(e);return r+(typeof a=="number"?a:0)},0),$B=(e,t,n)=>{let r;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},kB=(e,t,n)=>{let r;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},PB=(e,t,n)=>{let r,i;return n.forEach(a=>{const o=a.getValue(e);o!=null&&(r===void 0?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}),[r,i]},FB=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let a=i.getValue(e);a!=null&&(a=+a)>=a&&(++n,r+=a)}),n)return r/n},NB=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!JC(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((a,o)=>a-o);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},MB=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),OB=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,LB=(e,t)=>t.length,Mu={sum:BB,min:$B,max:kB,extent:PB,mean:FB,median:NB,unique:MB,uniqueCount:OB,count:LB},f2={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Fn("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return Mu.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Mu.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Dl(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Mu[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function h2(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(a=>!t.includes(a.id));return n==="remove"?r:[...t.map(a=>e.find(o=>o.id===a)).filter(Boolean),...r]}const g2={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Fn("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Se(n=>[Do(t,n)],n=>n.findIndex(r=>r.id===e.id),we(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Do(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Do(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Se(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let a=[];if(!(t!=null&&t.length))a=i;else{const o=[...t],s=[...i];for(;s.length&&o.length;){const l=o.shift(),u=s.findIndex(c=>c.id===l);u>-1&&a.push(s.splice(u,1)[0])}a=[...a,...s]}return h2(a,n,r)},we(e.options,"debugTable","_getOrderColumnsFn"))}},Lf=()=>({left:[],right:[]}),p2={getInitialState:e=>({columnPinning:Lf(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Fn("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var a,o;if(n==="right"){var s,l;return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(p=>!(r!=null&&r.includes(p))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(p=>!(r!=null&&r.includes(p))),...r]}}if(n==="left"){var u,c;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(p=>!(r!=null&&r.includes(p))),...r],right:((c=i==null?void 0:i.right)!=null?c:[]).filter(p=>!(r!=null&&r.includes(p)))}}return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(p=>!(r!=null&&r.includes(p))),right:((o=i==null?void 0:i.right)!=null?o:[]).filter(p=>!(r!=null&&r.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,a,o;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((a=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,a=n.some(s=>r==null?void 0:r.includes(s)),o=n.some(s=>i==null?void 0:i.includes(s));return a?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const a=[...r??[],...i??[]];return n.filter(o=>!a.includes(o.column.id))},we(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(a=>n.find(o=>o.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),we(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(a=>n.find(o=>o.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),we(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Lf():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Lf())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,a;return!!((i=r.left)!=null&&i.length||(a=r.right)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),we(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),we(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(a=>!i.includes(a.id))},we(e.options,"debugColumns","getCenterLeafColumns"))}};function VB(e){return e||(typeof document<"u"?document:null)}const xs={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Vf=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),m2={getDefaultColumnDef:()=>xs,getInitialState:e=>({columnSizing:{},columnSizingInfo:Vf(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Fn("columnSizing",e),onColumnSizingInfoChange:Fn("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const a=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:xs.minSize,(r=a??e.columnDef.size)!=null?r:xs.size),(i=e.columnDef.maxSize)!=null?i:xs.maxSize)},e.getStart=Se(n=>[n,Do(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,a)=>i+a.getSize(),0),we(t.options,"debugColumns","getStart")),e.getAfter=Se(n=>[n,Do(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,a)=>i+a.getSize(),0),we(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var a;n+=(a=i.column.getSize())!=null?a:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return a=>{if(!r||!i||(a.persist==null||a.persist(),Hf(a)&&a.touches&&a.touches.length>1))return;const o=e.getSize(),s=e?e.getLeafHeaders().map(f=>[f.column.id,f.column.getSize()]):[[r.id,r.getSize()]],l=Hf(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(f,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(C=>{var S,_;const E=t.options.columnResizeDirection==="rtl"?-1:1,x=(v-((S=C==null?void 0:C.startOffset)!=null?S:0))*E,h=Math.max(x/((_=C==null?void 0:C.startSize)!=null?_:0),-.999999);return C.columnSizingStart.forEach(w=>{let[D,I]=w;u[D]=Math.round(Math.max(I+I*h,0)*100)/100}),{...C,deltaOffset:x,deltaPercentage:h}}),(t.options.columnResizeMode==="onChange"||f==="end")&&t.setColumnSizing(C=>({...C,...u})))},p=f=>c("move",f),g=f=>{c("end",f),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},d=VB(n),m={moveHandler:f=>p(f.clientX),upHandler:f=>{d==null||d.removeEventListener("mousemove",m.moveHandler),d==null||d.removeEventListener("mouseup",m.upHandler),g(f.clientX)}},b={moveHandler:f=>(f.cancelable&&(f.preventDefault(),f.stopPropagation()),p(f.touches[0].clientX),!1),upHandler:f=>{var v;d==null||d.removeEventListener("touchmove",b.moveHandler),d==null||d.removeEventListener("touchend",b.upHandler),f.cancelable&&(f.preventDefault(),f.stopPropagation()),g((v=f.touches[0])==null?void 0:v.clientX)}},y=b2()?{passive:!1}:!1;Hf(a)?(d==null||d.addEventListener("touchmove",b.moveHandler,y),d==null||d.addEventListener("touchend",b.upHandler,y)):(d==null||d.addEventListener("mousemove",m.moveHandler,y),d==null||d.addEventListener("mouseup",m.upHandler,y)),t.setColumnSizingInfo(f=>({...f,startOffset:l,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Vf():(n=e.initialState.columnSizingInfo)!=null?n:Vf())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let eu=null;function b2(){if(typeof eu=="boolean")return eu;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return eu=e,eu}function Hf(e){return e.type==="touchstart"}const v2={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Fn("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Se(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),we(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Se(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],we(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>Se(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),we(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,a)=>({...i,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Do(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const y2={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},x2={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Fn("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,a;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Mr.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Dl(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Mr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},C2={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Fn("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,a;e.setExpanded(r?{}:(i=(a=e.initialState)==null?void 0:a.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const o=a.split(".");r=Math.max(r,o.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const a=r===!0?!0:!!(r!=null&&r[e.id]);let o={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{o[s]=!0}):o=r,n=(i=n)!=null?i:!a,!a&&n)return{...o,[e.id]:!0};if(a&&!n){const{[e.id]:s,...l}=o;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},x0=0,C0=10,jf=()=>({pageIndex:x0,pageSize:C0}),E2={getInitialState:e=>({...e,pagination:{...jf(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Fn("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=a=>pi(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?jf():(i=e.initialState.pagination)!=null?i:jf())},e.setPageIndex=r=>{e.setPagination(i=>{let a=pi(r,i.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,o)),{...i,pageIndex:a}})},e.resetPageIndex=r=>{var i,a;e.setPageIndex(r?x0:(i=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?i:x0)},e.resetPageSize=r=>{var i,a;e.setPageSize(r?C0:(i=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?i:C0)},e.setPageSize=r=>{e.setPagination(i=>{const a=Math.max(1,pi(r,i.pageSize)),o=i.pageSize*i.pageIndex,s=Math.floor(o/a);return{...i,pageIndex:s,pageSize:a}})},e.setPageCount=r=>e.setPagination(i=>{var a;let o=pi(r,(a=e.options.pageCount)!=null?a:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...i,pageCount:o}}),e.getPageOptions=Se(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((a,o)=>o)),i},we(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},zf=()=>({top:[],bottom:[]}),S2={getInitialState:e=>({rowPinning:zf(),...e}),getDefaultOptions:e=>({onRowPinningChange:Fn("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const a=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],o=i?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...o,e.id,...a]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var p,g;return{top:((p=l==null?void 0:l.top)!=null?p:[]).filter(b=>!(s!=null&&s.has(b))),bottom:[...((g=l==null?void 0:l.bottom)!=null?g:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)]}}if(n==="top"){var d,m;return{top:[...((d=l==null?void 0:l.top)!=null?d:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)],bottom:((m=l==null?void 0:l.bottom)!=null?m:[]).filter(b=>!(s!=null&&s.has(b)))}}return{top:((u=l==null?void 0:l.top)!=null?u:[]).filter(b=>!(s!=null&&s.has(b))),bottom:((c=l==null?void 0:l.bottom)!=null?c:[]).filter(b=>!(s!=null&&s.has(b)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,a=n.some(s=>r==null?void 0:r.includes(s)),o=n.some(s=>i==null?void 0:i.includes(s));return a?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const a=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:s}=o;return s});return(r=a==null?void 0:a.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?zf():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:zf())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,a;return!!((i=r.top)!=null&&i.length||(a=r.bottom)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(o=>{const s=e.getRow(o,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(o=>t.find(s=>s.id===o))).filter(Boolean).map(o=>({...o,position:r}))},e.getTopRows=Se(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),we(e.options,"debugRows","getTopRows")),e.getBottomRows=Se(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),we(e.options,"debugRows","getBottomRows")),e.getCenterRows=Se(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(a=>!i.has(a.id))},we(e.options,"debugRows","getCenterRows"))}},w2={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Fn("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):i.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(a=>{E0(i,a.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Se(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ou(e,n):{rows:[],flatRows:[],rowsById:{}},we(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Se(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ou(e,n):{rows:[],flatRows:[],rowsById:{}},we(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Se(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ou(e,n):{rows:[],flatRows:[],rowsById:{}},we(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(a=>{var o;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return a;const s={...a};return E0(s,e.id,n,(o=r==null?void 0:r.selectChildren)!=null?o:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return fd(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return pc(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return pc(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},E0=(e,t,n,r,i)=>{var a;const o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=o.subRows)!=null&&a.length&&o.getCanSelectSubRows()&&o.subRows.forEach(s=>E0(e,s.id,n,r,i))};function Ou(e,t){const n=e.getState().rowSelection,r=[],i={},a=function(o,s){return o.map(l=>{var u;const c=fd(l,n);if(c&&(r.push(l),i[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:a(l.subRows)}),c)return l}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:i}}function fd(e,t){var n;return(n=t[e.id])!=null?n:!1}function pc(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,a=!1;return e.subRows.forEach(o=>{if(!(a&&!i)&&(o.getCanSelect()&&(fd(o,t)?a=!0:i=!1),o.subRows&&o.subRows.length)){const s=pc(o,t);s==="all"?a=!0:(s==="some"&&(a=!0),i=!1)}}),i?"all":a?"some":!1}const mc=/([0-9]+)/gm,HB=(e,t,n)=>_2(ra(e.getValue(n)).toLowerCase(),ra(t.getValue(n)).toLowerCase()),jB=(e,t,n)=>_2(ra(e.getValue(n)),ra(t.getValue(n))),zB=(e,t,n)=>Hg(ra(e.getValue(n)).toLowerCase(),ra(t.getValue(n)).toLowerCase()),GB=(e,t,n)=>Hg(ra(e.getValue(n)),ra(t.getValue(n))),WB=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},UB=(e,t,n)=>Hg(e.getValue(n),t.getValue(n));function Hg(e,t){return e===t?0:e>t?1:-1}function ra(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function _2(e,t){const n=e.split(mc).filter(Boolean),r=t.split(mc).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),a=r.shift(),o=parseInt(i,10),s=parseInt(a,10),l=[o,s].sort();if(isNaN(l[0])){if(i>a)return 1;if(a>i)return-1;continue}if(isNaN(l[1]))return isNaN(o)?-1:1;if(o>s)return 1;if(s>o)return-1}return n.length-r.length}const vo={alphanumeric:HB,alphanumericCaseSensitive:jB,text:zB,textCaseSensitive:GB,datetime:WB,basic:UB},I2={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Fn("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const a=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return vo.datetime;if(typeof a=="string"&&(r=!0,a.split(mc).length>1))return vo.alphanumeric}return r?vo.text:vo.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Dl(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:vo[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;t.setSorting(o=>{const s=o==null?void 0:o.find(d=>d.id===e.id),l=o==null?void 0:o.findIndex(d=>d.id===e.id);let u=[],c,p=a?n:i==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":o!=null&&o.length&&l!==o.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(a||i||(c="remove")),c==="add"){var g;u=[...o,{id:e.id,desc:p}],u.splice(0,u.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=o.map(d=>d.id===e.id?{...d,desc:p}:d):c==="remove"?u=o.filter(d=>d.id!==e.id):u=[{id:e.id,desc:p}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const a=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:o==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},XB=[t2,v2,g2,p2,n2,d2,y2,x2,I2,f2,C2,E2,S2,w2,m2];function D2(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...XB,...(t=e._features)!=null?t:[]];let i={_features:r};const a=i._features.reduce((g,d)=>Object.assign(g,d.getDefaultOptions==null?void 0:d.getDefaultOptions(i)),{}),o=g=>i.options.mergeOptions?i.options.mergeOptions(a,g):{...a,...g};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(g=>{var d;l=(d=g.getInitialState==null?void 0:g.getInitialState(l))!=null?d:l});const u=[];let c=!1;const p={_features:r,options:{...a,...e},initialState:l,_queue:g=>{u.push(g),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(d=>setTimeout(()=>{throw d})))},reset:()=>{i.setState(i.initialState)},setOptions:g=>{const d=pi(g,i.options);i.options=o(d)},getState:()=>i.options.state,setState:g=>{i.options.onStateChange==null||i.options.onStateChange(g)},_getRowId:(g,d,m)=>{var b;return(b=i.options.getRowId==null?void 0:i.options.getRowId(g,d,m))!=null?b:`${m?[m.id,d].join("."):d}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(g,d)=>{let m=(d?i.getPrePaginationRowModel():i.getRowModel()).rowsById[g];if(!m&&(m=i.getCoreRowModel().rowsById[g],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${g}`):new Error;return m},_getDefaultColumnDef:Se(()=>[i.options.defaultColumn],g=>{var d;return g=(d=g)!=null?d:{},{header:m=>{const b=m.header.column.columnDef;return b.accessorKey?b.accessorKey:b.accessorFn?b.id:null},cell:m=>{var b,y;return(b=(y=m.renderValue())==null||y.toString==null?void 0:y.toString())!=null?b:null},...i._features.reduce((m,b)=>Object.assign(m,b.getDefaultColumnDef==null?void 0:b.getDefaultColumnDef()),{}),...g}},we(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:Se(()=>[i._getColumnDefs()],g=>{const d=function(m,b,y){return y===void 0&&(y=0),m.map(f=>{const v=e2(i,f,y,b),C=f;return v.columns=C.columns?d(C.columns,v,y+1):[],v})};return d(g)},we(e,"debugColumns","getAllColumns")),getAllFlatColumns:Se(()=>[i.getAllColumns()],g=>g.flatMap(d=>d.getFlatColumns()),we(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Se(()=>[i.getAllFlatColumns()],g=>g.reduce((d,m)=>(d[m.id]=m,d),{}),we(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Se(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(g,d)=>{let m=g.flatMap(b=>b.getLeafColumns());return d(m)},we(e,"debugColumns","getAllLeafColumns")),getColumn:g=>{const d=i._getAllFlatColumnsById()[g];return process.env.NODE_ENV!=="production"&&!d&&console.error(`[Table] Column with id '${g}' does not exist.`),d}};Object.assign(i,p);for(let g=0;g<i._features.length;g++){const d=i._features[g];d==null||d.createTable==null||d.createTable(i)}return i}function YB(){return e=>Se(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,a,o){a===void 0&&(a=0);const s=[];for(let u=0;u<i.length;u++){const c=Tl(e,e._getRowId(i[u],u,o),i[u],u,a,void 0,o==null?void 0:o.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(i[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,a+1,c))}}return s};return n.rows=r(t),n},we(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function KB(){return e=>Se(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(t,n,r)=>!n.rows.length||t!==!0&&!Object.keys(t??{}).length||!r?n:jg(n),we(e.options,"debugTable","getExpandedRowModel"))}function jg(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function ZB(){return(e,t)=>Se(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return;const r=n.flatRows.flatMap(o=>{var s;return(s=o.getUniqueValues(t))!=null?s:[]}).map(Number).filter(o=>!Number.isNaN(o));if(!r.length)return;let i=r[0],a=r[r.length-1];for(const o of r)o<i?i=o:o>a&&(a=o);return[i,a]},we(e.options,"debugTable","getFacetedMinMaxValues"))}function T2(e,t,n){return n.options.filterFromLeafRows?qB(e,t,n):JB(e,t,n)}function qB(e,t,n){var r;const i=[],a={},o=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);const c=[];for(let g=0;g<l.length;g++){var p;let d=l[g];const m=Tl(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);if(m.columnFilters=d.columnFilters,(p=d.subRows)!=null&&p.length&&u<o){if(m.subRows=s(d.subRows,u+1),d=m,t(d)&&!m.subRows.length){c.push(d),a[d.id]=d,i.push(d);continue}if(t(d)||m.subRows.length){c.push(d),a[d.id]=d,i.push(d);continue}}else d=m,t(d)&&(c.push(d),a[d.id]=d,i.push(d))}return c};return{rows:s(e),flatRows:i,rowsById:a}}function JB(e,t,n){var r;const i=[],a={},o=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);const c=[];for(let g=0;g<l.length;g++){let d=l[g];if(t(d)){var p;if((p=d.subRows)!=null&&p.length&&u<o){const b=Tl(n,d.id,d.original,d.index,d.depth,void 0,d.parentId);b.subRows=s(d.subRows,u+1),d=b}c.push(d),i.push(d),a[d.id]=d}}return c};return{rows:s(e),flatRows:i,rowsById:a}}function QB(){return(e,t)=>Se(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const a=[...r.map(s=>s.id).filter(s=>s!==t),i?"__global__":void 0].filter(Boolean),o=s=>{for(let l=0;l<a.length;l++)if(s.columnFilters[a[l]]===!1)return!1;return!0};return T2(n.rows,o,e)},we(e.options,"debugTable","getFacetedRowModel"))}function e9(){return(e,t)=>Se(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let a=0;a<n.flatRows.length;a++){const o=n.flatRows[a].getUniqueValues(t);for(let s=0;s<o.length;s++){const l=o[s];if(r.has(l)){var i;r.set(l,((i=r.get(l))!=null?i:0)+1)}else r.set(l,1)}}return r},we(e.options,"debugTable",`getFacetedUniqueValues_${t}`))}function t9(){return e=>Se(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let g=0;g<t.flatRows.length;g++)t.flatRows[g].columnFilters={},t.flatRows[g].columnFiltersMeta={};return t}const i=[],a=[];(n??[]).forEach(g=>{var d;const m=e.getColumn(g.id);if(!m)return;const b=m.getFilterFn();if(!b){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);return}i.push({id:g.id,filterFn:b,resolvedValue:(d=b.resolveFilterValue==null?void 0:b.resolveFilterValue(g.value))!=null?d:g.value})});const o=(n??[]).map(g=>g.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(g=>g.getCanGlobalFilter());r&&s&&l.length&&(o.push("__global__"),l.forEach(g=>{var d;a.push({id:g.id,filterFn:s,resolvedValue:(d=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?d:r})}));let u,c;for(let g=0;g<t.flatRows.length;g++){const d=t.flatRows[g];if(d.columnFilters={},i.length)for(let m=0;m<i.length;m++){u=i[m];const b=u.id;d.columnFilters[b]=u.filterFn(d,b,u.resolvedValue,y=>{d.columnFiltersMeta[b]=y})}if(a.length){for(let m=0;m<a.length;m++){c=a[m];const b=c.id;if(c.filterFn(d,b,c.resolvedValue,y=>{d.columnFiltersMeta[b]=y})){d.columnFilters.__global__=!0;break}}d.columnFilters.__global__!==!0&&(d.columnFilters.__global__=!1)}}const p=g=>{for(let d=0;d<o.length;d++)if(g.columnFilters[o[d]]===!1)return!1;return!0};return T2(t.rows,p,e)},we(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function n9(){return e=>Se(()=>[e.getState().grouping,e.getPreGroupedRowModel()],(t,n)=>{if(!n.rows.length||!t.length)return n.rows.forEach(l=>{l.depth=0,l.parentId=void 0}),n;const r=t.filter(l=>e.getColumn(l)),i=[],a={},o=function(l,u,c){if(u===void 0&&(u=0),u>=r.length)return l.map(m=>(m.depth=u,i.push(m),a[m.id]=m,m.subRows&&(m.subRows=o(m.subRows,u+1,m.id)),m));const p=r[u],g=r9(l,p);return Array.from(g.entries()).map((m,b)=>{let[y,f]=m,v=`${p}:${y}`;v=c?`${c}>${v}`:v;const C=o(f,u+1,v);C.forEach(E=>{E.parentId=v});const S=u?Lg(f,E=>E.subRows):f,_=Tl(e,v,S[0].original,b,u,void 0,c);return Object.assign(_,{groupingColumnId:p,groupingValue:y,subRows:C,leafRows:S,getValue:E=>{if(r.includes(E)){if(_._valuesCache.hasOwnProperty(E))return _._valuesCache[E];if(f[0]){var x;_._valuesCache[E]=(x=f[0].getValue(E))!=null?x:void 0}return _._valuesCache[E]}if(_._groupingValuesCache.hasOwnProperty(E))return _._groupingValuesCache[E];const h=e.getColumn(E),w=h==null?void 0:h.getAggregationFn();if(w)return _._groupingValuesCache[E]=w(E,S,f),_._groupingValuesCache[E]}}),C.forEach(E=>{i.push(E),a[E.id]=E}),_})},s=o(n.rows,0);return s.forEach(l=>{i.push(l),a[l.id]=l}),{rows:s,flatRows:i,rowsById:a}},we(e.options,"debugTable","getGroupedRowModel",()=>{e._queue(()=>{e._autoResetExpanded(),e._autoResetPageIndex()})}))}function r9(e,t){const n=new Map;return e.reduce((r,i)=>{const a=`${i.getGroupingValue(t)}`,o=r.get(a);return o?o.push(i):r.set(a,[i]),r},n)}function i9(e){return t=>Se(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:a}=n;let{rows:o,flatRows:s,rowsById:l}=r;const u=i*a,c=u+i;o=o.slice(u,c);let p;t.options.paginateExpandedRows?p={rows:o,flatRows:s,rowsById:l}:p=jg({rows:o,flatRows:s,rowsById:l}),p.flatRows=[];const g=d=>{p.flatRows.push(d),d.subRows.length&&d.subRows.forEach(g)};return p.rows.forEach(g),p},we(t.options,"debugTable","getPaginationRowModel"))}function a9(){return e=>Se(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],a=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),o={};a.forEach(l=>{const u=e.getColumn(l.id);u&&(o[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const s=l=>{const u=l.map(c=>({...c}));return u.sort((c,p)=>{for(let d=0;d<a.length;d+=1){var g;const m=a[d],b=o[m.id],y=b.sortUndefined,f=(g=m==null?void 0:m.desc)!=null?g:!1;let v=0;if(y){const C=c.getValue(m.id),S=p.getValue(m.id),_=C===void 0,E=S===void 0;if(_||E){if(y==="first")return _?-1:1;if(y==="last")return _?1:-1;v=_&&E?0:_?y:-y}}if(v===0&&(v=b.sortingFn(c,p,m.id)),v!==0)return f&&(v*=-1),b.invertSorting&&(v*=-1),v}return c.index-p.index}),u.forEach(c=>{var p;i.push(c),(p=c.subRows)!=null&&p.length&&(c.subRows=s(c.subRows))}),u};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},we(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
59
|
-
* react-table
|
|
60
|
-
*
|
|
61
|
-
* Copyright (c) TanStack
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the MIT license found in the
|
|
64
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
-
*
|
|
66
|
-
* @license MIT
|
|
67
|
-
*/function Vo(e,t){return e?o9(e)?ae.createElement(e,t):e:null}function o9(e){return s9(e)||typeof e=="function"||l9(e)}function s9(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function l9(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function u9(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=ae.useState(()=>({current:D2(t)})),[r,i]=ae.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}const c9=Object.freeze(Object.defineProperty({__proto__:null,ColumnFaceting:n2,ColumnFiltering:d2,ColumnGrouping:f2,ColumnOrdering:g2,ColumnPinning:p2,ColumnSizing:m2,ColumnVisibility:v2,GlobalFaceting:y2,GlobalFiltering:x2,Headers:t2,RowExpanding:C2,RowPagination:E2,RowPinning:S2,RowSelection:w2,RowSorting:I2,_getVisibleLeafColumns:Do,aggregationFns:Mu,buildHeaderGroups:ys,createCell:QC,createColumn:e2,createColumnHelper:AB,createRow:Tl,createTable:D2,defaultColumnSizing:xs,expandRows:jg,filterFns:Mr,flattenBy:Lg,flexRender:Vo,functionalUpdate:pi,getCoreRowModel:YB,getExpandedRowModel:KB,getFacetedMinMaxValues:ZB,getFacetedRowModel:QB,getFacetedUniqueValues:e9,getFilteredRowModel:t9,getGroupedRowModel:n9,getMemoOptions:we,getPaginationRowModel:i9,getSortedRowModel:a9,isFunction:Dl,isNumberArray:JC,isRowSelected:fd,isSubRowSelected:pc,makeStateUpdater:Fn,memo:Se,noop:RB,orderColumns:h2,passiveEventSupported:b2,reSplitAlphaNumeric:mc,selectRowsFn:Ou,shouldAutoRemoveFilter:y0,sortingFns:vo,useReactTable:u9},Symbol.toStringTag,{value:"Module"})),hd=0,la=1,Qo=2,A2=4;function eb(e){return()=>e}function d9(e){e()}function Gs(e,t){return n=>e(t(n))}function tb(e,t){return()=>e(t)}function f9(e,t){return n=>e(t,n)}function zg(e){return e!==void 0}function h9(...e){return()=>{e.map(d9)}}function es(){}function gd(e,t){return t(e),e}function g9(e,t){return t(e)}function gt(...e){return e}function et(e,t){return e(la,t)}function Oe(e,t){e(hd,t)}function Gg(e){e(Qo)}function mt(e){return e(A2)}function Ee(e,t){return et(e,f9(t,hd))}function Cr(e,t){const n=e(la,r=>{n(),t(r)});return n}function nb(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function R2(e,t){return e===t}function ft(e=R2){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Be(e){return t=>n=>{e(n)&&t(n)}}function xe(e){return t=>Gs(t,e)}function Or(e){return t=>()=>{t(e)}}function fe(e,...t){const n=p9(...t);return(r,i)=>{switch(r){case Qo:Gg(e);return;case la:return et(e,n(i))}}}function jr(e,t){return n=>r=>{n(t=e(t,r))}}function Va(e){return t=>n=>{e>0?e--:t(n)}}function mi(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Ve(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const s=Math.pow(2,o);et(a,l=>{const u=n;n=n|s,t[o]=l,u!==i&&n===i&&r&&(r(),r=null)})}),a=>o=>{const s=()=>{a([o].concat(t))};n===i?s():r=s}}function p9(...e){return t=>e.reduceRight(g9,t)}function m9(e){let t,n;const r=()=>t==null?void 0:t();return function(i,a){switch(i){case la:return a?n===a?void 0:(r(),n=a,t=et(e,a),t):(r(),es);case Qo:r(),n=null;return}}}function ge(e){let t=e;const n=We();return(r,i)=>{switch(r){case hd:t=i;break;case la:{i(t);break}case A2:return t}return n(r,i)}}function bn(e,t){return gd(ge(t),n=>Ee(e,n))}function We(){const e=[];return(t,n)=>{switch(t){case hd:e.slice().forEach(r=>{r(n)});return;case Qo:e.splice(0,e.length);return;case la:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function Wn(e){return gd(We(),t=>Ee(e,t))}function Ye(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:b9(),singleton:n}}const b9=()=>Symbol();function v9(e){const t=new Map,n=({constructor:r,dependencies:i,id:a,singleton:o})=>{if(o&&t.has(a))return t.get(a);const s=r(i.map(l=>n(l)));return o&&t.set(a,s),s};return n(e)}function Nt(...e){const t=We(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const s=Math.pow(2,o);et(a,l=>{n[o]=l,r=r|s,r===i&&Oe(t,n)})}),function(a,o){switch(a){case Qo:{Gg(t);return}case la:return r===i&&o(n),et(t,o)}}}function ke(e,t=R2){return fe(e,ft(t))}function S0(...e){return function(t,n){switch(t){case Qo:return;case la:return h9(...e.map(r=>et(r,n)))}}}var kn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(kn||{});const y9={0:"debug",3:"error",1:"log",2:"warn"},x9=()=>typeof globalThis>"u"?window:globalThis,ua=Ye(()=>{const e=ge(3);return{log:ge((t,n,r=1)=>{var i;const a=(i=x9().VIRTUOSO_LOG_LEVEL)!=null?i:mt(e);r>=a&&console[y9[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function qr(e,t,n){return Wg(e,t,n).callbackRef}function Wg(e,t,n){const r=N.useRef(null);let i=o=>{};const a=N.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(o=>{const s=()=>{const l=o[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return i=o=>{o&&t?(a==null||a.observe(o),r.current=o):(r.current&&(a==null||a.unobserve(r.current)),r.current=null)},{callbackRef:i,ref:r}}function B2(e,t,n,r,i,a,o,s,l){const u=N.useCallback(c=>{const p=C9(c.children,t,s?"offsetWidth":"offsetHeight",i);let g=c.parentElement;for(;!g.dataset.virtuosoScroller;)g=g.parentElement;const d=g.lastElementChild.dataset.viewportType==="window";let m;d&&(m=g.ownerDocument.defaultView);const b=o?s?o.scrollLeft:o.scrollTop:d?s?m.scrollX||m.document.documentElement.scrollLeft:m.scrollY||m.document.documentElement.scrollTop:s?g.scrollLeft:g.scrollTop,y=o?s?o.scrollWidth:o.scrollHeight:d?s?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight:s?g.scrollWidth:g.scrollHeight,f=o?s?o.offsetWidth:o.offsetHeight:d?s?m.innerWidth:m.innerHeight:s?g.offsetWidth:g.offsetHeight;r({scrollHeight:y,scrollTop:Math.max(b,0),viewportHeight:f}),a==null||a(s?rb("column-gap",getComputedStyle(c).columnGap,i):rb("row-gap",getComputedStyle(c).rowGap,i)),p!==null&&e(p)},[e,t,i,a,o,r,s]);return Wg(u,n,l)}function C9(e,t,n,r){const i=e.length;if(i===0)return null;const a=[];for(let o=0;o<i;o++){const s=e.item(o);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),u=parseFloat(s.dataset.knownSize),c=t(s,n);if(c===0&&r("Zero-sized element, this should not happen",{child:s},kn.ERROR),c===u)continue;const p=a[a.length-1];a.length===0||p.size!==c||p.endIndex!==l-1?a.push({endIndex:l,size:c,startIndex:l}):a[a.length-1].endIndex++}return a}function rb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,kn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Ug(e,t,n){const r=N.useRef(null),i=N.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const u=l.getBoundingClientRect(),c=u.width;let p,g;if(t){const d=t.getBoundingClientRect(),m=u.top-d.top;g=d.height-Math.max(0,m),p=m+t.scrollTop}else{const d=o.current.ownerDocument.defaultView;g=d.innerHeight-Math.max(0,u.top),p=u.top+d.scrollY}r.current={offsetTop:p,visibleHeight:g,visibleWidth:c},e(r.current)},[e,t]),{callbackRef:a,ref:o}=Wg(i,!0,n),s=N.useCallback(()=>{i(o.current)},[i,o]);return N.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const u=new ResizeObserver(()=>{requestAnimationFrame(s)});return u.observe(t),()=>{t.removeEventListener("scroll",s),u.unobserve(t)}}else{const u=(l=o.current)==null?void 0:l.ownerDocument.defaultView;return u==null||u.addEventListener("scroll",s),u==null||u.addEventListener("resize",s),()=>{u==null||u.removeEventListener("scroll",s),u==null||u.removeEventListener("resize",s)}}},[s,t,o]),a}const In=Ye(()=>{const e=We(),t=We(),n=ge(0),r=We(),i=ge(0),a=We(),o=We(),s=ge(0),l=ge(0),u=ge(0),c=ge(0),p=We(),g=We(),d=ge(!1),m=ge(!1),b=ge(!1);return Ee(fe(e,xe(({scrollTop:y})=>y)),t),Ee(fe(e,xe(({scrollHeight:y})=>y)),o),Ee(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:m,scrollBy:g,scrollContainerState:e,scrollHeight:o,scrollingInProgress:d,scrollTo:p,scrollTop:t,skipAnimationFrameInResizeObserver:b,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),Ws={lvl:0};function $2(e,t){const n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]);const a=[];for(let o=1;o<n;o++){const{index:s,value:l}=t(e[o]);a.push({end:s-1,start:r,value:i}),r=s,i=l}return a.push({end:1/0,start:r,value:i}),a}function ot(e){return e===Ws}function Us(e,t){if(!ot(e))return t===e.k?e.v:t<e.k?Us(e.l,t):Us(e.r,t)}function Sr(e,t,n="k"){if(ot(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Sr(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Sr(e.l,t,n)}function zn(e,t,n){return ot(e)?F2(t,n,1):t===e.k?Ht(e,{k:t,v:n}):t<e.k?ib(Ht(e,{l:zn(e.l,t,n)})):ib(Ht(e,{r:zn(e.r,t,n)}))}function To(){return Ws}function pd(e,t,n){if(ot(e))return[];const r=Sr(e,t)[0];return E9(_0(e,r,n))}function w0(e,t){if(ot(e))return Ws;const{k:n,l:r,r:i}=e;if(t===n){if(ot(r))return i;if(ot(i))return r;{const[a,o]=P2(r);return Lu(Ht(e,{k:a,l:k2(r),v:o}))}}else return t<n?Lu(Ht(e,{l:w0(r,t)})):Lu(Ht(e,{r:w0(i,t)}))}function Ia(e){return ot(e)?[]:[...Ia(e.l),{k:e.k,v:e.v},...Ia(e.r)]}function _0(e,t,n){if(ot(e))return[];const{k:r,l:i,r:a,v:o}=e;let s=[];return r>t&&(s=s.concat(_0(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(_0(a,t,n))),s}function Lu(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Gf(t))return N2(Ht(e,{lvl:n-1}));if(!ot(t)&&!ot(t.r))return Ht(t.r,{l:Ht(t,{r:t.r.l}),lvl:n,r:Ht(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Gf(e))return I0(Ht(e,{lvl:n-1}));if(!ot(r)&&!ot(r.l)){const i=r.l,a=Gf(i)?r.lvl-1:r.lvl;return Ht(i,{l:Ht(e,{lvl:n-1,r:i.l}),lvl:i.lvl+1,r:I0(Ht(r,{l:i.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function Ht(e,t){return F2(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function k2(e){return ot(e.r)?e.l:Lu(Ht(e,{r:k2(e.r)}))}function Gf(e){return ot(e)||e.lvl>e.r.lvl}function P2(e){return ot(e.r)?[e.k,e.v]:P2(e.r)}function F2(e,t,n,r=Ws,i=Ws){return{k:e,l:r,lvl:n,r:i,v:t}}function ib(e){return I0(N2(e))}function N2(e){const{l:t}=e;return!ot(t)&&t.lvl===e.lvl?Ht(t,{r:Ht(e,{l:t.r})}):e}function I0(e){const{lvl:t,r:n}=e;return!ot(n)&&!ot(n.r)&&n.lvl===t&&n.r.lvl===t?Ht(n,{l:Ht(e,{r:n.l}),lvl:t+1}):e}function E9(e){return $2(e,({k:t,v:n})=>({index:t,value:n}))}function M2(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Xs(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Xg=Ye(()=>({recalcInProgress:ge(!1)}),[],{singleton:!0});function O2(e,t,n){return e[bc(e,t,n)]}function bc(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function S9(e,t,n,r){const i=bc(e,t,r),a=bc(e,n,r,i);return e.slice(i,a+1)}function wr(e,t){return Math.round(e.getBoundingClientRect()[t])}function md(e){return!ot(e.groupOffsetTree)}function Yg({index:e},t){return t===e?0:t<e?-1:1}function w9(){return{groupIndices:[],groupOffsetTree:To(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:To()}}function _9(e,t){let n=ot(e)?0:1/0;for(const r of t){const{endIndex:i,size:a,startIndex:o}=r;if(n=Math.min(n,o),ot(e)){e=zn(e,0,a);continue}const s=pd(e,o-1,i+1);if(s.some($9(r)))continue;let l=!1,u=!1;for(const{end:c,start:p,value:g}of s)l?(i>=p||a===g)&&(e=w0(e,p)):(u=g!==a,l=!0),c>i&&i>=p&&g!==a&&(e=zn(e,i+1,g));u&&(e=zn(e,o,a))}return[e,n]}function I9(e){return typeof e.groupIndex<"u"}function D9({offset:e},t){return t===e?0:t<e?-1:1}function Ys(e,t,n){if(t.length===0)return 0;const{index:r,offset:i,size:a}=O2(t,e,Yg),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function L2(e,t){if(!md(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function V2(e,t,n){if(I9(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let i=L2(r,t);return i=Math.max(0,i,Math.min(n,i)),i}}function T9(e,t,n,r=0){return r>0&&(t=Math.max(t,O2(e,r,Yg).offset)),$2(S9(e,t,n,D9),B9)}function A9(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,kn.DEBUG);const a=e.sizeTree;let o=a,s=0;if(n.length>0&&ot(a)&&t.length===2){const g=t[0].size,d=t[1].size;o=n.reduce((m,b)=>zn(zn(m,b,g),b+1,d),o)}else[o,s]=_9(o,t);if(o===a)return e;const{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:p}=D0(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((g,d)=>zn(g,d,Ys(d,p,i)),To()),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:p,sizeTree:o}}function R9(e){return Ia(e).map(({k:t,v:n},r,i)=>{const a=i[r+1];return{endIndex:a?a.k-1:1/0,size:n,startIndex:t}})}function ab(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function D0(e,t,n,r){let i=e,a=0,o=0,s=0,l=0;if(t!==0){l=bc(i,t-1,Yg),s=i[l].offset;const u=Sr(n,t-1);a=u[0],o=u[1],i.length&&i[l].size===Sr(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(const{start:u,value:c}of pd(n,t,1/0)){const p=u-a,g=p*o+s+p*r;i.push({index:u,offset:g,size:c}),a=u,s=g,o=c}return{lastIndex:a,lastOffset:s,lastSize:o,offsetTree:i}}function B9(e){return{index:e.index,value:e}}function $9(e){const{endIndex:t,size:n,startIndex:r}=e;return i=>i.start===r&&(i.end===t||i.end===1/0)&&i.value===n}const k9={offsetHeight:"height",offsetWidth:"width"},ti=Ye(([{log:e},{recalcInProgress:t}])=>{const n=We(),r=We(),i=bn(r,0),a=We(),o=We(),s=ge(0),l=ge([]),u=ge(void 0),c=ge(void 0),p=ge(void 0),g=ge(void 0),d=ge((x,h)=>wr(x,k9[h])),m=ge(void 0),b=ge(0),y=w9(),f=bn(fe(n,Ve(l,e,b),jr(A9,y),ft()),y),v=bn(fe(l,ft(),jr((x,h)=>({current:h,prev:x.current}),{current:[],prev:[]}),xe(({prev:x})=>x)),[]);Ee(fe(l,Be(x=>x.length>0),Ve(f,b),xe(([x,h,w])=>{const D=x.reduce((I,T,F)=>zn(I,T,Ys(T,h.offsetTree,w)||F),To());return{...h,groupIndices:x,groupOffsetTree:D}})),f),Ee(fe(r,Ve(f),Be(([x,{lastIndex:h}])=>x<h),xe(([x,{lastIndex:h,lastSize:w}])=>[{endIndex:h,size:w,startIndex:x}])),n),Ee(u,c);const C=bn(fe(u,xe(x=>x===void 0)),!0);Ee(fe(c,Be(x=>x!==void 0&&ot(mt(f).sizeTree)),xe(x=>{const h=mt(p),w=mt(l).length>0;return h?w?[{endIndex:0,size:h,startIndex:0},{endIndex:1,size:x,startIndex:1}]:[]:[{endIndex:0,size:x,startIndex:0}]})),n),Ee(fe(g,Be(x=>x!==void 0&&x.length>0&&ot(mt(f).sizeTree)),xe(x=>{const h=[];let w=x[0],D=0;for(let I=1;I<x.length;I++){const T=x[I];T!==w&&(h.push({endIndex:I-1,size:w,startIndex:D}),w=T,D=I)}return h.push({endIndex:x.length-1,size:w,startIndex:D}),h})),n),Ee(fe(l,Ve(p,c),Be(([,x,h])=>x!==void 0&&h!==void 0),xe(([x,h,w])=>{const D=[];for(let I=0;I<x.length;I++){const T=x[I],F=x[I+1];D.push({startIndex:T,endIndex:T,size:h}),F!==void 0&&D.push({startIndex:T+1,endIndex:F-1,size:w})}return D})),n);const S=Wn(fe(n,Ve(f),jr(({sizes:x},[h,w])=>({changed:w!==x,sizes:w}),{changed:!1,sizes:y}),xe(x=>x.changed)));et(fe(s,jr((x,h)=>({diff:x.prev-h,prev:h}),{diff:0,prev:0}),xe(x=>x.diff)),x=>{const{groupIndices:h}=mt(f);if(x>0)Oe(t,!0),Oe(a,x+ab(x,h));else if(x<0){const w=mt(v);w.length>0&&(x-=ab(-x,w)),Oe(o,x)}}),et(fe(s,Ve(e)),([x,h])=>{x<0&&h("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},kn.ERROR)});const _=Wn(a);Ee(fe(a,Ve(f),xe(([x,h])=>{const w=h.groupIndices.length>0,D=[],I=h.lastSize;if(w){const T=Us(h.sizeTree,0);let F=0,P=0;for(;F<x;){const R=h.groupIndices[P],M=h.groupIndices.length===P+1?1/0:h.groupIndices[P+1]-R-1;D.push({endIndex:R,size:T,startIndex:R}),D.push({endIndex:R+1+M-1,size:I,startIndex:R+1}),P++,F+=M+1}const k=Ia(h.sizeTree);return F!==x&&k.shift(),k.reduce((R,{k:M,v:O})=>{let z=R.ranges;return R.prevSize!==0&&(z=[...R.ranges,{endIndex:M+x-1,size:R.prevSize,startIndex:R.prevIndex}]),{prevIndex:M+x,prevSize:O,ranges:z}},{prevIndex:x,prevSize:0,ranges:D}).ranges}return Ia(h.sizeTree).reduce((T,{k:F,v:P})=>({prevIndex:F+x,prevSize:P,ranges:[...T.ranges,{endIndex:F+x-1,size:T.prevSize,startIndex:T.prevIndex}]}),{prevIndex:0,prevSize:I,ranges:[]}).ranges})),n);const E=Wn(fe(o,Ve(f,b),xe(([x,{offsetTree:h},w])=>{const D=-x;return Ys(D,h,w)})));return Ee(fe(o,Ve(f,b),xe(([x,h,w])=>{if(h.groupIndices.length>0){if(ot(h.sizeTree))return h;let D=To();const I=mt(v);let T=0,F=0,P=0;for(;T<-x;){P=I[F];const k=I[F+1]-P-1;F++,T+=k+1}if(D=Ia(h.sizeTree).reduce((k,{k:R,v:M})=>zn(k,Math.max(0,R+x),M),D),T!==-x){const k=Us(h.sizeTree,P);D=zn(D,0,k);const R=Sr(h.sizeTree,-x+1)[1];D=zn(D,1,R)}return{...h,sizeTree:D,...D0(h.offsetTree,0,D,w)}}else{const D=Ia(h.sizeTree).reduce((I,{k:T,v:F})=>zn(I,Math.max(0,T+x),F),To());return{...h,sizeTree:D,...D0(h.offsetTree,0,D,w)}}})),f),{beforeUnshiftWith:_,data:m,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,fixedGroupSize:p,gap:b,groupIndices:l,heightEstimates:g,itemSize:d,listRefresh:S,shiftWith:o,shiftWithOffset:E,sizeRanges:n,sizes:f,statefulTotalCount:i,totalCount:r,trackItemSizes:C,unshiftWith:a}},gt(ua,Xg),{singleton:!0});function P9(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const H2=Ye(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const a=We(),o=We(),s=Wn(fe(a,xe(P9)));return Ee(fe(s,xe(l=>l.totalCount)),n),Ee(fe(s,xe(l=>l.groupIndices)),e),Ee(fe(Nt(i,t,r),Be(([l,u])=>md(u)),xe(([l,u,c])=>Sr(u.groupOffsetTree,Math.max(l-c,0),"v")[0]),ft(),xe(l=>[l])),o),{groupCounts:a,topItemsIndexes:o}},gt(ti,In)),ca=Ye(([{log:e}])=>{const t=ge(!1),n=Wn(fe(t,Be(r=>r),ft()));return et(t,r=>{r&&mt(e)("props updated",{},kn.DEBUG)}),{didMount:n,propsReady:t}},gt(ua),{singleton:!0}),F9=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function j2(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!F9)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Al=Ye(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:p},{log:g}])=>{const d=We(),m=We(),b=ge(0);let y=null,f=null,v=null;function C(){y&&(y(),y=null),v&&(v(),v=null),f&&(clearTimeout(f),f=null),Oe(l,!1)}return Ee(fe(d,Ve(n,p,r,b,s,o,g),Ve(e,a,i),xe(([[S,_,E,x,h,w,D,I],T,F,P])=>{const k=j2(S),{align:R,behavior:M,offset:O}=k,z=x-1,G=V2(k,_,z);let U=Ys(G,_.offsetTree,T)+w;R==="end"?(U+=F+Sr(_.sizeTree,G)[1]-E+P,G===z&&(U+=D)):R==="center"?U+=(F+Sr(_.sizeTree,G)[1]-E+P)/2:U-=h,O&&(U+=O);const J=Q=>{C(),Q?(I("retrying to scroll to",{location:S},kn.DEBUG),Oe(d,S)):(Oe(m,!0),I("list did not change, scroll successful",{},kn.DEBUG))};if(C(),M==="smooth"){let Q=!1;v=et(t,ee=>{Q=Q||ee}),y=Cr(c,()=>{J(Q)})}else y=Cr(fe(t,N9(150)),J);return f=setTimeout(()=>{C()},1200),Oe(l,!0),I("scrolling from index to",{behavior:M,index:G,top:U},kn.DEBUG),{behavior:M,top:U}})),u),{scrollTargetReached:m,scrollToIndex:d,topListHeight:b}},gt(ti,In,ua),{singleton:!0});function N9(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Kg(e,t){e==0?t():requestAnimationFrame(()=>{Kg(e-1,t)})}function Zg(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Rl=Ye(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{const s=ge(!0),l=ge(0),u=ge(!0);return Ee(fe(o,Ve(l),Be(([c,p])=>!!p),Or(!1)),s),Ee(fe(o,Ve(l),Be(([c,p])=>!!p),Or(!1)),u),et(fe(Nt(t,o),Ve(s,n,e,u),Be(([[,c],p,{sizeTree:g},d,m])=>c&&(!ot(g)||zg(d))&&!p&&!m),Ve(l)),([,c])=>{Cr(i,()=>{Oe(u,!0)}),Kg(4,()=>{Cr(r,()=>{Oe(s,!0)}),Oe(a,c)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}},gt(ti,In,Al,ca),{singleton:!0});function z2(e,t){return Math.abs(e-t)<1.01}const Ks="up",Bs="down",M9="none",O9={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},L9=0,Bl=Ye(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{const o=ge(!1),s=ge(!0),l=We(),u=We(),c=ge(4),p=ge(L9),g=bn(fe(S0(fe(ke(i),Va(1),Or(!0)),fe(ke(i),Va(1),Or(!1),nb(100))),ft()),!1),d=bn(fe(S0(fe(n,Or(!0)),fe(n,Or(!1),nb(200))),ft()),!1);Ee(fe(Nt(ke(i),ke(p)),xe(([v,C])=>v<=C),ft()),s),Ee(fe(s,mi(50)),u);const m=Wn(fe(Nt(r,ke(a),ke(t),ke(e),ke(c)),jr((v,[{scrollHeight:C,scrollTop:S},_,E,x,h])=>{const w=S+_-C>-h,D={scrollHeight:C,scrollTop:S,viewportHeight:_};if(w){let T,F;return S>v.state.scrollTop?(T="SCROLLED_DOWN",F=v.state.scrollTop-S):(T="SIZE_DECREASED",F=v.state.scrollTop-S||v.scrollTopDelta),{atBottom:!0,atBottomBecause:T,scrollTopDelta:F,state:D}}let I;return D.scrollHeight>v.state.scrollHeight?I="SIZE_INCREASED":_<v.state.viewportHeight?I="VIEWPORT_HEIGHT_DECREASING":S<v.state.scrollTop?I="SCROLLING_UPWARDS":I="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:I,state:D}},O9),ft((v,C)=>v&&v.atBottom===C.atBottom))),b=bn(fe(r,jr((v,{scrollHeight:C,scrollTop:S,viewportHeight:_})=>{if(z2(v.scrollHeight,C))return{changed:!1,jump:0,scrollHeight:C,scrollTop:S};{const E=C-(S+_)<1;return v.scrollTop!==S&&E?{changed:!0,jump:v.scrollTop-S,scrollHeight:C,scrollTop:S}:{changed:!0,jump:0,scrollHeight:C,scrollTop:S}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Be(v=>v.changed),xe(v=>v.jump)),0);Ee(fe(m,xe(v=>v.atBottom)),o),Ee(fe(o,mi(50)),l);const y=ge(Bs);Ee(fe(r,xe(({scrollTop:v})=>v),ft(),jr((v,C)=>mt(d)?{direction:v.direction,prevScrollTop:C}:{direction:C<v.prevScrollTop?Ks:Bs,prevScrollTop:C},{direction:Bs,prevScrollTop:0}),xe(v=>v.direction)),y),Ee(fe(r,mi(50),Or(M9)),y);const f=ge(0);return Ee(fe(g,Be(v=>!v),Or(0)),f),Ee(fe(i,mi(100),Ve(g),Be(([v,C])=>!!C),jr(([v,C],[S])=>[C,S],[0,0]),xe(([v,C])=>C-v)),f),{atBottomState:m,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:p,isAtBottom:o,isAtTop:s,isScrolling:g,lastJumpDueToItemResize:b,scrollDirection:y,scrollVelocity:f}},gt(In)),vc="top",yc="bottom",ob="none";function sb(e,t,n){return typeof e=="number"?n===Ks&&t===vc||n===Bs&&t===yc?e:0:n===Ks?t===vc?e.main:e.reverse:t===yc?e.main:e.reverse}function lb(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const qg=Ye(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const a=We(),o=ge(0),s=ge(0),l=ge(0),u=bn(fe(Nt(ke(r),ke(i),ke(n),ke(a,Xs),ke(l),ke(o),ke(t),ke(e),ke(s)),xe(([c,p,g,[d,m],b,y,f,v,C])=>{const S=c-v,_=y+f,E=Math.max(g-S,0);let x=ob;const h=lb(C,vc),w=lb(C,yc);return d-=v,d+=g+f,m+=g+f,m-=v,d>c+_-h&&(x=Ks),m<c-E+p+w&&(x=Bs),x!==ob?[Math.max(S-g-sb(b,vc,x)-h,0),S-E-f+p+sb(b,yc,x)+w]:null}),Be(c=>c!=null),ft(Xs)),[0,0]);return{increaseViewportBy:s,listBoundary:a,overscan:l,topListHeight:o,visibleRange:u}},gt(In),{singleton:!0});function V9(e,t,n){if(md(t)){const r=L2(e,t);return[{index:Sr(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:r,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:e,offset:0,size:0}]}const Wf={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Vu(e,t,n,r,i,a){const{lastIndex:o,lastOffset:s,lastSize:l}=i;let u=0,c=0;if(e.length>0){u=e[0].offset;const b=e[e.length-1];c=b.offset+b.size}const p=n-o,g=s+p*l+(p-1)*r,d=u,m=g-c;return{bottom:c,firstItemIndex:a,items:ub(e,i,a),offsetBottom:m,offsetTop:u,top:d,topItems:ub(t,i,a),topListHeight:t.reduce((b,y)=>y.size+b,0),totalCount:n}}function G2(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(const c of n.groupIndices){if(c-o>=e)break;o++}const s=e+o,l=Zg(t,s),u=Array.from({length:s}).map((c,p)=>({data:a[p+l],index:p+l,offset:0,size:0}));return Vu(u,[],s,i,n,r)}function ub(e,t,n){if(e.length===0)return[];if(!md(t))return e.map(u=>({...u,index:u.index+n,originalIndex:u.index}));const r=e[0].index,i=e[e.length-1].index,a=[],o=pd(t.groupOffsetTree,r,i);let s,l=0;for(const u of e){(!s||s.end<u.index)&&(s=o.shift(),l=t.groupIndices.indexOf(s.start));let c;u.index===s.start?c={index:l,type:"group"}:c={groupIndex:l,index:u.index-(l+1)+n},a.push({...c,data:u.data,offset:u.offset,originalIndex:u.index,size:u.size})}return a}const qa=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:c},{topListHeight:p},g,{didMount:d},{recalcInProgress:m}])=>{const b=ge([]),y=ge(0),f=We();Ee(a.topItemsIndexes,b);const v=bn(fe(Nt(d,m,ke(l,Xs),ke(i),ke(r),ke(u),c,ke(b),ke(t),ke(n),e),Be(([E,x,,h,,,,,,,w])=>{const D=w&&w.length!==h;return E&&!x&&!D}),xe(([,,[E,x],h,w,D,I,T,F,P,k])=>{const R=w,{offsetTree:M,sizeTree:O}=R,z=mt(y);if(h===0)return{...Wf,totalCount:h};if(E===0&&x===0)return z===0?{...Wf,totalCount:h}:G2(z,D,w,F,P,k||[]);if(ot(O))return z>0?null:Vu(V9(Zg(D,h),R,k),[],h,P,R,F);const G=[];if(T.length>0){const q=T[0],Z=T[T.length-1];let se=0;for(const te of pd(O,q,Z)){const $=te.value,H=Math.max(te.start,q),V=Math.min(te.end,Z);for(let A=H;A<=V;A++)G.push({data:k==null?void 0:k[A],index:A,offset:se,size:$}),se+=$}}if(!I)return Vu([],G,h,P,R,F);const U=T.length>0?T[T.length-1]+1:0,J=T9(M,E,x,U);if(J.length===0)return null;const Q=h-1,ee=gd([],q=>{for(const Z of J){const se=Z.value;let te=se.offset,$=Z.start;const H=se.size;if(se.offset<E){$+=Math.floor((E-se.offset+P)/(H+P));const A=$-Z.start;te+=A*H+A*P}$<U&&(te+=(U-$)*H,$=U);const V=Math.min(Z.end,Q);for(let A=$;A<=V&&!(te>=x);A++)q.push({data:k==null?void 0:k[A],index:A,offset:te,size:H}),te+=H+P}});return Vu(ee,G,h,P,R,F)}),Be(E=>E!==null),ft()),Wf);Ee(fe(e,Be(zg),xe(E=>E==null?void 0:E.length)),i),Ee(fe(v,xe(E=>E.topListHeight)),p),Ee(p,s),Ee(fe(v,xe(E=>[E.top,E.bottom])),o),Ee(fe(v,xe(E=>E.items)),f);const C=Wn(fe(v,Be(({items:E})=>E.length>0),Ve(i,e),Be(([{items:E},x])=>E[E.length-1].originalIndex===x-1),xe(([,E,x])=>[E-1,x]),ft(Xs),xe(([E])=>E))),S=Wn(fe(v,mi(200),Be(({items:E,topItems:x})=>E.length>0&&E[0].originalIndex===x.length),xe(({items:E})=>E[0].index),ft())),_=Wn(fe(v,Be(({items:E})=>E.length>0),xe(({items:E})=>{let x=0,h=E.length-1;for(;E[x].type==="group"&&x<h;)x++;for(;E[h].type==="group"&&h>x;)h--;return{endIndex:E[h].index,startIndex:E[x].index}}),ft(M2)));return{endReached:C,initialItemCount:y,itemsRendered:f,listState:v,rangeChanged:_,startReached:S,topItemsIndexes:b,...g}},gt(ti,H2,qg,Rl,Al,Bl,ca,Xg),{singleton:!0}),W2=Ye(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const a=We(),o=bn(fe(Nt(n,e,r,t,i),xe(([s,l,u,c,p])=>s+l+u+c+p.offsetBottom+p.bottom)),0);return Ee(ke(o),a),{totalListHeight:o,totalListHeightChanged:a}},gt(In,qa),{singleton:!0}),H9=Ye(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ge(!1),r=bn(fe(Nt(n,e,t),Be(([i])=>i),xe(([,i,a])=>Math.max(0,i-a)),mi(0),ft()),0);return{alignToBottom:n,paddingTopAddition:r}},gt(In,W2),{singleton:!0}),U2=Ye(()=>({context:ge(null)})),j9=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??"start",behavior:r}:e>a?{...i,align:n??"end",behavior:r}:null,X2=Ye(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{const c=We();return Ee(fe(c,Ve(t,l,n,a,i,r,s),Ve(e),xe(([[p,g,d,m,b,y,f,v],C])=>{const{align:S,behavior:_,calculateViewLocation:E=j9,done:x,...h}=p,w=V2(p,g,m-1),D=Ys(w,g.offsetTree,C)+b+y,I=D+Sr(g.sizeTree,w)[1],T=v+y,F=v+d-f,P=E({itemBottom:I,itemTop:D,locationParams:{align:S,behavior:_,...h},viewportBottom:F,viewportTop:T});return P?x&&Cr(fe(o,Be(k=>!k),Va(mt(o)?1:2)),x):x&&x(),P}),Be(p=>p!==null)),u),{scrollIntoView:c}},gt(ti,In,Al,qa,ua),{singleton:!0});function cb(e){return e?e==="smooth"?"smooth":"auto":!1}const z9=(e,t)=>typeof e=="function"?cb(e(t)):t&&cb(e),G9=Ye(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:s},{didMount:l,propsReady:u},{log:c},{scrollingInProgress:p},{context:g},{scrollIntoView:d}])=>{const m=ge(!1),b=We();let y=null;function f(_){Oe(o,{align:"end",behavior:_,index:"LAST"})}et(fe(Nt(fe(ke(t),Va(1)),l),Ve(ke(m),a,s,p),xe(([[_,E],x,h,w,D])=>{let I=E&&w,T="auto";return I&&(T=z9(x,h||D),I=I&&!!T),{followOutputBehavior:T,shouldFollow:I,totalCount:_}}),Be(({shouldFollow:_})=>_)),({followOutputBehavior:_,totalCount:E})=>{y&&(y(),y=null),mt(n)?requestAnimationFrame(()=>{mt(c)("following output to ",{totalCount:E},kn.DEBUG),f(_)}):y=Cr(e,()=>{mt(c)("following output to ",{totalCount:E},kn.DEBUG),f(_),y=null})});function v(_){const E=Cr(i,x=>{_&&!x.atBottom&&x.notAtBottomBecause==="SIZE_INCREASED"&&!y&&(mt(c)("scrolling to bottom due to increased size",{},kn.DEBUG),f("auto"))});setTimeout(E,100)}et(fe(Nt(ke(m),t,u),Be(([_,,E])=>_&&E),jr(({value:_},[,E])=>({refreshed:_===E,value:E}),{refreshed:!1,value:0}),Be(({refreshed:_})=>_),Ve(m,t)),([,_])=>{mt(s)&&v(_!==!1)}),et(b,()=>{v(mt(m)!==!1)}),et(Nt(ke(m),i),([_,E])=>{_&&!E.atBottom&&E.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")});const C=ge(null),S=We();return Ee(S0(fe(ke(r),xe(_=>{var E;return(E=_==null?void 0:_.length)!=null?E:0})),fe(ke(t))),S),et(fe(Nt(fe(S,Va(1)),l),Ve(ke(C),s,p,g),xe(([[_,E],x,h,w,D])=>E&&h&&(x==null?void 0:x({context:D,totalCount:_,scrollingInProgress:w}))),Be(_=>!!_),mi(0)),_=>{y&&(y(),y=null),mt(n)?requestAnimationFrame(()=>{mt(c)("scrolling into view",{}),Oe(d,_)}):y=Cr(e,()=>{mt(c)("scrolling into view",{}),Oe(d,_),y=null})}),{autoscrollToBottom:b,followOutput:m,scrollIntoViewOnChange:C}},gt(ti,Bl,Al,Rl,ca,ua,In,U2,X2)),W9=Ye(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(Ee(fe(s,Ve(a),Be(([,l])=>l!==0),Ve(i,r,t,n,e),xe(([[,l],u,c,p,g,d=[]])=>G2(l,u,c,p,g,d))),o),{}),gt(ti,Rl,qa,ca),{singleton:!0}),U9=Ye(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ge(0);return et(fe(e,Ve(r),Be(([,i])=>i!==0),xe(([,i])=>({top:i}))),i=>{Cr(fe(n,Va(1),Be(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Oe(t,i)})})}),{initialScrollTop:r}},gt(ca,In,qa),{singleton:!0}),Y2=Ye(([{scrollVelocity:e}])=>{const t=ge(!1),n=We(),r=ge(!1);return Ee(fe(e,Ve(r,t,n),Be(([i,a])=>!!a),xe(([i,a,o,s])=>{const{enter:l,exit:u}=a;if(o){if(u(i,s))return!1}else if(l(i,s))return!0;return o}),ft()),t),et(fe(Nt(t,e,n),Ve(r)),([[i,a,o],s])=>{i&&s&&s.change&&s.change(a,o)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},gt(Bl),{singleton:!0}),Jg=Ye(([{scrollContainerState:e,scrollTo:t}])=>{const n=We(),r=We(),i=We(),a=ge(!1),o=ge(void 0);return Ee(fe(Nt(n,r),xe(([{scrollHeight:s,scrollTop:l,viewportHeight:u},{offsetTop:c}])=>({scrollHeight:s,scrollTop:Math.max(0,l-c),viewportHeight:u}))),e),Ee(fe(t,Ve(r),xe(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},gt(In)),X9=Ye(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:l}])=>{const u=We(),c=ge(void 0),p=ge(null),g=ge(null);return Ee(s,p),Ee(l,g),et(fe(u,Ve(t,r,o,p,g,n)),([d,m,b,y,f,v,C])=>{const S=R9(m.sizeTree);y&&f!==null&&v!==null&&(b=f.scrollTop-v.offsetTop),b-=C,d({ranges:S,scrollTop:b})}),Ee(fe(c,Be(zg),xe(Y9)),i),Ee(fe(a,Ve(c),Be(([,d])=>d!==void 0),ft(),xe(([,d])=>d.ranges)),e),{getState:u,restoreStateFrom:c}},gt(ti,In,Rl,ca,Jg));function Y9(e){return{align:"start",index:0,offset:e.scrollTop}}const K9=Ye(([{topItemsIndexes:e}])=>{const t=ge(0);return Ee(fe(t,Be(n=>n>=0),xe(n=>Array.from({length:n}).map((r,i)=>i))),e),{topItemCount:t}},gt(qa));function K2(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const Z9=K2(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),q9=Ye(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:p,sizes:g},{log:d},{recalcInProgress:m}])=>{const b=Wn(fe(l,Ve(o),jr(([,f,v,C],[{bottom:S,items:_,offsetBottom:E,totalCount:x},h])=>{const w=S+E;let D=0;return v===x&&f.length>0&&_.length>0&&(_[0].originalIndex===0&&f[0].originalIndex===0||(D=w-C,D!==0&&(D+=h))),[D,_,x,w]},[0,[],0,0]),Be(([f])=>f!==0),Ve(r,s,n,i,d,m),Be(([,f,v,C,,,S])=>!S&&!C&&f!==0&&v===Ks),xe(([[f],,,,,v])=>(v("Upward scrolling compensation",{amount:f},kn.DEBUG),f))));function y(f){f>0?(Oe(t,{behavior:"auto",top:-f}),Oe(e,0)):(Oe(e,0),Oe(t,{behavior:"auto",top:-f}))}return et(fe(b,Ve(e,a)),([f,v,C])=>{C&&Z9()?Oe(e,v-f):y(-f)}),et(fe(Nt(bn(a,!1),e,m),Be(([f,v,C])=>!f&&!C&&v!==0),xe(([f,v])=>v),mi(1)),y),Ee(fe(p,xe(f=>({top:-f}))),t),et(fe(u,Ve(g,c),xe(([f,{groupIndices:v,lastSize:C,sizeTree:S},_])=>{function E(x){return x*(C+_)}if(v.length===0)return E(f);{let x=0;const h=Us(S,0);let w=0,D=0;for(;w<f;){w++,x+=h;let I=v.length===D+1?1/0:v[D+1]-v[D]-1;w+I>f&&(x-=h,I=f-w+1),w+=I,x+=E(I),D++}return x}})),f=>{Oe(e,f),requestAnimationFrame(()=>{Oe(t,{top:f}),requestAnimationFrame(()=>{Oe(e,0),Oe(m,!1)})})}),{deviation:e}},gt(In,Bl,qa,ti,ua,Xg)),J9=Ye(([e,t,n,r,i,a,o,s,l,u,c])=>({...e,...t,...n,...r,...i,...a,...o,...s,...l,...u,...c}),gt(qg,W9,ca,Y2,W2,U9,H9,Jg,X2,ua,U2)),Z2=Ye(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:s,itemSize:l,sizeRanges:u,sizes:c,statefulTotalCount:p,totalCount:g,trackItemSizes:d},{initialItemFinalLocationReached:m,initialTopMostItemIndex:b,scrolledToInitialItem:y},f,v,C,{listState:S,topItemsIndexes:_,...E},{scrollToIndex:x},h,{topItemCount:w},{groupCounts:D},I])=>(Ee(E.rangeChanged,I.scrollSeekRangeChanged),Ee(fe(I.windowViewportRect,xe(T=>T.visibleHeight)),f.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:D,heightEstimates:s,initialItemFinalLocationReached:m,initialTopMostItemIndex:b,scrolledToInitialItem:y,sizeRanges:u,topItemCount:w,topItemsIndexes:_,totalCount:g,...C,groupIndices:o,itemSize:l,listState:S,scrollToIndex:x,statefulTotalCount:p,trackItemSizes:d,...E,...I,...f,sizes:c,...v}),gt(ti,Rl,In,X9,G9,qa,Al,q9,K9,H2,J9));function Q9(e,t){const n={},r={};let i=0;const a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(const o in t)Object.hasOwn(r,o)||(n[o]=t[o]);return n}const tu=typeof document<"u"?N.useLayoutEffect:N.useEffect;function Qg(e,t,n){const r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=N.createContext({});function l(y,f){y.propsReady&&Oe(y.propsReady,!1);for(const v of r){const C=y[t.required[v]];Oe(C,f[v])}for(const v of i)if(v in f){const C=y[t.optional[v]];Oe(C,f[v])}y.propsReady&&Oe(y.propsReady,!0)}function u(y){return a.reduce((f,v)=>(f[v]=C=>{const S=y[t.methods[v]];Oe(S,C)},f),{})}function c(y){return o.reduce((f,v)=>(f[v]=m9(y[t.events[v]]),f),{})}const p=N.forwardRef((y,f)=>{const{children:v,...C}=y,[S]=N.useState(()=>gd(v9(e),x=>{l(x,C)})),[_]=N.useState(tb(c,S));tu(()=>{for(const x of o)x in C&&et(_[x],C[x]);return()=>{Object.values(_).map(Gg)}},[C,_,S]),tu(()=>{l(S,C)}),N.useImperativeHandle(f,eb(u(S)));const E=n;return B.jsx(s.Provider,{value:S,children:n?B.jsx(E,{...Q9([...r,...i,...o],C),children:v}):v})}),g=y=>{const f=N.useContext(s);return N.useCallback(v=>{Oe(f[y],v)},[f,y])},d=y=>{const f=N.useContext(s)[y],v=N.useCallback(C=>et(f,C),[f]);return N.useSyncExternalStore(v,()=>mt(f),()=>mt(f))},m=y=>{const f=N.useContext(s)[y],[v,C]=N.useState(tb(mt,f));return tu(()=>et(f,S=>{S!==v&&C(eb(S))}),[f,v]),v},b=N.version.startsWith("18")?d:m;return{Component:p,useEmitter:(y,f)=>{const v=N.useContext(s)[y];tu(()=>et(v,f),[f,v])},useEmitterValue:b,usePublisher:g}}const bd=N.createContext(void 0),q2=N.createContext(void 0),J2=typeof document<"u"?N.useLayoutEffect:N.useEffect;function Uf(e){return"self"in e}function e$(e){return"body"in e}function Q2(e,t,n,r=es,i,a){const o=N.useRef(null),s=N.useRef(null),l=N.useRef(null),u=N.useCallback(g=>{let d,m,b;const y=g.target;if(e$(y)||Uf(y)){const v=Uf(y)?y:y.defaultView;b=a?v.scrollX:v.scrollY,d=a?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight,m=a?v.innerWidth:v.innerHeight}else b=a?y.scrollLeft:y.scrollTop,d=a?y.scrollWidth:y.scrollHeight,m=a?y.offsetWidth:y.offsetHeight;const f=()=>{e({scrollHeight:d,scrollTop:Math.max(b,0),viewportHeight:m})};g.suppressFlushSync?f():Zo.flushSync(f),s.current!==null&&(b===s.current||b<=0||b===d-m)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,a]);N.useEffect(()=>{const g=i||o.current;return r(i||o.current),u({suppressFlushSync:!0,target:g}),g.addEventListener("scroll",u,{passive:!0}),()=>{r(null),g.removeEventListener("scroll",u)}},[o,u,n,r,i]);function c(g){const d=o.current;if(!d||(a?"offsetWidth"in d&&d.offsetWidth===0:"offsetHeight"in d&&d.offsetHeight===0))return;const m=g.behavior==="smooth";let b,y,f;Uf(d)?(y=Math.max(wr(d.document.documentElement,a?"width":"height"),a?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight),b=a?d.innerWidth:d.innerHeight,f=a?window.scrollX:window.scrollY):(y=d[a?"scrollWidth":"scrollHeight"],b=wr(d,a?"width":"height"),f=d[a?"scrollLeft":"scrollTop"]);const v=y-b;if(g.top=Math.ceil(Math.max(Math.min(v,g.top),0)),z2(b,y)||g.top===f){e({scrollHeight:y,scrollTop:f,viewportHeight:b}),m&&t(!0);return}m?(s.current=g.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,a&&(g={behavior:g.behavior,left:g.top}),d.scrollTo(g)}function p(g){a&&(g={behavior:g.behavior,left:g.top}),o.current.scrollBy(g)}return{scrollByCallback:p,scrollerRef:o,scrollToCallback:c}}const Xf="-webkit-sticky",db="sticky",ep=K2(()=>{if(typeof document>"u")return db;const e=document.createElement("div");return e.style.position=Xf,e.style.position===Xf?Xf:db});function tp(e){return e}const t$=Ye(()=>{const e=ge(s=>`Item ${s}`),t=ge(s=>`Group ${s}`),n=ge({}),r=ge(tp),i=ge("div"),a=ge(es),o=(s,l=null)=>bn(fe(n,xe(u=>u[s]),ft()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:i,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),n$=Ye(([e,t])=>({...e,...t}),gt(Z2,t$)),r$=({height:e})=>B.jsx("div",{style:{height:e}}),i$={overflowAnchor:"none",position:ep(),zIndex:1},e4={overflowAnchor:"none"},a$={...e4,display:"inline-block",height:"100%"},fb=N.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=or("sizeRanges"),r=Fe("useWindowScroll"),i=Fe("customScrollParent"),a=or("windowScrollContainerState"),o=or("scrollContainerState"),s=i||r?a:o,l=Fe("itemContent"),u=Fe("context"),c=Fe("groupContent"),p=Fe("trackItemSizes"),g=Fe("itemSize"),d=Fe("log"),m=or("gap"),b=Fe("horizontalDirection"),{callbackRef:y}=B2(n,g,p,e?es:s,d,m,i,b,Fe("skipAnimationFrameInResizeObserver")),[f,v]=N.useState(0);ip("deviation",P=>{f!==P&&v(P)});const C=Fe("EmptyPlaceholder"),S=Fe("ScrollSeekPlaceholder")||r$,_=Fe("ListComponent"),E=Fe("ItemComponent"),x=Fe("GroupComponent"),h=Fe("computeItemKey"),w=Fe("isSeeking"),D=Fe("groupIndices").length>0,I=Fe("alignToBottom"),T=Fe("initialItemFinalLocationReached"),F=e?{}:{boxSizing:"border-box",...b?{display:"inline-block",height:"100%",marginLeft:f!==0?f:I?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:f!==0?f:I?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...T?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&C?B.jsx(C,{...ht(C,u)}):B.jsx(_,{...ht(_,u),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:y,style:F,children:(e?t.topItems:t.items).map(P=>{const k=P.originalIndex,R=h(k+t.firstItemIndex,P.data,u);return w?N.createElement(S,{...ht(S,u),height:P.size,index:P.index,key:R,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?N.createElement(x,{...ht(x,u),"data-index":k,"data-item-index":P.index,"data-known-size":P.size,key:R,style:i$},c(P.index,u)):N.createElement(E,{...ht(E,u),...t4(E,P.data),"data-index":k,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:R,style:b?a$:e4},D?l(P.index,P.groupIndex,P.data,u):l(P.index,P.data,u))})})}),o$={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},s$={outline:"none",overflowX:"auto",position:"relative"},ts=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),l$={position:ep(),top:0,width:"100%",zIndex:1};function ht(e,t){if(typeof e!="string")return{context:t}}function t4(e,t){return{item:typeof e=="string"?void 0:t}}const u$=N.memo(function(){const e=Fe("HeaderComponent"),t=or("headerHeight"),n=Fe("HeaderFooterTag"),r=qr(N.useMemo(()=>a=>{t(wr(a,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),i=Fe("context");return e?B.jsx(n,{ref:r,children:B.jsx(e,{...ht(e,i)})}):null}),c$=N.memo(function(){const e=Fe("FooterComponent"),t=or("footerHeight"),n=Fe("HeaderFooterTag"),r=qr(N.useMemo(()=>a=>{t(wr(a,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),i=Fe("context");return e?B.jsx(n,{ref:r,children:B.jsx(e,{...ht(e,i)})}):null});function np({useEmitter:e,useEmitterValue:t,usePublisher:n}){return N.memo(function({children:r,style:i,context:a,...o}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("scrollerRef"),p=t("horizontalDirection")||!1,{scrollByCallback:g,scrollerRef:d,scrollToCallback:m}=Q2(s,u,l,c,void 0,p);return e("scrollTo",m),e("scrollBy",g),B.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:d,style:{...p?s$:o$,...i},tabIndex:0,...o,...ht(l,a),children:r})})}function rp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return N.memo(function({children:r,style:i,context:a,...o}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("totalListHeight"),p=t("deviation"),g=t("customScrollParent"),d=N.useRef(null),m=t("scrollerRef"),{scrollByCallback:b,scrollerRef:y,scrollToCallback:f}=Q2(s,u,l,m,g);return J2(()=>{var v;return y.current=g||((v=d.current)==null?void 0:v.ownerDocument.defaultView),()=>{y.current=null}},[y,g]),e("windowScrollTo",f),e("scrollBy",b),B.jsx(l,{ref:d,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...c!==0?{height:c+p}:{}},...o,...ht(l,a),children:r})})}const d$=({children:e})=>{const t=N.useContext(bd),n=or("viewportHeight"),r=or("fixedItemHeight"),i=Fe("alignToBottom"),a=Fe("horizontalDirection"),o=N.useMemo(()=>Gs(n,l=>wr(l,a?"width":"height")),[n,a]),s=qr(o,!0,Fe("skipAnimationFrameInResizeObserver"));return N.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),B.jsx("div",{"data-viewport-type":"element",ref:s,style:ts(i),children:e})},f$=({children:e})=>{const t=N.useContext(bd),n=or("windowViewportRect"),r=or("fixedItemHeight"),i=Fe("customScrollParent"),a=Ug(n,i,Fe("skipAnimationFrameInResizeObserver")),o=Fe("alignToBottom");return N.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),B.jsx("div",{"data-viewport-type":"window",ref:a,style:ts(o),children:e})},h$=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...l$,marginTop:`${n}px`},i=Fe("context");return B.jsx(t,{style:r,...ht(t,i),children:e})},g$=N.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),i=Fe("context");return B.jsxs(r||t?b$:m$,{...e,context:i,children:[n&&B.jsx(h$,{children:B.jsx(fb,{showTopList:!0})}),B.jsxs(r||t?f$:d$,{children:[B.jsx(u$,{}),B.jsx(fb,{}),B.jsx(c$,{})]})]})}),{Component:p$,useEmitter:ip,useEmitterValue:Fe,usePublisher:or}=Qg(n$,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},g$),m$=np({useEmitter:ip,useEmitterValue:Fe,usePublisher:or}),b$=rp({useEmitter:ip,useEmitterValue:Fe,usePublisher:or}),v$=p$,y$=Ye(()=>{const e=ge(u=>B.jsxs("td",{children:["Item $",u]})),t=ge(null),n=ge(u=>B.jsxs("td",{colSpan:1e3,children:["Group ",u]})),r=ge(null),i=ge(null),a=ge({}),o=ge(tp),s=ge(es),l=(u,c=null)=>bn(fe(a,xe(p=>p[u]),ft()),c);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),x$=Ye(([e,t])=>({...e,...t}),gt(Z2,y$)),C$=({height:e})=>B.jsx("tr",{children:B.jsx("td",{style:{height:e}})}),E$=({height:e})=>B.jsx("tr",{children:B.jsx("td",{style:{border:0,height:e,padding:0}})}),S$={overflowAnchor:"none"},hb={position:ep(),zIndex:2,overflowAnchor:"none"},gb=N.memo(function({showTopList:e=!1}){const t=Me("listState"),n=Me("computeItemKey"),r=Me("firstItemIndex"),i=Me("context"),a=Me("isSeeking"),o=Me("fixedHeaderHeight"),s=Me("groupIndices").length>0,l=Me("itemContent"),u=Me("groupContent"),c=Me("ScrollSeekPlaceholder")||C$,p=Me("GroupComponent"),g=Me("TableRowComponent"),d=(e?t.topItems:[]).reduce((b,y,f)=>(f===0?b.push(y.size):b.push(b[f-1]+y.size),b),[]),m=(e?t.topItems:t.items).map(b=>{const y=b.originalIndex,f=n(y+r,b.data,i),v=e?y===0?0:d[y-1]:0;return a?N.createElement(c,{...ht(c,i),height:b.size,index:b.index,key:f,type:b.type||"item"}):b.type==="group"?N.createElement(p,{...ht(p,i),"data-index":y,"data-item-index":b.index,"data-known-size":b.size,key:f,style:{...hb,top:o}},u(b.index,i)):N.createElement(g,{...ht(g,i),...t4(g,b.data),"data-index":y,"data-item-index":b.index,"data-known-size":b.size,"data-item-group-index":b.groupIndex,key:f,style:e?{...hb,top:o+v}:S$},s?l(b.index,b.groupIndex,b.data,i):l(b.index,b.data,i))});return B.jsx(B.Fragment,{children:m})}),w$=N.memo(function(){const e=Me("listState"),t=Me("topItemsIndexes").length>0,n=Er("sizeRanges"),r=Me("useWindowScroll"),i=Me("customScrollParent"),a=Er("windowScrollContainerState"),o=Er("scrollContainerState"),s=i||r?a:o,l=Me("trackItemSizes"),u=Me("itemSize"),c=Me("log"),{callbackRef:p,ref:g}=B2(n,u,l,s,c,void 0,i,!1,Me("skipAnimationFrameInResizeObserver")),[d,m]=N.useState(0);ap("deviation",D=>{d!==D&&(g.current.style.marginTop=`${D}px`,m(D))});const b=Me("EmptyPlaceholder"),y=Me("FillerRow")||E$,f=Me("TableBodyComponent"),v=Me("paddingTopAddition"),C=Me("statefulTotalCount"),S=Me("context");if(C===0&&b)return B.jsx(b,{...ht(b,S)});const _=(t?e.topItems:[]).reduce((D,I)=>D+I.size,0),E=e.offsetTop+v+d-_,x=e.offsetBottom,h=E>0?B.jsx(y,{context:S,height:E},"padding-top"):null,w=x>0?B.jsx(y,{context:S,height:x},"padding-bottom"):null;return B.jsxs(f,{"data-testid":"virtuoso-item-list",ref:p,...ht(f,S),children:[h,t&&B.jsx(gb,{showTopList:!0}),B.jsx(gb,{}),w]})}),_$=({children:e})=>{const t=N.useContext(bd),n=Er("viewportHeight"),r=Er("fixedItemHeight"),i=qr(N.useMemo(()=>Gs(n,a=>wr(a,"height")),[n]),!0,Me("skipAnimationFrameInResizeObserver"));return N.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),B.jsx("div",{"data-viewport-type":"element",ref:i,style:ts(!1),children:e})},I$=({children:e})=>{const t=N.useContext(bd),n=Er("windowViewportRect"),r=Er("fixedItemHeight"),i=Me("customScrollParent"),a=Ug(n,i,Me("skipAnimationFrameInResizeObserver"));return N.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),B.jsx("div",{"data-viewport-type":"window",ref:a,style:ts(!1),children:e})},D$=N.memo(function(e){const t=Me("useWindowScroll"),n=Me("customScrollParent"),r=Er("fixedHeaderHeight"),i=Er("fixedFooterHeight"),a=Me("fixedHeaderContent"),o=Me("fixedFooterContent"),s=Me("context"),l=qr(N.useMemo(()=>Gs(r,f=>wr(f,"height")),[r]),!0,Me("skipAnimationFrameInResizeObserver")),u=qr(N.useMemo(()=>Gs(i,f=>wr(f,"height")),[i]),!0,Me("skipAnimationFrameInResizeObserver")),c=n||t?R$:A$,p=n||t?I$:_$,g=Me("TableComponent"),d=Me("TableHeadComponent"),m=Me("TableFooterComponent"),b=a?B.jsx(d,{ref:l,style:{position:"sticky",top:0,zIndex:2},...ht(d,s),children:a()},"TableHead"):null,y=o?B.jsx(m,{ref:u,style:{bottom:0,position:"sticky",zIndex:1},...ht(m,s),children:o()},"TableFoot"):null;return B.jsx(c,{...e,...ht(c,s),children:B.jsx(p,{children:B.jsxs(g,{style:{borderSpacing:0,overflowAnchor:"none"},...ht(g,s),children:[b,B.jsx(w$,{},"TableBody"),y]})})})}),{Component:T$,useEmitter:ap,useEmitterValue:Me,usePublisher:Er}=Qg(x$,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},D$),A$=np({useEmitter:ap,useEmitterValue:Me,usePublisher:Er}),R$=rp({useEmitter:ap,useEmitterValue:Me,usePublisher:Er}),B$=T$,pb={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},$$={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:mb,floor:xc,max:$s,min:Yf,round:bb}=Math;function vb(e,t,n){return Array.from({length:t-e+1}).map((r,i)=>({data:n===null?null:n[i+e],index:i+e}))}function k$(e){return{...$$,items:e}}function nu(e,t){return e&&e.width===t.width&&e.height===t.height}function P$(e,t){return e&&e.column===t.column&&e.row===t.row}const F$=Ye(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:p},g,d,{didMount:m,propsReady:b},{customScrollParent:y,useWindowScroll:f,windowScrollContainerState:v,windowScrollTo:C,windowViewportRect:S},_])=>{const E=ge(0),x=ge(0),h=ge(pb),w=ge({height:0,width:0}),D=ge({height:0,width:0}),I=We(),T=We(),F=ge(0),P=ge(null),k=ge({column:0,row:0}),R=We(),M=We(),O=ge(!1),z=ge(0),G=ge(!0),U=ge(!1),J=ge(!1);et(fe(m,Ve(z),Be(([te,$])=>!!$)),()=>{Oe(G,!1)}),et(fe(Nt(m,G,D,w,z,U),Be(([te,$,H,V,,A])=>te&&!$&&H.height!==0&&V.height!==0&&!A)),([,,,,te])=>{Oe(U,!0),Kg(1,()=>{Oe(I,te)}),Cr(fe(u),()=>{Oe(t,[0,0]),Oe(G,!0)})}),Ee(fe(M,Be(te=>te!=null&&te.scrollTop>0),Or(0)),x),et(fe(m,Ve(M),Be(([,te])=>te!=null)),([,te])=>{te&&(Oe(w,te.viewport),Oe(D,te.item),Oe(k,te.gap),te.scrollTop>0&&(Oe(O,!0),Cr(fe(u,Va(1)),$=>{Oe(O,!1)}),Oe(l,{top:te.scrollTop})))}),Ee(fe(w,xe(({height:te})=>te)),p),Ee(fe(Nt(ke(w,nu),ke(D,nu),ke(k,(te,$)=>te&&te.column===$.column&&te.row===$.row),ke(u)),xe(([te,$,H,V])=>({gap:H,item:$,scrollTop:V,viewport:te}))),R),Ee(fe(Nt(ke(E),r,ke(k,P$),ke(D,nu),ke(w,nu),ke(P),ke(x),ke(O),ke(G),ke(z)),Be(([,,,,,,,te])=>!te),xe(([te,[$,H],V,A,L,K,X,,le,ie])=>{const{column:oe,row:ne}=V,{height:ue,width:be}=A,{width:ve}=L;if(X===0&&(te===0||ve===0))return pb;if(be===0){const Rt=Zg(ie,te),Ot=Rt+Math.max(X-1,0);return k$(vb(Rt,Ot,K))}const pe=n4(ve,be,oe);let $e,Le;le?$===0&&H===0&&X>0?($e=0,Le=X-1):($e=pe*xc(($+ne)/(ue+ne)),Le=pe*mb((H+ne)/(ue+ne))-1,Le=Yf(te-1,$s(Le,pe-1)),$e=Yf(Le,$s(0,$e))):($e=0,Le=-1);const Ue=vb($e,Le,K),{bottom:nt,top:lt}=yb(L,V,A,Ue),ut=mb(te/pe),St=ut*ue+(ut-1)*ne-nt;return{bottom:nt,itemHeight:ue,items:Ue,itemWidth:be,offsetBottom:St,offsetTop:lt,top:lt}})),h),Ee(fe(P,Be(te=>te!==null),xe(te=>te.length)),E),Ee(fe(Nt(w,D,h,k),Be(([te,$,{items:H}])=>H.length>0&&$.height!==0&&te.height!==0),xe(([te,$,{items:H},V])=>{const{bottom:A,top:L}=yb(te,V,$,H);return[L,A]}),ft(Xs)),t);const Q=ge(!1);Ee(fe(u,Ve(Q),xe(([te,$])=>$||te!==0)),Q);const ee=Wn(fe(Nt(h,E),Be(([{items:te}])=>te.length>0),Ve(Q),Be(([[te,$],H])=>{const V=te.items[te.items.length-1].index===$-1;return(H||te.bottom>0&&te.itemHeight>0&&te.offsetBottom===0&&te.items.length===$)&&V}),xe(([[,te]])=>te-1),ft())),q=Wn(fe(ke(h),Be(({items:te})=>te.length>0&&te[0].index===0),Or(0),ft())),Z=Wn(fe(ke(h),Ve(O),Be(([{items:te},$])=>te.length>0&&!$),xe(([{items:te}])=>({endIndex:te[te.length-1].index,startIndex:te[0].index})),ft(M2),mi(0)));Ee(Z,d.scrollSeekRangeChanged),Ee(fe(I,Ve(w,D,E,k),xe(([te,$,H,V,A])=>{const L=j2(te),{align:K,behavior:X,offset:le}=L;let ie=L.index;ie==="LAST"&&(ie=V-1),ie=$s(0,ie,Yf(V-1,ie));let oe=T0($,A,H,ie);return K==="end"?oe=bb(oe-$.height+H.height):K==="center"&&(oe=bb(oe-$.height/2+H.height/2)),le&&(oe+=le),{behavior:X,top:oe}})),l);const se=bn(fe(h,xe(te=>te.offsetBottom+te.bottom)),0);return Ee(fe(S,xe(te=>({height:te.visibleHeight,width:te.visibleWidth}))),w),{customScrollParent:y,data:P,deviation:F,footerHeight:i,gap:k,headerHeight:a,increaseViewportBy:e,initialItemCount:x,itemDimensions:D,overscan:n,restoreStateFrom:M,scrollBy:o,scrollContainerState:s,scrollHeight:T,scrollTo:l,scrollToIndex:I,scrollTop:u,smoothScrollTargetReached:c,totalCount:E,useWindowScroll:f,viewportDimensions:w,windowScrollContainerState:v,windowScrollTo:C,windowViewportRect:S,...d,gridState:h,horizontalDirection:J,initialTopMostItemIndex:z,totalListHeight:se,...g,endReached:ee,propsReady:b,rangeChanged:Z,startReached:q,stateChanged:R,stateRestoreInProgress:O,..._}},gt(qg,In,Bl,Y2,ca,Jg,ua));function n4(e,t,n){return $s(1,xc((e+n)/(xc(t)+n)))}function yb(e,t,n,r){const{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};const a=T0(e,t,n,r[0].index);return{bottom:T0(e,t,n,r[r.length-1].index)+i,top:a}}function T0(e,t,n,r){const i=n4(e.width,n.width,t.column),a=xc(r/i),o=a*n.height+$s(0,a-1)*t.row;return o>0?o+t.row:o}const N$=Ye(()=>{const e=ge(p=>`Item ${p}`),t=ge({}),n=ge(null),r=ge("virtuoso-grid-item"),i=ge("virtuoso-grid-list"),a=ge(tp),o=ge("div"),s=ge(es),l=(p,g=null)=>bn(fe(t,xe(d=>d[p]),ft()),g),u=ge(!1),c=ge(!1);return Ee(ke(c),u),{components:t,computeItemKey:a,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:o,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),M$=Ye(([e,t])=>({...e,...t}),gt(F$,N$)),O$=N.memo(function(){const e=pt("gridState"),t=pt("listClassName"),n=pt("itemClassName"),r=pt("itemContent"),i=pt("computeItemKey"),a=pt("isSeeking"),o=sr("scrollHeight"),s=pt("ItemComponent"),l=pt("ListComponent"),u=pt("ScrollSeekPlaceholder"),c=pt("context"),p=sr("itemDimensions"),g=sr("gap"),d=pt("log"),m=pt("stateRestoreInProgress"),b=sr("reportReadyState"),y=qr(N.useMemo(()=>f=>{const v=f.parentElement.parentElement.scrollHeight;o(v);const C=f.firstChild;if(C){const{height:S,width:_}=C.getBoundingClientRect();p({height:S,width:_})}g({column:xb("column-gap",getComputedStyle(f).columnGap,d),row:xb("row-gap",getComputedStyle(f).rowGap,d)})},[o,p,g,d]),!0,!1);return J2(()=>{e.itemHeight>0&&e.itemWidth>0&&b(!0)},[e]),m?null:B.jsx(l,{className:t,ref:y,...ht(l,c),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(f=>{const v=i(f.index,f.data,c);return a?B.jsx(u,{...ht(u,c),height:e.itemHeight,index:f.index,width:e.itemWidth},v):N.createElement(s,{...ht(s,c),className:n,"data-index":f.index,key:v},r(f.index,f.data,c))})})}),L$=N.memo(function(){const e=pt("HeaderComponent"),t=sr("headerHeight"),n=pt("headerFooterTag"),r=qr(N.useMemo(()=>a=>{t(wr(a,"height"))},[t]),!0,!1),i=pt("context");return e?B.jsx(n,{ref:r,children:B.jsx(e,{...ht(e,i)})}):null}),V$=N.memo(function(){const e=pt("FooterComponent"),t=sr("footerHeight"),n=pt("headerFooterTag"),r=qr(N.useMemo(()=>a=>{t(wr(a,"height"))},[t]),!0,!1),i=pt("context");return e?B.jsx(n,{ref:r,children:B.jsx(e,{...ht(e,i)})}):null}),H$=({children:e})=>{const t=N.useContext(q2),n=sr("itemDimensions"),r=sr("viewportDimensions"),i=qr(N.useMemo(()=>a=>{r(a.getBoundingClientRect())},[r]),!0,!1);return N.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),B.jsx("div",{ref:i,style:ts(!1),children:e})},j$=({children:e})=>{const t=N.useContext(q2),n=sr("windowViewportRect"),r=sr("itemDimensions"),i=pt("customScrollParent"),a=Ug(n,i,!1);return N.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),B.jsx("div",{ref:a,style:ts(!1),children:e})},z$=N.memo(function({...e}){const t=pt("useWindowScroll"),n=pt("customScrollParent"),r=n||t?W$:G$,i=n||t?j$:H$,a=pt("context");return B.jsx(r,{...e,...ht(r,a),children:B.jsxs(i,{children:[B.jsx(L$,{}),B.jsx(O$,{}),B.jsx(V$,{})]})})}),{useEmitter:r4,useEmitterValue:pt,usePublisher:sr}=Qg(M$,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},z$),G$=np({useEmitter:r4,useEmitterValue:pt,usePublisher:sr}),W$=rp({useEmitter:r4,useEmitterValue:pt,usePublisher:sr});function xb(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,kn.WARN),t==="normal"?0:parseInt(t??"0",10)}const U$=({children:e,...t})=>B.jsx(B.Fragment,{children:e(t)}),X$=({children:e,...t})=>B.jsx(B.Fragment,{children:N.isValidElement(e)&&B.jsx(B.Fragment,{children:N.cloneElement(e,t)})}),op=N.forwardRef((e,t)=>{const{classNameContainer:n="",computeItemKey:r=()=>"",itemSize:i=()=>0,totalCount:a=0,typeHight:o="min-max",minHeightItem:s=0,maxHeightTable:l=0,minLengthItem:u=0,fixedHeaderContent:c,itemContent:p,typeCalculateItemSize:g="manual",itemSizeNames:d=[],overscan:m=null,component:b={},idContainer:y="",triggerCalCulateContainer:f="",accumulationHeight:v=0,delayTriggerCalculateHeight:C=0,increaseViewportBy:S=()=>0,context:_={},endReached:E,increaseTotalCount:x=1}=e,[h,w]=N.useState(0),D=()=>{if(o==="min-max"){const F=(a+x)*s;return{height:a>u?l:h>F?h:F}}return o==="container"?{height:h}:{}},I=F=>{var R;const P=F.getAttribute("data-index");let k=((R=F.getBoundingClientRect())==null?void 0:R.height)||0;return d==null||d.forEach(M=>{var O,z;k+=((z=(O=document.querySelector(`[${M}="${P}"]`))==null?void 0:O.getBoundingClientRect())==null?void 0:z.height)??0}),k},T=()=>{var F;if(y&&o==="container"){const P=((F=document==null?void 0:document.getElementById(y))==null?void 0:F.offsetHeight)??0;w(P-v)}};return N.useEffect(()=>{const F=setTimeout(T,C);return window==null||window.addEventListener("resize",T),window==null||window.addEventListener("load",T),()=>{clearTimeout(F),window==null||window.removeEventListener("resize",T),window==null||window.removeEventListener("load",T)}},[o,f]),B.jsx("div",{className:`iru-w-full ${n}`,children:B.jsx(B$,{context:_,ref:t,overscan:typeof m=="function"?m(o==="container"?h:l):o==="container"?h:l,totalListHeightChanged:F=>o==="min-max"?w(F):null,style:D(),totalCount:a,computeItemKey:r,itemSize:N.useCallback(F=>g==="manual"?i(F):I(F),[]),components:{TableRow:X$,...b},fixedHeaderContent:c,itemContent:(...F)=>p(U$,...F),endReached:E,increaseViewportBy:S(o==="container"?h:l)})})});op.displayName="TableVirtualization";const Y$="_sorting_bm9be_73",ln={"bill-reguler":"_bill-reguler_bm9be_1","payhere-reguler":"_payhere-reguler_bm9be_1","laba-rounded-md-extra-small":"_laba-rounded-md-extra-small_bm9be_1","laba-small":"_laba-small_bm9be_1","laba-small_body-small":"_laba-small_body-small_bm9be_1","laba-reguler":"_laba-reguler_bm9be_1","pointer-laba":"_pointer-laba_bm9be_21","pointer-payhere":"_pointer-payhere_bm9be_26","pointer-bill":"_pointer-bill_bm9be_31","resize-menu":"_resize-menu_bm9be_36",sorting:Y$,"laba-grey-02":"_laba-grey-02_bm9be_99","laba-blue-01_border-transparent":"_laba-blue-01_border-transparent_bm9be_108"};function K$(e,t=null){const[n,r]=N.useState(!1);return N.useEffect(()=>{let i=null,a=null;const o=()=>{const s=i instanceof HTMLElement?i.getBoundingClientRect().width:window.innerWidth,l=window.matchMedia(e.replace("WIDTH",s.toString()));r(l.matches)};if(t){if(i=document.getElementById(t),!i)return;a=new ResizeObserver(o),a.observe(i)}else i=window,window.addEventListener("resize",o);return o(),()=>{a?a.disconnect():window.removeEventListener("resize",o)}},[e,t]),n}const Kf=e=>{const t=e.getTime()-Date.now();return Math.max(Math.floor(t/1e3),0)},Z$=e=>{const t=N.useMemo(()=>{const d=new Date(e.date);return e.adjustTimesTime&&d.setHours(d.getHours()-e.adjustTimesTime),d},[e.date,e.adjustTimesTime]),[n,r]=N.useState(t),[i,a]=N.useState(()=>Kf(n)),[o,s]=N.useState(e.running??!1),[l,u]=N.useState(()=>e==null?void 0:e.callbackDone);return N.useEffect(()=>{let d;return o&&i>0&&(d=setInterval(()=>{const m=Kf(n);a(m),m<=0&&(s(!1),d&&clearInterval(d),typeof l=="function"&&l())},e.intervalMs)),()=>{d&&clearInterval(d)}},[o,n,e.intervalMs,l,i]),{count:i,isRunning:o,startCountdown:()=>{!o&&i>0&&s(!0)},stopCountdown:()=>{s(!1)},resetCountdown:d=>{let m;d instanceof Date?m=d:typeof d=="number"?m=new Date(Date.now()+d*1e3):m=t,r(m);const b=Kf(m);b<=0?s(!1):s(!0),a(b)},setCallbackDone:d=>u(()=>d)}};function i4(e,t=0){const n=N.useRef({promise:null,resolve:null,reject:null,timeout:null});return N.useCallback((...i)=>(n.current.timeout&&clearTimeout(n.current.timeout),n.current.promise||(n.current.promise=new Promise((a,o)=>{n.current.resolve=a,n.current.reject=o})),n.current.timeout=setTimeout(()=>{e(...i).then(a=>{n.current.resolve&&n.current.resolve(a)}).catch(a=>{n.current.reject&&n.current.reject(a)}).finally(()=>{n.current.promise=null,n.current.resolve=null,n.current.reject=null,n.current.timeout=null})},t),n.current.promise),[e,t])}const vd=typeof window<"u"?N.useLayoutEffect:N.useEffect,q$=(e,t)=>{const[n,r]=N.useState({width:0,height:0}),[i,a]=N.useState({width:0,height:0,top:0,left:0,bottom:0,right:0,x:0,y:0}),o=N.useRef(null);return vd(()=>{const s=()=>{r({width:window.innerWidth,height:window.innerHeight})},l=p=>{for(const g of p){const{width:d,height:m,top:b,left:y,bottom:f,right:v,x:C,y:S}=g.contentRect;a({width:d,height:m,top:b,left:y,bottom:f,right:v,x:C,y:S})}};let u=null;t?u=document.querySelector(t):o.current&&(u=o.current);const c=new ResizeObserver(l);return u&&c.observe(u),window.addEventListener("resize",s),s(),()=>{u&&c.unobserve(u),window.removeEventListener("resize",s)}},[t,...e??[]]),{ref:o,windowSize:n,contentRect:i}};function J$(e){const[t,n]=N.useState(e),r=N.useRef(t);return N.useEffect(()=>{r.current=t},[t]),[t,n,r]}function Q$(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${JSON.stringify(t)}' to ref '${JSON.stringify(e)}'`)}}}function e8(...e){return t=>{e.forEach(n=>{Q$(n,t)})}}function yd(...e){return N.useMemo(()=>e8(...e),e)}function Zs(e){const t=N.useRef(e);return Ig(e,t.current)||(t.current=e),t.current}function Qi(e,t){const n=t.map(Zs);N.useEffect(e,n)}function t8({ref:e,handlerMain:t,eventListener:n="mousedown",useEffectDependency:r=[]}){N.useEffect(()=>{function i(a){t(e,a)}return document.addEventListener(n,i),()=>{document.removeEventListener(n,i)}},[e,t,n,...r])}const n8=({containerRef:e,children:t,columnCount:n,gapX:r,gapY:i,direction:a="masonry-ltr",debounceRecalculate:o=500,durationAnimation:s=500,enableAnimation:l=!1})=>{const u=N.useCallback(()=>{const p=e.current;if(!p)return;const g=Array.from(p.children);if(g.length===0){p.style.height="0px";return}const d=Array(n).fill(0),m=p.offsetWidth;if(m===0)return;const b=(m-(n-1)*r)/n,y=a.includes("rtl"),f=a.includes("top-down");g.forEach((C,S)=>{C.style.width=`${b}px`,C.style.position="absolute",l&&(C.style.transition=`top ${s}ms ease, left ${s}ms ease`);let _;if(f)_=S%n;else{const h=Math.min(...d);_=d.indexOf(h)}const E=d[_];let x;y?x=m-(b*(_+1)+r*_):x=_*(b+r),C.style.top=`${E}px`,C.style.left=`${x}px`,d[_]+=C.offsetHeight+i});const v=Math.max(...d);p.style.height=`${v-i}px`},[e,n,r,a,i]),c=i4(async()=>{u()},o);return N.useLayoutEffect(()=>{u()},[t,u]),N.useEffect(()=>(window.addEventListener("load",u),window.addEventListener("resize",c),()=>{window.removeEventListener("load",u),window.removeEventListener("resize",c)}),[t,c,u]),{recalculateLayout:u}},r8=({id:e,numInputs:t,onComplete:n,disableFocusOnEdit:r=!1,blurOnComplete:i=!1,disableOnComplete:a=!1})=>{const[o,s]=N.useState(()=>Array(t).fill("")),l=N.useRef([]),[u]=N.useState(()=>`otp-${Math.random().toString(36).slice(2,9)}`),c=e||u;N.useEffect(()=>{l.current=l.current.slice(0,t)},[t]);const p=N.useCallback((v,C)=>{var D,I;const S=v.target.value,_=S.length>1?S.slice(-1):S,E=o[C]!=="",x=[...o];x[C]=_,s(x);const h=x.join(""),w=!x.slice(0,t).includes("");_!==""&&C<t-1&&(r&&E&&w||(D=l.current[C+1])==null||D.focus()),w&&(typeof n=="function"&&n(h),i&&((I=l.current[C])==null||I.blur()))},[o,t,n,r,i]),g=N.useCallback((v,C)=>{var S,_,E,x,h;switch(v.key){case"Backspace":if(o[C]===""&&C>0){v.preventDefault();const w=[...o];w[C-1]="",s(w),(S=l.current[C-1])==null||S.focus()}break;case"ArrowLeft":C>0&&(v.preventDefault(),(_=l.current[C-1])==null||_.focus());break;case"ArrowRight":C<t-1&&(v.preventDefault(),(E=l.current[C+1])==null||E.focus());break;case"Home":v.preventDefault(),(x=l.current[0])==null||x.focus();break;case"End":v.preventDefault(),(h=l.current[t-1])==null||h.focus();break}},[o,t]),d=N.useCallback((v,C)=>{var D,I;v.preventDefault();const S=v.clipboardData.getData("text").trim();if(!S)return;const _=[...o];let E=C;for(const T of S){if(E>=t)break;_[E]=T,E++}s(_);const x=_.join(""),h=!_.includes(""),w=Math.min(E,t-1);(D=l.current[w])==null||D.focus(),h&&(typeof n=="function"&&n(x),i&&((I=l.current[w])==null||I.blur()))},[o,t,n,i]),m=v=>{v.target.select()},b=()=>{var v;s(Array(t).fill("")),(v=l.current[0])==null||v.focus()},y=v=>{if(v<0||v>=t)throw new Error(`useOtpInput: index ${v} is out of bounds for numInputs ${t}.`);const C=o.join("").length===t;return{id:`${c}-${v}`,"aria-label":`OTP digit ${v+1} of ${t}`,ref:S=>{l.current[v]=S},value:o[v],onChange:S=>p(S,v),onKeyDown:S=>g(S,v),onPaste:S=>d(S,v),onFocus:m,disabled:a&&C,type:"text",inputMode:"numeric",autoComplete:"one-time-code"}};return{getInputProps:y,getInputData:v=>({...dC(y(v),["onChange","onKeyDown","onPaste","onFocus","aria-label","autoComplete"]),isOtpFilled:o[v]!==""}),otpValues:o,otpString:o.join(""),clearOtp:b,isOtpComplete:o.join("").length===t}},so={"sub-mobile-payhere-reguler":"_sub-mobile-payhere-reguler_1xirc_1"},Qn="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.6673%2011.3333L8.00065%2014M8.00065%2014L5.33398%2011.3333M8.00065%2014V2'%20stroke='%23CFD8DC'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",cn=()=>({kind:{"payhere-reguler":ln["payhere-reguler"],"laba-reguler":ln["laba-reguler"],"laba-small":ln["laba-small"],"laba-rounded-md-extra-small":ln["laba-rounded-md-extra-small"],"laba-small_body-small":ln["laba-small_body-small"],"bill-reguler":ln["bill-reguler"]},subMobile:{"payhere-reguler":so["sub-mobile-payhere-reguler"],"laba-reguler":so["sub-mobile-laba-reguler"],"laba-small":so["sub-mobile-laba-small"],"laba-rounded-md-extra-small":so["sub-mobile-laba-rounded-md-extra-small"],"laba-small_body-small":so["sub-mobile-laba-small_body-small"],"bill-reguler":so["sub-mobile-bill-reguler"]},pointer:{"payhere-reguler":ln["pointer-payhere"],"laba-reguler":ln["pointer-laba"],"laba-small":ln["pointer-laba"],"laba-rounded-md-extra-small":ln["pointer-laba"],"laba-small_body-small":ln["pointer-laba"],"bill-reguler":ln["pointer-bill"]},utility:{"table-scroll-top":""},sortingIcon:{"payhere-reguler":{asc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4"}),desc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-reguler":{asc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4"}),desc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-small":{asc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4"}),desc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"bill-reguler":{asc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4"}),desc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-rounded-md-extra-small":{asc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4"}),desc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4 iru-rotate-180"})},"laba-small_body-small":{asc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4"}),desc:B.jsx("img",{src:Qn,className:"iru-w-4 iru-h-4 iru-rotate-180"})}},variant:{"laba-grey-02":ln["laba-grey-02"],"laba-blue-01_border-transparent":ln["laba-blue-01_border-transparent"]}});Object.keys(cn().kind);Object.keys(cn().variant);const i8=(e,t)=>{var r,i;let n={};return e&&(n={position:"sticky",top:0,zIndex:2}),(r=t.column.columnDef.meta)!=null&&r.styleTh&&(n={...n,...(i=t.column.columnDef.meta)==null?void 0:i.styleTh(t.column.columnDef)}),n},Cc=(e,t=!1)=>{const n=e.getIsPinned(),r=n==="left"&&e.getIsLastColumn("left"),i=n==="right"&&e.getIsFirstColumn("right");return n?{boxShadow:r?"-4px 0 4px -4px gray inset":i?"4px 0 4px -4px gray inset":void 0,left:n==="left"?`${e.getStart("left")}px`:void 0,right:n==="right"?`${e.getAfter("right")}px`:void 0,position:"sticky",width:e.getSize(),zIndex:1,background:t?"white":""}:{}},a4=e=>{const t=e.columnPinning.left||[],n=e.columnPinning.right||[],r=e.rowPinning.top||[],i=e.rowPinning.bottom||[];return{left:t,right:n,top:r,bottom:i,isPinning:t.length>0||n.length>0||r.length>0||i.length>0}},a8=({tableInstance:e,classNameWrapperTable:t,classNameTable:n,handlerRowClick:r,privillageRowClick:i,headerId:a,tbodyTrId:o,theadTrId:s,maxHeight:l,idCalculateHeight:u,componentSortASC:c,componentSortDESC:p,classNamePointer:g,emptyPlaceholder:d,renderSubComponent:m,visibilityColumns:b,classNameSubMobile:y})=>B.jsx("div",{id:"1ru-table",style:l?{height:l,overflow:"auto"}:{},className:t??"",children:B.jsxs("table",{className:n,style:{width:a4(e.getState()).isPinning?e.getCenterTotalSize():""},children:[B.jsx("thead",{id:a,"data-calculate-height-header":u,children:e.getHeaderGroups().map(f=>B.jsx("tr",{children:f.headers.map(v=>{var S,_,E,x;const C=(_=(S=v.column.columnDef.meta)==null?void 0:S.rowSpan)==null?void 0:_.call(S,v);return!v.isPlaceholder&&C!==void 0&&v.id===v.column.id?B.jsx(B.Fragment,{}):B.jsxs("th",{style:{...i8(l,v),...Cc(v.column),...b.columns.includes(v.column.id)?{display:"none"}:{}},id:`${s(v)}-${v.id}`,colSpan:typeof((E=v.column.columnDef.meta)==null?void 0:E.colSpan)=="function"?(x=v.column.columnDef.meta)==null?void 0:x.colSpan(v.column.columnDef):v.colSpan,rowSpan:C,children:[v.isPlaceholder&&C===void 0?null:B.jsxs("div",{className:v.column.getCanSort()?ln.sorting:"",onClick:v.column.getToggleSortingHandler(),id:v.column.getCanSort()?`${s(v)}-${v.id}-sort`:"",children:[Vo(v.column.columnDef.header,v.getContext()),v.column.getCanSort()&&B.jsx("span",{className:"iru-flex-shrink-0",children:v.column.getIsSorted()==="asc"||v.column.getIsSorted()==="desc"?B.jsxs(B.Fragment,{children:[v.column.getIsSorted()==="asc"&&B.jsx(B.Fragment,{children:c}),v.column.getIsSorted()==="desc"&&B.jsx(B.Fragment,{children:p})]}):B.jsx(B.Fragment,{})})]}),v.column.getIsPinned()&&B.jsx("div",{onDoubleClick:()=>v.column.resetSize(),onMouseDown:v.getResizeHandler(),onTouchStart:v.getResizeHandler(),className:ln["resize-menu"]})]},v.id)})},f.id))}),B.jsxs("tbody",{children:[e.getRowModel().rows.length>0&&e.getRowModel().rows.map((f,v)=>{var C;return B.jsxs(N.Fragment,{children:[B.jsx("tr",{onClick:S=>{S.stopPropagation(),i&&typeof r=="function"&&r(f.original,f)},className:i?g:"","data-calculate-height":`${u}-${v}`,id:o(f),children:f.getVisibleCells().map(S=>{var _,E,x;return B.jsx("td",{style:{...typeof((_=S.column.columnDef.meta)==null?void 0:_.styleTd)=="function"?S.column.columnDef.meta.styleTd(f.original,f):{},...Cc(S.column,!0),...b.columns.includes(S.column.id)?{display:"none"}:{}},className:typeof((E=S.column.columnDef.meta)==null?void 0:E.classNameTd)=="function"?(x=S.column.columnDef.meta)==null?void 0:x.classNameTd(f.original,f):"",id:`${o(f)}-${S.column.id}`,children:Vo(S.column.columnDef.cell,S.getContext())},S.id)})},f.id),f.getIsExpanded()&&typeof m=="function"&&B.jsx("tr",{children:B.jsx("td",{colSpan:f.getVisibleCells().length-(((C=b==null?void 0:b.realColumns)==null?void 0:C.length)||0),children:m(f.original,f,{visibilityColumns:b,classNameSubMobile:y})})})]},f.id)}),e.getRowModel().rows.length===0&&N.isValidElement(d)&&B.jsx("tr",{children:B.jsx("td",{colSpan:e.getVisibleFlatColumns().length,children:d})})]})]})}),o4=N.forwardRef((e,t)=>{const{context:n,...r}=e;return B.jsx("thead",{id:(n==null?void 0:n.headerId)??"",...r,ref:t})});o4.displayName="VirtualizationHead";const o8=({style:e,context:t,...n})=>B.jsx("table",{...n,id:"1ru-table",className:(t==null?void 0:t.classNameTable)??"",style:{...e,width:t==null?void 0:t.width}}),s8=({tableInstance:e,classNameWrapperTable:t,handlerRowClick:n,privillageRowClick:r,virtualizationProps:i,headerId:a,tbodyTrId:o,theadTrId:s,classNameTable:l,componentSortASC:u,componentSortDESC:c,classNamePointer:p,emptyPlaceholder:g,renderSubComponent:d,visibilityColumns:m,classNameSubMobile:b})=>{var v,C,S;const[y,f]=N.useState(0);return B.jsx(op,{context:{headerId:a,classNameTable:l,width:a4(e.getState()).isPinning?e.getCenterTotalSize():""},typeHight:"min-max",totalCount:((v=e.getRowModel().rows)==null?void 0:v.length)||0,minLengthItem:((C=e.getRowModel().rows)==null?void 0:C.length)||0,typeCalculateItemSize:"auto",component:{TableHead:o4,Table:o8,EmptyPlaceholder:()=>B.jsx("tbody",{ref:_=>{var E;return f(((E=_==null?void 0:_.getBoundingClientRect())==null?void 0:E.height)??0)},children:B.jsx("tr",{children:B.jsx("td",{colSpan:e.getVisibleFlatColumns().length,children:N.isValidElement(g)&&g})})})},classNameContainer:t,fixedHeaderContent:()=>e.getHeaderGroups().map(_=>B.jsx("tr",{children:_.headers.map(E=>{var h,w,D,I;const x=(w=(h=E.column.columnDef.meta)==null?void 0:h.rowSpan)==null?void 0:w.call(h,E);return!E.isPlaceholder&&x!==void 0&&E.id===E.column.id?B.jsx(B.Fragment,{}):B.jsxs("th",{id:`${s(E)}-${E.id}`,colSpan:E.colSpan,rowSpan:x,style:{...typeof((D=E.column.columnDef.meta)==null?void 0:D.styleTh)=="function"?(I=E.column.columnDef.meta)==null?void 0:I.styleTh(E.column.columnDef):{},...Cc(E.column),...m.columns.includes(E.column.id)?{display:"none"}:{}},children:[E.isPlaceholder&&x===void 0?null:B.jsxs("div",{className:E.column.getCanSort()?ln.sorting:"",onClick:E.column.getToggleSortingHandler(),id:E.column.getCanSort()?`${s(E)}-${E.id}-sort`:"",children:[Vo(E.column.columnDef.header,E.getContext()),E.column.getCanSort()&&B.jsx("span",{className:"iru-flex-shrink-0",children:E.column.getIsSorted()==="asc"||E.column.getIsSorted()==="desc"?B.jsxs(B.Fragment,{children:[E.column.getIsSorted()==="asc"&&B.jsx(B.Fragment,{children:u}),E.column.getIsSorted()==="desc"&&B.jsx(B.Fragment,{children:c})]}):B.jsx(B.Fragment,{})})]}),E.column.getIsPinned()&&B.jsx("div",{onDoubleClick:()=>E.column.resetSize(),onMouseDown:E.getResizeHandler(),onTouchStart:E.getResizeHandler(),className:ln["resize-menu"]})]},E.id)})},_.id)),itemContent:(_,E)=>{var h,w;const x=(w=(h=e.getRowModel())==null?void 0:h.rows)==null?void 0:w[E];return B.jsx(_,{children:({...D})=>{var I;return B.jsxs(N.Fragment,{children:[B.jsx("tr",{...D,onClick:T=>{T.stopPropagation(),r&&typeof n=="function"&&n(x.original,x)},className:r?p:"",id:o(x),children:x.getVisibleCells().map(T=>{var F,P,k;return B.jsx(B.Fragment,{children:B.jsx("td",{style:{...typeof((F=T.column.columnDef.meta)==null?void 0:F.styleTd)=="function"?T.column.columnDef.meta.styleTd(x.original,x):{},...Cc(T.column,!0),...m.columns.includes(T.column.id)?{display:"none"}:{}},className:typeof((P=T.column.columnDef.meta)==null?void 0:P.classNameTd)=="function"?(k=T.column.columnDef.meta)==null?void 0:k.classNameTd(x.original,x):"",id:`${o(x)}-${T.column.id}`,children:Vo(T.column.columnDef.cell,T.getContext())},T.id)})})}),x.getIsExpanded()&&typeof d=="function"&&B.jsx("tr",{"data-sub-component":E,children:B.jsx("td",{colSpan:x.getVisibleCells().length-(((I=m==null?void 0:m.realColumns)==null?void 0:I.length)||0),children:d(x.original,x,{visibilityColumns:m,classNameSubMobile:b})})})]},x.id)}},x.id)},...i,minHeightItem:((i==null?void 0:i.minHeightItem)??60)+((((S=e.getRowModel().rows)==null?void 0:S.length)||0)>0?0:y),itemSizeNames:typeof d=="function"?[...(i==null?void 0:i.itemSizeNames)??[],"data-sub-component"]:i==null?void 0:i.itemSizeNames})},l8=({tableInstance:e,classNameWrapperTable:t="",classNameTable:n="",collapseAll:r=!0,handlerRowClick:i,privillageRowClick:a=!1,virtualization:o=!1,virtualizationProps:s,headerId:l="",tbodyTrId:u=()=>"",theadTrId:c=()=>"",maxHeight:p=0,idCalculateHeight:g=void 0,kind:d="laba-reguler",componentSortASC:m,componentSortDESC:b,scrollTop:y=!1,emptyPlaceholder:f,variant:v,renderSubComponent:C,columnBreakpoints:S})=>{var I;const[_,E]=N.useState(0),[x,h]=N.useState({columns:[],realColumns:[]}),w=()=>{if(![void 0,"undefined"].includes(g)){const T=document.querySelector(`[data-calculate-height-header="${g}"]`);let F=0;const P=document.querySelectorAll(`[data-calculate-height^="${g}-"]`);return P==null||P.forEach(k=>{F+=k.offsetHeight}),F>p?p+T.offsetHeight:0}return p},D=()=>{var k;const T=((k=document.querySelector("body"))==null?void 0:k.offsetWidth)||0,F=S==null?void 0:S.sort((R,M)=>{const O=(R.maxWidth??R.minWidth)||0,z=(M.maxWidth??M.minWidth)||0;return O!==z?O-z:R.maxWidth?-1:1}),P=(F==null?void 0:F.find(R=>!!(Object.hasOwnProperty.call(R,"maxWidth")&&T<=(R.maxWidth||0)||Object.hasOwnProperty.call(R,"minWidth")&&T>=(R.minWidth||0))))||{};Object.keys(P).length>0?(h({columns:P.columns,realColumns:P.realColumns||P.columns}),P!=null&&P.resetExpanded&&e.resetExpanded()):h({columns:[],realColumns:[]})};return Qi(()=>{!r&&typeof e.toggleAllRowsExpanded=="function"&&e.toggleAllRowsExpanded()},[r,e==null?void 0:e.toggleAllRowsExpanded]),Qi(()=>{p>0&&E(w())},[(I=e==null?void 0:e.options)==null?void 0:I.data,p]),Qi(()=>{if(Array.isArray(S)&&(S==null?void 0:S.length)>0)return D(),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},[S]),B.jsxs(B.Fragment,{children:[!o&&B.jsx(a8,{theadTrId:c,tbodyTrId:u,headerId:l,tableInstance:e,classNameTable:n,classNameWrapperTable:`${cn().kind[d]} ${v?cn().variant[v]:""}
|
|
68
|
-
${y?cn().utility["table-scroll-top"]:""} ${t}`,handlerRowClick:i,privillageRowClick:a,maxHeight:_,idCalculateHeight:g,componentSortASC:N.isValidElement(m)?m:cn().sortingIcon[d].asc,componentSortDESC:N.isValidElement(b)?b:cn().sortingIcon[d].desc,classNamePointer:cn().pointer[d],emptyPlaceholder:f,renderSubComponent:C,visibilityColumns:x,classNameSubMobile:cn().subMobile[d]}),o&&B.jsx(s8,{theadTrId:c,tbodyTrId:u,headerId:l,tableInstance:e,classNameTable:n,classNameWrapperTable:`${cn().kind[d]} ${v?cn().variant[v]:""}
|
|
69
|
-
${y?cn().utility["table-scroll-top"]:""} ${t}`,handlerRowClick:i,privillageRowClick:a,virtualizationProps:s,componentSortASC:N.isValidElement(m)?m:cn().sortingIcon[d].asc,componentSortDESC:N.isValidElement(b)?b:cn().sortingIcon[d].desc,classNamePointer:cn().pointer[d],emptyPlaceholder:f,renderSubComponent:C,visibilityColumns:x,classNameSubMobile:cn().subMobile[d]})]})},u8=(e,t,{visibilityColumns:n,classNameSubMobile:r})=>B.jsx("table",{className:"-iru-mx-6 -iru-my-3 !iru-w-[calc(100%_+_48px)]",children:B.jsx("tbody",{children:t.getVisibleCells().map((i,a)=>{var o,s,l,u,c,p;return B.jsx(B.Fragment,{children:n!=null&&n.columns.includes(i.column.id)?B.jsxs("tr",{className:r,children:[B.jsx("td",{"data-section":"left",style:{...typeof((o=i.column.columnDef.meta)==null?void 0:o.styleTdLeftCellSubs)=="function"?(s=i.column.columnDef.meta)==null?void 0:s.styleTdLeftCellSubs(t.original,t):{}},children:B.jsxs("div",{children:[typeof i.column.columnDef.header=="string"&&B.jsx(B.Fragment,{children:i.column.columnDef.header}),typeof i.column.columnDef.header!="string"&&((l=i.column.columnDef.meta)==null?void 0:l.labelCellSubs)&&B.jsx(B.Fragment,{children:(u=i.column.columnDef.meta)==null?void 0:u.labelCellSubs(t.original,t)})]})}),B.jsx("td",{"data-section":"right",style:{...typeof((c=i.column.columnDef.meta)==null?void 0:c.styleTdRightCellSubs)=="function"?(p=i.column.columnDef.meta)==null?void 0:p.styleTdRightCellSubs(t.original,t):{}},children:B.jsxs("div",{children:[B.jsx("div",{className:"iru-pr-1",children:":"})," ",Vo(i.column.columnDef.cell,i.getContext())]})})]},i.id):B.jsx(B.Fragment,{})},a)})})}),c8=({children:e,...t})=>B.jsx(B.Fragment,{children:e(t)}),d8=({children:e,...t})=>B.jsx(B.Fragment,{children:N.isValidElement(e)&&B.jsx(B.Fragment,{children:N.cloneElement(e,t)})}),s4=N.forwardRef((e,t)=>{const{classNameContainer:n="",computeItemKey:r=()=>"",itemSize:i=()=>0,totalCount:a=0,typeHight:o="min-max",minHeightItem:s=0,maxHeightTable:l=0,minLengthItem:u=0,itemContent:c,typeCalculateItemSize:p="manual",itemSizeNames:g=[],overscan:d=null,component:m={},idContainer:b="",triggerCalCulateContainer:y="",accumulationHeight:f=0,delayTriggerCalculateHeight:v=0,increaseViewportBy:C=()=>0,context:S={},endReached:_,increaseTotalCount:E=1}=e,[x,h]=N.useState(0),w=()=>{if(o==="min-max"){const T=(a+E)*s;return{height:a>u?l:x>T?x:T}}return o==="container"?{height:x}:{}},D=T=>{var k;const F=T.getAttribute("data-index");let P=((k=T.getBoundingClientRect())==null?void 0:k.height)||0;return g==null||g.forEach(R=>{var M,O;P+=((O=(M=document.querySelector(`[${R}="${F}"]`))==null?void 0:M.getBoundingClientRect())==null?void 0:O.height)??0}),P},I=()=>{var T;if(b&&o==="container"){const F=((T=document==null?void 0:document.getElementById(b))==null?void 0:T.offsetHeight)??0;h(F-f)}};return N.useEffect(()=>{const T=setTimeout(I,v);return window==null||window.addEventListener("resize",I),window==null||window.addEventListener("load",I),()=>{clearTimeout(T),window==null||window.removeEventListener("resize",I),window==null||window.removeEventListener("load",I)}},[o,y]),B.jsx("div",{className:`iru-w-full ${n}`,children:B.jsx(v$,{context:S,ref:t,overscan:typeof d=="function"?d(o==="container"?x:l):o==="container"?x:l,totalListHeightChanged:T=>o==="min-max"?h(T):null,style:w(),totalCount:a,computeItemKey:r,itemSize:N.useCallback(T=>p==="manual"?i(T):D(T),[]),itemContent:(...T)=>c(c8,...T),components:{Item:d8,...m},endReached:_,increaseViewportBy:C(o==="container"?x:l)})})});s4.displayName="ListVirtualization";const f8="_hidden_16p9h_10",h8="_ripple_16p9h_143",g8="_active_16p9h_150",Ct={"disable-transition":"_disable-transition_16p9h_1","tab-panel":"_tab-panel_16p9h_5",hidden:f8,"tabs-medium":"_tabs-medium_16p9h_15","tabs-list":"_tabs-list_16p9h_18","button-tabs":"_button-tabs_16p9h_18","tabs-small":"_tabs-small_16p9h_31","tabs-m":"_tabs-m_16p9h_15","tabs-s":"_tabs-s_16p9h_31","container-tabs":"_container-tabs_16p9h_111","original-laba-blue-10":"_original-laba-blue-10_16p9h_117",ripple:h8,active:g8,"tabs-slider":"_tabs-slider_16p9h_158","original-payhere-primary-700":"_original-payhere-primary-700_16p9h_166","container-payhere-brand-base":"_container-payhere-brand-base_16p9h_215","container-payhere-brand-base-bg_white":"_container-payhere-brand-base-bg_white_16p9h_252","container-laba-blue-10":"_container-laba-blue-10_16p9h_289","container-laba-blue-10-bg_white":"_container-laba-blue-10-bg_white_16p9h_326","container-laba-blue-10-bg_blue-01":"_container-laba-blue-10-bg_blue-01_16p9h_363","original-bill-secondary-800":"_original-bill-secondary-800_16p9h_400","container-bill-secondary-800":"_container-bill-secondary-800_16p9h_449"},xd={"0px":"iru-rounded-none","2px":"iru-rounded-sm","4px":"iru-rounded","6px":"iru-rounded-md","8px":"iru-rounded-lg","12px":"iru-rounded-xl","16px":"iru-rounded-2xl","24px":"iru-rounded-3xl",full:"iru-rounded-full"},ga={tabsVariant:{"original-laba-blue-10":Ct["original-laba-blue-10"],"container-payhere-brand-base":Ct["container-payhere-brand-base"],"container-payhere-brand-base-bg_white":Ct["container-payhere-brand-base-bg_white"],"container-laba-blue-10":Ct["container-laba-blue-10"],"container-laba-blue-10-bg_white":Ct["container-laba-blue-10-bg_white"],"container-laba-blue-10-bg_blue-01":Ct["container-laba-blue-10-bg_blue-01"],"original-bill-secondary-800":Ct["original-bill-secondary-800"],"container-bill-secondary-800":Ct["container-bill-secondary-800"],"original-payhere-primary-700":Ct["original-payhere-primary-700"]},size:{"tabs-m":Ct["tabs-m"],"tabs-s":Ct["tabs-s"],"tabs-medium":Ct["tabs-medium"],"tabs-small":Ct["tabs-small"]},borderRadius:xd,isContainer:["container-payhere-brand-base","container-payhere-brand-base-bg_white","container-laba-blue-10","container-laba-blue-10-bg_white","container-laba-blue-10-bg_blue-01","container-bill-secondary-800"]},p8=({id:e,value:t="",keyValueTab:n="",tabsList:r,className:i,classNameContainer:a,classNameButton:o,variant:s="original-laba-blue-10",size:l="tabs-m",borderRadius:u="0px",disabled:c,animation:p=!0,mountedExecuteChange:g=!0,typeButton:d="button",onChange:m,locale:b})=>{var D;const y=N.useRef([]);let f=r||[];const v=Object.fromEntries(new URL(window.location.href).searchParams.entries()),[C,S]=N.useState(-1),[_,E]=N.useState({height:0,width:0,left:0});f=f.filter(I=>typeof(I==null?void 0:I.isHide)=="boolean"?!I.isHide:!0);const x=I=>{const T=I.currentTarget,F=document.createElement("span"),P=Math.max(T.clientWidth,T.clientHeight),k=P/2;F.style.width=F.style.height=`${P}px`,F.style.left=`${I.clientX-T.getBoundingClientRect().left-k}px`,F.style.top=`${I.clientY-T.getBoundingClientRect().top-k}px`,F.classList.add(Ct.ripple);const R=T.getElementsByClassName(Ct.ripple)[0];R&&R.remove(),T.appendChild(F),setTimeout(()=>{F.remove()},500)},h=(I,T)=>{typeof m=="function"&&m(I,T)},w=N.useCallback((I,T)=>{var F,P;return b&&((P=(F=r.find(R=>R.id===I))==null?void 0:F.locale)==null?void 0:P[b])||T},[b]);return N.useLayoutEffect(()=>{function I(){setTimeout(()=>{const T=y.current[C],F={left:(T==null?void 0:T.offsetLeft)??0,width:(T==null?void 0:T.clientWidth)??0,height:ga.isContainer.includes(s)?(T==null?void 0:T.clientHeight)||0:4};E(F)},50)}return C>=0&&I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[C]),N.useLayoutEffect(()=>{const I=f.findIndex(T=>T.id===(v==null?void 0:v[n])||T.id===t);if((v!=null&&v[n]||t)&&I>=0){S(I);const T=f==null?void 0:f.find(F=>F.id===(v==null?void 0:v[n]));v!=null&&v[n]&&T&&!t&&g&&h(T,"mounted")}I<0&&g&&h(f[0],"mounted")},[JSON.stringify(t),JSON.stringify(v==null?void 0:v[n])]),B.jsx("div",{className:`${Ct["container-tabs"]} ${c?"iru-opacity-50":""} ${a??""}`,children:B.jsxs("div",{className:`${ga.tabsVariant[s]}
|
|
70
|
-
${ga.isContainer.includes(s)?ga.size[l]:""}
|
|
71
|
-
${i??""}
|
|
72
|
-
`,id:e??"1ru-tabs",children:[B.jsx("div",{className:Ct["tabs-list"],children:f.map((I,T)=>B.jsx("button",{type:d,id:`1ru-tabs-button-${I.id}`,ref:F=>{y.current[T]=F},className:`${Ct["button-tabs"]} ${ga.borderRadius[u]}
|
|
73
|
-
${o??""} ${(I==null?void 0:I.className)??""}
|
|
74
|
-
${C===T?Ct.active:""}`,disabled:c,onClick:F=>{ga.isContainer.includes(s)||x(F),C!=T&&h(I,"change")},children:w(I.id,I.label)},T))}),B.jsx("div",{className:`${Ct["tabs-slider"]} ${ga.borderRadius[u]}
|
|
75
|
-
${o??""} ${p?"":Ct["disable-transition"]}
|
|
76
|
-
`,style:{left:_.left,width:_.width,height:_.height,background:((D=r[C])==null?void 0:D.activeColor)??""}})]})})},m8=({children:e,id:t,value:n,selected:r,className:i,isHide:a})=>B.jsx("div",{role:"tabpanel",id:t??`1ru-tabpanel-${n}`,className:`${Ct["tab-panel"]} ${a||n!==r?Ct.hidden:""} ${i??""}`,children:e}),b8="_option_gp96l_165",v8="_active_gp96l_186",An={"pagination-nude":"_pagination-nude_gp96l_1","pagination-box":"_pagination-box_gp96l_1","pagination-size":"_pagination-size_gp96l_22","navigation-container":"_navigation-container_gp96l_27","button-container":"_button-container_gp96l_36","button-next":"_button-next_gp96l_36","button-prev":"_button-prev_gp96l_36","pagination-active":"_pagination-active_gp96l_59","goto-page":"_goto-page_gp96l_63","goto-page-input":"_goto-page-input_gp96l_69","options-size":"_options-size_gp96l_165",option:b8,active:v8},y8="_selected_zsdfw_1",x8="_disabled_zsdfw_29",C8="_valid_zsdfw_132",E8="_invalid_zsdfw_138",S8="_error_zsdfw_207",Re={"container-calendar":"_container-calendar_zsdfw_1","month-calendar":"_month-calendar_zsdfw_1","cell-month":"_cell-month_zsdfw_1",selected:y8,"year-calendar":"_year-calendar_zsdfw_2","cell-year":"_cell-year_zsdfw_2","cell-calendar":"_cell-calendar_zsdfw_2","active-cell-calendar":"_active-cell-calendar_zsdfw_2","custom-time-calendar":"_custom-time-calendar_zsdfw_3","container-cell-time":"_container-cell-time_zsdfw_3","cell-time":"_cell-time_zsdfw_3","header-calendar":"_header-calendar_zsdfw_12","header-button-calendar":"_header-button-calendar_zsdfw_19",disabled:x8,"days-calendar":"_days-calendar_zsdfw_36","visible-cell-calendar":"_visible-cell-calendar_zsdfw_52","header-time":"_header-time_zsdfw_84","type-time":"_type-time_zsdfw_93",valid:C8,invalid:E8,"footer-calendar":"_footer-calendar_zsdfw_172","container-filter-date":"_container-filter-date_zsdfw_181","button-filter-date":"_button-filter-date_zsdfw_191","button-reset-filter-date":"_button-reset-filter-date_zsdfw_200","button-filter-date-custome":"_button-filter-date-custome_zsdfw_203",error:S8},Xr=({className:e})=>B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:`iru-h-4 iru-w-4 iru-text-blue-700 ${e??""}`,viewBox:"0 0 512 512",children:B.jsx("path",{d:`M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 \r
|
|
77
|
-
0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 \r
|
|
78
|
-
0s-12.5 32.8 0 45.3l192 192z`})}),l4=({title:e,state:t,type:n,setUpYear:r={startYear:1970,endAfterThisYear:20},hiddenHeader:i,setActiveTypeCalendar:a,onChangeYear:o})=>{const s=(u,c)=>{const p=t.focusedDate.set({year:u});c?(a("month"),t.setFocusedDate(p)):!c&&typeof o=="function"&&o(p)},l=(u,c,p)=>Array.from({length:(c-u)/p+1},(g,d)=>u+d*p);return N.useEffect(()=>{const u=document.getElementById(`calendar-year-${t.focusedDate.year}`),c=document.getElementById("wrapper-calendar-year");u&&c&&c.scrollTo({behavior:"instant",top:u.offsetTop-93})},[]),B.jsxs("div",{className:`iru-w-[296px] ${Re["container-calendar"]}`,children:[!i&&B.jsx("div",{className:`${Re["header-calendar"]} iru-my-2`,children:B.jsxs("div",{className:`${Re["header-button-calendar"]} ${n.includes("date")||n.includes("month")?"":Re.disabled}`,onClick:()=>{n.includes("date")?a("date"):n.includes("month")&&a("month")},children:[e," ",(n.includes("date")||n.includes("month"))&&B.jsx(Xr,{})]})}),B.jsx("div",{id:"wrapper-calendar-year",className:Re["year-calendar"],children:l(r==null?void 0:r.startYear,new Date().getFullYear()+r.endAfterThisYear,1).map(u=>{var m,b;const c=Number(u),p=t!=null&&t.minValue?c<((m=t==null?void 0:t.minValue)==null?void 0:m.year):!1,g=t!=null&&t.maxValue?c>((b=t==null?void 0:t.maxValue)==null?void 0:b.year):!1,d=p||g;return B.jsx("div",{id:`calendar-year-${u}`,onClick:()=>{d||s(c,n.includes("month"))},className:`${Re["cell-year"]} ${t.focusedDate.year===c&&!d?Re.selected:""} ${t.focusedDate.year!==c&&!d?"hover:iru-bg-laba-blue-01":""} ${d?"iru-text-gray-400":"iru-cursor-pointer"}`,children:u},u)})})]})},ea={lato:"iru-font-Lato",inter:"iru-font-Inter",pJakartaSans:"iru-font-PJakartaSans"},Zf={kind:{box:An["pagination-box"],nude:An["pagination-nude"]},fonts:{inter:{value:ea.inter,typographyButtonLabel:"iru-text-payhere-body-sr"},lato:{value:ea.lato,typographyButtonLabel:"iru-text-payhere-body-sr"},pJakartaSans:{value:ea.pJakartaSans,typographyButtonLabel:"iru-text-bill-label-r"}}},ru=(e,t)=>{const n=t-e+1;return Array.from({length:n},(r,i)=>i+e)},qf={"en-US":{"Rows per page:":"Rows per page:",of:"of","Go to:":"Go to:"},"id-ID":{"Rows per page:":"Baris per halaman:",of:"dari","Go to:":"Go to:"},"zh-CN":{"Rows per page:":"每页行数:",of:"共","Go to:":"跳至:"},"nl-NL":{"Rows per page:":"Rijen per pagina:",of:"van","Go to:":"Ga naar:"}},w8=({totalData:e,totalPage:t,pageNumber:n,pageSize:r,className:i,id:a="1ru-pagination",kind:o="box",prevIcon:s,nextIcon:l,onChange:u,optionPageSize:c=[25,50,75,100],offset:p=1.5,zIndex:g,withGotoPage:d=!1,withMorePage:m=!0,withOptionPageSize:b=!1,locale:y="id-ID",fonts:f="inter"})=>{const v=N.useRef(null),[C,S]=N.useState(n),[_,E]=N.useState(n.toString()),x=1,h=(C-1)*r+1,w=r*C,D=e?`${Oi(h,"decimal")}-${w>=e?Oi(e,"decimal"):Oi(w,"decimal")}`:0,I=N.useMemo(()=>{const k=Math.ceil(e/r);if(x+5>=k)return ru(1,k);const M=Math.max(C-x,1),O=Math.min(C+x,k),z=M>2,G=O<k-2,U=1,J=k;if(!z&&G){const Q=3+2*x;return[...ru(1,Q),"mr",k]}if(z&&!G){const Q=3+2*x,ee=ru(k-Q+1,k);return[U,"ml",...ee]}if(z&&G){const Q=ru(M,O);return[U,"ml",...Q,"mr",J]}},[e,r,x,C]),T=k=>{typeof u=="function"&&(u(k),S(k.pageNumber),E(k.pageNumber.toString()))},F=k=>{if(typeof u=="function"&&m){if(k==="ml"){const M=C-5;S(M<1?1:C-5)}else if(k==="mr"){const M=C+5;S(M>t?t:C+5)}}},P=k=>{E(k);const R=Number(k);R>0&&R<=t&&T({pageSize:r,totalData:e,totalPage:t,pageNumber:R})};return B.jsxs(B.Fragment,{children:[B.jsxs("div",{id:a,className:`${Zf.kind[o]} ${Zf.fonts[f].value} ${i}`,children:[B.jsxs("div",{className:An["pagination-size"],children:[B.jsx("span",{children:qf[y]["Rows per page:"]}),b&&B.jsx(Pn,{id:`${a}-option-size`,variants:"ghost-blue-gray-100-bg_white",size:"xs",endIcon:B.jsx(Xr,{className:"!iru-text-gray-500 !iru-w-[14px] !iru-h-[14px] iru-mx-0.5"}),className:"!iru-rounded-md !iru-min-w-[60px] iru-justify-between",onClick:k=>{var R;return(R=v.current)==null?void 0:R.handlerShow(k)},children:Oi(r,"decimal")}),B.jsxs("span",{children:[D," ",qf[y].of," ",Oi(e,"decimal")]})]}),B.jsxs("div",{className:An["navigation-container"],children:[B.jsx("button",{id:`${a}-button-prev`,className:`${An["button-prev"]}`,disabled:C===1,onClick:()=>T({pageSize:r,totalData:e,totalPage:t,pageNumber:n-1}),children:typeof s=="function"||N.isValidElement(s)?N.isValidElement(s)?s:s():B.jsx(Xr,{className:"iru-rotate-90 !iru-text-gray-500 !iru-w-[14px] !iru-h-[14px]"})}),(I??[]).map((k,R)=>{if(typeof k!="number"){const M=["ml","mr"].includes(k);return B.jsx("button",{className:An["button-container"],disabled:!m,onClick:()=>F(k),children:M?"...":k},R)}return B.jsx("button",{id:`${a}-button-${k}`,className:`${k===n?An["pagination-active"]:""} ${An["button-container"]}
|
|
79
|
-
${Zf.fonts[f].typographyButtonLabel}`,disabled:k===n,onClick:()=>T({pageSize:r,totalData:e,totalPage:t,pageNumber:k}),children:Oi(k,"decimal")},R)}),B.jsx("button",{id:`${a}-button-next`,className:`${An["button-next"]}`,disabled:C===t||!t,onClick:()=>T({pageSize:r,totalData:e,totalPage:t,pageNumber:n+1}),children:typeof l=="function"||N.isValidElement(l)?N.isValidElement(l)?l:l():B.jsx(Xr,{className:"-iru-rotate-90 !iru-text-gray-500 !iru-w-[14px] !iru-h-[14px]"})}),d&&B.jsxs("div",{className:An["goto-page"],children:[B.jsx("span",{children:qf[y]["Go to:"]}),B.jsx("input",{id:`${a}-goto-page`,type:"number",className:An["goto-page-input"],value:_,onChange:k=>P(k.target.value),onBlur:()=>E(C.toString())})]})]})]}),B.jsx(ei,{floatingOptions:{placement:"bottom-end"},ref:v,className:An["options-size"],offset:p,zIndex:g,id:`${a}-popover-options-size`,children:c.map((k,R)=>B.jsx("p",{id:`${a}-option-size-${k}`,className:`${An.option} ${k===r?An.active:""}`,onClick:()=>{var M;T({totalData:e,totalPage:t,pageSize:k,pageNumber:1}),(M=v.current)==null||M.setShow(!1)},children:Oi(k,"decimal")},R))})]})};function Ha(e){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}function _8(e,t){if(Ha(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ha(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u4(e){var t=_8(e,"string");return Ha(t)=="symbol"?t:t+""}function Cs(e,t,n){return(t=u4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cb(Object(n),!0).forEach(function(r){Cs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I8(e){if(Array.isArray(e))return e}function D8(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function A0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c4(e,t){if(e){if(typeof e=="string")return A0(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A0(e,t):void 0}}function T8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ei(e,t){return I8(e)||D8(e,t)||c4(e,t)||T8()}function A8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Di(e,t){if(e==null)return{};var n,r,i=A8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var R8=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function B8(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,a=e.defaultValue,o=a===void 0?null:a,s=e.inputValue,l=e.menuIsOpen,u=e.onChange,c=e.onInputChange,p=e.onMenuClose,g=e.onMenuOpen,d=e.value,m=Di(e,R8),b=N.useState(s!==void 0?s:n),y=Ei(b,2),f=y[0],v=y[1],C=N.useState(l!==void 0?l:i),S=Ei(C,2),_=S[0],E=S[1],x=N.useState(d!==void 0?d:o),h=Ei(x,2),w=h[0],D=h[1],I=N.useCallback(function(O,z){typeof u=="function"&&u(O,z),D(O)},[u]),T=N.useCallback(function(O,z){var G;typeof c=="function"&&(G=c(O,z)),v(G!==void 0?G:O)},[c]),F=N.useCallback(function(){typeof g=="function"&&g(),E(!0)},[g]),P=N.useCallback(function(){typeof p=="function"&&p(),E(!1)},[p]),k=s!==void 0?s:f,R=l!==void 0?l:_,M=d!==void 0?d:w;return De(De({},m),{},{inputValue:k,menuIsOpen:R,onChange:I,onInputChange:T,onMenuClose:P,onMenuOpen:F,value:M})}function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(null,arguments)}function $8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u4(r.key),r)}}function k8(e,t,n){return t&&Eb(e.prototype,t),n&&Eb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function R0(e,t){return R0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},R0(e,t)}function P8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R0(e,t)}function Ec(e){return Ec=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ec(e)}function d4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d4=function(){return!!e})()}function F8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N8(e,t){if(t&&(Ha(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F8(e)}function M8(e){var t=d4();return function(){var n,r=Ec(e);if(t){var i=Ec(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return N8(this,n)}}function O8(e){if(Array.isArray(e))return A0(e)}function L8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function V8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
81
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sp(e){return O8(e)||L8(e)||c4(e)||V8()}function H8(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function j8(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var z8=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?process.env.NODE_ENV==="production":n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(j8(this));var i=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var a=r.charCodeAt(0)===64&&r.charCodeAt(1)===105;a&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
|
|
82
|
-
`+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!a}if(this.isSpeedy){var o=H8(i);try{o.insertRule(r,o.cssRules.length)}catch(s){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',s)}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),hn="-ms-",Sc="-moz-",Ke="-webkit-",lp="comm",up="rule",cp="decl",G8="@import",f4="@keyframes",W8="@layer",U8=Math.abs,Cd=String.fromCharCode,X8=Object.assign;function Y8(e,t){return dn(e,0)^45?(((t<<2^dn(e,0))<<2^dn(e,1))<<2^dn(e,2))<<2^dn(e,3):0}function h4(e){return e.trim()}function K8(e,t){return(e=t.exec(e))?e[0]:e}function Ze(e,t,n){return e.replace(t,n)}function B0(e,t){return e.indexOf(t)}function dn(e,t){return e.charCodeAt(t)|0}function qs(e,t,n){return e.slice(t,n)}function Lr(e){return e.length}function dp(e){return e.length}function iu(e,t){return t.push(e),e}function Z8(e,t){return e.map(t).join("")}var Ed=1,Ho=1,g4=0,Nn=0,kt=0,ns="";function Sd(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Ed,column:Ho,length:o,return:""}}function os(e,t){return X8(Sd("",null,null,"",null,null,0),e,{length:-e.length},t)}function q8(){return kt}function J8(){return kt=Nn>0?dn(ns,--Nn):0,Ho--,kt===10&&(Ho=1,Ed--),kt}function Un(){return kt=Nn<g4?dn(ns,Nn++):0,Ho++,kt===10&&(Ho=1,Ed++),kt}function Yr(){return dn(ns,Nn)}function Hu(){return Nn}function $l(e,t){return qs(ns,e,t)}function Js(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function p4(e){return Ed=Ho=1,g4=Lr(ns=e),Nn=0,[]}function m4(e){return ns="",e}function ju(e){return h4($l(Nn-1,$0(e===91?e+2:e===40?e+1:e)))}function Q8(e){for(;(kt=Yr())&&kt<33;)Un();return Js(e)>2||Js(kt)>3?"":" "}function ek(e,t){for(;--t&&Un()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return $l(e,Hu()+(t<6&&Yr()==32&&Un()==32))}function $0(e){for(;Un();)switch(kt){case e:return Nn;case 34:case 39:e!==34&&e!==39&&$0(kt);break;case 40:e===41&&$0(e);break;case 92:Un();break}return Nn}function tk(e,t){for(;Un()&&e+kt!==57;)if(e+kt===84&&Yr()===47)break;return"/*"+$l(t,Nn-1)+"*"+Cd(e===47?e:Un())}function nk(e){for(;!Js(Yr());)Un();return $l(e,Nn)}function rk(e){return m4(zu("",null,null,null,[""],e=p4(e),0,[0],e))}function zu(e,t,n,r,i,a,o,s,l){for(var u=0,c=0,p=o,g=0,d=0,m=0,b=1,y=1,f=1,v=0,C="",S=i,_=a,E=r,x=C;y;)switch(m=v,v=Un()){case 40:if(m!=108&&dn(x,p-1)==58){B0(x+=Ze(ju(v),"&","&\f"),"&\f")!=-1&&(f=-1);break}case 34:case 39:case 91:x+=ju(v);break;case 9:case 10:case 13:case 32:x+=Q8(m);break;case 92:x+=ek(Hu()-1,7);continue;case 47:switch(Yr()){case 42:case 47:iu(ik(tk(Un(),Hu()),t,n),l);break;default:x+="/"}break;case 123*b:s[u++]=Lr(x)*f;case 125*b:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+c:f==-1&&(x=Ze(x,/\f/g,"")),d>0&&Lr(x)-p&&iu(d>32?wb(x+";",r,n,p-1):wb(Ze(x," ","")+";",r,n,p-2),l);break;case 59:x+=";";default:if(iu(E=Sb(x,t,n,u,c,i,s,C,S=[],_=[],p),a),v===123)if(c===0)zu(x,t,E,E,S,a,p,s,_);else switch(g===99&&dn(x,3)===110?100:g){case 100:case 108:case 109:case 115:zu(e,E,E,r&&iu(Sb(e,E,E,0,0,i,s,C,i,S=[],p),_),i,_,p,s,r?S:_);break;default:zu(x,E,E,E,[""],_,0,s,_)}}u=c=d=0,b=f=1,C=x="",p=o;break;case 58:p=1+Lr(x),d=m;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&J8()==125)continue}switch(x+=Cd(v),v*b){case 38:f=c>0?1:(x+="\f",-1);break;case 44:s[u++]=(Lr(x)-1)*f,f=1;break;case 64:Yr()===45&&(x+=ju(Un())),g=Yr(),c=p=Lr(C=x+=nk(Hu())),v++;break;case 45:m===45&&Lr(x)==2&&(b=0)}}return a}function Sb(e,t,n,r,i,a,o,s,l,u,c){for(var p=i-1,g=i===0?a:[""],d=dp(g),m=0,b=0,y=0;m<r;++m)for(var f=0,v=qs(e,p+1,p=U8(b=o[m])),C=e;f<d;++f)(C=h4(b>0?g[f]+" "+v:Ze(v,/&\f/g,g[f])))&&(l[y++]=C);return Sd(e,t,n,i===0?up:s,l,u,c)}function ik(e,t,n){return Sd(e,t,n,lp,Cd(q8()),qs(e,2,-2),0)}function wb(e,t,n,r){return Sd(e,t,n,cp,qs(e,0,r),qs(e,r+1,-1),r)}function Ao(e,t){for(var n="",r=dp(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function ak(e,t,n,r){switch(e.type){case W8:if(e.children.length)break;case G8:case cp:return e.return=e.return||e.value;case lp:return"";case f4:return e.return=e.value+"{"+Ao(e.children,r)+"}";case up:e.value=e.props.join(",")}return Lr(n=Ao(e.children,r))?e.return=e.value+"{"+n+"}":""}function ok(e){var t=dp(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function sk(e){return function(t){t.root||(t=t.return)&&e(t)}}var lk=function(t,n,r){for(var i=0,a=0;i=a,a=Yr(),i===38&&a===12&&(n[r]=1),!Js(a);)Un();return $l(t,Nn)},uk=function(t,n){var r=-1,i=44;do switch(Js(i)){case 0:i===38&&Yr()===12&&(n[r]=1),t[r]+=lk(Nn-1,n,r);break;case 2:t[r]+=ju(i);break;case 4:if(i===44){t[++r]=Yr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Cd(i)}while(i=Un());return t},ck=function(t,n){return m4(uk(p4(t),n))},_b=new WeakMap,dk=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!_b.get(r))&&!i){_b.set(t,!0);for(var a=[],o=ck(n,a),s=r.props,l=0,u=0;l<o.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=a[l]?o[l].replace(/&\f/g,s[c]):s[c]+" "+o[l]}}},fk=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}},hk="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",gk=function(t){return t.type==="comm"&&t.children.indexOf(hk)>-1},pk=function(t){return function(n,r,i){if(!(n.type!=="rule"||t.compat)){var a=n.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var o=!!n.parent,s=o?n.parent.children:i,l=s.length-1;l>=0;l--){var u=s[l];if(u.line<n.line)break;if(u.column<n.column){if(gk(u))return;break}}a.forEach(function(c){console.error('The pseudo class "'+c+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+c.split("-child")[0]+'-of-type".')})}}}},b4=function(t){return t.type.charCodeAt(1)===105&&t.type.charCodeAt(0)===64},mk=function(t,n){for(var r=t-1;r>=0;r--)if(!b4(n[r]))return!0;return!1},Ib=function(t){t.type="",t.value="",t.return="",t.children="",t.props=""},bk=function(t,n,r){b4(t)&&(t.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Ib(t)):mk(n,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Ib(t)))};function v4(e,t){switch(Y8(e,t)){case 5103:return Ke+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ke+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ke+e+Sc+e+hn+e+e;case 6828:case 4268:return Ke+e+hn+e+e;case 6165:return Ke+e+hn+"flex-"+e+e;case 5187:return Ke+e+Ze(e,/(\w+).+(:[^]+)/,Ke+"box-$1$2"+hn+"flex-$1$2")+e;case 5443:return Ke+e+hn+"flex-item-"+Ze(e,/flex-|-self/,"")+e;case 4675:return Ke+e+hn+"flex-line-pack"+Ze(e,/align-content|flex-|-self/,"")+e;case 5548:return Ke+e+hn+Ze(e,"shrink","negative")+e;case 5292:return Ke+e+hn+Ze(e,"basis","preferred-size")+e;case 6060:return Ke+"box-"+Ze(e,"-grow","")+Ke+e+hn+Ze(e,"grow","positive")+e;case 4554:return Ke+Ze(e,/([^-])(transform)/g,"$1"+Ke+"$2")+e;case 6187:return Ze(Ze(Ze(e,/(zoom-|grab)/,Ke+"$1"),/(image-set)/,Ke+"$1"),e,"")+e;case 5495:case 3959:return Ze(e,/(image-set\([^]*)/,Ke+"$1$`$1");case 4968:return Ze(Ze(e,/(.+:)(flex-)?(.*)/,Ke+"box-pack:$3"+hn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ke+e+e;case 4095:case 3583:case 4068:case 2532:return Ze(e,/(.+)-inline(.+)/,Ke+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Lr(e)-1-t>6)switch(dn(e,t+1)){case 109:if(dn(e,t+4)!==45)break;case 102:return Ze(e,/(.+:)(.+)-([^]+)/,"$1"+Ke+"$2-$3$1"+Sc+(dn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~B0(e,"stretch")?v4(Ze(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(dn(e,t+1)!==115)break;case 6444:switch(dn(e,Lr(e)-3-(~B0(e,"!important")&&10))){case 107:return Ze(e,":",":"+Ke)+e;case 101:return Ze(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ke+(dn(e,14)===45?"inline-":"")+"box$3$1"+Ke+"$2$3$1"+hn+"$2box$3")+e}break;case 5936:switch(dn(e,t+11)){case 114:return Ke+e+hn+Ze(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ke+e+hn+Ze(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ke+e+hn+Ze(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ke+e+hn+e+e}return e}var vk=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case cp:t.return=v4(t.value,t.length);break;case f4:return Ao([os(t,{value:Ze(t.value,"@","@"+Ke)})],i);case up:if(t.length)return Z8(t.props,function(a){switch(K8(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ao([os(t,{props:[Ze(a,/:(read-\w+)/,":"+Sc+"$1")]})],i);case"::placeholder":return Ao([os(t,{props:[Ze(a,/:(plac\w+)/,":"+Ke+"input-$1")]}),os(t,{props:[Ze(a,/:(plac\w+)/,":"+Sc+"$1")]}),os(t,{props:[Ze(a,/:(plac\w+)/,hn+"input-$1")]})],i)}return""})}},yk=[vk],xk=function(t){var n=t.key;if(process.env.NODE_ENV!=="production"&&!n)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
|
|
83
|
-
If multiple caches share the same key they might "fight" for each other's style elements.`);if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(b){var y=b.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var i=t.stylisPlugins||yk;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(n))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+n+'" was passed');var a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var y=b.getAttribute("data-emotion").split(" "),f=1;f<y.length;f++)a[y[f]]=!0;s.push(b)});var l,u=[dk,fk];process.env.NODE_ENV!=="production"&&u.push(pk({get compat(){return m.compat}}),bk);{var c,p=[ak,process.env.NODE_ENV!=="production"?function(b){b.root||(b.return?c.insert(b.return):b.value&&b.type!==lp&&c.insert(b.value+"{}"))}:sk(function(b){c.insert(b)})],g=ok(u.concat(i,p)),d=function(y){return Ao(rk(y),g)};l=function(y,f,v,C){c=v,process.env.NODE_ENV!=="production"&&f.map!==void 0&&(c={insert:function(_){v.insert(_+f.map)}}),d(y?y+"{"+f.styles+"}":f.styles),C&&(m.inserted[f.name]=!0)}}var m={key:n,sheet:new z8({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return m.sheet.hydrate(s),m},au={exports:{}},Je={};/** @license React v16.13.1
|
|
84
|
-
* react-is.production.min.js
|
|
85
|
-
*
|
|
86
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the MIT license found in the
|
|
89
|
-
* LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/var Db;function Ck(){if(Db)return Je;Db=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function C(_){if(typeof _=="object"&&_!==null){var E=_.$$typeof;switch(E){case t:switch(_=_.type,_){case l:case u:case r:case a:case i:case p:return _;default:switch(_=_&&_.$$typeof,_){case s:case c:case m:case d:case o:return _;default:return E}}case n:return E}}}function S(_){return C(_)===u}return Je.AsyncMode=l,Je.ConcurrentMode=u,Je.ContextConsumer=s,Je.ContextProvider=o,Je.Element=t,Je.ForwardRef=c,Je.Fragment=r,Je.Lazy=m,Je.Memo=d,Je.Portal=n,Je.Profiler=a,Je.StrictMode=i,Je.Suspense=p,Je.isAsyncMode=function(_){return S(_)||C(_)===l},Je.isConcurrentMode=S,Je.isContextConsumer=function(_){return C(_)===s},Je.isContextProvider=function(_){return C(_)===o},Je.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},Je.isForwardRef=function(_){return C(_)===c},Je.isFragment=function(_){return C(_)===r},Je.isLazy=function(_){return C(_)===m},Je.isMemo=function(_){return C(_)===d},Je.isPortal=function(_){return C(_)===n},Je.isProfiler=function(_){return C(_)===a},Je.isStrictMode=function(_){return C(_)===i},Je.isSuspense=function(_){return C(_)===p},Je.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===u||_===a||_===i||_===p||_===g||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===d||_.$$typeof===o||_.$$typeof===s||_.$$typeof===c||_.$$typeof===y||_.$$typeof===f||_.$$typeof===v||_.$$typeof===b)},Je.typeOf=C,Je}var Qe={};/** @license React v16.13.1
|
|
91
|
-
* react-is.development.js
|
|
92
|
-
*
|
|
93
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the MIT license found in the
|
|
96
|
-
* LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/var Tb;function Ek(){return Tb||(Tb=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,f=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function C(A){return typeof A=="string"||typeof A=="function"||A===r||A===u||A===a||A===i||A===p||A===g||typeof A=="object"&&A!==null&&(A.$$typeof===m||A.$$typeof===d||A.$$typeof===o||A.$$typeof===s||A.$$typeof===c||A.$$typeof===y||A.$$typeof===f||A.$$typeof===v||A.$$typeof===b)}function S(A){if(typeof A=="object"&&A!==null){var L=A.$$typeof;switch(L){case t:var K=A.type;switch(K){case l:case u:case r:case a:case i:case p:return K;default:var X=K&&K.$$typeof;switch(X){case s:case c:case m:case d:case o:return X;default:return L}}case n:return L}}}var _=l,E=u,x=s,h=o,w=t,D=c,I=r,T=m,F=d,P=n,k=a,R=i,M=p,O=!1;function z(A){return O||(O=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),G(A)||S(A)===l}function G(A){return S(A)===u}function U(A){return S(A)===s}function J(A){return S(A)===o}function Q(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function ee(A){return S(A)===c}function q(A){return S(A)===r}function Z(A){return S(A)===m}function se(A){return S(A)===d}function te(A){return S(A)===n}function $(A){return S(A)===a}function H(A){return S(A)===i}function V(A){return S(A)===p}Qe.AsyncMode=_,Qe.ConcurrentMode=E,Qe.ContextConsumer=x,Qe.ContextProvider=h,Qe.Element=w,Qe.ForwardRef=D,Qe.Fragment=I,Qe.Lazy=T,Qe.Memo=F,Qe.Portal=P,Qe.Profiler=k,Qe.StrictMode=R,Qe.Suspense=M,Qe.isAsyncMode=z,Qe.isConcurrentMode=G,Qe.isContextConsumer=U,Qe.isContextProvider=J,Qe.isElement=Q,Qe.isForwardRef=ee,Qe.isFragment=q,Qe.isLazy=Z,Qe.isMemo=se,Qe.isPortal=te,Qe.isProfiler=$,Qe.isStrictMode=H,Qe.isSuspense=V,Qe.isValidElementType=C,Qe.typeOf=S}()),Qe}var Ab;function fp(){return Ab||(Ab=1,process.env.NODE_ENV==="production"?au.exports=Ck():au.exports=Ek()),au.exports}var Jf,Rb;function Sk(){if(Rb)return Jf;Rb=1;var e=fp(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(m){return e.isMemo(m)?i:a[m.$$typeof]||t}var s=Object.defineProperty,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function d(m,b,y){if(typeof b!="string"){if(g){var f=p(b);f&&f!==g&&d(m,f,y)}var v=l(b);u&&(v=v.concat(u(b)));for(var C=o(m),S=o(b),_=0;_<v.length;++_){var E=v[_];if(!n[E]&&!(y&&y[E])&&!(S&&S[E])&&!(C&&C[E])){var x=c(b,E);try{s(m,E,x)}catch{}}}}return m}return Jf=d,Jf}Sk();var wk=!0;function y4(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var hp=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||wk===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},gp=function(t,n,r){hp(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function _k(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ik={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Dk(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Bb=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
98
|
-
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
99
|
-
You can read more about this here:
|
|
100
|
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Tk="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Ak=/[A-Z]|^ms/g,x4=/_EMO_([^_]+?)_([^]*?)_EMO_/g,pp=function(t){return t.charCodeAt(1)===45},$b=function(t){return t!=null&&typeof t!="boolean"},Qf=Dk(function(e){return pp(e)?e:e.replace(Ak,"-$&").toLowerCase()}),wc=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(x4,function(r,i,a){return yr={name:i,styles:a,next:yr},i})}return Ik[t]!==1&&!pp(t)&&typeof n=="number"&&n!==0?n+"px":n};if(process.env.NODE_ENV!=="production"){var Rk=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,Bk=["normal","none","initial","inherit","unset"],$k=wc,kk=/^-ms-/,Pk=/-(.)/g,kb={};wc=function(t,n){if(t==="content"&&(typeof n!="string"||Bk.indexOf(n)===-1&&!Rk.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+n+"\"'`");var r=$k(t,n);return r!==""&&!pp(t)&&t.indexOf("-")!==-1&&kb[t]===void 0&&(kb[t]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+t.replace(kk,"ms-").replace(Pk,function(i,a){return a.toUpperCase()})+"?")),r}}var C4="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Qs(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&n.toString()==="NO_COMPONENT_SELECTOR")throw new Error(C4);return n}switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return yr={name:n.name,styles:n.styles,next:yr},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)yr={name:r.name,styles:r.styles,next:yr},r=r.next;var i=n.styles+";";return process.env.NODE_ENV!=="production"&&n.map!==void 0&&(i+=n.map),i}return Fk(e,t,n)}case"function":{if(e!==void 0){var a=yr,o=n(e);return yr=a,Qs(e,t,o)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var s=[],l=n.replace(x4,function(c,p,g){var d="animation"+s.length;return s.push("const "+d+" = keyframes`"+g.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+d+"}"});s.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(s,["`"+l+"`"]).join(`
|
|
101
|
-
`)+`
|
|
102
|
-
|
|
103
|
-
You should wrap it with \`css\` like this:
|
|
104
|
-
|
|
105
|
-
`+("css`"+l+"`"))}break}if(t==null)return n;var u=t[n];return u!==void 0?u:n}function Fk(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Qs(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object")t!=null&&t[o]!==void 0?r+=a+"{"+t[o]+"}":$b(o)&&(r+=Qf(a)+":"+wc(a,o)+";");else{if(a==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error(C4);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var s=0;s<o.length;s++)$b(o[s])&&(r+=Qf(a)+":"+wc(a,o[s])+";");else{var l=Qs(e,t,o);switch(a){case"animation":case"animationName":{r+=Qf(a)+":"+l+";";break}default:process.env.NODE_ENV!=="production"&&a==="undefined"&&console.error(Tk),r+=a+"{"+l+"}"}}}}return r}var Pb=/label:\s*([^\s;\n{]+)\s*(;|$)/g,E4;process.env.NODE_ENV!=="production"&&(E4=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var yr,el=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,a="";yr=void 0;var o=t[0];o==null||o.raw===void 0?(i=!1,a+=Qs(r,n,o)):(process.env.NODE_ENV!=="production"&&o[0]===void 0&&console.error(Bb),a+=o[0]);for(var s=1;s<t.length;s++)a+=Qs(r,n,t[s]),i&&(process.env.NODE_ENV!=="production"&&o[s]===void 0&&console.error(Bb),a+=o[s]);var l;process.env.NODE_ENV!=="production"&&(a=a.replace(E4,function(g){return l=g,""})),Pb.lastIndex=0;for(var u="",c;(c=Pb.exec(a))!==null;)u+="-"+c[1];var p=_k(a)+u;return process.env.NODE_ENV!=="production"?{name:p,styles:a,map:l,next:yr,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:p,styles:a,next:yr}},Nk=function(t){return t()},S4=ae.useInsertionEffect?ae.useInsertionEffect:!1,w4=S4||Nk,Fb=S4||ae.useLayoutEffect,mp={}.hasOwnProperty,bp=ae.createContext(typeof HTMLElement<"u"?xk({key:"css"}):null);process.env.NODE_ENV!=="production"&&(bp.displayName="EmotionCacheContext");bp.Provider;var vp=function(t){return N.forwardRef(function(n,r){var i=N.useContext(bp);return t(n,i,r)})},wd=ae.createContext({});process.env.NODE_ENV!=="production"&&(wd.displayName="EmotionThemeContext");var Nb=function(t){var n=t.split(".");return n[n.length-1]},Mk=function(t){var n=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(t);if(n||(n=/^([A-Za-z0-9$.]+)@/.exec(t),n))return Nb(n[1])},Ok=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),Lk=function(t){return t.replace(/\$/g,"-")},Vk=function(t){if(t)for(var n=t.split(`
|
|
106
|
-
`),r=0;r<n.length;r++){var i=Mk(n[r]);if(i){if(Ok.has(i))break;if(/^[A-Z]/.test(i))return Lk(i)}}},k0="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",P0="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",Hk=function(t,n){if(process.env.NODE_ENV!=="production"&&typeof n.css=="string"&&n.css.indexOf(":")!==-1)throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+n.css+"`");var r={};for(var i in n)mp.call(n,i)&&(r[i]=n[i]);if(r[k0]=t,process.env.NODE_ENV!=="production"&&n.css&&(typeof n.css!="object"||typeof n.css.name!="string"||n.css.name.indexOf("-")===-1)){var a=Vk(new Error().stack);a&&(r[P0]=a)}return r},jk=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return hp(n,r,i),w4(function(){return gp(n,r,i)}),null},_4=vp(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[k0],a=[r],o="";typeof e.className=="string"?o=y4(t.registered,a,e.className):e.className!=null&&(o=e.className+" ");var s=el(a,void 0,ae.useContext(wd));if(process.env.NODE_ENV!=="production"&&s.name.indexOf("-")===-1){var l=e[P0];l&&(s=el([s,"label:"+l+";"]))}o+=t.key+"-"+s.name;var u={};for(var c in e)mp.call(e,c)&&c!=="css"&&c!==k0&&(process.env.NODE_ENV==="production"||c!==P0)&&(u[c]=e[c]);return u.ref=n,u.className=o,ae.createElement(ae.Fragment,null,ae.createElement(jk,{cache:t,serialized:s,isStringTag:typeof i=="string"}),ae.createElement(i,u))});process.env.NODE_ENV!=="production"&&(_4.displayName="EmotionCssPropInternal");var zk=_4,Gk={version:"11.11.4"},_e=function(t,n){var r=arguments;if(n==null||!mp.call(n,"css"))return ae.createElement.apply(void 0,r);var i=r.length,a=new Array(i);a[0]=zk,a[1]=Hk(t,n);for(var o=2;o<i;o++)a[o]=r[o];return ae.createElement.apply(null,a)},Mb=!1,Wk=vp(function(e,t){process.env.NODE_ENV!=="production"&&!Mb&&(e.className||e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),Mb=!0);var n=e.styles,r=el([n],void 0,ae.useContext(wd)),i=ae.useRef();return Fb(function(){var a=t.key+"-global",o=new t.sheet.constructor({key:a,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+a+" "+r.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",a),o.hydrate([l])),i.current=[o,s],function(){o.flush()}},[t]),Fb(function(){var a=i.current,o=a[0],s=a[1];if(s){a[1]=!1;return}if(r.next!==void 0&&gp(t,r.next,!0),o.tags.length){var l=o.tags[o.tags.length-1].nextElementSibling;o.before=l,o.flush()}t.insert("",r,o,!1)},[t,r.name]),null});process.env.NODE_ENV!=="production"&&(Wk.displayName="EmotionGlobal");function yp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return el(t)}var Uk=function(){var t=yp.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},Xk=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var a=t[r];if(a!=null){var o=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a))o=e(a);else{process.env.NODE_ENV!=="production"&&a.styles!==void 0&&a.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),o="";for(var s in a)a[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=a}o&&(i&&(i+=" "),i+=o)}}return i};function Yk(e,t,n){var r=[],i=y4(e,r,n);return r.length<2?n:i+t(r)}var Kk=function(t){var n=t.cache,r=t.serializedArr;return w4(function(){for(var i=0;i<r.length;i++)gp(n,r[i],!1)}),null},Zk=vp(function(e,t){var n=!1,r=[],i=function(){if(n&&process.env.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var u=arguments.length,c=new Array(u),p=0;p<u;p++)c[p]=arguments[p];var g=el(c,t.registered);return r.push(g),hp(t,g,!1),t.key+"-"+g.name},a=function(){if(n&&process.env.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var u=arguments.length,c=new Array(u),p=0;p<u;p++)c[p]=arguments[p];return Yk(t.registered,i,Xk(c))},o={css:i,cx:a,theme:ae.useContext(wd)},s=e.children(o);return n=!0,ae.createElement(ae.Fragment,null,ae.createElement(Kk,{cache:t,serializedArr:r}),s)});process.env.NODE_ENV!=="production"&&(Zk.displayName="EmotionClassNames");if(process.env.NODE_ENV!=="production"){var Ob=!0,qk=typeof jest<"u"||typeof vi<"u";if(Ob&&!qk){var Lb=typeof globalThis<"u"?globalThis:Ob?window:global,Vb="__EMOTION_REACT_"+Gk.version.split(".")[0]+"__";Lb[Vb]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),Lb[Vb]=!0}}function Jk(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var F0=N.useLayoutEffect,Qk=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],_c=function(){};function eP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function tP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=[].concat(r);if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&a.push("".concat(eP(e,o)));return a.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var Hb=function(t){return cP(t)?t.filter(Boolean):Ha(t)==="object"&&t!==null?[t]:[]},I4=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Di(t,Qk);return De({},n)},It=function(t,n,r){var i=t.cx,a=t.getStyles,o=t.getClassNames,s=t.className;return{css:a(n,t),className:i(r??{},o(n,t),s)}};function _d(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function nP(e){return _d(e)?window.innerHeight:e.clientHeight}function D4(e){return _d(e)?window.pageYOffset:e.scrollTop}function Ic(e,t){if(_d(e)){window.scrollTo(0,t);return}e.scrollTop=t}function rP(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function iP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ou(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:_c,i=D4(e),a=t-i,o=10,s=0;function l(){s+=o;var u=iP(s,i,a,n);Ic(e,u),s<n?window.requestAnimationFrame(l):r(e)}l()}function jb(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Ic(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Ic(e,Math.max(t.offsetTop-i,0))}function aP(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function zb(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function oP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var T4=!1,sP={get passive(){return T4=!0}},su=typeof window<"u"?window:{};su.addEventListener&&su.removeEventListener&&(su.addEventListener("p",_c,sP),su.removeEventListener("p",_c,!1));var lP=T4;function uP(e){return e!=null}function cP(e){return Array.isArray(e)}function lu(e,t,n){return e?t:n}var dP=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=Object.entries(t).filter(function(o){var s=Ei(o,1),l=s[0];return!r.includes(l)});return a.reduce(function(o,s){var l=Ei(s,2),u=l[0],c=l[1];return o[u]=c,o},{})},fP=["children","innerProps"],hP=["children","innerProps"];function gP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,a=e.shouldScroll,o=e.isFixedPosition,s=e.controlHeight,l=rP(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=l.getBoundingClientRect(),p=c.height,g=n.getBoundingClientRect(),d=g.bottom,m=g.height,b=g.top,y=n.offsetParent.getBoundingClientRect(),f=y.top,v=o?window.innerHeight:nP(l),C=D4(l),S=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),E=f-_,x=v-b,h=E+C,w=p-C-b,D=d-v+C+S,I=C+b-_,T=160;switch(i){case"auto":case"bottom":if(x>=m)return{placement:"bottom",maxHeight:t};if(w>=m&&!o)return a&&ou(l,D,T),{placement:"bottom",maxHeight:t};if(!o&&w>=r||o&&x>=r){a&&ou(l,D,T);var F=o?x-S:w-S;return{placement:"bottom",maxHeight:F}}if(i==="auto"||o){var P=t,k=o?E:h;return k>=r&&(P=Math.min(k-S-s,t)),{placement:"top",maxHeight:P}}if(i==="bottom")return a&&Ic(l,D),{placement:"bottom",maxHeight:t};break;case"top":if(E>=m)return{placement:"top",maxHeight:t};if(h>=m&&!o)return a&&ou(l,I,T),{placement:"top",maxHeight:t};if(!o&&h>=r||o&&E>=r){var R=t;return(!o&&h>=r||o&&E>=r)&&(R=o?E-_:h-_),a&&ou(l,I,T),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function pP(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var A4=function(t){return t==="auto"?"bottom":t},mP=function(t,n){var r,i=t.placement,a=t.theme,o=a.borderRadius,s=a.spacing,l=a.colors;return De((r={label:"menu"},Cs(r,pP(i),"100%"),Cs(r,"position","absolute"),Cs(r,"width","100%"),Cs(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},R4=N.createContext(null),bP=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,a=t.menuPlacement,o=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,u=N.useContext(R4)||{},c=u.setPortalPlacement,p=N.useRef(null),g=N.useState(i),d=Ei(g,2),m=d[0],b=d[1],y=N.useState(null),f=Ei(y,2),v=f[0],C=f[1],S=l.spacing.controlHeight;return F0(function(){var _=p.current;if(_){var E=o==="fixed",x=s&&!E,h=gP({maxHeight:i,menuEl:_,minHeight:r,placement:a,shouldScroll:x,isFixedPosition:E,controlHeight:S});b(h.maxHeight),C(h.placement),c==null||c(h.placement)}},[i,a,o,s,r,c,S]),n({ref:p,placerProps:De(De({},t),{},{placement:v||A4(a),maxHeight:m})})},vP=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return _e("div",Te({},It(t,"menu",{menu:!0}),{ref:r},i),n)},yP=vP,xP=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return De({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},CP=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,a=t.isMulti;return _e("div",Te({},It(t,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:i},r),n)},B4=function(t,n){var r=t.theme,i=r.spacing.baseUnit,a=r.colors;return De({textAlign:"center"},n?{}:{color:a.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},EP=B4,SP=B4,wP=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,a=Di(t,fP);return _e("div",Te({},It(De(De({},a),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},_P=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,a=Di(t,hP);return _e("div",Te({},It(De(De({},a),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},IP=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},DP=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,a=t.innerProps,o=t.menuPlacement,s=t.menuPosition,l=N.useRef(null),u=N.useRef(null),c=N.useState(A4(o)),p=Ei(c,2),g=p[0],d=p[1],m=N.useMemo(function(){return{setPortalPlacement:d}},[]),b=N.useState(null),y=Ei(b,2),f=y[0],v=y[1],C=N.useCallback(function(){if(i){var x=aP(i),h=s==="fixed"?0:window.pageYOffset,w=x[g]+h;(w!==(f==null?void 0:f.offset)||x.left!==(f==null?void 0:f.rect.left)||x.width!==(f==null?void 0:f.rect.width))&&v({offset:w,rect:x})}},[i,s,g,f==null?void 0:f.offset,f==null?void 0:f.rect.left,f==null?void 0:f.rect.width]);F0(function(){C()},[C]);var S=N.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&l.current&&(u.current=WC(i,l.current,C,{elementResize:"ResizeObserver"in window}))},[i,C]);F0(function(){S()},[S]);var _=N.useCallback(function(x){l.current=x,S()},[S]);if(!n&&s!=="fixed"||!f)return null;var E=_e("div",Te({ref:_},It(De(De({},t),{},{offset:f.offset,position:s,rect:f.rect}),"menuPortal",{"menu-portal":!0}),a),r);return _e(R4.Provider,{value:m},n?Zo.createPortal(E,n):E)},TP=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},AP=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,a=t.isRtl;return _e("div",Te({},It(t,"container",{"--is-disabled":i,"--is-rtl":a}),r),n)},RP=function(t,n){var r=t.theme.spacing,i=t.isMulti,a=t.hasValue,o=t.selectProps.controlShouldRenderValue;return De({alignItems:"center",display:i&&a&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},BP=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,a=t.hasValue;return _e("div",Te({},It(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":a}),r),n)},$P=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},kP=function(t){var n=t.children,r=t.innerProps;return _e("div",Te({},It(t,"indicatorsContainer",{indicators:!0}),r),n)},Gb,PP=["size"],FP=["innerProps","isRtl","size"];function NP(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var MP=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:NP},$4=function(t){var n=t.size,r=Di(t,PP);return _e("svg",Te({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:MP},r))},xp=function(t){return _e($4,Te({size:20},t),_e("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},k4=function(t){return _e($4,Te({size:20},t),_e("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},P4=function(t,n){var r=t.isFocused,i=t.theme,a=i.spacing.baseUnit,o=i.colors;return De({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:a*2,":hover":{color:r?o.neutral80:o.neutral40}})},OP=P4,LP=function(t){var n=t.children,r=t.innerProps;return _e("div",Te({},It(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||_e(k4,null))},VP=P4,HP=function(t){var n=t.children,r=t.innerProps;return _e("div",Te({},It(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||_e(xp,null))},jP=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing.baseUnit,o=i.colors;return De({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:a*2,marginTop:a*2})},zP=function(t){var n=t.innerProps;return _e("span",Te({},n,It(t,"indicatorSeparator",{"indicator-separator":!0})))},GP=Uk(Gb||(Gb=Jk([`
|
|
107
|
-
0%, 80%, 100% { opacity: 0; }
|
|
108
|
-
40% { opacity: 1; }
|
|
109
|
-
`]))),WP=function(t,n){var r=t.isFocused,i=t.size,a=t.theme,o=a.colors,s=a.spacing.baseUnit;return De({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2})},eh=function(t){var n=t.delay,r=t.offset;return _e("span",{css:yp({animation:"".concat(GP," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},UP=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,a=i===void 0?4:i,o=Di(t,FP);return _e("div",Te({},It(De(De({},o),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),_e(eh,{delay:0,offset:r}),_e(eh,{delay:160,offset:!0}),_e(eh,{delay:320,offset:!r}))},XP=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.theme,o=a.colors,s=a.borderRadius,l=a.spacing;return De({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},YP=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.innerRef,o=t.innerProps,s=t.menuIsOpen;return _e("div",Te({ref:a},It(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),o,{"aria-disabled":r||void 0}),n)},KP=YP,ZP=["data"],qP=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},JP=function(t){var n=t.children,r=t.cx,i=t.getStyles,a=t.getClassNames,o=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,p=t.selectProps;return _e("div",Te({},It(t,"group",{group:!0}),l),_e(o,Te({},s,{selectProps:p,theme:c,getStyles:i,getClassNames:a,cx:r}),u),_e("div",null,n))},QP=function(t,n){var r=t.theme,i=r.colors,a=r.spacing;return De({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},e7=function(t){var n=I4(t);n.data;var r=Di(n,ZP);return _e("div",Te({},It(t,"groupHeading",{"group-heading":!0}),r))},t7=JP,n7=["innerRef","isDisabled","isHidden","inputClassName"],r7=function(t,n){var r=t.isDisabled,i=t.value,a=t.theme,o=a.spacing,s=a.colors;return De(De({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},i7),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:s.neutral80})},F4={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},i7={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":De({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},F4)},a7=function(t){return De({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},F4)},o7=function(t){var n=t.cx,r=t.value,i=I4(t),a=i.innerRef,o=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Di(i,n7);return _e("div",Te({},It(t,"input",{"input-container":!0}),{"data-value":r||""}),_e("input",Te({className:n({input:!0},l),ref:a,style:a7(s),disabled:o},u)))},s7=o7,l7=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,o=r.colors;return De({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:a/2,margin:i.baseUnit/2})},u7=function(t,n){var r=t.theme,i=r.borderRadius,a=r.colors,o=t.cropWithEllipsis;return De({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},c7=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,o=r.colors,s=t.isFocused;return De({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:s?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},N4=function(t){var n=t.children,r=t.innerProps;return _e("div",r,n)},d7=N4,f7=N4;function h7(e){var t=e.children,n=e.innerProps;return _e("div",Te({role:"button"},n),t||_e(xp,{size:14}))}var g7=function(t){var n=t.children,r=t.components,i=t.data,a=t.innerProps,o=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,p=r.Remove;return _e(u,{data:i,innerProps:De(De({},It(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),a),selectProps:l},_e(c,{data:i,innerProps:De({},It(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),_e(p,{data:i,innerProps:De(De({},It(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},p7=g7,m7=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.isSelected,o=t.theme,s=o.spacing,l=o.colors;return De({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:a?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?l.primary:l.primary50}})},b7=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.isSelected,o=t.innerRef,s=t.innerProps;return _e("div",Te({},It(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":a}),{ref:o,"aria-disabled":r},s),n)},v7=b7,y7=function(t,n){var r=t.theme,i=r.spacing,a=r.colors;return De({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},x7=function(t){var n=t.children,r=t.innerProps;return _e("div",Te({},It(t,"placeholder",{placeholder:!0}),r),n)},C7=x7,E7=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing,o=i.colors;return De({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},S7=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return _e("div",Te({},It(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},w7=S7,M4={ClearIndicator:HP,Control:KP,DropdownIndicator:LP,DownChevron:k4,CrossIcon:xp,Group:t7,GroupHeading:e7,IndicatorsContainer:kP,IndicatorSeparator:zP,Input:s7,LoadingIndicator:UP,Menu:yP,MenuList:CP,MenuPortal:DP,LoadingMessage:_P,NoOptionsMessage:wP,MultiValue:p7,MultiValueContainer:d7,MultiValueLabel:f7,MultiValueRemove:h7,Option:v7,Placeholder:C7,SelectContainer:AP,SingleValue:w7,ValueContainer:BP},_7=function(t){return De(De({},M4),t.components)},Wb=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function I7(e,t){return!!(e===t||Wb(e)&&Wb(t))}function D7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!I7(e[n],t[n]))return!1;return!0}function T7(e,t){t===void 0&&(t=D7);var n=null;function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}function A7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var R7=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:A7},B7=function(t){return _e("span",Te({css:R7},t))},Ub=B7,$7={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,a=t.context,o=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,a=t.labels,o=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,a=t.label,o=a===void 0?"":a,s=t.selectValue,l=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,p=function(b,y){return b&&b.length?"".concat(b.indexOf(y)+1," of ").concat(b.length):""};if(n==="value"&&s)return"value ".concat(o," focused, ").concat(p(s,r),".");if(n==="menu"&&c){var g=l?" disabled":"",d="".concat(u?" selected":"").concat(g);return"".concat(o).concat(d,", ").concat(p(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},k7=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.focusableOptions,o=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,c=t.isAppleDevice,p=l.ariaLiveMessages,g=l.getOptionLabel,d=l.inputValue,m=l.isMulti,b=l.isOptionDisabled,y=l.isSearchable,f=l.menuIsOpen,v=l.options,C=l.screenReaderStatus,S=l.tabSelectsValue,_=l.isLoading,E=l["aria-label"],x=l["aria-live"],h=N.useMemo(function(){return De(De({},$7),p||{})},[p]),w=N.useMemo(function(){var k="";if(n&&h.onChange){var R=n.option,M=n.options,O=n.removedValue,z=n.removedValues,G=n.value,U=function(te){return Array.isArray(te)?null:te},J=O||R||U(G),Q=J?g(J):"",ee=M||z||void 0,q=ee?ee.map(g):[],Z=De({isDisabled:J&&b(J,s),label:Q,labels:q},n);k=h.onChange(Z)}return k},[n,h,b,s,g]),D=N.useMemo(function(){var k="",R=r||i,M=!!(r&&s&&s.includes(r));if(R&&h.onFocus){var O={focused:R,label:g(R),isDisabled:b(R,s),isSelected:M,options:a,context:R===r?"menu":"value",selectValue:s,isAppleDevice:c};k=h.onFocus(O)}return k},[r,i,g,b,h,a,s,c]),I=N.useMemo(function(){var k="";if(f&&v.length&&!_&&h.onFilter){var R=C({count:a.length});k=h.onFilter({inputValue:d,resultsMessage:R})}return k},[a,d,f,h,v,C,_]),T=(n==null?void 0:n.action)==="initial-input-focus",F=N.useMemo(function(){var k="";if(h.guidance){var R=i?"value":f?"menu":"input";k=h.guidance({"aria-label":E,context:R,isDisabled:r&&b(r,s),isMulti:m,isSearchable:y,tabSelectsValue:S,isInitialFocus:T})}return k},[E,r,i,m,b,y,f,h,s,S,T]),P=_e(N.Fragment,null,_e("span",{id:"aria-selection"},w),_e("span",{id:"aria-focused"},D),_e("span",{id:"aria-results"},I),_e("span",{id:"aria-guidance"},F));return _e(N.Fragment,null,_e(Ub,{id:u},T&&P),_e(Ub,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!T&&P))},P7=k7,N0=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],F7=new RegExp("["+N0.map(function(e){return e.letters}).join("")+"]","g"),O4={};for(var th=0;th<N0.length;th++)for(var nh=N0[th],rh=0;rh<nh.letters.length;rh++)O4[nh.letters[rh]]=nh.base;var L4=function(t){return t.replace(F7,function(n){return O4[n]})},N7=T7(L4),Xb=function(t){return t.replace(/^\s+|\s+$/g,"")},M7=function(t){return"".concat(t.label," ").concat(t.value)},O7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=De({ignoreCase:!0,ignoreAccents:!0,stringify:M7,trim:!0,matchFrom:"any"},t),a=i.ignoreCase,o=i.ignoreAccents,s=i.stringify,l=i.trim,u=i.matchFrom,c=l?Xb(r):r,p=l?Xb(s(n)):s(n);return a&&(c=c.toLowerCase(),p=p.toLowerCase()),o&&(c=N7(c),p=L4(p)),u==="start"?p.substr(0,c.length)===c:p.indexOf(c)>-1}},L7=["innerRef"];function V7(e){var t=e.innerRef,n=Di(e,L7),r=dP(n,"onExited","in","enter","exit","appear");return _e("input",Te({ref:t},r,{css:yp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var H7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function j7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,o=N.useRef(!1),s=N.useRef(!1),l=N.useRef(0),u=N.useRef(null),c=N.useCallback(function(y,f){if(u.current!==null){var v=u.current,C=v.scrollTop,S=v.scrollHeight,_=v.clientHeight,E=u.current,x=f>0,h=S-_-C,w=!1;h>f&&o.current&&(r&&r(y),o.current=!1),x&&s.current&&(a&&a(y),s.current=!1),x&&f>h?(n&&!o.current&&n(y),E.scrollTop=S,w=!0,o.current=!0):!x&&-f>C&&(i&&!s.current&&i(y),E.scrollTop=0,w=!0,s.current=!0),w&&H7(y)}},[n,r,i,a]),p=N.useCallback(function(y){c(y,y.deltaY)},[c]),g=N.useCallback(function(y){l.current=y.changedTouches[0].clientY},[]),d=N.useCallback(function(y){var f=l.current-y.changedTouches[0].clientY;c(y,f)},[c]),m=N.useCallback(function(y){if(y){var f=lP?{passive:!1}:!1;y.addEventListener("wheel",p,f),y.addEventListener("touchstart",g,f),y.addEventListener("touchmove",d,f)}},[d,g,p]),b=N.useCallback(function(y){y&&(y.removeEventListener("wheel",p,!1),y.removeEventListener("touchstart",g,!1),y.removeEventListener("touchmove",d,!1))},[d,g,p]);return N.useEffect(function(){if(t){var y=u.current;return m(y),function(){b(y)}}},[t,m,b]),function(y){u.current=y}}var Yb=["boxSizing","height","overflow","paddingRight","position"],Kb={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Zb(e){e.cancelable&&e.preventDefault()}function qb(e){e.stopPropagation()}function Jb(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Qb(){return"ontouchstart"in window||navigator.maxTouchPoints}var ev=!!(typeof window<"u"&&window.document&&window.document.createElement),ss=0,lo={capture:!1,passive:!1};function z7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=N.useRef({}),a=N.useRef(null),o=N.useCallback(function(l){if(ev){var u=document.body,c=u&&u.style;if(r&&Yb.forEach(function(m){var b=c&&c[m];i.current[m]=b}),r&&ss<1){var p=parseInt(i.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,d=window.innerWidth-g+p||0;Object.keys(Kb).forEach(function(m){var b=Kb[m];c&&(c[m]=b)}),c&&(c.paddingRight="".concat(d,"px"))}u&&Qb()&&(u.addEventListener("touchmove",Zb,lo),l&&(l.addEventListener("touchstart",Jb,lo),l.addEventListener("touchmove",qb,lo))),ss+=1}},[r]),s=N.useCallback(function(l){if(ev){var u=document.body,c=u&&u.style;ss=Math.max(ss-1,0),r&&ss<1&&Yb.forEach(function(p){var g=i.current[p];c&&(c[p]=g)}),u&&Qb()&&(u.removeEventListener("touchmove",Zb,lo),l&&(l.removeEventListener("touchstart",Jb,lo),l.removeEventListener("touchmove",qb,lo)))}},[r]);return N.useEffect(function(){if(t){var l=a.current;return o(l),function(){s(l)}}},[t,o,s]),function(l){a.current=l}}function G7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var W7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},U7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:G7};function X7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,a=e.onBottomArrive,o=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=j7({isEnabled:i,onBottomArrive:a,onBottomLeave:o,onTopArrive:s,onTopLeave:l}),c=z7({isEnabled:n}),p=function(d){u(d),c(d)};return _e(N.Fragment,null,n&&_e("div",{onClick:W7,css:U7}),t(p))}function Y7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var K7=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:Y7},Z7=function(t){var n=t.name,r=t.onFocus;return _e("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:K7,value:"",onChange:function(){}})},q7=Z7;function Cp(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function J7(){return Cp(/^iPhone/i)}function V4(){return Cp(/^Mac/i)}function Q7(){return Cp(/^iPad/i)||V4()&&navigator.maxTouchPoints>1}function eF(){return J7()||Q7()}function tF(){return V4()||eF()}var nF=function(t){return t.label},rF=function(t){return t.label},iF=function(t){return t.value},aF=function(t){return!!t.isDisabled},oF={clearIndicator:VP,container:TP,control:XP,dropdownIndicator:OP,group:qP,groupHeading:QP,indicatorsContainer:$P,indicatorSeparator:jP,input:r7,loadingIndicator:WP,loadingMessage:SP,menu:mP,menuList:xP,menuPortal:IP,multiValue:l7,multiValueLabel:u7,multiValueRemove:c7,noOptionsMessage:EP,option:m7,placeholder:y7,singleValue:E7,valueContainer:RP},sF={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},lF=4,H4=4,uF=38,cF=H4*2,dF={baseUnit:H4,controlHeight:uF,menuGutter:cF},ih={borderRadius:lF,colors:sF,spacing:dF},fF={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:zb(),captureMenuScroll:!zb(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:O7(),formatGroupLabel:nF,getOptionLabel:rF,getOptionValue:iF,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:aF,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!oP(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function tv(e,t,n,r){var i=G4(e,t,n),a=W4(e,t,n),o=z4(e,t),s=Dc(e,t);return{type:"option",data:t,isDisabled:i,isSelected:a,label:o,value:s,index:r}}function Gu(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,s){return tv(e,o,t,s)}).filter(function(o){return rv(e,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var a=tv(e,n,t,r);return rv(e,a)?a:void 0}).filter(uP)}function j4(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,sp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function nv(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,sp(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function hF(e,t){return j4(Gu(e,t))}function rv(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,a=t.isSelected,o=t.label,s=t.value;return(!X4(e)||!a)&&U4(e,{label:o,value:s,data:i},r)}function gF(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var a=t.indexOf(n);if(a>-1)return n;if(i<t.length)return t[i]}return null}function pF(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var ah=function(t,n){var r,i=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return i||null},z4=function(t,n){return t.getOptionLabel(n)},Dc=function(t,n){return t.getOptionValue(n)};function G4(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function W4(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Dc(e,t);return n.some(function(i){return Dc(e,i)===r})}function U4(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var X4=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},mF=1,Y4=function(e){P8(n,e);var t=M8(n);function n(r){var i;if($8(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,u){var c=i.props,p=c.onChange,g=c.name;u.name=g,i.ariaOnChange(l,u),p(l,u)},i.setValue=function(l,u,c){var p=i.props,g=p.closeMenuOnSelect,d=p.isMulti,m=p.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),g&&(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:u,option:c})},i.selectOption=function(l){var u=i.props,c=u.blurInputOnSelect,p=u.isMulti,g=u.name,d=i.state.selectValue,m=p&&i.isOptionSelected(l,d),b=i.isOptionDisabled(l,d);if(m){var y=i.getOptionValue(l);i.setValue(d.filter(function(f){return i.getOptionValue(f)!==y}),"deselect-option",l)}else if(!b)p?i.setValue([].concat(sp(d),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:g});return}c&&i.blurInput()},i.removeValue=function(l){var u=i.props.isMulti,c=i.state.selectValue,p=i.getOptionValue(l),g=c.filter(function(m){return i.getOptionValue(m)!==p}),d=lu(u,g,g[0]||null);i.onChange(d,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(lu(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,u=i.state.selectValue,c=u[u.length-1],p=u.slice(0,u.length-1),g=lu(l,p,p[0]||null);c&&i.onChange(g,{action:"pop-value",removedValue:c})},i.getFocusedOptionId=function(l){return ah(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return nv(Gu(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];return tP.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(l){return z4(i.props,l)},i.getOptionValue=function(l){return Dc(i.props,l)},i.getStyles=function(l,u){var c=i.props.unstyled,p=oF[l](u,c);p.boxSizing="border-box";var g=i.props.styles[l];return g?g(p,u):p},i.getClassNames=function(l,u){var c,p;return(c=(p=i.props.classNames)[l])===null||c===void 0?void 0:c.call(p,u)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return _7(i.props)},i.buildCategorizedOptions=function(){return Gu(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return j4(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,u){i.setState({ariaSelection:De({value:l},u)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var u=i.props,c=u.isMulti,p=u.menuIsOpen;i.focusInput(),p?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&_d(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var u=l.touches,c=u&&u.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var u=l.touches,c=u&&u.item(0);if(c){var p=Math.abs(c.clientX-i.initialTouchX),g=Math.abs(c.clientY-i.initialTouchY),d=5;i.userIsDragging=p>d||g>d}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var u=i.props.inputValue,c=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var u=i.getFocusableOptions(),c=u.indexOf(l);i.setState({focusedOption:l,focusedOptionId:c>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return X4(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var u=i.props,c=u.isMulti,p=u.backspaceRemovesValue,g=u.escapeClearsValue,d=u.inputValue,m=u.isClearable,b=u.isDisabled,y=u.menuIsOpen,f=u.onKeyDown,v=u.tabSelectsValue,C=u.openMenuOnFocus,S=i.state,_=S.focusedOption,E=S.focusedValue,x=S.selectValue;if(!b&&!(typeof f=="function"&&(f(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!c||d)return;i.focusValue("previous");break;case"ArrowRight":if(!c||d)return;i.focusValue("next");break;case"Delete":case"Backspace":if(d)return;if(E)i.removeValue(E);else{if(!p)return;c?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!y||!v||!_||C&&i.isOptionSelected(_,x))return;i.selectOption(_);break;case"Enter":if(l.keyCode===229)break;if(y){if(!_||i.isComposing)return;i.selectOption(_);break}return;case"Escape":y?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:d}),i.onMenuClose()):m&&g&&i.clearValue();break;case" ":if(d)return;if(!y){i.openMenu("first");break}if(!_)return;i.selectOption(_);break;case"ArrowUp":y?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":y?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!y)return;i.focusOption("pageup");break;case"PageDown":if(!y)return;i.focusOption("pagedown");break;case"Home":if(!y)return;i.focusOption("first");break;case"End":if(!y)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++mF),i.state.selectValue=Hb(r.value),r.menuIsOpen&&i.state.selectValue.length){var a=i.getFocusableOptionsWithIds(),o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=a,i.state.focusedOption=o[s],i.state.focusedOptionId=ah(a,o[s])}return i}return k8(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&jb(this.menuListRef,this.focusedOptionRef),tF()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused;(l&&!o&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(jb(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,a){this.props.onInputChange(i,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var a=this,o=this.state,s=o.selectValue,l=o.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var p=u.indexOf(s[0]);p>-1&&(c=p)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(i){var a=this.state,o=a.selectValue,s=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(s);s||(l=-1);var u=o.length-1,c=-1;if(o.length){switch(i){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l<u&&(c=l+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:o[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,o=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(o);o||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-a,l<0&&(l=0)):i==="pagedown"?(l=u+a,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(ih):De(De({},ih),this.props.theme):ih}},{key:"getCommonProps",value:function(){var i=this.clearValue,a=this.cx,o=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,p=this.props,g=p.isMulti,d=p.isRtl,m=p.options,b=this.hasValue();return{clearValue:i,cx:a,getStyles:o,getClassNames:s,getValue:l,hasValue:b,isMulti:g,isRtl:d,options:m,selectOption:u,selectProps:p,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,a=i.isClearable,o=i.isMulti;return a===void 0?o:a}},{key:"isOptionDisabled",value:function(i,a){return G4(this.props,i,a)}},{key:"isOptionSelected",value:function(i,a){return W4(this.props,i,a)}},{key:"filterOption",value:function(i,a){return U4(this.props,i,a)}},{key:"formatOptionLabel",value:function(i,a){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:a,inputValue:o,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,a=i.isDisabled,o=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,c=i.form,p=i.menuIsOpen,g=i.required,d=this.getComponents(),m=d.Input,b=this.state,y=b.inputIsHidden,f=b.ariaSelection,v=this.commonProps,C=s||this.getElementId("input"),S=De(De(De({"aria-autocomplete":"list","aria-expanded":p,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},p&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(f==null?void 0:f.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?ae.createElement(m,Te({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:a,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},S)):ae.createElement(V7,Te({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:_c,onFocus:this.onInputFocus,disabled:a,tabIndex:u,inputMode:"none",form:c,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,a=this.getComponents(),o=a.MultiValue,s=a.MultiValueContainer,l=a.MultiValueLabel,u=a.MultiValueRemove,c=a.SingleValue,p=a.Placeholder,g=this.commonProps,d=this.props,m=d.controlShouldRenderValue,b=d.isDisabled,y=d.isMulti,f=d.inputValue,v=d.placeholder,C=this.state,S=C.selectValue,_=C.focusedValue,E=C.isFocused;if(!this.hasValue()||!m)return f?null:ae.createElement(p,Te({},g,{key:"placeholder",isDisabled:b,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),v);if(y)return S.map(function(h,w){var D=h===_,I="".concat(i.getOptionLabel(h),"-").concat(i.getOptionValue(h));return ae.createElement(o,Te({},g,{components:{Container:s,Label:l,Remove:u},isFocused:D,isDisabled:b,key:I,index:w,removeProps:{onClick:function(){return i.removeValue(h)},onTouchEnd:function(){return i.removeValue(h)},onMouseDown:function(F){F.preventDefault()}},data:h}),i.formatOptionLabel(h,"value"))});if(f)return null;var x=S[0];return ae.createElement(c,Te({},g,{data:x,isDisabled:b}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),a=i.ClearIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!this.isClearable()||!a||l||!this.hasValue()||u)return null;var p={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return ae.createElement(a,Te({},o,{innerProps:p,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),a=i.LoadingIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!a||!u)return null;var p={"aria-hidden":"true"};return ae.createElement(a,Te({},o,{innerProps:p,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator,o=i.IndicatorSeparator;if(!a||!o)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return ae.createElement(o,Te({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator;if(!a)return null;var o=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return ae.createElement(a,Te({},o,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,a=this.getComponents(),o=a.Group,s=a.GroupHeading,l=a.Menu,u=a.MenuList,c=a.MenuPortal,p=a.LoadingMessage,g=a.NoOptionsMessage,d=a.Option,m=this.commonProps,b=this.state.focusedOption,y=this.props,f=y.captureMenuScroll,v=y.inputValue,C=y.isLoading,S=y.loadingMessage,_=y.minMenuHeight,E=y.maxMenuHeight,x=y.menuIsOpen,h=y.menuPlacement,w=y.menuPosition,D=y.menuPortalTarget,I=y.menuShouldBlockScroll,T=y.menuShouldScrollIntoView,F=y.noOptionsMessage,P=y.onMenuScrollToTop,k=y.onMenuScrollToBottom;if(!x)return null;var R=function(Q,ee){var q=Q.type,Z=Q.data,se=Q.isDisabled,te=Q.isSelected,$=Q.label,H=Q.value,V=b===Z,A=se?void 0:function(){return i.onOptionHover(Z)},L=se?void 0:function(){return i.selectOption(Z)},K="".concat(i.getElementId("option"),"-").concat(ee),X={id:K,onClick:L,onMouseMove:A,onMouseOver:A,tabIndex:-1,role:"option","aria-selected":i.state.isAppleDevice?void 0:te};return ae.createElement(d,Te({},m,{innerProps:X,data:Z,isDisabled:se,isSelected:te,key:K,label:$,type:q,value:H,isFocused:V,innerRef:V?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(Q.data,"menu"))},M;if(this.hasOptions())M=this.getCategorizedOptions().map(function(J){if(J.type==="group"){var Q=J.data,ee=J.options,q=J.index,Z="".concat(i.getElementId("group"),"-").concat(q),se="".concat(Z,"-heading");return ae.createElement(o,Te({},m,{key:Z,data:Q,options:ee,Heading:s,headingProps:{id:se,data:J.data},label:i.formatGroupLabel(J.data)}),J.options.map(function(te){return R(te,"".concat(q,"-").concat(te.index))}))}else if(J.type==="option")return R(J,"".concat(J.index))});else if(C){var O=S({inputValue:v});if(O===null)return null;M=ae.createElement(p,m,O)}else{var z=F({inputValue:v});if(z===null)return null;M=ae.createElement(g,m,z)}var G={minMenuHeight:_,maxMenuHeight:E,menuPlacement:h,menuPosition:w,menuShouldScrollIntoView:T},U=ae.createElement(bP,Te({},m,G),function(J){var Q=J.ref,ee=J.placerProps,q=ee.placement,Z=ee.maxHeight;return ae.createElement(l,Te({},m,G,{innerRef:Q,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:C,placement:q}),ae.createElement(X7,{captureEnabled:f,onTopArrive:P,onBottomArrive:k,lockEnabled:I},function(se){return ae.createElement(u,Te({},m,{innerRef:function($){i.getMenuListRef($),se($)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:C,maxHeight:Z,focusedOption:b}),M)}))});return D||w==="fixed"?ae.createElement(c,Te({},m,{appendTo:D,controlElement:this.controlRef,menuPlacement:h,menuPosition:w}),U):U}},{key:"renderFormField",value:function(){var i=this,a=this.props,o=a.delimiter,s=a.isDisabled,l=a.isMulti,u=a.name,c=a.required,p=this.state.selectValue;if(c&&!this.hasValue()&&!s)return ae.createElement(q7,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(o){var g=p.map(function(b){return i.getOptionValue(b)}).join(o);return ae.createElement("input",{name:u,type:"hidden",value:g})}else{var d=p.length>0?p.map(function(b,y){return ae.createElement("input",{key:"i-".concat(y),name:u,type:"hidden",value:i.getOptionValue(b)})}):ae.createElement("input",{name:u,type:"hidden",value:""});return ae.createElement("div",null,d)}else{var m=p[0]?this.getOptionValue(p[0]):"";return ae.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,a=this.state,o=a.ariaSelection,s=a.focusedOption,l=a.focusedValue,u=a.isFocused,c=a.selectValue,p=this.getFocusableOptions();return ae.createElement(P7,Te({},i,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:s,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:p,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),a=i.Control,o=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,c=u.className,p=u.id,g=u.isDisabled,d=u.menuIsOpen,m=this.state.isFocused,b=this.commonProps=this.getCommonProps();return ae.createElement(s,Te({},b,{className:c,innerProps:{id:p,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:m}),this.renderLiveRegion(),ae.createElement(a,Te({},b,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:m,menuIsOpen:d}),ae.createElement(l,Te({},b,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),ae.createElement(o,Te({},b,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,a){var o=a.prevProps,s=a.clearFocusValueOnUpdate,l=a.inputIsHiddenAfterUpdate,u=a.ariaSelection,c=a.isFocused,p=a.prevWasFocused,g=a.instancePrefix,d=i.options,m=i.value,b=i.menuIsOpen,y=i.inputValue,f=i.isMulti,v=Hb(m),C={};if(o&&(m!==o.value||d!==o.options||b!==o.menuIsOpen||y!==o.inputValue)){var S=b?hF(i,v):[],_=b?nv(Gu(i,v),"".concat(g,"-option")):[],E=s?gF(a,v):null,x=pF(a,S),h=ah(_,x);C={selectValue:v,focusedOption:x,focusedOptionId:h,focusableOptionsWithIds:_,focusedValue:E,clearFocusValueOnUpdate:!1}}var w=l!=null&&i!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},D=u,I=c&&p;return c&&!I&&(D={value:lu(f,v,v[0]||null),options:v,action:"initial-input-focus"},I=!p),(u==null?void 0:u.action)==="initial-input-focus"&&(D=null),De(De(De({},C),w),{},{prevProps:i,ariaSelection:D,prevWasFocused:I})}}]),n}(N.Component);Y4.defaultProps=fF;var bF=N.forwardRef(function(e,t){var n=B8(e);return ae.createElement(Y4,Te({ref:t},n))}),vF=bF;const yF="_container_whbr8_1",Wu={container:yF,"error-payhere":"_error-payhere_whbr8_7","error-laba":"_error-laba_whbr8_16","error-bill":"_error-bill_whbr8_25"},xF={control:e=>({...e,border:"1px solid #D6D6D6","&:hover":{borderColor:"#0163C8"},borderRadius:"4px",outline:"none",boxShadow:"none",color:"#898989",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:32,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Lato",cursor:"pointer",background:t.isSelected?"#F0F7FF":"white",color:t.isSelected?"#0163C8":e.color,"&:hover":{background:t.isDisabled?"":"#F0F7FF",color:t.isDisabled?"":"#0163C8",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"})},CF={control:e=>({...e,border:"1px solid #BDBDBD","&:hover":{borderColor:"#64B5F6"},borderRadius:"6px",outline:"none",color:"#212121",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:38,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",marginBottom:"5px"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",cursor:"pointer",background:t.isSelected?"#E1F5FE":"white",color:t.isSelected?"#1565C0":e.color,"&:hover":{background:t.isDisabled?"":"#E1F5FE",color:t.isDisabled?"":"#1565C0",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter"})},EF={control:e=>({...e,border:"1px solid #BDBDBD","&:hover":{borderColor:"#64B5F6"},borderRadius:"6px",outline:"none",color:"#212121",backgroundColor:"white",margin:"0px",cursor:"text",minHeight:38,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",marginBottom:"5px"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px",borderRadius:"12px"}),menuList:e=>({...e,borderRadius:"12px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",cursor:"pointer",background:t.isSelected?"#F0FEFD":"white",color:t.isSelected?"#2F7E79":e.color,"&:hover":{background:t.isDisabled?"":"#F0FEFD",color:t.isDisabled?"":"#2F7E79",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans"})},SF={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Lato",cursor:"pointer",background:t.isSelected?"#F0F7FF":"white",color:t.isSelected?"#0163C8":e.color,"&:hover":{background:t.isDisabled?"":"#F0F7FF",color:t.isDisabled?"":"#0163C8",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"12px",lineHeight:"16px",fontFamily:"Lato"})},wF={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter",cursor:"pointer",background:t.isSelected?"#E1F5FE":"white",color:t.isSelected?"#1565C0":e.color,"&:hover":{background:t.isDisabled?"":"#E1F5FE",color:t.isDisabled?"":"#1565C0",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"Inter"})},_F={control:()=>({display:"none"}),dropdownIndicator:e=>({...e,padding:"0px 8px"}),menu:e=>({...e,position:"static",boxShadow:"none",marginTop:"0px",borderRadius:"12px"}),menuList:e=>({...e,borderRadius:"12px"}),option:(e,t)=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans",fontWeight:"500",cursor:"pointer",background:t.isSelected?"#F0FEFD":"white",color:t.isSelected?"#2F7E79":e.color,"&:hover":{background:t.isDisabled?"":"#F0FEFD",color:t.isDisabled?"":"#2F7E79",cursor:t.isDisabled?"default":""}}),group:e=>({...e,padding:0}),placeholder:e=>({...e,fontSize:"14px",lineHeight:"22px",fontFamily:"PJakartaSans"})},uu={error:{laba:Wu["error-laba"],payhere:Wu["error-payhere"],bill:Wu["error-bill"]},variant:{laba:xF,payhere:CF,bill:EF},noSearchVariant:{laba:SF,payhere:wF,bill:_F},classNamePopover:{laba:"",payhere:"",bill:"!iru-rounded-xl"}},K4=N.forwardRef((e,t)=>{const{width:n,children:r,components:i,classNameContainer:a="",classNameContainerShowSelect:o="",classNameContainerSelect:s="",classNameLabelError:l="",error:u,onChange:c,externalValue:p=!1,defaultValueButtonDropdown:g={},autoClose:d=!0,onMenuOpen:m=()=>{},autoCloseOutside:b=!0,styleInnerPopper:y={},onMenuClose:f=()=>{},zIndexPopper:v=0,id:C="select-dropdown-container",idPopover:S="select-dropdown-container-popover",useAutoPlacement:_,flipOptions:E,autoPlacementOptions:x,withSearch:h=!1,floatingOptions:w={},offsetPopover:D=5,selectProps:I={},errorLabel:T="payhere",controlType:F="payhere",actionValueChange:P=()=>{},...k}=e,R=N.useRef(null),M=N.useRef(null),[O,z]=N.useState(""),[G,U]=N.useState(!1),[J,Q]=N.useState({}),[ee,q]=N.useState(0),Z=A=>{var L;(L=M.current)==null||L.setShow(A),U(A)},se=()=>{if(p)return e.isMulti?g:[g]},te=A=>{var L;(L=M.current)==null||L.handlerShow(A),q(R.current.offsetWidth),U(K=>!K)},$=()=>{var A;b&&((A=M.current)==null||A.setShow(!1))},H=(A,L)=>{var K;d&&(U(!1),(K=M.current)==null||K.setShow(!1)),typeof c=="function"&&c(A,L),p||Q(A)},V=()=>{R.current&&q(R.current.offsetWidth)};return Qi(()=>{p&&Q(g),P(g)},[p,g]),N.useEffect(()=>{G?m():G||(f(),z(""))},[G]),N.useImperativeHandle(t,()=>({selectValue:J,setSelectValue:Q,handlerClose:$,handlerShow:te,show:G,setShow:Z}),[G,Zs(J)]),N.useEffect(()=>(window.addEventListener("resize",V),window.addEventListener("load",V),()=>{window.removeEventListener("resize",V),window.removeEventListener("load",V)}),[R]),B.jsxs("div",{id:C,className:`${Wu.container} ${a} ${G?`${o} open-popover`:null}`,ref:R,children:[r({selectValue:J,setSelectValue:Q,handlerClose:$,handlerShow:te,show:G,setShow:Z}),B.jsx(ei,{ref:M,offset:D,useAutoPlacement:_,flipOptions:E,autoPlacementOptions:x,zIndex:v,styleInnerPopover:y,id:S,width:typeof n=="function"?n(ee,J):n||ee,className:`${s} ${uu.classNamePopover[F]}`,floatingOptions:w,children:B.jsx(vF,{className:"iru-w-full",defaultValue:se(),inputValue:O,onInputChange:(A,{action:L})=>{L==="input-change"&&z(A)},openMenuOnFocus:!0,autoFocus:!1,backspaceRemovesValue:!1,components:{IndicatorSeparator:null,...i},controlShouldRenderValue:!1,hideSelectedOptions:!1,isClearable:!1,menuIsOpen:!0,tabSelectsValue:!1,styles:h?uu.variant[F]:uu.noSearchVariant[F],noOptionsMessage:()=>"Tidak ada data.",onChange:H,selectProps:{...I,setShowDropdown:Z},...k})}),B.jsx("div",{className:`${uu.error[T]} ${l}`,children:u})]})});K4.displayName="SelectDropdownContainer";function Ro(e,t){return e-t*Math.floor(e/t)}const Z4=1721426;function Da(e,t,n,r){t=kl(e,t);let i=t-1,a=-2;return n<=2?a=0:Ui(t)&&(a=-1),Z4-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Ui(e){return e%4===0&&(e%100!==0||e%400===0)}function kl(e,t){return e==="BC"?1-t:t}function Id(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const IF={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Yn{fromJulianDay(t){let n=t,r=n-Z4,i=Math.floor(r/146097),a=Ro(r,146097),o=Math.floor(a/36524),s=Ro(a,36524),l=Math.floor(s/1461),u=Ro(s,1461),c=Math.floor(u/365),p=i*400+o*100+l*4+c+(o!==4&&c!==4?1:0),[g,d]=Id(p),m=n-Da(g,d,1,1),b=2;n<Da(g,d,3,1)?b=0:Ui(d)&&(b=1);let y=Math.floor(((m+b)*12+373)/367),f=n-Da(g,d,y,1)+1;return new Dt(g,d,y,f)}toJulianDay(t){return Da(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return IF[Ui(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Ui(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const DF={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Tt(e,t){return t=un(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function M0(e,t){return Ep(e.calendar,t.calendar)&&Tt(e,t)}function Ep(e,t){var n,r,i,a;return(a=(i=(n=e.isEqual)===null||n===void 0?void 0:n.call(e,t))!==null&&i!==void 0?i:(r=t.isEqual)===null||r===void 0?void 0:r.call(t,e))!==null&&a!==void 0?a:e.identifier===t.identifier}function TF(e,t){return Tt(e,Sp(t))}const AF={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Dd(e,t,n){let r=e.calendar.toJulianDay(e),i=n?AF[n]:PF(t),a=Math.ceil(r+1-i)%7;return a<0&&(a+=7),a}function RF(e){return zr(Date.now(),e)}function Sp(e){return _n(RF(e))}function q4(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function J4(e,t){return iv(e)-iv(t)}function iv(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let oh=null;function jn(){return oh==null&&(oh=new Intl.DateTimeFormat().resolvedOptions().timeZone),oh}function Pl(e){return e.subtract({days:e.day-1})}function O0(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function BF(e){return Pl(e.subtract({months:e.month-1}))}function tl(e,t,n){let r=Dd(e,t,n);return e.subtract({days:r})}function $F(e,t,n){return tl(e,t,n).add({days:6})}const av=new Map,sh=new Map;function kF(e){if(Intl.Locale){let n=av.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&av.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function PF(e){let t=sh.get(e);if(!t){if(Intl.Locale){let r=new Intl.Locale(e);if("getWeekInfo"in r&&(t=r.getWeekInfo(),t))return sh.set(e,t),t.firstDay}let n=kF(e);if(e.includes("-fw-")){let r=e.split("-fw-")[1].split("-")[0];r==="mon"?t={firstDay:1}:r==="tue"?t={firstDay:2}:r==="wed"?t={firstDay:3}:r==="thu"?t={firstDay:4}:r==="fri"?t={firstDay:5}:r==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:n&&DF[n]||0};sh.set(e,t)}return t.firstDay}function wp(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((Dd(Pl(e),t,n)+r)/7)}function _p(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function Ip(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function jo(e){e=un(e,new Yn);let t=kl(e.era,e.year);return Q4(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Q4(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function L0(e,t){if(t==="UTC")return 0;if(e>0&&t===jn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=e3(e,t);return Q4(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}const ov=new Map;function e3(e,t){let n=ov.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),ov.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let a of r)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const sv=864e5;function FF(e,t,n,r){return(n===r?[n]:[n,r]).filter(a=>NF(e,t,a))}function NF(e,t,n){let r=e3(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function hi(e,t,n="compatible"){let r=ia(e);if(t==="UTC")return jo(r);if(t===jn()&&n==="compatible"){r=un(r,new Yn);let l=new Date,u=kl(r.era,r.year);return l.setFullYear(u,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let i=jo(r),a=L0(i-sv,t),o=L0(i+sv,t),s=FF(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-o);case"compatible":case"later":return Math.max(i-a,i-o);case"reject":throw new RangeError("No such absolute time found")}}function t3(e,t,n="compatible"){return new Date(hi(e,t,n))}function zr(e,t){let n=L0(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),l=r.getUTCMinutes(),u=r.getUTCSeconds(),c=r.getUTCMilliseconds();return new rl(i<1?"BC":"AD",i<1?-i+1:i,a,o,t,n,s,l,u,c)}function lv(e,t){return zr(e.getTime(),t)}function _n(e){return new Dt(e.calendar,e.era,e.year,e.month,e.day)}function ia(e,t){let n=0,r=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new Tc(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function un(e,t){if(Ep(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,ja(r),r}function MF(e,t,n){if(e instanceof rl)return e.timeZone===t?e:LF(e,t);let r=hi(e,t,n);return zr(r,t)}function OF(e){let t=jo(e)-e.offset;return new Date(t)}function LF(e,t){let n=jo(e)-e.offset;return un(zr(n,t),e.calendar)}const ls=36e5;function Td(e,t){let n=e.copy(),r="hour"in n?a3(n,t):0;V0(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,H0(n),n3(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,VF(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,o;let l=(a=(o=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(o,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function V0(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function H0(e){for(;e.month<1;)V0(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,V0(e,1)}function VF(e){for(;e.day<1;)e.month--,H0(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,H0(e)}function n3(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ja(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),n3(e)}function Dp(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function r3(e,t){return Td(e,Dp(t))}function Tp(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),ja(n),n}function nl(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),i3(n),n}function HF(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=cu(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=cu(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=cu(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=cu(e.hour,24),t}function i3(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function cu(e,t){let n=e%t;return n<0&&(n+=t),n}function a3(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,HF(e)}function o3(e,t){let n=e.copy();return a3(n,t),n}function jF(e,t){return o3(e,Dp(t))}function Ap(e,t,n,r){let i=e.copy();switch(t){case"era":{let s=e.calendar.getEras(),l=s.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=bi(l,n,0,s.length-1,r==null?void 0:r.round),i.era=s[l],ja(i);break}case"year":var a,o;!((a=(o=i.calendar).isInverseEra)===null||a===void 0)&&a.call(o,i)&&(n=-n),i.year=bi(e.year,n,-1/0,9999,r==null?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=bi(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":i.day=bi(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),ja(i),i}function Rp(e,t,n,r){let i=e.copy();switch(t){case"hour":{let a=e.hour,o=0,s=23;if((r==null?void 0:r.hourCycle)===12){let l=a>=12;o=l?12:0,s=l?23:11}i.hour=bi(a,n,o,s,r==null?void 0:r.round);break}case"minute":i.minute=bi(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":i.second=bi(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":i.millisecond=bi(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return i}function bi(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function s3(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Td(ia(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=hi(i,e.timeZone)}else n=jo(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=zr(n,e.timeZone);return un(r,e.calendar)}function zF(e,t){return s3(e,Dp(t))}function GF(e,t,n,r){switch(t){case"hour":{let i=0,a=23;if((r==null?void 0:r.hourCycle)===12){let m=e.hour>=12;i=m?12:0,a=m?23:11}let o=ia(e),s=un(nl(o,{hour:i}),new Yn),l=[hi(s,e.timeZone,"earlier"),hi(s,e.timeZone,"later")].filter(m=>zr(m,e.timeZone).day===s.day)[0],u=un(nl(o,{hour:a}),new Yn),c=[hi(u,e.timeZone,"earlier"),hi(u,e.timeZone,"later")].filter(m=>zr(m,e.timeZone).day===u.day).pop(),p=jo(e)-e.offset,g=Math.floor(p/ls),d=p%ls;return p=bi(g,n,Math.floor(l/ls),Math.floor(c/ls),r==null?void 0:r.round)*ls+d,un(zr(p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Rp(e,t,n,r);case"era":case"year":case"month":case"day":{let i=Ap(ia(e),t,n,r),a=hi(i,e.timeZone);return un(zr(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function WF(e,t,n){let r=ia(e),i=nl(Tp(r,t),t);if(i.compare(r)===0)return e;let a=hi(i,e.timeZone,n);return un(zr(a,e.timeZone),e.calendar)}const UF=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;function Bp(e){let t=e.match(UF);if(!t)throw new Error("Invalid ISO 8601 date string: "+e);let n=new Dt(lh(t[1],0,9999),lh(t[2],1,12),1);return n.day=lh(t[3],1,n.calendar.getDaysInMonth(n)),n}function lh(e,t,n){let r=Number(e);if(r<t||r>n)throw new RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function l3(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function u3(e){let t=un(e,new Yn),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function c3(e){return`${u3(e)}T${l3(e)}`}function XF(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`;return i!==0&&(a+=`:${String(i).padStart(2,"0")}`),a}function YF(e){return`${c3(e)}${XF(e.offset)}[${e.timeZone}]`}function KF(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fl(e,t,n){KF(e,t),t.set(e,n)}function $p(e){let t=typeof e[0]=="object"?e.shift():new Yn,n;if(typeof e[0]=="string")n=e.shift();else{let o=t.getEras();n=o[o.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var ZF=new WeakMap;class Dt{copy(){return this.era?new Dt(this.calendar,this.era,this.year,this.month,this.day):new Dt(this.calendar,this.year,this.month,this.day)}add(t){return Td(this,t)}subtract(t){return r3(this,t)}set(t){return Tp(this,t)}cycle(t,n,r){return Ap(this,t,n,r)}toDate(t){return t3(this,t)}toString(){return u3(this)}compare(t){return q4(this,t)}constructor(...t){Fl(this,ZF,{writable:!0,value:void 0});let[n,r,i,a,o]=$p(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,ja(this)}}var qF=new WeakMap;class kp{copy(){return new kp(this.hour,this.minute,this.second,this.millisecond)}add(t){return o3(this,t)}subtract(t){return jF(this,t)}set(t){return nl(this,t)}cycle(t,n,r){return Rp(this,t,n,r)}toString(){return l3(this)}compare(t){return J4(this,t)}constructor(t=0,n=0,r=0,i=0){Fl(this,qF,{writable:!0,value:void 0}),this.hour=t,this.minute=n,this.second=r,this.millisecond=i,i3(this)}}var JF=new WeakMap;class Tc{copy(){return this.era?new Tc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Tc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Td(this,t)}subtract(t){return r3(this,t)}set(t){return Tp(nl(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return Ap(this,t,n,r);default:return Rp(this,t,n,r)}}toDate(t,n){return t3(this,t,n)}toString(){return c3(this)}compare(t){let n=q4(this,t);return n===0?J4(this,ia(t)):n}constructor(...t){Fl(this,JF,{writable:!0,value:void 0});let[n,r,i,a,o]=$p(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ja(this)}}var QF=new WeakMap;class rl{copy(){return this.era?new rl(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new rl(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return s3(this,t)}subtract(t){return zF(this,t)}set(t,n){return WF(this,t,n)}cycle(t,n,r){return GF(this,t,n,r)}toDate(){return OF(this)}toString(){return YF(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-MF(t,this.timeZone).toDate().getTime()}constructor(...t){Fl(this,QF,{writable:!0,value:void 0});let[n,r,i,a,o]=$p(t),s=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=o,this.timeZone=s,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ja(this)}}const Bo=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],eN=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Uu=[1867,1911,1925,1988,2018],Vi=["meiji","taisho","showa","heisei","reiwa"];function uv(e){const t=Bo.findIndex(([n,r,i])=>e.year<n||e.year===n&&e.month<r||e.year===n&&e.month===r&&e.day<i);return t===-1?Bo.length-1:t===0?0:t-1}function uh(e){let t=Uu[Vi.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Dt(e.year+t,e.month,e.day)}class tN extends Yn{fromJulianDay(t){let n=super.fromJulianDay(t),r=uv(n);return new Dt(this,Vi[r],n.year-Uu[r],n.month,n.day)}toJulianDay(t){return super.toJulianDay(uh(t))}balanceDate(t){let n=uh(t),r=uv(n);Vi[r]!==t.era&&(t.era=Vi[r],t.year=n.year-Uu[r]),this.constrainDate(t)}constrainDate(t){let n=Vi.indexOf(t.era),r=eN[n];if(r!=null){let[i,a,o]=r,s=i-Uu[n];t.year=Math.max(1,Math.min(s,t.year)),t.year===s&&(t.month=Math.min(a,t.month),t.month===a&&(t.day=Math.min(o,t.day)))}if(t.year===1&&n>=0){let[,i,a]=Bo[n];t.month=Math.max(i,t.month),t.month===i&&(t.day=Math.max(a,t.day))}}getEras(){return Vi}getYearsInEra(t){let n=Vi.indexOf(t.era),r=Bo[n],i=Bo[n+1];if(i==null)return 9999-r[0]+1;let a=i[0]-r[0];return(t.month<i[1]||t.month===i[1]&&t.day<i[2])&&a++,a}getDaysInMonth(t){return super.getDaysInMonth(uh(t))}getMinimumMonthInYear(t){let n=cv(t);return n?n[1]:1}getMinimumDayInMonth(t){let n=cv(t);return n&&t.month===n[1]?n[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function cv(e){if(e.year===1){let t=Vi.indexOf(e.era);return Bo[t]}}const d3=-543;class nN extends Yn{fromJulianDay(t){let n=super.fromJulianDay(t),r=kl(n.era,n.year);return new Dt(this,r-d3,n.month,n.day)}toJulianDay(t){return super.toJulianDay(dv(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(dv(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function dv(e){let[t,n]=Id(e.year+d3);return new Dt(t,n,e.month,e.day)}const Ac=1911;function f3(e){return e.era==="minguo"?e.year+Ac:1-e.year+Ac}function fv(e){let t=e-Ac;return t>0?["minguo",t]:["before_minguo",1-t]}class rN extends Yn{fromJulianDay(t){let n=super.fromJulianDay(t),r=kl(n.era,n.year),[i,a]=fv(r);return new Dt(this,i,a,n.month,n.day)}toJulianDay(t){return super.toJulianDay(hv(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,r]=fv(f3(t));t.era=n,t.year=r}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(hv(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Ac}constructor(...t){super(...t),this.identifier="roc"}}function hv(e){let[t,n]=Id(f3(e));return new Dt(t,n,e.month,e.day)}const gv=1948320,pv=[0,31,62,93,124,155,186,216,246,276,306,336];class iN{fromJulianDay(t){let n=t-gv,r=1+Math.floor((33*n+3)/12053),i=365*(r-1)+Math.floor((8*r+21)/33),a=n-i,o=a<216?Math.floor(a/31):Math.floor((a-6)/30),s=a-pv[o]+1;return new Dt(this,r,o+1,s)}toJulianDay(t){let n=gv-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=pv[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||Ro(25*t.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const ch=78,mv=80;class aN extends Yn{fromJulianDay(t){let n=super.fromJulianDay(t),r=n.year-ch,i=t-Da(n.era,n.year,1,1),a;i<mv?(r--,a=Ui(n.year-1)?31:30,i+=a+155+90+10):(a=Ui(n.year)?31:30,i-=mv);let o,s;if(i<a)o=1,s=i+1;else{let l=i-a;l<155?(o=Math.floor(l/31)+2,s=l%31+1):(l-=155,o=Math.floor(l/30)+7,s=l%30+1)}return new Dt(this,r,o,s)}toJulianDay(t){let n=t.year+ch,[r,i]=Id(n),a,o;return Ui(i)?(a=31,o=Da(r,i,3,21)):(a=30,o=Da(r,i,3,22)),t.month===1?o+t.day-1:(o+=a+Math.min(t.month-2,5)*31,t.month>=8&&(o+=(t.month-7)*30),o+=t.day-1,o)}getDaysInMonth(t){return t.month===1&&Ui(t.year+ch)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Rc=1948440,bv=1948439,ir=1300,uo=1600,oN=460322;function Bc(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function h3(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+Bc(t,r,1,1)))/29.5)+1),a=n-Bc(t,r,i,1)+1;return new Dt(e,r,i,a)}function vv(e){return(14+11*e)%30<11}class Pp{fromJulianDay(t){return h3(this,Rc,t)}toJulianDay(t){return Bc(Rc,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&vv(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return vv(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class sN extends Pp{fromJulianDay(t){return h3(this,bv,t)}toJulianDay(t){return Bc(bv,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const lN="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let j0,$o;function Xu(e){return oN+$o[e-ir]}function Es(e,t){let n=e-ir,r=1<<11-(t-1);return(j0[n]&r)===0?29:30}function yv(e,t){let n=Xu(e);for(let r=1;r<t;r++)n+=Es(e,r);return n}function xv(e){return $o[e+1-ir]-$o[e-ir]}class uN extends Pp{fromJulianDay(t){let n=t-Rc,r=Xu(ir),i=Xu(uo);if(n<r||n>i)return super.fromJulianDay(t);{let a=ir-1,o=1,s=1;for(;s>0;){a++,s=n-Xu(a)+1;let l=xv(a);if(s===l){o=12;break}else if(s<l){let u=Es(a,o);for(o=1;s>u;)s-=u,o++,u=Es(a,o);break}}return new Dt(this,a,o,n-yv(a,o)+1)}}toJulianDay(t){return t.year<ir||t.year>uo?super.toJulianDay(t):Rc+yv(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<ir||t.year>uo?super.getDaysInMonth(t):Es(t.year,t.month)}getDaysInYear(t){return t.year<ir||t.year>uo?super.getDaysInYear(t):xv(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",j0||(j0=new Uint16Array(Uint8Array.from(atob(lN),t=>t.charCodeAt(0)).buffer)),!$o){$o=new Uint32Array(uo-ir+1);let t=0;for(let n=ir;n<=uo;n++){$o[n-ir]=t;for(let r=1;r<=12;r++)t+=Es(n,r)}}}}const Cv=347997,g3=1080,p3=24*g3,cN=29,dN=12*g3+793,fN=cN*p3+dN;function Sa(e){return Ro(e*7+1,19)<7}function Yu(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return Ro(3*(r+1),7)<3&&(r+=1),r}function hN(e){let t=Yu(e-1),n=Yu(e);return Yu(e+1)-n===356?2:n-t===382?1:0}function ks(e){return Yu(e)+hN(e)}function m3(e){return ks(e+1)-ks(e)}function gN(e){let t=m3(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function du(e,t){if(t>=6&&!Sa(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=gN(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?Sa(e)?30:0:30}class pN{fromJulianDay(t){let n=t-Cv,r=n*p3/fN,i=Math.floor((19*r+234)/235)+1,a=ks(i),o=Math.floor(n-a);for(;o<1;)i--,a=ks(i),o=Math.floor(n-a);let s=1,l=0;for(;l<o;)l+=du(i,s),s++;s--,l-=du(i,s);let u=o-l;return new Dt(this,i,s,u)}toJulianDay(t){let n=ks(t.year);for(let r=1;r<t.month;r++)n+=du(t.year,r);return n+t.day+Cv}getDaysInMonth(t){return du(t.year,t.month)}getMonthsInYear(t){return Sa(t.year)?13:12}getDaysInYear(t){return m3(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,n){n.year!==t.year&&(Sa(n.year)&&!Sa(t.year)&&n.month>6?t.month--:!Sa(n.year)&&Sa(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const z0=1723856,Ev=1824665,G0=5500;function $c(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function Fp(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-$c(e,n,1,1))/30),i=t+1-$c(e,n,r,1);return[n,r,i]}function b3(e){return Math.floor(e%4/3)}function v3(e,t){return t%13!==0?30:b3(e)+5}class Np{fromJulianDay(t){let[n,r,i]=Fp(z0,t),a="AM";return n<=0&&(a="AA",n+=G0),new Dt(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=G0),$c(z0,n,t.month,t.day)}getDaysInMonth(t){return v3(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+b3(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class mN extends Np{fromJulianDay(t){let[n,r,i]=Fp(z0,t);return n+=G0,new Dt(this,"AA",n,r,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class bN extends Np{fromJulianDay(t){let[n,r,i]=Fp(Ev,t),a="CE";return n<=0&&(a="BCE",n=1-n),new Dt(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),$c(Ev,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),v3(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function Nl(e){switch(e){case"buddhist":return new nN;case"ethiopic":return new Np;case"ethioaa":return new mN;case"coptic":return new bN;case"hebrew":return new pN;case"indian":return new aN;case"islamic-civil":return new Pp;case"islamic-tbla":return new sN;case"islamic-umalqura":return new uN;case"japanese":return new tN;case"persian":return new iN;case"roc":return new rN;case"gregory":default:return new Yn}}let dh=new Map;class ko{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return xN()&&(this.resolvedHourCycle||(this.resolvedHourCycle=CN(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=y3(t,n),this.options=n}}const vN={true:{ja:"h11"},false:{}};function y3(e,t={}){if(typeof t.hour12=="boolean"&&yN()){t={...t};let i=vN[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(dh.has(n))return dh.get(n);let r=new Intl.DateTimeFormat(e,t);return dh.set(n,r),r}let fh=null;function yN(){return fh==null&&(fh=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),fh}let hh=null;function xN(){return hh==null&&(hh=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),hh}function CN(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=y3(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}const Ja=typeof document<"u"?N.useLayoutEffect:()=>{};var gh;const EN=(gh=N.useInsertionEffect)!==null&&gh!==void 0?gh:Ja;function br(e){const t=N.useRef(null);return EN(()=>{t.current=e},[e]),N.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function SN(e){let[t,n]=N.useState(e),r=N.useRef(null),i=br(()=>{if(!r.current)return;let o=r.current.next();if(o.done){r.current=null;return}t===o.value?i():n(o.value)});Ja(()=>{r.current&&i()});let a=br(o=>{r.current=o(t),i()});return[t,a]}const kc={prefix:String(Math.round(Math.random()*1e10)),current:0},x3=N.createContext(kc),wN=N.createContext(!1);let _N=!!(typeof window<"u"&&window.document&&window.document.createElement),ph=new WeakMap;function IN(e=!1){let t=N.useContext(x3),n=N.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let o=ph.get(a);o==null?ph.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==o.state&&(t.current=o.id,ph.delete(a))}n.current=++t.current}return n.current}function DN(e){let t=N.useContext(x3);t===kc&&!_N&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=IN(!!e),r=t===kc&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function TN(e){let t=N.useId(),[n]=N.useState(C3()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${kc.prefix}`;return e||`${r}-${t}`}const AN=typeof N.useId=="function"?TN:DN;function RN(){return!1}function BN(){return!0}function $N(e){return()=>{}}function C3(){return typeof N.useSyncExternalStore=="function"?N.useSyncExternalStore($N,RN,BN):N.useContext(wN)}let kN=!!(typeof window<"u"&&window.document&&window.document.createElement),Po=new Map,Ss;typeof FinalizationRegistry<"u"&&(Ss=new FinalizationRegistry(e=>{Po.delete(e)}));function zo(e){let[t,n]=N.useState(e),r=N.useRef(null),i=AN(t),a=N.useRef(null);if(Ss&&Ss.register(a,i),kN){const o=Po.get(i);o&&!o.includes(r)?o.push(r):Po.set(i,[r])}return Ja(()=>{let o=i;return()=>{Ss&&Ss.unregister(a),Po.delete(o)}},[i]),N.useEffect(()=>{let o=r.current;return o&&n(o),()=>{o&&(r.current=null)}}),i}function PN(e,t){if(e===t)return e;let n=Po.get(e);if(n)return n.forEach(i=>i.current=t),t;let r=Po.get(t);return r?(r.forEach(i=>i.current=e),e):t}function W0(e=[]){let t=zo(),[n,r]=SN(t),i=N.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return Ja(i,[t,i,...e]),n}function E3(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const zt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},lr=e=>e&&"window"in e&&e.window===e?e:zt(e).defaultView||window;function FN(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function NN(e){return FN(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let MN=!1;function Ad(){return MN}function yt(e,t){if(!Ad())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:NN(n)?n=n.host:n=n.parentNode}return!1}const za=(e=document)=>{var t;if(!Ad())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function ct(e){return Ad()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}class ON{get currentNode(){return this._currentNode}set currentNode(t){if(!yt(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=t,i=t;for(this._currentNode=t;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const o=r,s=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=i,this._currentSetFor.add(s),r=i=o.host}else r=r.parentNode;const a=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=i,this._currentSetFor.add(a),this._walkerStack=n}get doc(){return this._doc}firstChild(){let t=this.currentNode,n=this.nextNode();return yt(t,n)?(n&&(this.currentNode=n),n):(this.currentNode=t,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(t):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(t)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let a=this.nextNode();return a&&(this.currentNode=a),a}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=t.previousNode();if(n){if(n.shadowRoot){var r;let a;if(typeof this.filter=="function"?a=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(a=this.filter.acceptNode(n)),a===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let o=this.lastChild();return o&&(this.currentNode=o),o}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(t,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=o=>{if(o.nodeType===Node.ELEMENT_NODE){const l=o.shadowRoot;if(l){const u=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{var s;if(typeof this.filter=="function")return this.filter(o);if(!((s=this.filter)===null||s===void 0)&&s.acceptNode)return this.filter.acceptNode(o);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(t.createTreeWalker(n,r,this._acceptNode));const a=n.shadowRoot;if(a){const o=this._doc.createTreeWalker(a,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(o)}}}function LN(e,t,n,r){return Ad()?new ON(e,t,n,r):e.createTreeWalker(t,n,r)}function Mn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],o=r[i];typeof a=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=E3(a,o):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof o=="string"?t[i]=qi(a,o):i==="id"&&a&&o?t.id=PN(a,o):t[i]=o!==void 0?o:a}}return t}const VN=new Set(["id"]),HN=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),jN=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),zN=new Set(["dir","lang","hidden","inert","translate"]),Sv=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),GN=/^(data-.*)$/;function Mp(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(VN.has(l)||n&&HN.has(l)||r&&jN.has(l)||i&&zN.has(l)||a&&Sv.has(l)||l.endsWith("Capture")&&Sv.has(l.slice(0,-7))||o!=null&&o.has(l)||GN.test(l))&&(s[l]=e[l]);return s}function Ga(e){if(WN())e.focus({preventScroll:!0});else{let t=UN(e);e.focus(),XN(t)}}let fu=null;function WN(){if(fu==null){fu=!1;try{document.createElement("div").focus({get preventScroll(){return fu=!0,!0}})}catch{}}return fu}function UN(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function XN(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Rd(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function Op(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ti(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Go=Ti(function(){return Op(/^Mac/i)}),YN=Ti(function(){return Op(/^iPhone/i)}),S3=Ti(function(){return Op(/^iPad/i)||Go()&&navigator.maxTouchPoints>1}),Lp=Ti(function(){return YN()||S3()});Ti(function(){return Go()||Lp()});const KN=Ti(function(){return Rd(/AppleWebKit/i)&&!w3()}),w3=Ti(function(){return Rd(/Chrome/i)}),_3=Ti(function(){return Rd(/Android/i)}),ZN=Ti(function(){return Rd(/Firefox/i)});function il(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}=t;ZN()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Go()?a=!0:o=!0);let u=KN()&&Go()&&!S3()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:o,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:o,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});il.isOpening=n,Ga(e),e.dispatchEvent(u),il.isOpening=!1}il.isOpening=!1;let ji=new Map,U0=new Set;function wv(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=ji.get(r.target);i||(i=new Set,ji.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=ji.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),ji.delete(r.target)),ji.size===0)){for(let a of U0)a();U0.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?wv():document.addEventListener("DOMContentLoaded",wv));function qN(){for(const[e]of ji)"isConnected"in e&&!e.isConnected&&ji.delete(e)}function I3(e){requestAnimationFrame(()=>{qN(),ji.size===0?e():U0.add(e)})}function D3(){let e=N.useRef(new Map),t=N.useCallback((i,a,o,s)=>{let l=s!=null&&s.once?(...u)=>{e.current.delete(o),o(...u)}:o;e.current.set(o,{type:a,eventTarget:i,fn:l,options:s}),i.addEventListener(a,l,s)},[]),n=N.useCallback((i,a,o,s)=>{var l;let u=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;i.removeEventListener(a,u,s),e.current.delete(o)},[]),r=N.useCallback(()=>{e.current.forEach((i,a)=>{n(i.eventTarget,i.type,a,i.options)})},[n]);return N.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Vp(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=zo(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function _v(e,t){const n=N.useRef(!0),r=N.useRef(null);N.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),N.useEffect(()=>{let i=r.current;n.current?n.current=!1:(!i||t.some((a,o)=>!Object.is(a,i[o])))&&e(),r.current=t},t)}function T3(e,t){Ja(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function X0(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function JN(e,t){let n=e;for(X0(n,t)&&(n=n.parentElement);n&&!X0(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function QN(e,t){const n=[];for(;e&&e!==document.documentElement;)X0(e,t)&&n.push(e),e=e.parentElement;return n}let eM=0;const mh=new Map;function A3(e){let[t,n]=N.useState();return Ja(()=>{if(!e)return;let r=mh.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${eM++}`;n(i);let a=document.createElement("div");a.id=i,a.style.display="none",a.textContent=e,document.body.appendChild(a),r={refCount:0,element:a},mh.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),mh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function bh(e,t,n,r){let i=br(n),a=n==null;N.useEffect(()=>{if(a||!e.current)return;let o=e.current;return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[e,t,r,a,i])}function tM(e,t){let n=Iv(e,t,"left"),r=Iv(e,t,"top"),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:c,scrollPaddingRight:p,scrollPaddingBottom:g,scrollPaddingLeft:d}=getComputedStyle(e),{scrollMarginTop:m,scrollMarginRight:b,scrollMarginBottom:y,scrollMarginLeft:f}=getComputedStyle(t),v=o+parseInt(u,10),C=s+parseInt(l,10),S=v+e.clientWidth,_=C+e.clientHeight,E=parseInt(c,10)||0,x=parseInt(g,10)||0,h=parseInt(p,10)||0,w=parseInt(d,10)||0,D=parseInt(m,10)||0,I=parseInt(y,10)||0,T=parseInt(b,10)||0,F=parseInt(f,10)||0,P=n-F,k=n+i+T,R=r-D,M=r+a+I,O=o+parseInt(u,10)+w,z=S-h,G=s+parseInt(l,10)+E,U=_-x;if((P>O||k<z)&&(P<=o+w?o=P-parseInt(u,10)-w:k>S-h&&(o+=k-S+h)),(R>G||M<U)&&(R<=C+E?s=R-parseInt(l,10)-E:M>_-x&&(s+=M-_+x)),process.env.NODE_ENV==="test"){e.scrollLeft=o,e.scrollTop=s;return}e.scrollTo({left:o,top:s})}function Iv(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function nM(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement;if(!(window.getComputedStyle(o).overflow==="hidden")&&!w3()){var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:c,top:p}=e.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-p)>1){var r,i,a;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(a=e.scrollIntoView)===null||a===void 0||a.call(e,{block:"nearest"})}}else{let l=QN(e);for(let u of l)tM(u,e)}}}function Y0(e){return e.pointerType===""&&e.isTrusted?!0:_3()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function rM(e){return!_3()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function R3(e,t){let n=N.useRef(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}const iM=typeof Element<"u"&&"checkVisibility"in Element.prototype;function aM(e){const t=lr(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:o,visibility:s}=a(e);i=o!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function oM(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Hp(e,t){return iM?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&aM(e)&&oM(e,t)&&(!e.parentElement||Hp(e.parentElement,e))}const jp=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],sM=jp.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";jp.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const lM=jp.join(':not([hidden]):not([tabindex="-1"]),');function B3(e){return e.matches(sM)&&Hp(e)&&!$3(e)}function uM(e){return e.matches(lM)&&Hp(e)&&!$3(e)}function $3(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function al(e,t,n){let[r,i]=N.useState(e||t),a=N.useRef(e!==void 0),o=e!==void 0;N.useEffect(()=>{let u=a.current;u!==o&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),a.current=o},[o]);let s=o?e:r,l=N.useCallback((u,...c)=>{let p=(g,...d)=>{n&&(Object.is(s,g)||n(g,...d)),o||(s=g)};typeof u=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((d,...m)=>{let b=u(o?s:d,...m);return p(b,...c),o?d:b})):(o||i(u),p(u,...c))},[o,s,n]);return[s,l]}function zp(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function k3(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function P3(e){let t=N.useRef({isFocused:!1,observer:null});Ja(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=br(r=>{e==null||e(r)});return N.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=o=>{if(t.current.isFocused=!1,i.disabled){let s=zp(o);n(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var o;(o=t.current.observer)===null||o===void 0||o.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Pc=!1;function Dv(e){for(;e&&!B3(e);)e=e.parentElement;let t=lr(e),n=t.document.activeElement;if(!n||n===e)return;Pc=!0;let r=!1,i=c=>{(c.target===n||r)&&c.stopImmediatePropagation()},a=c=>{(c.target===n||r)&&(c.stopImmediatePropagation(),!e&&!r&&(r=!0,Ga(n),l()))},o=c=>{(c.target===e||r)&&c.stopImmediatePropagation()},s=c=>{(c.target===e||r)&&(c.stopImmediatePropagation(),r||(r=!0,Ga(n),l()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",a,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",o,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",a,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",o,!0),Pc=!1,r=!1},u=requestAnimationFrame(l);return l}let xo="default",K0="",Ku=new WeakMap;function Tv(e){if(Lp()){if(xo==="default"){const t=zt(e);K0=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}xo="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Ku.set(e,e.style[t]),e.style[t]="none"}}function vh(e){if(Lp()){if(xo!=="disabled")return;xo="restoring",setTimeout(()=>{I3(()=>{if(xo==="restoring"){const t=zt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=K0||""),K0="",xo="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Ku.has(e)){let t=Ku.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Ku.delete(e)}}const F3=N.createContext({register:()=>{}});F3.displayName="PressResponderContext";function cM(e,t){return t.get?t.get.call(e):t.value}function N3(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function dM(e,t){var n=N3(e,t,"get");return cM(e,n)}function fM(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Av(e,t,n){var r=N3(e,t,"set");return fM(e,r,n),n}function hM(e){let t=N.useContext(F3);if(t){let{register:n,...r}=t;e=Mn(r,e),n()}return T3(t,e.ref),e}var hu=new WeakMap;class gu{continuePropagation(){Av(this,hu,!1)}get shouldStopPropagation(){return dM(this,hu)}constructor(t,n,r,i){Fl(this,hu,{writable:!0,value:void 0}),Av(this,hu,!0);var a;let o=(a=i==null?void 0:i.target)!==null&&a!==void 0?a:r.currentTarget;const s=o==null?void 0:o.getBoundingClientRect();let l,u=0,c,p=null;r.clientX!=null&&r.clientY!=null&&(c=r.clientX,p=r.clientY),s&&(c!=null&&p!=null?(l=c-s.left,u=p-s.top):(l=s.width/2,u=s.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const Rv=Symbol("linkClicked"),Bv="react-aria-pressable-style",$v="data-react-aria-pressable";function Gp(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:o,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:p,ref:g,...d}=hM(e),[m,b]=N.useState(!1),y=N.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:f,removeAllGlobalListeners:v}=D3(),C=br((I,T)=>{let F=y.current;if(s||F.didFirePressStart)return!1;let P=!0;if(F.isTriggeringEvent=!0,r){let k=new gu("pressstart",T,I);r(k),P=k.shouldStopPropagation}return n&&n(!0),F.isTriggeringEvent=!1,F.didFirePressStart=!0,b(!0),P}),S=br((I,T,F=!0)=>{let P=y.current;if(!P.didFirePressStart)return!1;P.didFirePressStart=!1,P.isTriggeringEvent=!0;let k=!0;if(i){let R=new gu("pressend",T,I);i(R),k=R.shouldStopPropagation}if(n&&n(!1),b(!1),t&&F&&!s){let R=new gu("press",T,I);t(R),k&&(k=R.shouldStopPropagation)}return P.isTriggeringEvent=!1,k}),_=br((I,T)=>{let F=y.current;if(s)return!1;if(a){F.isTriggeringEvent=!0;let P=new gu("pressup",T,I);return a(P),F.isTriggeringEvent=!1,P.shouldStopPropagation}return!0}),E=br(I=>{let T=y.current;if(T.isPressed&&T.target){T.didFirePressStart&&T.pointerType!=null&&S(pa(T.target,I),T.pointerType,!1),T.isPressed=!1,T.isOverTarget=!1,T.activePointerId=null,T.pointerType=null,v(),p||vh(T.target);for(let F of T.disposables)F();T.disposables=[]}}),x=br(I=>{c&&E(I)}),h=br(I=>{s||o==null||o(I)}),w=br((I,T)=>{if(!s&&o){let F=new MouseEvent("click",I);k3(F,T),o(zp(F))}}),D=N.useMemo(()=>{let I=y.current,T={onKeyDown(P){if(yh(P.nativeEvent,P.currentTarget)&&yt(P.currentTarget,ct(P.nativeEvent))){var k;Fv(ct(P.nativeEvent),P.key)&&P.preventDefault();let R=!0;if(!I.isPressed&&!P.repeat){I.target=P.currentTarget,I.isPressed=!0,I.pointerType="keyboard",R=C(P,"keyboard");let M=P.currentTarget,O=z=>{yh(z,M)&&!z.repeat&&yt(M,ct(z))&&I.target&&_(pa(I.target,z),"keyboard")};f(zt(P.currentTarget),"keyup",E3(O,F),!0)}R&&P.stopPropagation(),P.metaKey&&Go()&&((k=I.metaKeyEvents)===null||k===void 0||k.set(P.key,P.nativeEvent))}else P.key==="Meta"&&(I.metaKeyEvents=new Map)},onClick(P){if(!(P&&!yt(P.currentTarget,ct(P.nativeEvent)))&&P&&P.button===0&&!I.isTriggeringEvent&&!il.isOpening){let k=!0;if(s&&P.preventDefault(),!I.ignoreEmulatedMouseEvents&&!I.isPressed&&(I.pointerType==="virtual"||Y0(P.nativeEvent))){let R=C(P,"virtual"),M=_(P,"virtual"),O=S(P,"virtual");h(P),k=R&&M&&O}else if(I.isPressed&&I.pointerType!=="keyboard"){let R=I.pointerType||P.nativeEvent.pointerType||"virtual",M=_(pa(P.currentTarget,P),R),O=S(pa(P.currentTarget,P),R,!0);k=M&&O,I.isOverTarget=!1,h(P),E(P)}I.ignoreEmulatedMouseEvents=!1,k&&P.stopPropagation()}}},F=P=>{var k;if(I.isPressed&&I.target&&yh(P,I.target)){var R;Fv(ct(P),P.key)&&P.preventDefault();let O=ct(P),z=yt(I.target,ct(P));S(pa(I.target,P),"keyboard",z),z&&w(P,I.target),v(),P.key!=="Enter"&&Wp(I.target)&&yt(I.target,O)&&!P[Rv]&&(P[Rv]=!0,il(I.target,P,!1)),I.isPressed=!1,(R=I.metaKeyEvents)===null||R===void 0||R.delete(P.key)}else if(P.key==="Meta"&&(!((k=I.metaKeyEvents)===null||k===void 0)&&k.size)){var M;let O=I.metaKeyEvents;I.metaKeyEvents=void 0;for(let z of O.values())(M=I.target)===null||M===void 0||M.dispatchEvent(new KeyboardEvent("keyup",z))}};if(typeof PointerEvent<"u"){T.onPointerDown=R=>{if(R.button!==0||!yt(R.currentTarget,ct(R.nativeEvent)))return;if(rM(R.nativeEvent)){I.pointerType="virtual";return}I.pointerType=R.pointerType;let M=!0;if(!I.isPressed){I.isPressed=!0,I.isOverTarget=!0,I.activePointerId=R.pointerId,I.target=R.currentTarget,p||Tv(I.target),M=C(R,I.pointerType);let O=ct(R.nativeEvent);"releasePointerCapture"in O&&O.releasePointerCapture(R.pointerId),f(zt(R.currentTarget),"pointerup",P,!1),f(zt(R.currentTarget),"pointercancel",k,!1)}M&&R.stopPropagation()},T.onMouseDown=R=>{if(yt(R.currentTarget,ct(R.nativeEvent))&&R.button===0){if(u){let M=Dv(R.target);M&&I.disposables.push(M)}R.stopPropagation()}},T.onPointerUp=R=>{!yt(R.currentTarget,ct(R.nativeEvent))||I.pointerType==="virtual"||R.button===0&&!I.isPressed&&_(R,I.pointerType||R.pointerType)},T.onPointerEnter=R=>{R.pointerId===I.activePointerId&&I.target&&!I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!0,C(pa(I.target,R),I.pointerType))},T.onPointerLeave=R=>{R.pointerId===I.activePointerId&&I.target&&I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!1,S(pa(I.target,R),I.pointerType,!1),x(R))};let P=R=>{if(R.pointerId===I.activePointerId&&I.isPressed&&R.button===0&&I.target){if(yt(I.target,ct(R))&&I.pointerType!=null){let M=!1,O=setTimeout(()=>{I.isPressed&&I.target instanceof HTMLElement&&(M?E(R):(Ga(I.target),I.target.click()))},80);f(R.currentTarget,"click",()=>M=!0,!0),I.disposables.push(()=>clearTimeout(O))}else E(R);I.isOverTarget=!1}},k=R=>{E(R)};T.onDragStart=R=>{yt(R.currentTarget,ct(R.nativeEvent))&&E(R)}}else if(process.env.NODE_ENV==="test"){T.onMouseDown=R=>{if(R.button!==0||!yt(R.currentTarget,ct(R.nativeEvent)))return;if(I.ignoreEmulatedMouseEvents){R.stopPropagation();return}if(I.isPressed=!0,I.isOverTarget=!0,I.target=R.currentTarget,I.pointerType=Y0(R.nativeEvent)?"virtual":"mouse",Zo.flushSync(()=>C(R,I.pointerType))&&R.stopPropagation(),u){let O=Dv(R.target);O&&I.disposables.push(O)}f(zt(R.currentTarget),"mouseup",P,!1)},T.onMouseEnter=R=>{if(!yt(R.currentTarget,ct(R.nativeEvent)))return;let M=!0;I.isPressed&&!I.ignoreEmulatedMouseEvents&&I.pointerType!=null&&(I.isOverTarget=!0,M=C(R,I.pointerType)),M&&R.stopPropagation()},T.onMouseLeave=R=>{if(!yt(R.currentTarget,ct(R.nativeEvent)))return;let M=!0;I.isPressed&&!I.ignoreEmulatedMouseEvents&&I.pointerType!=null&&(I.isOverTarget=!1,M=S(R,I.pointerType,!1),x(R)),M&&R.stopPropagation()},T.onMouseUp=R=>{yt(R.currentTarget,ct(R.nativeEvent))&&!I.ignoreEmulatedMouseEvents&&R.button===0&&!I.isPressed&&_(R,I.pointerType||"mouse")};let P=R=>{if(R.button===0){if(I.ignoreEmulatedMouseEvents){I.ignoreEmulatedMouseEvents=!1;return}I.target&&I.target.contains(R.target)&&I.pointerType!=null||E(R),I.isOverTarget=!1}};T.onTouchStart=R=>{if(!yt(R.currentTarget,ct(R.nativeEvent)))return;let M=gM(R.nativeEvent);if(!M)return;I.activePointerId=M.identifier,I.ignoreEmulatedMouseEvents=!0,I.isOverTarget=!0,I.isPressed=!0,I.target=R.currentTarget,I.pointerType="touch",p||Tv(I.target),C(Pi(I.target,R),I.pointerType)&&R.stopPropagation(),f(lr(R.currentTarget),"scroll",k,!0)},T.onTouchMove=R=>{if(!yt(R.currentTarget,ct(R.nativeEvent)))return;if(!I.isPressed){R.stopPropagation();return}let M=kv(R.nativeEvent,I.activePointerId),O=!0;M&&Pv(M,R.currentTarget)?!I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!0,O=C(Pi(I.target,R),I.pointerType)):I.isOverTarget&&I.pointerType!=null&&(I.isOverTarget=!1,O=S(Pi(I.target,R),I.pointerType,!1),x(Pi(I.target,R))),O&&R.stopPropagation()},T.onTouchEnd=R=>{if(!yt(R.currentTarget,ct(R.nativeEvent)))return;if(!I.isPressed){R.stopPropagation();return}let M=kv(R.nativeEvent,I.activePointerId),O=!0;M&&Pv(M,R.currentTarget)&&I.pointerType!=null?(_(Pi(I.target,R),I.pointerType),O=S(Pi(I.target,R),I.pointerType),w(R.nativeEvent,I.target)):I.isOverTarget&&I.pointerType!=null&&(O=S(Pi(I.target,R),I.pointerType,!1)),O&&R.stopPropagation(),I.isPressed=!1,I.activePointerId=null,I.isOverTarget=!1,I.ignoreEmulatedMouseEvents=!0,I.target&&!p&&vh(I.target),v()},T.onTouchCancel=R=>{yt(R.currentTarget,ct(R.nativeEvent))&&(R.stopPropagation(),I.isPressed&&E(Pi(I.target,R)))};let k=R=>{I.isPressed&&yt(ct(R),I.target)&&E({currentTarget:I.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};T.onDragStart=R=>{yt(R.currentTarget,ct(R.nativeEvent))&&E(R)}}return T},[f,s,u,v,p,E,x,S,C,_,h,w]);return N.useEffect(()=>{if(!g||process.env.NODE_ENV==="test")return;const I=zt(g.current);if(!I||!I.head||I.getElementById(Bv))return;const T=I.createElement("style");T.id=Bv,T.textContent=`
|
|
110
|
-
@layer {
|
|
111
|
-
[${$v}] {
|
|
112
|
-
touch-action: pan-x pan-y pinch-zoom;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
`.trim(),I.head.prepend(T)},[g]),N.useEffect(()=>{let I=y.current;return()=>{var T;p||vh((T=I.target)!==null&&T!==void 0?T:void 0);for(let F of I.disposables)F();I.disposables=[]}},[p]),{isPressed:l||m,pressProps:Mn(d,D,{[$v]:!0})}}function Wp(e){return e.tagName==="A"&&e.hasAttribute("href")}function yh(e,t){const{key:n,code:r}=e,i=t,a=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof lr(i).HTMLInputElement&&!M3(i,n)||i instanceof lr(i).HTMLTextAreaElement||i.isContentEditable)&&!((a==="link"||!a&&Wp(i))&&n!=="Enter")}function gM(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function kv(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===t)return i}return null}function Pi(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function pa(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function pM(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function mM(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Pv(e,t){let n=t.getBoundingClientRect(),r=pM(e);return mM(n,r)}function bM(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Wp(e)}function Fv(e,t){return e instanceof HTMLInputElement?!M3(e,t):bM(e)}const vM=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function M3(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":vM.has(e.type)}let rs=null,Z0=new Set,Ps=new Map,Wa=!1,q0=!1;const yM={Tab:!0,Escape:!0};function Up(e,t){for(let n of Z0)n(e,t)}function xM(e){return!(e.metaKey||!Go()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Fc(e){Wa=!0,xM(e)&&(rs="keyboard",Up("keyboard",e))}function ar(e){rs="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Wa=!0,Up("pointer",e))}function O3(e){Y0(e)&&(Wa=!0,rs="virtual")}function L3(e){e.target===window||e.target===document||Pc||!e.isTrusted||(!Wa&&!q0&&(rs="virtual",Up("virtual",e)),Wa=!1,q0=!1)}function V3(){Pc||(Wa=!1,q0=!0)}function J0(e){if(typeof window>"u"||typeof document>"u"||Ps.get(lr(e)))return;const t=lr(e),n=zt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Wa=!0,r.apply(this,arguments)},n.addEventListener("keydown",Fc,!0),n.addEventListener("keyup",Fc,!0),n.addEventListener("click",O3,!0),t.addEventListener("focus",L3,!0),t.addEventListener("blur",V3,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ar,!0),n.addEventListener("pointermove",ar,!0),n.addEventListener("pointerup",ar,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",ar,!0),n.addEventListener("mousemove",ar,!0),n.addEventListener("mouseup",ar,!0)),t.addEventListener("beforeunload",()=>{H3(e)},{once:!0}),Ps.set(t,{focus:r})}const H3=(e,t)=>{const n=lr(e),r=zt(e);t&&r.removeEventListener("DOMContentLoaded",t),Ps.has(n)&&(n.HTMLElement.prototype.focus=Ps.get(n).focus,r.removeEventListener("keydown",Fc,!0),r.removeEventListener("keyup",Fc,!0),r.removeEventListener("click",O3,!0),n.removeEventListener("focus",L3,!0),n.removeEventListener("blur",V3,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ar,!0),r.removeEventListener("pointermove",ar,!0),r.removeEventListener("pointerup",ar,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",ar,!0),r.removeEventListener("mousemove",ar,!0),r.removeEventListener("mouseup",ar,!0)),Ps.delete(n))};function CM(e){const t=zt(e);let n;return t.readyState!=="loading"?J0(e):(n=()=>{J0(e)},t.addEventListener("DOMContentLoaded",n)),()=>H3(e,n)}typeof document<"u"&&CM();function j3(){return rs!=="pointer"}function z3(){return rs}const EM=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function SM(e,t,n){let r=zt(n==null?void 0:n.target);const i=typeof window<"u"?lr(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?lr(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?lr(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?lr(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!EM.has(r.activeElement.type)||r.activeElement instanceof a||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!yM[n.key])}function wM(e,t,n){J0(),N.useEffect(()=>{let r=(i,a)=>{SM(!!(n!=null&&n.isTextInput),i,a)&&e(j3())};return Z0.add(r),()=>{Z0.delete(r)}},t)}function G3(e){const t=zt(e),n=za(t);if(z3()==="virtual"){let r=n;I3(()=>{za(t)===r&&e.isConnected&&Ga(e)})}else Ga(e)}function W3(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=N.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),o=P3(a),s=N.useCallback(l=>{const u=zt(l.target),c=u?za(u):za();l.target===l.currentTarget&&c===ct(l.nativeEvent)&&(n&&n(l),i&&i(!0),o(l))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function Nv(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function _M(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Nv(e.onKeyDown),onKeyUp:Nv(e.onKeyUp)}}}let IM=N.createContext(null);function DM(e){let t=N.useContext(IM)||{};T3(t,e);let{ref:n,...r}=t;return r}function TM(e,t){let{focusProps:n}=W3(e),{keyboardProps:r}=_M(e),i=Mn(n,r),a=DM(t),o=e.isDisabled?{}:a,s=N.useRef(e.autoFocus);N.useEffect(()=>{s.current&&t.current&&G3(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:Mn({...i,tabIndex:l},o)}}function U3(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=N.useRef({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=D3(),l=N.useCallback(p=>{p.currentTarget.contains(p.target)&&a.current.isFocusWithin&&!p.currentTarget.contains(p.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(p),i&&i(!1))},[n,i,a,s]),u=P3(l),c=N.useCallback(p=>{if(!p.currentTarget.contains(p.target))return;const g=zt(p.target),d=za(g);if(!a.current.isFocusWithin&&d===ct(p.nativeEvent)){r&&r(p),i&&i(!0),a.current.isFocusWithin=!0,u(p);let m=p.currentTarget;o(g,"focus",b=>{if(a.current.isFocusWithin&&!yt(m,b.target)){let y=new g.defaultView.FocusEvent("blur",{relatedTarget:b.target});k3(y,m);let f=zp(y);l(f)}},{capture:!0})}},[r,i,u,o,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}const AM=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),RM=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function X3(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return AM.has(n.script)}let t=e.split("-")[0];return RM.has(t)}const BM=Symbol.for("react-aria.i18n.locale");function Y3(){let e=typeof window<"u"&&window[BM]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:X3(e)?"rtl":"ltr"}}let Q0=Y3(),ws=new Set;function Mv(){Q0=Y3();for(let e of ws)e(Q0)}function K3(){let e=C3(),[t,n]=N.useState(Q0);return N.useEffect(()=>(ws.size===0&&window.addEventListener("languagechange",Mv),ws.add(n),()=>{ws.delete(n),ws.size===0&&window.removeEventListener("languagechange",Mv)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const Xp=N.createContext(null);function $M(e){let{locale:t,children:n}=e,r=N.useMemo(()=>({locale:t,direction:X3(t)?"rtl":"ltr"}),[t]);return N.createElement(Xp.Provider,{value:r},n)}function kM(e){let{children:t}=e,n=K3();return N.createElement(Xp.Provider,{value:n},t)}function Yp(e){let{locale:t,children:n}=e;return t?N.createElement($M,{locale:t,children:n}):N.createElement(kM,{children:n})}function _r(){let e=K3();return N.useContext(Xp)||e}const PM=Symbol.for("react-aria.i18n.locale"),FM=Symbol.for("react-aria.i18n.strings");let co;class Qa{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=NM(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[PM];if(co===void 0){let i=window[FM];if(!i)return null;co={};for(let a in i)co[a]=new Qa({[n]:i[a]},n)}let r=co==null?void 0:co[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function NM(e,t,n="en-US"){if(t[e])return t[e];let r=MM(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function MM(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const Ov=new Map,Lv=new Map;class Z3{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let a=this.locale+":"+r,o=Ov.get(a);o||(o=new Intl.PluralRules(this.locale,{type:r}),Ov.set(a,o));let s=o.select(t);return i=n[s]||n.other,typeof i=="function"?i():i}number(t){let n=Lv.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Lv.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const Vv=new WeakMap;function OM(e){let t=Vv.get(e);return t||(t=new Qa(e),Vv.set(e,t)),t}function LM(e,t){return t&&Qa.getGlobalDictionaryForPackage(t)||OM(e)}function Ml(e,t){let{locale:n}=_r(),r=LM(e,t);return N.useMemo(()=>new Z3(n,r),[n,r])}function aa(e){e=R3(e??{},VM);let{locale:t}=_r();return N.useMemo(()=>new ko(t,e),[t,e])}function VM(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}function HM(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:p,href:g,target:d,rel:m,type:b="button"}=e,y;n==="button"?y={type:b,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:y={role:"button",href:n==="a"&&!r?g:void 0,target:n==="a"?d:void 0,type:n==="input"?b:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?m:void 0};let{pressProps:f,isPressed:v}=Gp({onPressStart:a,onPressEnd:o,onPressChange:l,onPress:i,onPressUp:s,onClick:p,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:C}=TM(e,t);c&&(C.tabIndex=r?-1:C.tabIndex);let S=Mn(C,f,Mp(e,{labelable:!0}));return{isPressed:v,buttonProps:Mn(y,S,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}function jM(e){if(e.checked)return!0;let t=[];if(!e.form)t=[...zt(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(a=>!a.form);else{var n,r;let a=(r=e.form)===null||r===void 0||(n=r.elements)===null||n===void 0?void 0:n.namedItem(e.name);t=[...a??[]]}return t?!t.some(a=>a.checked):!1}function q3(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function us(e,t=!1){if(e!=null&&!t)try{G3(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function Co(e,t,n){let r=t!=null&&t.tabbable?uM:B3,i=(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,a=zt(i),o=LN(a,e||a,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)||t!=null&&t.tabbable&&s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(!jM(s)||o.currentNode.tagName==="INPUT"&&o.currentNode.type==="radio"&&o.currentNode.name===s.name)?NodeFilter.FILTER_REJECT:r(s)&&(!n||q3(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function J3(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||za(zt(r)),u=Co(r,{tabbable:a,accept:s});r.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&o&&(u.currentNode=r,c=u.nextNode()),c&&us(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||za(zt(r)),u=Co(r,{tabbable:a,accept:s});if(r.contains(l))u.currentNode=l;else{let p=xh(u);return p&&us(p,!0),p??null}let c=u.previousNode();if(!c&&o){u.currentNode=r;let p=xh(u);if(!p)return null;c=p}return c&&us(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,s=Co(r,{tabbable:i,accept:a}).nextNode();return s&&us(s,!0),s},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=Co(r,{tabbable:i,accept:a}),s=xh(o);return s&&us(s,!0),s??null}}}function xh(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class Kp{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new Hv({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&q3(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Kp;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Hv({scopeRef:null}),this.fastMap.set(null,this.root)}}class Hv{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new Kp;function Q3(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=N.useRef({isFocused:!1,isFocusVisible:t||j3()}),[a,o]=N.useState(!1),[s,l]=N.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=N.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=N.useCallback(d=>{i.current.isFocused=d,o(d),u()},[u]);wM(d=>{i.current.isFocusVisible=d,u()},[],{isTextInput:n});let{focusProps:p}=W3({isDisabled:r,onFocusChange:c}),{focusWithinProps:g}=U3({isDisabled:!r,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:r?g:p}}var eE={};eE={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var tE={};tE={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var nE={};nE={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var rE={};rE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var iE={};iE={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var aE={};aE={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var oE={};oE={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var sE={};sE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var lE={};lE={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var uE={};uE={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var cE={};cE={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var dE={};dE={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var fE={};fE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var hE={};hE={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var gE={};gE={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var pE={};pE={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var mE={};mE={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var bE={};bE={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var vE={};vE={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var yE={};yE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var xE={};xE={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var CE={};CE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var EE={};EE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var SE={};SE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var wE={};wE={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var _E={};_E={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var IE={};IE={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var DE={};DE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var TE={};TE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var AE={};AE={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var RE={};RE={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var BE={};BE={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var $E={};$E={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var kE={};kE={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var Ol={};Ol={"ar-AE":eE,"bg-BG":tE,"cs-CZ":nE,"da-DK":rE,"de-DE":iE,"el-GR":aE,"en-US":oE,"es-ES":sE,"et-EE":lE,"fi-FI":uE,"fr-FR":cE,"he-IL":dE,"hr-HR":fE,"hu-HU":hE,"it-IT":gE,"ja-JP":pE,"ko-KR":mE,"lt-LT":bE,"lv-LV":vE,"nb-NO":yE,"nl-NL":xE,"pl-PL":CE,"pt-BR":EE,"pt-PT":SE,"ro-RO":wE,"ru-RU":_E,"sk-SK":IE,"sl-SI":DE,"sr-SP":TE,"sv-SE":AE,"tr-TR":RE,"uk-UA":BE,"zh-CN":$E,"zh-TW":kE};function PE(e){return e&&e.__esModule?e.default:e}const Zp=new WeakMap;function ol(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function zM(e){let t=Ml(PE(Ol),"@react-aria/calendar"),n,r;var i;"highlightedRange"in e?{start:n,end:r}=e.highlightedRange||{}:n=r=(i=e.value)!==null&&i!==void 0?i:void 0;let a=aa({weekday:"long",month:"long",year:"numeric",day:"numeric",era:ol(n)||ol(r),timeZone:e.timeZone}),o="anchorDate"in e?e.anchorDate:null;return N.useMemo(()=>{if(!o&&n&&r)if(Tt(n,r)){let s=a.format(n.toDate(e.timeZone));return t.format("selectedDateDescription",{date:s})}else{let s=tg(a,t,n,r,e.timeZone);return t.format("selectedRangeDescription",{dateRange:s})}return""},[n,r,o,e.timeZone,t,a])}function eg(e,t,n,r){let i=Ml(PE(Ol),"@react-aria/calendar"),a=ol(e)||ol(t),o=aa({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),s=aa({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return N.useMemo(()=>{if(Tt(e,Pl(e))){let l=e,u=t;if(e.calendar.getFormattableMonth&&(l=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(u=t.calendar.getFormattableMonth(t)),Tt(t,O0(e)))return o.format(l.toDate(n));if(Tt(t,O0(t)))return r?tg(o,i,l,u,n):o.formatRange(l.toDate(n),u.toDate(n))}return r?tg(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,i,n,r])}function tg(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),o=-1;for(let u=0;u<a.length;u++){let c=a[u];if(c.source==="shared"&&c.type==="literal")o=u;else if(c.source==="endRange")break}let s="",l="";for(let u=0;u<a.length;u++)u<o?s+=a[u].value:u>o&&(l+=a[u].value);return t.format("dateRange",{startDate:s,endDate:l})}const FE=7e3;let Rr=null;function jv(e,t="assertive",n=FE){Rr?Rr.announce(e,t,n):(Rr=new GM,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Rr.announce(e,t,n):setTimeout(()=>{Rr!=null&&Rr.isAttached()&&(Rr==null||Rr.announce(e,t,n))},100))}class GM{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=FE){var i,a;if(!this.node)return;let o=document.createElement("div");typeof t=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",t["aria-labelledby"])):o.textContent=t,n==="assertive"?(i=this.assertiveLog)===null||i===void 0||i.appendChild(o):(a=this.politeLog)===null||a===void 0||a.appendChild(o),t!==""&&setTimeout(()=>{o.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function WM(e){return e&&e.__esModule?e.default:e}function NE(e,t){let n=Ml(WM(Ol),"@react-aria/calendar"),r=Mp(e),i=eg(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=eg(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);_v(()=>{t.isFocused||jv(a)},[a]);let o=zM(t);_v(()=>{o&&jv(o,"polite",4e3)},[o]);let s=W0([!!e.errorMessage,e.isInvalid,e.validationState]);Zp.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:s,selectedDateDescription:o});let[l,u]=N.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&l&&(u(!1),t.setFocused(!0));let[p,g]=N.useState(!1),d=e.isDisabled||t.isPreviousVisibleRangeInvalid();d&&p&&(g(!1),t.setFocused(!0));let m=Vp({id:e.id,"aria-label":[e["aria-label"],a].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:Mn(r,m,{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:c,onFocusChange:u},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:d,onFocusChange:g},errorMessageProps:{id:s},title:i}}function ME(e,t){return NE(e,t)}function UM(e,t,n){let r=NE(e,t),i=N.useRef(!1),a=N.useRef(typeof window<"u"?window:null);return bh(a,"pointerdown",s=>{i.current=s.width===0&&s.height===0}),bh(a,"pointerup",s=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let l=s.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(l)||!l.closest('button, [role="button"]'))&&t.selectFocusedDate()}),r.calendarProps.onBlur=s=>{n.current&&(!s.relatedTarget||!n.current.contains(s.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},bh(n,"touchmove",s=>{t.isDragging&&s.preventDefault()},{passive:!1,capture:!0}),r}function OE(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=_r(),o=b=>{switch(b.key){case"Enter":case" ":b.preventDefault(),t.selectFocusedDate();break;case"PageUp":b.preventDefault(),b.stopPropagation(),t.focusPreviousSection(b.shiftKey);break;case"PageDown":b.preventDefault(),b.stopPropagation(),t.focusNextSection(b.shiftKey);break;case"End":b.preventDefault(),b.stopPropagation(),t.focusSectionEnd();break;case"Home":b.preventDefault(),b.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":b.preventDefault(),b.stopPropagation(),a==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":b.preventDefault(),b.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":b.preventDefault(),b.stopPropagation(),a==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":b.preventDefault(),b.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(b.preventDefault(),t.setAnchorDate(null));break}},s=eg(n,r,t.timeZone,!0),{ariaLabel:l,ariaLabelledBy:u}=Zp.get(t),c=Vp({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":u}),p=aa({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:g}=_r(),d=N.useMemo(()=>{let b=tl(Sp(t.timeZone),g,i);return[...new Array(7).keys()].map(y=>{let v=b.add({days:y}).toDate(t.timeZone);return p.format(v)})},[g,t.timeZone,p,i]),m=wp(n,g,i);return{gridProps:Mn(c,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:o,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:d,weeksInMonth:m}}function XM(e){return e&&e.__esModule?e.default:e}function YM(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:o}=Zp.get(t),s=Ml(XM(Ol),"@react-aria/calendar"),l=aa({weekday:"long",day:"numeric",month:"long",year:"numeric",era:ol(r),timeZone:t.timeZone}),u=t.isSelected(r),c=t.isCellFocused(r)&&!e.isOutsideMonth;i=i||t.isCellDisabled(r);let p=t.isCellUnavailable(r),g=!i&&!p,d=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&Tt(t.value,r));d&&(u=!0),r=R3(r,M0);let m=N.useMemo(()=>r.toDate(t.timeZone),[r,t.timeZone]),b=TF(r,t.timeZone),y=N.useMemo(()=>{let I="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Tt(r,t.value.start)||Tt(r,t.value.end))&&(I=o+", "),I+=l.format(m),b?I=s.format(u?"todayDateSelected":"todayDate",{date:I}):u&&(I=s.format("dateSelected",{date:I})),t.minValue&&Tt(r,t.minValue)?I+=", "+s.format("minimumDate"):t.maxValue&&Tt(r,t.maxValue)&&(I+=", "+s.format("maximumDate")),I},[l,m,s,u,b,r,t,o]),f="";"anchorDate"in t&&c&&!t.isReadOnly&&g&&(t.anchorDate?f=s.format("finishRangeSelectionPrompt"):f=s.format("startRangeSelectionPrompt"));let v=A3(f),C=N.useRef(!1),S=N.useRef(!1),_=N.useRef(void 0),{pressProps:E,isPressed:x}=Gp({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!g||t.isReadOnly,onPressStart(I){if(t.isReadOnly){t.setFocusedDate(r);return}if("highlightedRange"in t&&!t.anchorDate&&(I.pointerType==="mouse"||I.pointerType==="touch")){if(t.highlightedRange&&!d){if(Tt(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),S.current=!0;return}else if(Tt(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),S.current=!0;return}}let T=()=>{t.setDragging(!0),_.current=void 0,t.selectDate(r),t.setFocusedDate(r),C.current=!0};I.pointerType==="touch"?_.current=setTimeout(T,200):T()}},onPressEnd(){S.current=!1,C.current=!1,clearTimeout(_.current),_.current=void 0},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(I){if(!t.isReadOnly&&("anchorDate"in t&&_.current&&(t.selectDate(r),t.setFocusedDate(r)),"anchorDate"in t))if(S.current)t.setAnchorDate(r);else if(t.anchorDate&&!C.current)t.selectDate(r),t.setFocusedDate(r);else if(I.pointerType==="keyboard"&&!t.anchorDate){t.selectDate(r);let T=r.add({days:1});t.isInvalid(T)&&(T=r.subtract({days:1})),t.isInvalid(T)||t.setFocusedDate(T)}else I.pointerType==="virtual"&&(t.selectDate(r),t.setFocusedDate(r))}}),h;i||(h=Tt(r,t.focusedDate)?0:-1),N.useEffect(()=>{c&&n.current&&(Ga(n.current),z3()!=="pointer"&&document.activeElement===n.current&&nM(n.current,{containingElement:JN(n.current)}))},[c,n]);let w=aa({day:"numeric",timeZone:t.timeZone,calendar:r.calendar.identifier}),D=N.useMemo(()=>w.formatToParts(m).find(I=>I.type==="day").value,[w,m]);return{cellProps:{role:"gridcell","aria-disabled":!g||void 0,"aria-selected":u||void 0,"aria-invalid":d||void 0},buttonProps:Mn(E,{onFocus(){i||t.setFocusedDate(r)},tabIndex:h,role:"button","aria-disabled":!g||void 0,"aria-label":y,"aria-invalid":d||void 0,"aria-describedby":[d?a:void 0,v["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(I){"highlightDate"in t&&(I.pointerType!=="touch"||t.isDragging)&&g&&t.highlightDate(r)},onPointerDown(I){"releasePointerCapture"in I.target&&I.target.releasePointerCapture(I.pointerId)},onContextMenu(I){I.preventDefault()}}),isPressed:x,isFocused:c,isSelected:u,isDisabled:i,isUnavailable:p,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:d,formattedDate:D}}const Bd={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},LE={...Bd,customError:!0,valid:!1},wa={isInvalid:!1,validationDetails:Bd,validationErrors:[]},KM=N.createContext({}),Nc="__formValidationState"+Date.now();function ZM(e){if(e[Nc]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[Nc];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return qM(e)}function qM(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:s="aria"}=e;n&&(t||(t=n==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:LE}:null,u=N.useMemo(()=>{if(!o||i==null)return null;let D=JM(o,i);return zv(D)},[o,i]);a!=null&&a.validationDetails.valid&&(a=void 0);let c=N.useContext(KM),p=N.useMemo(()=>r?Array.isArray(r)?r.flatMap(D=>ng(c[D])):ng(c[r]):[],[c,r]),[g,d]=N.useState(c),[m,b]=N.useState(!1);c!==g&&(d(c),b(!1));let y=N.useMemo(()=>zv(m?[]:p),[m,p]),f=N.useRef(wa),[v,C]=N.useState(wa),S=N.useRef(wa),_=()=>{if(!E)return;x(!1);let D=u||a||f.current;Ch(D,S.current)||(S.current=D,C(D))},[E,x]=N.useState(!1);return N.useEffect(_),{realtimeValidation:l||y||u||a||wa,displayValidation:s==="native"?l||y||v:l||y||u||a||v,updateValidation(D){s==="aria"&&!Ch(v,D)?C(D):f.current=D},resetValidation(){let D=wa;Ch(D,S.current)||(S.current=D,C(D)),s==="native"&&x(!1),b(!0)},commitValidation(){s==="native"&&x(!0),b(!0)}}}function ng(e){return e?Array.isArray(e)?e:[e]:[]}function JM(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return ng(n)}return[]}function zv(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:LE}:null}function Ch(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function Mc(...e){let t=new Set,n=!1,r={...Bd};for(let o of e){var i,a;for(let s of o.validationErrors)t.add(s);n||(n=o.isInvalid);for(let s in r)(i=r)[a=s]||(i[a]=o.validationDetails[s])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}function QM(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=zo(t);let o=zo(),s={};n?(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a==="label"?t:void 0}):!r&&!i&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=Vp({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:l}}function eO(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=QM(e),s=W0([!!t,!!n,r,i]),l=W0([!!t,!!n,r,i]);return o=Mn(o,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:l}}}var VE={};VE={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var HE={};HE={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var jE={};jE={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var zE={};zE={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var GE={};GE={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var WE={};WE={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var UE={};UE={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var XE={};XE={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var YE={};YE={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var KE={};KE={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var ZE={};ZE={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var qE={};qE={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var JE={};JE={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var QE={};QE={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var eS={};eS={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var tS={};tS={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var nS={};nS={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var rS={};rS={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var iS={};iS={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var aS={};aS={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var oS={};oS={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var sS={};sS={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var lS={};lS={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var uS={};uS={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var cS={};cS={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var dS={};dS={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var fS={};fS={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var hS={};hS={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var gS={};gS={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var pS={};pS={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var mS={};mS={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var bS={};bS={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var vS={};vS={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var yS={};yS={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var xS={};xS={"ar-AE":VE,"bg-BG":HE,"cs-CZ":jE,"da-DK":zE,"de-DE":GE,"el-GR":WE,"en-US":UE,"es-ES":XE,"et-EE":YE,"fi-FI":KE,"fr-FR":ZE,"he-IL":qE,"hr-HR":JE,"hu-HU":QE,"it-IT":eS,"ja-JP":tS,"ko-KR":nS,"lt-LT":rS,"lv-LV":iS,"nb-NO":aS,"nl-NL":oS,"pl-PL":sS,"pt-BR":lS,"pt-PT":uS,"ro-RO":cS,"ru-RU":dS,"sk-SK":fS,"sl-SI":hS,"sr-SP":gS,"sv-SE":pS,"tr-TR":mS,"uk-UA":bS,"zh-CN":vS,"zh-TW":yS};function tO(e,t,n){let{direction:r}=_r(),i=N.useMemo(()=>J3(t),[t]),a=l=>{if(l.currentTarget.contains(l.target)&&(l.altKey&&(l.key==="ArrowDown"||l.key==="ArrowUp")&&"setOpen"in e&&(l.preventDefault(),l.stopPropagation(),e.setOpen(!0)),!n))switch(l.key){case"ArrowLeft":if(l.preventDefault(),l.stopPropagation(),r==="rtl"){if(t.current){let u=l.target,c=Gv(t.current,u.getBoundingClientRect().left,-1);c&&c.focus()}}else i.focusPrevious();break;case"ArrowRight":if(l.preventDefault(),l.stopPropagation(),r==="rtl"){if(t.current){let u=l.target,c=Gv(t.current,u.getBoundingClientRect().left,1);c&&c.focus()}}else i.focusNext();break}},o=()=>{var l;if(!t.current)return;let u=(l=window.event)===null||l===void 0?void 0:l.target,c=Co(t.current,{tabbable:!0});if(u&&(c.currentNode=u,u=c.previousNode()),!u){let p;do p=c.lastChild(),p&&(u=p);while(p)}for(;u!=null&&u.hasAttribute("data-placeholder");){let p=c.previousNode();if(p&&p.hasAttribute("data-placeholder"))u=p;else break}u&&u.focus()},{pressProps:s}=Gp({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(l){l.pointerType==="mouse"&&o()},onPress(l){(l.pointerType==="touch"||l.pointerType==="pen")&&o()}});return Mn(s,{onKeyDown:a})}function Gv(e,t,n){let r=Co(e,{tabbable:!0}),i=r.nextNode(),a=null,o=1/0;for(;i;){let l=i.getBoundingClientRect().left-t,u=Math.abs(l);Math.sign(l)===n&&u<o&&(a=i,o=u),i=r.nextNode()}return a}const nO="__role_"+Date.now(),rO="__focusManager_"+Date.now();function iO(e){return e&&e.__esModule?e.default:e}function aO(e,t,n){var r,i,a,o,s;let l=Ml(iO(xS),"@react-aria/datepicker"),{isInvalid:u,validationErrors:c,validationDetails:p}=t.displayValidation,{labelProps:g,fieldProps:d,descriptionProps:m,errorMessageProps:b}=eO({...e,labelElementType:"span",isInvalid:u,errorMessage:e.errorMessage||c}),y=d["aria-labelledby"]||d.id,{locale:f}=_r(),v=t.formatValue(f,{month:"long"}),C=v?l.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):"",S=A3(C),_={"aria-label":l.format("startDate"),"aria-labelledby":y},E={"aria-label":l.format("endDate"),"aria-labelledby":y},x=zo(),h=zo(),w=tO(t,n),D=[S["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,I=N.useMemo(()=>J3(n,{accept:G=>G.id!==x}),[n,x]),T={[rO]:I,[nO]:"presentation","aria-describedby":D,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},F=Mp(e),P=N.useRef(!1),{focusWithinProps:k}=U3({...e,isDisabled:t.isOpen,onBlurWithin:G=>{let U=document.getElementById(h);if(!(U!=null&&U.contains(G.relatedTarget))){var J,Q;P.current=!1,(J=e.onBlur)===null||J===void 0||J.call(e,G),(Q=e.onFocusChange)===null||Q===void 0||Q.call(e,!1)}},onFocusWithin:G=>{if(!P.current){var U,J;P.current=!0,(U=e.onFocus)===null||U===void 0||U.call(e,G),(J=e.onFocusChange)===null||J===void 0||J.call(e,!0)}}}),R=N.useRef(wa),M=N.useRef(wa);var O,z;return{groupProps:Mn(F,w,d,S,k,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":D,onKeyDown(G){t.isOpen||e.onKeyDown&&e.onKeyDown(G)},onKeyUp(G){t.isOpen||e.onKeyUp&&e.onKeyUp(G)}}),labelProps:{...g,onClick:()=>{I.focusFirst()}},buttonProps:{...S,id:x,"aria-haspopup":"dialog","aria-label":l.format("calendar"),"aria-labelledby":`${x} ${y}`,"aria-describedby":D,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:h,"aria-labelledby":`${x} ${y}`},startFieldProps:{..._,...T,value:(O=(r=t.value)===null||r===void 0?void 0:r.start)!==null&&O!==void 0?O:null,defaultValue:(i=t.defaultValue)===null||i===void 0?void 0:i.start,onChange:G=>t.setDateTime("start",G),autoFocus:e.autoFocus,name:e.startName,form:e.form,[Nc]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(G){R.current=G,t.updateValidation(Mc(G,M.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...E,...T,value:(z=(a=t.value)===null||a===void 0?void 0:a.end)!==null&&z!==void 0?z:null,defaultValue:(o=t.defaultValue)===null||o===void 0?void 0:o.end,onChange:G=>t.setDateTime("end",G),name:e.endName,form:e.form,[Nc]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(G){M.current=G,t.updateValidation(Mc(R.current,G))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:m,errorMessageProps:b,calendarProps:{autoFocus:!0,value:!((s=t.dateRange)===null||s===void 0)&&s.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:u,validationErrors:c,validationDetails:p}}function Fo(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function rg(e,t,n,r,i){let a={};for(let s in t)a[s]=Math.floor(t[s]/2),a[s]>0&&t[s]%2===0&&a[s]--;let o=Ta(e,t,n).subtract(a);return sl(e,o,t,n,r,i)}function Ta(e,t,n,r,i){let a=e;return t.years?a=BF(e):t.months?a=Pl(e):t.weeks&&(a=tl(e,n)),sl(e,a,t,n,r,i)}function ig(e,t,n,r,i){let a={...t};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let o=Ta(e,t,n).subtract(a);return sl(e,o,t,n,r,i)}function sl(e,t,n,r,i,a){if(i&&e.compare(i)>=0){let o=Ip(t,Ta(_n(i),n,r));o&&(t=o)}if(a&&e.compare(a)<=0){let o=_p(t,ig(_n(a),n,r));o&&(t=o)}return t}function Li(e,t,n){if(t){let r=Ip(e,_n(t));r&&(e=r)}if(n){let r=_p(e,_n(n));r&&(e=r)}return e}function CS(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function ES(e){let t=N.useMemo(()=>new ko(e.locale),[e.locale]),n=N.useMemo(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:o,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",firstDayOfWeek:p}=e,g=N.useMemo(()=>i(n.calendar),[i,n.calendar]);var d;let[m,b]=al(e.value,(d=e.defaultValue)!==null&&d!==void 0?d:null,e.onChange),y=N.useMemo(()=>m?un(_n(m),g):null,[m,g]),f=N.useMemo(()=>m&&"timeZone"in m?m.timeZone:n.timeZone,[m,n.timeZone]),v=N.useMemo(()=>e.focusedValue?Li(un(_n(e.focusedValue),g),o,s):void 0,[e.focusedValue,g,o,s]),C=N.useMemo(()=>Li(e.defaultFocusedValue?un(_n(e.defaultFocusedValue),g):y||un(Sp(f),g),o,s),[e.defaultFocusedValue,y,f,g,o,s]),[S,_]=al(v,C,e.onFocusChange),[E,x]=N.useState(()=>{switch(l){case"start":return Ta(S,a,r,o,s);case"end":return ig(S,a,r,o,s);case"center":default:return rg(S,a,r,o,s)}}),[h,w]=N.useState(e.autoFocus||!1),D=N.useMemo(()=>{let U={...a};return U.days?U.days--:U.days=-1,E.add(U)},[E,a]),[I,T]=N.useState(g);if(!Ep(g,I)){let U=un(S,g);x(rg(U,a,r,o,s)),_(U),T(g)}Fo(S,o,s)?_(Li(S,o,s)):S.compare(E)<0?x(ig(S,a,r,o,s)):S.compare(D)>0&&x(Ta(S,a,r,o,s));function F(U){U=Li(U,o,s),_(U)}function P(U){if(!e.isDisabled&&!e.isReadOnly){let J=U;if(J===null){b(null);return}if(J=Li(J,o,s),J=CS(J,E,u),!J)return;J=un(J,(m==null?void 0:m.calendar)||new Yn),m&&"hour"in m?b(m.set(J)):b(J)}}let k=N.useMemo(()=>y?u&&u(y)?!0:Fo(y,o,s):!1,[y,u,o,s]),R=e.isInvalid||e.validationState==="invalid"||k,M=R?"invalid":null,O=N.useMemo(()=>c==="visible"?a:Eh(a),[c,a]);var z,G;return{isDisabled:(z=e.isDisabled)!==null&&z!==void 0?z:!1,isReadOnly:(G=e.isReadOnly)!==null&&G!==void 0?G:!1,value:y,setValue:P,visibleRange:{start:E,end:D},minValue:o,maxValue:s,focusedDate:S,timeZone:f,validationState:M,isValueInvalid:R,setFocusedDate(U){F(U),w(!0)},focusNextDay(){F(S.add({days:1}))},focusPreviousDay(){F(S.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&F(S.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&F(S.subtract({weeks:1}))},focusNextPage(){let U=E.add(O);_(Li(S.add(O),o,s)),x(Ta(sl(S,U,O,r,o,s),O,r))},focusPreviousPage(){let U=E.subtract(O);_(Li(S.subtract(O),o,s)),x(Ta(sl(S,U,O,r,o,s),O,r))},focusSectionStart(){a.days?F(E):a.weeks?F(tl(S,r)):(a.months||a.years)&&F(Pl(S))},focusSectionEnd(){a.days?F(D):a.weeks?F($F(S,r)):(a.months||a.years)&&F(O0(S))},focusNextSection(U){if(!U&&!a.days){F(S.add(Eh(a)));return}a.days?this.focusNextPage():a.weeks?F(S.add({months:1})):(a.months||a.years)&&F(S.add({years:1}))},focusPreviousSection(U){if(!U&&!a.days){F(S.subtract(Eh(a)));return}a.days?this.focusPreviousPage():a.weeks?F(S.subtract({months:1})):(a.months||a.years)&&F(S.subtract({years:1}))},selectFocusedDate(){u&&u(S)||P(S)},selectDate(U){P(U)},isFocused:h,setFocused:w,isInvalid(U){return Fo(U,o,s)},isSelected(U){return y!=null&&Tt(U,y)&&!this.isCellDisabled(U)&&!this.isCellUnavailable(U)},isCellFocused(U){return h&&S&&Tt(U,S)},isCellDisabled(U){return e.isDisabled||U.compare(E)<0||U.compare(D)>0||this.isInvalid(U)},isCellUnavailable(U){return e.isDateUnavailable?e.isDateUnavailable(U):!1},isPreviousVisibleRangeInvalid(){let U=E.subtract({days:1});return Tt(U,E)||this.isInvalid(U)},isNextVisibleRangeInvalid(){let U=D.add({days:1});return Tt(U,D)||this.isInvalid(U)},getDatesInWeek(U,J=E){let Q=J.add({weeks:U}),ee=[];Q=tl(Q,r,p);let q=Dd(Q,r,p);for(let Z=0;Z<q;Z++)ee.push(null);for(;ee.length<7;){ee.push(Q);let Z=Q.add({days:1});if(Tt(Q,Z))break;Q=Z}for(;ee.length<7;)ee.push(null);return ee}}}function Eh(e){let t={...e};for(let n in e)t[n]=1;return t}function oO(e){let{value:t,defaultValue:n,onChange:r,createCalendar:i,locale:a,visibleDuration:o={months:1},minValue:s,maxValue:l,...u}=e,[c,p]=al(t,n||null,r),[g,d]=N.useState(null),m="center";if(c&&c.start&&c.end){let O=rg(_n(c.start),o,a,s,l).add(o).subtract({days:1});c.end.compare(O)>0&&(m="start")}let b=N.useRef(null),[y,f]=N.useState(null),v=N.useMemo(()=>Ip(s,y==null?void 0:y.start),[s,y]),C=N.useMemo(()=>_p(l,y==null?void 0:y.end),[l,y]),S=ES({...u,value:c&&c.start,createCalendar:i,locale:a,visibleDuration:o,minValue:v,maxValue:C,selectionAlignment:e.selectionAlignment||m}),_=M=>{if(M&&e.isDateUnavailable&&!e.allowsNonContiguousRanges){const O=Uv(M,S,-1),z=Uv(M,S,1);b.current={start:O,end:z},f(b.current)}else b.current=null,f(null)},[E,x]=N.useState(S.visibleRange);(!M0(S.visibleRange.start,E.start)||!M0(S.visibleRange.end,E.end))&&(_(g),x(S.visibleRange));let h=M=>{M?(d(M),_(M)):(d(null),_(null))},w=g?Sh(g,S.focusedDate):c&&Sh(c.start,c.end),D=M=>{if(e.isReadOnly)return;const O=Li(M,v,C),z=CS(O,S.visibleRange.start,e.isDateUnavailable);if(z)if(!g)h(z);else{let G=Sh(g,z);G&&p({start:Wv(G.start,c==null?void 0:c.start),end:Wv(G.end,c==null?void 0:c.end)}),h(null)}},[I,T]=N.useState(!1),{isDateUnavailable:F}=e,P=N.useMemo(()=>!c||g?!1:F&&(F(c.start)||F(c.end))?!0:Fo(c.start,s,l)||Fo(c.end,s,l),[F,c,g,s,l]),k=e.isInvalid||e.validationState==="invalid"||P;return{...S,value:c,setValue:p,anchorDate:g,setAnchorDate:h,highlightedRange:w,validationState:k?"invalid":null,isValueInvalid:k,selectFocusedDate(){D(S.focusedDate)},selectDate:D,highlightDate(M){g&&S.setFocusedDate(M)},isSelected(M){return!!(w&&M.compare(w.start)>=0&&M.compare(w.end)<=0&&!S.isCellDisabled(M)&&!S.isCellUnavailable(M))},isInvalid(M){var O,z;return S.isInvalid(M)||Fo(M,(O=b.current)===null||O===void 0?void 0:O.start,(z=b.current)===null||z===void 0?void 0:z.end)},isDragging:I,setDragging:T}}function Sh(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:_n(e),end:_n(t)})}function Wv(e,t){return e=un(e,(t==null?void 0:t.calendar)||new Yn),t&&"hour"in t?t.set(e):e}function Uv(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}function sO(e){let[t,n]=al(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=N.useCallback(()=>{n(!0)},[n]),i=N.useCallback(()=>{n(!1)},[n]),a=N.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:a}}var SS={};SS={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var wS={};wS={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var _S={};_S={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var IS={};IS={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var DS={};DS={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var TS={};TS={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var AS={};AS={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var RS={};RS={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var BS={};BS={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var $S={};$S={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var kS={};kS={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var PS={};PS={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var FS={};FS={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var NS={};NS={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var MS={};MS={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var OS={};OS={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var LS={};LS={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var VS={};VS={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var HS={};HS={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var jS={};jS={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var zS={};zS={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var GS={};GS={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var WS={};WS={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var US={};US={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var XS={};XS={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var YS={};YS={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var KS={};KS={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var ZS={};ZS={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var qS={};qS={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var JS={};JS={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var QS={};QS={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var ew={};ew={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var tw={};tw={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var nw={};nw={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var rw={};rw={"ar-AE":SS,"bg-BG":wS,"cs-CZ":_S,"da-DK":IS,"de-DE":DS,"el-GR":TS,"en-US":AS,"es-ES":RS,"et-EE":BS,"fi-FI":$S,"fr-FR":kS,"he-IL":PS,"hr-HR":FS,"hu-HU":NS,"it-IT":MS,"ja-JP":OS,"ko-KR":LS,"lt-LT":VS,"lv-LV":HS,"nb-NO":jS,"nl-NL":zS,"pl-PL":GS,"pt-BR":WS,"pt-PT":US,"ro-RO":XS,"ru-RU":YS,"sk-SK":KS,"sl-SI":ZS,"sr-SP":qS,"sv-SE":JS,"tr-TR":QS,"uk-UA":ew,"zh-CN":tw,"zh-TW":nw};function lO(e){return e&&e.__esModule?e.default:e}const iw=new Qa(lO(rw));function aw(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function Xv(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,o=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&(r==null?void 0:r(e))||!1,l=a||o||s,u=[];if(l){let c=aw(),p=Qa.getGlobalDictionaryForPackage("@react-stately/datepicker")||iw,g=new Z3(c,p),d=new ko(c,Zu({},i)),m=d.resolvedOptions().timeZone;o&&t!=null&&u.push(g.format("rangeUnderflow",{minValue:d.format(t.toDate(m))})),a&&n!=null&&u.push(g.format("rangeOverflow",{maxValue:d.format(n.toDate(m))})),s&&u.push(g.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}function uO(e,t,n,r,i){var a;let o=Xv((a=e==null?void 0:e.start)!==null&&a!==void 0?a:null,t,n,r,i);var s;let l=Xv((s=e==null?void 0:e.end)!==null&&s!==void 0?s:null,t,n,r,i),u=Mc(o,l);if((e==null?void 0:e.end)!=null&&e.start!=null&&e.end.compare(e.start)<0){let c=Qa.getGlobalDictionaryForPackage("@react-stately/datepicker")||iw;u=Mc(u,{isInvalid:!0,validationErrors:[c.getStringForLocale("rangeReversed",aw())],validationDetails:{...Bd,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return u}const cO={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},dO={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function Zu(e,t){e={...t.shouldForceLeadingZeros?dO:cO,...e};let r=t.granularity||"minute",i=Object.keys(e);var a;let o=i.indexOf((a=t.maxGranularity)!==null&&a!==void 0?a:"year");o<0&&(o=0);let s=i.indexOf(r);if(s<0&&(s=2),o>s)throw new Error("maxGranularity must be greater than granularity");let l=i.slice(o,s+1).reduce((c,p)=>(c[p]=e[p],c),{});return t.hourCycle!=null&&(l.hour12=t.hourCycle===12),l.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(l.timeZoneName="short"),t.showEra&&o===0&&(l.era="short"),l}function pu(e){return e&&"hour"in e?e:new kp}function fO(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[i,a]=N.useState([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||(t=e?r:i[0]);let o=e?n:i[1];return[t,o]}function hO(e){var t,n;let r=sO(e),[i,a]=al(e.value,e.defaultValue||null,e.onChange),[o]=N.useState(i),[s,l]=N.useState(()=>i||{start:null,end:null});i==null&&s.start&&s.end&&(s={start:null,end:null},l(s));let u=i||s,c=O=>{u=O||{start:null,end:null},l(u),ma(u)?a(u):a(null)},p=(u==null?void 0:u.start)||(u==null?void 0:u.end)||e.placeholderValue||null,[g,d]=fO(p,e.granularity),m=g==="hour"||g==="minute"||g==="second";var b;let y=(b=e.shouldCloseOnSelect)!==null&&b!==void 0?b:!0,[f,v]=N.useState(null),[C,S]=N.useState(null);u&&ma(u)&&(f=u,"hour"in u.start&&(C=u));let _=(O,z)=>{c({start:"timeZone"in z.start?z.start.set(_n(O.start)):ia(O.start,z.start),end:"timeZone"in z.end?z.end.set(_n(O.end)):ia(O.end,z.end)}),v(null),S(null),P.commitValidation()},E=O=>{let z=typeof y=="function"?y():y;m?ma(O)&&(z||C!=null&&C.start&&(C!=null&&C.end))?_(O,{start:(C==null?void 0:C.start)||pu(e.placeholderValue),end:(C==null?void 0:C.end)||pu(e.placeholderValue)}):v(O):ma(O)?(c(O),P.commitValidation()):v(O),z&&r.setOpen(!1)},x=O=>{ma(f)&&ma(O)?_(f,O):S(O)},h=(u==null||(t=u.start)===null||t===void 0?void 0:t.calendar.identifier)==="gregory"&&u.start.era==="BC"||(u==null||(n=u.end)===null||n===void 0?void 0:n.calendar.identifier)==="gregory"&&u.end.era==="BC",w=N.useMemo(()=>({granularity:g,timeZone:d,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[g,e.hourCycle,e.shouldForceLeadingZeros,d,e.hideTimeZone,h]),{minValue:D,maxValue:I,isDateUnavailable:T}=e,F=N.useMemo(()=>uO(u,D,I,T,w),[u,D,I,T,w]),P=ZM({...e,value:i,name:N.useMemo(()=>[e.startName,e.endName].filter(O=>O!=null),[e.startName,e.endName]),builtinValidation:F}),k=P.displayValidation.isInvalid,R=e.validationState||(k?"invalid":null);var M;return{...P,value:u,defaultValue:(M=e.defaultValue)!==null&&M!==void 0?M:o,setValue:c,dateRange:f,timeRange:C,granularity:g,hasTime:m,setDate(O,z){var G,U;E(O==="start"?{start:z,end:(G=f==null?void 0:f.end)!==null&&G!==void 0?G:null}:{start:(U=f==null?void 0:f.start)!==null&&U!==void 0?U:null,end:z})},setTime(O,z){var G,U;x(O==="start"?{start:z,end:(G=C==null?void 0:C.end)!==null&&G!==void 0?G:null}:{start:(U=C==null?void 0:C.start)!==null&&U!==void 0?U:null,end:z})},setDateTime(O,z){var G,U;c(O==="start"?{start:z,end:(G=u==null?void 0:u.end)!==null&&G!==void 0?G:null}:{start:(U=u==null?void 0:u.start)!==null&&U!==void 0?U:null,end:z})},setDateRange:E,setTimeRange:x,...r,setOpen(O){!O&&!(u!=null&&u.start&&(u!=null&&u.end))&&ma(f)&&m&&_(f,{start:(C==null?void 0:C.start)||pu(e.placeholderValue),end:(C==null?void 0:C.end)||pu(e.placeholderValue)}),r.setOpen(O)},validationState:R,isInvalid:k,formatValue(O,z){if(!u||!u.start||!u.end)return null;let G="timeZone"in u.start?u.start.timeZone:void 0,U=e.granularity||(u.start&&"minute"in u.start?"minute":"day"),J="timeZone"in u.end?u.end.timeZone:void 0,Q=e.granularity||(u.end&&"minute"in u.end?"minute":"day"),ee=Zu(z,{granularity:U,timeZone:G,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:u.start.calendar.identifier==="gregory"&&u.start.era==="BC"||u.end.calendar.identifier==="gregory"&&u.end.era==="BC"}),q=u.start.toDate(G||"UTC"),Z=u.end.toDate(J||"UTC"),se=new ko(O,ee),te;if(G===J&&U===Q&&u.start.compare(u.end)!==0){try{let $=se.formatRangeToParts(q,Z),H=-1;for(let L=0;L<$.length;L++){let K=$[L];if(K.source==="shared"&&K.type==="literal")H=L;else if(K.source==="endRange")break}let V="",A="";for(let L=0;L<$.length;L++)L<H?V+=$[L].value:L>H&&(A+=$[L].value);return{start:V,end:A}}catch{}te=se}else{let $=Zu(z,{granularity:Q,timeZone:J,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});te=new ko(O,$)}return{start:se.format(q),end:te.format(Z)}},getDateFormatter(O,z){let G={...w,...z},U=Zu({},G);return new ko(O,U)}}}function ma(e){return(e==null?void 0:e.start)!=null&&e.end!=null}const ow=e=>{const t=N.useRef(null),{locale:n}=_r(),{state:r,date:i}=e,{cellProps:a,buttonProps:o,isSelected:s,isOutsideVisibleRange:l,isDisabled:u,formattedDate:c,isInvalid:p}=YM({date:i},r,t),{focusProps:g}=Q3(),d="highlightedRange"in r?r.highlightedRange?Tt(i,r.highlightedRange.start):null:s,m="highlightedRange"in r?r.highlightedRange?Tt(i,r.highlightedRange.end):null:s,b=Dd(i,n),y=s&&(d||b===0||i.day===1),f=s&&(m||b===6||i.day===i.calendar.getDaysInMonth(i));return B.jsx("td",{...a,children:B.jsx("div",{...Mn(o,g),ref:t,className:`${Re["cell-calendar"]} ${y?"iru-rounded-l-full":""} ${f?"iru-rounded-r-full":""} ${s?p?"iru-bg-red-300":"iru-bg-laba-blue-02":""} ${u?"iru-disabled":""}`,children:l?B.jsx("div",{className:Re["visible-cell-calendar"],children:c}):B.jsx("div",{className:`${Re["active-cell-calendar"]} ${u&&!p?Re.disabled:""} ${d||m?p?Re.error:Re.selected:""} ${s&&!u&&!(d??m)?p?"hover:iru-bg-red-400":"hover:iru-text-laba-blue-05":""} ${!s&&!u?"hover:iru-bg-laba-blue-01":""}`,children:c})})})},Wo=e=>{const t=N.useRef(null),{buttonProps:n}=HM(e,t),{focusProps:r}=Q3();return B.jsx("button",{...Mn(n,r),ref:t,className:`iru-px-2 iru-py-1 iru-rounded-full ${e.isDisabled?"iru-text-gray-400":"iru-text-laba-blue-10"} ${e.isDisabled?"":"hover:iru-bg-laba-blue-01 iru-cursor-pointer"} iru-outline-none`,children:e.children})},sw=({prevIcon:e,nextIcon:t,state:n,setActiveTypeCalendar:r,onChangeMonth:i,type:a,hiddenHeader:o})=>{const s=new Date().getFullYear(),l=n.focusedDate.calendar.getMonthsInYear(n.focusedDate),u=aa({month:"short",timeZone:n.timeZone}),c=(g,d)=>{const m=n.focusedDate.set({month:g});d?(r("date"),n.setFocusedDate(m)):!d&&typeof i=="function"&&i(m)},p=g=>{const d=n.focusedDate.set({year:g});n.setFocusedDate(d)};return B.jsxs("div",{className:`iru-w-[296px] ${Re["container-calendar"]}`,children:[!o&&B.jsxs("div",{className:Re["header-calendar"],children:[B.jsx(Wo,{isDisabled:n!=null&&n.minValue?n.focusedDate.year<=n.minValue.year:!1,onPress:()=>p(n.focusedDate.year-1),children:typeof e=="function"||N.isValidElement(e)?N.isValidElement(e)?e:e():B.jsx(Xr,{className:"iru-rotate-90"})}),B.jsx("div",{className:`${Re["header-button-calendar"]} ${a.includes("year")?"":Re.disabled}`,onClick:()=>{a.includes("year")&&r("year")},children:n.focusedDate.year}),B.jsx(Wo,{isDisabled:n!=null&&n.maxValue?n.focusedDate.year>=n.maxValue.year:!1,onPress:()=>p(n.focusedDate.year+1),children:typeof t=="function"||N.isValidElement(t)?N.isValidElement(t)?t:t():B.jsx(Xr,{className:"-iru-rotate-90"})})]}),B.jsx("div",{className:Re["month-calendar"],children:[...Array(l).keys()].map(g=>{var C,S,_,E;const d=n.focusedDate.set({month:g+1}),m=u.format(d.toDate(n.timeZone)),b=((C=n.value)==null?void 0:C.year)||((_=(S=n.value)==null?void 0:S.start)==null?void 0:_.year)||s,y=n!=null&&n.minValue?d.month<((E=n==null?void 0:n.minValue)==null?void 0:E.month)&&d.year<=n.minValue.year:!1,f=n!=null&&n.maxValue?d.month>n.maxValue.month&&d.year>=n.maxValue.year:!1,v=y||f;return B.jsx("div",{onClick:()=>{v||c(d.month,a.includes("date"))},className:`${Re["cell-month"]} ${n.focusedDate.month===d.month&&!v&&d.year===b?Re.selected:""} ${n.focusedDate.month!==d.month&&!v?"hover:iru-bg-laba-blue-01":""} ${v?"iru-text-gray-400":"iru-cursor-pointer"}`,children:m},g)})})]})},gO=e=>{const t=wp(e.state.visibleRange.start,e.locale),{gridProps:n,headerProps:r,weekDays:i}=OE({},e.state),{prevButtonProps:a,nextButtonProps:o,title:s}=ME(e,e.state),l=u=>{let c="";switch(u){case 0:c="Min";break;case 1:c="Sen";break;case 2:c="Sel";break;case 3:c="Rab";break;case 4:c="Kam";break;case 5:c="Jum";break;case 6:c="Sab";break}return c};return B.jsxs("div",{children:[!e.hiddenHeader&&B.jsxs("div",{className:Re["header-calendar"],children:[B.jsx(Wo,{...a,children:typeof(e==null?void 0:e.prevIcon)=="function"||N.isValidElement(e==null?void 0:e.prevIcon)?N.isValidElement(e.prevIcon)?e.prevIcon:e.prevIcon():B.jsx(Xr,{className:"iru-rotate-90"})}),B.jsx("div",{className:Re["header-button-calendar"],onClick:()=>e.setActiveTypeCalendar("month"),children:s}),B.jsx(Wo,{...o,children:typeof(e==null?void 0:e.nextIcon)=="function"||N.isValidElement(e==null?void 0:e.nextIcon)?N.isValidElement(e.nextIcon)?e.nextIcon:e.nextIcon():B.jsx(Xr,{className:"-iru-rotate-90"})})]}),B.jsxs("table",{...n,children:[B.jsx("thead",{...r,children:B.jsx("tr",{children:i.map((u,c)=>B.jsx("th",{className:Re["days-calendar"],children:l(c)},c))})}),B.jsx("tbody",{children:[...new Array(t).keys()].map(u=>B.jsx("tr",{children:e.state.getDatesInWeek(u).map((c,p)=>c?B.jsx(ow,{state:e.state,date:c},p):B.jsx("td",{},p))},u))})]})]})},Oc=({minDate:e,maxDate:t,value:n,time:r,hiddenHeader:i,handlerChangeTime:a,timeLabel:o,type:s})=>{const l=e?new Date(e):null,u=t?new Date(t):null,c=l==null?void 0:l.getHours(),p=u==null?void 0:u.getHours(),g=l==null?void 0:l.getMinutes(),d=u==null?void 0:u.getMinutes(),[m,b]=N.useState(!0),y=(S,_,E)=>Array.from({length:(_-S)/E+1},(x,h)=>S+h*E),f=(S,_)=>{typeof a=="function"&&a({hour:S,minut:_,second:r==null?void 0:r.second})},v=()=>{const S=document.getElementById(`calendar-hour-${r==null?void 0:r.hour}-${s}`),_=document.getElementById(`calendar-minut-${r==null?void 0:r.minut}-${s}`),E=document.getElementById(`wrapper-calendar-hour-${s}`),x=document.getElementById(`wrapper-calendar-minut-${s}`);S&&E&&E.scrollTo({behavior:"instant",top:S.offsetTop-78}),_&&x&&x.scrollTo({behavior:"instant",top:_.offsetTop-78})},C=(S,_)=>{let E=!0;if(l&&n){const x=n.year===l.getFullYear(),h=n.month===l.getMonth()+1;n.day===l.getDate()&&h&&x?(_==="hour"&&S<(c??0)||_==="minut"&&((r==null?void 0:r.hour)??0)<=l.getHours()&&S<(g??0))&&(E=!1):n.toDate(jn()).getTime()<l.getTime()&&(E=!1)}if(u&&n){const x=n.year===u.getFullYear(),h=n.month===u.getMonth()+1;n.day===u.getDate()&&h&&x?(_==="hour"&&S>(p??0)||_==="minut"&&((r==null?void 0:r.hour)??0)>=u.getHours()&&S>(d??0))&&(E=!1):n.toDate(jn()).getTime()>u.getTime()&&(E=!1)}return E};return N.useEffect(()=>{m&&v(),r&&b(!1)},[JSON.stringify(n),JSON.stringify(r)]),B.jsxs("div",{className:Re["custom-time-calendar"],children:[!i&&B.jsx("div",{className:Re["header-time"],children:o||"Atur Waktu"}),B.jsxs("div",{className:Re["type-time"],children:[B.jsx("div",{children:"Jam"}),B.jsx("div",{children:"Menit"})]}),B.jsxs("div",{className:"iru-flex iru-justify-around",children:[B.jsx("div",{id:`wrapper-calendar-hour-${s}`,className:Re["container-cell-time"],children:y(0,23,1).map(S=>B.jsx("div",{id:`calendar-hour-${S}-${s}`,className:`${Re["cell-time"]} ${(r==null?void 0:r.hour)===S?C(S,"hour")?Re.selected:Re.error:""} ${C(S,"hour")&&(r==null?void 0:r.hour)!=S?Re.valid:Re.invalid}`,onClick:()=>{C(S,"hour")&&f(S,r==null?void 0:r.minut)},children:S<10?`0${S}`:S},S))}),B.jsx("div",{id:`wrapper-calendar-minut-${s}`,className:Re["container-cell-time"],children:y(0,59,1).map(S=>B.jsx("div",{id:`calendar-minut-${S}-${s}`,className:`${Re["cell-time"]} ${(r==null?void 0:r.minut)===S?C(S,"minut")?Re.selected:Re.error:""} ${C(S,"minut")&&(r==null?void 0:r.minut)!=S?Re.valid:Re.invalid}`,onClick:()=>{C(S,"minut")&&f(r==null?void 0:r.hour,S)},children:S<10?`0${S}`:S},S))})]})]})},$d=e=>{var g,d,m,b,y,f,v,C,S;const t=e.typeTime??"SINGLE",n=ES({...e,locale:e.locale,createCalendar:Nl}),{title:r}=ME(e,n),[i,a]=N.useState((e==null?void 0:e.activeType)??"date"),[o,s]=N.useState({start:void 0,end:void 0}),l=((d=(g=o.start)==null?void 0:g.hour)==null?void 0:d.toString())&&((b=(m=o==null?void 0:o.start)==null?void 0:m.minut)==null?void 0:b.toString())&&((v=e.value)==null?void 0:v.toDate(jn()).setHours((y=o.start)==null?void 0:y.hour,(f=o.start)==null?void 0:f.minut))||e.minDate,u=e.maxDate,c=(_,E)=>{const x={...o,[E]:_};s(x),typeof(e==null?void 0:e.handlerChangeTime)=="function"&&e.handlerChangeTime(x)},p=_=>{n.setValue(_)};return Qi(()=>{e!=null&&e.activeType&&a(e.activeType)},[e==null?void 0:e.activeType]),N.useEffect(()=>{var _,E;if((_=e.time)!=null&&_.start&&((E=e.time)!=null&&E.end)){const x=e.time.start,h=e.time.end;s({start:x,end:h})}},[JSON.stringify(e.time)]),B.jsxs("div",{className:"iru-text-laba-base-sr",children:[i==="date"&&B.jsx(B.Fragment,{children:B.jsxs("div",{className:Re["container-calendar"],children:[B.jsxs("div",{className:"iru-flex iru-gap-2",children:[B.jsx(gO,{state:n,setActiveTypeCalendar:a,...e}),(e==null?void 0:e.isCustomTime)&&B.jsxs("div",{className:"iru-flex",children:[B.jsx(Oc,{minDate:e.minDate,maxDate:e.maxDate,time:(C=e.time)==null?void 0:C.start,value:e.value,timeLabel:t==="RANGE"?"Awal":"Atur Waktu",type:"start",handlerChangeTime:_=>c(_,"start")}),t==="RANGE"&&B.jsx(Oc,{minDate:l,maxDate:u,time:(S=e.time)==null?void 0:S.end,value:e.value,timeLabel:"Akhir",type:"end",handlerChangeTime:_=>c(_,"end")})]})]}),((e==null?void 0:e.withConfirm)??(e==null?void 0:e.isCustomTime))&&B.jsxs("div",{className:`${Re["footer-calendar"]}`,children:[typeof(e==null?void 0:e.buttonReset)=="function"?B.jsx("div",{onClick:()=>e.handlerReset(n),children:e.buttonReset()}):B.jsx(Pn,{variants:"nude-laba-blue-10",size:"small",onClick:()=>e.handlerReset(n),children:"Reset"}),typeof(e==null?void 0:e.buttonSubmit)=="function"?B.jsx("div",{onClick:e.handlerSubmit,children:e.buttonSubmit()}):B.jsx(Pn,{size:"small",onClick:e.handlerSubmit,children:"Terapkan"})]})]})}),i==="month"&&B.jsx(sw,{state:n,setActiveTypeCalendar:a,type:e.type,onChangeMonth:p,hiddenHeader:e.hiddenHeader}),i==="year"&&B.jsx(l4,{state:n,type:e.type,setActiveTypeCalendar:a,title:r,onChangeYear:p,hiddenHeader:e.hiddenHeader})]})},pO=e=>{var S,_,E,x,h,w,D,I,T,F,P,k;const t=N.useRef(null),{locale:n}=_r(),r=oO({...e,locale:n,createCalendar:Nl}),i=R=>{let M="";switch(R){case 0:M="Min";break;case 1:M="Sen";break;case 2:M="Sel";break;case 3:M="Rab";break;case 4:M="Kam";break;case 5:M="Jum";break;case 6:M="Sab";break}return M},{calendarProps:a,prevButtonProps:o,nextButtonProps:s,title:l}=UM(e,r,t),{gridProps:u,headerProps:c,weekDays:p}=OE({},r),g=wp(r.visibleRange.start,n),[d,m]=N.useState("date"),[b,y]=N.useState({start:void 0,end:void 0}),f=((_=(S=b.start)==null?void 0:S.hour)==null?void 0:_.toString())&&((x=(E=b==null?void 0:b.start)==null?void 0:E.minut)==null?void 0:x.toString())&&((I=(h=e.value)==null?void 0:h.start)==null?void 0:I.toDate(jn()).setHours((w=b.start)==null?void 0:w.hour,(D=b.start)==null?void 0:D.minut))||e.minDate,v=e.maxDate,C=(R,M)=>{const O={...b,[M]:R};y(O),typeof(e==null?void 0:e.handlerChangeTimeRange)=="function"&&e.handlerChangeTimeRange(O)};return N.useEffect(()=>{var R,M;if((R=e.time)!=null&&R.start&&((M=e.time)!=null&&M.end)){const O=e.time.start,z=e.time.end;y({start:O,end:z})}},[JSON.stringify(e.time)]),B.jsxs("div",{className:"iru-text-laba-base-sr",children:[d==="date"&&B.jsx(B.Fragment,{children:B.jsx("div",{...a,ref:t,children:B.jsxs("div",{className:Re["container-calendar"],children:[B.jsxs("div",{className:"iru-flex iru-gap-2",children:[B.jsxs("div",{children:[B.jsxs("div",{className:Re["header-calendar"],children:[B.jsx(Wo,{...o,children:typeof(e==null?void 0:e.prevIcon)=="function"||N.isValidElement(e==null?void 0:e.prevIcon)?N.isValidElement(e.prevIcon)?e.prevIcon:e.prevIcon():B.jsx(Xr,{className:"iru-rotate-90"})}),B.jsx("div",{className:Re["header-button-calendar"],onClick:()=>m("month"),children:l}),B.jsx(Wo,{...s,children:typeof(e==null?void 0:e.nextIcon)=="function"||N.isValidElement(e==null?void 0:e.nextIcon)?N.isValidElement(e.nextIcon)?e.nextIcon:e.nextIcon():B.jsx(Xr,{className:"-iru-rotate-90"})})]}),B.jsxs("table",{...u,cellPadding:"0",className:"flex-1",children:[B.jsx("thead",{...c,className:"text-gray-600",children:B.jsx("tr",{children:p.map((R,M)=>B.jsx("th",{className:Re["days-calendar"],children:i(M)},M))})}),B.jsx("tbody",{children:[...new Array(g).keys()].map(R=>B.jsx("tr",{children:r.getDatesInWeek(R).map((M,O)=>M?B.jsx(ow,{state:r,date:M},O):B.jsx("td",{},O))},R))})]})]}),(e==null?void 0:e.isCustomTime)&&B.jsxs("div",{className:"iru-flex",children:[B.jsx(Oc,{minDate:e.minDate,maxDate:e.maxDate,time:(T=e.time)==null?void 0:T.start,value:(F=e.value)==null?void 0:F.start,timeLabel:"Awal",type:"start",handlerChangeTime:R=>C(R,"start")}),B.jsx(Oc,{minDate:f,maxDate:v,time:(P=e.time)==null?void 0:P.end,value:(k=e.value)==null?void 0:k.end,timeLabel:"Akhir",type:"end",handlerChangeTime:R=>C(R,"end")})]})]}),e.withConfirm&&B.jsxs("div",{className:Re["footer-calendar"],children:[typeof(e==null?void 0:e.buttonReset)=="function"?B.jsx("div",{onClick:()=>e.handlerReset(r),children:e.buttonReset()}):B.jsx(Pn,{variants:"nude-laba-blue-10",size:"small",onClick:()=>e.handlerReset(r),children:"Reset"}),typeof(e==null?void 0:e.buttonSubmit)=="function"?B.jsx("div",{onClick:e.handlerSubmit,children:e.buttonSubmit()}):B.jsx(Pn,{size:"small",onClick:e.handlerSubmit,children:"Terapkan"})]})]})})}),d==="month"&&B.jsx(sw,{state:r,setActiveTypeCalendar:m,type:["date","month","year"]}),d==="year"&&B.jsx(l4,{state:r,setActiveTypeCalendar:m,title:l,type:["date","month","year"]})]})},lw=e=>{const t=hO(e),n=N.useRef(null),{calendarProps:r}=aO(e,t,n);return B.jsx("div",{ref:n,children:B.jsx(pO,{handlerReset:e.handlerReset,handlerSubmit:e.handlerSubmit,withConfirm:e.withConfirm,prevIcon:e.prevIcon,nextIcon:e.nextIcon,buttonReset:e.buttonReset,buttonSubmit:e.buttonSubmit,isCustomTime:e.isCustomTime,time:e.time,minDate:e.minDate,maxDate:e.maxDate,handlerChangeTimeRange:e.handlerChangeTimeRange,...r})})},mu=e=>{let t;const n=new Date(e??new Date);return e&&(t=Bp(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),t},mO=e=>{const{minDate:t,maxDate:n,value:r,defaultValue:i,withConfirm:a=!1,isCustomTime:o=!1,className:s,classNameButton:l,buttonClick:u,buttonReset:c,buttonSubmit:p,prevIcon:g,nextIcon:d,onChange:m,id:b="date-picker",idPopover:y="date-picker-popover",floatingOptions:f={},offsetPopover:v=5,zIndexPopper:C=1,hiddenHeader:S}=e,_=aa(),{locale:E}=_r(),x=mu(t),h=mu(n),w=N.useRef(null),[D,I]=N.useState(),[T,F]=N.useState(),P=z=>{var ee;const G=new Date;let U=z.toDate(jn());U.setHours(G.getHours(),G.getMinutes(),G.getSeconds());const J=t?new Date(t):null,Q=n?new Date(n):null;if(o){if(U=new Date(new Date(U).setHours((T==null?void 0:T.hour)??0,T==null?void 0:T.minut,T==null?void 0:T.second)),J&&(J==null?void 0:J.toDateString())===new Date(U).toDateString()&&(J==null?void 0:J.toTimeString())>=(U==null?void 0:U.toTimeString())){if(J&&(J.getHours()>U.getHours()||J.getHours()===U.getHours()&&J.getMinutes()>U.getMinutes()))return;U=new Date(J.setSeconds(J.getSeconds()+1))}if(Q&&(Q==null?void 0:Q.toDateString())===new Date(U).toDateString()&&(Q==null?void 0:Q.toTimeString())<(U==null?void 0:U.toTimeString())){if(Q&&(Q.getHours()<U.getHours()||Q.getHours()===U.getHours()&&Q.getMinutes()<U.getMinutes()))return;U=new Date(Q.setSeconds(Q.getSeconds()-1))}}else J&&_.format(U)===_.format(J)&&J.getTime()>=U.getTime()?U=new Date(J.setSeconds(J.getSeconds()+1)):Q&&_.format(U)===_.format(Q)&&Q.getTime()<=U.getTime()&&(U=new Date(Q.setSeconds(Q.getSeconds()-1)));typeof m=="function"&&(m(U),(ee=w.current)==null||ee.setShow(!1))},k=(z,G)=>{I(z),(G??(!a&&!o))&&P(z)},R=z=>{const{start:G}=z;F(G)},M=z=>{const G=new Date(r??new Date);F({hour:G.getHours(),minut:G.getMinutes(),second:G.getSeconds()}),I(mu(r))},O=()=>{D&&k(D,!0)};return B.jsxs(B.Fragment,{children:[B.jsx("div",{id:b,onClick:z=>{var G;(G=w.current)==null||G.handlerShow(z),M()},className:l,children:typeof u=="function"?u(r):r?new Date(r).toDateString():"Pilih Tanggal"}),B.jsx(ei,{zIndex:C,ref:w,offset:v,id:y,floatingOptions:{placement:"bottom-end",...f},children:B.jsx("div",{className:s??"",children:B.jsx(Yp,{locale:"id-ID",children:B.jsx($d,{minValue:x,maxValue:h,minDate:t,maxDate:n,time:{start:T},locale:E,value:D,typeTime:"SINGLE",buttonReset:c,buttonSubmit:p,prevIcon:g,nextIcon:d,createCalendar:Nl,defaultValue:mu(r),onChange:k,handlerReset:()=>{var z;typeof m=="function"&&(m(i),(z=w.current)==null||z.setShow(!1))},handlerSubmit:O,handlerChangeTime:R,withConfirm:a,isCustomTime:o,type:["date","month","year"],hiddenHeader:S})})})})]})},wh=e=>{let t;const n=new Date(e??new Date);return e&&(t=Bp(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),t},Yv=e=>{const t=new Date((e==null?void 0:e.startDate)??new Date),n=new Date((e==null?void 0:e.endDate)??new Date),r=new Dt(t.getFullYear(),t.getMonth()+1,t.getDate()),i=new Dt(n.getFullYear(),n.getMonth()+1,n.getDate());return e?{start:r,end:i}:void 0},uw=e=>{const{minDate:t,maxDate:n,defaultValue:r,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,typePicker:u="RANGE",onChange:c,value:p,onReset:g,isCustomTime:d}=e,{locale:m}=_r(),b=wh(t),y=wh(n),[f,v]=N.useState(),[C,S]=N.useState({start:void 0,end:void 0}),_=D=>{typeof c=="function"&&c(D)},E=(D,I)=>{const T=D.start.toDate(jn()),F=D.end.toDate(jn());v(D),S({start:{hour:0,minut:0,second:0},end:{hour:23,minut:59,second:59}}),(I??!i)&&_({startDate:T,endDate:new Date(F.setHours(23,59,59))})},x=(D,I)=>{var T,F,P,k,R,M,O,z;if(f!=null&&f.start&&(f!=null&&f.end)&&(S(D),(F=(T=D.start)==null?void 0:T.hour)!=null&&F.toString()&&((k=(P=D.start)==null?void 0:P.minut)!=null&&k.toString())&&((M=(R=D.end)==null?void 0:R.hour)!=null&&M.toString())&&((z=(O=D.end)==null?void 0:O.minut)!=null&&z.toString())&&(I??!i))){const G=f.start.toDate(jn()),U=f.end.toDate(jn()),J=new Date(G.setHours(D.start.hour,D.start.minut)),Q=new Date(U.setHours(D.end.hour,D.end.minut,59));J.getTime()<Q.getTime()&&_({startDate:J,endDate:Q})}},h=D=>{if(typeof g=="function")g();else if(r&&D){const I=new Date(r.endDate??new Date),T=D.focusedDate.set({month:I.getMonth()+1,year:I.getFullYear()});D.setFocusedDate(T)}v(Yv(r))},w=()=>{f&&(d?x(C,!0):E(f,!0))};return N.useEffect(()=>{if(p!=null&&p.endDate&&(p!=null&&p.startDate)){const D=new Date(p.startDate),I=new Date(p.endDate),T=D.getHours(),F=D.getMinutes(),P=I.getHours(),k=I.getMinutes(),R=_n(lv(D,jn())),M=_n(lv(I,jn()));v({start:R,end:M}),S({start:{hour:T,minut:F},end:{hour:P,minut:k}})}},[JSON.stringify(p)]),B.jsx("div",{className:"iru-flex iru-flex-col",children:B.jsxs(Yp,{locale:"id-ID",children:[u==="RANGE"&&B.jsx(lw,{defaultValue:Yv(r),value:f,minValue:b,maxValue:y,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,onChange:D=>E(D),isCustomTime:d,handlerReset:h,handlerSubmit:w,time:C,minDate:t,maxDate:n,handlerChangeTimeRange:x}),u==="SINGLE"&&B.jsx($d,{defaultValue:wh(r==null?void 0:r.endDate),value:f==null?void 0:f.end,minValue:b,maxValue:y,minDate:t,maxDate:n,withConfirm:i,prevIcon:a,nextIcon:o,buttonReset:s,buttonSubmit:l,locale:m,time:C,typeTime:"RANGE",handlerChangeTime:x,isCustomTime:d,createCalendar:Nl,onChange:D=>E({start:D,end:D}),handlerReset:h,handlerSubmit:w,type:["date","month","year"]})]})})},bO=({value:e,prevIcon:t,nextIcon:n,buttonReset:r,buttonSubmit:i,className:a,classNameButton:o,buttonClick:s,buttonList:l,typePicker:u="RANGE",onChange:c,idPopover:p="filter-date-popover",id:g="filter-date",floatingOptions:d={},offsetPopover:m=5,zIndexPopper:b=0,defaultValueLabel:y,isCustomTime:f=!1,mountedExecuteChange:v=!0,formatingDate:C})=>{const S=[{key:"thisDay",value:"Hari ini"},{key:"thisWeek",value:"Minggu ini"},{key:"thisMonth",value:"Bulan ini"},{key:"thisYear",value:"Tahun ini"},{key:"yesterday",value:"Kemarin"},{key:"lastWeek",value:"Minggu lalu"},{key:"lastMonth",value:"Bulan lalu"},{key:"lastYear",value:"Tahun lalu"},{key:"custom",value:"Kustom"}],_=N.useRef(null),[E,x]=N.useState(),[h,w]=N.useState(),[D,I]=N.useState(),T=(q,Z)=>{const se=new Date(q??new Date);return Z==="start"?new Date(se.setHours(0,0,0)):new Date(se.setHours(23,59,59))},F=()=>{const q=new Date;return{startDate:q,endDate:q}},P=()=>{const q=new Date;q.setDate(q.getDate()-q.getDay());const Z=new Date;return Z.setDate(Z.getDate()+(6-Z.getDay())),{startDate:q,endDate:Z}},k=()=>{const q=new Date,Z=new Date(q.getFullYear(),q.getMonth(),1),se=new Date(q.getFullYear(),q.getMonth()+1,0);return{startDate:Z,endDate:se}},R=()=>{const q=new Date(new Date().getFullYear(),0,1),Z=new Date(new Date().getFullYear(),11,31);return{startDate:q,endDate:Z}},M=()=>{const q=new Date(new Date().setDate(new Date().getDate()-1));return{startDate:q,endDate:q}},O=()=>{const q=new Date;q.setDate(q.getDate()-(7+q.getDay()));const Z=new Date;return Z.setDate(Z.getDate()-(Z.getDay()+1)),{startDate:q,endDate:Z}},z=()=>{const q=new Date,Z=new Date(q.getFullYear(),q.getMonth()-1,1),se=new Date(q.getFullYear(),q.getMonth(),0);return{startDate:Z,endDate:se}},G=()=>{const q=new Date(new Date().getFullYear()-1,0,1),Z=new Date(new Date().getFullYear()-1,11,31);return{startDate:q,endDate:Z}},U=(q,Z,se)=>{var te;if(I(q),typeof c=="function"){let $=q;C==="string"&&q?$={startDate:yo(q.startDate,C),endDate:yo(q.endDate,C)}:typeof C=="boolean"&&q&&($={startDate:yo(q.startDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),endDate:yo(q.endDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")}),(te=_.current)==null||te.setShow(!1),c($,Z??"",se)}},J=(q,Z)=>{x(q);let se;if((q==null?void 0:q.key)!=="custom"){switch(w(q),q==null?void 0:q.key){case"thisDay":se=F();break;case"thisWeek":se=P();break;case"thisMonth":se=k();break;case"thisYear":se=R();break;case"yesterday":se=M();break;case"lastWeek":se=O();break;case"lastMonth":se=z();break;case"lastYear":se=G();break}se&&Z&&U({startDate:T(se.startDate,"start"),endDate:T(se.endDate,"end")},q==null?void 0:q.value,q)}},Q=(q,Z)=>{const se=(l??S).find(te=>te.key===q);!q&&!se?(Z&&U(),J(void 0,Z),w(void 0)):typeof q=="object"?(Z&&U({startDate:T(q.startDate,"start"),endDate:T(q.endDate,"end")},"Kustom",{key:"custom",value:"Kustom"}),J({key:"custom",value:"Kustom"},Z),w({key:"custom",value:"Kustom"})):(J(se,Z),w(se))},ee=()=>{var q;if(e){I(e);const Z=(q=l??S)==null?void 0:q.find(se=>se.key===e.label||se.value===e.label);Object.keys(Z||{}).length>0&&x(Z)}else x(void 0),w(void 0)};return N.useEffect(()=>{ee()},[JSON.stringify(e)]),N.useEffect(()=>{Q(y??e,v)},[]),B.jsxs(B.Fragment,{children:[B.jsxs("div",{onClick:q=>{var Z;(Z=_.current)==null||Z.handlerShow(q),ee()},className:o,id:g,children:[N.isValidElement(s)&&s,typeof s=="function"?s(D,h):"Pilih Filter"]}),B.jsx(ei,{zIndex:b,ref:_,offset:m,id:p,floatingOptions:{placement:"bottom-end",...d},children:B.jsxs("div",{className:`${Re["container-filter-date"]} ${a}`,children:[B.jsxs("div",{children:[(l??S).map((q,Z)=>B.jsx("div",{className:`${Re["button-filter-date"]} hover:iru-bg-laba-blue-01 ${(E==null?void 0:E.key)===q.key?"iru-text-laba-blue-10":""}`,onClick:()=>J(q,!0),children:q.value},Z)),(E==null?void 0:E.key)!=="custom"&&B.jsx(B.Fragment,{children:typeof r=="function"?B.jsx("div",{className:Re["button-filter-date-custome"],onClick:()=>Q(y,!0),children:r()}):B.jsx(Pn,{className:Re["button-reset-filter-date"],variants:"nude-laba-blue-10",size:"small",onClick:()=>Q(y,!0),children:"Reset"})})]}),(E==null?void 0:E.key)==="custom"&&B.jsx("div",{children:B.jsx(uw,{defaultValue:D,value:D,prevIcon:t,nextIcon:n,buttonReset:r,buttonSubmit:i,isCustomTime:f,onChange:q=>{U(q,"Kustom",{key:"custom",value:"Kustom"}),w({key:"custom",value:"Kustom"})},onReset:()=>{Q(y,!0)},typePicker:u,withConfirm:!0})})]})})]})},vO="_active_jzs63_65",yO="_disabled_jzs63_68",Vt={"title-switch-laba":"_title-switch-laba_jzs63_1","title-switch-payhere":"_title-switch-payhere_jzs63_10","title-switch-bill":"_title-switch-bill_jzs63_19","description-switch-laba":"_description-switch-laba_jzs63_28","description-switch-payhere":"_description-switch-payhere_jzs63_37","description-switch-bill":"_description-switch-bill_jzs63_46","switch-l":"_switch-l_jzs63_55","switch-payhere":"_switch-payhere_jzs63_55",active:vO,disabled:yO,"disabled-nonactive":"_disabled-nonactive_jzs63_71","thumb-switch":"_thumb-switch_jzs63_79","switch-laba":"_switch-laba_jzs63_96","switch-bill":"_switch-bill_jzs63_137","switch-r":"_switch-r_jzs63_179","switch-s":"_switch-s_jzs63_303"},bu={size:{large:Vt["switch-l"],regular:Vt["switch-r"],small:Vt["switch-s"]},kind:{laba:Vt["switch-laba"],payhere:Vt["switch-payhere"],bill:Vt["switch-bill"]},text:{title:{laba:Vt["title-switch-laba"],payhere:Vt["title-switch-payhere"],bill:Vt["title-switch-bill"]},desc:{laba:Vt["description-switch-laba"],payhere:Vt["description-switch-payhere"],bill:Vt["description-switch-bill"]}}},xO=({value:e,disabled:t,title:n="",description:r="",size:i="regular",kind:a="payhere",id:o,className:s,classNameTitle:l,classNameDesc:u,onChange:c})=>{const p=()=>{!t&&typeof c=="function"&&c(!e)};return B.jsxs("div",{className:`iru-flex iru-gap-2 ${s??""}`,onClick:g=>g.stopPropagation(),children:[B.jsxs("label",{children:[B.jsx("input",{id:o??"1ru-switch",type:"checkbox",checked:e,onChange:p,className:"iru-hidden"}),B.jsx("span",{className:`${bu.size[i]} ${bu.kind[a]} ${e?Vt.active:""} ${t?Vt.disabled:""} ${!e&&t?Vt["disabled-nonactive"]:""}`,children:B.jsx("span",{className:`${Vt["thumb-switch"]} ${e?Vt.active:""} ${t?Vt.disabled:""} ${!e&&t?Vt["disabled-nonactive"]:""}`})})]}),(n||r)&&B.jsxs("div",{children:[n&&B.jsx("div",{className:`${bu.text.title[a]} ${l}`,children:n}),r&&B.jsx("div",{className:`${bu.text.desc[a]} ${u}`,children:r})]})]})},CO="_loading_14f86_14",Pe={"button-bill-xxs":"_button-bill-xxs_14f86_6","button-bill-xs":"_button-bill-xs_14f86_6","button-bill-s":"_button-bill-s_14f86_6","button-bill-m":"_button-bill-m_14f86_6","button-bill-l":"_button-bill-l_14f86_6","button-xs":"_button-xs_14f86_6","button-s":"_button-s_14f86_6","button-m":"_button-m_14f86_6","button-l":"_button-l_14f86_6","button-extra-small":"_button-extra-small_14f86_6","button-small":"_button-small_14f86_6","button-reguler":"_button-reguler_14f86_6","button-large":"_button-large_14f86_6",loading:CO,"nude-laba-red-05":"_nude-laba-red-05_14f86_29","nude-laba-red-10":"_nude-laba-red-10_14f86_29","nude-gray-500":"_nude-gray-500_14f86_29","nude-green-700":"_nude-green-700_14f86_29","nude-red-700":"_nude-red-700_14f86_29","nude-laba-blue-10":"_nude-laba-blue-10_14f86_29","ghost-laba-green-10":"_ghost-laba-green-10_14f86_29","ghost-blue-gray-100-bg_white":"_ghost-blue-gray-100-bg_white_14f86_29","ghost-green-700":"_ghost-green-700_14f86_29","ghost-red-700":"_ghost-red-700_14f86_29","ghost-laba-blue-10":"_ghost-laba-blue-10_14f86_29","filled-laba-white_laba-red-05":"_filled-laba-white_laba-red-05_14f86_29","filled-laba-white_laba-blue-10":"_filled-laba-white_laba-blue-10_14f86_29","primary-green-700-dsb_laba-grey-06":"_primary-green-700-dsb_laba-grey-06_14f86_29","primary-red-700-dsb_laba-grey-06":"_primary-red-700-dsb_laba-grey-06_14f86_29","primary-laba-blue-10":"_primary-laba-blue-10_14f86_29","primary-bill-red-700":"_primary-bill-red-700_14f86_29","tertiary-bill-secondary-800":"_tertiary-bill-secondary-800_14f86_29","secondary-bill-secondary-800":"_secondary-bill-secondary-800_14f86_29","primary-bill-primary-600":"_primary-bill-primary-600_14f86_29","tertiary-gray-500":"_tertiary-gray-500_14f86_29","tertiary-red-600":"_tertiary-red-600_14f86_29","tertiary-red-300":"_tertiary-red-300_14f86_29","tertiary-blue-700":"_tertiary-blue-700_14f86_29","secondary-green-600":"_secondary-green-600_14f86_29","secondary-red-700":"_secondary-red-700_14f86_29","secondary-red-600":"_secondary-red-600_14f86_29","secondary-blue-700":"_secondary-blue-700_14f86_29","primary-red-700":"_primary-red-700_14f86_29","primary-blue-700":"_primary-blue-700_14f86_29","icon-loading":"_icon-loading_14f86_192"},_h={size:{large:Pe["button-large"],reguler:Pe["button-reguler"],small:Pe["button-small"],"extra-small":Pe["button-extra-small"],l:Pe["button-l"],m:Pe["button-m"],s:Pe["button-s"],xs:Pe["button-xs"],"bill-l":Pe["button-bill-l"],"bill-m":Pe["button-bill-m"],"bill-s":Pe["button-bill-s"],"bill-xs":Pe["button-bill-xs"],"bill-xxs":Pe["button-bill-xxs"]},loadingSize:{large:"iru-size-6",reguler:"iru-size-5",small:"iru-size-5","extra-small":"iru-size-5",l:"iru-size-6",m:"iru-size-5",s:"iru-size-5",xs:"iru-size-5","bill-l":"iru-size-6","bill-m":"iru-size-5","bill-s":"iru-size-5","bill-xs":"iru-size-5","bill-xxs":"iru-size-5"},variants:{"primary-laba-blue-10":Pe["primary-laba-blue-10"],"primary-red-700-dsb_laba-grey-06":Pe["primary-red-700-dsb_laba-grey-06"],"primary-green-700-dsb_laba-grey-06":Pe["primary-green-700-dsb_laba-grey-06"],"filled-laba-white_laba-blue-10":Pe["filled-laba-white_laba-blue-10"],"filled-laba-white_laba-red-05":Pe["filled-laba-white_laba-red-05"],"ghost-laba-blue-10":Pe["ghost-laba-blue-10"],"ghost-red-700":Pe["ghost-red-700"],"ghost-green-700":Pe["ghost-green-700"],"ghost-laba-green-10":Pe["ghost-laba-green-10"],"nude-laba-blue-10":Pe["nude-laba-blue-10"],"nude-red-700":Pe["nude-red-700"],"nude-green-700":Pe["nude-green-700"],"nude-gray-500":Pe["nude-gray-500"],"primary-blue-700":Pe["primary-blue-700"],"secondary-blue-700":Pe["secondary-blue-700"],"tertiary-blue-700":Pe["tertiary-blue-700"],"ghost-blue-gray-100-bg_white":Pe["ghost-blue-gray-100-bg_white"],"secondary-red-600":Pe["secondary-red-600"],"tertiary-red-300":Pe["tertiary-red-300"],"tertiary-gray-500":Pe["tertiary-gray-500"],"tertiary-red-600":Pe["tertiary-red-600"],"secondary-green-600":Pe["secondary-green-600"],"nude-laba-red-10":Pe["nude-laba-red-10"],"nude-laba-red-05":Pe["nude-laba-red-05"],"primary-red-700":Pe["primary-red-700"],"secondary-red-700":Pe["secondary-red-700"],"primary-bill-primary-600":Pe["primary-bill-primary-600"],"secondary-bill-secondary-800":Pe["secondary-bill-secondary-800"],"tertiary-bill-secondary-800":Pe["tertiary-bill-secondary-800"],"primary-bill-red-700":Pe["primary-bill-red-700"]}},EO=({className:e=""})=>B.jsx("svg",{className:`${Pe["icon-loading"]} ${e??""}`,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:B.jsx("path",{d:`M21.6311 6.63315C22.3017 6.23898 22.5321 5.36957 22.0621 4.7497C20.7187 2.9779 18.9029 1.6063 \r
|
|
116
|
-
16.8106 0.800956C14.2782 -0.173807 11.4901 -0.261467 8.90143 0.552281C6.31275 1.36603 4.07629 \r
|
|
117
|
-
3.03314 2.55704 5.28155C1.0378 7.52995 0.325454 10.2269 0.536268 12.9323C0.747083 15.6376 1.86861 \r
|
|
118
|
-
18.1917 3.71782 20.1776C5.56702 22.1635 8.03473 23.4641 10.7182 23.867C13.4017 24.2699 16.1425 23.7514 \r
|
|
119
|
-
18.4934 22.3961C20.4357 21.2764 22.0171 19.64 23.0698 17.6815C23.4381 16.9963 23.0758 16.1731 \r
|
|
120
|
-
22.3522 15.8876C21.6286 15.6021 20.8195 15.9647 20.4268 16.6361C19.6248 18.0072 18.4764 19.1543 \r
|
|
121
|
-
17.0864 19.9556C15.2874 20.9927 13.19 21.3895 11.1365 21.0812C9.08296 20.7728 7.19456 19.7776 \r
|
|
122
|
-
5.77946 18.2579C4.36436 16.7382 3.50612 14.7837 3.34479 12.7134C3.18346 10.6431 3.72858 \r
|
|
123
|
-
8.57931 4.89118 6.85872C6.05378 5.13813 7.76522 3.86239 9.7462 3.23967C11.7272 2.61695 13.8607 \r
|
|
124
|
-
2.68403 15.7987 3.42996C17.296 4.0063 18.6083 4.96159 19.6129 6.19191C20.1049 \r
|
|
125
|
-
6.79445 20.9604 7.02733 21.6311 6.63315Z`,fill:"currentColor"})}),cw=N.forwardRef((e,t)=>{const{size:n="reguler",variants:r="primary-laba-blue-10",children:i,className:a,classNameIconLoading:o,loading:s,onClick:l,type:u="button",disabled:c,...p}=e;return B.jsxs("button",{onClick:s?void 0:l,ref:t,className:`${_h.size[n]} ${_h.variants[r]}
|
|
126
|
-
${s?Pe.loading:""} ${a??""}`,type:u,disabled:c??s,...p,children:[s&&B.jsx(EO,{className:`${_h.loadingSize[n]} ${o}`}),i]})});cw.displayName="ButtonIcon";const Ge={"outline-laba-red-06":"_outline-laba-red-06_1ydit_1","outline-laba-green-06":"_outline-laba-green-06_1ydit_1","outline-laba-orange-06-bg_laba-orange-01":"_outline-laba-orange-06-bg_laba-orange-01_1ydit_1","outline-laba-orange-06":"_outline-laba-orange-06_1ydit_1","outline-laba-blue-01":"_outline-laba-blue-01_1ydit_1","outline-amber-800":"_outline-amber-800_1ydit_1","outline-blue-600":"_outline-blue-600_1ydit_1","outline-red-500":"_outline-red-500_1ydit_1","outline-green-600":"_outline-green-600_1ydit_1","outline-gray-600":"_outline-gray-600_1ydit_1","ghost-laba-red-01":"_ghost-laba-red-01_1ydit_1","ghost-laba-grey-05":"_ghost-laba-grey-05_1ydit_1","ghost-laba-blue-01":"_ghost-laba-blue-01_1ydit_1","ghost-laba-blue-02":"_ghost-laba-blue-02_1ydit_1","ghost-laba-green-02":"_ghost-laba-green-02_1ydit_1","ghost-laba-green-01":"_ghost-laba-green-01_1ydit_1","ghost-laba-orange-01":"_ghost-laba-orange-01_1ydit_1","ghost-amber-100":"_ghost-amber-100_1ydit_1","ghost-blue-100":"_ghost-blue-100_1ydit_1","ghost-red-100":"_ghost-red-100_1ydit_1","ghost-green-100":"_ghost-green-100_1ydit_1","ghost-gray-200":"_ghost-gray-200_1ydit_1","filled-cyan-800-bg_cyan-100":"_filled-cyan-800-bg_cyan-100_1ydit_1","filled-laba-green-10":"_filled-laba-green-10_1ydit_1","filled-blue-gray-50":"_filled-blue-gray-50_1ydit_1","filled-green-50":"_filled-green-50_1ydit_1","filled-red-900":"_filled-red-900_1ydit_1","filled-lime-900-bg_lime-100":"_filled-lime-900-bg_lime-100_1ydit_1","filled-lime-700":"_filled-lime-700_1ydit_1","filled-amber-800":"_filled-amber-800_1ydit_1","filled-pink-600":"_filled-pink-600_1ydit_1","filled-blue-600":"_filled-blue-600_1ydit_1","filled-red-500":"_filled-red-500_1ydit_1","filled-green-600":"_filled-green-600_1ydit_1","filled-gray-600":"_filled-gray-600_1ydit_1"},ll={"payhere-h1":"iru-text-payhere-h1","payhere-h2":"iru-text-payhere-h2","payhere-h3":"iru-text-payhere-h3","payhere-h4":"iru-text-payhere-h4","payhere-h5":"iru-text-payhere-h5","payhere-h6":"iru-text-payhere-h6","payhere-body-lr":"iru-text-payhere-body-lr","payhere-body-lm":"iru-text-payhere-body-lm","payhere-body-ls":"iru-text-payhere-body-ls","payhere-body-lb":"iru-text-payhere-body-lb","payhere-body-mr":"iru-text-payhere-body-mr","payhere-body-mm":"iru-text-payhere-body-mm","payhere-body-ms":"iru-text-payhere-body-ms","payhere-body-mb":"iru-text-payhere-body-mb","payhere-label-r":"iru-text-payhere-label-r","payhere-label-m":"iru-text-payhere-label-m","payhere-label-sb":"iru-text-payhere-label-sb","payhere-label-b":"iru-text-payhere-label-b","payhere-body-sr":"iru-text-payhere-body-sr","payhere-body-sm":"iru-text-payhere-body-sm","payhere-body-smb":"iru-text-payhere-body-smb","payhere-body-sb":"iru-text-payhere-body-sb","payhere-body-esr":"iru-text-payhere-body-esr","payhere-body-esm":"iru-text-payhere-body-esm","payhere-body-esmb":"iru-text-payhere-body-esmb","payhere-body-esb":"iru-text-payhere-body-esb","laba-title-lb":"iru-text-laba-title-lb","laba-title-ls":"iru-text-laba-title-ls","laba-title-lr":"iru-text-laba-title-lr","laba-title-mb":"iru-text-laba-title-mb","laba-title-ms":"iru-text-laba-title-ms","laba-title-mr":"iru-text-laba-title-mr","laba-h1":"iru-text-laba-h1","laba-h1-b":"iru-text-laba-h1-b","laba-h1-sb":"iru-text-laba-h1-sb","laba-h1-r":"iru-text-laba-h1-r","laba-h2":"iru-text-laba-h2","laba-h2-b":"iru-text-laba-h2-b","laba-h2-sb":"iru-text-laba-h2-sb","laba-h2-r":"iru-text-laba-h2-r","laba-base-rb":"iru-text-laba-base-rb","laba-base-rs":"iru-text-laba-base-rs","laba-base-rr":"iru-text-laba-base-rr","laba-base-sb":"iru-text-laba-base-sb","laba-base-ss":"iru-text-laba-base-ss","laba-base-sr":"iru-text-laba-base-sr","laba-subtitle-rb":"iru-text-laba-subtitle-rb","laba-subtitle-rs":"iru-text-laba-subtitle-rs","laba-subtitle-rr":"iru-text-laba-subtitle-rr","laba-subtitle-sb":"iru-text-laba-subtitle-sb","laba-subtitle-ss":"iru-text-laba-subtitle-ss","laba-subtitle-sr":"iru-text-laba-subtitle-sr","bill-h1":"iru-text-bill-h1","bill-h2":"iru-text-bill-h2","bill-h3":"iru-text-bill-h3","bill-h4":"iru-text-bill-h4","bill-h5":"iru-text-bill-h5","bill-h6":"iru-text-bill-h6","bill-body-lr":"iru-text-bill-body-lr","bill-body-lm":"iru-text-bill-body-lm","bill-body-lsm":"iru-text-bill-body-lsm","bill-body-blb":"iru-text-bill-body-blb","bill-body-mr":"iru-text-bill-body-mr","bill-body-mm":"iru-text-bill-body-mm","bill-body-msm":"iru-text-bill-body-msm","bill-body-mb":"iru-text-bill-body-mb","bill-label-r":"iru-text-bill-label-r","bill-label-m":"iru-text-bill-label-m","bill-label-sm":"iru-text-bill-label-sm","bill-label-b":"iru-text-bill-label-b","bill-body-sr":"iru-text-bill-body-sr","bill-body-sm":"iru-text-bill-body-sm","bill-body-ssm":"iru-text-bill-body-ssm","bill-body-sb":"iru-text-bill-body-sb","bill-body-esr":"iru-text-bill-body-esr","bill-body-ems":"iru-text-bill-body-ems","bill-body-essm":"iru-text-bill-body-essm","bill-body-esb":"iru-text-bill-body-esb"},Ih={variants:{"filled-gray-600":Ge["filled-gray-600"],"filled-green-600":Ge["filled-green-600"],"filled-red-500":Ge["filled-red-500"],"filled-blue-600":Ge["filled-blue-600"],"filled-amber-800":Ge["filled-amber-800"],"filled-pink-600":Ge["filled-pink-600"],"filled-lime-700":Ge["filled-lime-700"],"filled-lime-900-bg_lime-100":Ge["filled-lime-900-bg_lime-100"],"filled-red-900":Ge["filled-red-900"],"filled-laba-green-10":Ge["filled-laba-green-10"],"filled-green-50":Ge["filled-green-50"],"filled-blue-gray-50":Ge["filled-blue-gray-50"],"filled-cyan-800-bg_cyan-100":Ge["filled-cyan-800-bg_cyan-100"],"ghost-laba-orange-01":Ge["ghost-laba-orange-01"],"ghost-laba-green-01":Ge["ghost-laba-green-01"],"ghost-laba-green-02":Ge["ghost-laba-green-02"],"ghost-laba-blue-02":Ge["ghost-laba-blue-02"],"ghost-laba-blue-01":Ge["ghost-laba-blue-01"],"ghost-gray-200":Ge["ghost-gray-200"],"ghost-green-100":Ge["ghost-green-100"],"ghost-red-100":Ge["ghost-red-100"],"ghost-blue-100":Ge["ghost-blue-100"],"ghost-amber-100":Ge["ghost-amber-100"],"ghost-laba-grey-05":Ge["ghost-laba-grey-05"],"ghost-laba-red-01":Ge["ghost-laba-red-01"],"outline-gray-600":Ge["outline-gray-600"],"outline-green-600":Ge["outline-green-600"],"outline-red-500":Ge["outline-red-500"],"outline-blue-600":Ge["outline-blue-600"],"outline-amber-800":Ge["outline-amber-800"],"outline-laba-blue-01":Ge["outline-laba-blue-01"],"outline-laba-orange-06":Ge["outline-laba-orange-06"],"outline-laba-orange-06-bg_laba-orange-01":Ge["outline-laba-orange-06-bg_laba-orange-01"],"outline-laba-green-06":Ge["outline-laba-green-06"],"outline-laba-red-06":Ge["outline-laba-red-06"]},fonts:ea,typography:ll},dw=N.forwardRef((e,t)=>{const{className:n,rounded:r="8px",variants:i="filled-gray-600",children:a,fonts:o="inter",typography:s="payhere-body-esm",...l}=e;return B.jsx("span",{className:`${xd[r]} ${Ih.fonts[o]}
|
|
127
|
-
${Ih.variants[i]} ${Ih.typography[s]} ${n??""}`,ref:t,...l,children:a})});dw.displayName="Badges";const ai={"chips-reguler":"_chips-reguler_s2mpn_1","chips-small":"_chips-small_s2mpn_13","chips-l":"_chips-l_s2mpn_25","chips-s":"_chips-s_s2mpn_13","filled-laba-blue-10":"_filled-laba-blue-10_s2mpn_49","filled-blue-gray-100":"_filled-blue-gray-100_s2mpn_54","filled-gray-300":"_filled-gray-300_s2mpn_59","ghost-laba-grey-02":"_ghost-laba-grey-02_s2mpn_64","nude-laba-grey-10":"_nude-laba-grey-10_s2mpn_70"},cs={fonts:ea,size:{reguler:{style:ai["chips-reguler"],typography:"laba-subtitle-rb"},small:{style:ai["chips-small"],typography:"laba-subtitle-sb"},l:{style:ai["chips-l"],typography:"payhere-label-r"},s:{style:ai["chips-s"],typography:"payhere-body-esm"}},typography:ll,variants:{"filled-laba-blue-10":ai["filled-laba-blue-10"],"filled-gray-300":ai["filled-gray-300"],"filled-blue-gray-100":ai["filled-blue-gray-100"],"ghost-laba-grey-02":ai["ghost-laba-grey-02"],"nude-laba-grey-10":ai["nude-laba-grey-10"]}},fw=N.forwardRef((e,t)=>{const{className:n,children:r,fonts:i="inter",size:a="reguler",variants:o="filled-laba-blue-10",icon:s=B.jsx(B.Fragment,{}),removeIcon:l=B.jsx(B.Fragment,{}),typography:u,...c}=e;return B.jsxs("span",{className:`${cs.fonts[i]} ${cs.size[a].style}
|
|
128
|
-
${u?cs.typography[u]:cs.size[a].typography}
|
|
129
|
-
${cs.variants[o]} ${n??""}`,ref:t,...c,children:[typeof s=="function"&&s(),N.isValidElement(s)&&s,r,typeof l=="function"&&l(),N.isValidElement(l)&&l]})});fw.displayName="Chips";const SO="_container_1efq6_1",wO="_label_1efq6_159",_O="_disabled_1efq6_163",Bt={container:SO,"container-input":"_container-input_1efq6_1","input-radio-checkbox-s":"_input-radio-checkbox-s_1efq6_1","input-radio-checkbox-m":"_input-radio-checkbox-m_1efq6_1","input-radio-checkbox-small":"_input-radio-checkbox-small_1efq6_1","input-radio-checkbox-reguler":"_input-radio-checkbox-reguler_1efq6_1","checked-icon":"_checked-icon_1efq6_11","default-disabled-radio":"_default-disabled-radio_1efq6_48","default-disabled-checkbox":"_default-disabled-checkbox_1efq6_58","laba-blue-10":"_laba-blue-10_1efq6_66","laba-blue-10-hv_bg_transparent":"_laba-blue-10-hv_bg_transparent_1efq6_78","blue-700":"_blue-700_1efq6_90","blue-700-hv_bg_transparent":"_blue-700-hv_bg_transparent_1efq6_102","bill-primary-500":"_bill-primary-500_1efq6_114","bill-primary-600-hv_bg_transparent":"_bill-primary-600-hv_bg_transparent_1efq6_126","bill-secondary-800-hv_bg_transparent":"_bill-secondary-800-hv_bg_transparent_1efq6_138",label:wO,disabled:_O},fo={size:{reguler:Bt["input-radio-checkbox-reguler"],small:Bt["input-radio-checkbox-small"],m:Bt["input-radio-checkbox-m"],s:Bt["input-radio-checkbox-s"]},variants:{"laba-blue-10":Bt["laba-blue-10"],"laba-blue-10-hv_bg_transparent":Bt["laba-blue-10-hv_bg_transparent"],"blue-700":Bt["blue-700"],"blue-700-hv_bg_transparent":Bt["blue-700-hv_bg_transparent"],"bill-primary-500":Bt["bill-primary-500"],"bill-primary-600-hv_bg_transparent":Bt["bill-primary-600-hv_bg_transparent"],"bill-secondary-800-hv_bg_transparent":Bt["bill-secondary-800-hv_bg_transparent"]},variantDisableds:{"default-disabled-checkbox":Bt["default-disabled-checkbox"],"default-disabled-radio":Bt["default-disabled-radio"]},borderRadius:xd,typography:ll,fonts:ea},hw=({className:e})=>B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:`iru-h-3.5 iru-w-3.5 iru-text-white ${e??""}`,viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:B.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),gw=({className:e})=>B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:`iru-h-4 iru-w-4 iru-text-blue-700 ${e??""}`,viewBox:"0 0 16 16",fill:"currentColor",children:B.jsx("circle",{"data-name":"ellipse",cx:"8",cy:"8",r:"8"})}),kd=N.forwardRef((e,t)=>{const{variantDisableds:n,classNameContainer:r,classNameLabel:i,classNameCheckedIcon:a,fonts:o="lato",id:s,name:l,borderRadius:u="full",className:c,sizeInput:p="reguler",variants:g="laba-blue-10",type:d="checkbox",checkedIcon:m,label:b,typography:y="payhere-body-mr",classNameContainerCheckedIcon:f,...v}=e,C=()=>n?fo.variantDisableds[n]:d==="checkbox"?Bt["default-disabled-checkbox"]:Bt["default-disabled-radio"];return B.jsxs("div",{className:`${Bt.container} ${r??""}`,children:[B.jsxs("div",{className:Bt["container-input"],children:[B.jsx("input",{id:s??l,type:d,name:l,className:`${fo.size[p]} ${fo.variants[g]}
|
|
130
|
-
${fo.borderRadius[u]} ${C()} ${c??""}`,ref:t,...v}),B.jsx("span",{className:`${Bt["checked-icon"]} ${f??""}`,children:m?B.jsx(B.Fragment,{children:m}):B.jsx(B.Fragment,{children:d==="checkbox"?B.jsx(hw,{className:a}):B.jsx(gw,{className:a})})})]}),b&&B.jsx("label",{className:`${fo.fonts[o]} ${fo.typography[y]}
|
|
131
|
-
${Bt.label} ${v.disabled?Bt.disabled:""} ${i??""}`,htmlFor:s??l,children:b})]})});kd.displayName="RadioCheckbox";const IO="_container_17mpy_1",DO="_disabled_17mpy_11",TO="_label_17mpy_15",AO="_desc_17mpy_18",Hr={container:IO,"bill-secondary-50":"_bill-secondary-50_17mpy_1","laba-blue-01":"_laba-blue-01_17mpy_1","transparent-text_orange-700":"_transparent-text_orange-700_17mpy_1","transparent-text_green-700":"_transparent-text_green-700_17mpy_1","blue-50":"_blue-50_17mpy_1",disabled:DO,label:TO,desc:AO,"same-background":"_same-background_17mpy_21"},oi={borderRadius:xd,typographyLabel:ll,typographyDesc:ll,fonts:ea,variants:{"laba-blue-01":Hr["laba-blue-01"],"blue-50":Hr["blue-50"],"bill-secondary-50":Hr["bill-secondary-50"],"transparent-text_orange-700":Hr["transparent-text_orange-700"],"transparent-text_green-700":Hr["transparent-text_green-700"]}},RO=({radioCheckboxProps:e,name:t,id:n,type:r="checkbox",typographyLabel:i,typographyDesc:a,fonts:o,borderRadius:s="8px",className:l,disabled:u,variants:c,label:p,desc:g,backgroundWithHover:d=!1,...m})=>{const b=()=>o?oi.fonts[o]:r==="checkbox"?oi.fonts.lato:oi.fonts.inter,y=()=>c?oi.variants[c]:r==="checkbox"?oi.variants["laba-blue-01"]:oi.variants["blue-50"];return B.jsxs("label",{className:`${Hr.container} ${d?Hr["same-background"]:""}
|
|
132
|
-
${oi.borderRadius[s]}
|
|
133
|
-
${b()} ${y()} ${u?Hr.disabled:""} ${l??""}`,htmlFor:n??t,children:[B.jsx(kd,{id:n,name:t,type:r,disabled:u,...e,...m}),B.jsxs("div",{children:[B.jsx("p",{className:`${Hr.label}
|
|
134
|
-
${i?`${oi.typographyLabel[i]} custom-typography`:""}`,children:p}),B.jsx("p",{className:`${Hr.desc} ${a?`${oi.typographyDesc[a]} custom-typography`:""}`,children:g})]})]})},BO="_action_1fa41_10",$O="_urls_1fa41_30",kO="_url_1fa41_30",PO="_active_1fa41_48",Aa={"bill-secondary-800":"_bill-secondary-800_1fa41_1","laba-blue-10":"_laba-blue-10_1fa41_1","blue-700":"_blue-700_1fa41_1",action:BO,urls:$O,url:kO,active:PO},Kv={"gap-0":"iru-gap-0","gap-x-0":"iru-gap-x-0","gap-y-0":"iru-gap-y-0","gap-px":"iru-gap-px","gap-x-px":"iru-gap-x-px","gap-y-px":"iru-gap-y-px","gap-0.5":"iru-gap-0.5","gap-x-0.5":"iru-gap-x-0.5","gap-y-0.5":"iru-gap-y-0.5","gap-1":"iru-gap-1","gap-x-1":"iru-gap-x-1","gap-y-1":"iru-gap-y-1","gap-1.5":"iru-gap-1.5","gap-x-1.5":"iru-gap-x-1.5","gap-y-1.5":"iru-gap-y-1.5","gap-2":"iru-gap-2","gap-x-2":"iru-gap-x-2","gap-y-2":"iru-gap-y-2","gap-2.5":"iru-gap-2.5","gap-x-2.5":"iru-gap-x-2.5","gap-y-2.5":"iru-gap-y-2.5","gap-3":"iru-gap-3","gap-x-3":"iru-gap-x-3","gap-y-3":"iru-gap-y-3","gap-3.5":"iru-gap-3.5","gap-x-3.5":"iru-gap-x-3.5","gap-y-3.5":"iru-gap-y-3.5","gap-4":"iru-gap-4","gap-x-4":"iru-gap-x-4","gap-y-4":"iru-gap-y-4","gap-5":"iru-gap-5","gap-x-5":"iru-gap-x-5","gap-y-5":"iru-gap-y-5","gap-6":"iru-gap-6","gap-x-6":"iru-gap-x-6","gap-y-6":"iru-gap-y-6","gap-7":"iru-gap-7","gap-x-7":"iru-gap-x-7","gap-y-7":"iru-gap-y-7","gap-8":"iru-gap-8","gap-x-8":"iru-gap-x-8","gap-y-8":"iru-gap-y-8","gap-9":"iru-gap-9","gap-x-9":"iru-gap-x-9","gap-y-9":"iru-gap-y-9","gap-10":"iru-gap-10","gap-x-10":"iru-gap-x-10","gap-y-10":"iru-gap-y-10"},vu={fonts:ea,variants:{"laba-blue-10":Aa["laba-blue-10"],"blue-700":Aa["blue-700"],"bill-secondary-800":Aa["bill-secondary-800"]},gapAction:Kv,gapUrls:Kv},FO=({as:e,variants:t="laba-blue-10",fonts:n="lato",urls:r=[],textBreadcrumbs:i=[],onClickBreadcrumbs:a=[],gapAction:o,gapUrls:s,className:l,textAction:u="Kembali",iconAction:c,onClickAction:p,onClickUrls:g,separator:d=">",propsLink:m,classNameAction:b,classNameUrl:y,renderAction:f,...v})=>{const C=e??"div",S=_=>!!(Array.isArray(r)&&r.length>0&&r.length-1===_);return B.jsxs("div",{className:`${vu.fonts[n]} ${vu.variants[t]}
|
|
135
|
-
${l??""}`,...v,children:[p&&B.jsxs("div",{onClick:p,className:`${Aa.action} ${b??""}
|
|
136
|
-
${o?vu.gapAction[o]:""}`,children:[c,u]}),typeof f=="function"&&f(),B.jsx("div",{className:`${Aa.urls} ${s?vu.gapUrls[s]:""}`,children:r==null?void 0:r.map((_,E)=>B.jsxs(N.Fragment,{children:[B.jsx(C,{className:`${Aa.url} ${S(E)?Aa.active:""} ${y??""}`,onClick:()=>{(a==null?void 0:a[E])!==void 0&&typeof a[E]=="function"?a[E]():typeof g=="function"&&g(_)},...m?m(_,E,r):{},children:i[E]}),!S(E)&&B.jsx(B.Fragment,{children:d})]},E))})]})},NO="_sidebar_1lllp_16",$t={"splace-screen":"_splace-screen_1lllp_1","payhere-brand-base-white":"_payhere-brand-base-white_1lllp_13",sidebar:NO,"button-collaps-sidebar":"_button-collaps-sidebar_1lllp_31","menu-sidebar":"_menu-sidebar_1lllp_48","sidebar-open":"_sidebar-open_1lllp_79","container-icon-company-sidebar":"_container-icon-company-sidebar_1lllp_96","icon-company-sidebar":"_icon-company-sidebar_1lllp_99","sidebar-close":"_sidebar-close_1lllp_107","content-sidebar":"_content-sidebar_1lllp_132","payhere-brand-base-transparent":"_payhere-brand-base-transparent_1lllp_211","payhere-brand-blue-gray-900-transparent":"_payhere-brand-blue-gray-900-transparent_1lllp_409","payhere-brand-indigo-900-transparent":"_payhere-brand-indigo-900-transparent_1lllp_607","laba-white":"_laba-white_1lllp_805","lpd-brand-base-white":"_lpd-brand-base-white_1lllp_1195","lpd-brand-base-transparent":"_lpd-brand-base-transparent_1lllp_1393","lpd-brand-base-white-responsive":"_lpd-brand-base-white-responsive_1lllp_1591","lpd-brand-base-transparent-responsive":"_lpd-brand-base-transparent-responsive_1lllp_1825","bill-brand-base":"_bill-brand-base_1lllp_2059","bill-brand-base-responsive":"_bill-brand-base-responsive_1lllp_2460"},MO="_hidden_t2dfc_96",OO="_active_t2dfc_152",Ae={"item-icon-subs":"_item-icon-subs_t2dfc_1","item-sidebar-2":"_item-sidebar-2_t2dfc_1","item-sidebar-1":"_item-sidebar-1_t2dfc_1","end-icon":"_end-icon_t2dfc_1","item-icon":"_item-icon_t2dfc_1","item-label":"_item-label_t2dfc_25","item-sidebar-open":"_item-sidebar-open_t2dfc_51","item-sidebar-close":"_item-sidebar-close_t2dfc_66","item-icon-subs-active":"_item-icon-subs-active_t2dfc_75","item-subs-sidebar":"_item-subs-sidebar_t2dfc_82","sidebar-bill":"_sidebar-bill_t2dfc_85",hidden:MO,"divider-item-sidebar-payhere":"_divider-item-sidebar-payhere_t2dfc_106","divider-item-sidebar-lpd":"_divider-item-sidebar-lpd_t2dfc_111","parent-sidebar-5":"_parent-sidebar-5_t2dfc_133","parent-sidebar-6":"_parent-sidebar-6_t2dfc_137","parent-sidebar-7":"_parent-sidebar-7_t2dfc_141","parent-sidebar-8":"_parent-sidebar-8_t2dfc_146",active:OO,"sidebar-payhere-blue-gray-800":"_sidebar-payhere-blue-gray-800_t2dfc_162","sidebar-payhere-indigo-800":"_sidebar-payhere-indigo-800_t2dfc_188","sidebar-payhere":"_sidebar-payhere_t2dfc_162","sidebar-laba":"_sidebar-laba_t2dfc_240","sidebar-lpd":"_sidebar-lpd_t2dfc_273"},Fi={variant:{"payhere-brand-base-white":Ae["sidebar-payhere"],"payhere-brand-base-transparent":Ae["sidebar-payhere"],"payhere-brand-indigo-900-transparent":Ae["sidebar-payhere-indigo-800"],"payhere-brand-blue-gray-900-transparent":Ae["sidebar-payhere-blue-gray-800"],"laba-white":Ae["sidebar-laba"],"lpd-brand-base-white":Ae["sidebar-lpd"],"lpd-brand-base-transparent":Ae["sidebar-lpd"],"lpd-brand-base-white-responsive":Ae["sidebar-lpd"],"lpd-brand-base-transparent-responsive":Ae["sidebar-lpd"],"bill-brand-base":Ae["sidebar-bill"],"bill-brand-base-responsive":Ae["sidebar-bill"]},parent:{1:Ae["parent-sidebar-1"],2:Ae["parent-sidebar-2"],3:Ae["parent-sidebar-3"],4:Ae["parent-sidebar-4"],5:Ae["parent-sidebar-5"],6:Ae["parent-sidebar-6"],7:Ae["parent-sidebar-7"],8:Ae["parent-sidebar-8"]},divider:{"payhere-brand-base-white":Ae["divider-item-sidebar-payhere"],"payhere-brand-base-transparent":Ae["divider-item-sidebar-payhere"],"payhere-brand-indigo-900-transparent":Ae["divider-item-sidebar-payhere"],"payhere-brand-blue-gray-900-transparent":Ae["divider-item-sidebar-payhere"],"laba-white":Ae["divider-item-sidebar-laba"],"lpd-brand-base-white":Ae["divider-item-sidebar-lpd"],"lpd-brand-base-transparent":Ae["divider-item-sidebar-lpd"],"lpd-brand-base-white-responsive":Ae["divider-item-sidebar-lpd"],"lpd-brand-base-transparent-responsive":Ae["divider-item-sidebar-lpd"],"bill-brand-base":Ae["divider-item-sidebar-bill"],"bill-brand-base-responsive":Ae["divider-item-sidebar-bill"]}},pw=({as:e,show:t,open:n,patch:r,iconSubs:i,variant:a="payhere-brand-base-white",setShow:o,onClickItems:s,propsLink:l,...u})=>{var v,C,S,_,E,x,h,w;let c=B.jsx(B.Fragment,{});const p=e??"div",[g,d]=N.useState(!1),m=r===u.slug,b=t.split("/"),y=b.includes(u.name),f=()=>{if(u.subs.length>0)if(y){const D=b.splice(0,b.indexOf(u.name));D.length>0?o(`${D.join("/")}/`):o("")}else o(`${t}${u.name}/`);else typeof s=="function"&&s(u)};return u.isShow?([1,3,5,6,7,8].includes(u.parent)&&(c=B.jsxs(B.Fragment,{children:[B.jsxs(p,{id:u.name,className:`${Ae["item-sidebar-1"]}
|
|
137
|
-
${(v=Fi.variant)==null?void 0:v[a]} ${(C=Fi.parent)==null?void 0:C[u.parent.toString()]}
|
|
138
|
-
${m||u.subs.length>0&&y?Ae.active:""} ${typeof n=="boolean"&&n?Ae["item-sidebar-open"]:""} ${typeof n=="boolean"&&!n?Ae["item-sidebar-close"]:""}
|
|
139
|
-
`,onClick:f,onMouseOver:()=>d(!0),onMouseOut:()=>d(!1),...l?l(u.slug,u):{},children:[B.jsxs("div",{className:"iru-flex iru-items-center iru-gap-3 iru-relative",children:[N.isValidElement(u.svgIcon)&&B.jsx("div",{className:Ae["item-icon"],children:m||u.subs.length>0&&y?u==null?void 0:u.svgIconActive:g?(u==null?void 0:u.svgIconHover)||(u==null?void 0:u.svgIconActive):u==null?void 0:u.svgIcon}),B.jsx("div",{className:Ae["item-label"],children:u.label})]}),N.isValidElement(u.endIcon)&&B.jsx("div",{className:Ae["end-icon"],children:u==null?void 0:u.endIcon}),u.subs.length>0&&n&&B.jsxs("div",{className:`${Ae["item-icon-subs"]} ${y?Ae["item-icon-subs-active"]:""}`,id:`item-sidebar-subs-${u.name}-icon`,children:[N.isValidElement(i)&&i,typeof i=="function"&&i()]})]}),u.parent===3&&!u.subs.length&&B.jsx("div",{className:(S=Fi.divider)==null?void 0:S[a]})]})),(u.parent===2||u.parent===4)&&(c=B.jsxs(B.Fragment,{children:[B.jsxs(p,{id:u.name,className:`${Ae["item-sidebar-2"]}
|
|
140
|
-
${(_=Fi.variant)==null?void 0:_[a]} ${(E=Fi.parent)==null?void 0:E[u.parent.toString()]}
|
|
141
|
-
${m||u.subs.length>0&&y?Ae.active:""} ${typeof n=="boolean"&&n?Ae["item-sidebar-open"]:""} ${typeof n=="boolean"&&!n?Ae["item-sidebar-close"]:""}
|
|
142
|
-
`,onClick:f,onMouseOver:()=>d(!0),onMouseOut:()=>d(!1),...l?l(u.slug,u):{},children:[N.isValidElement(u.svgIcon)&&B.jsx("div",{className:Ae["item-icon"],children:m||u.subs.length>0&&y?u==null?void 0:u.svgIconActive:g?(u==null?void 0:u.svgIconHover)||(u==null?void 0:u.svgIconActive):u==null?void 0:u.svgIcon}),B.jsx("div",{className:Ae["item-label"],children:u.label}),u.subs.length>0&&n&&B.jsxs("div",{className:`${Ae["item-icon-subs"]} ${y?Ae["item-icon-subs-active"]:""}`,id:`item-sidebar-subs-${u.name}-icon`,children:[N.isValidElement(i)&&i,typeof i=="function"&&i()]})]}),u.parent===4&&!u.subs.length&&B.jsx("div",{className:(x=Fi.divider)==null?void 0:x[a]})]})),u.subs.length>0?B.jsxs("div",{className:`${n||y?"":"-mt-2"}`,children:[c,B.jsx("div",{id:`item-sidebar-subs-${u.name}-${n&&y?"open":"close"}`,className:`${Ae["item-subs-sidebar"]}
|
|
143
|
-
${(h=Fi.variant)==null?void 0:h[a]} ${!n||!y?Ae.hidden:""}`,children:u.subs.map(D=>N.createElement(pw,{...D,as:D.manualRoute?"div":D.subs.length>0?e:u.linkComponent,key:D.name,patch:r,iconSubs:i,show:t,open:n,variant:a,setShow:o}))}),[3,4].includes(u.parent)&&B.jsx("div",{className:(w=Fi.divider)==null?void 0:w[a]})]}):c):B.jsx(B.Fragment,{})},Dh={withCuctomWidthIconCompany:["payhere-brand-base-white","payhere-brand-base-transparent"],variants:{"payhere-brand-base-white":$t["payhere-brand-base-white"],"payhere-brand-base-transparent":$t["payhere-brand-base-transparent"],"payhere-brand-indigo-900-transparent":$t["payhere-brand-indigo-900-transparent"],"payhere-brand-blue-gray-900-transparent":$t["payhere-brand-blue-gray-900-transparent"],"laba-white":$t["laba-white"],"lpd-brand-base-white":$t["lpd-brand-base-white"],"lpd-brand-base-transparent":$t["lpd-brand-base-transparent"],"lpd-brand-base-white-responsive":$t["lpd-brand-base-white-responsive"],"lpd-brand-base-transparent-responsive":$t["lpd-brand-base-transparent-responsive"],"bill-brand-base":$t["bill-brand-base"],"bill-brand-base-responsive":$t["bill-brand-base-responsive"]},mobileSupport:["lpd-brand-base-transparent-responsive","lpd-brand-base-white-responsive","bill-brand-base-responsive"]},mw=N.forwardRef((e,t)=>{var M;const{as:n,children:r,patch:i="/",iconCompany:a,iconSubs:o,iconCollapse:s,iconCollapseClose:l,modules:u,toleranceWidthIconCompany:c=25,onClickItems:p,variant:g="payhere-brand-base-white",footer:d,withInheritance:m,id:b="1ru-sidebar",styleSidebar:y,styleContent:f,...v}=e,C=N.useRef(null),[S,_]=N.useState(null),[E,x]=N.useState(null),[h,w]=N.useState(""),[D,I]=N.useState(),[T,F]=N.useState(0),P=()=>{var G;let O=0;const z=document.getElementById("icon-company-sidebar");(G=z==null?void 0:z.childNodes)==null||G.forEach(U=>{O+=U.getBoundingClientRect().width??0}),I(O+c+"px")},k=()=>{F(window.innerWidth)},R=()=>{_(!E),E?I("auto"):setTimeout(()=>{P()},100)};return N.useEffect(()=>{T>=(Dh.mobileSupport.includes(g)?d0.lg:d0.md)?(_(!0),setTimeout(()=>{P()},100)):(_(!1),I("auto"))},[T]),N.useEffect(()=>{typeof S=="boolean"&&x(S)},[S]),N.useImperativeHandle(t,()=>({openSidebar:S,setOpenSidebar:_,handlerClickCollapse:R}),[S,E]),N.useEffect(()=>(i&&i.split("/").length>1&&w(i+"/"),P(),k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)),[]),B.jsxs("div",{className:Dh.variants[g],...v,ref:C,children:[B.jsxs("div",{id:b,className:`${$t.sidebar} ${typeof E=="boolean"&&E?$t["sidebar-open"]:""} ${typeof E=="boolean"&&!E?$t["sidebar-close"]:""}`,style:y||{},children:[N.isValidElement(s)&&B.jsxs("div",{className:$t["button-collaps-sidebar"],id:`${b}-${S?"close-collapse":"open-collapse"}`,onClick:R,children:[S&&s,S?"":N.isValidElement(l)?l:s]}),B.jsx("div",{className:$t["container-icon-company-sidebar"],children:B.jsxs("div",{id:"icon-company-sidebar",className:$t["icon-company-sidebar"],style:{width:D&&Dh.withCuctomWidthIconCompany.includes(g)?D:"100%"},children:[N.isValidElement(a)&&a,typeof a=="function"&&a({openSidebar:E,setOpenSidebar:_})]})}),B.jsx("div",{className:$t["menu-sidebar"],onMouseOver:()=>{S||x(!0)},onMouseOut:()=>{S||x(!1)},children:u.map(O=>N.createElement(pw,{...O,as:O.manualRoute||O.subs.length>0?"div":n,linkComponent:n,key:O.name,show:h,open:E,patch:i,iconSubs:o,variant:g,setShow:w,onClickItems:p}))}),d&&B.jsxs("div",{className:E?"iru-opacity-[1]":"iru-opacity-0",children:[N.isValidElement(d)&&B.jsx("div",{children:d}),typeof d=="function"&&B.jsx("div",{children:d()})]})]}),S&&B.jsx("div",{id:`${b}-splace-screen`,className:$t["splace-screen"],onClick:R}),B.jsxs("div",{className:$t["content-sidebar"],style:f||{},children:[m&&((M=N.Children)==null?void 0:M.map(r,O=>B.jsx(B.Fragment,{children:N.isValidElement(O)&&B.jsx(B.Fragment,{children:N.cloneElement(O,{openSidebar:S,handlerClickCollapse:R})})}))),!m&&B.jsx(B.Fragment,{children:r})]})]})});mw.displayName="Sidebar";const LO="_collapse_qzzyu_1",bw={collapse:LO},VO=({children:e,id:t,open:n,className:r,classNameContainer:i,maxCollapsedHeight:a="0px",triggerCalCulateContainer:o,delayTriggerCalculateHeight:s=0})=>{const[l,u]=N.useState("1000vh"),c=()=>{var g;const p=((g=document==null?void 0:document.getElementById(t))==null?void 0:g.offsetHeight)??0;u(p||"1000vh")};return N.useEffect(()=>{const p=setTimeout(c,s);return window==null||window.addEventListener("resize",c),window==null||window.addEventListener("load",c),()=>{clearTimeout(p),window==null||window.removeEventListener("resize",c),window==null||window.removeEventListener("load",c)}},[o]),B.jsx("div",{className:`${bw.collapse} ${i??""}`,style:{maxHeight:n?l:a},children:B.jsx("div",{id:t,className:r??"",children:e})})},HO="_modal_12o7y_1",Xi={modal:HO,"modal-content":"_modal-content_12o7y_1","with-overlay":"_with-overlay_12o7y_23","modal-small":"_modal-small_12o7y_40","modal-medium":"_modal-medium_12o7y_44","modal-regular":"_modal-regular_12o7y_48","modal-large":"_modal-large_12o7y_52","modal-show":"_modal-show_12o7y_56"},jO={size:{small:Xi["modal-small"],medium:Xi["modal-medium"],regular:Xi["modal-regular"],large:Xi["modal-large"]}},zO=({as:e,children:t,id:n="modal",idModal:r="1ru-modal",withOverlay:i=!0,show:a,size:o="regular",className:s,classNameContainer:l,onClose:u,...c})=>{const p=e??"div",g=()=>{typeof u=="function"&&u()};return B.jsx(B.Fragment,{children:a&&document.getElementById(r)&&Zo.createPortal(B.jsx("div",{id:n,onClick:g,className:`${Xi.modal} ${i?Xi["with-overlay"]:""} ${a?Xi["modal-show"]:""} ${l??""}`,children:B.jsx(p,{onClick:d=>d.stopPropagation(),className:`${Xi["modal-content"]} ${jO.size[o]} ${s??""}`,...c,children:t})}),document.getElementById(r))})},GO="_dot_1b9xw_46",kr={"timeline-container":"_timeline-container_1b9xw_1","no-time":"_no-time_1b9xw_14","timeline-content":"_timeline-content_1b9xw_18","left-content":"_left-content_1b9xw_23","time-content":"_time-content_1b9xw_31","text-time":"_text-time_1b9xw_35",dot:GO,"right-content":"_right-content_1b9xw_52"},WO=({children:e,noTime:t=!1})=>B.jsx("div",{className:`${kr["timeline-container"]} ${t?kr["no-time"]:""}`,children:e}),UO=({children:e,time:t,clasName:n,noTime:r=!1})=>B.jsxs("div",{className:kr["timeline-content"],children:[B.jsx("div",{className:`${kr["left-content"]} ${r?kr["no-time"]:""}`,children:B.jsxs("div",{className:kr["time-content"],children:[!r&&B.jsx("time",{className:kr["text-time"],children:t??""}),B.jsx("div",{className:kr.dot})]})}),B.jsx("div",{className:`${kr["right-content"]} ${r?kr["no-time"]:""} ${n??""}`,children:e})]}),XO=Object.assign(WO,{TimelineContent:UO}),yu=(e,t,n)=>{if((t==null?void 0:t.length)>0){const r={};return t.forEach(i=>{e[i]&&(r[i]=e[i]),n&&e[`${n}${i}`]&&(r[`${n}${i}`]=e[`${n}${i}`])}),r}return e},vw=N.forwardRef((e,t)=>{const{children:n,onChange:r,prefixNativeValue:i="",defaultNativeValue:a,defaultValue:o,mountedExecuteChange:s=!0,keepKeys:l=[],resetPagination:u=!0,keyPageNumber:c="pageNumber",triggerReset:p={},reset:g}=e,d=u?{[c]:1}:{},[m,b]=N.useState(yu(o??{},l,"")),[y,f]=N.useState(p1(i,yu(a??{},l,i))),[v,C]=N.useState(!1),S=(x,h)=>{const w={};return Object.keys(h).forEach(D=>{w[`${x}${D}`]=h[D]}),w},_=(x,h,w,D)=>{let I=x;const T=S(i,{[h]:x});Array.isArray(x)&&(w==="array-of-object-to-array"?I=_g(x,D):w==="array-of-object-to-string"?I=wg(x,D):w==="array-to-string"&&(I=I.toString())),typeof r=="function"&&r({...m,[h]:I,...d},{...y,...T}),b(F=>({...F,[h]:I})),f(F=>({...F,...T}))},E=(x,h)=>{const D=S(i,{...h??x});typeof r=="function"&&r({...m,...x,...d},{...y,...D}),b(I=>({...I,...x})),f(I=>({...I,...D}))};return Qi(()=>{!v&&typeof r=="function"&&s&&(r(m,y),C(!0))},[m,y,v,s]),Qi(()=>{g&&(f(p1(i,yu(a??{},l,i))),b(yu(o??{},l,"")))},[g,p]),N.useImperativeHandle(t,()=>({nativeValue:y,value:m,handlerOnChange:_,handlerOnChangeNative:E}),[Zs(m),Zs(y)]),B.jsx(B.Fragment,{children:n({handlerOnChange:_,handlerOnChangeNative:E,value:m,nativeValue:y})})});vw.displayName="FilterContainer";function qp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var ul;(function(e){e.event="event",e.props="prop"})(ul||(ul={}));function gi(){}function YO(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(a,o){return a===t[o]})||(t=r,n=e.apply(void 0,r)),n}}function Ua(e){return!!(e||"").match(/\d/)}function ka(e){return e==null}function KO(e){return typeof e=="number"&&isNaN(e)}function yw(e){return ka(e)||KO(e)||typeof e=="number"&&!isFinite(e)}function xw(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function ZO(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function qO(e,t,n){var r=ZO(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function JO(e){var t=N.useRef(e);t.current=e;var n=N.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function Jp(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),a=i[0],o=i[1]||"";return{beforeDecimal:a,afterDecimal:o,hasNegation:n,addNegation:r}}function QO(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function Cw(e,t,n){for(var r="",i=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||i;return r}function Zv(e,t){return Array(t+1).join(e)}function Ew(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(".","");var o=1+a,s=i.length;return o<0?i="0."+Zv("0",Math.abs(o))+i:o>=s?i=i+Zv("0",o-s):i=(i.substring(0,o)||"0")+"."+i.substring(o),n+i}function qv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=Jp(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(o||"0")),u=o.length<=t?"0."+o:l.toFixed(t),c=u.split("."),p=a;a&&Number(c[0])&&(p=a.split("").reverse().reduce(function(b,y,f){return b.length>f?(Number(b[0])+Number(y)).toString()+b.substring(1,b.length):y+b},c[0]));var g=Cw(c[1]||"",t,n),d=s?"-":"",m=r?".":"";return""+d+p+m+g}function zi(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Sw=YO(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),eL=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function tL(e,t,n){return Math.min(Math.max(e,t),n)}function Th(e){return Math.max(e.selectionStart,e.selectionEnd)}function nL(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function ww(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function _w(e,t){return e===void 0&&(e=" "),typeof e=="string"?e:e[t]||" "}function rL(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function iL(e,t,n,r,i,a,o){o===void 0&&(o=rL);var s=i.findIndex(function(S){return S}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var u=n.length,c=e.length,p={},g=new Array(u),d=0;d<u;d++){g[d]=-1;for(var m=0,b=c;m<b;m++){var y=o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:d,formattedValueIndex:m});if(y&&p[m]!==!0){g[d]=m,p[m]=!0;break}}}for(var f=r;f<u&&(g[f]===-1||!a(n[f]));)f++;var v=f===u||g[f]===-1?c:g[f];for(f=r-1;f>0&&g[f]===-1;)f--;var C=f===-1||g[f]===-1?0:g[f]+1;return C>v?v:r-C<v-r?C:v}function Lc(e,t,n,r){var i=e.length;if(t=tL(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function aL(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Ua(e[n])||Ua(e[n-1]));return t}function Iw(e,t,n,r,i,a){a===void 0&&(a=gi);var o=JO(function(m,b){var y,f;return yw(m)?(f="",y=""):typeof m=="number"||b?(f=typeof m=="number"?Ew(m):m,y=r(f)):(f=i(m,void 0),y=r(f)),{formattedValue:y,numAsString:f}}),s=N.useState(function(){return o(ka(e)?t:e,n)}),l=s[0],u=s[1],c=function(m,b){m.formattedValue!==l.formattedValue&&u({formattedValue:m.formattedValue,numAsString:m.value}),a(m,b)},p=e,g=n;ka(e)&&(p=l.numAsString,g=!0);var d=o(p,g);return N.useMemo(function(){u(d)},[d.formattedValue]),[l,c]}function oL(e){return e.replace(/[^0-9]/g,"")}function sL(e){return e}function Dw(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=sL);var s=e.removeFormatting;s===void 0&&(s=oL);var l=e.defaultValue,u=e.valueIsNumericString,c=e.onValueChange,p=e.isAllowed,g=e.onChange;g===void 0&&(g=gi);var d=e.onKeyDown;d===void 0&&(d=gi);var m=e.onMouseUp;m===void 0&&(m=gi);var b=e.onFocus;b===void 0&&(b=gi);var y=e.onBlur;y===void 0&&(y=gi);var f=e.value,v=e.getCaretBoundary;v===void 0&&(v=aL);var C=e.isValidInputCharacter;C===void 0&&(C=Ua);var S=e.isCharacterSame,_=qp(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),E=Iw(f,l,!!u,o,s,c),x=E[0],h=x.formattedValue,w=x.numAsString,D=E[1],I=N.useRef(),T=N.useRef({formattedValue:h,numAsString:w}),F=function(ie,oe){T.current={formattedValue:ie.formattedValue,numAsString:ie.value},D(ie,oe)},P=N.useState(!1),k=P[0],R=P[1],M=N.useRef(null),O=N.useRef({setCaretTimeout:null,focusTimeout:null});N.useEffect(function(){return R(!0),function(){clearTimeout(O.current.setCaretTimeout),clearTimeout(O.current.focusTimeout)}},[]);var z=o,G=function(ie,oe){var ne=parseFloat(oe);return{formattedValue:ie,value:oe,floatValue:isNaN(ne)?void 0:ne}},U=function(ie,oe,ne){ie.selectionStart===0&&ie.selectionEnd===ie.value.length||(zi(ie,oe),O.current.setCaretTimeout=setTimeout(function(){ie.value===ne&&ie.selectionStart!==oe&&zi(ie,oe)},0))},J=function(ie,oe,ne){return Lc(ie,oe,v(ie),ne)},Q=function(ie,oe,ne){var ue=v(oe),be=iL(oe,h,ie,ne,ue,C,S);return be=Lc(oe,be,ue),be},ee=function(ie){var oe=ie.formattedValue;oe===void 0&&(oe="");var ne=ie.input,ue=ie.source,be=ie.event,ve=ie.numAsString,pe;if(ne){var $e=ie.inputValue||ne.value,Le=Th(ne);ne.value=oe,pe=Q($e,oe,Le),pe!==void 0&&U(ne,pe,oe)}oe!==h&&F(G(oe,ve),{event:be,source:ue})};N.useEffect(function(){var ie=T.current,oe=ie.formattedValue,ne=ie.numAsString;(h!==oe||w!==ne)&&F(G(h,w),{event:void 0,source:ul.props})},[h,w]);var q=M.current?Th(M.current):void 0,Z=typeof window<"u"?N.useLayoutEffect:N.useEffect;Z(function(){var ie=M.current;if(h!==T.current.formattedValue&&ie){var oe=Q(T.current.formattedValue,h,q);ie.value=h,U(ie,oe,h)}},[h]);var se=function(ie,oe,ne){var ue=oe.target,be=I.current?eL(I.current,ue.selectionEnd):Sw(h,ie),ve=Object.assign(Object.assign({},be),{lastValue:h}),pe=s(ie,ve),$e=z(pe);if(pe=s($e,void 0),p&&!p(G($e,pe))){var Le=oe.target,Ue=Th(Le),nt=Q(ie,h,Ue);return Le.value=h,U(Le,nt,h),!1}return ee({formattedValue:$e,numAsString:pe,inputValue:ie,event:oe,source:ne,input:oe.target}),!0},te=function(ie,oe){oe===void 0&&(oe=0);var ne=ie.selectionStart,ue=ie.selectionEnd;I.current={selectionStart:ne,selectionEnd:ue+oe}},$=function(ie){var oe=ie.target,ne=oe.value,ue=se(ne,ie,ul.event);ue&&g(ie),I.current=void 0},H=function(ie){var oe=ie.target,ne=ie.key,ue=oe.selectionStart,be=oe.selectionEnd,ve=oe.value;ve===void 0&&(ve="");var pe;ne==="ArrowLeft"||ne==="Backspace"?pe=Math.max(ue-1,0):ne==="ArrowRight"?pe=Math.min(ue+1,ve.length):ne==="Delete"&&(pe=ue);var $e=0;ne==="Delete"&&ue===be&&($e=1);var Le=ne==="ArrowLeft"||ne==="ArrowRight";if(pe===void 0||ue!==be&&!Le){d(ie),te(oe,$e);return}var Ue=pe;if(Le){var nt=ne==="ArrowLeft"?"left":"right";Ue=J(ve,pe,nt),Ue!==pe&&ie.preventDefault()}else ne==="Delete"&&!C(ve[pe])?Ue=J(ve,pe,"right"):ne==="Backspace"&&!C(ve[pe])&&(Ue=J(ve,pe,"left"));Ue!==pe&&U(oe,Ue,ve),d(ie),te(oe,$e)},V=function(ie){var oe=ie.target,ne=function(){var ue=oe.selectionStart,be=oe.selectionEnd,ve=oe.value;if(ve===void 0&&(ve=""),ue===be){var pe=J(ve,ue);pe!==ue&&U(oe,pe,ve)}};ne(),requestAnimationFrame(function(){ne()}),m(ie),te(oe)},A=function(ie){ie.persist&&ie.persist();var oe=ie.target,ne=ie.currentTarget;M.current=oe,O.current.focusTimeout=setTimeout(function(){var ue=oe.selectionStart,be=oe.selectionEnd,ve=oe.value;ve===void 0&&(ve="");var pe=J(ve,ue);pe!==ue&&!(ue===0&&be===ve.length)&&U(oe,pe,ve),b(Object.assign(Object.assign({},ie),{currentTarget:ne}))},0)},L=function(ie){M.current=null,clearTimeout(O.current.focusTimeout),clearTimeout(O.current.setCaretTimeout),y(ie)},K=k&&nL()?"numeric":void 0,X=Object.assign({inputMode:K},_,{type:t,value:h,onChange:$,onKeyDown:H,onMouseUp:V,onFocus:A,onBlur:L});if(n==="text")return i?N.createElement(N.Fragment,null,i(h,_)||null):N.createElement("span",Object.assign({},_,{ref:a}),h);if(r){var le=r;return N.createElement(le,Object.assign({},X,{ref:a}))}return N.createElement("input",Object.assign({},X,{ref:a}))}function Jv(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var a=t.suffix;a===void 0&&(a="");var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=Pd(t),u=l.thousandSeparator,c=l.decimalSeparator,p=n!==0&&e.indexOf(".")!==-1||n&&r,g=Jp(e,o),d=g.beforeDecimal,m=g.afterDecimal,b=g.addNegation;return n!==void 0&&(m=Cw(m,n,!!r)),u&&(d=qO(d,u,s)),i&&(d=i+d),a&&(m=m+a),b&&(d="-"+d),e=d+(p&&c||"")+m,e}function Pd(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function lL(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),i&&!a&&t&&(e="-"+e),e}function uL(e,t){return new RegExp("(^-)|[0-9]|"+xw(e),"g")}function cL(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function dL(e,t,n){var r;t===void 0&&(t=ww(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a="");var o=n.suffix;o===void 0&&(o="");var s=n.decimalScale,l=t.from,u=t.to,c=u.start,p=u.end,g=Pd(n),d=g.allowedDecimalSeparators,m=g.decimalSeparator,b=e[p]===m;if(Ua(e)&&(e===a||e===o)&&t.lastValue==="")return e;if(p-c===1&&d.indexOf(e[c])!==-1){var y=s===0?"":m;e=e.substring(0,c)+y+e.substring(c+1,e.length)}var f=function(M,O,z){var G=!1,U=!1;a.startsWith("-")?G=!1:M.startsWith("--")?(G=!1,U=!0):o.startsWith("-")&&M.length===o.length?G=!1:M[0]==="-"&&(G=!0);var J=G?1:0;return U&&(J=2),J&&(M=M.substring(J),O-=J,z-=J),{value:M,start:O,end:z,hasNegation:G}},v=f(e,c,p),C=v.hasNegation;r=v,e=r.value,c=r.start,p=r.end;var S=f(t.lastValue,l.start,l.end),_=S.start,E=S.end,x=S.value,h=e.substring(c,p);e.length&&x.length&&(_>x.length-o.length||E<a.length)&&!(h&&o.startsWith(h))&&(e=x);var w=0;e.startsWith(a)?w+=a.length:c<a.length&&(w=c),e=e.substring(w),p-=w;var D=e.length,I=e.length-o.length;e.endsWith(o)?D=I:(p>I||p>e.length-o.length)&&(D=p),e=e.substring(0,D),e=lL(C?"-"+e:e,i),e=(e.match(uL(m))||[]).join("");var T=e.indexOf(m);e=e.replace(new RegExp(xw(m),"g"),function(M,O){return O===T?".":""});var F=Jp(e,i),P=F.beforeDecimal,k=F.afterDecimal,R=F.addNegation;return u.end-u.start<l.end-l.start&&P===""&&b&&!parseFloat(k)&&(e=R?"-":""),e}function fL(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]==="-";i.fill(!1,0,n.length+(a?1:0));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function hL(e){var t=Pd(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw new Error(`
|
|
144
|
-
Decimal separator can't be same as thousand separator.
|
|
145
|
-
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
146
|
-
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
147
|
-
`);return i.startsWith("-")&&a&&(console.error(`
|
|
148
|
-
Prefix can't start with '-' when allowNegative is true.
|
|
149
|
-
prefix: `+i+`
|
|
150
|
-
allowNegative: `+a+`
|
|
151
|
-
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function gL(e){e=hL(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=gi);var a=e.onBlur;a===void 0&&(a=gi);var o=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,u=e.prefix;u===void 0&&(u="");var c=e.defaultValue,p=e.value,g=e.valueIsNumericString,d=e.onValueChange,m=qp(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),b=Pd(e),y=b.decimalSeparator,f=b.allowedDecimalSeparators,v=function(R){return Jv(R,e)},C=function(R,M){return dL(R,M,e)},S=ka(p)?c:p,_=g??cL(S,u,t);ka(p)?ka(c)||(_=_||typeof c=="number"):_=_||typeof p=="number";var E=function(R){return yw(R)?R:(typeof R=="number"&&(R=Ew(R)),_&&typeof s=="number"?qv(R,s,!!l):R)},x=Iw(E(p),E(c),!!_,v,C,d),h=x[0],w=h.numAsString,D=h.formattedValue,I=x[1],T=function(R){var M=R.target,O=R.key,z=M.selectionStart,G=M.selectionEnd,U=M.value;if(U===void 0&&(U=""),(O==="Backspace"||O==="Delete")&&G<u.length){R.preventDefault();return}if(z!==G){i(R);return}O==="Backspace"&&U[0]==="-"&&z===u.length+1&&n&&zi(M,1),s&&l&&(O==="Backspace"&&U[z-1]===y?(zi(M,z-1),R.preventDefault()):O==="Delete"&&U[z]===y&&R.preventDefault()),f!=null&&f.includes(O)&&U[z]===y&&zi(M,z+1);var J=o===!0?",":o;O==="Backspace"&&U[z-1]===J&&zi(M,z-1),O==="Delete"&&U[z]===J&&zi(M,z+1),i(R)},F=function(R){var M=w;if(M.match(/\d/g)||(M=""),r||(M=QO(M)),l&&s&&(M=qv(M,s,l)),M!==w){var O=Jv(M,e);I({formattedValue:O,value:M,floatValue:parseFloat(M)},{event:R,source:ul.event})}a(R)},P=function(R){return R===y?!0:Ua(R)},k=function(R){var M=R.currentValue,O=R.lastValue,z=R.formattedValue,G=R.currentValueIndex,U=R.formattedValueIndex,J=M[G],Q=z[U],ee=Sw(O,M),q=ee.to,Z=function(se){return C(se).indexOf(".")+u.length};return p===0&&l&&s&&M[q.start]===y&&Z(M)<G&&Z(z)>U?!1:G>=q.start&&G<q.end&&f&&f.includes(J)&&Q===y?!0:J===Q};return Object.assign(Object.assign({},m),{value:D,valueIsNumericString:!1,isValidInputCharacter:P,isCharacterSame:k,onValueChange:I,format:v,removeFormatting:C,getCaretBoundary:function(R){return fL(R,e)},onKeyDown:T,onBlur:F})}function pL(e){var t=gL(e);return N.createElement(Dw,Object.assign({},t))}function mL(e,t){var n=t.format,r=t.allowEmptyFormatting,i=t.mask,a=t.patternChar;if(a===void 0&&(a="#"),e===""&&!r)return"";for(var o=0,s=n.split(""),l=0,u=n.length;l<u;l++)n[l]===a&&(s[l]=e[o]||_w(i,o),o+=1);return s.join("")}function bL(e,t,n){t===void 0&&(t=ww(e));var r=n.format,i=n.patternChar;i===void 0&&(i="#");var a=t.from,o=t.to,s=t.lastValue;s===void 0&&(s="");var l=function(y){return r[y]===i},u=function(y,f){for(var v="",C=0;C<y.length;C++)l(f+C)&&Ua(y[C])&&(v+=y[C]);return v},c=function(y){return y.replace(/[^0-9]/g,"")};if(!r.match(/\d/))return c(e);if((s===""||a.end-a.start===s.length)&&e.length===r.length){for(var p="",g=0;g<e.length;g++)if(l(g))Ua(e[g])&&(p+=e[g]);else if(e[g]!==r[g])return c(e);return p}var d=s.substring(0,a.start),m=e.substring(o.start,o.end),b=s.substring(a.end);return""+u(d,0)+c(m)+u(b,a.end)}function vL(e,t){var n=t.format,r=t.mask,i=t.patternChar;i===void 0&&(i="#");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=0,s=-1,l={};n.split("").forEach(function(g,d){var m=void 0;g===i&&(o++,m=_w(r,o-1),s===-1&&e[d]===m&&(s=d)),l[d]=m});for(var u=function(g){return n[g]===i&&e[g]!==l[g]},c=0,p=a.length;c<p;c++)a[c]=c===s||u(c)||u(c-1);return a[n.indexOf(i)]=!0,a}function yL(e){var t=e.mask;if(t){var n=t==="string"?t:t.toString();if(n.match(/\d/g))throw new Error("Mask "+t+" should not contain numeric character;")}}function xL(e,t){return e===""?!0:!(t!=null&&t.match(/\d/))&&typeof e=="string"&&(!!e.match(/^\d+$/)||e==="")}function CL(e){e.mask,e.allowEmptyFormatting;var t=e.format,n=e.inputMode;n===void 0&&(n="numeric");var r=e.onKeyDown;r===void 0&&(r=gi);var i=e.patternChar;i===void 0&&(i="#");var a=e.value,o=e.defaultValue,s=e.valueIsNumericString,l=qp(e,["mask","allowEmptyFormatting","format","inputMode","onKeyDown","patternChar","value","defaultValue","valueIsNumericString"]);yL(e);var u=function(m){return vL(m,e)},c=function(m){var b=m.key,y=m.target,f=y.selectionStart,v=y.selectionEnd,C=y.value;if(f!==v){r(m);return}var S=f;if(b==="Backspace"||b==="Delete"){var _="right";if(b==="Backspace"){for(;S>0&&t[S-1]!==i;)S--;_="left"}else{for(var E=t.length;S<E&&t[S]!==i;)S++;_="right"}S=Lc(C,S,u(C),_)}else t[S]!==i&&b!=="ArrowLeft"&&b!=="ArrowRight"&&(S=Lc(C,S+1,u(C),"right"));S!==f&&zi(y,S),r(m)},p=ka(a)?o:a,g=s??xL(p,t),d=Object.assign(Object.assign({},e),{valueIsNumericString:g});return Object.assign(Object.assign({},l),{value:a,defaultValue:o,valueIsNumericString:g,inputMode:n,format:function(m){return mL(m,d)},removeFormatting:function(m,b){return bL(m,b,d)},getCaretBoundary:u,onKeyDown:c})}function EL(e){var t=CL(e);return N.createElement(Dw,Object.assign({},t))}const SL=({max:e,min:t,selectedText:n="Rp0",onChange:r,onFocusInput:i,...a})=>B.jsx(pL,{isAllowed:o=>e!==void 0&&Zr(e)&&bt(o.value).isGreaterThan(e)?(typeof r=="function"&&r({target:{value:bt(e).toString()}}),!1):t!==void 0&&Zr(t)&&bt(o.value).isLessThan(t)?(typeof r=="function"&&r({target:{value:bt(t).toString()}}),!1):!0,onValueChange:(o,{source:s})=>{typeof r=="function"&&s.includes("event")&&r({target:{value:o.value}})},decimalSeparator:",",thousandSeparator:".",decimalScale:2,valueIsNumericString:!0,thousandsGroupStyle:"thousand",onFocus:o=>{var s;((s=o==null?void 0:o.target)==null?void 0:s.value)===n&&(typeof i=="function"?i(""):typeof r=="function"&&r({target:{value:""}}))},...a}),Qp=({children:e,containerId:t="portal-root",selector:n})=>{const[r,i]=N.useState(null);return N.useEffect(()=>{let a=n?document.querySelector(n):document.getElementById(t),o=!1;return a||(a=document.createElement("div"),a.id=t,document.body.appendChild(a),o=!0),i(a),()=>{o&&a&&document.body.removeChild(a)}},[t,n]),r?Zo.createPortal(e,r):null},wL={"button-remove":"_button-remove_lgwgf_1"},_L=()=>B.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:B.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.19544 6.19126C6.32045 6.06628 6.48999 5.99607 6.66677 5.99607C6.84354 5.99607 7.01308 6.06628 7.1381 6.19126L10.0001 9.05326L12.8621 6.19126C12.9236 6.12758 12.9972 6.0768 13.0785 6.04186C13.1598 6.00692 13.2473 5.98853 13.3358 5.98776C13.4244 5.98699 13.5121 6.00386 13.5941 6.03738C13.676 6.0709 13.7504 6.1204 13.813 6.18299C13.8756 6.24559 13.9251 6.32002 13.9587 6.40195C13.9922 6.48389 14.009 6.57167 14.0083 6.66019C14.0075 6.74871 13.9891 6.83619 13.9542 6.91753C13.9192 6.99886 13.8684 7.07243 13.8048 7.13392L10.9428 9.99592L13.8048 12.8579C13.9262 12.9837 13.9934 13.1521 13.9919 13.3269C13.9904 13.5017 13.9203 13.6689 13.7966 13.7925C13.673 13.9161 13.5058 13.9862 13.331 13.9877C13.1562 13.9892 12.9878 13.922 12.8621 13.8006L10.0001 10.9386L7.1381 13.8006C7.01237 13.922 6.84397 13.9892 6.66917 13.9877C6.49437 13.9862 6.32716 13.9161 6.20356 13.7925C6.07995 13.6689 6.00984 13.5017 6.00832 13.3269C6.0068 13.1521 6.074 12.9837 6.19544 12.8579L9.05744 9.99592L6.19544 7.13392C6.07045 7.00891 6.00024 6.83937 6.00024 6.66259C6.00024 6.48581 6.07045 6.31628 6.19544 6.19126Z",fill:"#212121"})}),IL=()=>B.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:B.jsx("path",{d:"M2 11.3334V4.66671C2 4.31309 2.14048 3.97395 2.39052 3.7239C2.64057 3.47385 2.97971 3.33337 3.33333 3.33337H7.33333L8.66667 4.66671H12.6667C13.0203 4.66671 13.3594 4.80718 13.6095 5.05723C13.8595 5.30728 14 5.64642 14 6.00004V11.3334C14 11.687 13.8595 12.0261 13.6095 12.2762C13.3594 12.5262 13.0203 12.6667 12.6667 12.6667H3.33333C2.97971 12.6667 2.64057 12.5262 2.39052 12.2762C2.14048 12.0261 2 11.687 2 11.3334Z",stroke:"#9E9E9E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Tw=e=>{const t=N.useRef(null),{fileName:n,onChange:r,maxFile:i,maxSize:a=2,validateFile:o,error:s,label:l,inputProps:u,priorityError:c="external",eventError:p}=e,g=o||["image/png","image/jpeg","image/jpg"],[d,m]=N.useState(""),b={internal:d||s,external:s||d},y=C=>{if(C!=null&&C.length){const S=C[0],_=S.size/1024/1024;let E="";if(g.some(x=>{var h;return(h=C[0].type)==null?void 0:h.includes(x)})?_>a?E=`${C.length>1?"Jumlah u":"U"}kuran berkas tidak boleh melebihi ${a}MB.`:r(S):E="Berkas tidak didukung, silahkan pilih file kembali.",m(E),p==null||p(E),!(t!=null&&t.current))return;t.current.value=""}},f=C=>{var S;C.preventDefault(),t!=null&&t.current&&((S=t.current)==null||S.click())},v=C=>{C.preventDefault(),t!=null&&t.current&&(r(null),t.current.value="")};return B.jsxs(B.Fragment,{children:[B.jsx("input",{accept:g==null?void 0:g.join(", "),ref:t,hidden:!0,type:"file",max:i,onChange:C=>{y(C.target.files)}}),B.jsx(Og,{sizeInput:"medium",placeholder:"Pilih Berkas",label:l,value:n,readOnly:!0,onClick:C=>f(C),startIcon:B.jsx(IL,{}),endIcon:n&&B.jsx("div",{className:wL["button-remove"],onClick:C=>v(C),children:B.jsx(_L,{})}),error:b[c],...u})]})};Tw.displayName="UploadFile";const DL=({children:e,maxWidth:t,moreElement:n,style:r={},className:i,gap:a=0,gapStyle:o,...s})=>{const l=N.useMemo(()=>N.Children.toArray(e),[e]),u=l.length,[c,p]=N.useState(u),g=N.useRef(null),d=N.useRef([]),m=N.useRef(null);d.current=[];const b=()=>{const C=g.current,S=m.current;if(!C||C.offsetWidth===0)return;const _=C.offsetWidth,E=d.current.map(P=>P?P.offsetWidth:0),x=E.reduce((P,k)=>P+k,0),h=Math.max(0,u-1)*a;if(x+h<=_){p(u);return}const D=S?S.offsetWidth+a:0,I=_-D;let T=0,F=0;for(let P=0;P<u;P++){const k=E[P],R=P>0?a:0;if(T+k+R>I)break;T+=k+R,F++}p(F)};N.useLayoutEffect(()=>{b();const C=new ResizeObserver(b);return g.current&&C.observe(g.current),()=>{C.disconnect()}},[l,a]);const y=u-c,f={display:"flex",flexWrap:"nowrap",alignItems:"center",overflow:"hidden",gap:o??`${a}px`,maxWidth:t,minHeight:"38px",...r},v={position:"fixed",top:"-9999px",left:"-9999px",visibility:"hidden",pointerEvents:"none",zIndex:-1,display:"flex",flexWrap:"nowrap",alignItems:"center",gap:o??`${a}px`};return B.jsxs(B.Fragment,{children:[B.jsxs("div",{ref:g,style:f,className:i??"",...s,children:[l.slice(0,c),y>0&&n(y)]}),B.jsxs("div",{style:v,"aria-hidden":"true",children:[l.map((C,S)=>N.cloneElement(C,{ref:_=>d.current[S]=_,key:`measure-${C.key||S}`})),u>0&&B.jsx("span",{ref:m,children:n(u)})]})]})},TL="_container_ifvu2_1",AL="_image_ifvu2_8",si={container:TL,"image-content":"_image-content_ifvu2_8",image:AL,"text-desc":"_text-desc_ifvu2_25","action-content":"_action-content_ifvu2_43","button-content":"_button-content_ifvu2_52","text-error":"_text-error_ifvu2_67"},RL=({className:e})=>B.jsx("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:`iru-h-5 iru-w-5 iru-text-red-600 ${e??""}`,fill:"currentColor",children:B.jsx("g",{id:"x",children:B.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:`M6.19544 6.19126C6.32045 6.06628 6.48999 5.99607 6.66677 5.99607C6.84354 5.99607 7.01308 6.06628 7.1381 \r
|
|
152
|
-
6.19126L10.0001 9.05326L12.8621 6.19126C12.9236 6.12758 12.9972 6.0768 13.0785 6.04186C13.1598 6.00692 13.2473 \r
|
|
153
|
-
5.98853 13.3358 5.98776C13.4244 5.98699 13.5121 6.00386 13.5941 6.03738C13.676 6.0709 13.7504 6.1204 13.813 \r
|
|
154
|
-
6.18299C13.8756 6.24559 13.9251 6.32002 13.9587 6.40195C13.9922 6.48389 14.009 6.57167 14.0083 6.66019C14.0075 \r
|
|
155
|
-
6.74871 13.9891 6.83619 13.9542 6.91753C13.9192 6.99886 13.8684 7.07243 13.8048 7.13392L10.9428 9.99592L13.8048 \r
|
|
156
|
-
12.8579C13.9262 12.9837 13.9934 13.1521 13.9919 13.3269C13.9904 13.5017 13.9203 13.6689 13.7966 13.7925C13.673 \r
|
|
157
|
-
13.9161 13.5058 13.9862 13.331 13.9877C13.1562 13.9892 12.9878 13.922 12.8621 13.8006L10.0001 10.9386L7.1381 \r
|
|
158
|
-
13.8006C7.01237 13.922 6.84397 13.9892 6.66917 13.9877C6.49437 13.9862 6.32716 13.9161 6.20356 13.7925C6.07995 \r
|
|
159
|
-
13.6689 6.00984 13.5017 6.00832 13.3269C6.0068 13.1521 6.074 12.9837 6.19544 12.8579L9.05744 9.99592L6.19544 \r
|
|
160
|
-
7.13392C6.07045 7.00891 6.00024 6.83937 6.00024 6.66259C6.00024 6.48581 6.07045 6.31628 6.19544 6.19126Z`})})}),BL=({className:e})=>B.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`iru-h-5 iru-w-5 ${e??""}`,children:B.jsx("g",{id:"upload",children:B.jsx("path",{id:"Vector",d:`M3.83337 13.3333V14.1666C3.83337 14.8297 4.09677 15.4656 4.56561 15.9344C5.03445 16.4033 5.67033 \r
|
|
161
|
-
16.6666 6.33337 16.6666H14.6667C15.3297 16.6666 15.9656 16.4033 16.4345 15.9344C16.9033 15.4656 17.1667 \r
|
|
162
|
-
14.8297 17.1667 14.1666V13.3333M13.8334 6.66665L10.5 3.33331M10.5 3.33331L7.16671 6.66665M10.5 3.33331V13.3333`,stroke:"#1976D2",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),$L=({onChange:e,valueUrl:t,validateFile:n,validateFileDesc:r="Max 2MB (.jpg, .jpeg, .png, .svg)",maxSize:i=2,icon:a,desc:o,classNameContainer:s,classNameImage:l,classNameAction:u,id:c})=>{const p=N.useRef(null),g=n||["image/png","image/jpeg","image/jpg"],[d,m]=N.useState(""),[b,y]=N.useState(""),f=S=>{if(S!=null&&S.length){const _=S[0],E=_.size/1024/1024;if(!g.some(x=>{var h;return(h=S[0].type)==null?void 0:h.includes(x)}))y("Berkas tidak didukung, silahkan pilih file kembali.");else if(E>i){const x=`${S.length>1?"Jumlah u":"U"}kuran berkas tidak boleh melebihi ${i}MB.`;y(x)}else{if(!(p!=null&&p.current))return;y(""),e(_),m(URL.createObjectURL(_)),p.current.value=""}}},v=S=>{S.preventDefault(),f(S.dataTransfer.files)},C=S=>{S.preventDefault(),p!=null&&p.current&&(typeof e=="function"&&e(null),m(""),p.current.value="")};return B.jsxs("div",{className:`${si.container} ${s}`,children:[B.jsx("input",{accept:g==null?void 0:g.join(", "),ref:p,hidden:!0,type:"file",multiple:!1,onChange:S=>{S.target.files&&f(S.target.files)}}),d||t?B.jsx("div",{id:`${c}-exist`,className:`${si["image-content"]} ${l}`,onDrop:v,onDragOver:S=>S.preventDefault(),onDragLeave:S=>S.preventDefault(),children:B.jsx("img",{src:d||t,alt:"upload-image",className:`${si.image} ${l}`})}):B.jsxs("div",{id:c,className:`${si["image-content"]} ${l}`,onDrop:v,onDragOver:S=>S.preventDefault(),onDragLeave:S=>S.preventDefault(),children:[a,B.jsx("div",{className:si["text-desc"],children:typeof o=="function"?o():o})]}),B.jsxs("div",{className:si["action-content"],children:[B.jsxs("div",{className:`${si["button-content"]} ${u}`,children:[(d||t)&&B.jsx(Pn,{id:`${c}-delete-img`,variants:"tertiary-red-600",size:"xs",startIcon:B.jsx(RL,{}),onClick:S=>C(S),children:"Hapus"}),B.jsxs(Pn,{id:`${c}-change-img`,variants:"tertiary-blue-700",size:"xs",onClick:()=>{var S;return(S=p.current)==null?void 0:S.click()},startIcon:B.jsx(BL,{}),children:[d||t?"Ganti":"Pilih"," Gambar"]})]}),B.jsx("p",{className:si["text-desc"],children:r}),b&&B.jsx("p",{className:si["text-error"],children:b})]})]})},kL="_container_1708w_1",PL="_label_1708w_6",FL="_disabled_1708w_17",NL="_textarea_1708w_26",ML="_error_1708w_75",mn={container:kL,"size-medium":"_size-medium_1708w_1",label:PL,disabled:FL,"container-textarea":"_container-textarea_1708w_20",textarea:NL,error:ML,"label-error":"_label-error_1708w_85","size-medium-border-bottom":"_size-medium-border-bottom_1708w_99","size-m":"_size-m_1708w_1","solid-blue-300":"_solid-blue-300_1708w_295","dashed-blue-300":"_dashed-blue-300_1708w_310","solid-laba-blue-10":"_solid-laba-blue-10_1708w_322","dashed-laba-blue-10":"_dashed-laba-blue-10_1708w_337","border-bottom-laba-blue-08":"_border-bottom-laba-blue-08_1708w_349"},Ah={size:{m:mn["size-m"],medium:mn["size-medium"],"medium-border-bottom":mn["size-medium-border-bottom"]},variant:{"solid-blue-300":{border:0,style:mn["solid-blue-300"]},"dashed-blue-300":{border:3.7,style:mn["dashed-blue-300"]},"solid-laba-blue-10":{border:0,style:mn["solid-laba-blue-10"]},"dashed-laba-blue-10":{border:3.7,style:mn["dashed-laba-blue-10"]},"border-bottom-laba-blue-08":{border:1,style:mn["border-bottom-laba-blue-08"]}}},Aw=N.forwardRef((e,t)=>{const{isRequired:n,classNameContainer:r,className:i,classNameLabel:a,classNameLabelError:o,name:s,id:l,label:u,error:c,height:p,minHeight:g=94,maxHeight:d=150,style:m,sizeInput:b="m",variant:y="solid-blue-300",...f}=e,v=N.useRef(null),C=yd(v,t),S={...m??{},maxHeight:d,height:p??g,minHeight:g},[_,E]=N.useState(!1),x=function(D){var I;E(!0),(I=e.onFocus)==null||I.call(e,D)},h=function(D){var I;E(!1),(I=e.onBlur)==null||I.call(e,D)},w=function(D){const I=(D==null?void 0:D.target)??v.current;I.style.height="0px",I.style.height=I.scrollHeight+Ah.variant[y].border+"px"};return vd(()=>(_&&v.current?v.current.addEventListener("input",w):w(),()=>{var D;(D=v.current)==null||D.removeEventListener("input",w)}),[_]),B.jsxs("div",{className:`${mn.container}
|
|
163
|
-
${Ah.size[b]}
|
|
164
|
-
${Ah.variant[y].style}
|
|
165
|
-
${r??""}`,children:[u&&B.jsxs("label",{htmlFor:l??s,className:`${mn.label} ${f.disabled?mn.disabled:""} ${a??""}`,children:[u," ",n&&B.jsx("span",{className:"iru-text-laba-red-08",children:"*"})]}),B.jsx("div",{className:`${mn["container-textarea"]}`,children:B.jsx("textarea",{id:l??s,className:` ${c?mn.error:""}
|
|
166
|
-
${mn.textarea}
|
|
167
|
-
${i??""}`,ref:C,style:S,...f,onFocus:x,onBlur:h})}),c&&B.jsx("label",{className:`${mn["label-error"]}
|
|
168
|
-
${f.disabled?mn.disabled:""} ${o??""}`,children:c})]})});Aw.displayName="Textarea";/*!
|
|
169
|
-
* @kurkle/color v0.3.2
|
|
170
|
-
* https://github.com/kurkle/color#readme
|
|
171
|
-
* (c) 2023 Jukka Kurkela
|
|
172
|
-
* Released under the MIT License
|
|
173
|
-
*/function Ll(e){return e+.5|0}const Yi=(e,t,n)=>Math.max(Math.min(e,n),t);function _s(e){return Yi(Ll(e*2.55),0,255)}function ta(e){return Yi(Ll(e*255),0,255)}function fi(e){return Yi(Ll(e/2.55)/100,0,1)}function Qv(e){return Yi(Ll(e*100),0,100)}const er={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ag=[..."0123456789ABCDEF"],OL=e=>ag[e&15],LL=e=>ag[(e&240)>>4]+ag[e&15],xu=e=>(e&240)>>4===(e&15),VL=e=>xu(e.r)&&xu(e.g)&&xu(e.b)&&xu(e.a);function HL(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&er[e[1]]*17,g:255&er[e[2]]*17,b:255&er[e[3]]*17,a:t===5?er[e[4]]*17:255}:(t===7||t===9)&&(n={r:er[e[1]]<<4|er[e[2]],g:er[e[3]]<<4|er[e[4]],b:er[e[5]]<<4|er[e[6]],a:t===9?er[e[7]]<<4|er[e[8]]:255})),n}const jL=(e,t)=>e<255?t(e):"";function zL(e){var t=VL(e)?OL:LL;return e?"#"+t(e.r)+t(e.g)+t(e.b)+jL(e.a,t):void 0}const GL=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Rw(e,t,n){const r=t*Math.min(n,1-n),i=(a,o=(a+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function WL(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function UL(e,t,n){const r=Rw(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function XL(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function em(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;let l,u,c;return a!==o&&(c=a-o,u=s>.5?c/(2-a-o):c/(a+o),l=XL(n,r,i,c,a),l=l*60+.5),[l|0,u||0,s]}function tm(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ta)}function nm(e,t,n){return tm(Rw,e,t,n)}function YL(e,t,n){return tm(UL,e,t,n)}function KL(e,t,n){return tm(WL,e,t,n)}function Bw(e){return(e%360+360)%360}function ZL(e){const t=GL.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?_s(+t[5]):ta(+t[5]));const i=Bw(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=YL(i,a,o):t[1]==="hsv"?r=KL(i,a,o):r=nm(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function qL(e,t){var n=em(e);n[0]=Bw(n[0]+t),n=nm(n),e.r=n[0],e.g=n[1],e.b=n[2]}function JL(e){if(!e)return;const t=em(e),n=t[0],r=Qv(t[1]),i=Qv(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${fi(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const ey={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},ty={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function QL(){const e={},t=Object.keys(ty),n=Object.keys(ey);let r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,ey[a]);a=parseInt(ty[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let Cu;function eV(e){Cu||(Cu=QL(),Cu.transparent=[0,0,0,0]);const t=Cu[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const tV=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function nV(e){const t=tV.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?_s(o):Yi(o*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?_s(r):Yi(r,0,255)),i=255&(t[4]?_s(i):Yi(i,0,255)),a=255&(t[6]?_s(a):Yi(a,0,255)),{r,g:i,b:a,a:n}}}function rV(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${fi(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Rh=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ho=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function iV(e,t,n){const r=ho(fi(e.r)),i=ho(fi(e.g)),a=ho(fi(e.b));return{r:ta(Rh(r+n*(ho(fi(t.r))-r))),g:ta(Rh(i+n*(ho(fi(t.g))-i))),b:ta(Rh(a+n*(ho(fi(t.b))-a))),a:e.a+n*(t.a-e.a)}}function Eu(e,t,n){if(e){let r=em(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=nm(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function $w(e,t){return e&&Object.assign(t||{},e)}function ny(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ta(e[3]))):(t=$w(e,{r:0,g:0,b:0,a:1}),t.a=ta(t.a)),t}function aV(e){return e.charAt(0)==="r"?nV(e):ZL(e)}class cl{constructor(t){if(t instanceof cl)return t;const n=typeof t;let r;n==="object"?r=ny(t):n==="string"&&(r=HL(t)||eV(t)||aV(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=$w(this._rgb);return t&&(t.a=fi(t.a)),t}set rgb(t){this._rgb=ny(t)}rgbString(){return this._valid?rV(this._rgb):void 0}hexString(){return this._valid?zL(this._rgb):void 0}hslString(){return this._valid?JL(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const o=n===a?.5:n,s=2*o-1,l=r.a-i.a,u=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-u,r.r=255&u*r.r+a*i.r+.5,r.g=255&u*r.g+a*i.g+.5,r.b=255&u*r.b+a*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=iV(this._rgb,t._rgb,n)),this}clone(){return new cl(this.rgb)}alpha(t){return this._rgb.a=ta(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Ll(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Eu(this._rgb,2,t),this}darken(t){return Eu(this._rgb,2,-t),this}saturate(t){return Eu(this._rgb,1,t),this}desaturate(t){return Eu(this._rgb,1,-t),this}rotate(t){return qL(this._rgb,t),this}}/*!
|
|
174
|
-
* Chart.js v4.5.1
|
|
175
|
-
* https://www.chartjs.org
|
|
176
|
-
* (c) 2025 Chart.js Contributors
|
|
177
|
-
* Released under the MIT License
|
|
178
|
-
*/function li(){}const oV=(()=>{let e=0;return()=>e++})();function tt(e){return e==null}function Mt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function ze(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function xn(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Br(e,t){return xn(e)?e:t}function He(e,t){return typeof e>"u"?t:e}const sV=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,kw=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function dt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function it(e,t,n,r){let i,a,o;if(Mt(e))for(a=e.length,i=0;i<a;i++)t.call(n,e[i],i);else if(ze(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])}function Vc(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function Hc(e){if(Mt(e))return e.map(Hc);if(ze(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Hc(e[n[i]]);return t}return e}function Pw(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function lV(e,t,n,r){if(!Pw(e))return;const i=t[e],a=n[e];ze(i)&&ze(a)?dl(i,a,r):t[e]=Hc(a)}function dl(e,t,n){const r=Mt(t)?t:[t],i=r.length;if(!ze(e))return e;n=n||{};const a=n.merger||lV;let o;for(let s=0;s<i;++s){if(o=r[s],!ze(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)a(l[u],e,o,n)}return e}function Fs(e,t){return dl(e,t,{merger:uV})}function uV(e,t,n){if(!Pw(e))return;const r=t[e],i=n[e];ze(r)&&ze(i)?Fs(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Hc(i))}const ry={"":e=>e,x:e=>e.x,y:e=>e.y};function cV(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function dV(e){const t=cV(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Xa(e,t){return(ry[t]||(ry[t]=dV(t)))(e)}function rm(e){return e.charAt(0).toUpperCase()+e.slice(1)}const fl=e=>typeof e<"u",oa=e=>typeof e=="function",iy=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function fV(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const at=Math.PI,Et=2*at,hV=Et+at,jc=Number.POSITIVE_INFINITY,gV=at/180,Gt=at/2,ba=at/4,ay=at*2/3,Fw=Math.log10,Kr=Math.sign;function Ns(e,t,n){return Math.abs(e-t)<n}function oy(e){const t=Math.round(e);e=Ns(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Fw(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function pV(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,a)=>i-a).pop(),t}function mV(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function hl(e){return!mV(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function bV(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function vV(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function yi(e){return e*(at/180)}function yV(e){return e*(180/at)}function sy(e){if(!xn(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Nw(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let a=Math.atan2(r,n);return a<-.5*at&&(a+=Et),{angle:a,distance:i}}function og(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function xV(e,t){return(e-t+hV)%Et-at}function Hn(e){return(e%Et+Et)%Et}function gl(e,t,n,r){const i=Hn(e),a=Hn(t),o=Hn(n),s=Hn(a-i),l=Hn(o-i),u=Hn(i-a),c=Hn(i-o);return i===a||i===o||r&&a===o||s>l&&u<c}function vn(e,t,n){return Math.max(t,Math.min(n,e))}function CV(e){return vn(e,-32768,32767)}function xi(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function im(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}const Ra=(e,t,n,r)=>im(e,n,r?i=>{const a=e[i][t];return a<n||a===n&&e[i+1][t]===n}:i=>e[i][t]<n),EV=(e,t,n)=>im(e,n,r=>e[r][t]>=n);function SV(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const Mw=["push","pop","shift","splice","unshift"];function wV(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Mw.forEach(n=>{const r="_onData"+rm(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...a)}),o}})})}function ly(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(Mw.forEach(a=>{delete e[a]}),delete e._chartjs)}function Ow(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Lw=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Vw(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Lw.call(window,()=>{r=!1,e.apply(t,n)}))}}function _V(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const am=e=>e==="start"?"left":e==="end"?"right":"center",pn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,IV=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function DV(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:o,vScale:s,_parsed:l}=e,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,c=o.axis,{min:p,max:g,minDefined:d,maxDefined:m}=o.getUserBounds();if(d){if(i=Math.min(Ra(l,c,p).lo,n?r:Ra(t,c,o.getPixelForValue(p)).lo),u){const b=l.slice(0,i+1).reverse().findIndex(y=>!tt(y[s.axis]));i-=Math.max(0,b)}i=vn(i,0,r-1)}if(m){let b=Math.max(Ra(l,o.axis,g,!0).hi+1,n?0:Ra(t,c,o.getPixelForValue(g),!0).hi+1);if(u){const y=l.slice(b-1).findIndex(f=>!tt(f[s.axis]));b+=Math.max(0,y)}a=vn(b,i,r)-i}else a=r-i}return{start:i,count:a}}function TV(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const Su=e=>e===0||e===1,uy=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Et/n)),cy=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Et/n)+1,Ms={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Gt)+1,easeOutSine:e=>Math.sin(e*Gt),easeInOutSine:e=>-.5*(Math.cos(at*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Su(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Su(e)?e:uy(e,.075,.3),easeOutElastic:e=>Su(e)?e:cy(e,.075,.3),easeInOutElastic(e){return Su(e)?e:e<.5?.5*uy(e*2,.1125,.45):.5+.5*cy(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Ms.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Ms.easeInBounce(e*2)*.5:Ms.easeOutBounce(e*2-1)*.5+.5};function om(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function dy(e){return om(e)?e:new cl(e)}function Bh(e){return om(e)?e:new cl(e).saturate(.5).darken(.1).hexString()}const AV=["x","y","borderWidth","radius","tension"],RV=["color","borderColor","backgroundColor"];function BV(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:RV},numbers:{type:"number",properties:AV}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function $V(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const fy=new Map;function kV(e,t){t=t||{};const n=e+JSON.stringify(t);let r=fy.get(n);return r||(r=new Intl.NumberFormat(e,t),fy.set(n,r)),r}function sm(e,t,n){return kV(t,n).format(e)}const PV={values(e){return Mt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),a=FV(e,n)}const o=Fw(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),sm(e,r,l)}};function FV(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Hw={formatters:PV};function NV(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Hw.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ya=Object.create(null),sg=Object.create(null);function Os(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const a=n[r];e=e[a]||(e[a]=Object.create(null))}return e}function $h(e,t,n){return typeof t=="string"?dl(Os(e,t),n):dl(Os(e,""),t)}class MV{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Bh(i.backgroundColor),this.hoverBorderColor=(r,i)=>Bh(i.borderColor),this.hoverColor=(r,i)=>Bh(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return $h(this,t,n)}get(t){return Os(this,t)}describe(t,n){return $h(sg,t,n)}override(t,n){return $h(Ya,t,n)}route(t,n,r,i){const a=Os(this,t),o=Os(this,r),s="_"+n;Object.defineProperties(a,{[s]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],u=o[i];return ze(l)?Object.assign({},u,l):He(l,u)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var At=new MV({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[BV,$V,NV]);function OV(e){return!e||tt(e.size)||tt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function hy(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function va(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function gy(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function lg(e,t,n,r){jw(e,t,n,r,null)}function jw(e,t,n,r,i){let a,o,s,l,u,c,p,g;const d=t.pointStyle,m=t.rotation,b=t.radius;let y=(m||0)*gV;if(d&&typeof d=="object"&&(a=d.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(y),e.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),e.restore();return}if(!(isNaN(b)||b<=0)){switch(e.beginPath(),d){default:i?e.ellipse(n,r,i/2,b,0,0,Et):e.arc(n,r,b,0,Et),e.closePath();break;case"triangle":c=i?i/2:b,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*b),y+=ay,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*b),y+=ay,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*b),e.closePath();break;case"rectRounded":u=b*.516,l=b-u,o=Math.cos(y+ba)*l,p=Math.cos(y+ba)*(i?i/2-u:l),s=Math.sin(y+ba)*l,g=Math.sin(y+ba)*(i?i/2-u:l),e.arc(n-p,r-s,u,y-at,y-Gt),e.arc(n+g,r-o,u,y-Gt,y),e.arc(n+p,r+s,u,y,y+Gt),e.arc(n-g,r+o,u,y+Gt,y+at),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*b,c=i?i/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=ba;case"rectRot":p=Math.cos(y)*(i?i/2:b),o=Math.cos(y)*b,s=Math.sin(y)*b,g=Math.sin(y)*(i?i/2:b),e.moveTo(n-p,r-s),e.lineTo(n+g,r-o),e.lineTo(n+p,r+s),e.lineTo(n-g,r+o),e.closePath();break;case"crossRot":y+=ba;case"cross":p=Math.cos(y)*(i?i/2:b),o=Math.cos(y)*b,s=Math.sin(y)*b,g=Math.sin(y)*(i?i/2:b),e.moveTo(n-p,r-s),e.lineTo(n+p,r+s),e.moveTo(n+g,r-o),e.lineTo(n-g,r+o);break;case"star":p=Math.cos(y)*(i?i/2:b),o=Math.cos(y)*b,s=Math.sin(y)*b,g=Math.sin(y)*(i?i/2:b),e.moveTo(n-p,r-s),e.lineTo(n+p,r+s),e.moveTo(n+g,r-o),e.lineTo(n-g,r+o),y+=ba,p=Math.cos(y)*(i?i/2:b),o=Math.cos(y)*b,s=Math.sin(y)*b,g=Math.sin(y)*(i?i/2:b),e.moveTo(n-p,r-s),e.lineTo(n+p,r+s),e.moveTo(n+g,r-o),e.lineTo(n-g,r+o);break;case"line":o=i?i/2:Math.cos(y)*b,s=Math.sin(y)*b,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(y)*(i?i/2:b),r+Math.sin(y)*b);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function pl(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Fd(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Nd(e){e.restore()}function LV(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function VV(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function HV(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),tt(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function jV(e,t,n,r,i){if(i.strikethrough||i.underline){const a=e.measureText(r),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,u=n+a.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,c),e.lineTo(s,c),e.stroke()}}function zV(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function ml(e,t,n,r,i,a={}){const o=Mt(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,u;for(e.save(),e.font=i.string,HV(e,a),l=0;l<o.length;++l)u=o[l],a.backdrop&&zV(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),tt(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(u,n,r,a.maxWidth)),e.fillText(u,n,r,a.maxWidth),jV(e,n,r,u,a),r+=Number(i.lineHeight);e.restore()}function zc(e,t){const{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*at,at,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,at,Gt,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,Gt,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-Gt,!0),e.lineTo(n+o.topLeft,r)}const GV=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,WV=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function UV(e,t){const n=(""+e).match(GV);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const XV=e=>+e||0;function lm(e,t){const n={},r=ze(t),i=r?Object.keys(t):t,a=ze(e)?r?o=>He(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=XV(a(o));return n}function zw(e){return lm(e,{top:"y",right:"x",bottom:"y",left:"x"})}function No(e){return lm(e,["topLeft","topRight","bottomLeft","bottomRight"])}function dr(e){const t=zw(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function yn(e,t){e=e||{},t=t||At.font;let n=He(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=He(e.style,t.style);r&&!(""+r).match(WV)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:He(e.family,t.family),lineHeight:UV(He(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:He(e.weight,t.weight),string:""};return i.string=OV(i),i}function wu(e,t,n,r){let i,a,o;for(i=0,a=e.length;i<a;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function YV(e,t,n){const{min:r,max:i}=e,a=kw(t,(i-r)/2),o=(s,l)=>n&&s===0?0:s+l;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function eo(e,t){return Object.assign(Object.create(e),t)}function um(e,t=[""],n,r,i=()=>e[0]){const a=n||e;typeof r>"u"&&(r=Xw("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:s=>um([s,...e],t,a,r)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return Ww(s,l,()=>nH(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return my(s).includes(l)},ownKeys(s){return my(s)},set(s,l,u){const c=s._storage||(s._storage=i());return s[l]=c[l]=u,delete s._keys,!0}})}function Uo(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Gw(e,r),setContext:a=>Uo(e,a,n,r),override:a=>Uo(e.override(a),t,n,r)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete e[o],!0},get(a,o,s){return Ww(a,o,()=>ZV(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(a,o,s){return e[o]=s,delete a[o],!0}})}function Gw(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:oa(n)?n:()=>n,isIndexable:oa(r)?r:()=>r}}const KV=(e,t)=>e?e+rm(t):t,cm=(e,t)=>ze(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ww(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function ZV(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e;let s=r[t];return oa(s)&&o.isScriptable(t)&&(s=qV(t,s,e,n)),Mt(s)&&s.length&&(s=JV(t,s,e,o.isIndexable)),cm(t,s)&&(s=Uo(s,i,a&&a[t],o)),s}function qV(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,o||r);return s.delete(e),cm(e,l)&&(l=dm(i._scopes,i,e,l)),l}function JV(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(typeof a.index<"u"&&r(e))return t[a.index%t.length];if(ze(t[0])){const l=t,u=i._scopes.filter(c=>c!==l);t=[];for(const c of l){const p=dm(u,i,e,c);t.push(Uo(p,a,o&&o[e],s))}}return t}function Uw(e,t,n){return oa(e)?e(t,n):e}const QV=(e,t)=>e===!0?t:typeof e=="string"?Xa(t,e):void 0;function eH(e,t,n,r,i){for(const a of t){const o=QV(n,a);if(o){e.add(o);const s=Uw(o._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function dm(e,t,n,r){const i=t._rootScopes,a=Uw(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let l=py(s,o,n,a||n,r);return l===null||typeof a<"u"&&a!==n&&(l=py(s,o,a,l,r),l===null)?!1:um(Array.from(s),[""],i,a,()=>tH(t,n,r))}function py(e,t,n,r,i){for(;n;)n=eH(e,t,n,r,i);return n}function tH(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Mt(i)&&ze(n)?n:i||{}}function nH(e,t,n,r){let i;for(const a of t)if(i=Xw(KV(a,e),n),typeof i<"u")return cm(e,i)?dm(n,r,e,i):i}function Xw(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function my(e){let t=e._keys;return t||(t=e._keys=rH(e._scopes)),t}function rH(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const iH=Number.EPSILON||1e-14,Xo=(e,t)=>t<e.length&&!e[t].skip&&e[t],Yw=e=>e==="x"?"y":"x";function aH(e,t,n,r){const i=e.skip?t:e,a=t,o=n.skip?t:n,s=og(a,i),l=og(o,a);let u=s/(s+l),c=l/(s+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const p=r*u,g=r*c;return{previous:{x:a.x-p*(o.x-i.x),y:a.y-p*(o.y-i.y)},next:{x:a.x+g*(o.x-i.x),y:a.y+g*(o.y-i.y)}}}function oH(e,t,n){const r=e.length;let i,a,o,s,l,u=Xo(e,0);for(let c=0;c<r-1;++c)if(l=u,u=Xo(e,c+1),!(!l||!u)){if(Ns(t[c],0,iH)){n[c]=n[c+1]=0;continue}i=n[c]/t[c],a=n[c+1]/t[c],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),n[c]=i*o*t[c],n[c+1]=a*o*t[c])}}function sH(e,t,n="x"){const r=Yw(n),i=e.length;let a,o,s,l=Xo(e,0);for(let u=0;u<i;++u){if(o=s,s=l,l=Xo(e,u+1),!s)continue;const c=s[n],p=s[r];o&&(a=(c-o[n])/3,s[`cp1${n}`]=c-a,s[`cp1${r}`]=p-a*t[u]),l&&(a=(l[n]-c)/3,s[`cp2${n}`]=c+a,s[`cp2${r}`]=p+a*t[u])}}function lH(e,t="x"){const n=Yw(t),r=e.length,i=Array(r).fill(0),a=Array(r);let o,s,l,u=Xo(e,0);for(o=0;o<r;++o)if(s=l,l=u,u=Xo(e,o+1),!!l){if(u){const c=u[t]-l[t];i[o]=c!==0?(u[n]-l[n])/c:0}a[o]=s?u?Kr(i[o-1])!==Kr(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}oH(e,i,a),sH(e,a,t)}function _u(e,t,n){return Math.max(Math.min(e,n),t)}function uH(e,t){let n,r,i,a,o,s=pl(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=s,s=n<r-1&&pl(e[n+1],t),a&&(i=e[n],o&&(i.cp1x=_u(i.cp1x,t.left,t.right),i.cp1y=_u(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=_u(i.cp2x,t.left,t.right),i.cp2y=_u(i.cp2y,t.top,t.bottom)))}function cH(e,t,n,r,i){let a,o,s,l;if(t.spanGaps&&(e=e.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")lH(e,i);else{let u=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],l=aH(u,s,e[Math.min(a+1,o-(r?0:1))%o],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,u=s}t.capBezierPoints&&uH(e,n)}function fm(){return typeof window<"u"&&typeof document<"u"}function hm(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Gc(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Md=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function dH(e,t){return Md(e).getPropertyValue(t)}const fH=["top","right","bottom","left"];function Pa(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=fH[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const hH=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function gH(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let o=!1,s,l;if(hH(i,a,e.target))s=i,l=a;else{const u=t.getBoundingClientRect();s=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:s,y:l,box:o}}function Ca(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Md(n),a=i.boxSizing==="border-box",o=Pa(i,"padding"),s=Pa(i,"border","width"),{x:l,y:u,box:c}=gH(e,n),p=o.left+(c&&s.left),g=o.top+(c&&s.top);let{width:d,height:m}=t;return a&&(d-=o.width+s.width,m-=o.height+s.height),{x:Math.round((l-p)/d*n.width/r),y:Math.round((u-g)/m*n.height/r)}}function pH(e,t,n){let r,i;if(t===void 0||n===void 0){const a=e&&hm(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const o=a.getBoundingClientRect(),s=Md(a),l=Pa(s,"border","width"),u=Pa(s,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=Gc(s.maxWidth,a,"clientWidth"),i=Gc(s.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:r||jc,maxHeight:i||jc}}const Ki=e=>Math.round(e*10)/10;function mH(e,t,n,r){const i=Md(e),a=Pa(i,"margin"),o=Gc(i.maxWidth,e,"clientWidth")||jc,s=Gc(i.maxHeight,e,"clientHeight")||jc,l=pH(e,t,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const g=Pa(i,"border","width"),d=Pa(i,"padding");u-=d.width+g.width,c-=d.height+g.height}return u=Math.max(0,u-a.width),c=Math.max(0,r?u/r:c-a.height),u=Ki(Math.min(u,o,l.maxWidth)),c=Ki(Math.min(c,s,l.maxHeight)),u&&!c&&(c=Ki(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Ki(Math.floor(c*r))),{width:u,height:c}}function by(e,t,n){const r=t||1,i=Ki(e.height*r),a=Ki(e.width*r);e.height=Ki(e.height),e.width=Ki(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const bH=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};fm()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function vy(e,t){const n=dH(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ea(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function vH(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function yH(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=Ea(e,i,n),s=Ea(i,a,n),l=Ea(a,t,n),u=Ea(o,s,n),c=Ea(s,l,n);return Ea(u,c,n)}const xH=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},CH=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Mo(e,t,n){return e?xH(t,n):CH()}function Kw(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function Zw(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function qw(e){return e==="angle"?{between:gl,compare:xV,normalize:Hn}:{between:xi,compare:(t,n)=>t-n,normalize:t=>t}}function yy({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function EH(e,t,n){const{property:r,start:i,end:a}=n,{between:o,normalize:s}=qw(r),l=t.length;let{start:u,end:c,loop:p}=e,g,d;if(p){for(u+=l,c+=l,g=0,d=l;g<d&&o(s(t[u%l][r]),i,a);++g)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:p,style:e.style}}function Jw(e,t,n){if(!n)return[e];const{property:r,start:i,end:a}=n,o=t.length,{compare:s,between:l,normalize:u}=qw(r),{start:c,end:p,loop:g,style:d}=EH(e,t,n),m=[];let b=!1,y=null,f,v,C;const S=()=>l(i,C,f)&&s(i,C)!==0,_=()=>s(a,f)===0||l(a,C,f),E=()=>b||S(),x=()=>!b||_();for(let h=c,w=c;h<=p;++h)v=t[h%o],!v.skip&&(f=u(v[r]),f!==C&&(b=l(f,i,a),y===null&&E()&&(y=s(f,i)===0?h:w),y!==null&&x()&&(m.push(yy({start:y,end:h,loop:g,count:o,style:d})),y=null),w=h,C=f));return y!==null&&m.push(yy({start:y,end:p,loop:g,count:o,style:d})),m}function Qw(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const a=Jw(r[i],e.points,t);a.length&&n.push(...a)}return n}function SH(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function wH(e,t,n,r){const i=e.length,a=[];let o=t,s=e[t],l;for(l=t+1;l<=n;++l){const u=e[l%i];u.skip||u.stop?s.skip||(r=!1,a.push({start:t%i,end:(l-1)%i,loop:r}),t=o=u.stop?l:null):(o=l,s.skip&&(t=l)),s=u}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function _H(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=SH(n,i,a,r);if(r===!0)return xy(e,[{start:o,end:s,loop:a}],n,t);const l=s<o?s+i:s,u=!!e._fullLoop&&o===0&&s===i-1;return xy(e,wH(n,o,l,u),n,t)}function xy(e,t,n,r){return!r||!r.setContext||!n?t:IH(e,t,n,r)}function IH(e,t,n,r){const i=e._chart.getContext(),a=Cy(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,l=n.length,u=[];let c=a,p=t[0].start,g=p;function d(m,b,y,f){const v=s?-1:1;if(m!==b){for(m+=l;n[m%l].skip;)m-=v;for(;n[b%l].skip;)b+=v;m%l!==b%l&&(u.push({start:m%l,end:b%l,loop:y,style:f}),c=f,p=b%l)}}for(const m of t){p=s?p:m.start;let b=n[p%l],y;for(g=p+1;g<=m.end;g++){const f=n[g%l];y=Cy(r.setContext(eo(i,{type:"segment",p0:b,p1:f,p0DataIndex:(g-1)%l,p1DataIndex:g%l,datasetIndex:o}))),DH(y,c)&&d(p,g-1,m.loop,c),b=f,c=y}p<g-1&&d(p,g-1,m.loop,c)}return u}function Cy(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function DH(e,t){if(!t)return!1;const n=[],r=function(i,a){return om(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function Iu(e,t,n){return e.options.clip?e[n]:t[n]}function TH(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Iu(n,t,"left"),right:Iu(n,t,"right"),top:Iu(r,t,"top"),bottom:Iu(r,t,"bottom")}:t}function e_(e,t){const n=t._clip;if(n.disabled)return!1;const r=TH(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
179
|
-
* Chart.js v4.5.1
|
|
180
|
-
* https://www.chartjs.org
|
|
181
|
-
* (c) 2025 Chart.js Contributors
|
|
182
|
-
* Released under the MIT License
|
|
183
|
-
*/class AH{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const a=n.listeners[i],o=n.duration;a.forEach(s=>s({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Lw.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ui=new AH;const Ey="transparent",RH={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=dy(e||Ey),i=r.valid&&dy(t||Ey);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class BH{constructor(t,n,r,i){const a=n[r];i=wu([t.to,i,a,t.from]);const o=wu([t.from,a,i]);this._active=!0,this._fn=t.fn||RH[t.type||typeof o],this._easing=Ms[t.easing]||Ms.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,o=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=wu([t.to,n,i,t.from]),this._from=wu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=a;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class t_{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!ze(t))return;const n=Object.keys(At.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!ze(a))return;const o={};for(const s of n)o[s]=a[s];(Mt(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,o)})})}_animateOptions(t,n){const r=n.options,i=kH(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&$H(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,n){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(n),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[u];let p=a[u];const g=r.get(u);if(p)if(g&&p.active()){p.update(g,c,s);continue}else p.cancel();if(!g||!g.duration){t[u]=c;continue}a[u]=p=new BH(g,t,u,c),i.push(p)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return ui.add(this._chart,r),!0}}function $H(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=e[r[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function kH(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Sy(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function PH(e,t,n){if(n===!1)return!1;const r=Sy(e,n),i=Sy(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function FH(e){let t,n,r,i;return ze(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function n_(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function wy(e,t,n,r={}){const i=e.keys,a=r.mode==="single";let o,s,l,u;if(t===null)return;let c=!1;for(o=0,s=i.length;o<s;++o){if(l=+i[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],xn(u)&&(a||t===0||Kr(t)===Kr(u))&&(t+=u)}return!c&&!r.all?0:t}function NH(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",a=r.axis==="x"?"x":"y",o=Object.keys(e),s=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],s[l]={[i]:c,[a]:e[c]};return s}function kh(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function MH(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function OH(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function LH(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function _y(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function Iy(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:s}=r,l=a.axis,u=o.axis,c=MH(a,o,r),p=t.length;let g;for(let d=0;d<p;++d){const m=t[d],{[l]:b,[u]:y}=m,f=m._stacks||(m._stacks={});g=f[u]=LH(i,c,b),g[s]=y,g._top=_y(g,o,!0,r.type),g._bottom=_y(g,o,!1,r.type);const v=g._visualValues||(g._visualValues={});v[s]=y}}function Ph(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function VH(e,t){return eo(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function HH(e,t,n){return eo(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ds(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}const Fh=e=>e==="reset"||e==="none",Dy=(e,t)=>t?e:Object.assign({},e),jH=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:n_(n,!0),values:null};class Fa{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=kh(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ds(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(p,g,d,m)=>p==="x"?g:p==="r"?m:d,a=n.xAxisID=He(r.xAxisID,Ph(t,"x")),o=n.yAxisID=He(r.yAxisID,Ph(t,"y")),s=n.rAxisID=He(r.rAxisID,Ph(t,"r")),l=n.indexAxis,u=n.iAxisID=i(l,a,o,s),c=n.vAxisID=i(l,o,a,s);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ly(this._data,this),t._stacked&&ds(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(ze(n)){const i=this._cachedMeta;this._data=NH(n,i)}else if(r!==n){if(r){ly(r,this);const i=this._cachedMeta;ds(i),i._parsed=[]}n&&Object.isExtensible(n)&&wV(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=kh(n.vScale,n),n.stack!==r.stack&&(i=!0,ds(n),n.stack=r.stack),this._resyncElements(t),(i||a!==n._stacked)&&(Iy(this,n._parsed),n._stacked=kh(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:o}=r,s=a.axis;let l=t===0&&n===i.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,p,g;if(this._parsing===!1)r._parsed=i,r._sorted=!0,g=i;else{Mt(i[t])?g=this.parseArrayData(r,i,t,n):ze(i[t])?g=this.parseObjectData(r,i,t,n):g=this.parsePrimitiveData(r,i,t,n);const d=()=>p[s]===null||u&&p[s]<u[s];for(c=0;c<n;++c)r._parsed[c+t]=p=g[c],l&&(d()&&(l=!1),u=p);r._sorted=l}o&&Iy(this,g)}parsePrimitiveData(t,n,r,i){const{iScale:a,vScale:o}=t,s=a.axis,l=o.axis,u=a.getLabels(),c=a===o,p=new Array(i);let g,d,m;for(g=0,d=i;g<d;++g)m=g+r,p[g]={[s]:c||a.parse(u[m],m),[l]:o.parse(n[m],m)};return p}parseArrayData(t,n,r,i){const{xScale:a,yScale:o}=t,s=new Array(i);let l,u,c,p;for(l=0,u=i;l<u;++l)c=l+r,p=n[c],s[l]={x:a.parse(p[0],c),y:o.parse(p[1],c)};return s}parseObjectData(t,n,r,i){const{xScale:a,yScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,p,g,d;for(c=0,p=i;c<p;++c)g=c+r,d=n[g],u[c]={x:a.parse(Xa(d,s),g),y:o.parse(Xa(d,l),g)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,a=this._cachedMeta,o=n[t.axis],s={keys:n_(i,!0),values:n._stacks[t.axis]._visualValues};return wy(s,o,a.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const a=r[n.axis];let o=a===null?NaN:a;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,o=wy(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,o=i.length,s=this._getOtherScale(t),l=jH(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:p}=OH(s);let g,d;function m(){d=i[g];const b=d[s.axis];return!xn(d[t.axis])||c>b||p<b}for(g=0;g<o&&!(!m()&&(this.updateRangeFromParsed(u,t,d,l),a));++g);if(a){for(g=o-1;g>=0;--g)if(!m()){this.updateRangeFromParsed(u,t,d,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,a,o;for(i=0,a=n.length;i<a;++i)o=n[i][t.axis],xn(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=FH(He(this.options.clip,PH(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],a=n.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,a,s,l),c=s;c<s+l;++c){const p=i[c];p.hidden||(p.active&&u?o.push(p):p.draw(t,a))}for(c=0;c<o.length;++c)o[c].draw(t,a)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=HH(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=VH(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",a=this._cachedDataOpts,o=t+"-"+n,s=a[o],l=this.enableOptionSharing&&fl(r);if(s)return Dy(s,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),p=i?[`${t}Hover`,"hover",t,""]:[t,""],g=u.getOptionScopes(this.getDataset(),c),d=Object.keys(At.elements[t]),m=()=>this.getContext(r,i,n),b=u.resolveNamedOptions(g,d,m,p);return b.$shared&&(b.$shared=l,a[o]=Object.freeze(Dy(b,l))),b}_resolveAnimations(t,n,r){const i=this.chart,a=this._cachedDataOpts,o=`animation-${n}`,s=a[o];if(s)return s;let l;if(i.options.animation!==!1){const c=this.chart.config,p=c.datasetAnimationScopeKeys(this._type,n),g=c.getOptionScopes(this.getDataset(),p);l=c.createResolver(g,this.getContext(t,r,n))}const u=new t_(i,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Fh(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(r),o=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:o}}updateElement(t,n,r,i){Fh(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Fh(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const i=r.length,a=n.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,r=!0){const i=this._cachedMeta,a=i.data,o=t+n;let s;const l=u=>{for(u.length+=n,s=u.length-1;s>=o;s--)u[s]=u[s-n]};for(l(a),s=t;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(a,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&ds(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ce(Fa,"defaults",{}),Ce(Fa,"datasetElementType",null),Ce(Fa,"dataElementType",null);function zH(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=n.length;i<a;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Ow(r.sort((i,a)=>i-a))}return e._cache.$bar}function GH(e){const t=e.iScale,n=zH(t,e.type);let r=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(fl(s)&&(r=Math.min(r,Math.abs(o-s)||r)),s=o)};for(i=0,a=n.length;i<a;++i)o=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),l();return r}function WH(e,t,n,r){const i=n.barThickness;let a,o;return tt(i)?(a=t.min*n.categoryPercentage,o=n.barPercentage):(a=i*r,o=1),{chunk:a/r,ratio:o,start:t.pixels[e]-a/2}}function UH(e,t,n,r){const i=t.pixels,a=i[e];let o=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);const u=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/r,ratio:n.barPercentage,start:u}}function XH(e,t,n,r){const i=n.parse(e[0],r),a=n.parse(e[1],r),o=Math.min(i,a),s=Math.max(i,a);let l=o,u=s;Math.abs(o)>Math.abs(s)&&(l=s,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:i,end:a,min:o,max:s}}function r_(e,t,n,r){return Mt(e)?XH(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Ty(e,t,n,r){const i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,l=[];let u,c,p,g;for(u=n,c=n+r;u<c;++u)g=t[u],p={},p[i.axis]=s||i.parse(o[u],u),l.push(r_(g,p,a,u));return l}function Nh(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function YH(e,t,n){return e!==0?Kr(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function KH(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:r,reverse:t,top:i,bottom:a}}function ZH(e,t,n,r){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:u,bottom:c}=KH(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=u:(n._bottom||0)===r?i=c:(a[Ay(c,o,s,l)]=!0,i=u)),a[Ay(i,o,s,l)]=!0,e.borderSkipped=a}function Ay(e,t,n,r){return r?(e=qH(e,t,n),e=Ry(e,n,t)):e=Ry(e,t,n),e}function qH(e,t,n){return e===t?n:e===n?t:e}function Ry(e,t,n){return e==="start"?t:e==="end"?n:e}function JH(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class qu extends Fa{parsePrimitiveData(t,n,r,i){return Ty(t,n,r,i)}parseArrayData(t,n,r,i){return Ty(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:a,vScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=a.axis==="x"?s:l,c=o.axis==="x"?s:l,p=[];let g,d,m,b;for(g=r,d=r+i;g<d;++g)b=n[g],m={},m[a.axis]=a.parse(Xa(b,u),g),p.push(r_(Xa(b,c),m,o,g));return p}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const a=r._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,a=this.getParsed(t),o=a._custom,s=Nh(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const a=i==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),c=this._getRuler(),{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);for(let d=n;d<n+r;d++){const m=this.getParsed(d),b=a||tt(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(d),y=this._calculateBarIndexPixels(d,c),f=(m._stacks||{})[s.axis],v={horizontal:u,base:b.base,enableBorderRadius:!f||Nh(m._custom)||o===f._top||o===f._bottom,x:u?b.head:y.center,y:u?y.center:b.head,height:u?y.size:Math.abs(b.size),width:u?Math.abs(b.size):y.size};g&&(v.options=p||this.resolveDataElementOptions(d,t[d].active?"active":i));const C=v.options||t[d].options;ZH(v,C,f,o),JH(v,C,c.ratio),this.updateElement(t[d],d,v,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=r.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],u=c=>{const p=c._parsed.find(d=>d[r.axis]===l),g=p&&p[c.vScale.axis];if(tt(g)||isNaN(g))return!0};for(const c of i)if(!(n!==void 0&&u(c))&&((a===!1||o.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[He(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let a,o;for(a=0,o=n.data.length;a<o;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const s=t.barThickness;return{min:s||GH(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:a,minBarLength:o}}=this,s=a||0,l=this.getParsed(t),u=l._custom,c=Nh(u);let p=l[n.axis],g=0,d=r?this.applyStack(n,l,r):p,m,b;d!==p&&(g=d-p,d=p),c&&(p=u.barStart,d=u.barEnd-u.barStart,p!==0&&Kr(p)!==Kr(u.barEnd)&&(g=0),g+=p);const y=!tt(a)&&!c?a:g;let f=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(g+d):m=f,b=m-f,Math.abs(b)<o){b=YH(b,n,s)*o,p===s&&(f-=b/2);const v=n.getPixelForDecimal(0),C=n.getPixelForDecimal(1),S=Math.min(v,C),_=Math.max(v,C);f=Math.max(Math.min(f,_),S),m=f+b,r&&!c&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(f))}if(f===n.getPixelForValue(s)){const v=Kr(b)*n.getLineWidthForValue(s)/2;f+=v,b-=v}return{size:b,base:f,head:m,center:m+b/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,a=i.skipNull,o=He(i.maxBarThickness,1/0);let s,l;const u=this._getAxisCount();if(n.grouped){const c=a?this._getStackCount(t):n.stackCount,p=i.barThickness==="flex"?UH(t,n,i,c*u):WH(t,n,i,c*u),g=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,d=this._getAxis().indexOf(He(g,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+d;s=p.start+p.chunk*m+p.chunk/2,l=Math.min(o,p.chunk*p.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!r[a].hidden&&r[a].draw(this._ctx)}}Ce(qu,"id","bar"),Ce(qu,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Ce(qu,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function QH(e,t,n){let r=1,i=1,a=0,o=0;if(t<Et){const s=e,l=s+t,u=Math.cos(s),c=Math.sin(s),p=Math.cos(l),g=Math.sin(l),d=(C,S,_)=>gl(C,s,l,!0)?1:Math.max(S,S*n,_,_*n),m=(C,S,_)=>gl(C,s,l,!0)?-1:Math.min(S,S*n,_,_*n),b=d(0,u,p),y=d(Gt,c,g),f=m(at,u,p),v=m(at+Gt,c,g);r=(b-f)/2,i=(y-v)/2,a=-(b+f)/2,o=-(y+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}class Is extends Fa{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if(ze(r[t])){const{key:l="value"}=this._parsing;a=u=>+Xa(r[u],l)}let o,s;for(o=t,s=t+n;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return yi(this.options.rotation-90)}_getCircumference(){return yi(this.options.circumference)}_getRotationExtents(){let t=Et,n=-Et;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),o=i._getCircumference();t=Math.min(t,a),n=Math.max(n,a+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,a=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(sV(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:c,rotation:p}=this._getRotationExtents(),{ratioX:g,ratioY:d,offsetX:m,offsetY:b}=QH(p,c,l),y=(r.width-o)/g,f=(r.height-o)/d,v=Math.max(Math.min(y,f)/2,0),C=kw(this.options.radius,v),S=Math.max(C*l,0),_=(C-S)/this._getVisibleDatasetWeightTotal();this.offsetX=m*C,this.offsetY=b*C,i.total=this.calculateTotal(),this.outerRadius=C-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*u,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/Et)}updateElements(t,n,r,i){const a=i==="reset",o=this.chart,s=o.chartArea,u=o.options.animation,c=(s.left+s.right)/2,p=(s.top+s.bottom)/2,g=a&&u.animateScale,d=g?0:this.innerRadius,m=g?0:this.outerRadius,{sharedOptions:b,includeOptions:y}=this._getSharedOptions(n,i);let f=this._getRotation(),v;for(v=0;v<n;++v)f+=this._circumference(v,a);for(v=n;v<n+r;++v){const C=this._circumference(v,a),S=t[v],_={x:c+this.offsetX,y:p+this.offsetY,startAngle:f,endAngle:f+C,circumference:C,outerRadius:m,innerRadius:d};y&&(_.options=b||this.resolveDataElementOptions(v,S.active?"active":i)),f+=C,this.updateElement(S,v,_,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Et*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=sm(n._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,a,o,s,l;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),t=o.data,s=o.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(He(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Ce(Is,"id","doughnut"),Ce(Is,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Ce(Is,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),Ce(Is,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((l,u)=>{const p=t.getDatasetMeta(0).controller.getStyle(u);return{text:l,fillStyle:p.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(u),lineDash:p.borderDash,lineDashOffset:p.borderDashOffset,lineJoin:p.borderJoinStyle,lineWidth:p.borderWidth,strokeStyle:p.borderColor,textAlign:i,pointStyle:r,borderRadius:o&&(s||p.borderRadius),index:u}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Ju extends Fa{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,o=this.chart._animationsDisabled;let{start:s,count:l}=DV(n,i,o);this._drawStart=s,this._drawCount=l,TV(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:p}=this._getSharedOptions(n,i),g=o.axis,d=s.axis,{spanGaps:m,segment:b}=this.options,y=hl(m)?m:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||a||i==="none",v=n+r,C=t.length;let S=n>0&&this.getParsed(n-1);for(let _=0;_<C;++_){const E=t[_],x=f?E:{};if(_<n||_>=v){x.skip=!0;continue}const h=this.getParsed(_),w=tt(h[d]),D=x[g]=o.getPixelForValue(h[g],_),I=x[d]=a||w?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,h,l):h[d],_);x.skip=isNaN(D)||isNaN(I)||w,x.stop=_>0&&Math.abs(h[g]-S[g])>y,b&&(x.parsed=h,x.raw=u.data[_]),p&&(x.options=c||this.resolveDataElementOptions(_,E.active?"active":i)),f||this.updateElement(E,_,x,i),S=h}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ce(Ju,"id","line"),Ce(Ju,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Ce(Ju,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function ya(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class gm{constructor(t){Ce(this,"options");this.options=t||{}}static override(t){Object.assign(gm.prototype,t)}init(){}formats(){return ya()}parse(){return ya()}format(){return ya()}add(){return ya()}diff(){return ya()}startOf(){return ya()}endOf(){return ya()}}var ej={_date:gm};function tj(e,t,n,r){const{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const u=s._reversePixels?EV:Ra;if(r){if(i._sharedOptions){const c=a[0],p=typeof c.getRange=="function"&&c.getRange(t);if(p){const g=u(a,t,n-p),d=u(a,t,n+p);return{lo:g.lo,hi:d.hi}}}}else{const c=u(a,t,n);if(l){const{vScale:p}=i._cachedMeta,{_parsed:g}=e,d=g.slice(0,c.lo+1).reverse().findIndex(b=>!tt(b[p.axis]));c.lo-=Math.max(0,d);const m=g.slice(c.hi).findIndex(b=>!tt(b[p.axis]));c.hi+=Math.max(0,m)}return c}}return{lo:0,hi:a.length-1}}function Od(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let s=0,l=a.length;s<l;++s){const{index:u,data:c}=a[s],{lo:p,hi:g}=tj(a[s],t,o,i);for(let d=p;d<=g;++d){const m=c[d];m.skip||r(m,u,d)}}}function nj(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function Mh(e,t,n,r,i){const a=[];return!i&&!e.isPointInArea(t)||Od(e,n,t,function(s,l,u){!i&&!pl(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&a.push({element:s,datasetIndex:l,index:u})},!0),a}function rj(e,t,n,r){let i=[];function a(o,s,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:p}=Nw(o,{x:t.x,y:t.y});gl(p,u,c)&&i.push({element:o,datasetIndex:s,index:l})}return Od(e,n,t,a),i}function ij(e,t,n,r,i,a){let o=[];const s=nj(n);let l=Number.POSITIVE_INFINITY;function u(c,p,g){const d=c.inRange(t.x,t.y,i);if(r&&!d)return;const m=c.getCenterPoint(i);if(!(!!a||e.isPointInArea(m))&&!d)return;const y=s(t,m);y<l?(o=[{element:c,datasetIndex:p,index:g}],l=y):y===l&&o.push({element:c,datasetIndex:p,index:g})}return Od(e,n,t,u),o}function Oh(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!r?rj(e,t,n,i):ij(e,t,n,r,i,a)}function By(e,t,n,r,i){const a=[],o=n==="x"?"inXRange":"inYRange";let s=!1;return Od(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],i)&&(a.push({element:l,datasetIndex:u,index:c}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:a}var aj={modes:{index(e,t,n,r){const i=Ca(t,e),a=n.axis||"x",o=n.includeInvisible||!1,s=n.intersect?Mh(e,i,a,r,o):Oh(e,i,a,!1,r,o),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=s[0].index,p=u.data[c];p&&!p.skip&&l.push({element:p,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const i=Ca(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;let s=n.intersect?Mh(e,i,a,r,o):Oh(e,i,a,!1,r,o);if(s.length>0){const l=s[0].datasetIndex,u=e.getDatasetMeta(l).data;s=[];for(let c=0;c<u.length;++c)s.push({element:u[c],datasetIndex:l,index:c})}return s},point(e,t,n,r){const i=Ca(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return Mh(e,i,a,r,o)},nearest(e,t,n,r){const i=Ca(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return Oh(e,i,a,n.intersect,r,o)},x(e,t,n,r){const i=Ca(t,e);return By(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Ca(t,e);return By(e,i,"y",n.intersect,r)}}};const i_=["left","top","right","bottom"];function fs(e,t){return e.filter(n=>n.pos===t)}function $y(e,t){return e.filter(n=>i_.indexOf(n.pos)===-1&&n.box.axis===t)}function hs(e,t){return e.sort((n,r)=>{const i=t?r:n,a=t?n:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function oj(e){const t=[];let n,r,i,a,o,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function sj(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:a}=n;if(!r||!i_.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function lj(e,t){const n=sj(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];const{fullSize:l}=s.box,u=n[s.stack],c=u&&s.stackWeight/u.weight;s.horizontal?(s.width=c?c*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=c?c*i:l&&t.availableHeight)}return n}function uj(e){const t=oj(e),n=hs(t.filter(u=>u.box.fullSize),!0),r=hs(fs(t,"left"),!0),i=hs(fs(t,"right")),a=hs(fs(t,"top"),!0),o=hs(fs(t,"bottom")),s=$y(t,"x"),l=$y(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:fs(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function ky(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function a_(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function cj(e,t,n,r){const{pos:i,box:a}=n,o=e.maxPadding;if(!ze(i)){n.size&&(e[i]-=n.size);const p=r[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?a.height:a.width),n.size=p.size/p.count,e[i]+=n.size}a.getPadding&&a_(o,a.getPadding());const s=Math.max(0,t.outerWidth-ky(o,e,"left","right")),l=Math.max(0,t.outerHeight-ky(o,e,"top","bottom")),u=s!==e.w,c=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function dj(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function fj(e,t){const n=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(t[o],n[o])}),a}return r(e?["left","right"]:["top","bottom"])}function Ds(e,t,n,r){const i=[];let a,o,s,l,u,c;for(a=0,o=e.length,u=0;a<o;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,fj(s.horizontal,t));const{same:p,other:g}=cj(t,n,s,r);u|=p&&i.length,c=c||g,l.fullSize||i.push(s)}return u&&Ds(i,t,n,r)||c}function Du(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Py(e,t,n,r){const i=n.padding;let{x:a,y:o}=t;for(const s of e){const l=s.box,u=r[s.stack]||{placed:0,weight:1},c=s.stackWeight/u.weight||1;if(s.horizontal){const p=t.w*c,g=u.size||l.height;fl(u.start)&&(o=u.start),l.fullSize?Du(l,i.left,o,n.outerWidth-i.right-i.left,g):Du(l,t.left+u.placed,o,p,g),u.start=o,u.placed+=p,o=l.bottom}else{const p=t.h*c,g=u.size||l.width;fl(u.start)&&(a=u.start),l.fullSize?Du(l,a,i.top,g,n.outerHeight-i.bottom-i.top):Du(l,a,t.top+u.placed,g,p),u.start=a,u.placed+=p,a=l.right}}t.x=a,t.y=o}var ur={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=dr(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(n-i.height,0),s=uj(e.boxes),l=s.vertical,u=s.horizontal;it(e.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const c=l.reduce((b,y)=>y.box.options&&y.box.options.display===!1?b:b+1,0)||1,p=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/c,hBoxMaxHeight:o/2}),g=Object.assign({},i);a_(g,dr(r));const d=Object.assign({maxPadding:g,w:a,h:o,x:i.left,y:i.top},i),m=lj(l.concat(u),p);Ds(s.fullSize,d,p,m),Ds(l,d,p,m),Ds(u,d,p,m)&&Ds(l,d,p,m),dj(d),Py(s.leftAndTop,d,p,m),d.x+=d.w,d.y+=d.h,Py(s.rightAndBottom,d,p,m),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},it(s.chartArea,b=>{const y=b.box;Object.assign(y,e.chartArea),y.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class o_{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class hj extends o_{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Qu="$chartjs",gj={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Fy=e=>e===null||e==="";function pj(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Qu]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Fy(i)){const a=vy(e,"width");a!==void 0&&(e.width=a)}if(Fy(r))if(e.style.height==="")e.height=e.width/(t||2);else{const a=vy(e,"height");a!==void 0&&(e.height=a)}return e}const s_=bH?{passive:!0}:!1;function mj(e,t,n){e&&e.addEventListener(t,n,s_)}function bj(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,s_)}function vj(e,t){const n=gj[e.type]||e.type,{x:r,y:i}=Ca(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Wc(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function yj(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Wc(s.addedNodes,r),o=o&&!Wc(s.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function xj(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Wc(s.removedNodes,r),o=o&&!Wc(s.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const bl=new Map;let Ny=0;function l_(){const e=window.devicePixelRatio;e!==Ny&&(Ny=e,bl.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Cj(e,t){bl.size||window.addEventListener("resize",l_),bl.set(e,t)}function Ej(e){bl.delete(e),bl.size||window.removeEventListener("resize",l_)}function Sj(e,t,n){const r=e.canvas,i=r&&hm(r);if(!i)return;const a=Vw((s,l)=>{const u=i.clientWidth;n(s,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||a(u,c)});return o.observe(i),Cj(e,a),o}function Lh(e,t,n){n&&n.disconnect(),t==="resize"&&Ej(e)}function wj(e,t,n){const r=e.canvas,i=Vw(a=>{e.ctx!==null&&n(vj(a,e))},e);return mj(r,t,i),i}class _j extends o_{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(pj(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Qu])return!1;const r=n[Qu].initial;["height","width"].forEach(a=>{const o=r[a];tt(o)?n.removeAttribute(a):n.setAttribute(a,o)});const i=r.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[Qu],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:yj,detach:xj,resize:Sj}[n]||wj;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Lh,detach:Lh,resize:Lh}[n]||bj)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return mH(t,n,r,i)}isAttached(t){const n=t&&hm(t);return!!(n&&n.isConnected)}}function Ij(e){return!fm()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?hj:_j}var Fu;let Ai=(Fu=class{constructor(){Ce(this,"x");Ce(this,"y");Ce(this,"active",!1);Ce(this,"options");Ce(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return hl(this.x)&&hl(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}},Ce(Fu,"defaults",{}),Ce(Fu,"defaultRoutes"),Fu);function Dj(e,t){const n=e.options.ticks,r=Tj(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?Rj(t):[],o=a.length,s=a[0],l=a[o-1],u=[];if(o>i)return Bj(t,u,a,o/i),u;const c=Aj(a,t,i);if(o>0){let p,g;const d=o>1?Math.round((l-s)/(o-1)):null;for(Tu(t,u,c,tt(d)?0:s-d,s),p=0,g=o-1;p<g;p++)Tu(t,u,c,a[p],a[p+1]);return Tu(t,u,c,l,tt(d)?t.length:l+d),u}return Tu(t,u,c),u}function Tj(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function Aj(e,t,n){const r=$j(e),i=t.length/n;if(!r)return Math.max(i,1);const a=pV(r);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>i)return l}return Math.max(i,1)}function Rj(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Bj(e,t,n,r){let i=0,a=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}function Tu(e,t,n,r,i){const a=He(r,0),o=Math.min(He(i,e.length),e.length);let s=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=a;c<0;)s++,c=Math.round(a+s*n);for(u=Math.max(a,0);u<o;u++)u===c&&(t.push(e[u]),s++,c=Math.round(a+s*n))}function $j(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const kj=e=>e==="left"?"right":e==="right"?"left":e,My=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Oy=(e,t)=>Math.min(t||e,e);function Ly(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function Pj(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,o=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-a,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(i-1))/2,l+=i<t?u:-u,l<a-s||l>o+s)))return l}function Fj(e,t){it(e,n=>{const r=n.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[r[a]];r.splice(0,i)}})}function gs(e){return e.drawTicks?e.tickLength:0}function Vy(e,t){if(!e.display)return 0;const n=yn(e.font,t),r=dr(e.padding);return(Mt(e.text)?e.text.length:1)*n.lineHeight+r.height}function Nj(e,t){return eo(e,{scale:t,type:"scale"})}function Mj(e,t,n){return eo(e,{tick:n,index:t,type:"tick"})}function Oj(e,t,n){let r=am(e);return(n&&t!=="right"||!n&&t==="right")&&(r=kj(r)),r}function Lj(e,t,n,r){const{top:i,left:a,bottom:o,right:s,chart:l}=e,{chartArea:u,scales:c}=l;let p=0,g,d,m;const b=o-i,y=s-a;if(e.isHorizontal()){if(d=pn(r,a,s),ze(n)){const f=Object.keys(n)[0],v=n[f];m=c[f].getPixelForValue(v)+b-t}else n==="center"?m=(u.bottom+u.top)/2+b-t:m=My(e,n,t);g=s-a}else{if(ze(n)){const f=Object.keys(n)[0],v=n[f];d=c[f].getPixelForValue(v)-y+t}else n==="center"?d=(u.left+u.right)/2-y+t:d=My(e,n,t);m=pn(r,o,i),p=n==="left"?-Gt:Gt}return{titleX:d,titleY:m,maxWidth:g,rotation:p}}class is extends Ai{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=Br(t,Number.POSITIVE_INFINITY),n=Br(n,Number.NEGATIVE_INFINITY),r=Br(r,Number.POSITIVE_INFINITY),i=Br(i,Number.NEGATIVE_INFINITY),{min:Br(t,r),max:Br(n,i),minDefined:xn(t),maxDefined:xn(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)o=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),a||(r=Math.max(r,o.max));return n=a&&n>r?r:n,r=i&&n>r?n:r,{min:Br(n,Br(r,n)),max:Br(r,Br(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){dt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=YV(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Ly(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Dj(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){dt(this.options.afterUpdate,[this])}beforeSetDimensions(){dt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){dt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),dt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){dt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=dt(n.callback,[a.value,r,t],this)}afterTickToLabelConversion(){dt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){dt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Oy(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let o=i,s,l,u;if(!this._isVisible()||!n.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),p=c.widest.width,g=c.highest.height,d=vn(this.chart.width-p,0,this.maxWidth);s=t.offset?this.maxWidth/r:d/(r-1),p+6>s&&(s=d/(r-(t.offset?.5:1)),l=this.maxHeight-gs(t.grid)-n.padding-Vy(t.title,this.chart.options.font),u=Math.sqrt(p*p+g*g),o=yV(Math.min(Math.asin(vn((c.highest.height+6)/s,-1,1)),Math.asin(vn(l/u,-1,1))-Math.asin(vn(g/u,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){dt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=Vy(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=gs(a)+l):(t.height=this.maxHeight,t.width=gs(a)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:p,highest:g}=this._getLabelSizes(),d=r.padding*2,m=yi(this.labelRotation),b=Math.cos(m),y=Math.sin(m);if(s){const f=r.mirror?0:y*p.width+b*g.height;t.height=Math.min(this.maxHeight,t.height+f+d)}else{const f=r.mirror?0:b*p.width+y*g.height;t.width=Math.min(this.maxWidth,t.width+f+d)}this._calculatePadding(u,c,y,b)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,d=0;l?u?(g=i*t.width,d=r*n.height):(g=r*t.height,d=i*n.width):a==="start"?d=n.width:a==="end"?g=t.width:a!=="inner"&&(g=t.width/2,d=n.width/2),this.paddingLeft=Math.max((g-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((d-p+o)*this.width/(this.width-p),0)}else{let c=n.height/2,p=t.height/2;a==="start"?(c=0,p=t.height):a==="end"&&(c=n.height,p=0),this.paddingTop=c+o,this.paddingBottom=p+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){dt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)tt(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Ly(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(n/Oy(n,r));let u=0,c=0,p,g,d,m,b,y,f,v,C,S,_;for(p=0;p<n;p+=l){if(m=t[p].label,b=this._resolveTickFontOptions(p),i.font=y=b.string,f=a[y]=a[y]||{data:{},gc:[]},v=b.lineHeight,C=S=0,!tt(m)&&!Mt(m))C=hy(i,f.data,f.gc,C,m),S=v;else if(Mt(m))for(g=0,d=m.length;g<d;++g)_=m[g],!tt(_)&&!Mt(_)&&(C=hy(i,f.data,f.gc,C,_),S+=v);o.push(C),s.push(S),u=Math.max(C,u),c=Math.max(S,c)}Fj(a,n);const E=o.indexOf(u),x=s.indexOf(c),h=w=>({width:o[w]||0,height:s[w]||0});return{first:h(0),last:h(n-1),widest:h(E),highest:h(x),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return CV(this._alignToPixels?va(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=Mj(this.getContext(),t,r))}return this.$context||(this.$context=Nj(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=yi(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:a,position:o,border:s}=i,l=a.offset,u=this.isHorizontal(),p=this.ticks.length+(l?1:0),g=gs(a),d=[],m=s.setContext(this.getContext()),b=m.display?m.width:0,y=b/2,f=function(R){return va(r,R,b)};let v,C,S,_,E,x,h,w,D,I,T,F;if(o==="top")v=f(this.bottom),x=this.bottom-g,w=v-y,I=f(t.top)+y,F=t.bottom;else if(o==="bottom")v=f(this.top),I=t.top,F=f(t.bottom)-y,x=v+y,w=this.top+g;else if(o==="left")v=f(this.right),E=this.right-g,h=v-y,D=f(t.left)+y,T=t.right;else if(o==="right")v=f(this.left),D=t.left,T=f(t.right)-y,E=v+y,h=this.left+g;else if(n==="x"){if(o==="center")v=f((t.top+t.bottom)/2+.5);else if(ze(o)){const R=Object.keys(o)[0],M=o[R];v=f(this.chart.scales[R].getPixelForValue(M))}I=t.top,F=t.bottom,x=v+y,w=x+g}else if(n==="y"){if(o==="center")v=f((t.left+t.right)/2);else if(ze(o)){const R=Object.keys(o)[0],M=o[R];v=f(this.chart.scales[R].getPixelForValue(M))}E=v-y,h=E-g,D=t.left,T=t.right}const P=He(i.ticks.maxTicksLimit,p),k=Math.max(1,Math.ceil(p/P));for(C=0;C<p;C+=k){const R=this.getContext(C),M=a.setContext(R),O=s.setContext(R),z=M.lineWidth,G=M.color,U=O.dash||[],J=O.dashOffset,Q=M.tickWidth,ee=M.tickColor,q=M.tickBorderDash||[],Z=M.tickBorderDashOffset;S=Pj(this,C,l),S!==void 0&&(_=va(r,S,z),u?E=h=D=T=_:x=w=I=F=_,d.push({tx1:E,ty1:x,tx2:h,ty2:w,x1:D,y1:I,x2:T,y2:F,width:z,color:G,borderDash:U,borderDashOffset:J,tickWidth:Q,tickColor:ee,tickBorderDash:q,tickBorderDashOffset:Z}))}return this._ticksLength=p,this._borderValue=v,d}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:a}=r,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:c,mirror:p}=a,g=gs(r.grid),d=g+c,m=p?-c:d,b=-yi(this.labelRotation),y=[];let f,v,C,S,_,E,x,h,w,D,I,T,F="middle";if(i==="top")E=this.bottom-m,x=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,x=this._getXAxisLabelAlignment();else if(i==="left"){const k=this._getYAxisLabelAlignment(g);x=k.textAlign,_=k.x}else if(i==="right"){const k=this._getYAxisLabelAlignment(g);x=k.textAlign,_=k.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+d;else if(ze(i)){const k=Object.keys(i)[0],R=i[k];E=this.chart.scales[k].getPixelForValue(R)+d}x=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-d;else if(ze(i)){const k=Object.keys(i)[0],R=i[k];_=this.chart.scales[k].getPixelForValue(R)}x=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const P=this._getLabelSizes();for(f=0,v=s.length;f<v;++f){C=s[f],S=C.label;const k=a.setContext(this.getContext(f));h=this.getPixelForTick(f)+a.labelOffset,w=this._resolveTickFontOptions(f),D=w.lineHeight,I=Mt(S)?S.length:1;const R=I/2,M=k.color,O=k.textStrokeColor,z=k.textStrokeWidth;let G=x;o?(_=h,x==="inner"&&(f===v-1?G=this.options.reverse?"left":"right":f===0?G=this.options.reverse?"right":"left":G="center"),i==="top"?u==="near"||b!==0?T=-I*D+D/2:u==="center"?T=-P.highest.height/2-R*D+D:T=-P.highest.height+D/2:u==="near"||b!==0?T=D/2:u==="center"?T=P.highest.height/2-R*D:T=P.highest.height-I*D,p&&(T*=-1),b!==0&&!k.showLabelBackdrop&&(_+=D/2*Math.sin(b))):(E=h,T=(1-I)*D/2);let U;if(k.showLabelBackdrop){const J=dr(k.backdropPadding),Q=P.heights[f],ee=P.widths[f];let q=T-J.top,Z=0-J.left;switch(F){case"middle":q-=Q/2;break;case"bottom":q-=Q;break}switch(x){case"center":Z-=ee/2;break;case"right":Z-=ee;break;case"inner":f===v-1?Z-=ee:f>0&&(Z-=ee/2);break}U={left:Z,top:q,width:ee+J.width,height:Q+J.height,color:k.backdropColor}}y.push({label:S,font:w,textOffset:T,options:{rotation:b,color:M,strokeColor:O,strokeWidth:z,textAlign:G,textBaseline:F,translation:[_,E],backdrop:U}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-yi(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let u,c;return n==="left"?i?(c=this.right+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:a,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,a,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(a=0,o=i.length;a<o;++a){const l=i[a];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),o=r.display?a.width:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,p,g;this.isHorizontal()?(u=va(t,this.left,o)-o/2,c=va(t,this.right,s)+s/2,p=g=l):(p=va(t,this.top,o)-o/2,g=va(t,this.bottom,s)+s/2,u=c=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(u,p),n.lineTo(c,g),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Fd(r,i);const a=this.getLabelItems(t);for(const o of a){const s=o.options,l=o.font,u=o.label,c=o.textOffset;ml(r,u,0,c,l,s)}i&&Nd(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const a=yn(r.font),o=dr(r.padding),s=r.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||ze(n)?(l+=o.bottom,Mt(r.text)&&(l+=a.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:p,rotation:g}=Lj(this,l,n,s);ml(t,r.text,0,0,a,{color:r.color,maxWidth:p,rotation:g,textAlign:Oj(s,n,i),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=He(t.grid&&t.grid.z,-1),i=He(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==is.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,o;for(a=0,o=n.length;a<o;++a){const s=n[a];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return yn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Au{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;jj(n)&&(r=this.register(n));const i=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,Vj(t,o,r),this.override&&At.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in At[i]&&(delete At[i][r],this.override&&delete Ya[r])}}function Vj(e,t,n){const r=dl(Object.create(null),[n?At.get(n):{},At.get(t),e.defaults]);At.set(t,r),e.defaultRoutes&&Hj(t,e.defaultRoutes),e.descriptors&&At.describe(t,e.descriptors)}function Hj(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),o=t[n].split("."),s=o.pop(),l=o.join(".");At.route(a,i,l,s)})}function jj(e){return"id"in e&&"defaults"in e}class zj{constructor(){this.controllers=new Au(Fa,"datasets",!0),this.elements=new Au(Ai,"elements"),this.plugins=new Au(Object,"plugins"),this.scales=new Au(is,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):it(i,o=>{const s=r||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,n,r){const i=rm(t);dt(r["before"+i],[],r),n[t](r),dt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Pr=new zj;class Gj{constructor(){this._init=void 0}notify(t,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const a=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(a,t,n,r);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,n,r,i){i=i||{};for(const a of t){const o=a.plugin,s=o[r],l=[n,i,a.options];if(dt(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){tt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=He(r.options&&r.options.plugins,{}),a=Wj(r);return i===!1&&!n?[]:Xj(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function Wj(e){const t={},n=[],r=Object.keys(Pr.plugins.items);for(let a=0;a<r.length;a++)n.push(Pr.getPlugin(r[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function Uj(e,t){return!t&&e===!1?null:e===!0?{}:e}function Xj(e,{plugins:t,localIds:n},r,i){const a=[],o=e.getContext();for(const s of t){const l=s.id,u=Uj(r[l],i);u!==null&&a.push({plugin:s,options:Yj(e.config,{plugin:s,local:n[l]},u,o)})}return a}function Yj(e,{plugin:t,local:n},r,i){const a=e.pluginScopeKeys(t),o=e.getOptionScopes(r,a);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ug(e,t){const n=At.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Kj(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Zj(e,t){return e===t?"_index_":"_value_"}function Hy(e){if(e==="x"||e==="y"||e==="r")return e}function qj(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function cg(e,...t){if(Hy(e))return e;for(const n of t){const r=n.axis||qj(n.position)||e.length>1&&Hy(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function jy(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Jj(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return jy(e,"x",n[0])||jy(e,"y",n[0])}return{}}function Qj(e,t){const n=Ya[e.type]||{scales:{}},r=t.scales||{},i=ug(e.type,t),a=Object.create(null);return Object.keys(r).forEach(o=>{const s=r[o];if(!ze(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=cg(o,s,Jj(o,e),At.scales[s.type]),u=Zj(l,i),c=n.scales||{};a[o]=Fs(Object.create(null),[{axis:l},s,c[l],c[u]])}),e.data.datasets.forEach(o=>{const s=o.type||e.type,l=o.indexAxis||ug(s,t),c=(Ya[s]||{}).scales||{};Object.keys(c).forEach(p=>{const g=Kj(p,l),d=o[g+"AxisID"]||g;a[d]=a[d]||Object.create(null),Fs(a[d],[{axis:g},r[d],c[p]])})}),Object.keys(a).forEach(o=>{const s=a[o];Fs(s,[At.scales[s.type],At.scale])}),a}function u_(e){const t=e.options||(e.options={});t.plugins=He(t.plugins,{}),t.scales=Qj(e,t)}function c_(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function ez(e){return e=e||{},e.data=c_(e.data),u_(e),e}const zy=new Map,d_=new Set;function Ru(e,t){let n=zy.get(e);return n||(n=t(),zy.set(e,n),d_.add(n)),n}const ps=(e,t,n)=>{const r=Xa(t,n);r!==void 0&&e.add(r)};class tz{constructor(t){this._config=ez(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=c_(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),u_(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ru(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ru(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ru(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Ru(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:a}=this,o=this._cachedScopes(t,r),s=o.get(n);if(s)return s;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(p=>ps(l,t,p))),c.forEach(p=>ps(l,i,p)),c.forEach(p=>ps(l,Ya[a]||{},p)),c.forEach(p=>ps(l,At,p)),c.forEach(p=>ps(l,sg,p))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),d_.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ya[n]||{},At.datasets[n]||{},{type:n},At,sg]}resolveNamedOptions(t,n,r,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=Gy(this._resolverCache,t,i);let l=o;if(rz(o,n)){a.$shared=!1,r=oa(r)?r():r;const u=this.createResolver(t,r,s);l=Uo(o,r,u)}for(const u of n)a[u]=l[u];return a}createResolver(t,n,r=[""],i){const{resolver:a}=Gy(this._resolverCache,t,r);return ze(n)?Uo(a,n,void 0,i):a}}function Gy(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);return a||(a={resolver:um(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,a)),a}const nz=e=>ze(e)&&Object.getOwnPropertyNames(e).some(t=>oa(e[t]));function rz(e,t){const{isScriptable:n,isIndexable:r}=Gw(e);for(const i of t){const a=n(i),o=r(i),s=(o||a)&&e[i];if(a&&(oa(s)||nz(s))||o&&Mt(s))return!0}return!1}var iz="4.5.1";const az=["top","bottom","left","right","chartArea"];function Wy(e,t){return e==="top"||e==="bottom"||az.indexOf(e)===-1&&t==="x"}function Uy(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Xy(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),dt(n&&n.onComplete,[e],t)}function oz(e){const t=e.chart,n=t.options.animation;dt(n&&n.onProgress,[e],t)}function f_(e){return fm()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const ec={},Yy=e=>{const t=f_(e);return Object.values(ec).filter(n=>n.canvas===t).pop()};function sz(e,t,n){const r=Object.keys(e);for(const i of r){const a=+i;if(a>=t){const o=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=o)}}}function lz(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var Mi;let to=(Mi=class{static register(...t){Pr.add(...t),Ky()}static unregister(...t){Pr.remove(...t),Ky()}constructor(t,n){const r=this.config=new tz(n),i=f_(t),a=Yy(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Ij(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,o.aspectRatio),l=s&&s.canvas,u=l&&l.height,c=l&&l.width;if(this.id=oV(),this.ctx=s,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Gj,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_V(p=>this.update(p),o.resizeDelay||0),this._dataChanges=[],ec[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ui.listen(this,"complete",Xy),ui.listen(this,"progress",oz),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return tt(t)?n&&a?a:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Pr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():by(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return gy(this.canvas,this.ctx),this}stop(){return ui.stop(this),this}resize(t,n){ui.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,a),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,by(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),dt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};it(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,s)=>(o[s]=!1,o),{});let a=[];n&&(a=a.concat(Object.keys(n).map(o=>{const s=n[o],l=cg(o,s),u=l==="r",c=l==="x";return{options:s,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),it(a,o=>{const s=o.options,l=s.id,u=cg(l,s),c=He(s.type,o.dtype);(s.position===void 0||Wy(s.position,u)!==Wy(o.dposition))&&(s.position=o.dposition),i[l]=!0;let p=null;if(l in r&&r[l].type===c)p=r[l];else{const g=Pr.getScale(c);p=new g({id:l,type:c,ctx:this.ctx,chart:this}),r[p.id]=p}p.init(s,t)}),it(i,(o,s)=>{o||delete r[s]}),it(r,o=>{ur.configure(this,o,o.options),ur.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Uy("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const a=n[r];let o=this.getDatasetMeta(r);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=s,o.indexAxis=a.indexAxis||ug(s,this.options),o.order=a.order||0,o.index=r,o.label=""+a.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Pr.getController(s),{datasetElementType:u,dataElementType:c}=At.datasets[s];Object.assign(l,{dataElementType:Pr.getElement(c),datasetElementType:u&&Pr.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){it(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:p}=this.getDatasetMeta(u),g=!i&&a.indexOf(p)===-1;p.buildOrUpdateElements(g),o=Math.max(+p.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||it(a,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Uy("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){it(this.scales,t=>{ur.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!iy(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of n){const o=r==="_removeElements"?-a:a;sz(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),i=r(0);for(let a=1;a<n;a++)if(!iy(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ur.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],it(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,oa(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ui.has(this)?this.attached&&!ui.running(this)&&ui.start(this):(this.draw(),Xy({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,a;for(i=0,a=n.length;i<a;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=e_(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Fd(n,i),t.controller.draw(),i&&Nd(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return pl(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const a=aj.modes[n];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=eo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,i);fl(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(a,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ui.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),gy(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete ec[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(a,o)=>{n.addEventListener(this,a,o),t[a]=o},i=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};it(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",a),r("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():o()}unbindEvents(){it(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},it(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let a,o,s,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){o=t[s];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!Vc(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,a=(l,u)=>l.filter(c=>!u.some(p=>c.datasetIndex===p.datasetIndex&&c.index===p.index)),o=a(n,t),s=r?t:a(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:a}=this,o=n,s=this._getActiveElements(t,i,r,o),l=fV(t),u=lz(t,this._lastEvent,r,l);r&&(this._lastEvent=null,dt(a.onHover,[t,s,this],this),l&&dt(a.onClick,[t,s,this],this));const c=!Vc(s,i);return(c||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}},Ce(Mi,"defaults",At),Ce(Mi,"instances",ec),Ce(Mi,"overrides",Ya),Ce(Mi,"registry",Pr),Ce(Mi,"version",iz),Ce(Mi,"getChart",Yy),Mi);function Ky(){return it(to.instances,e=>e._plugins.invalidate())}function uz(e,t,n){const{startAngle:r,x:i,y:a,outerRadius:o,innerRadius:s,options:l}=t,{borderWidth:u,borderJoinStyle:c}=l,p=Math.min(u/o,Hn(r-n));if(e.beginPath(),e.arc(i,a,o-u/2,r+p/2,n-p/2),s>0){const g=Math.min(u/s,Hn(r-n));e.arc(i,a,s+u/2,n-g/2,r+g/2,!0)}else{const g=Math.min(u/2,o*Hn(r-n));if(c==="round")e.arc(i,a,g,n-at/2,r+at/2,!0);else if(c==="bevel"){const d=2*g*g,m=-d*Math.cos(n+at/2)+i,b=-d*Math.sin(n+at/2)+a,y=d*Math.cos(r+at/2)+i,f=d*Math.sin(r+at/2)+a;e.lineTo(m,b),e.lineTo(y,f)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function cz(e,t,n){const{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:l}=t;let u=i/s;e.beginPath(),e.arc(a,o,s,r-u,n+u),l>i?(u=i/l,e.arc(a,o,l,n+u,r-u,!0)):e.arc(a,o,i,n+Gt,r-Gt),e.closePath(),e.clip()}function dz(e){return lm(e,["outerStart","outerEnd","innerStart","innerEnd"])}function fz(e,t,n,r){const i=dz(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),s=l=>{const u=(n-Math.min(a,l))*r/2;return vn(l,0,Math.min(a,u))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:vn(i.innerStart,0,o),innerEnd:vn(i.innerEnd,0,o)}}function go(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Uc(e,t,n,r,i,a){const{x:o,y:s,startAngle:l,pixelMargin:u,innerRadius:c}=t,p=Math.max(t.outerRadius+r+n-u,0),g=c>0?c+r+n+u:0;let d=0;const m=i-l;if(r){const k=c>0?c-r:0,R=p>0?p-r:0,M=(k+R)/2,O=M!==0?m*M/(M+r):m;d=(m-O)/2}const b=Math.max(.001,m*p-n/at)/p,y=(m-b)/2,f=l+y+d,v=i-y-d,{outerStart:C,outerEnd:S,innerStart:_,innerEnd:E}=fz(t,g,p,v-f),x=p-C,h=p-S,w=f+C/x,D=v-S/h,I=g+_,T=g+E,F=f+_/I,P=v-E/T;if(e.beginPath(),a){const k=(w+D)/2;if(e.arc(o,s,p,w,k),e.arc(o,s,p,k,D),S>0){const z=go(h,D,o,s);e.arc(z.x,z.y,S,D,v+Gt)}const R=go(T,v,o,s);if(e.lineTo(R.x,R.y),E>0){const z=go(T,P,o,s);e.arc(z.x,z.y,E,v+Gt,P+Math.PI)}const M=(v-E/g+(f+_/g))/2;if(e.arc(o,s,g,v-E/g,M,!0),e.arc(o,s,g,M,f+_/g,!0),_>0){const z=go(I,F,o,s);e.arc(z.x,z.y,_,F+Math.PI,f-Gt)}const O=go(x,f,o,s);if(e.lineTo(O.x,O.y),C>0){const z=go(x,w,o,s);e.arc(z.x,z.y,C,f-Gt,w)}}else{e.moveTo(o,s);const k=Math.cos(w)*p+o,R=Math.sin(w)*p+s;e.lineTo(k,R);const M=Math.cos(D)*p+o,O=Math.sin(D)*p+s;e.lineTo(M,O)}e.closePath()}function hz(e,t,n,r,i){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){Uc(e,t,n,r,l,i);for(let u=0;u<a;++u)e.fill();isNaN(s)||(l=o+(s%Et||Et))}return Uc(e,t,n,r,l,i),e.fill(),l}function gz(e,t,n,r,i){const{fullCircles:a,startAngle:o,circumference:s,options:l}=t,{borderWidth:u,borderJoinStyle:c,borderDash:p,borderDashOffset:g,borderRadius:d}=l,m=l.borderAlign==="inner";if(!u)return;e.setLineDash(p||[]),e.lineDashOffset=g,m?(e.lineWidth=u*2,e.lineJoin=c||"round"):(e.lineWidth=u,e.lineJoin=c||"bevel");let b=t.endAngle;if(a){Uc(e,t,n,r,b,i);for(let y=0;y<a;++y)e.stroke();isNaN(s)||(b=o+(s%Et||Et))}m&&cz(e,t,b),l.selfJoin&&b-o>=at&&d===0&&c!=="miter"&&uz(e,t,b),a||(Uc(e,t,n,r,b,i),e.stroke())}class Ts extends Ai{constructor(n){super();Ce(this,"circumference");Ce(this,"endAngle");Ce(this,"fullCircles");Ce(this,"innerRadius");Ce(this,"outerRadius");Ce(this,"pixelMargin");Ce(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,i){const a=this.getProps(["x","y"],i),{angle:o,distance:s}=Nw(a,{x:n,y:r}),{startAngle:l,endAngle:u,innerRadius:c,outerRadius:p,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,m=He(g,u-l),b=gl(o,l,u)&&l!==u,y=m>=Et||b,f=xi(s,c+d,p+d);return y&&f}getCenterPoint(n){const{x:r,y:i,startAngle:a,endAngle:o,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:c}=this.options,p=(a+o)/2,g=(s+l+c+u)/2;return{x:r+Math.cos(p)*g,y:i+Math.sin(p)*g}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,a=(r.offset||0)/4,o=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Et?Math.floor(i/Et):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*a,Math.sin(l)*a);const u=1-Math.sin(Math.min(at,i||0)),c=a*u;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,hz(n,this,c,o,s),gz(n,this,c,o,s),n.restore()}}Ce(Ts,"id","arc"),Ce(Ts,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),Ce(Ts,"defaultRoutes",{backgroundColor:"backgroundColor"}),Ce(Ts,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function h_(e,t,n=t){e.lineCap=He(n.borderCapStyle,t.borderCapStyle),e.setLineDash(He(n.borderDash,t.borderDash)),e.lineDashOffset=He(n.borderDashOffset,t.borderDashOffset),e.lineJoin=He(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=He(n.borderWidth,t.borderWidth),e.strokeStyle=He(n.borderColor,t.borderColor)}function pz(e,t,n){e.lineTo(n.x,n.y)}function mz(e){return e.stepped?LV:e.tension||e.cubicInterpolationMode==="monotone"?VV:pz}function g_(e,t,n={}){const r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,l=Math.max(i,o),u=Math.min(a,s),c=i<o&&a<o||i>s&&a>s;return{count:r,start:l,loop:t.loop,ilen:u<l&&!c?r+u-l:u-l}}function bz(e,t,n,r){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:u}=g_(i,n,r),c=mz(a);let{move:p=!0,reverse:g}=r||{},d,m,b;for(d=0;d<=u;++d)m=i[(s+(g?u-d:d))%o],!m.skip&&(p?(e.moveTo(m.x,m.y),p=!1):c(e,b,m,g,a.stepped),b=m);return l&&(m=i[(s+(g?u:0))%o],c(e,b,m,g,a.stepped)),!!l}function vz(e,t,n,r){const i=t.points,{count:a,start:o,ilen:s}=g_(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,p=0,g,d,m,b,y,f;const v=S=>(o+(u?s-S:S))%a,C=()=>{b!==y&&(e.lineTo(c,y),e.lineTo(c,b),e.lineTo(c,f))};for(l&&(d=i[v(0)],e.moveTo(d.x,d.y)),g=0;g<=s;++g){if(d=i[v(g)],d.skip)continue;const S=d.x,_=d.y,E=S|0;E===m?(_<b?b=_:_>y&&(y=_),c=(p*c+S)/++p):(C(),e.lineTo(S,_),m=E,p=0,b=y=_),f=_}C()}function dg(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?vz:bz}function yz(e){return e.stepped?vH:e.tension||e.cubicInterpolationMode==="monotone"?yH:Ea}function xz(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),h_(e,t.options),e.stroke(i)}function Cz(e,t,n,r){const{segments:i,options:a}=t,o=dg(t);for(const s of i)h_(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Ez=typeof Path2D=="function";function Sz(e,t,n,r){Ez&&!t.options.segment?xz(e,t,n,r):Cz(e,t,n,r)}class Gr extends Ai{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;cH(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_H(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],a=this.points,o=Qw(this,{property:n,start:i,end:i});if(!o.length)return;const s=[],l=yz(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:p,end:g}=o[u],d=a[p],m=a[g];if(d===m){s.push(d);continue}const b=Math.abs((i-d[n])/(m[n]-d[n])),y=l(d,m,b,r.stepped);y[n]=t[n],s.push(y)}return s.length===1?s[0]:s}pathSegment(t,n,r){return dg(this)(t,this,n,r)}path(t,n,r){const i=this.segments,a=dg(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)o&=a(t,this,s,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),Sz(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Ce(Gr,"id","line"),Ce(Gr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Ce(Gr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Ce(Gr,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Zy(e,t,n,r){const i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}class Na extends Ai{constructor(n){super();Ce(this,"parsed");Ce(this,"skip");Ce(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const a=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-s,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,r){return Zy(this,n,"x",r)}inYRange(n,r){return Zy(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!pl(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,lg(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ce(Na,"id","point"),Ce(Na,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Ce(Na,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function p_(e,t){const{x:n,y:r,base:i,width:a,height:o}=e.getProps(["x","y","base","width","height"],t);let s,l,u,c,p;return e.horizontal?(p=o/2,s=Math.min(n,i),l=Math.max(n,i),u=r-p,c=r+p):(p=a/2,s=n-p,l=n+p,u=Math.min(r,i),c=Math.max(r,i)),{left:s,top:u,right:l,bottom:c}}function Zi(e,t,n,r){return e?0:vn(t,n,r)}function wz(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,a=zw(r);return{t:Zi(i.top,a.top,0,n),r:Zi(i.right,a.right,0,t),b:Zi(i.bottom,a.bottom,0,n),l:Zi(i.left,a.left,0,t)}}function _z(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=No(i),o=Math.min(t,n),s=e.borderSkipped,l=r||ze(i);return{topLeft:Zi(!l||s.top||s.left,a.topLeft,0,o),topRight:Zi(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Zi(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Zi(!l||s.bottom||s.right,a.bottomRight,0,o)}}function Iz(e){const t=p_(e),n=t.right-t.left,r=t.bottom-t.top,i=wz(e,n/2,r/2),a=_z(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function Vh(e,t,n,r){const i=t===null,a=n===null,s=e&&!(i&&a)&&p_(e,r);return s&&(i||xi(t,s.left,s.right))&&(a||xi(n,s.top,s.bottom))}function Dz(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Tz(e,t){e.rect(t.x,t.y,t.w,t.h)}function Hh(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}class tc extends Ai{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:o}=Iz(this),s=Dz(o.radius)?zc:Tz;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,Hh(o,n,a)),t.clip(),s(t,Hh(a,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,Hh(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return Vh(this,t,n,r)}inXRange(t,n){return Vh(this,t,null,n)}inYRange(t,n){return Vh(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Ce(tc,"id","bar"),Ce(tc,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Ce(tc,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Az(e,t,n){const r=e.segments,i=e.points,a=t.points,o=[];for(const s of r){let{start:l,end:u}=s;u=Ld(l,u,i);const c=fg(n,i[l],i[u],s.loop);if(!t.segments){o.push({source:s,target:c,start:i[l],end:i[u]});continue}const p=Qw(t,c);for(const g of p){const d=fg(n,a[g.start],a[g.end],g.loop),m=Jw(s,i,d);for(const b of m)o.push({source:b,target:g,start:{[n]:qy(c,d,"start",Math.max)},end:{[n]:qy(c,d,"end",Math.min)}})}}return o}function fg(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e==="angle"&&(i=Hn(i),a=Hn(a)),{property:e,start:i,end:a}}function Rz(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:o,end:s})=>{s=Ld(o,s,i);const l=i[o],u=i[s];r!==null?(a.push({x:l.x,y:r}),a.push({x:u.x,y:r})):n!==null&&(a.push({x:n,y:l.y}),a.push({x:n,y:u.y}))}),a}function Ld(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function qy(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function m_(e,t){let n=[],r=!1;return Mt(e)?(r=!0,n=e):n=Rz(e,t),n.length?new Gr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Jy(e){return e&&e.fill!==!1}function Bz(e,t,n){let i=e[t].fill;const a=[t];let o;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!xn(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;a.push(i),i=o.fill}return!1}function $z(e,t,n){const r=Nz(e);if(ze(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return xn(i)&&Math.floor(i)===i?kz(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function kz(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function Pz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:ze(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Fz(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:ze(e)?r=e.value:r=t.getBaseValue(),r}function Nz(e){const t=e.options,n=t.fill;let r=He(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Mz(e){const{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=Oz(t,n);s.push(m_({x:null,y:t.bottom},r));for(let l=0;l<a.length;l++){const u=a[l];for(let c=u.start;c<=u.end;c++)Lz(i,o[c],s)}return new Gr({points:i,options:{}})}function Oz(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const a=r[i];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function Lz(e,t,n){const r=[];for(let i=0;i<n.length;i++){const a=n[i],{first:o,last:s,point:l}=Vz(a,t,"x");if(!(!l||o&&s)){if(o)r.unshift(l);else if(e.push(l),!s)break}}e.push(...r)}function Vz(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],a=e.segments,o=e.points;let s=!1,l=!1;for(let u=0;u<a.length;u++){const c=a[u],p=o[c.start][n],g=o[c.end][n];if(xi(i,p,g)){s=i===p,l=i===g;break}}return{first:s,last:l,point:r}}class b_{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:a,radius:o}=this;return n=n||{start:0,end:Et},t.arc(i,a,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,a=t.angle;return{x:n+Math.cos(a)*i,y:r+Math.sin(a)*i,angle:a}}}function Hz(e){const{chart:t,fill:n,line:r}=e;if(xn(n))return jz(t,n);if(n==="stack")return Mz(e);if(n==="shape")return!0;const i=zz(e);return i instanceof b_?i:m_(i,r)}function jz(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function zz(e){return(e.scale||{}).getPointPositionForValue?Wz(e):Gz(e)}function Gz(e){const{scale:t={},fill:n}=e,r=Pz(n,t);if(xn(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Wz(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,o=Fz(n,t,a),s=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,a);return new b_({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)s.push(t.getPointPositionForValue(l,o));return s}function jh(e,t,n){const r=Hz(t),{chart:i,index:a,line:o,scale:s,axis:l}=t,u=o.options,c=u.fill,p=u.backgroundColor,{above:g=p,below:d=p}=c||{},m=i.getDatasetMeta(a),b=e_(i,m);r&&o.points.length&&(Fd(e,n),Uz(e,{line:o,target:r,above:g,below:d,area:n,scale:s,axis:l,clip:b}),Nd(e))}function Uz(e,t){const{line:n,target:r,above:i,below:a,area:o,scale:s,clip:l}=t,u=n._loop?"angle":t.axis;e.save();let c=a;a!==i&&(u==="x"?(Qy(e,r,o.top),zh(e,{line:n,target:r,color:i,scale:s,property:u,clip:l}),e.restore(),e.save(),Qy(e,r,o.bottom)):u==="y"&&(ex(e,r,o.left),zh(e,{line:n,target:r,color:a,scale:s,property:u,clip:l}),e.restore(),e.save(),ex(e,r,o.right),c=i)),zh(e,{line:n,target:r,color:c,scale:s,property:u,clip:l}),e.restore()}function Qy(e,t,n){const{segments:r,points:i}=t;let a=!0,o=!1;e.beginPath();for(const s of r){const{start:l,end:u}=s,c=i[l],p=i[Ld(l,u,i)];a?(e.moveTo(c.x,c.y),a=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.y)),o=!!t.pathSegment(e,s,{move:o}),o?e.closePath():e.lineTo(p.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function ex(e,t,n){const{segments:r,points:i}=t;let a=!0,o=!1;e.beginPath();for(const s of r){const{start:l,end:u}=s,c=i[l],p=i[Ld(l,u,i)];a?(e.moveTo(c.x,c.y),a=!1):(e.lineTo(n,c.y),e.lineTo(c.x,c.y)),o=!!t.pathSegment(e,s,{move:o}),o?e.closePath():e.lineTo(n,p.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function zh(e,t){const{line:n,target:r,property:i,color:a,scale:o,clip:s}=t,l=Az(n,r,i);for(const{source:u,target:c,start:p,end:g}of l){const{style:{backgroundColor:d=a}={}}=u,m=r!==!0;e.save(),e.fillStyle=d,Xz(e,o,s,m&&fg(i,p,g)),e.beginPath();const b=!!n.pathSegment(e,u);let y;if(m){b?e.closePath():tx(e,r,g,i);const f=!!r.pathSegment(e,c,{move:b,reverse:!0});y=b&&f,y||tx(e,r,p,i)}e.closePath(),e.fill(y?"evenodd":"nonzero"),e.restore()}}function Xz(e,t,n,r){const i=t.chart.chartArea,{property:a,start:o,end:s}=r||{};if(a==="x"||a==="y"){let l,u,c,p;a==="x"?(l=o,u=i.top,c=s,p=i.bottom):(l=i.left,u=o,c=i.right,p=s),e.beginPath(),n&&(l=Math.max(l,n.left),c=Math.min(c,n.right),u=Math.max(u,n.top),p=Math.min(p,n.bottom)),e.rect(l,u,c-l,p-u),e.clip()}}function tx(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var v_={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let a,o,s,l;for(o=0;o<r;++o)a=e.getDatasetMeta(o),s=a.dataset,l=null,s&&s.options&&s instanceof Gr&&(l={visible:e.isDatasetVisible(o),index:o,fill:$z(s,o,r),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=Bz(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let o=i.length-1;o>=0;--o){const s=i[o].$filler;s&&(s.line.updateControlPoints(a,s.axis),r&&s.fill&&jh(e.ctx,s,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const a=r[i].$filler;Jy(a)&&jh(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!Jy(r)||n.drawTime!=="beforeDatasetDraw"||jh(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nx=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Yz=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class rx extends Ai{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=dt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=yn(r.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=nx(r,a);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,a,s,l)+10):(c=this.maxHeight,u=this._fitCols(o,i,s,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+s;let p=t;a.textAlign="left",a.textBaseline="middle";let g=-1,d=-c;return this.legendItems.forEach((m,b)=>{const y=r+n/2+a.measureText(m.text).width;(b===0||u[u.length-1]+y+2*s>o)&&(p+=c,u[u.length-(b>0?0:1)]=0,d+=c,g++),l[b]={left:0,top:d,row:g,width:y,height:i},u[u.length-1]+=y+s}),p}_fitCols(t,n,r,i){const{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let p=s,g=0,d=0,m=0,b=0;return this.legendItems.forEach((y,f)=>{const{itemWidth:v,itemHeight:C}=Kz(r,n,a,y,i);f>0&&d+C+2*s>c&&(p+=g+s,u.push({width:g,height:d}),m+=g+s,b++,g=d=0),l[f]={left:m,top:d,col:b,width:v,height:C},g=Math.max(g,v),d+=C+s}),p+=g,u.push({width:g,height:d}),p}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:a}}=this,o=Mo(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=pn(r,this.left+i,this.right-this.lineWidths[s]);for(const u of n)s!==u.row&&(s=u.row,l=pn(r,this.left+i,this.right-this.lineWidths[s])),u.top+=this.top+t+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let s=0,l=pn(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const u of n)u.col!==s&&(s=u.col,l=pn(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Fd(t,this),this._draw(),Nd(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:a,labels:o}=t,s=At.color,l=Mo(t.rtl,this.left,this.width),u=yn(o.font),{padding:c}=o,p=u.size,g=p/2;let d;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:m,boxHeight:b,itemHeight:y}=nx(o,p),f=function(E,x,h){if(isNaN(m)||m<=0||isNaN(b)||b<0)return;i.save();const w=He(h.lineWidth,1);if(i.fillStyle=He(h.fillStyle,s),i.lineCap=He(h.lineCap,"butt"),i.lineDashOffset=He(h.lineDashOffset,0),i.lineJoin=He(h.lineJoin,"miter"),i.lineWidth=w,i.strokeStyle=He(h.strokeStyle,s),i.setLineDash(He(h.lineDash,[])),o.usePointStyle){const D={radius:b*Math.SQRT2/2,pointStyle:h.pointStyle,rotation:h.rotation,borderWidth:w},I=l.xPlus(E,m/2),T=x+g;jw(i,D,I,T,o.pointStyleWidth&&m)}else{const D=x+Math.max((p-b)/2,0),I=l.leftForLtr(E,m),T=No(h.borderRadius);i.beginPath(),Object.values(T).some(F=>F!==0)?zc(i,{x:I,y:D,w:m,h:b,radius:T}):i.rect(I,D,m,b),i.fill(),w!==0&&i.stroke()}i.restore()},v=function(E,x,h){ml(i,h.text,E,x+y/2,u,{strikethrough:h.hidden,textAlign:l.textAlign(h.textAlign)})},C=this.isHorizontal(),S=this._computeTitleHeight();C?d={x:pn(a,this.left+c,this.right-r[0]),y:this.top+c+S,line:0}:d={x:this.left+c,y:pn(a,this.top+S+c,this.bottom-n[0].height),line:0},Kw(this.ctx,t.textDirection);const _=y+c;this.legendItems.forEach((E,x)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const h=i.measureText(E.text).width,w=l.textAlign(E.textAlign||(E.textAlign=o.textAlign)),D=m+g+h;let I=d.x,T=d.y;l.setWidth(this.width),C?x>0&&I+D+c>this.right&&(T=d.y+=_,d.line++,I=d.x=pn(a,this.left+c,this.right-r[d.line])):x>0&&T+_>this.bottom&&(I=d.x=I+n[d.line].width+c,d.line++,T=d.y=pn(a,this.top+S+c,this.bottom-n[d.line].height));const F=l.x(I);if(f(F,T,E),I=IV(w,I+m+g,C?I+D:this.right,t.rtl),v(l.x(I),T,E),C)d.x+=D+c;else if(typeof E.text!="string"){const P=u.lineHeight;d.y+=y_(E,P)+c}else d.y+=_}),Zw(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=yn(n.font),i=dr(n.padding);if(!n.display)return;const a=Mo(t.rtl,this.left,this.width),o=this.ctx,s=n.position,l=r.size/2,u=i.top+l;let c,p=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),c=this.top+u,p=pn(t.align,p,this.right-g);else{const m=this.columnSizes.reduce((b,y)=>Math.max(b,y.height),0);c=u+pn(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const d=pn(s,p,p+g);o.textAlign=a.textAlign(am(s)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,ml(o,n.text,d,c,r)}_computeTitleHeight(){const t=this.options.title,n=yn(t.font),r=dr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,a;if(xi(t,this.left,this.right)&&xi(n,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],xi(t,i.left,i.left+i.width)&&xi(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Jz(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=Yz(i,r);i&&!a&&dt(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!a&&dt(n.onHover,[t,r,this],this)}else r&&dt(n.onClick,[t,r,this],this)}}function Kz(e,t,n,r,i){const a=Zz(r,e,t,n),o=qz(i,r,t.lineHeight);return{itemWidth:a,itemHeight:o}}function Zz(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((a,o)=>a.length>o.length?a:o)),t+n.size/2+r.measureText(i).width}function qz(e,t,n){let r=e;return typeof t.text!="string"&&(r=y_(t,n)),r}function y_(e,t){const n=e.text?e.text.length:0;return t*n}function Jz(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var x_={id:"legend",_element:rx,start(e,t,n){const r=e.legend=new rx({ctx:e.ctx,options:n,chart:e});ur.configure(e,r,n),ur.addBox(e,r)},stop(e){ur.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ur.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=dr(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:o&&(s||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class C_ extends Ai{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Mt(r.text)?r.text.length:1;this._padding=dr(r.padding);const a=i*yn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:a,options:o}=this,s=o.align;let l=0,u,c,p;return this.isHorizontal()?(c=pn(s,r,a),p=n+t,u=a-r):(o.position==="left"?(c=r+t,p=pn(s,i,n),l=at*-.5):(c=a-t,p=pn(s,n,i),l=at*.5),u=i-n),{titleX:c,titleY:p,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=yn(n.font),a=r.lineHeight/2+this._padding.top,{titleX:o,titleY:s,maxWidth:l,rotation:u}=this._drawArgs(a);ml(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:am(n.align),textBaseline:"middle",translation:[o,s]})}}function Qz(e,t){const n=new C_({ctx:e.ctx,options:t,chart:e});ur.configure(e,n,t),ur.addBox(e,n),e.titleBlock=n}var E_={id:"title",_element:C_,start(e,t,n){Qz(e,n)},stop(e){const t=e.titleBlock;ur.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ur.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const As={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++a}}return a===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=e.length;a<o;++a){const l=e[a].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=og(t,u);c<i&&(i=c,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function $r(e,t){return t&&(Mt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ci(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
184
|
-
`)>-1?e.split(`
|
|
185
|
-
`):e}function eG(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ix(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=yn(t.bodyFont),u=yn(t.titleFont),c=yn(t.footerFont),p=a.length,g=i.length,d=r.length,m=dr(t.padding);let b=m.height,y=0,f=r.reduce((S,_)=>S+_.before.length+_.lines.length+_.after.length,0);if(f+=e.beforeBody.length+e.afterBody.length,p&&(b+=p*u.lineHeight+(p-1)*t.titleSpacing+t.titleMarginBottom),f){const S=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;b+=d*S+(f-d)*l.lineHeight+(f-1)*t.bodySpacing}g&&(b+=t.footerMarginTop+g*c.lineHeight+(g-1)*t.footerSpacing);let v=0;const C=function(S){y=Math.max(y,n.measureText(S).width+v)};return n.save(),n.font=u.string,it(e.title,C),n.font=l.string,it(e.beforeBody.concat(e.afterBody),C),v=t.displayColors?o+2+t.boxPadding:0,it(r,S=>{it(S.before,C),it(S.lines,C),it(S.after,C)}),v=0,n.font=c.string,it(e.footer,C),n.restore(),y+=m.width,{width:y,height:b}}function tG(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function nG(e,t,n,r){const{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+a+o>t.width||e==="right"&&i-a-o<0)return!0}function rG(e,t,n,r){const{x:i,width:a}=n,{width:o,chartArea:{left:s,right:l}}=e;let u="center";return r==="center"?u=i<=(s+l)/2?"left":"right":i<=a/2?u="left":i>=o-a/2&&(u="right"),nG(u,e,t,n)&&(u="center"),u}function ax(e,t,n){const r=n.yAlign||t.yAlign||tG(e,n);return{xAlign:n.xAlign||t.xAlign||rG(e,t,n,r),yAlign:r}}function iG(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function aG(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function ox(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:l}=n,u=i+a,{topLeft:c,topRight:p,bottomLeft:g,bottomRight:d}=No(o);let m=iG(t,s);const b=aG(t,l,u);return l==="center"?s==="left"?m+=u:s==="right"&&(m-=u):s==="left"?m-=Math.max(c,g)+i:s==="right"&&(m+=Math.max(p,d)+i),{x:vn(m,0,r.width-t.width),y:vn(b,0,r.height-t.height)}}function Bu(e,t,n){const r=dr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function sx(e){return $r([],ci(e))}function oG(e,t,n){return eo(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function lx(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const S_={beforeTitle:li,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:li,beforeBody:li,beforeLabel:li,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return tt(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:li,afterBody:li,beforeFooter:li,footer:li,afterFooter:li};function Dn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?S_[t].call(n,r):i}var e0;let ux=(e0=class extends Ai{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new t_(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=oG(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Dn(r,"beforeTitle",this,t),a=Dn(r,"title",this,t),o=Dn(r,"afterTitle",this,t);let s=[];return s=$r(s,ci(i)),s=$r(s,ci(a)),s=$r(s,ci(o)),s}getBeforeBody(t,n){return sx(Dn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return it(t,a=>{const o={before:[],lines:[],after:[]},s=lx(r,a);$r(o.before,ci(Dn(s,"beforeLabel",this,a))),$r(o.lines,Dn(s,"label",this,a)),$r(o.after,ci(Dn(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,n){return sx(Dn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Dn(r,"beforeFooter",this,t),a=Dn(r,"footer",this,t),o=Dn(r,"afterFooter",this,t);let s=[];return s=$r(s,ci(i)),s=$r(s,ci(a)),s=$r(s,ci(o)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],o=[];let s=[],l,u;for(l=0,u=n.length;l<u;++l)s.push(eG(this.chart,n[l]));return t.filter&&(s=s.filter((c,p,g)=>t.filter(c,p,g,r))),t.itemSort&&(s=s.sort((c,p)=>t.itemSort(c,p,r))),it(s,c=>{const p=lx(t.callbacks,c);i.push(Dn(p,"labelColor",this,c)),a.push(Dn(p,"labelPointStyle",this,c)),o.push(Dn(p,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=As[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=ix(this,r),u=Object.assign({},s,l),c=ax(this.chart,r,u),p=ox(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:p.x,y:p.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:p}=No(s),{x:g,y:d}=t,{width:m,height:b}=n;let y,f,v,C,S,_;return a==="center"?(S=d+b/2,i==="left"?(y=g,f=y-o,C=S+o,_=S-o):(y=g+m,f=y+o,C=S-o,_=S+o),v=y):(i==="left"?f=g+Math.max(l,c)+o:i==="right"?f=g+m-Math.max(u,p)-o:f=this.caretX,a==="top"?(C=d,S=C-o,y=f-o,v=f+o):(C=d+b,S=C+o,y=f+o,v=f-o),_=C),{x1:y,x2:f,x3:v,y1:C,y2:S,y3:_}}drawTitle(t,n,r){const i=this.title,a=i.length;let o,s,l;if(a){const u=Mo(r.rtl,this.x,this.width);for(t.x=Bu(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=yn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<a;++l)n.fillText(i[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,a){const o=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=a,c=yn(a.bodyFont),p=Bu(this,"left",a),g=i.x(p),d=l<c.lineHeight?(c.lineHeight-l)/2:0,m=n.y+d;if(a.usePointStyle){const b={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},y=i.leftForLtr(g,u)+u/2,f=m+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,lg(t,b,y,f),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,lg(t,b,y,f)}else{t.lineWidth=ze(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const b=i.leftForLtr(g,u),y=i.leftForLtr(i.xPlus(g,1),u-2),f=No(o.borderRadius);Object.values(f).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,zc(t,{x:b,y:m,w:u,h:l,radius:f}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),zc(t,{x:y,y:m+1,w:u-2,h:l-2,radius:f}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(b,m,u,l),t.strokeRect(b,m,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,m+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:c}=r,p=yn(r.bodyFont);let g=p.lineHeight,d=0;const m=Mo(r.rtl,this.x,this.width),b=function(h){n.fillText(h,m.x(t.x+d),t.y+g/2),t.y+=g+a},y=m.textAlign(o);let f,v,C,S,_,E,x;for(n.textAlign=o,n.textBaseline="middle",n.font=p.string,t.x=Bu(this,y,r),n.fillStyle=r.bodyColor,it(this.beforeBody,b),d=s&&y!=="right"?o==="center"?u/2+c:u+2+c:0,S=0,E=i.length;S<E;++S){for(f=i[S],v=this.labelTextColors[S],n.fillStyle=v,it(f.before,b),C=f.lines,s&&C.length&&(this._drawColorBox(n,t,S,m,r),g=Math.max(p.lineHeight,l)),_=0,x=C.length;_<x;++_)b(C[_]),g=p.lineHeight;it(f.after,b)}d=0,g=p.lineHeight,it(this.afterBody,b),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let o,s;if(a){const l=Mo(r.rtl,this.x,this.width);for(t.x=Bu(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=yn(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,s=0;s<a;++s)n.fillText(i[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:u,height:c}=r,{topLeft:p,topRight:g,bottomLeft:d,bottomRight:m}=No(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+p,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+u-g,l),n.quadraticCurveTo(s+u,l,s+u,l+g),o==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+u,l+c-m),n.quadraticCurveTo(s+u,l+c,s+u-m,l+c),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+d,l+c),n.quadraticCurveTo(s,l+c,s,l+c-d),o==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+p),n.quadraticCurveTo(s,l,s+p,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const o=As[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=ix(this,t),l=Object.assign({},o,this._size),u=ax(n,t,l),c=ox(t,l,u,n);(i._to!==c.x||a._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=dr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),Kw(t,n.textDirection),a.y+=o.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Zw(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),a=!Vc(r,i),o=this._positionChanged(i,n);(a||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,n,r),s=this._positionChanged(o,t),l=n||!Vc(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,o=As[a.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}},Ce(e0,"positioners",As),e0);var vl={id:"tooltip",_element:ux,positioners:As,afterInit(e,t,n){n&&(e.tooltip=new ux({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:S_},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const sG=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function lG(e,t,n,r){const i=e.indexOf(t);if(i===-1)return sG(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const uG=(e,t)=>e===null?null:vn(Math.round(e),0,t);function cx(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Yo extends is{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(tt(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:lG(r,t,He(n,t),this._addedLabels),uG(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return cx.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Ce(Yo,"id","category"),Ce(Yo,"defaults",{ticks:{callback:cx}});function cG(e,t){const n=[],{bounds:i,step:a,min:o,max:s,precision:l,count:u,maxTicks:c,maxDigits:p,includeBounds:g}=e,d=a||1,m=c-1,{min:b,max:y}=t,f=!tt(o),v=!tt(s),C=!tt(u),S=(y-b)/(p+1);let _=oy((y-b)/m/d)*d,E,x,h,w;if(_<1e-14&&!f&&!v)return[{value:b},{value:y}];w=Math.ceil(y/_)-Math.floor(b/_),w>m&&(_=oy(w*_/m/d)*d),tt(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(x=Math.floor(b/_)*_,h=Math.ceil(y/_)*_):(x=b,h=y),f&&v&&a&&bV((s-o)/a,_/1e3)?(w=Math.round(Math.min((s-o)/_,c)),_=(s-o)/w,x=o,h=s):C?(x=f?o:x,h=v?s:h,w=u-1,_=(h-x)/w):(w=(h-x)/_,Ns(w,Math.round(w),_/1e3)?w=Math.round(w):w=Math.ceil(w));const D=Math.max(sy(_),sy(x));E=Math.pow(10,tt(l)?D:l),x=Math.round(x*E)/E,h=Math.round(h*E)/E;let I=0;for(f&&(g&&x!==o?(n.push({value:o}),x<o&&I++,Ns(Math.round((x+I*_)*E)/E,o,dx(o,S,e))&&I++):x<o&&I++);I<w;++I){const T=Math.round((x+I*_)*E)/E;if(v&&T>s)break;n.push({value:T})}return v&&g&&h!==s?n.length&&Ns(n[n.length-1].value,s,dx(s,S,e))?n[n.length-1].value=s:n.push({value:s}):(!v||h===s)&&n.push({value:h}),n}function dx(e,t,{horizontal:n,minRotation:r}){const i=yi(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class dG extends is{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return tt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=n?i:l,s=l=>a=r?a:l;if(t){const l=Kr(i),u=Kr(a);l<0&&u<0?s(0):l>0&&u>0&&o(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,o=cG(i,a);return t.bounds==="ticks"&&vV(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return sm(t,this.chart.options.locale,this.options.ticks.format)}}class Ko extends dG{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=xn(t)?t:0,this.max=xn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=yi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Ce(Ko,"id","linear"),Ce(Ko,"defaults",{ticks:{callback:Hw.formatters.numeric}});const Vd={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$n=Object.keys(Vd);function fx(e,t){return e-t}function hx(e,t){if(tt(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),xn(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(hl(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,i)),+o)}function gx(e,t,n,r){const i=$n.length;for(let a=$n.indexOf(e);a<i-1;++a){const o=Vd[$n[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(s*o.size))<=r)return $n[a]}return $n[i-1]}function fG(e,t,n,r,i){for(let a=$n.length-1;a>=$n.indexOf(n);a--){const o=$n[a];if(Vd[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return $n[n?$n.indexOf(n):0]}function hG(e){for(let t=$n.indexOf(e)+1,n=$n.length;t<n;++t)if(Vd[$n[t]].common)return $n[t]}function px(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=im(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function gG(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function mx(e,t,n){const r=[],i={},a=t.length;let o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,r.push({value:s,major:!1});return a===0||!n?r:gG(e,r,i,n)}class Xc extends is{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new ej._date(t.adapters.date);i.init(n),Fs(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:hx(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!s&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=xn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=xn(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=SV(i,a,o);return this._unit=n.unit||(r.autoSkip?gx(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):fG(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:hG(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),mx(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=vn(n,0,o),r=vn(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,o=a.unit||gx(a.minUnit,n,r,this._getLabelCapacity(n)),s=He(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,u=hl(l)||l===!0,c={};let p=n,g,d;if(u&&(p=+t.startOf(p,"isoWeek",l)),p=+t.startOf(p,u?"day":o),t.diff(r,n,o)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+o);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(g=p,d=0;g<r;g=+t.add(g,s,o),d++)px(c,g,m);return(g===r||i.bounds==="ticks"||d===1)&&px(c,g,m),Object.keys(c).sort(fx).map(b=>+b)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,o=n||i[a];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const a=this.options,o=a.ticks.callback;if(o)return dt(o,[t,n,r],this);const s=a.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&s[l],p=u&&s[u],g=r[n],d=u&&p&&g&&g.major;return this._adapter.format(t,i||(d?p:c))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=yi(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*a+s*o,h:r*o+s*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,mx(this,[t],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(hx(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ow(t.sort(fx))}}Ce(Xc,"id","time"),Ce(Xc,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function $u(e,t,n){let r=0,i=e.length-1,a,o,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Ra(e,"pos",t)),{pos:a,time:s}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ra(e,"time",t)),{time:a,pos:s}=e[r],{time:o,pos:l}=e[i]);const u=o-a;return u?s+(l-s)*(t-a)/u:s}class bx extends Xc{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=$u(n,this.min),this._tableRange=$u(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let o,s,l,u,c;for(o=0,s=t.length;o<s;++o)u=t[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,s=i.length;o<s;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&a.push({time:u,pos:o/(s-1)});return a}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return($u(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return $u(this._table,r*this._tableRange+this._minPos,!0)}}Ce(bx,"id","timeseries"),Ce(bx,"defaults",Xc.defaults);const w_="label";function vx(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function pG(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function __(e,t){e.labels=t}function I_(e,t,n=w_){const r=[];e.datasets=t.map(i=>{const a=e.datasets.find(o=>o[n]===i[n]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function mG(e,t=w_){const n={labels:[],datasets:[]};return __(n,e.labels),I_(n,e.datasets,t),n}function bG(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:a,type:o,data:s,options:l,plugins:u=[],fallbackContent:c,updateMode:p,...g}=e,d=N.useRef(null),m=N.useRef(null),b=()=>{d.current&&(m.current=new to(d.current,{type:o,data:mG(s,a),options:l&&{...l},plugins:u}),vx(t,m.current))},y=()=>{vx(t,null),m.current&&(m.current.destroy(),m.current=null)};return N.useEffect(()=>{!i&&m.current&&l&&pG(m.current,l)},[i,l]),N.useEffect(()=>{!i&&m.current&&__(m.current.config.data,s.labels)},[i,s.labels]),N.useEffect(()=>{!i&&m.current&&s.datasets&&I_(m.current.config.data,s.datasets,a)},[i,s.datasets]),N.useEffect(()=>{m.current&&(i?(y(),setTimeout(b)):m.current.update(p))},[i,l,s.labels,s.datasets,p]),N.useEffect(()=>{m.current&&(y(),setTimeout(b))},[o]),N.useEffect(()=>(b(),()=>y()),[]),B.jsx("canvas",{ref:d,role:"img",height:n,width:r,...g,children:c})}const vG=N.forwardRef(bG);function pm(e,t){return to.register(t),N.forwardRef((n,r)=>B.jsx(vG,{...n,ref:r,type:e}))}const D_=pm("line",Ju),yG=pm("bar",qu),yx=pm("doughnut",Is);to.register(Yo,Ko,Na,Gr,Ts,E_,vl,x_);const xx=(e,t)=>{var i,a,o,s;const n=e.getVisibleDatasetCount(),r=e.getDatasetMeta(n-1).data.at(0);if(r){const{innerRadius:l}=r.getProps(["innerRadius"]),{ctx:u}=e,c=()=>{var I;const S=[].concat(t),_=S.length,E=u.font;let x=0,h=0,w;for(w=0;w<_;++w)u.font=S[w].font,x=Math.max(u.measureText(S[w].text).width,x),h+=(I=S[w].font)==null?void 0:I.lineHeight;return u.font=E,{height:h,width:x}},p=(S,_)=>{let E=document.createElement("div");document.body.appendChild(E),E.style.fontSize=`${_}px`,E.style.position="absolute",E.style.left="-10",E.style.top="-10",E.textContent=S;const x={width:E.clientWidth,height:E.clientHeight};return document.body.removeChild(E),E=null,x},g=c(),d=parseFloat(parseFloat(l).toFixed(2));u.textAlign="center",u.textBaseline="middle";const m=(e.chartArea.left+e.chartArea.right)/2,y=(e.chartArea.top+e.chartArea.bottom)/2-g.height/2;let f;const v=t.length;let C=0;for(f=0;f<v;++f){let S=(i=t[f].font)==null?void 0:i.size,_=(a=t[f].font)==null?void 0:a.lineHeight;const E=typeof t[f].text=="number"?t[f].text.toString():t[f].text;for(;p(E,S).width>d+(t[f].id==="value"?50:0);)S-=1,_=p(E,S).height;E.length>22&&_<14&&(_=18);const x=y+_/2+C,h=typeof t[f].text=="number"?new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(t[f].text):t[f].text;let w=t[f].urlIconDesc?" ":"";if(t[f].percentage!==void 0?w+=`${t[f].percentage}% ${t[f].text}`:w+=h,u.fillStyle=t[f].color,u.font=`${S<10?10:S}px sans-serif`,C+=_,t[f].percentage!==void 0&&t[f].urlIconDesc){const D=((s=(o=t[f])==null?void 0:o.percentage)==null?void 0:s.length)??0,I=new Image;I.src=t[f].urlIconDesc,u.drawImage(I,45-(D>6?D+2:D-2.5),x-8,16,14)}u.fillText(w,m,x)}u.restore(),u.save()}},xG=({labels:e,data:t,backgroundColor:n,options:r={},redraw:i,widthInnerDoughnut:a,innerLabels:o,open:s=!0,keyRemoveDataOpen:l="gap",keyLabel:u="title",keyValue:c="originalValue",keyBackground:p="backgroundColor",className:g})=>{const d={labels:e||t.map(b=>b[u]),datasets:[{data:t.map(b=>b[c]),backgroundColor:n||t.map(b=>b[p])}]},m={cutout:a,animation:{duration:i?400:0},plugins:{legend:{display:!1},tooltip:{external(b){let y=document.getElementById("chartjs-tooltip");y||(y=document.createElement("div"),y.id="chartjs-tooltip",y.innerHTML="<table></table>",document.body.appendChild(y));const f=b.tooltip;if(f.opacity===0){y.style.opacity="0";return}y.classList.remove("above","below","no-transform"),f.yAlign?y.classList.add(f.yAlign):y.classList.add("no-transform");const v=t.filter(x=>!x[u]),C=t.filter(x=>x[c]>0&&x[c]<1);if(v.length===1&&C.length===1)return;function S(x){return x.lines}if(f.body){const x=f.title||[];let h=f.body.map(S),w="<thead>";x.forEach(I=>{let T="";T+="display: flex",T+="; justify-content: center",T+="; font-weight: 600",T+="; font-size: 12px",T+="; padding: 0px 14px",w+=`<tr><span style="${T}">${I}</span></tr>`}),w+="</thead><tbody>",h.length>1&&h[0][0]===h[1][0]&&(h=[h[0]]),h.forEach(I=>{let T="";T+="display: flex",T+="; justify-content: center",T+="; color: #0163C8",T+="; padding: 0px 14px",T+="; font-size: 12px";const F=`<span style="${T}">${I}</span>`;w+=`<tr><td>${F}</td></tr>`}),w+="</tbody>";const D=y.querySelector("table");D&&(D.innerHTML=w)}const _=b.chart.canvas.getBoundingClientRect(),E=_.top+window.pageYOffset+f.caretY;y.style.opacity="1",y.style.border="solid 1px #0163C8",y.style.background="white",y.style.height="fit-content",y.style.borderRadius="10px",y.style.position="absolute",y.style.zIndex="10",y.style.padding="4px 0",y.style.left=`${_.left+window.pageXOffset+f.caretX-80}px`,y.style.top=`${E>300&&!s?280:E}px`,y.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title(b){const y=t[b[0].dataIndex];return y==null?void 0:y[u]},label(b){const y=t==null?void 0:t[b.dataIndex];let f="Nilai: ";return y&&(f+=y.value),f}}}},elements:{arc:{borderWidth:0}}};return B.jsxs("div",{className:g??"",children:[!s&&B.jsx(yx,{data:d,redraw:i,plugins:[{id:"draw",beforeDraw(b){xx(b,o)}}],options:Object.keys(r).length>1?r:m}),s&&B.jsx(yx,{data:d,redraw:i,plugins:[{id:"draw",beforeDraw(b){xx(b,o.filter(y=>y.id!==l))}}],options:Object.keys(r).length>1?r:m})]})},ku=e=>{let t;const n=new Date(e??new Date);return e&&(t=Bp(new Date(n.setHours(n.getHours()+7)).toISOString().slice(0,10))),t},CG=({month:e,year:t,type:n=["month","year"],activeType:r="month",minDate:i,maxDate:a,className:o,classNameButton:s,onChange:l,buttonClick:u,id:c="date-picker",idPopover:p="date-picker-popover",floatingOptions:g={},offsetPopover:d=5,zIndexPopper:m=1,hiddenHeader:b})=>{const{locale:y}=_r(),f=N.useRef(null),v=ku(i),C=ku(a),S=_=>{var E;typeof l=="function"&&(l({month:_.month,year:_.year}),(E=f.current)==null||E.setShow(!1))};return B.jsxs(B.Fragment,{children:[B.jsx("div",{id:c,onClick:_=>{var E;_.stopPropagation(),(E=f.current)==null||E.handlerShow(_)},className:s,children:typeof u=="function"?u({month:e,year:t}):"Pilih Tanggal"}),B.jsx("div",{className:o??"",children:B.jsx(ei,{zIndex:m,ref:f,offset:d,id:p,floatingOptions:{placement:"bottom-end",...g},onClick:_=>_.stopPropagation(),children:B.jsx(Yp,{locale:"id-ID",children:B.jsx($d,{minValue:v,maxValue:C,minDate:i,maxDate:a,activeType:n.length===1?n[0]:r,locale:y,value:ku(`${t}/${e}/1`),createCalendar:Nl,defaultValue:ku(`${t}/${e}/1`),onChange:S,handlerReset:()=>{},handlerSubmit:()=>{},withDateSelect:!1,type:n,hiddenHeader:b})})})})]})},EG=({indeterminate:e,className:t="",classNameContainer:n,...r})=>{const i=N.useRef(null);return N.useEffect(()=>{typeof e=="boolean"&&(i.current.indeterminate=!r.checked&&e)},[i,e]),B.jsx("div",{className:`iru-flex iru-items-center iru-h-full ${t??""}`,children:B.jsx(kd,{ref:i,label:"",variants:"blue-700",borderRadius:"full",className:"iru-flex iru-items-center iru-h-full",classNameContainer:`iru-flex iru-items-center iru-h-full ${n??""}`,...r,onClick:a=>{a.stopPropagation(),typeof r.onClick=="function"&&r.onClick(a)},type:"checkbox"})})},SG="_input_1t291_12",wG="_error_1t291_57",rr={"container-xs":"_container-xs_1t291_1","container-input":"_container-input_1t291_6",input:SG,error:wG,"isset-right-icon":"_isset-right-icon_1t291_66","isset-left-icon":"_isset-left-icon_1t291_70","start-icon":"_start-icon_1t291_74","end-icon":"_end-icon_1t291_81","label-error":"_label-error_1t291_88","container-s":"_container-s_1t291_100","container-l":"_container-l_1t291_199"},_G={size:{l:rr["container-l"],s:rr["container-s"],xs:rr["container-xs"]}},mm=N.forwardRef(({name:e,classNameContainer:t,id:n,type:r="text",startIcon:i,endIcon:a,error:o,sizeInput:s="xs",classNameLabelError:l,className:u,...c},p)=>{const g=()=>typeof i=="function"||N.isValidElement(i),d=()=>typeof a=="function"||N.isValidElement(a);return B.jsxs("div",{className:`${_G.size[s]} ${t}`,children:[B.jsxs("div",{className:`${rr["container-input"]}`,children:[B.jsxs("div",{className:rr["start-icon"],children:[typeof i=="function"&&i(),N.isValidElement(i)&&i]}),B.jsx("input",{id:n??e,className:`${rr.input} ${o?rr.error:""}
|
|
186
|
-
${g()?rr["isset-left-icon"]:""}
|
|
187
|
-
${d()?rr["isset-right-icon"]:""}
|
|
188
|
-
${u??""}`,ref:p,type:r,...c}),B.jsxs("div",{className:rr["end-icon"],children:[typeof a=="function"&&a(),N.isValidElement(a)&&a]})]}),o&&B.jsx("label",{className:`${rr["label-error"]}
|
|
189
|
-
${c.disabled?rr.disabled:""} ${l??""}`,children:o})]})});mm.displayName="InputNative";const IG="_container_6w9ag_1",DG="_files_6w9ag_6",TG="_file_6w9ag_6",po={container:IG,files:DG,file:TG,"file-name-wrapper":"_file-name-wrapper_6w9ag_22","file-name":"_file-name_6w9ag_22","file-extension":"_file-extension_6w9ag_29"},AG=({value:e,validateFile:t,classNameContainer:n,classNameButton:r,textUpload:i="Unggah Lampiran",buttonProps:a={},maxFile:o=1,maxSize:s=1,error:l,removeElement:u,onChange:c,handlerDownload:p,priorityError:g="external",eventError:d,locationRemoveElement:m="right",idItemAttachment:b})=>{const y={variants:"ghost-laba-blue-10",size:"small"},f=N.useRef(null),v=t||["image/png","image/jpeg","image/jpg"],[C,S]=N.useState(""),_={internal:C||l,external:l||C},E=h=>{if(h!=null&&h.length){const w=Array.from(h).slice(0,o),D=w==null?void 0:w.filter(F=>!v.includes(F.type)),I=(w==null?void 0:w.reduce((F,P)=>F+P.size,0))/1024/1024;let T="";if(D.length>0?T="Berkas tidak didukung, silahkan pilih file kembali.":I>s?T=`${h.length>1?"Jumlah u":"U"}kuran berkas tidak boleh melebihi ${s}MB.`:typeof c=="function"&&c(w),S(T),d==null||d(T),!(f!=null&&f.current))return;f.current.value=""}},x=h=>{var w;h.preventDefault(),f!=null&&f.current&&((w=f.current)==null||w.click())};return B.jsxs("div",{className:`${po.container} ${n??""}`,children:[B.jsx(Pn,{...y,...a,className:r??"",onClick:h=>x(h),children:i}),B.jsx(mm,{accept:v==null?void 0:v.join(", "),ref:f,type:"file",onChange:h=>E(h.target.files),error:_[g],multiple:o>1,hidden:!0}),B.jsx("div",{className:po.files,children:e==null?void 0:e.map((h,w)=>B.jsxs("div",{id:`${b}-${w}`,className:po.file,onClick:D=>{D.stopPropagation(),typeof p=="function"&&p(h)},children:[typeof u=="function"&&m==="left"&&B.jsx(B.Fragment,{children:u(h,w)}),B.jsxs("div",{className:po["file-name-wrapper"],children:[B.jsx("span",{className:po["file-name"],children:n0((h==null?void 0:h.originalName)??(h==null?void 0:h.name)??(h==null?void 0:h.fileName)??"").filename}),B.jsx("span",{className:po["file-extension"],children:n0((h==null?void 0:h.originalName)??(h==null?void 0:h.name)??(h==null?void 0:h.fileName)??"").extension})]}),typeof u=="function"&&m==="right"&&B.jsx(B.Fragment,{children:u(h,w)})]},w))})]})},Gh={"error-payhere":"_error-payhere_docem_1","error-laba":"_error-laba_docem_11","error-bill":"_error-bill_docem_21"},RG={variants:{laba:Gh["error-laba"],payhere:Gh["error-payhere"],bill:Gh["error-bill"]}},BG=({className:e,variants:t="laba",error:n})=>B.jsx(B.Fragment,{children:n?B.jsx("span",{className:`${RG.variants[t]} ${e??""}`,children:n}):B.jsx(B.Fragment,{})}),$G="_container_1k2ib_1",kG="_textarea_1k2ib_12",PG="_label_1k2ib_63",FG="_error_1k2ib_79",di={container:$G,"size-medium":"_size-medium_1k2ib_1","container-textarea":"_container-textarea_1k2ib_6",textarea:kG,"placeholder-shown":"_placeholder-shown_1k2ib_47",label:PG,error:FG,"label-error":"_label-error_1k2ib_117"},NG={size:{medium:di["size-medium"]}},T_=N.forwardRef((e,t)=>{const{isRequired:n,classNameContainer:r,className:i,classNameLabel:a,classNameLabelError:o,name:s,id:l,label:u,error:c,height:p,minHeight:g=94,maxHeight:d=150,style:m,sizeInput:b="medium",translateLabel:y=20,autoTranslateLabel:f=!1,...v}=e,C=N.useRef(null),S=yd(C,t),_=N.useRef(null),E={...m??{},maxHeight:d,height:p??g,minHeight:g},[x,h]=N.useState(!1),[w,D]=N.useState(!1),[I,T]=N.useState(y),F=()=>{var M;["",void 0,null].includes(v.value)||["",void 0,null].includes((M=C.current)==null?void 0:M.value)?(D(!1),f&&setTimeout(()=>{var U,J;const O=((U=C.current)==null?void 0:U.offsetHeight)??0,z=((J=_.current)==null?void 0:J.offsetHeight)??0,G=(O-z)/2;T(G)},100)):D(!0)},P=function(M){var O;h(!0),F(),(O=e.onFocus)==null||O.call(e,M)},k=function(M){var O;h(!1),(O=e.onBlur)==null||O.call(e,M)},R=function(M){F();const O=(M==null?void 0:M.target)??C.current;O.style.height="0px",O.style.height=O.scrollHeight+"px"};return vd(()=>(x&&C.current?C.current.addEventListener("input",R):R(),()=>{var M;(M=C.current)==null||M.removeEventListener("input",R)}),[x]),B.jsxs("div",{className:`${di.container}
|
|
190
|
-
${NG.size[b]}
|
|
191
|
-
${r??""}`,children:[B.jsxs("div",{className:`${di["container-textarea"]}`,children:[B.jsx("textarea",{id:l??s,className:`${w?"":di["placeholder-shown"]} ${c?di.error:""}
|
|
192
|
-
${di.textarea}
|
|
193
|
-
${i??""}`,ref:S,style:E,...v,onFocus:P,onBlur:k}),u&&B.jsxs("label",{htmlFor:l??s,ref:_,style:{transform:`translateY(${I}px)`},className:`${di.label} ${a??""}`,children:[u," ",n&&B.jsx("span",{className:"iru-text-laba-red-08",children:"*"})]})]}),c&&B.jsx("label",{className:`${di["label-error"]}
|
|
194
|
-
${v.disabled?di.disabled:""} ${o??""}`,children:c})]})});T_.displayName="TextareaFloatingInner";const MG="_container_1bbdq_1",OG="_passed_1bbdq_38",LG="_active_1bbdq_42",Fr={container:MG,"content-section":"_content-section_1bbdq_6","content-step":"_content-step_1bbdq_12","number-step":"_number-step_1bbdq_17",passed:OG,active:LG,"content-line-dashed":"_content-line-dashed_1bbdq_47","content-line-active":"_content-line-active_1bbdq_51","content-description":"_content-description_1bbdq_56"},Cx=({widthLine:e,color:t})=>B.jsx("svg",{height:"5",xmlns:"http://www.w3.org/2000/svg",className:Fr["content-line-dashed"],width:e+10,style:{right:-(e/2+14)},children:B.jsx("g",{fill:"none",stroke:t,strokeWidth:"10",children:B.jsx("path",{strokeDasharray:"12,4",d:`M0 0 ${e+10} 0`})})}),Ex=({widthLine:e,color:t})=>B.jsx("hr",{className:Fr["content-line-active"],style:{width:e+22,right:-(e/2+20),borderColor:t}}),VG=({activeStep:e,stepList:t,widthLine:n=250,classNameContainer:r,classNameContent:i,classNameDesc:a,onChange:o,afterActiveType:s="solid",beforeActiveType:l="dashed",colorActive:u="#0163c8 ",colorInactive:c="#D6D6D6"})=>B.jsx("div",{className:`${Fr.container} ${r??""}`,children:t.map((p,g)=>{const d=g+1;return B.jsxs("div",{className:`${Fr["content-section"]} ${i??""}`,onClick:()=>{typeof o=="function"&&o(p)},children:[B.jsxs("div",{className:Fr["content-step"],children:[d<t.length&&B.jsxs(B.Fragment,{children:[(p.step??d)>=e&&B.jsxs(B.Fragment,{children:[l==="solid"&&B.jsx(Ex,{color:c,widthLine:n}),l==="dashed"&&B.jsx(Cx,{color:c,widthLine:n})]}),(p.step??d)<e&&B.jsxs(B.Fragment,{children:[s==="solid"&&B.jsx(Ex,{color:u,widthLine:n}),s==="dashed"&&B.jsx(Cx,{color:u,widthLine:n})]})]}),g!==0&&B.jsx("div",{style:{width:n/2}}),B.jsx("div",{className:`${Fr["number-step"]}
|
|
195
|
-
${(p.step??d)<e?Fr.passed:""}
|
|
196
|
-
${(p.step??d)===e?Fr.active:""}
|
|
197
|
-
${p.className??""}`,children:e>p.step&&p.valueDone?B.jsx(B.Fragment,{children:p.valueDone}):B.jsx(B.Fragment,{children:p.value?p.value:d})}),g+1!==(t==null?void 0:t.length)&&B.jsx("div",{style:{width:n/2}})]}),p.desc&&B.jsx("div",{className:`${Fr["content-description"]} ${a??""}
|
|
198
|
-
${(p.step??d)<=e?Fr.active:""}`,style:{maxWidth:g+1===(t==null?void 0:t.length)||g===0?(n-30)*2:n-30,marginRight:g+1===(t==null?void 0:t.length)?-(n/2):0,marginLeft:g===0?-(n/2):0},children:p.desc})]},g)})});to.register(Yo,Ko,Na,Gr,E_,vl,x_);const HG=(e,t,n)=>{const r=e,i=t||new Date().getMonth(),a=n||new Date().getFullYear();return new Date(`${i}/${r}/${a}`)},jG=({data:e,className:t,height:n=65})=>{const r=N.useRef(null),i=e.map(g=>Ls(HG(1,g.label,g.year),"MMM yy",{locale:rc}))||[],[a,o]=N.useState(""),[s,l]=N.useState(""),u=g=>{const d=[],m=[];let b=!g.find(y=>y.isCurrent);return g.forEach(y=>{b?(m.push(y.value),d.push(null)):(d.push(y.value),y.isCurrent?(b=!0,m.push(y.value)):m.push(null))}),{passed:d,notPassed:m}},c={labels:i,datasets:[{label:"",fill:"blue",backgroundColor:"rgba(75,192,192,1)",borderColor:a,borderCapStyle:"butt",borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:function(g){const d=e[g.dataIndex];let m=s;return d.isCurrent&&(m="#ED0019"),m},pointBorderWidth:.1,pointHoverRadius:4,pointRadius:5,pointBorderColor:s,pointHoverBorderColor:a,data:u(e).passed||[]},{label:"",fill:"grey",backgroundColor:"rgba(75,192,192,1)",borderColor:"#D6D6D6",borderCapStyle:"butt",borderDashOffset:0,pointRadius:5,borderJoinStyle:"miter",pointBackgroundColor:s,pointBorderWidth:.1,pointHoverRadius:4,borderDash:[15,5],data:u(e).notPassed||[]}]},p={interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,labels:{usePointStyle:!0}},tooltip:{external:function(g){let d=document.getElementById("chartjs-tooltip");d||(d=document.createElement("div"),d.id="chartjs-tooltip",d.innerHTML="<table></table>",document.body.appendChild(d));const m=g.tooltip;if(m.opacity===0){d.style.opacity="0";return}d.classList.remove("above","below","no-transform"),m.yAlign?d.classList.add(m.yAlign):d.classList.add("no-transform");function b(f){return f.lines}if(m.body){const f=m.title||[];let v=m.body.map(b),C="<thead>";f.forEach(_=>{let E="";E+="display: flex",E+="; justify-content: center",E+="; font-weight: 600",E+="; font-size: 12px",E+="; padding: 0px 14px",C+=`<tr><span style="${E}">${_}</span></tr>`}),C+="</thead><tbody>",v.length>1&&v[0][0]===v[1][0]&&(v=[v[0]]),v.forEach(_=>{let E="";E+="display: flex",E+="; justify-content: center",E+="; color: #0163C8",E+="; padding: 0px 14px",E+="; font-size: 12px";const x=`<span style="${E}">${_}</span>`;C+=`<tr><td>${x}</td></tr>`}),C+="</tbody>";const S=d.querySelector("table");S&&(S.innerHTML=C)}const y=g.chart.canvas.getBoundingClientRect();d.style.opacity="1",d.style.border="solid 1px #0163C8",d.style.background="white",d.style.height="fit-content",d.style.borderRadius="10px",d.style.position="absolute",d.style.zIndex="10",d.style.padding="4px 0",d.style.left=y.left+window.pageXOffset+m.caretX-30+"px",d.style.top=y.top+window.pageYOffset+m.caretY-60+"px",d.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title:function(g){const d=e[g[0].dataIndex];return Ls(new Date(`1/${d.label}/${d.year}`),"MMMM yyyy",{locale:rc})},label:function(g){let d=g.dataset.label??"";return d&&(d+=": "),g.parsed.y!==null&&(d+=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(g.parsed.y)),d}}}},scales:{x:{grid:{display:!1},beginAtZero:!0,ticks:{autoSkip:!0,maxTicksLimit:20}},y:{min:0,grid:{display:!1},beginAtZero:!0,ticks:{maxTicksLimit:6,callback:function(g){return ed(g)??0}}}}};return N.useEffect(()=>{if(r.current){const g=r.current.getContext("2d"),d=g==null?void 0:g.createLinearGradient(0,100,500,-500);d==null||d.addColorStop(0,"rgba(237, 0, 25, 0)"),d==null||d.addColorStop(1,"rgba(237, 0, 25, 20)");const m=g.fillStyle="rgba(255, 255, 255, 0)";l(m),o(d)}},[]),B.jsxs("div",{className:t??"",children:[B.jsx(D_,{options:p,data:c,height:n}),B.jsx("div",{className:"iru-h-5",children:B.jsx("canvas",{ref:r})})]})},zG="_container_1ng8e_1",Sx={container:zG,"container-popover":"_container-popover_1ng8e_7"},GG=({id:e="1ru-tooltip",children:t,text:n,zIndexPopover:r=1,onShow:i,onClose:a,placement:o="top",backgroundColor:s="black",popoverProps:l={},arrowProps:u={},className:c,isHover:p,delay:g=600})=>{let d;const m=N.useRef(null),b={backgroundColor:xC[s]||s},[y,f]=N.useState(!1),[v,C]=N.useState(!1),S=E=>{var x;(x=m.current)==null||x.handlerShow(E),C(!0),typeof i=="function"&&i()},_=()=>{var E;C(!1),y||(clearInterval(d),(E=m.current)==null||E.setShow(!1),typeof a=="function"&&a())};return B.jsxs(B.Fragment,{children:[B.jsx("div",{id:e,onMouseEnter:E=>{if(p&&!y){const x=E.currentTarget;d=setTimeout(()=>{S({...E,currentTarget:x})},g)}},onMouseLeave:()=>{p&&!y&&_()},onClick:E=>{f(!0),clearInterval(d),v||S(E)},className:Sx.container,children:t}),B.jsx(ei,{floatingOptions:{placement:o},ref:m,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:r,onClose:()=>{y&&(f(!1),_())},styleInnerPopover:{backgroundColor:b.backgroundColor},propsArrow:{fill:b.backgroundColor,...u},className:`${Sx["container-popover"]} ${c??""}`,...l,children:n})]})},WG="_icon_zrudt_5",UG="_show_zrudt_10",Wh={"container-popover":"_container-popover_zrudt_1",icon:WG,show:UG},A_=N.forwardRef((e,t)=>{const{children:n,id:r="1ru-button-popover",text:i="",startIcon:a,endIcon:o,startIconShow:s,endIconShow:l,classNameButton:u="",classNameButtonShow:c="",className:p="",placement:g="top-end",popoverProps:d,zIndexPopover:m=1,offset:b=5,idPopover:y="1ru-popover-button-popover",onClick:f,onClose:v,...C}=e,S=N.useRef(null),_=N.useRef(null),[E,x]=N.useState(!1),h=(T,F,P)=>{let k=B.jsx(B.Fragment,{});return T&&N.isValidElement(F)?k=F:N.isValidElement(P)&&(k=B.jsx("div",{className:`${Wh.icon} ${T?Wh.show:""}`,children:P})),k},w=T=>{var F;(F=S.current)==null||F.setShow(T),x(T)},D=T=>{var F;(F=S.current)==null||F.handlerShow(T),x(!0)},I=()=>{var T;x(!1),(T=S.current)==null||T.setShow(!1),typeof v=="function"&&v()};return N.useImperativeHandle(t,()=>({show:E,setShow:w,handlerClose:I,handlerShow:D}),[E]),B.jsxs(B.Fragment,{children:[B.jsx(Pn,{ref:_,id:r,className:`${u} ${E?c:""}`,onClick:T=>{E?I():typeof f=="function"?f(T):D(T)},startIcon:h(E,s,a),endIcon:h(E,l,o),...C,children:i}),B.jsx(ei,{ref:S,id:y,offset:b,floatingOptions:{placement:g},zIndex:m,onClose:I,className:`${Wh["container-popover"]} ${p}`,...d,children:n})]})});A_.displayName="ButtonPopover";to.register(Yo,Ko,Na,Gr,v_,vl);const XG=e=>({chart:t,tooltip:n})=>{var l,u,c,p,g,d;const r={};if(n.opacity===0){e(m=>({...m,style:{...m.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((p=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:p.raw)??"",s=((d=(g=n.dataPoints)==null?void 0:g[0])==null?void 0:d.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},YG={id:"hairlinePlugin",beforeDatasetsDraw:e=>{const t=e.scales.y;if(!t)return;const{ctx:n}=e,{top:r,bottom:i,left:a,right:o}=e.chartArea;if(t.min>0||t.max<0)return;const s=t.getPixelForValue(0);s<r||s>i||(n.save(),n.beginPath(),n.moveTo(a,s),n.lineTo(o,s),n.lineWidth=2,n.strokeStyle="rgb(207, 216, 220)",n.setLineDash([4,3]),n.stroke(),n.restore())}},KG={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"right",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},ZG=({data:e,height:t,classNameContainer:n,id:r,options:i,CustomTooltip:a})=>{const o=N.useRef(void 0),s=N.useRef(0),l=N.useRef(0),[u,c]=N.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),p=N.useCallback(function({ctx:b,chartArea:y,scales:f,chartHeight:v,gradientFor:C,item:S}){let x=(f.y.getPixelForValue(0)-y.top)/v;x=x<0?0:x>1?1:x,o.current=b.createLinearGradient(0,y.top,0,v+y.top),C==="background"?(o.current.addColorStop(0,(S==null?void 0:S.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(x,(S==null?void 0:S.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(x,(S==null?void 0:S.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(S==null?void 0:S.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(x,(S==null?void 0:S.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(x,(S==null?void 0:S.colorBorderNegative)||"#EB6B6B"))},[]),g=N.useCallback(function({ctx:b,chartArea:y,scales:f,gradientFor:v,item:C}){const S=y.right-y.left,_=y.bottom-y.top;return(!o.current||s.current!==S||l.current!==_)&&(s.current=S,l.current=_,p({ctx:b,chartArea:y,scales:f,chartHeight:_,gradientFor:v,item:C})),p({ctx:b,chartArea:y,scales:f,chartHeight:_,gradientFor:v,item:C}),o.current},[]),d=N.useMemo(()=>({...e,datasets:e.datasets.map(y=>({fill:!0,backgroundColor:function(f){const v=f.chart,{ctx:C,chartArea:S,scales:_}=v;if(S)return g({ctx:C,chartArea:S,scales:_,gradientFor:"background",item:y})},borderColor:function(f){const v=f.chart,{ctx:C,chartArea:S,scales:_}=v;if(S)return g({ctx:C,chartArea:S,scales:_,gradientFor:"border",item:y})},borderWidth:3,tension:0,pointRadius:0,pointHoverRadius:4,...y,data:y.data}))}),[e]),m=N.useMemo(()=>Vs(KG,{plugins:{tooltip:{enabled:!a,external:({chart:y,tooltip:f})=>a?XG(c)({chart:y,tooltip:f}):void 0}}},i??{}),[i,a]);return B.jsxs("div",{id:r,className:n,style:{height:t||"300px"},children:[a&&B.jsx(Qp,{selector:"body",children:B.jsx(a,{...u})}),B.jsx(D_,{data:d,options:m,plugins:[YG]})]})};to.register(Yo,Ko,tc,vl,Na,v_,vl);const qG=e=>({chart:t,tooltip:n})=>{var l,u,c,p,g,d;const r={};if(n.opacity===0){e(m=>({...m,style:{...m.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((p=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:p.raw)??"",s=((d=(g=n.dataPoints)==null?void 0:g[0])==null?void 0:d.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},JG={id:"labelplugin",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n,bottom:r}}=e;t.save(),e.data.datasets.forEach((i,a)=>{const o=e.getDatasetMeta(a);o.visible&&o.data.forEach((s,l)=>{const u=i.data[l]||0,c=i!=null&&i.setDigit?ed(String(u)):String(u);t.font="12px Lato",t.textAlign="center";let p,g=!1;typeof u=="number"&&u>=0?(t.textBaseline="bottom",t.fillStyle=(i==null?void 0:i.colorTextLabelPositive)||s.options.borderColor,p=s.y-5,p>n&&(g=!0)):(t.textBaseline="top",t.fillStyle=(i==null?void 0:i.colorTextLabelNegative)||s.options.borderColor,p=s.y+5,p<r&&(g=!0)),g&&t.fillText(c,s.x,p)})}),t.restore()}},QG={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"left",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{callback:function(e){return ed(e)??0},font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{grid:{display:!1},border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},eW=({data:e,classNameContainer:t,height:n,id:r,options:i,CustomTooltip:a})=>{const o=N.useRef(void 0),s=N.useRef(0),l=N.useRef(0),[u,c]=N.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),p=N.useCallback(function({ctx:b,chartArea:y,scales:f,chartHeight:v,gradientFor:C,item:S}){let x=(f.y.getPixelForValue(0)-y.top)/v;x=x<0?0:x>1?1:x,o.current=b.createLinearGradient(0,y.top,0,v+y.top),C==="background"?(o.current.addColorStop(0,(S==null?void 0:S.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(x,(S==null?void 0:S.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(x,(S==null?void 0:S.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(S==null?void 0:S.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(x,(S==null?void 0:S.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(x,(S==null?void 0:S.colorBorderNegative)||"#EB6B6B"))},[]),g=N.useCallback(function({ctx:b,chartArea:y,scales:f,gradientFor:v,item:C}){const S=y.right-y.left,_=y.bottom-y.top;return(!o.current||s.current!==S||l.current!==_)&&(s.current=S,l.current=_,p({ctx:b,chartArea:y,scales:f,chartHeight:_,gradientFor:v,item:C})),p({ctx:b,chartArea:y,scales:f,chartHeight:_,gradientFor:v,item:C}),o.current},[]),d=N.useMemo(()=>({...e,datasets:e.datasets.map(y=>({fill:!0,backgroundColor:function(f){const v=f.chart,{ctx:C,chartArea:S,scales:_}=v;if(S)return g({ctx:C,chartArea:S,scales:_,gradientFor:"background",item:y})},borderColor:function(f){const v=f.chart,{ctx:C,chartArea:S,scales:_}=v;if(S)return g({ctx:C,chartArea:S,scales:_,gradientFor:"border",item:y})},borderWidth:0,tension:0,pointRadius:0,pointHoverRadius:4,setDigit:!0,...y,data:y.data}))}),[e]),m=N.useMemo(()=>Vs(QG,{plugins:{tooltip:{enabled:!a,external:({chart:y,tooltip:f})=>a?qG(c)({chart:y,tooltip:f}):void 0}}},i??{}),[i,a]);return B.jsxs("div",{id:r,className:t,style:{height:n||"300px"},children:[a&&B.jsx(Qp,{selector:"body",children:B.jsx(a,{...u})}),B.jsx(yG,{data:d,options:m,plugins:[JG]})]})},tW="_left_do93a_7",nW="_right_do93a_10",rW="_indicator_do93a_26",iW="_active_do93a_31",Ni={"container-step-indicator":"_container-step-indicator_do93a_1",left:tW,right:nW,"text-step-indicator":"_text-step-indicator_do93a_13","step-indicator":"_step-indicator_do93a_22",indicator:rW,active:iW};function aW(e,t){if(e<=0)return"0px";if(e===1)return"100%";const n=e-1;return`calc((100% - (${t} * ${n})) / ${e})`}const oW=({activeStep:e=0,countStep:t=0,classNameActiveStepIndicator:n="",classNameContainer:r="",classNameDesc:i="",classNameStepIndicator:a="",id:o="1ru-step-indicator",locationStepIndicator:s="right",widthStepIndicator:l=120,dynamicWidthStepIndicator:u=!1,gapStepIndicator:c="2px",classNameStepIndicatorContainer:p=""})=>B.jsxs("div",{id:o,className:`${Ni["container-step-indicator"]}
|
|
199
|
-
${s==="left"?Ni.left:Ni.right} ${r||""}`,children:[s==="left"&&B.jsxs("p",{className:`${Ni["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]}),B.jsx("div",{className:`${Ni["step-indicator"]} ${p||""}
|
|
200
|
-
${u?"iru-w-full":""} ${c}`,style:{gap:c},children:Array.from({length:t}).map((g,d)=>B.jsx("div",{className:`${Ni.indicator} ${a||""}
|
|
201
|
-
${d<=e?`${Ni.active} ${n}`:""}`,style:{width:u?aW(t,c):l}},d))}),s==="right"&&B.jsxs("p",{className:`${Ni["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]})]}),sW="2.0.16",lW={version:sW};var uW="https://unpkg.com/1mpacto-web-resources@1.0.0/tinymce_8.2.1";const cW=({label:e})=>({tinymceScriptSrc:`${uW}/js/tinymce/tinymce.min.js`,licenseKey:"gpl",init:{plugins:"lists",menubar:!1,statusbar:!1,content_css:`https://unpkg.com/1mpacto-react-ui@${lW.version}/dist/assets/fontfamily.css`,toolbar:"fontfamily fontsize italic bold underline bullist numlist",font_size_formats:"8px 10px 12px 14px 16px 18px 24px 36px 48px",image_advtab:!0,importcss_append:!0,min_height:220,image_caption:!0,noneditable_class:"mceNonEditable",toolbar_mode:"sliding",table_tab_navigation:!1,line_height_formats:"100px",font_family_formats:`
|
|
202
|
-
Lato=Lato;
|
|
203
|
-
Inter=Inter;
|
|
204
|
-
Andale Mono=Andale Mono,times;
|
|
205
|
-
Arial=Arial,Helvetica,sans-serif;
|
|
206
|
-
Arial Black=Arial-Black,avant garde;
|
|
207
|
-
Book Antiqua=Book-Antiqua,palatino;
|
|
208
|
-
Comic Sans MS=Comic-Sans-MS,sans-serif;
|
|
209
|
-
Courier New=Courier-New,courier;
|
|
210
|
-
Georgia=Georgia,palatino;
|
|
211
|
-
Helvetica=Helvetica;
|
|
212
|
-
Impact=Impact,chicago;
|
|
213
|
-
Tahoma=Tahoma,Arial,Helvetica,sans-serif;
|
|
214
|
-
Terminal=Terminal,monaco;
|
|
215
|
-
Times New Roman=Times-New-Roman,times;
|
|
216
|
-
Trebuchet MS=Trebuchet-MS,geneva;
|
|
217
|
-
Verdana=Verdana,geneva;
|
|
218
|
-
Webdings=Webdings;
|
|
219
|
-
Wingdings=Wingdings,zapf dingbats
|
|
220
|
-
`,forced_root_block:"p",forced_root_block_attrs:{style:"font-family: Lato; margin: 0px"},autosave_interval:"5s",autosave_prefix:"{path}{query}-{id}-",autosave_restore_when_empty:!1,autosave_retention:"2m",paste_block_drop:!0,branding:!1,paste_data_images:!1,resize:!1,width:"100%",init_instance_callback:t=>{if(e){const n=document.getElementById(`${t.id}_ifr`),r=n==null?void 0:n.parentNode,i=document.createElement("p");i.className=`
|
|
221
|
-
!iru-text-laba-grey-10
|
|
222
|
-
!iru-absolute
|
|
223
|
-
!iru-font-Lato
|
|
224
|
-
!iru-text-laba-subtitle-rr
|
|
225
|
-
!iru-pl-2
|
|
226
|
-
!iru-pt-2
|
|
227
|
-
!iru-pointer-events-none
|
|
228
|
-
`,n!=null&&n.className&&(n.className="!iru-mt-6 !iru-w-full"),i.appendChild(document.createTextNode(e||"")),r==null||r.appendChild(i)}},setup:t=>{t.on("PostProcess",function(n){/<p style="font-family: Lato; margin: 0px;"> <\/p>/i.test(n.content)&&(n.content=n.content.replace(/ /gi,"<br />"))}),t.on("PastePostProcess",n=>{n.node.querySelectorAll("*").forEach(a=>{t.dom.setStyle(a,"font-family","Lato"),t.dom.setStyle(a,"margin","0px")})})}}}),dW="_container_pqghk_1",fW={container:dW};var Pu={exports:{}};/*
|
|
229
|
-
object-assign
|
|
230
|
-
(c) Sindre Sorhus
|
|
231
|
-
@license MIT
|
|
232
|
-
*/var Uh,wx;function hW(){if(wx)return Uh;wx=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Uh=i()?Object.assign:function(a,o){for(var s,l=r(a),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var p in s)t.call(s,p)&&(l[p]=s[p]);if(e){u=e(s);for(var g=0;g<u.length;g++)n.call(s,u[g])&&(l[u[g]]=s[u[g]])}}return l},Uh}var Xh,_x;function bm(){if(_x)return Xh;_x=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xh=e,Xh}var Yh,Ix;function R_(){return Ix||(Ix=1,Yh=Function.call.bind(Object.prototype.hasOwnProperty)),Yh}var Kh,Dx;function gW(){if(Dx)return Kh;Dx=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=bm(),n={},r=R_();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var p;try{if(typeof a[c]!="function"){var g=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}p=a[c](o,c,l,s,null,t)}catch(m){p=m}if(p&&!(p instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in n)){n[p.message]=!0;var d=u?u():"";e("Failed "+s+" type: "+p.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Kh=i,Kh}var Zh,Tx;function pW(){if(Tx)return Zh;Tx=1;var e=fp(),t=hW(),n=bm(),r=R_(),i=gW(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Zh=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function p(G){var U=G&&(u&&G[u]||G[c]);if(typeof U=="function")return U}var g="<<anonymous>>",d={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:v(),arrayOf:C,element:S(),elementType:_(),instanceOf:E,node:D(),objectOf:h,oneOf:x,oneOfType:w,shape:T,exact:F};function m(G,U){return G===U?G!==0||1/G===1/U:G!==G&&U!==U}function b(G,U){this.message=G,this.data=U&&typeof U=="object"?U:{},this.stack=""}b.prototype=Error.prototype;function y(G){if(process.env.NODE_ENV!=="production")var U={},J=0;function Q(q,Z,se,te,$,H,V){if(te=te||g,H=H||se,V!==n){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var L=te+":"+se;!U[L]&&J<3&&(a("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),U[L]=!0,J++)}}return Z[se]==null?q?Z[se]===null?new b("The "+$+" `"+H+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new b("The "+$+" `"+H+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:G(Z,se,te,$,H)}var ee=Q.bind(null,!1);return ee.isRequired=Q.bind(null,!0),ee}function f(G){function U(J,Q,ee,q,Z,se){var te=J[Q],$=R(te);if($!==G){var H=M(te);return new b("Invalid "+q+" `"+Z+"` of type "+("`"+H+"` supplied to `"+ee+"`, expected ")+("`"+G+"`."),{expectedType:G})}return null}return y(U)}function v(){return y(o)}function C(G){function U(J,Q,ee,q,Z){if(typeof G!="function")return new b("Property `"+Z+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var se=J[Q];if(!Array.isArray(se)){var te=R(se);return new b("Invalid "+q+" `"+Z+"` of type "+("`"+te+"` supplied to `"+ee+"`, expected an array."))}for(var $=0;$<se.length;$++){var H=G(se,$,ee,q,Z+"["+$+"]",n);if(H instanceof Error)return H}return null}return y(U)}function S(){function G(U,J,Q,ee,q){var Z=U[J];if(!s(Z)){var se=R(Z);return new b("Invalid "+ee+" `"+q+"` of type "+("`"+se+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return y(G)}function _(){function G(U,J,Q,ee,q){var Z=U[J];if(!e.isValidElementType(Z)){var se=R(Z);return new b("Invalid "+ee+" `"+q+"` of type "+("`"+se+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return y(G)}function E(G){function U(J,Q,ee,q,Z){if(!(J[Q]instanceof G)){var se=G.name||g,te=z(J[Q]);return new b("Invalid "+q+" `"+Z+"` of type "+("`"+te+"` supplied to `"+ee+"`, expected ")+("instance of `"+se+"`."))}return null}return y(U)}function x(G){if(!Array.isArray(G))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function U(J,Q,ee,q,Z){for(var se=J[Q],te=0;te<G.length;te++)if(m(se,G[te]))return null;var $=JSON.stringify(G,function(V,A){var L=M(A);return L==="symbol"?String(A):A});return new b("Invalid "+q+" `"+Z+"` of value `"+String(se)+"` "+("supplied to `"+ee+"`, expected one of "+$+"."))}return y(U)}function h(G){function U(J,Q,ee,q,Z){if(typeof G!="function")return new b("Property `"+Z+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var se=J[Q],te=R(se);if(te!=="object")return new b("Invalid "+q+" `"+Z+"` of type "+("`"+te+"` supplied to `"+ee+"`, expected an object."));for(var $ in se)if(r(se,$)){var H=G(se,$,ee,q,Z+"."+$,n);if(H instanceof Error)return H}return null}return y(U)}function w(G){if(!Array.isArray(G))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var U=0;U<G.length;U++){var J=G[U];if(typeof J!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(J)+" at index "+U+"."),o}function Q(ee,q,Z,se,te){for(var $=[],H=0;H<G.length;H++){var V=G[H],A=V(ee,q,Z,se,te,n);if(A==null)return null;A.data&&r(A.data,"expectedType")&&$.push(A.data.expectedType)}var L=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new b("Invalid "+se+" `"+te+"` supplied to "+("`"+Z+"`"+L+"."))}return y(Q)}function D(){function G(U,J,Q,ee,q){return P(U[J])?null:new b("Invalid "+ee+" `"+q+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return y(G)}function I(G,U,J,Q,ee){return new b((G||"React class")+": "+U+" type `"+J+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function T(G){function U(J,Q,ee,q,Z){var se=J[Q],te=R(se);if(te!=="object")return new b("Invalid "+q+" `"+Z+"` of type `"+te+"` "+("supplied to `"+ee+"`, expected `object`."));for(var $ in G){var H=G[$];if(typeof H!="function")return I(ee,q,Z,$,M(H));var V=H(se,$,ee,q,Z+"."+$,n);if(V)return V}return null}return y(U)}function F(G){function U(J,Q,ee,q,Z){var se=J[Q],te=R(se);if(te!=="object")return new b("Invalid "+q+" `"+Z+"` of type `"+te+"` "+("supplied to `"+ee+"`, expected `object`."));var $=t({},J[Q],G);for(var H in $){var V=G[H];if(r(G,H)&&typeof V!="function")return I(ee,q,Z,H,M(V));if(!V)return new b("Invalid "+q+" `"+Z+"` key `"+H+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[Q],null," ")+`
|
|
233
|
-
Valid keys: `+JSON.stringify(Object.keys(G),null," "));var A=V(se,H,ee,q,Z+"."+H,n);if(A)return A}return null}return y(U)}function P(G){switch(typeof G){case"number":case"string":case"undefined":return!0;case"boolean":return!G;case"object":if(Array.isArray(G))return G.every(P);if(G===null||s(G))return!0;var U=p(G);if(U){var J=U.call(G),Q;if(U!==G.entries){for(;!(Q=J.next()).done;)if(!P(Q.value))return!1}else for(;!(Q=J.next()).done;){var ee=Q.value;if(ee&&!P(ee[1]))return!1}}else return!1;return!0;default:return!1}}function k(G,U){return G==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function R(G){var U=typeof G;return Array.isArray(G)?"array":G instanceof RegExp?"object":k(U,G)?"symbol":U}function M(G){if(typeof G>"u"||G===null)return""+G;var U=R(G);if(U==="object"){if(G instanceof Date)return"date";if(G instanceof RegExp)return"regexp"}return U}function O(G){var U=M(G);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function z(G){return!G.constructor||!G.constructor.name?g:G.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Zh}var qh,Ax;function mW(){if(Ax)return qh;Ax=1;var e=bm();function t(){}function n(){}return n.resetWarningCache=t,qh=function(){function r(o,s,l,u,c,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},qh}var Rx;function bW(){if(Rx)return Pu.exports;if(Rx=1,process.env.NODE_ENV!=="production"){var e=fp(),t=!0;Pu.exports=pW()(e.isElement,t)}else Pu.exports=mW()();return Pu.exports}var ce=bW(),hg=function(){return hg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},hg.apply(this,arguments)},B_={onActivate:ce.func,onAddUndo:ce.func,onBeforeAddUndo:ce.func,onBeforeExecCommand:ce.func,onBeforeGetContent:ce.func,onBeforeRenderUI:ce.func,onBeforeSetContent:ce.func,onBeforePaste:ce.func,onBlur:ce.func,onChange:ce.func,onClearUndos:ce.func,onClick:ce.func,onContextMenu:ce.func,onCommentChange:ce.func,onCompositionEnd:ce.func,onCompositionStart:ce.func,onCompositionUpdate:ce.func,onCopy:ce.func,onCut:ce.func,onDblclick:ce.func,onDeactivate:ce.func,onDirty:ce.func,onDrag:ce.func,onDragDrop:ce.func,onDragEnd:ce.func,onDragGesture:ce.func,onDragOver:ce.func,onDrop:ce.func,onExecCommand:ce.func,onFocus:ce.func,onFocusIn:ce.func,onFocusOut:ce.func,onGetContent:ce.func,onHide:ce.func,onInit:ce.func,onInput:ce.func,onKeyDown:ce.func,onKeyPress:ce.func,onKeyUp:ce.func,onLoadContent:ce.func,onMouseDown:ce.func,onMouseEnter:ce.func,onMouseLeave:ce.func,onMouseMove:ce.func,onMouseOut:ce.func,onMouseOver:ce.func,onMouseUp:ce.func,onNodeChange:ce.func,onObjectResizeStart:ce.func,onObjectResized:ce.func,onObjectSelected:ce.func,onPaste:ce.func,onPostProcess:ce.func,onPostRender:ce.func,onPreProcess:ce.func,onProgressState:ce.func,onRedo:ce.func,onRemove:ce.func,onReset:ce.func,onSaveContent:ce.func,onSelectionChange:ce.func,onSetAttrib:ce.func,onSetContent:ce.func,onShow:ce.func,onSubmit:ce.func,onUndo:ce.func,onVisualAid:ce.func,onSkinLoadError:ce.func,onThemeLoadError:ce.func,onModelLoadError:ce.func,onPluginLoadError:ce.func,onIconsLoadError:ce.func,onLanguageLoadError:ce.func,onScriptsLoad:ce.func,onScriptsLoadError:ce.func},vW=hg({apiKey:ce.string,licenseKey:ce.string,id:ce.string,inline:ce.bool,init:ce.object,initialValue:ce.string,onEditorChange:ce.func,value:ce.string,tagName:ce.string,tabIndex:ce.number,cloudChannel:ce.string,plugins:ce.oneOfType([ce.string,ce.array]),toolbar:ce.oneOfType([ce.string,ce.array]),disabled:ce.bool,readonly:ce.bool,textareaName:ce.string,tinymceScriptSrc:ce.oneOfType([ce.string,ce.arrayOf(ce.string),ce.arrayOf(ce.shape({src:ce.string,async:ce.bool,defer:ce.bool}))]),rollback:ce.oneOfType([ce.number,ce.oneOf([!1])]),scriptLoading:ce.shape({async:ce.bool,defer:ce.bool,delay:ce.number})},B_),$_=function(e){var t=e;return t&&t.tinymce?t.tinymce:null},Jh=function(e){return typeof e=="function"},Bx=function(e){return e in B_},$x=function(e){return e.substr(2)},yW=function(e,t,n,r,i,a,o){var s=Object.keys(i).filter(Bx),l=Object.keys(a).filter(Bx),u=s.filter(function(p){return a[p]===void 0}),c=l.filter(function(p){return i[p]===void 0});u.forEach(function(p){var g=$x(p),d=o[g];n(g,d),delete o[g]}),c.forEach(function(p){var g=r(e,p),d=$x(p);o[d]=g,t(d,g)})},xW=function(e,t,n,r,i){return yW(i,e.on.bind(e),e.off.bind(e),function(a,o){return function(s){var l;return(l=a(o))===null||l===void 0?void 0:l(s,e)}},t,n,r)},kx=0,k_=function(e){var t=Date.now(),n=Math.floor(Math.random()*1e9);return kx++,e+"_"+n+kx+String(t)},Px=function(e){return e!==null&&(e.tagName.toLowerCase()==="textarea"||e.tagName.toLowerCase()==="input")},Fx=function(e){return typeof e>"u"||e===""?[]:Array.isArray(e)?e:e.split(" ")},CW=function(e,t){return Fx(e).concat(Fx(t))},EW=function(){return window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"},SW=function(e){if(!("isConnected"in Node.prototype)){for(var t=e,n=e.parentNode;n!=null;)t=n,n=t.parentNode;return t===e.ownerDocument}return e.isConnected},Nx=function(e,t){e!==void 0&&(e.mode!=null&&typeof e.mode=="object"&&typeof e.mode.set=="function"?e.mode.set(t):e.setMode(t))},wW=function(e){var t=$_(e);if(!t)throw new Error("tinymce should have been loaded into global scope");return t},Mx=function(e){return e.options&&e.options.isRegistered("disabled")},gg=function(){return gg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gg.apply(this,arguments)},_W=function(e,t,n){var r,i,a=e.createElement("script");a.referrerPolicy="origin",a.type="application/javascript",a.id=t.id,a.src=t.src,a.async=(r=t.async)!==null&&r!==void 0?r:!1,a.defer=(i=t.defer)!==null&&i!==void 0?i:!1;var o=function(){a.removeEventListener("load",o),a.removeEventListener("error",s),n(t.src)},s=function(l){a.removeEventListener("load",o),a.removeEventListener("error",s),n(t.src,l)};a.addEventListener("load",o),a.addEventListener("error",s),e.head&&e.head.appendChild(a)},IW=function(e){var t={},n=function(o,s){var l=t[o];l.done=!0,l.error=s;for(var u=0,c=l.handlers;u<c.length;u++){var p=c[u];p(o,s)}l.handlers=[]},r=function(o,s,l){var u=function(v){return l!==void 0?l(v):console.error(v)};if(o.length===0){u(new Error("At least one script must be provided"));return}for(var c=0,p=!1,g=function(v,C){p||(C?(p=!0,u(C)):++c===o.length&&s())},d=0,m=o;d<m.length;d++){var b=m[d],y=t[b.src];if(y)y.done?g(b.src,y.error):y.handlers.push(g);else{var f=k_("tiny-");t[b.src]={id:f,src:b.src,done:!1,error:null,handlers:[g]},_W(e,gg({id:f},b),n)}}},i=function(){for(var o,s=0,l=Object.values(t);s<l.length;s++){var u=l[s],c=e.getElementById(u.id);c!=null&&c.tagName==="SCRIPT"&&((o=c.parentNode)===null||o===void 0||o.removeChild(c))}t={}},a=function(){return e};return{loadScripts:r,deleteScripts:i,getDocument:a}},DW=function(){var e=[],t=function(i){var a=e.find(function(o){return o.getDocument()===i});return a===void 0&&(a=IW(i),e.push(a)),a},n=function(i,a,o,s,l){var u=function(){return t(i).loadScripts(a,s,l)};o>0?setTimeout(u,o):u()},r=function(){for(var i=e.pop();i!=null;i=e.pop())i.deleteScripts()};return{loadList:n,reinitialize:r}},TW=DW(),AW=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Eo=function(){return Eo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Eo.apply(this,arguments)},Qh="change keyup compositionend setcontent CommentChange",RW=function(e){AW(t,e);function t(n){var r,i,a,o=e.call(this,n)||this;return o.rollbackTimer=void 0,o.valueCursor=void 0,o.rollbackChange=function(){var s=o.editor,l=o.props.value;s&&l&&l!==o.currentContent&&s.undoManager.ignore(function(){if(s.setContent(l),o.valueCursor&&(!o.inline||s.hasFocus()))try{s.selection.moveToBookmark(o.valueCursor)}catch{}}),o.rollbackTimer=void 0},o.handleBeforeInput=function(s){if(o.props.value!==void 0&&o.props.value===o.currentContent&&o.editor&&(!o.inline||o.editor.hasFocus()))try{o.valueCursor=o.editor.selection.getBookmark(3)}catch{}},o.handleBeforeInputSpecial=function(s){(s.key==="Enter"||s.key==="Backspace"||s.key==="Delete")&&o.handleBeforeInput(s)},o.handleEditorChange=function(s){var l=o.editor;if(l&&l.initialized){var u=l.getContent();o.props.value!==void 0&&o.props.value!==u&&o.props.rollback!==!1&&(o.rollbackTimer||(o.rollbackTimer=window.setTimeout(o.rollbackChange,typeof o.props.rollback=="number"?o.props.rollback:200))),u!==o.currentContent&&(o.currentContent=u,Jh(o.props.onEditorChange)&&o.props.onEditorChange(u,l))}},o.handleEditorChangeSpecial=function(s){(s.key==="Backspace"||s.key==="Delete")&&o.handleEditorChange(s)},o.initialise=function(s){var l,u,c;s===void 0&&(s=0);var p=o.elementRef.current;if(p){if(!SW(p)){if(s===0)setTimeout(function(){return o.initialise(1)},1);else if(s<100)setTimeout(function(){return o.initialise(s+1)},100);else throw new Error("tinymce can only be initialised when in a document");return}var g=wW(o.view),d=Eo(Eo(Eo(Eo({},o.props.init),{selector:void 0,target:p,disabled:o.props.disabled,readonly:o.props.readonly,inline:o.inline,plugins:CW((l=o.props.init)===null||l===void 0?void 0:l.plugins,o.props.plugins),toolbar:(u=o.props.toolbar)!==null&&u!==void 0?u:(c=o.props.init)===null||c===void 0?void 0:c.toolbar}),o.props.licenseKey?{license_key:o.props.licenseKey}:{}),{setup:function(m){o.editor=m,o.bindHandlers({}),o.inline&&!Px(p)&&m.once("PostRender",function(b){m.setContent(o.getInitialValue(),{no_events:!0})}),o.props.init&&Jh(o.props.init.setup)&&o.props.init.setup(m),o.props.disabled&&(Mx(o.editor)?o.editor.options.set("disabled",o.props.disabled):o.editor.mode.set("readonly"))},init_instance_callback:function(m){var b,y=o.getInitialValue();o.currentContent=(b=o.currentContent)!==null&&b!==void 0?b:m.getContent(),o.currentContent!==y&&(o.currentContent=y,m.setContent(y),m.undoManager.clear(),m.undoManager.add(),m.setDirty(!1)),o.props.init&&Jh(o.props.init.init_instance_callback)&&o.props.init.init_instance_callback(m)}});o.inline||(p.style.visibility=""),Px(p)&&(p.value=o.getInitialValue()),g.init(d)}},o.id=o.props.id||k_("tiny-react"),o.elementRef=ae.createRef(),o.inline=(a=(r=o.props.inline)!==null&&r!==void 0?r:(i=o.props.init)===null||i===void 0?void 0:i.inline)!==null&&a!==void 0?a:!1,o.boundHandlers={},o}return Object.defineProperty(t.prototype,"view",{get:function(){var n,r;return(r=(n=this.elementRef.current)===null||n===void 0?void 0:n.ownerDocument.defaultView)!==null&&r!==void 0?r:window},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(n){var r=this,i,a;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(n),this.editor.initialized)){if(this.currentContent=(i=this.currentContent)!==null&&i!==void 0?i:this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==n.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){var o=this.editor;o.undoManager.transact(function(){var l;if(!r.inline||o.hasFocus())try{l=o.selection.getBookmark(3)}catch{}var u=r.valueCursor;if(o.setContent(r.props.value),!r.inline||o.hasFocus())for(var c=0,p=[l,u];c<p.length;c++){var g=p[c];if(g)try{o.selection.moveToBookmark(g),r.valueCursor=g;break}catch{}}})}if(this.props.readonly!==n.readonly){var s=(a=this.props.readonly)!==null&&a!==void 0?a:!1;Nx(this.editor,s?"readonly":"design")}this.props.disabled!==n.disabled&&(Mx(this.editor)?this.editor.options.set("disabled",this.props.disabled):Nx(this.editor,this.props.disabled?"readonly":"design"))}},t.prototype.componentDidMount=function(){var n=this,r,i,a,o,s;if($_(this.view)!==null)this.initialise();else if(Array.isArray(this.props.tinymceScriptSrc)&&this.props.tinymceScriptSrc.length===0)(i=(r=this.props).onScriptsLoadError)===null||i===void 0||i.call(r,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));else if(!((a=this.elementRef.current)===null||a===void 0)&&a.ownerDocument){var l=function(){var c,p;(p=(c=n.props).onScriptsLoad)===null||p===void 0||p.call(c),n.initialise()},u=function(c){var p,g;(g=(p=n.props).onScriptsLoadError)===null||g===void 0||g.call(p,c)};TW.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),(s=(o=this.props.scriptLoading)===null||o===void 0?void 0:o.delay)!==null&&s!==void 0?s:0,l,u)}},t.prototype.componentWillUnmount=function(){var n=this,r=this.editor;r&&(r.off(Qh,this.handleEditorChange),r.off(this.beforeInputEvent(),this.handleBeforeInput),r.off("keypress",this.handleEditorChangeSpecial),r.off("keydown",this.handleBeforeInputSpecial),r.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(i){r.off(i,n.boundHandlers[i])}),this.boundHandlers={},r.remove(),this.editor=void 0)},t.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},t.prototype.beforeInputEvent=function(){return EW()?"beforeinput SelectionChange":"SelectionChange"},t.prototype.renderInline=function(){var n=this.props.tagName,r=n===void 0?"div":n;return ae.createElement(r,{ref:this.elementRef,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.renderIframe=function(){return ae.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.getScriptSources=function(){var n,r,i=(n=this.props.scriptLoading)===null||n===void 0?void 0:n.async,a=(r=this.props.scriptLoading)===null||r===void 0?void 0:r.defer;if(this.props.tinymceScriptSrc!==void 0)return typeof this.props.tinymceScriptSrc=="string"?[{src:this.props.tinymceScriptSrc,async:i,defer:a}]:this.props.tinymceScriptSrc.map(function(u){return typeof u=="string"?{src:u,async:i,defer:a}:u});var o=this.props.cloudChannel,s=this.props.apiKey?this.props.apiKey:"no-api-key",l="https://cdn.tiny.cloud/1/".concat(s,"/tinymce/").concat(o,"/tinymce.min.js");return[{src:l,async:i,defer:a}]},t.prototype.getInitialValue=function(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""},t.prototype.bindHandlers=function(n){var r=this;if(this.editor!==void 0){xW(this.editor,n,this.props,this.boundHandlers,function(s){return r.props[s]});var i=function(s){return s.onEditorChange!==void 0||s.value!==void 0},a=i(n),o=i(this.props);!a&&o?(this.editor.on(Qh,this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):a&&!o&&(this.editor.off(Qh,this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},t.propTypes=vW,t.defaultProps={cloudChannel:"8"},t}(ae.Component);const BW=e=>B.jsx("div",{className:`${fW.container}`,children:B.jsx(RW,{...Vs(cW({label:e.label}),e)})}),$W=({children:e,open:t,className:n,id:r,classNameContainer:i,maxCollapsedHeight:a="0px"})=>(N.useLayoutEffect(()=>{const o=document.getElementById(r),s=document.getElementById(`inner-${r}`);if(!o||!s)return;const l=new ResizeObserver(()=>{const u=s.getBoundingClientRect().height;o.style.height=`${u}px`});if(t){const u=s.getBoundingClientRect().height;o.style.height=`${u}px`,l.observe(s)}else o.style.height=typeof a=="number"?`${a}px`:a;return()=>{l.disconnect()}},[t,r,a]),B.jsx("div",{id:r,className:`${bw.collapse} ${i??""}`,style:{height:t?0:a},children:B.jsx("div",{id:`inner-${r}`,className:n??"",children:e})})),kW="_selected_1n7z7_93",PW="_error_1n7z7_98",FW="_disabled_1n7z7_102",xt={"container-time-range":"_container-time-range_1n7z7_1","time-range-header":"_time-range-header_1n7z7_9","text-to":"_text-to_1n7z7_15","time-range":"_time-range_1n7z7_9","time-range-body":"_time-range-body_1n7z7_40","time-range-divider":"_time-range-divider_1n7z7_44","list-time":"_list-time_1n7z7_50","container-time":"_container-time_1n7z7_1","title-time":"_title-time_1n7z7_63","container-cell-time":"_container-cell-time_1n7z7_71","cell-time":"_cell-time_1n7z7_79",selected:kW,error:PW,disabled:FW,"time-range-footer":"_time-range-footer_1n7z7_114"},mo=(e,t=2)=>String(e).padStart(t,"0"),Ox=(e,t)=>e[0][0]&&e[0][1]&&e[1][0]&&e[1][1]?`${e[0][0]}:${e[0][1]} - ${e[1][0]}:${e[1][1]}`:Ba[t]["Select Time"],Ba={"en-US":{to:"to",Hour:"Hour",Minute:"Minute","Select Time":"Select Time",Reset:"Reset",Apply:"Apply"},"id-ID":{to:"to",Hour:"Jam",Minute:"Menit","Select Time":"Pilih Waktu",Reset:"Reset",Apply:"Terapkan"},"zh-CN":{to:"到",Hour:"小时",Minute:"分钟","Select Time":"选择时间",Reset:"重置",Apply:"应用"},"nl-NL":{to:"tot",Hour:"Uur",Minute:"Minuten","Select Time":"Select Time",Reset:"Reset",Apply:"Toepassen"}},ms=[["",""],["",""]],NW=e=>{const{id:t="time-range",classNameContainer:n,value:r=ms,buttonClick:i,zIndexPopper:a=1,offsetPopover:o=5,floatingOptions:s,locale:l="id-ID",disableValidation:u=!1}=e,c=N.useRef(null),[p,g]=N.useState(ms),d=(f,v)=>{if(v==="start"){const C=[f,p[1]];g(C)}else{const C=[p[0],f];g(C)}},m=f=>{var v;(v=c.current)==null||v.handlerShow(f),g(r||ms)},b=()=>{var f;typeof(e==null?void 0:e.onChange)=="function"&&e.onChange(ms),g(ms),(f=c.current)==null||f.setShow(!1)},y=()=>{var x;const f=Number(p[0][0]),v=Number(p[0][1]),C=Number(p[1][0]),S=Number(p[1][1]),_=p[0][0]&&p[0][1]&&p[1][0]&&p[1][1],E=f<C||f===C&&v<=S;_&&(E||u)&&(typeof(e==null?void 0:e.onChange)=="function"&&e.onChange(p),(x=c.current)==null||x.setShow(!1))};return B.jsxs(B.Fragment,{children:[B.jsx("div",{id:t,onClick:m,className:n,children:typeof i=="function"?i(r,Ox(r,l)):r?Ox(r,l):Ba[l]["Select Time"]}),B.jsx(ei,{zIndex:a,ref:c,offset:o,id:`${t}-popover`,floatingOptions:{placement:"bottom-end",...s},className:"iru-flex iru-flex-col",children:B.jsxs("div",{className:xt["container-time-range"],children:[B.jsxs("div",{className:xt["time-range-header"],children:[B.jsx("div",{className:xt["time-range"],children:p[0][0]&&p[0][1]?`${p[0][0]}:${p[0][1]}`:"--:--"}),B.jsx("p",{className:xt["text-to"],children:Ba[l].to}),B.jsx("div",{className:xt["time-range"],children:p[1][0]&&p[1][1]?`${p[1][0]}:${p[1][1]}`:"--:--"})]}),B.jsxs("div",{className:xt["time-range-body"],children:[B.jsx(Lx,{type:"start",value:[p[0][0],p[0][1]],onChange:f=>d(f,"start"),locale:l,values:p,disableValidation:u}),B.jsx("div",{className:xt["time-range-divider"]}),B.jsx(Lx,{type:"end",value:[p[1][0],p[1][1]],onChange:f=>d(f,"end"),locale:l,values:p,disableValidation:u})]}),B.jsxs("div",{className:`${xt["time-range-footer"]}`,children:[typeof(e==null?void 0:e.buttonReset)=="function"?B.jsx("div",{onClick:b,children:e.buttonReset()}):B.jsx(Pn,{variants:"nude-laba-blue-10",size:"small",onClick:b,children:Ba[l].Reset}),typeof(e==null?void 0:e.buttonSubmit)=="function"?B.jsx("div",{onClick:y,children:e.buttonSubmit()}):B.jsx(Pn,{size:"small",onClick:y,children:Ba[l].Apply})]})]})})]})},Lx=e=>{const{value:t,onChange:n,type:r,locale:i,values:a,disableValidation:o}=e,s=(d,m,b)=>Array.from({length:(m-d)/b+1},(y,f)=>d+f*b),l=()=>{const d=document.getElementById(`time-range-${r}-hour-${t[0]}`),m=document.getElementById(`time-range-${r}-minute-${t[1]}`),b=document.getElementById(`time-range-${r}-hour`),y=document.getElementById(`time-range-${r}-minute`);d&&b&&b.scrollTo({behavior:"instant",top:d.offsetTop-75}),m&&y&&y.scrollTo({behavior:"instant",top:m.offsetTop-75})},u=d=>{if(r==="start"||o)return!1;{if(!a[0][0])return!1;const m=Number(a[0][0]);return d<m}},c=d=>{if(r==="start"||o)return!1;{if(!a[0][0]||!a[0][1]||!a[1][0])return!1;const m=Number(a[0][0]),b=Number(a[1][0]),y=Number(a[0][1]);return m===b&&d<y}},p=d=>{if(r==="start"||o)return!1;{const m=Number(a[0][0]);return d<m}},g=d=>{if(r==="start"||o)return!1;{if(!a[0][0]||!a[0][1]||!a[1][0])return!1;const m=Number(a[0][0]),b=Number(a[1][0]),y=Number(a[0][1]);return m===b&&d<y}};return N.useEffect(()=>{l()},[]),B.jsxs("div",{className:xt["list-time"],children:[B.jsxs("div",{className:xt["container-time"],children:[B.jsx("p",{className:xt["title-time"],children:Ba[i].Hour}),B.jsx("div",{id:`time-range-${r}-hour`,className:xt["container-cell-time"],children:s(0,23,1).map(d=>B.jsx("div",{id:`time-range-${r}-hour-${d}`,className:`${xt["cell-time"]} ${t[0]===mo(d)?xt.selected:""} ${u(d)?xt.error:""} ${p(d)?xt.disabled:""}`,onClick:()=>n([mo(d),t[1]]),children:mo(d)},d))})]}),B.jsxs("div",{className:xt["container-time"],children:[B.jsx("p",{className:xt["title-time"],children:Ba[i].Minute}),B.jsx("div",{id:`time-range-${r}-minute`,className:xt["container-cell-time"],children:s(0,59,1).map(d=>B.jsx("div",{id:`time-range-${r}-minute-${d}`,className:`${xt["cell-time"]} ${t[1]===mo(d)?xt.selected:""} ${c(d)?xt.error:""} ${g(d)?xt.disabled:""}`,onClick:()=>n([t[0],mo(d)]),children:mo(d)},d))})]})]})},MW="_container_1p1m0_1",OW="_textarea_1p1m0_12",LW="_label_1p1m0_39",VW="_error_1p1m0_59",Nr={container:MW,"size-large":"_size-large_1p1m0_1","container-textarea":"_container-textarea_1p1m0_6",textarea:OW,label:LW,error:VW,"label-error":"_label-error_1p1m0_82","size-small":"_size-small_1p1m0_93"},HW={size:{large:Nr["size-large"],small:Nr["size-small"]}},P_=N.forwardRef((e,t)=>{const{isRequired:n,classNameContainer:r,className:i,classNameLabel:a,classNameLabelError:o,name:s,id:l,label:u,error:c,height:p,minHeight:g=94,maxHeight:d=150,style:m,sizeInput:b="large",...y}=e,f=N.useRef(null),v=yd(f,t),C={...m??{},maxHeight:d,height:p??g,minHeight:g},[S,_]=N.useState(!1),E=function(w){var D;_(!0),(D=e.onFocus)==null||D.call(e,w)},x=function(w){var D;_(!1),(D=e.onBlur)==null||D.call(e,w)},h=function(w){const D=(w==null?void 0:w.target)??f.current;D.style.height="0px",D.style.height=D.scrollHeight+"px"};return vd(()=>(S&&f.current?f.current.addEventListener("input",h):h(),()=>{var w;(w=f.current)==null||w.removeEventListener("input",h)}),[S]),B.jsxs("div",{className:`${Nr.container}
|
|
234
|
-
${HW.size[b]}
|
|
235
|
-
${r??""}`,children:[B.jsxs("div",{className:`${Nr["container-textarea"]}`,children:[B.jsx("textarea",{id:l??s,className:` ${c?Nr.error:""}
|
|
236
|
-
${Nr.textarea}
|
|
237
|
-
${i??""}`,ref:v,style:C,...y,onFocus:E,onBlur:x}),u&&B.jsxs("label",{htmlFor:l??s,className:`${Nr.label} ${y.disabled?Nr.disabled:""} ${a??""}`,children:[u," ",n&&B.jsx("span",{children:"*"})]})]}),c&&B.jsx("label",{className:`${Nr["label-error"]}
|
|
238
|
-
${y.disabled?Nr.disabled:""} ${o??""}`,children:c})]})});P_.displayName="TextareaInnerLabel";const jW="_input_19hx0_12",zW="_label_19hx0_39",GW="_error_19hx0_59",Rn={"container-large":"_container-large_19hx0_1","container-input":"_container-input_19hx0_6",input:jW,label:zW,error:GW,"isset-right-icon":"_isset-right-icon_19hx0_82","isset-left-icon":"_isset-left-icon_19hx0_85","start-icon":"_start-icon_19hx0_88","end-icon":"_end-icon_19hx0_95","label-error":"_label-error_19hx0_102","hidden-label":"_hidden-label_19hx0_113","container-small":"_container-small_19hx0_229"},WW={size:{large:Rn["container-large"],small:Rn["container-small"]}},F_=N.forwardRef((e,t)=>{const{isRequired:n,classNameContainer:r,className:i,classNameLabel:a,classNameLabelError:o,name:s,id:l,label:u,type:c="text",startIcon:p,endIcon:g,error:d,sizeInput:m="large",...b}=e,y=()=>typeof p=="function"||N.isValidElement(p),f=()=>typeof g=="function"||N.isValidElement(g);return B.jsxs("div",{className:`${WW.size[m]} ${r??""}
|
|
239
|
-
${u?"":Rn["hidden-label"]}`,children:[B.jsxs("div",{className:`${Rn["container-input"]}`,children:[B.jsxs("div",{className:Rn["start-icon"],children:[typeof p=="function"&&p(),N.isValidElement(p)&&p]}),B.jsx("input",{id:l??s,className:`${Rn.input} ${d?Rn.error:""}
|
|
240
|
-
${y()?Rn["isset-left-icon"]:""}
|
|
241
|
-
${f()?Rn["isset-right-icon"]:""}
|
|
242
|
-
${i??""}`,ref:t,type:c,...b}),B.jsxs("div",{className:Rn["end-icon"],children:[typeof g=="function"&&g(),N.isValidElement(g)&&g]}),u&&B.jsxs("label",{htmlFor:l??s,className:`${Rn.label} ${b.disabled?Rn.disabled:""} ${a??""}`,children:[u," ",n&&B.jsx("span",{children:"*"})]})]}),d&&B.jsx("label",{className:`${Rn["label-error"]}
|
|
243
|
-
${b.disabled?Rn.disabled:""} ${o??""}`,children:d})]})});F_.displayName="InputInnerLabel";let bs=null;const UW=({id:e,children:t,wordBreak:n="normal",style:r,...i})=>{const a=N.useRef(null),o=N.useMemo(()=>t.split(" "),[t]),[s,l]=N.useState(n),u=N.useCallback((c,p,g)=>{let d=0;if(bs||(bs=document.createElement("canvas").getContext("2d")),!bs)return;const m=window.getComputedStyle(p);bs.font=`${m.fontStyle}
|
|
244
|
-
${m.fontVariant}
|
|
245
|
-
${m.fontWeight}
|
|
246
|
-
${m.fontSize}
|
|
247
|
-
${m.fontFamily}`;for(const y of g){const f=bs.measureText(y).width;f>d&&(d=f)}const b=d>c?"break-all":"normal";l(y=>y!==b?b:y)},[]);return N.useEffect(()=>{if(n!=="break-all")return;const c=a.current;if(!c)return;const p=new ResizeObserver(g=>{for(const d of g)u(d.contentRect.width,c,o)});return p.observe(c),u(c.getBoundingClientRect().width,c,o),()=>{p.disconnect()}},[o,n,u]),B.jsx("p",{ref:a,id:e,style:{...r,wordBreak:s},...i,children:t})};exports.AlertContainer=e6;exports.Badges=dw;exports.BigNumber=bt;exports.Breadcrumbs=FO;exports.Button=Pn;exports.ButtonIcon=cw;exports.ButtonPopover=A_;exports.Calendar=$d;exports.CalendarRange=lw;exports.CheckboxTable=EG;exports.Chips=fw;exports.Collapse=VO;exports.CollapseV2=$W;exports.ConfigColors=xC;exports.ConfigTable=cn;exports.DatePicker=mO;exports.DateRangePicker=uw;exports.DefaultCheckedChecboxIcon=hw;exports.DefaultRadioChecboxIcon=gw;exports.DoughnutChart=xG;exports.ErrorMessage=BG;exports.FilterContainer=vw;exports.FilterDate=bO;exports.GradientBarChart=eW;exports.GradientLineChart=ZG;exports.InputFloatingInner=qC;exports.InputInnerLabel=F_;exports.InputNative=mm;exports.InputReguler=Og;exports.LineChart=jG;exports.ListVirtualization=s4;exports.ModalDialog=zO;exports.MonthYearPicker=CG;exports.NumberFormat=SL;exports.Pagination=w8;exports.PatternFormat=EL;exports.Popover=ei;exports.PortalComponent=Qp;exports.RadioCheckbox=kd;exports.RadioCheckboxLabel=RO;exports.SelectDropdownContainer=K4;exports.SelectDropdownContainerComponents=M4;exports.Sidebar=mw;exports.Step=VG;exports.StepIndicator=oW;exports.Switch=xO;exports.TPublish=Q6;exports.TabPanel=m8;exports.Table=l8;exports.TableSubComponent=u8;exports.TableVirtualization=op;exports.Tabs=p8;exports.Text=UW;exports.TextEditor=BW;exports.Textarea=Aw;exports.TextareaFloatingInner=T_;exports.TextareaInnerLabel=P_;exports.TimeRange=NW;exports.Timeline=XO;exports.Tooltip=GG;exports.TruncateComponent=DL;exports.TypeBigNumber=Zc;exports.UploadFile=Tw;exports.UploadImage=$L;exports.UploadMultipleFile=AG;exports.betweenBig=g6;exports.configNativeScreens=d0;exports.configScreens=J6;exports.configTypography=q6;exports.configTypographyLabaBisnis=EC;exports.configTypographyPayhere=CC;exports.convertBigNumbersToStrings=c0;exports.convertNumbersToBigNumbers=u0;exports.convertTextToJsonBigNumbers=K6;exports.cookieStorage=yT;exports.deepCompareEquals=Ig;exports.deepMerge=uT;exports.defaultConfig=Kx;exports.deleteKeysImmutable=dC;exports.deleteKeysMutable=lT;exports.encryptRSAOAEP=pT;exports.extractElementStringToOriginalValue=gT;exports.formatBigNumber=mT;exports.formatDate=yo;exports.formatDateRange=tT;exports.formatNumber=Oi;exports.groupByKey=cC;exports.isAccurateBigNumber=Zr;exports.isAccurateNumber=uC;exports.isObject=So;exports.lessThanBig=h6;exports.maxBig=d6;exports.minBig=c6;exports.moreThanBig=f6;exports.openAlert=t6;exports.parseBigDecimal=Cl;exports.parseDecimal=Sg;exports.parseFileName=n0;exports.removeKeyObjectEmptyValue=rT;exports.removeTrailingZeros=bT;exports.setDigit=ed;exports.transformArrayMapping=aT;exports.transformArrayMappingObjectFC=oT;exports.transformArrayOfObjectToArray=_g;exports.transformArrayOfObjectToString=wg;exports.transformBigNumber=dT;exports.transformBigNumberOpt=fT;exports.transformDataHistory=nT;exports.transformLatLong=iT;exports.transformNumber=cT;exports.transformSecondTime=sT;exports.transfromIsNan=hT;exports.useAsyncDebounce=i4;exports.useCombinedResizeObserver=q$;exports.useCountdown=Z$;exports.useDeepCompareEffect=Qi;exports.useDeepCompareMemoize=Zs;exports.useElementOrWindowMediaQuery=K$;exports.useEventListener=t8;exports.useMasonry=n8;exports.useMergeRefs=yd;exports.useOtpInput=r8;exports.useStateRef=J$;exports.utilTable=c9;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/common.cjs"),l=require("./utils/formatBigNumber.cjs"),d=require("./utils/cookies.cjs"),m=require("./components/Alert/index.cjs"),t=require("./utils/yup.cjs"),c=require("./config/bigNumber/index.cjs"),n=require("./utils/axiosBigNumber.cjs"),b=require("./config/tailwind/colors.cjs"),g=require("./config/tailwind/screen.cjs"),p=require("./config/tailwind/nativeScreen.cjs"),q=require("./components/TPublish/TPublish.cjs"),T=require("./components/Button/Button.cjs"),C=require("./components/Popover/Popover.cjs"),y=require("./components/Calendar/Calendar.cjs"),B=require("./components/Calendar/CalendarRange.cjs"),h=require("./components/DatePicker/DatePicker.cjs"),N=require("./components/DatePicker/DateRangePicker.cjs"),D=require("./components/DatePicker/FilterDate.cjs"),O=require("./components/Input/InputFloatingInner.cjs"),S=require("./components/Input/InputReguler.cjs"),I=require("./components/Pagination/Pagination.cjs"),P=require("./components/Tabs/Tabs.cjs"),x=require("./components/Tabs/TabPanel.cjs"),M=require("./components/Table/Table.cjs"),R=require("./components/Virtualization/TableVirtualization.cjs"),v=require("./components/Virtualization/ListVirtualization.cjs"),A=require("./components/SelectDropdownContainer/SelectDropdownContainer.cjs"),F=require("./components/Switch/Switch.cjs"),L=require("./components/ButtonIcon/ButtonIcon.cjs"),E=require("./components/Badges/Badges.cjs"),j=require("./components/Chips/Chips.cjs"),u=require("./components/RadioCheckbox/RadioCheckbox.cjs"),k=require("./components/RadioCheckbox/RadioCheckboxLabel.cjs"),w=require("./components/Breadcrumbs/Breadcrumbs.cjs"),V=require("./components/Sidebar/Sidebar.cjs"),z=require("./components/Collapse/Collapse.cjs"),K=require("./components/Modal/ModalDialog.cjs"),U=require("./components/Timeline/Timeline.cjs"),G=require("./components/FilterContainer/FilterContainer.cjs"),_=require("./components/NumberFormat/NumberFormat.cjs"),H=require("./components/PortalComponent/PortalComponent.cjs"),J=require("./components/Upload/UploadFile.cjs"),Q=require("./components/TruncateComponent/TruncateComponent.cjs"),W=require("./components/Upload/UploadImage.cjs"),Y=require("./components/Textarea/Textarea.cjs"),Z=require("./components/Chart/DoughnutChart.cjs"),$=require("./components/DatePicker/MonthYearPicker.cjs"),X=require("./components/RadioCheckbox/CheckboxTable.cjs"),ee=require("./components/Input/InputNative.cjs"),re=require("./components/Upload/UploadMultipleFile.cjs"),te=require("./components/ErrorMessage/ErrorMessage.cjs"),ae=require("./components/Textarea/TextareaFloatingInner.cjs"),oe=require("./components/Step/Step.cjs"),ne=require("./components/Chart/LineChart.cjs"),ue=require("./components/Tooltip/Tooltip.cjs"),ie=require("./components/ButtonPopover/ButtonPopover.cjs"),se=require("./components/Chart/GradientLineChart.cjs"),le=require("./components/Chart/GradientBarChart.cjs"),ce=require("./components/Step/StepIndicator.cjs"),fe=require("./components/TextEditor/TextEditor.cjs"),de=require("./components/Collapse/CollapseV2.cjs"),me=require("./components/Table/TableSubMobile.cjs"),be=require("./components/TimeRange/TimeRange.cjs"),ge=require("./components/Textarea/TextareaInnerLabel.cjs"),pe=require("./components/Input/InputInnerLabel.cjs"),qe=require("./components/Text/Text.cjs"),Te=require("./hooks/useElementOrWindowMediaQuery.cjs"),Ce=require("./hooks/useCountdown.cjs"),ye=require("./hooks/useAsyncDebounce.cjs"),Be=require("./hooks/useCombinedResizeObserver.cjs"),he=require("./hooks/useStateRef.cjs"),Ne=require("./hooks/useMasonry.cjs"),De=require("./hooks/useOtpInput.cjs"),Oe=require("bignumber.js"),i=require("./config/tailwind/typography.cjs"),Se=require("@tanstack/react-table"),Ie=require("react-select"),Pe=require("react-number-format"),xe=require("./components/Table/Table.config.cjs"),Me=require("react-toastify"),f=require("./hooks/useDeepCompareEffect.cjs"),Re=require("./hooks/useMergeRefs.cjs"),ve=require("./hooks/useEventListener.cjs");function Ae(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}return o.default=r,Object.freeze(o)}const Fe=Ae(Se);exports.deepCompareEquals=e.deepCompareEquals;exports.deepMerge=e.deepMerge;exports.deleteKeysImmutable=e.deleteKeysImmutable;exports.deleteKeysMutable=e.deleteKeysMutable;exports.encryptRSAOAEP=e.encryptRSAOAEP;exports.extractElementStringToOriginalValue=e.extractElementStringToOriginalValue;exports.formatDate=e.formatDate;exports.formatDateRange=e.formatDateRange;exports.formatNumber=e.formatNumber;exports.groupByKey=e.groupByKey;exports.isAccurateBigNumber=e.isAccurateBigNumber;exports.isAccurateNumber=e.isAccurateNumber;exports.isObject=e.isObject;exports.parseBigDecimal=e.parseBigDecimal;exports.parseDecimal=e.parseDecimal;exports.parseFileName=e.parseFileName;exports.removeKeyObjectEmptyValue=e.removeKeyObjectEmptyValue;exports.setDigit=e.setDigit;exports.transformArrayMapping=e.transformArrayMapping;exports.transformArrayMappingObjectFC=e.transformArrayMappingObjectFC;exports.transformArrayOfObjectToArray=e.transformArrayOfObjectToArray;exports.transformArrayOfObjectToString=e.transformArrayOfObjectToString;exports.transformBigNumber=e.transformBigNumber;exports.transformBigNumberOpt=e.transformBigNumberOpt;exports.transformDataHistory=e.transformDataHistory;exports.transformLatLong=e.transformLatLong;exports.transformNumber=e.transformNumber;exports.transformSecondTime=e.transformSecondTime;exports.transfromIsNan=e.transfromIsNan;exports.formatBigNumber=l.formatBigNumber;exports.removeTrailingZeros=l.removeTrailingZeros;exports.cookieStorage=d.default;exports.openAlert=m.openAlert;exports.betweenBig=t.betweenBig;exports.lessThanBig=t.lessThanBig;exports.maxBig=t.maxBig;exports.minBig=t.minBig;exports.moreThanBig=t.moreThanBig;exports.BigNumber=c.BigNumber;exports.defaultConfig=c.defaultConfig;exports.convertBigNumbersToStrings=n.convertBigNumbersToStrings;exports.convertNumbersToBigNumbers=n.convertNumbersToBigNumbers;exports.convertTextToJsonBigNumbers=n.convertTextToJsonBigNumbers;exports.ConfigColors=b.default;exports.configScreens=g.default;exports.configNativeScreens=p.default;exports.TPublish=q.default;exports.Button=T.default;exports.Popover=C.default;exports.Calendar=y.default;exports.CalendarRange=B.default;exports.DatePicker=h.default;exports.DateRangePicker=N.default;exports.FilterDate=D.default;exports.InputFloatingInner=O.default;exports.InputReguler=S.default;exports.Pagination=I.default;exports.Tabs=P.default;exports.TabPanel=x.default;exports.Table=M.default;exports.TableVirtualization=R.default;exports.ListVirtualization=v.default;exports.SelectDropdownContainer=A.default;exports.Switch=F.default;exports.ButtonIcon=L.default;exports.Badges=E.default;exports.Chips=j.default;exports.DefaultCheckedChecboxIcon=u.DefaultCheckedChecboxIcon;exports.DefaultRadioChecboxIcon=u.DefaultRadioChecboxIcon;exports.RadioCheckbox=u.default;exports.RadioCheckboxLabel=k.default;exports.Breadcrumbs=w.default;exports.Sidebar=V.default;exports.Collapse=z.default;exports.ModalDialog=K.default;exports.Timeline=U.default;exports.FilterContainer=G.default;exports.NumberFormat=_.default;exports.PortalComponent=H.default;exports.UploadFile=J.default;exports.TruncateComponent=Q.default;exports.UploadImage=W.default;exports.Textarea=Y.default;exports.DoughnutChart=Z.default;exports.MonthYearPicker=$.default;exports.CheckboxTable=X.default;exports.InputNative=ee.default;exports.UploadMultipleFile=re.default;exports.ErrorMessage=te.default;exports.TextareaFloatingInner=ae.default;exports.Step=oe.default;exports.LineChart=ne.default;exports.Tooltip=ue.default;exports.ButtonPopover=ie.default;exports.GradientLineChart=se.default;exports.GradientBarChart=le.default;exports.StepIndicator=ce.default;exports.TextEditor=fe.default;exports.CollapseV2=de.default;exports.TableSubComponent=me.default;exports.TimeRange=be.default;exports.TextareaInnerLabel=ge.default;exports.InputInnerLabel=pe.default;exports.Text=qe.default;exports.useElementOrWindowMediaQuery=Te.default;exports.useCountdown=Ce.default;exports.useAsyncDebounce=ye.default;exports.useCombinedResizeObserver=Be.default;exports.useStateRef=he.default;exports.useMasonry=Ne.default;exports.useOtpInput=De.useOtpInput;exports.TypeBigNumber=Oe;exports.configTypography=i.default;exports.configTypographyLabaBisnis=i.configTypographyLabaBisnis;exports.configTypographyPayhere=i.configTypographyPayhere;exports.utilTable=Fe;Object.defineProperty(exports,"SelectDropdownContainerComponents",{enumerable:!0,get:()=>Ie.components});Object.defineProperty(exports,"PatternFormat",{enumerable:!0,get:()=>Pe.PatternFormat});exports.ConfigTable=xe.ConfigTable;Object.defineProperty(exports,"AlertContainer",{enumerable:!0,get:()=>Me.ToastContainer});exports.useDeepCompareEffect=f.useDeepCompareEffect;exports.useDeepCompareMemoize=f.useDeepCompareMemoize;exports.useMergeRefs=Re.useMergeRefs;exports.useEventListener=ve.useEventListener;
|